@icanbwell/composite 1.1254.4 → 1.1254.6

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/285.index.js CHANGED
@@ -13597,7 +13597,7 @@ It is disabled in production builds, so you don't need to worry about that.`)}}}
13597
13597
  }
13598
13598
  }
13599
13599
  }
13600
- `));function dqe(t){const e=Object.assign(Object.assign({},Xc),t);return Jc.useMutation(sve,e)}var ave,ove;const KK=null;function fqe(t={}){return ave(Object.assign(Object.assign({},t),{variables:Object.assign(Object.assign({},t.variables),{category:KK})}))}function _qe(t={}){return ove(Object.assign(Object.assign({},t),{variables:Object.assign(Object.assign({},t.variables),{category:KK})}))}var uve,cve;const JK=null;function hqe(t={}){return uve(Object.assign(Object.assign({},t),{variables:Object.assign(Object.assign({},t.variables),{category:JK})}))}function pqe(t={}){return cve(Object.assign(Object.assign({},t),{variables:Object.assign(Object.assign({},t.variables),{category:JK})}))}var lve,dve;const XK=null;function mqe(t={}){return lve(Object.assign(Object.assign({},t),{variables:Object.assign(Object.assign({},t.variables),{category:XK})}))}function Sqe(t={}){return dve(Object.assign(Object.assign({},t),{variables:Object.assign(Object.assign({},t.variables),{category:XK})}))}var ZK,fve,_ve;const gqe=t=>ZK(fve,t),vqe=t=>ZK(_ve,t);var e3=v(46),Nv,bb;class t3{constructor(){this.type="backend",Nv.set(this,void 0),bb.set(this,void 0)}init(e,{clientSlug:r,apiClient:n}){if(!n)throw e.logger.error('"apiClient" not supplied to "QueryBackend".'),new Error('"apiClient" required for "QueryBackend".');qd(this,Nv,r,"f"),qd(this,bb,Jw(n),"f")}read(e,r,n){return cb(this,void 0,void 0,function*(){try{const{translation:i}=yield si(this,bb,"f").getClientTranslations({name:si(this,Nv,"f"),key:r,lang:e});n(null,i?.json||{})}catch{const s=`Error fetching translation with key "${r}" and client "${si(this,Nv,"f")||"N/A"}".`;n(s,null)}})}}Nv=new WeakMap,bb=new WeakMap,t3.type="backend";var Wp;class r3{constructor(e){this.type="logger",Wp.set(this,void 0),qd(this,Wp,e,"f")}log([e,r,...n]){si(this,Wp,"f").info({meta:r},e,...n)}warn([e,r,...n]){si(this,Wp,"f").error({meta:r},e,...n)}error([e,r,...n]){si(this,Wp,"f").error({meta:r},e,...n)}}Wp=new WeakMap,r3.type="logger";var Rb,Ob,B_,Dv,ba,j_;const n3="appLanguage";class ko{constructor({keys:e,nativeBridge:r,fallbackKeys:n=[],defaultLanguage:i="en",logger:s,parent:a,debug:o=!1,remoteConfig:c={}}){B_.set(this,void 0),Dv.set(this,void 0),ba.set(this,void 0),j_.set(this,void 0),qd(this,B_,e,"f"),qd(this,Dv,n,"f"),qd(this,j_,r,"f");const l={lng:i,fallbackNS:si(this,Dv,"f"),debug:o,defaultNS:e,returnNull:!1};a?qd(this,ba,a.cloneInstance(l),"f"):(qd(this,ba,Xa.createInstance(),"f"),s&&si(this,ba,"f").use(new r3(s.child({library:"@icanbwell/i18n"}))),c.apiClient&&si(this,ba,"f").use(t3),si(this,ba,"f").init(Object.assign(Object.assign({},l),{fallbackLng:!1,partialBundledLanguages:!0,ns:[],resources:{},backend:c,saveMissing:!0,missingKeyHandler:(d,p,A)=>si(this,ba,"f").services.logger.error(`missing key: ${A}; language: ${d}; key: ${p}`)}))),this.t=si(this,ba,"f").t,ko.resolvedLanguage=si(this,ba,"f").resolvedLanguage||i}load(){var e;return cb(this,void 0,void 0,function*(){const r=(yield(e=si(this,j_,"f"))===null||e===void 0?void 0:e.storage.getItem(n3))||ko.resolvedLanguage;r!==ko.resolvedLanguage&&(yield si(this,ba,"f").changeLanguage(r),ko.resolvedLanguage=r),yield si(this,ba,"f").loadNamespaces(si(this,B_,"f"));const n=si(this,B_,"f").filter(i=>!si(this,ba,"f").hasResourceBundle(r,i));if(n.length)throw new Error(`Error loading translations for key(s): ${n.join(", ")}`);return si(ko,Rb,"f",Ob).emit("changeLanguage",r),this})}child(e){return new ko(Object.assign(Object.assign({},e),{nativeBridge:si(this,j_,"f"),fallbackKeys:[...si(this,Dv,"f"),...si(this,B_,"f")],parent:si(this,ba,"f"),defaultLanguage:si(this,ba,"f").language}))}get isLoaded(){return si(this,B_,"f").every(e=>si(this,ba,"f").hasResourceBundle(si(this,ba,"f").language,e))}changeLanguage(e){var r,n;return cb(this,void 0,void 0,function*(){ko.resolvedLanguage=e,yield si(this,ba,"f").changeLanguage(e),si(ko,Rb,"f",Ob).emit("changeLanguage",e),yield(r=si(this,j_,"f"))===null||r===void 0?void 0:r.storage.setItem(n3,e),(n=si(this,j_,"f"))===null||n===void 0||n.reloadView(!0)})}get resolvedLanguage(){return ko.resolvedLanguage}onChangeLanguage(e){si(ko,Rb,"f",Ob).on("changeLanguage",e)}}Rb=ko,B_=new WeakMap,Dv=new WeakMap,ba=new WeakMap,j_=new WeakMap,Ob={value:new e3},ko.resolvedLanguage="en";var zp;class hve{constructor(e){zp.set(this,void 0),(0,m.__classPrivateFieldSet)(this,zp,e,"f")}get isWithin(){return!!window.ReactNativeWebView}open(e){(0,m.__classPrivateFieldGet)(this,zp,"f").emit("openwebview",e)}close(e){(0,m.__classPrivateFieldGet)(this,zp,"f").emit("closewebview",e)}reload(e=!1){(0,m.__classPrivateFieldGet)(this,zp,"f").emit("reloadwebview",e)}}zp=new WeakMap;var pve=v(3857),mve=v.n(pve);const Sve=(t,e)=>mve().bind(`${t}.${String(e)}`),Vo=t=>e=>Sve(t,e);var Pb,oU;const Yd=Vo("biometrics");class gve{constructor(e){Pb.set(this,void 0),oU.set(this,Yd("isAvailable")),this.isAvailable=()=>(0,m.__awaiter)(this,void 0,void 0,function*(){return(0,m.__classPrivateFieldGet)(this,Pb,"f").isWithin?yield(0,m.__classPrivateFieldGet)(this,oU,"f").call(this):!1}),this.getBiometryInformation=Yd("getBiometryInformation"),this.biometricKeysExist=Yd("biometricKeysExist"),this.createKeys=Yd("createKeys"),this.createSignature=Yd("createSignature"),this.deleteKeys=Yd("deleteKeys"),this.checkPermission=Yd("checkPermission"),this.requestPermission=Yd("requestPermission"),(0,m.__classPrivateFieldSet)(this,Pb,e,"f")}}Pb=new WeakMap,oU=new WeakMap;const vve=Vo("events");class Eve{constructor(){this.emit=vve("emit")}}var uU=v(4962),Kp,cU,lU,dU;const fU=Vo("storage");class yve{constructor(e){Kp.set(this,void 0),cU.set(this,fU("setItem")),lU.set(this,fU("getItem")),dU.set(this,fU("removeItem")),(0,m.__classPrivateFieldSet)(this,Kp,e,"f")}setItem(e,r){return(0,m.__awaiter)(this,void 0,void 0,function*(){(0,m.__classPrivateFieldGet)(this,Kp,"f").isWithin?yield(0,m.__classPrivateFieldGet)(this,cU,"f").call(this,e,r):uU.A.setItem(e,r)})}getItem(e){return(0,m.__classPrivateFieldGet)(this,Kp,"f").isWithin?(0,m.__classPrivateFieldGet)(this,lU,"f").call(this,e):uU.A.getItem(e)}removeItem(e){return(0,m.__awaiter)(this,void 0,void 0,function*(){(0,m.__classPrivateFieldGet)(this,Kp,"f").isWithin?yield(0,m.__classPrivateFieldGet)(this,dU,"f").call(this,e):uU.A.removeItem(e)})}}Kp=new WeakMap,cU=new WeakMap,lU=new WeakMap,dU=new WeakMap;var Mb,_U;const Lv=Vo("camera");class Tve{constructor(e){Mb.set(this,void 0),_U.set(this,Lv("isAvailable")),this.isAvailable=()=>(0,m.__awaiter)(this,void 0,void 0,function*(){return(0,m.__classPrivateFieldGet)(this,Mb,"f").isWithin?yield(0,m.__classPrivateFieldGet)(this,_U,"f").call(this):!1}),this.checkPermission=Lv("checkPermission"),this.checkRollPermission=Lv("checkRollPermission"),this.requestPermission=Lv("requestPermission"),this.requestRollPermission=Lv("requestRollPermission"),(0,m.__classPrivateFieldSet)(this,Mb,e,"f")}}Mb=new WeakMap,_U=new WeakMap;var Wd=v(3758),H_,hU,pU,mU,SU;const Ib=Vo("geolocation");class Ave{constructor(e){H_.set(this,void 0),hU.set(this,Ib("isAvailable")),pU.set(this,Ib("getCurrentPosition")),mU.set(this,Ib("checkPermission")),SU.set(this,Ib("requestPermission")),this.isAvailable=()=>(0,m.__awaiter)(this,void 0,void 0,function*(){return(0,m.__classPrivateFieldGet)(this,H_,"f").isWithin?(0,m.__classPrivateFieldGet)(this,hU,"f").call(this):!!navigator.geolocation}),this.getCurrentPosition=r=>(0,m.__awaiter)(this,void 0,void 0,function*(){if((0,m.__classPrivateFieldGet)(this,H_,"f").isWithin)return(0,m.__classPrivateFieldGet)(this,pU,"f").call(this,r);try{const{state:n}=yield navigator.permissions.query({name:"geolocation"});if(n==="granted"||n==="prompt")return yield new Promise((i,s)=>navigator.geolocation.getCurrentPosition(i,s,r))}catch(n){throw new Ui.b(`Failed to retrieve the permission or the position is unavailable. ${n.message}`,{errorCode:Wd.O.UNKNOWN})}throw new Ui.b("Permission Denied.",{errorCode:Wd.O.INSUFFICIENT_PERMISSIONS})}),this.checkPermission=()=>(0,m.__awaiter)(this,void 0,void 0,function*(){return(0,m.__classPrivateFieldGet)(this,H_,"f").isWithin?(0,m.__classPrivateFieldGet)(this,mU,"f").call(this):(yield navigator.permissions.query({name:"geolocation"})).state}),this.requestPermission=()=>(0,m.__awaiter)(this,void 0,void 0,function*(){if((0,m.__classPrivateFieldGet)(this,H_,"f").isWithin)return yield(0,m.__classPrivateFieldGet)(this,SU,"f").call(this);{const{state:r}=yield navigator.permissions.query({name:"geolocation"});return(r==="granted"||r==="prompt")&&(yield new Promise((n,i)=>navigator.geolocation.getCurrentPosition(n,i))),r}}),(0,m.__classPrivateFieldSet)(this,H_,e,"f")}}H_=new WeakMap,hU=new WeakMap,pU=new WeakMap,mU=new WeakMap,SU=new WeakMap;var Cve=v(1204),bve=v.n(Cve),Rve=v(7931),i3=v.n(Rve),wv,Nb;const Ove=t=>{if(!bve()(t))return!1;try{return new URL(t).protocol==="https:"}catch{return!1}},Pve=Vo("print");class Mve{constructor(e){wv.set(this,void 0),Nb.set(this,Pve("print")),(0,m.__classPrivateFieldSet)(this,wv,e,"f")}print(e){return(0,m.__awaiter)(this,void 0,void 0,function*(){if(e.html){if((0,m.__classPrivateFieldGet)(this,wv,"f").isWithin)return yield(0,m.__classPrivateFieldGet)(this,Nb,"f").call(this,{html:e.html});i3()({type:"raw-html",printable:e.html})}else if(e.filePath&&Ove(e.filePath)){const r={filePath:e.filePath};if((0,m.__classPrivateFieldGet)(this,wv,"f").isWithin)return yield(0,m.__classPrivateFieldGet)(this,Nb,"f").call(this,r);i3()({type:"pdf",printable:r.filePath})}else throw new Ui.b("Filepath must be an https URL.",{errorCode:Wd.O.UNKNOWN})})}}wv=new WeakMap,Nb=new WeakMap;var q_,gU,vU,EU,yU;const Db=Vo("documentDownload"),TU={"image/jpeg":"jpeg","image/png":"png","image/svg+xml":"svg","application/pdf":"pdf","text/calendar":"ics"},Ive=t=>{const e=t.trim();if(!e||e==="."||e==="..")throw new Ui.b("Invalid filename.",{errorCode:Wd.O.UNKNOWN});if(/[\\/]/.test(e)||e.includes("\0"))throw new Ui.b("Invalid filename.",{errorCode:Wd.O.UNKNOWN});return e},Nve=t=>{const e=/^\s*data:([a-z]+\/[a-z0-9\-+]+(;[a-z-]+=[a-z0-9-]+)?)?(;base64)?,[a-z0-9!$&',()*+,;=\-._~:@/?%\s]*\s*$/i;return!!t.match(e)},Dve=t=>t.substring(t.indexOf(":")+1,t.indexOf(";")),Lve=(t,e)=>{if(!Nve(e))throw new Ui.b("Invalid Data URL Format.",{errorCode:Wd.O.UNKNOWN});const r=Dve(e);return Lb(r),`${t}.${TU[r]}`},Lb=t=>{if(!Object.keys(TU).includes(t))throw new Ui.b("Invalid or unallowed file type.",{errorCode:Wd.O.UNKNOWN})};class wve{constructor(e){q_.set(this,void 0),gU.set(this,Db("isAvailable")),vU.set(this,Db("writeFile")),EU.set(this,Db("checkPermission")),yU.set(this,Db("requestPermission")),this.isAvailable=r=>(0,m.__awaiter)(this,void 0,void 0,function*(){return Lb(r),(0,m.__classPrivateFieldGet)(this,q_,"f").isWithin?(0,m.__classPrivateFieldGet)(this,gU,"f").call(this,r):!0}),this.writeFile=(r,n)=>(0,m.__awaiter)(this,void 0,void 0,function*(){const i=Ive(r);if(Object.values(TU).some(a=>i.includes(a)))throw new Ui.b("Filename should not contain extension",{errorCode:Wd.O.UNKNOWN});const s=Lve(i,n);if((0,m.__classPrivateFieldGet)(this,q_,"f").isWithin)return(0,m.__classPrivateFieldGet)(this,vU,"f").call(this,s,n);{const a=document.createElement("a");return a.href=n,a.download=s,a.click(),"Files"}}),this.checkPermission=r=>(0,m.__awaiter)(this,void 0,void 0,function*(){return Lb(r),(0,m.__classPrivateFieldGet)(this,q_,"f").isWithin?(0,m.__classPrivateFieldGet)(this,EU,"f").call(this,r):"granted"}),this.requestPermission=r=>(0,m.__awaiter)(this,void 0,void 0,function*(){return Lb(r),(0,m.__classPrivateFieldGet)(this,q_,"f").isWithin?yield(0,m.__classPrivateFieldGet)(this,yU,"f").call(this,r):"granted"}),(0,m.__classPrivateFieldSet)(this,q_,e,"f")}}q_=new WeakMap,gU=new WeakMap,vU=new WeakMap,EU=new WeakMap,yU=new WeakMap;const Uv=Object.freeze({UNAVAILABLE:"unavailable",BLOCKED:"blocked",DENIED:"denied",GRANTED:"granted",LIMITED:"limited"}),AU="Only supported by iOS 14 and above";async function Uve(){throw new Error(AU)}async function $ve(t){throw new Error(AU)}async function xve(){throw new Error(AU)}async function s3(){return Uv.UNAVAILABLE}async function a3(){return{status:Uv.UNAVAILABLE,settings:{}}}async function o3(t){return t.reduce((e,r)=>(e[r]=Uv.UNAVAILABLE,e),{})}const Zc={check:s3,checkLocationAccuracy:Uve,checkMultiple:o3,checkNotifications:a3,openLimitedPhotoLibraryPicker:xve,openSettings:Promise.reject,request:s3,requestLocationAccuracy:$ve,requestMultiple:o3,requestNotifications:a3},Eqe=Object.freeze({ANDROID:{},IOS:{},WINDOWS:{}});var yqe,Tqe;const Aqe=Zc.check,Cqe=Zc.checkLocationAccuracy,bqe=Zc.checkMultiple,Rqe=Zc.checkNotifications,Oqe=Zc.openLimitedPhotoLibraryPicker,Pqe=Zc.openSettings,Mqe=Zc.request,Iqe=Zc.requestLocationAccuracy,Nqe=Zc.requestMultiple,Dqe=Zc.requestNotifications,Lqe=null;var Q_,CU,bU,RU,OU;const wb=Vo("documentPicker"),Fve=t=>new Promise((e,r)=>{const n=new FileReader;n.readAsDataURL(t),n.onload=()=>e(n.result.replace("data:","").replace(/^.+,/,"")),n.onerror=r}),u3=t=>new Promise((e,r)=>{const n=document.createElement("input");n.type="file",t===!0&&(n.multiple=t),n.onchange=({target:i})=>(0,m.__awaiter)(void 0,void 0,void 0,function*(){try{e(yield Promise.all(Object.values(i.files).map(s=>(0,m.__awaiter)(void 0,void 0,void 0,function*(){return{type:s.type,name:s.name,size:s.size,base64:yield Fve(s)}}))))}catch(s){r(s)}}),n.click()});class Gve{constructor(e){Q_.set(this,void 0),CU.set(this,wb("pickMultiple")),bU.set(this,wb("pickSingle")),RU.set(this,wb("checkPermission")),OU.set(this,wb("requestPermission")),this.pickMultiple=()=>(0,m.__classPrivateFieldGet)(this,Q_,"f").isWithin?(0,m.__classPrivateFieldGet)(this,CU,"f").call(this):u3(!0),this.checkPermission=()=>(0,m.__awaiter)(this,void 0,void 0,function*(){return(0,m.__classPrivateFieldGet)(this,Q_,"f").isWithin?yield(0,m.__classPrivateFieldGet)(this,RU,"f").call(this):Promise.resolve(Uv.GRANTED)}),this.requestPermission=()=>(0,m.__awaiter)(this,void 0,void 0,function*(){return(0,m.__classPrivateFieldGet)(this,Q_,"f").isWithin?yield(0,m.__classPrivateFieldGet)(this,OU,"f").call(this):Promise.resolve(Uv.GRANTED)}),(0,m.__classPrivateFieldSet)(this,Q_,e,"f")}pickSingle(){return(0,m.__awaiter)(this,void 0,void 0,function*(){return(0,m.__classPrivateFieldGet)(this,Q_,"f").isWithin?(0,m.__classPrivateFieldGet)(this,bU,"f").call(this):(yield u3(!1))[0]})}}Q_=new WeakMap,CU=new WeakMap,bU=new WeakMap,RU=new WeakMap,OU=new WeakMap;var Y_,PU,MU,IU,NU;const Ub=Vo("pushNotifications");class kve{constructor(e){Y_.set(this,void 0),PU.set(this,Ub("isAvailable")),MU.set(this,Ub("getDeviceToken")),IU.set(this,Ub("checkPermission")),NU.set(this,Ub("requestPermission")),this.isAvailable=()=>(0,m.__awaiter)(this,void 0,void 0,function*(){return(0,m.__classPrivateFieldGet)(this,Y_,"f").isWithin?(0,m.__classPrivateFieldGet)(this,PU,"f").call(this):!1}),this.getDeviceToken=()=>(0,m.__awaiter)(this,void 0,void 0,function*(){if((0,m.__classPrivateFieldGet)(this,Y_,"f").isWithin)return(0,m.__classPrivateFieldGet)(this,MU,"f").call(this);throw new Error("This method is currently not supported on web")}),this.checkPermission=()=>(0,m.__awaiter)(this,void 0,void 0,function*(){return(0,m.__classPrivateFieldGet)(this,Y_,"f").isWithin?(0,m.__classPrivateFieldGet)(this,IU,"f").call(this):"unavailable"}),this.requestPermission=()=>(0,m.__awaiter)(this,void 0,void 0,function*(){return(0,m.__classPrivateFieldGet)(this,Y_,"f").isWithin?yield(0,m.__classPrivateFieldGet)(this,NU,"f").call(this):"unavailable"}),(0,m.__classPrivateFieldSet)(this,Y_,e,"f")}}Y_=new WeakMap,PU=new WeakMap,MU=new WeakMap,IU=new WeakMap,NU=new WeakMap;var $b,DU;const Vve=Vo("deepLink");class Bve{constructor(e){$b.set(this,void 0),DU.set(this,Vve("openLink")),this.openLink=(r,n="_blank")=>(0,m.__awaiter)(this,void 0,void 0,function*(){if((0,m.__classPrivateFieldGet)(this,$b,"f").isWithin)return(0,m.__classPrivateFieldGet)(this,DU,"f").call(this,r,n);window.open(r.webUrl,n)}),(0,m.__classPrivateFieldSet)(this,$b,e,"f")}}$b=new WeakMap,DU=new WeakMap;var xb,LU;const jve=Vo("system");class Hve{constructor(e){xb.set(this,void 0),LU.set(this,jve("openSettings")),this.openSettings=()=>(0,m.__awaiter)(this,void 0,void 0,function*(){if((0,m.__classPrivateFieldGet)(this,xb,"f").isWithin)return yield(0,m.__classPrivateFieldGet)(this,LU,"f").call(this)}),(0,m.__classPrivateFieldSet)(this,xb,e,"f")}}xb=new WeakMap,LU=new WeakMap;var $v,wU,UU;const c3=Vo("utils");class qve{constructor(e){$v.set(this,void 0),wU.set(this,c3("getPlatform")),UU.set(this,c3("getBundleId")),(0,m.__classPrivateFieldSet)(this,$v,e,"f")}getPlatform(){return(0,m.__awaiter)(this,void 0,void 0,function*(){return(0,m.__classPrivateFieldGet)(this,$v,"f").isWithin?(0,m.__classPrivateFieldGet)(this,wU,"f").call(this):"web"})}getBundleId(){return(0,m.__awaiter)(this,void 0,void 0,function*(){if((0,m.__classPrivateFieldGet)(this,$v,"f").isWithin)return(0,m.__classPrivateFieldGet)(this,UU,"f").call(this);console.warn("bundleId not available on the web")})}}$v=new WeakMap,wU=new WeakMap,UU=new WeakMap;var Fb,$U,xU,FU,GU,kU,VU,zd;const Jp=Vo("connectDevices");class Qve{constructor(e){Fb.set(this,void 0),$U.set(this,Jp("startSession")),xU.set(this,Jp("syncData")),FU.set(this,Jp("refreshData")),GU.set(this,Jp("endSession")),kU.set(this,Jp("getCurrentUser")),VU.set(this,Jp("checkPermissions")),zd.set(this,()=>(0,m.__classPrivateFieldGet)(this,Fb,"f").isWithin),this.startSession=r=>(0,m.__awaiter)(this,void 0,void 0,function*(){if((0,m.__classPrivateFieldGet)(this,zd,"f").call(this))return(0,m.__classPrivateFieldGet)(this,$U,"f").call(this,r)}),this.syncData=(r=30)=>(0,m.__awaiter)(this,void 0,void 0,function*(){return(0,m.__classPrivateFieldGet)(this,zd,"f").call(this)?(0,m.__classPrivateFieldGet)(this,xU,"f").call(this,r):[]}),this.refreshData=(r=30)=>(0,m.__awaiter)(this,void 0,void 0,function*(){return(0,m.__classPrivateFieldGet)(this,zd,"f").call(this)?(0,m.__classPrivateFieldGet)(this,FU,"f").call(this,r):[]}),this.endSession=()=>(0,m.__awaiter)(this,void 0,void 0,function*(){if((0,m.__classPrivateFieldGet)(this,zd,"f").call(this))return(0,m.__classPrivateFieldGet)(this,GU,"f").call(this)}),this.getCurrentUser=()=>(0,m.__awaiter)(this,void 0,void 0,function*(){return(0,m.__classPrivateFieldGet)(this,zd,"f").call(this)?(0,m.__classPrivateFieldGet)(this,kU,"f").call(this):null}),this.checkPermissions=()=>(0,m.__awaiter)(this,void 0,void 0,function*(){return(0,m.__classPrivateFieldGet)(this,zd,"f").call(this)?(0,m.__classPrivateFieldGet)(this,VU,"f").call(this):!1}),(0,m.__classPrivateFieldSet)(this,Fb,e,"f")}}Fb=new WeakMap,$U=new WeakMap,xU=new WeakMap,FU=new WeakMap,GU=new WeakMap,kU=new WeakMap,VU=new WeakMap,zd=new WeakMap;var Xp,BU,jU,HU;const qU=Vo("passkey");class Yve{constructor(e){Xp.set(this,void 0),BU.set(this,qU("isSupported")),jU.set(this,qU("create")),HU.set(this,qU("get")),this.isSupported=()=>(0,m.__awaiter)(this,void 0,void 0,function*(){return(0,m.__classPrivateFieldGet)(this,Xp,"f").isWithin?(0,m.__classPrivateFieldGet)(this,BU,"f").call(this):!1}),this.create=r=>(0,m.__awaiter)(this,void 0,void 0,function*(){if(!(0,m.__classPrivateFieldGet)(this,Xp,"f").isWithin)throw new Error("Native passkey bridge is only available within a native WebView.");return(0,m.__classPrivateFieldGet)(this,jU,"f").call(this,r)}),this.get=r=>(0,m.__awaiter)(this,void 0,void 0,function*(){if(!(0,m.__classPrivateFieldGet)(this,Xp,"f").isWithin)throw new Error("Native passkey bridge is only available within a native WebView.");return(0,m.__classPrivateFieldGet)(this,HU,"f").call(this,r)}),(0,m.__classPrivateFieldSet)(this,Xp,e,"f")}}Xp=new WeakMap,BU=new WeakMap,jU=new WeakMap,HU=new WeakMap;class Wve{constructor(){this.events=new Eve,this.webview=new hve(this.events),this.biometrics=new gve(this.webview),this.storage=new yve(this.webview),this.camera=new Tve(this.webview),this.geolocation=new Ave(this.webview),this.print=new Mve(this.webview),this.documentDownload=new wve(this.webview),this.documentPicker=new Gve(this.webview),this.pushNotifications=new kve(this.webview),this.deepLink=new Bve(this.webview),this.utils=new qve(this.webview),this.system=new Hve(this.webview),this.connectDevices=new Qve(this.webview),this.passkey=new Yve(this.webview)}reloadView(e=!1){this.webview.isWithin?this.webview.reload(e):globalThis.location.reload()}}const QU=new Wve;var xv;(function(t){t.one="1.0.0"})(xv||(xv={}));const Gb="orchestrator:native-bridge",zve={id:Gb,dependencies:{featureServices:{}},create:()=>({[xv.one]:()=>({featureService:QU})})};var Fv;(function(t){t.one="1.0.0"})(Fv||(Fv={}));const kb="orchestrator:translation-service",Kve={id:kb,dependencies:{featureServices:{[Na]:bu.one,[qc]:Gd.one,[Ji]:Qa.one,[hv]:Up.one,[Gb]:xv.one}},create:({featureServices:t})=>{const e=t[Na],r=t[qc],n=t[hv],{slug:i}=t[Ji].getClientContext(),s=t[Gb],a=new ko({keys:[],nativeBridge:s,defaultLanguage:"en",logger:r,remoteConfig:{clientSlug:i,apiClient:e}});return n.setProfileProperties({language:a.resolvedLanguage}),a.onChangeLanguage(o=>n.setProfileProperties({language:o})),{[Fv.one]:()=>({featureService:a})}}};var Zp,em,Vb,lu,Gv,Bb;const jb="tokens",YU="delegationContext",WU="userSessionId";class Jve{constructor({apiClient:e,stateService:r,identityGatewaySdk:n,storage:i,logger:s}){Zp.set(this,void 0),em.set(this,void 0),Vb.set(this,void 0),lu.set(this,void 0),Gv.set(this,void 0),Bb.set(this,[]),(0,m.__classPrivateFieldSet)(this,Zp,e,"f"),(0,m.__classPrivateFieldSet)(this,em,r,"f"),(0,m.__classPrivateFieldSet)(this,Vb,n,"f"),(0,m.__classPrivateFieldSet)(this,lu,i,"f"),(0,m.__classPrivateFieldSet)(this,Gv,s,"f")}registerPreLogoutHandler(e){(0,m.__classPrivateFieldGet)(this,Bb,"f").push(e)}getStoredTokens(){const e=(0,m.__classPrivateFieldGet)(this,lu,"f").getItem(jb);return e?JSON.parse(e):void 0}removeStoredTokens(){(0,m.__classPrivateFieldGet)(this,lu,"f").removeItem(jb),this.clearSessionId(),this.clearDelegationContext()}clearSessionId(){(0,m.__classPrivateFieldGet)(this,lu,"f").removeItem(WU)}ensureSessionId(){var e;try{if((0,m.__classPrivateFieldGet)(this,lu,"f").getItem(WU))return;(0,m.__classPrivateFieldGet)(this,lu,"f").setItem(WU,JSON.stringify({sessionId:crypto.randomUUID()}))}catch(r){(e=(0,m.__classPrivateFieldGet)(this,Gv,"f"))===null||e===void 0||e.error(r instanceof Error?r:new Error(String(r)),"Failed to mint session id")}}storeTokens(e){const r=Object.assign(Object.assign({},e),{idToken:Object.assign(Object.assign({},e.idToken),{payload:(0,Xi.normalizeTokenPayload)(e.idToken.payload)})});return(0,m.__classPrivateFieldGet)(this,lu,"f").setItem(jb,JSON.stringify(r)),r}storeDelegationContext(e){(0,m.__classPrivateFieldGet)(this,lu,"f").setItem(YU,JSON.stringify(e))}getDelegationContext(){var e,r;const n=(0,m.__classPrivateFieldGet)(this,lu,"f").getItem(YU);if(!n)return null;try{const i=JSON.parse(n);return!i?.consentId||!(!((r=(e=i?.delegateTokens)===null||e===void 0?void 0:e.accessToken)===null||r===void 0)&&r.jwtToken)?null:i}catch{return null}}clearDelegationContext(){(0,m.__classPrivateFieldGet)(this,lu,"f").removeItem(YU)}logout(){var e;return(0,m.__awaiter)(this,void 0,void 0,function*(){for(const s of(0,m.__classPrivateFieldGet)(this,Bb,"f"))try{yield s()}catch(a){(e=(0,m.__classPrivateFieldGet)(this,Gv,"f"))===null||e===void 0||e.error(a instanceof Error?a:new Error(String(a)),"Pre-logout handler failed")}const r=(0,m.__classPrivateFieldGet)(this,em,"f").getUserTokenData().accessToken.jwtToken,{key:n,variant:i}=(0,m.__classPrivateFieldGet)(this,em,"f").getClientContext();i!==q.GUEST&&(yield(0,m.__classPrivateFieldGet)(this,Vb,"f").logout({accessToken:r},{context:{headers:{clientKey:n}}})),(0,m.__classPrivateFieldGet)(this,Zp,"f").stop(),(0,m.__classPrivateFieldGet)(this,Zp,"f").clearAuth(),yield(0,m.__classPrivateFieldGet)(this,Zp,"f").clearStore(),(0,m.__classPrivateFieldGet)(this,em,"f").logoutUser(),(0,m.__classPrivateFieldGet)(this,lu,"f").removeItem(jb),this.clearSessionId(),this.clearDelegationContext()})}}Zp=new WeakMap,em=new WeakMap,Vb=new WeakMap,lu=new WeakMap,Gv=new WeakMap,Bb=new WeakMap;var kv;(function(t){t.one="1.0.0"})(kv||(kv={}));const Hb="orchestrator:identity-utils",Xve={id:Hb,dependencies:{featureServices:{[Na]:bu.one,[qc]:Gd.one,[Ji]:Qa.one,[hv]:Up.one}},create:({featureServices:t})=>{const e=t[Na];return{[kv.one]:()=>({featureService:new Jve({apiClient:e,stateService:t[Ji],identityGatewaySdk:dW(e),storage:window.sessionStorage,logger:t[qc]})})}}};var qb;(function(t){t.one="1.0.0"})(qb||(qb={}));const l3="orchestrator:globaleventemitter-service",Zve=t=>({id:l3,create:()=>({[qb.one]:()=>({featureService:t})})});var Qb;(function(t){t.one="1.0.0"})(Qb||(Qb={}));const d3="orchestrator:reboot-controller",eEe=t=>({id:d3,create:()=>({[Qb.one]:()=>({featureService:t})})}),Yb="orchestrator:bwell-sdk";var Vv;(function(t){t.one="1.0.0"})(Vv||(Vv={}));const tEe=t=>({id:Yb,dependencies:{featureServices:{[Ji]:Qa.one,[kb]:Fv.one,[qc]:Gd.one}},create:({featureServices:e})=>{const r=e[Ji],n=e[kb],i=e[qc],s=t;let a=!1,o=!1;const c=F=>{if(typeof F=="string")return F;if(F&&typeof F=="object"&&"message"in F){const k=F.message;return typeof k=="string"?k:String(k)}return String(F)},l=F=>/uninitialized|not been initialized/i.test(c(F)),d=F=>{try{s.language.setLanguage(F)}catch(k){if(l(k)){o||(o=!0,i.info({},"embeddable-core: Deferring language switch until SDK initialization completes"));return}i.info({error:c(k)},"embeddable-core: Non-fatal language switch issue in SDK")}},p=F=>{try{const k=s.language.getLanguage();F!==k&&d(F)}catch(k){if(l(k))return;i.info({error:c(k)},"embeddable-core: Non-fatal language read issue in SDK")}},A=()=>{var F;!(!((F=r.getUser().tokenData)===null||F===void 0)&&F.idToken)||(d(n.resolvedLanguage),a||(a=!0,n.onChangeLanguage(p)))};return r.getStore().subscribe(A),{[Vv.one]:()=>({featureService:s})}}});class xa extends Error{constructor(e,r){super(e),this.name="BWellError",r?.cause&&(this.cause=r.cause)}static isBwellError(e){return e instanceof xa}}class wqe extends xa{constructor(e="Authentication Error"){super(e),this.name="AuthenticationError"}}class Uqe extends xa{constructor(e="Illegal Argument Error"){super(e),this.name="IllegalArgumentError"}}class $qe extends xa{constructor(e="Illegal State Error"){super(e),this.name="IllegalStateError"}}class rEe extends xa{constructor(e="Invalid Client Key Error"){super(e),this.name="InvalidClientKeyError"}}class zU extends xa{constructor(e,r){super(e),this.credentials=r,this.name="InvalidCredentialsTypeError"}}class tm extends xa{constructor(e="Invalid Token Error"){super(e),this.name="InvalidTokenError"}}class nEe extends xa{constructor(e,r){super(e),this.status=r,this.name="NetworkError"}}class iEe extends xa{constructor(e){super(e.message()),this.operationOutcome=e,this.name="OperationOutcomeError"}}class KU extends xa{constructor(e,r){super(e),this.data=r,this.name="UnknownError"}}class sEe extends xa{constructor(e){super(e.join(". ")),this.errors=e,this.name="ValidationError"}}class sr{constructor(e,r){this.data=e,r!==null&&(this.error=r)}hasError(){return this.error!==void 0}static error(e){return new sr(void 0,e)}}var f3=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Wb=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Bv,jv;class fr{static success(e){return new aEe(e)}static failure(e){return new zb(e)}}class aEe extends fr{constructor(e){super(),Bv.set(this,void 0),f3(this,Bv,e,"f")}data(){return Wb(this,Bv,"f")}error(){throw Wb(this,Bv,"f")}success(){return!0}failure(){return!1}toQueryResult(){return new sr(this.data())}}Bv=new WeakMap;class zb extends fr{constructor(e){super(),jv.set(this,void 0),f3(this,jv,e,"f")}data(){throw Wb(this,jv,"f")}error(){return Wb(this,jv,"f")}success(){return!1}failure(){return!0}intoFailure(){return fr.failure(this.error())}toQueryResult(){return new sr(void 0,this.error())}}jv=new WeakMap;var JU=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Hv;class _3{constructor(){Hv.set(this,[])}add(e){JU(this,Hv,"f").push(e)}errors(){return JU(this,Hv,"f")}hasErrors(){return JU(this,Hv,"f").length>0}}Hv=new WeakMap;var h3=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},XU=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},qv,Kb;class oEe{constructor(e){qv.set(this,void 0),Kb.set(this,void 0),h3(this,Kb,e,"f"),h3(this,qv,this.transformInput(e),"f")}validate(){return fr.success(null)}data(){return XU(this,qv,"f")}toJSON(){return XU(this,qv,"f")}transformInput(e){return e}input(){return XU(this,Kb,"f")}}qv=new WeakMap,Kb=new WeakMap;class Qn extends oEe{validate(){const e=new _3;return this.validator.validate(this.input(),e),e.hasErrors()?fr.failure(new sEe(e.errors())):fr.success(null)}}var p3=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Jb,m3,S3;const g3=100,uEe=20;class ua{constructor(){Jb.add(this)}validate(e,r){p3(this,Jb,"m",m3).call(this,e.page,r),p3(this,Jb,"m",S3).call(this,e.pageSize,r)}}Jb=new WeakSet,m3=function(e,r){e<0&&r.add("page must be a positive number")},S3=function(e,r){e!==void 0&&(e<=0&&r.add("Page size must be greater than 0"),e>g3&&r.add(`Page size must not exceed ${g3}`))};class ca extends Qn{constructor(){super(...arguments),this.validator=new ua}transformInput(e){return Object.assign({pageSize:uEe},e)}}function ZU(){return new Date().toISOString()}function cEe(){var t;return!(typeof process>"u"||((t=process.versions)===null||t===void 0?void 0:t.node)===void 0)}function lEe(){return typeof window<"u"}function v3(){if(lEe())return"browser";if(cEe())return"node";throw new Error("Invalid runtime")}function E3(t){switch(v3()){case"browser":return t.browser();case"node":return t.node()}}function y3(t){switch(v3()){case"node":return Buffer.from(t,"base64").toString("utf-8");case"browser":return atob(t)}}function An(t){return t!=null}function Ra(t){return t==null}function xqe(t){return An(t)&&t!==""}function la(t){return t==null||t===""}function Oa(t){return t===void 0}function Jn(t){return t!==void 0}function dEe(t){return JSON.parse(y3(t)).env}const fEe=3;function T3(t){const e=t.split("."),r=e[1];if(r===void 0||e.length!==fEe)throw new tm("Token is missing data and may be corrupted");try{return JSON.parse(y3(r))}catch(n){const i=n;throw new tm(`Unable to parse token payload: ${i.name} - ${i.message}`)}}function A3(t){const r=T3(t).exp;if(typeof r!="number")throw new tm("The access token is missing an expiration date and is most likely corrupted.");return r*1e3}const _Ee="custom:clientFhirPersonId",hEe="custom:bwellFhirPatientId";function pEe(t){const e=T3(t),r=e[hEe],n=e[_Ee];return An(r)&&An(n)?{bwellFhirPersonId:r,clientFhirPersonId:n}:null}function Js(t){return t.trim()===""}const C3="1.109.0";function mEe(){return C3}var e$;(function(t){t.Arrived="ARRIVED",t.Booked="BOOKED",t.Cancelled="CANCELLED",t.CheckedIn="CHECKED_IN",t.EnteredInError="ENTERED_IN_ERROR",t.Fulfilled="FULFILLED",t.Noshow="NOSHOW",t.Pending="PENDING",t.Proposed="PROPOSED",t.Waitlist="WAITLIST"})(e$||(e$={}));var b3;(function(t){t.Guest="GUEST",t.Other="OTHER",t.Self="SELF"})(b3||(b3={}));var R3;(function(t){t.Guest="GUEST"})(R3||(R3={}));var Xb;(function(t){t.CmsNetworkShareMyRecords="CMS_NETWORK_SHARE_MY_RECORDS",t.CommunicationPreferencesPhi="COMMUNICATION_PREFERENCES_PHI",t.DataSharing="DATA_SHARING",t.DirectImportRecords="DIRECT_IMPORT_RECORDS",t.HealthCircleAdolescent="HEALTH_CIRCLE_ADOLESCENT",t.HealthCircleMinor="HEALTH_CIRCLE_MINOR",t.HealthMatch="HEALTH_MATCH",t.IasImportRecords="IAS_IMPORT_RECORDS",t.MobileCommunicationPreferences="MOBILE_COMMUNICATION_PREFERENCES",t.PersonalizedHealthOffersAndAds="PERSONALIZED_HEALTH_OFFERS_AND_ADS",t.ProaAttestation="PROA_ATTESTATION",t.Tos="TOS"})(Xb||(Xb={}));var O3;(function(t){t.Complete="COMPLETE",t.Error="ERROR",t.Partial="PARTIAL",t.Queued="QUEUED"})(O3||(O3={}));var P3;(function(t){t.Institutional="INSTITUTIONAL",t.Oral="ORAL",t.Pharmacy="PHARMACY",t.Professional="PROFESSIONAL",t.Vision="VISION"})(P3||(P3={}));var M3;(function(t){t.Bwell="bwell"})(M3||(M3={}));var I3;(function(t){t.Bwell="BWELL"})(I3||(I3={}));var N3;(function(t){t.Basic="BASIC",t.Identity="IDENTITY",t.Oauth="OAUTH"})(N3||(N3={}));var t$;(function(t){t.Deny="DENY",t.Permit="PERMIT"})(t$||(t$={}));var r$;(function(t){t.Active="ACTIVE",t.Draft="DRAFT",t.EnteredInError="ENTERED_IN_ERROR",t.Inactive="INACTIVE",t.Proposed="PROPOSED",t.Rejected="REJECTED"})(r$||(r$={}));var D3;(function(t){t.Medical="MEDICAL",t.Pharmacy="PHARMACY"})(D3||(D3={}));var L3;(function(t){t.Usd="USD"})(L3||(L3={}));var w3;(function(t){t.Accepted="ACCEPTED",t.Rejected="REJECTED"})(w3||(w3={}));var U3;(function(t){t.AccessEnded="ACCESS_ENDED",t.Connected="CONNECTED",t.Deleted="DELETED",t.Disconnected="DISCONNECTED",t.Error="ERROR",t.Expired="EXPIRED"})(U3||(U3={}));var $3;(function(t){t.Clinical="CLINICAL",t.Device="DEVICE",t.Insurance="INSURANCE",t.Lab="LAB",t.Pharmacy="PHARMACY",t.Practitioner="PRACTITIONER"})($3||($3={}));var Zb;(function(t){t.Connecthub="connecthub",t.Nppes="nppes"})(Zb||(Zb={}));var x3;(function(t){t.Connecthub="CONNECTHUB",t.Nppes="NPPES"})(x3||(x3={}));var F3;(function(t){t.Fri="FRI",t.Mon="MON",t.Sat="SAT",t.Sun="SUN",t.Thu="THU",t.Tue="TUE",t.Wed="WED"})(F3||(F3={}));var G3;(function(t){t.Deleted="DELETED"})(G3||(G3={}));var k3;(function(t){t.Kilometers="KILOMETERS",t.Meters="METERS",t.Miles="MILES"})(k3||(k3={}));var V3;(function(t){t.BwellPatient="BWELL_PATIENT",t.BwellPerson="BWELL_PERSON",t.ClientPatient="CLIENT_PATIENT",t.ClientPerson="CLIENT_PERSON"})(V3||(V3={}));var B3;(function(t){t.Active="active",t.EnteredInError="entered_in_error",t.Error="error",t.Off="off",t.Suspended="suspended",t.Test="test"})(B3||(B3={}));var j3;(function(t){t.Active="ACTIVE",t.EnteredInError="ENTERED_IN_ERROR",t.Error="ERROR",t.Off="OFF",t.Suspended="SUSPENDED",t.Test="TEST"})(j3||(j3={}));var n$;(function(t){t.CustomEvent="CUSTOM_EVENT",t.MobilePushOpen="MOBILE_PUSH_OPEN"})(n$||(n$={}));var i$;(function(t){t.Female="female",t.Male="male",t.Other="other",t.Unknown="unknown"})(i$||(i$={}));var s$;(function(t){t.Person="Person"})(s$||(s$={}));var a$;(function(t){t.Characteristic="characteristic",t.Communication="communication",t.Gender="gender",t.Specialty="specialty"})(a$||(a$={}));var H3;(function(t){t.Characteristic="CHARACTERISTIC",t.Communication="COMMUNICATION",t.Gender="GENDER",t.InsurancePlan="INSURANCE_PLAN",t.Specialty="SPECIALTY"})(H3||(H3={}));var q3;(function(t){t.Female="female",t.Male="male",t.Other="other",t.Unknown="unknown"})(q3||(q3={}));var Q3;(function(t){t.Female="FEMALE",t.Male="MALE",t.Other="OTHER",t.Unknown="UNKNOWN"})(Q3||(Q3={}));var Y3;(function(t){t.AllergyIntolerance="ALLERGY_INTOLERANCE",t.CarePlan="CARE_PLAN",t.Condition="CONDITION",t.Encounter="ENCOUNTER",t.Immunization="IMMUNIZATION",t.Labs="LABS",t.Medications="MEDICATIONS",t.Procedure="PROCEDURE",t.VitalSigns="VITAL_SIGNS"})(Y3||(Y3={}));var W3;(function(t){t.Official="_official",t.Old="_old",t.Secondary="_secondary",t.Temp="_temp",t.Usual="_usual"})(W3||(W3={}));var z3;(function(t){t.Cognito="COGNITO",t.Descope="DESCOPE"})(z3||(z3={}));var K3;(function(t){t.Direct="DIRECT",t.DirectIas="DIRECT_IAS",t.Ial2="IAL2",t.IndirectIas="INDIRECT_IAS",t.Proa="PROA"})(K3||(K3={}));var J3;(function(t){t.Clicked="clicked"})(J3||(J3={}));var X3;(function(t){t.Clicked="CLICKED"})(X3||(X3={}));var o$;(function(t){t.Debug="DEBUG",t.Error="ERROR",t.Info="INFO",t.Verbose="VERBOSE",t.Warn="WARN"})(o$||(o$={}));var Z3;(function(t){t.Sms="SMS"})(Z3||(Z3={}));var u$;(function(t){t.Activity="ACTIVITY",t.Exam="EXAM",t.Imaging="IMAGING",t.Laboratory="LABORATORY",t.Procedure="PROCEDURE",t.SocialHistory="SOCIAL_HISTORY",t.Survey="SURVEY",t.Therapy="THERAPY",t.VitalSigns="VITAL_SIGNS"})(u$||(u$={}));var e4;(function(t){t.CancelDelete="CANCEL_DELETE",t.ConfirmDelete="CONFIRM_DELETE",t.DeletionInProgress="DELETION_IN_PROGRESS",t.ImmediateExecution="IMMEDIATE_EXECUTION",t.RequestDelete="REQUEST_DELETE"})(e4||(e4={}));var c$;(function(t){t.C19Vaccine="C19Vaccine",t.Device="Device",t.Insurance="Insurance",t.Laboratory="Laboratory",t.Pharmacy="Pharmacy",t.Provider="Provider",t.Bus="bus",t.Cg="cg",t.Crs="crs",t.Dept="dept",t.Edu="edu",t.Govt="govt",t.Ins="ins",t.Other="other",t.Pay="pay",t.Prov="prov",t.Reli="reli",t.Team="team"})(c$||(c$={}));var t4;(function(t){t.Bus="BUS",t.C19Vaccine="C19VACCINE",t.Cg="CG",t.Crs="CRS",t.Dept="DEPT",t.Device="DEVICE",t.Edu="EDU",t.Govt="GOVT",t.Ins="INS",t.Insurance="INSURANCE",t.Laboratory="LABORATORY",t.Other="OTHER",t.Pay="PAY",t.Pharmacy="PHARMACY",t.Prov="PROV",t.Provider="PROVIDER",t.Reli="RELI",t.Team="TEAM"})(t4||(t4={}));var r4;(function(t){t.Add="add",t.Copy="copy",t.Move="move",t.Remove="remove",t.Replace="replace",t.Test="test"})(r4||(r4={}));var n4;(function(t){t.ExistingPatients="EXISTING_PATIENTS",t.NewPatients="NEW_PATIENTS"})(n4||(n4={}));var i4;(function(t){t.Patient="Patient",t.Person="Person"})(i4||(i4={}));var s4;(function(t){t.Practice="practice",t.Practitioner="practitioner"})(s4||(s4={}));var a4;(function(t){t.Practice="PRACTICE",t.Practitioner="PRACTITIONER"})(a4||(a4={}));var o4;(function(t){t.QuestionnaireResponse="QuestionnaireResponse"})(o4||(o4={}));var u4;(function(t){t.Closed="CLOSED",t.Hold="HOLD",t.New="NEW",t.Open="OPEN",t.Pending="PENDING",t.Solved="SOLVED"})(u4||(u4={}));var c4;(function(t){t.AllergyIntolerance="ALLERGY_INTOLERANCE",t.CarePlan="CARE_PLAN",t.Condition="CONDITION",t.DocumentReference="DOCUMENT_REFERENCE",t.Encounter="ENCOUNTER",t.Immunization="IMMUNIZATION",t.MedicationDispense="MEDICATION_DISPENSE",t.MedicationRequest="MEDICATION_REQUEST",t.MedicationStatement="MEDICATION_STATEMENT",t.Observation="OBSERVATION",t.Procedure="PROCEDURE"})(c4||(c4={}));var l4;(function(t){t.DataConnections="DATA_CONNECTIONS",t.FindCare="FIND_CARE"})(l4||(l4={}));var d4;(function(t){t.Device="DEVICE",t.Insurance="INSURANCE",t.Laboratory="LABORATORY",t.Pharmacy="PHARMACY",t.Practice="PRACTICE",t.Practitioner="PRACTITIONER"})(d4||(d4={}));var f4;(function(t){t.Abortion="ABORTION",t.AbuseNeglect="ABUSE_NEGLECT",t.DomesticViolence="DOMESTIC_VIOLENCE",t.GenderAffirming="GENDER_AFFIRMING",t.GeneticTesting="GENETIC_TESTING",t.HivAids="HIV_AIDS",t.Mammography="MAMMOGRAPHY",t.MentalHealth="MENTAL_HEALTH",t.ReproductiveHealthcare="REPRODUCTIVE_HEALTHCARE",t.SexualAssault="SEXUAL_ASSAULT",t.Std="STD",t.SubstanceAbuse="SUBSTANCE_ABUSE",t.SubstanceAlcohol="SUBSTANCE_ALCOHOL"})(f4||(f4={}));var _4;(function(t){t.UpdatedAt="UPDATED_AT"})(_4||(_4={}));var l$;(function(t){t.Content="content",t.Distance="distance",t.Relevance="relevance"})(l$||(l$={}));var h4;(function(t){t.Content="CONTENT",t.DataSourceRank="DATA_SOURCE_RANK",t.Distance="DISTANCE",t.Name="NAME",t.NextAvailable="NEXT_AVAILABLE",t.OnlineBookingAvailable="ONLINE_BOOKING_AVAILABLE",t.Rating="RATING",t.Relevance="RELEVANCE"})(h4||(h4={}));var eR;(function(t){t.Asc="asc",t.Desc="desc"})(eR||(eR={}));var p4;(function(t){t.Asc="ASC",t.Desc="DESC"})(p4||(p4={}));var m4;(function(t){t.CareSearch="CARE_SEARCH",t.Proa="PROA",t.ProviderDetails="PROVIDER_DETAILS",t.Sayt="SAYT",t.Unspecified="UNSPECIFIED"})(m4||(m4={}));var S4;(function(t){t.DataDeleted="DATA_DELETED",t.Deleting="DELETING",t.Error="ERROR",t.Pending="PENDING",t.Retrieved="RETRIEVED",t.Retrieving="RETRIEVING"})(S4||(S4={}));var d$;(function(t){t.Accepted="ACCEPTED",t.Cancelled="CANCELLED",t.Completed="COMPLETED",t.Draft="DRAFT",t.EnteredInError="ENTERED_IN_ERROR",t.Failed="FAILED",t.InProgress="IN_PROGRESS",t.OnHold="ON_HOLD",t.Ready="READY",t.Received="RECEIVED",t.Rejected="REJECTED",t.Requested="REQUESTED"})(d$||(d$={}));var tR;(function(t){t.Accurate="accurate",t.Estimate="estimate"})(tR||(tR={}));var g4;(function(t){t.Active="ACTIVE",t.Completed="COMPLETED"})(g4||(g4={}));var v4;(function(t){t.PersonMatchError="PERSON_MATCH_ERROR",t.ServerError="SERVER_ERROR"})(v4||(v4={}));const SEe=new Set(Object.values(i$));function E4(t){return SEe.has(t)}const gEe=new Set(Object.values(r$));function vEe(t){return gEe.has(t)}const EEe=new Set(Object.values(Xb));function y4(t){return EEe.has(t)}const yEe=new Set(Object.values(t$));function TEe(t){return yEe.has(t)}class AEe{validate(e,r){!Oa(e.gender)&&!E4(e.gender)&&r.add(`Invalid gender value: "${e.gender}"`),!Oa(e.middleNames)&&e.middleNames.length>0&&Oa(e.firstName)&&r.add("middleNames requires firstName to be provided")}}class Fqe extends Qn{constructor(){super(...arguments),this.validator=new AEe}}class CEe{validate(e,r){y4(e.category)||r.add(`Invalid consent category code: "${e.category}"`),!Oa(e.organizationId)&&Js(e.organizationId)&&r.add("organizationId cannot be empty")}}class Gqe extends Qn{constructor(){super(...arguments),this.validator=new CEe}}class bEe{validate(e,r){vEe(e.status)||r.add(`Invalid consent status: "${e.status}"`),TEe(e.provision)||r.add(`Invalid consent provision type: "${e.provision}"`),y4(e.category)||r.add(`Invalid consent category code: "${e.category}"`),!Oa(e.organizationId)&&Js(e.organizationId)&&r.add("organizationId cannot be empty"),e.category===Xb.ProaAttestation&&Oa(e.organizationId)&&r.add("organizationId must be provided when category is PROA_ATTESTATION")}}class kqe extends Qn{constructor(){super(...arguments),this.validator=new bEe}}class REe{validate(e,r){la(e.exportId)&&r.add("exportId is required"),la(e.password)&&r.add("password is required")}}class Vqe extends Qn{constructor(){super(...arguments),this.validator=new REe}}var Bqe;class jqe extends null{}var du=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},mo,Kd,T4,A4,C4,b4,R4,O4;class W_{constructor(){mo.add(this)}validate(e,r){if(!e.values||e.values.length===0){r.add("At least one SearchDateValue must be set to instantiate a SearchDate");return}for(const n of e.values)du(this,mo,"m",T4).call(this,n,r)}}mo=new WeakSet,Kd=function(e,r){e&&e!==null&&isNaN(e.getTime())&&r.add("The date is not valid")},T4=function(e,r){const{equals:n,notEquals:i,greaterThan:s,greaterThanOrEqualTo:a,lessThan:o,lessThanOrEqualTo:c,approximately:l}=e,p=[n,i,s,a,o,c,l].filter(A=>A!=null).length;if(p===0){r.add("At least one SearchDateValue must be set to instantiate a SearchDate");return}du(this,mo,"m",A4).call(this,e,p,r),du(this,mo,"m",R4).call(this,e,r),du(this,mo,"m",O4).call(this,e,r)},A4=function(e,r,n){const{equals:i,notEquals:s,approximately:a}=e;if(i&&r>1){n.add("The equals value cannot be set with any other values");return}if(s&&r>1){n.add("The notEquals value cannot be set with any other values");return}if(a&&r>1){n.add("The approximately value cannot be set with any other values");return}du(this,mo,"m",C4).call(this,e,n),du(this,mo,"m",b4).call(this,e,n)},C4=function(e,r){e.greaterThan&&e.greaterThanOrEqualTo&&r.add("The greaterThan/greaterThanOrEqualTo value cannot be set with both values")},b4=function(e,r){e.lessThan&&e.lessThanOrEqualTo&&r.add("The lessThan/lessThanOrEqualTo value cannot be set with both values")},R4=function(e,r){const{equals:n,notEquals:i,greaterThan:s,greaterThanOrEqualTo:a,lessThan:o,lessThanOrEqualTo:c,approximately:l}=e;n&&du(this,mo,"m",Kd).call(this,n,r),i&&du(this,mo,"m",Kd).call(this,i,r),s&&du(this,mo,"m",Kd).call(this,s,r),a&&du(this,mo,"m",Kd).call(this,a,r),o&&du(this,mo,"m",Kd).call(this,o,r),c&&du(this,mo,"m",Kd).call(this,c,r),l&&du(this,mo,"m",Kd).call(this,l,r)},O4=function(e,r){const{greaterThan:n,greaterThanOrEqualTo:i,lessThan:s,lessThanOrEqualTo:a}=e;n&&a&&n>=a&&r.add("The greaterThan value must be less than the lessThanOrEqualTo value"),i&&s&&i>=s&&r.add("The greaterThanOrEqualTo value must be less than the lessThan value"),n&&s&&n>=s&&r.add("The greaterThan value must be less than the lessThan value"),i&&a&&i>=a&&r.add("The greaterThanOrEqualTo value must be less than the lessThanOrEqualTo value")};var f$=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Qv;class z_{constructor(){Qv.set(this,new OEe)}validate(e,r){var n;if(e.value===void 0&&e.values===void 0&&e.notEquals===void 0){r.add("Either SearchToken value or values or notEquals must be provided");return}if(e.value!==void 0&&f$(this,Qv,"f").validate(e.value,r),e.values!==void 0&&e.values.length===0){r.add("At least one Coding must be set to instantiate a SearchToken");return}for(const i of(n=e.values)!==null&&n!==void 0?n:[])f$(this,Qv,"f").validate(i,r);if(e.notEquals!==void 0){if(e.notEquals.values!==void 0){if(e.notEquals.values.length===0){r.add("If notEquals values are provided, at least one Coding must be set");return}for(const i of e.notEquals.values)f$(this,Qv,"f").validate(i,r)}e.notEquals.code===void 0&&e.notEquals.value===void 0&&e.notEquals.system===void 0&&e.notEquals.values===void 0&&r.add("NotEquals must have at least one non-null property (code, value, system, or values)")}}}Qv=new WeakMap;class OEe{validate(e,r){!e.system&&!e.code&&r.add("Each Coding in the list must have at least one non-null and non-empty value for system or code")}}var Hqe,rm=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},_$,h$,p$,m$,S$,g$;class P4 extends ua{constructor(){super(...arguments),_$.set(this,new z_),h$.set(this,new W_)}validate(e,r){super.validate(e,r),e.groupCode&&rm(this,_$,"f").validate(e.groupCode,r),e.lastUpdated&&rm(this,h$,"f").validate(e.lastUpdated,r)}}_$=new WeakMap,h$=new WeakMap;class PEe{validate(e,r){e.length===0&&r.add("Prescription array must not be empty.")}}class M4 extends ua{constructor(){super(...arguments),p$.set(this,new PEe),m$.set(this,new W_)}validate(e,r){super.validate(e,r),e.lastUpdated!==void 0&&rm(this,m$,"f").validate(e.lastUpdated,r),e.prescription!==void 0&&rm(this,p$,"f").validate(e.prescription,r)}}p$=new WeakMap,m$=new WeakMap;class MEe extends ua{validate(e,r){var n;super.validate(e,r),!((n=e?.ids)===null||n===void 0)&&n.length||r.add("ids must not be empty")}}class IEe extends ca{constructor(){super(...arguments),this.validator=new P4}}class qqe extends null{}class Qqe extends null{}class Yqe extends null{}class Wqe extends null{}class zqe extends null{}class Kqe extends null{}class Jqe extends null{}class Xqe extends null{}class Zqe extends null{}class eQe extends null{}class tQe extends null{}class rQe extends null{}class nQe extends null{}class iQe extends null{}class sQe extends null{}class aQe extends null{}class oQe extends null{}class uQe extends null{}class cQe extends null{}class lQe extends null{}class NEe extends M4{constructor(){super(...arguments),S$.set(this,new z_)}validate(e,r){super.validate(e,r),e.medicationCode!==void 0&&rm(this,S$,"f").validate(e.medicationCode,r)}}S$=new WeakMap;class dQe extends ca{constructor(){super(...arguments),this.validator=new M4}}class fQe extends ca{constructor(){super(...arguments),this.validator=new NEe}}class DEe extends P4{constructor(){super(...arguments),g$.set(this,new z_)}validate(e,r){super.validate(e,r),e.medicationCode!==void 0&&rm(this,g$,"f").validate(e.medicationCode,r)}}g$=new WeakMap;class _Qe extends IEe{constructor(){super(...arguments),this.validator=new DEe}}class hQe extends null{}class pQe extends null{}class mQe extends ca{constructor(){super(...arguments),this.validator=new MEe}}class LEe{validate(e,r){Js(e.medicationStatementId)&&r.add("The medication pricing request must possess a medication statement id.")}}class SQe extends Qn{constructor(){super(...arguments),this.validator=new LEe}}class wEe{validate(e,r){Js(e.bodySystemId)&&r.add("The body system score request must contain a body system id.")}}class gQe extends Qn{constructor(){super(...arguments),this.validator=new wEe}}class UEe extends ua{validate(e,r){Js(e.medicationStatementId)&&r.add("The medication knowledge request must possess a medication statement id."),super.validate(e,r)}}class vQe extends ca{constructor(){super(...arguments),this.validator=new UEe}}class $Ee extends ua{validate(e,r){Js(e.labId)&&r.add("The lab knowledge request must contain a lab id."),super.validate(e,r)}}class EQe extends ca{constructor(){super(...arguments),this.validator=new $Ee}}var I4;(function(t){t.Active="ACTIVE",t.Completed="COMPLETED"})(I4||(I4={}));class xEe{validate(e,r){Ra(e)&&r.add("input must be provided."),la(e.id)&&r.add("id must be a non-empty string."),Ra(e.status)&&r.add("status is required.")}}class yQe extends Qn{constructor(){super(...arguments),this.validator=new xEe}}const FEe=new Set(Object.values(d$));function N4(t){return FEe.has(t)}var GEe=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},v$,D4;class kEe extends ua{constructor(){super(...arguments),v$.add(this)}validate(e,r){if(super.validate(e,r),!Oa(e.status)){const n=Array.isArray(e.status)?e.status:[e.status];for(const i of n)GEe(this,v$,"m",D4).call(this,i,r)}}}v$=new WeakSet,D4=function(e,r){N4(e)||r.add(`Invalid task status: "${e}"`)};class TQe extends ca{constructor(){super(...arguments),this.validator=new kEe}}class VEe{validate(e,r){N4(e.newStatus)||r.add(`Invalid task status: "${e.newStatus}"`)}}class AQe extends Qn{constructor(){super(...arguments),this.validator=new VEe}}var rR=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},nm,L4,w4,U4,$4;class CQe extends ca{constructor(){super(...arguments),this.validator=new BEe}}class BEe extends ua{constructor(){super(...arguments),nm.add(this)}validate(e,r){super.validate(e,r),Jn(e.organizationTypeFilters)&&rR(this,nm,"m",L4).call(this,e.organizationTypeFilters,r),Jn(e.sortBy)&&rR(this,nm,"m",w4).call(this,e.sortBy,r),Jn(e.filterFields)&&rR(this,nm,"m",U4).call(this,e.filterFields,r),Jn(e.gender)&&rR(this,nm,"m",$4).call(this,e.gender,r)}}nm=new WeakSet,L4=function(e,r){for(const n of e)HEe(n)||r.add(`Invalid organizationTypeFilters value: "${n}"`)},w4=function(e,r){Jn(e.field)&&!QEe(e.field)&&r.add(`Invalid sortBy.field value: "${e.field}"`),Jn(e.order)&&!WEe(e.order)&&r.add(`Invalid sortBy.order value: "${e.order}"`)},U4=function(e,r){for(const n of e)KEe(n)||r.add(`Invalid filterField value: "${n}"`)},$4=function(e,r){E4(e)||r.add(`Invalid gender value: "${e}"`)};const jEe=new Set(Object.values(c$));function HEe(t){return jEe.has(t)}const qEe=new Set(Object.values(l$));function QEe(t){return qEe.has(t)}const YEe=new Set(Object.values(eR));function WEe(t){return YEe.has(t)}const zEe=new Set(Object.values(a$));function KEe(t){return zEe.has(t)}var bQe;class RQe extends null{}class OQe extends ca{constructor(){super(...arguments),this.validator=new JEe}}class JEe extends ua{validate(e,r){super.validate(e,r)}}const XEe="data-connection-status";var ZEe=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},E$;const eye="connectionId cannot be null or empty",tye="username cannot be null or empty",rye="password cannot be null or empty",nye="integrationType array cannot be empty",iye="integrationType array cannot contain blank or empty strings",sye="status array cannot be empty",aye="status array cannot contain blank or empty strings";class x4{validate(e,r){e.connectionId===""&&r.add(eye)}}class oye{constructor(){E$.set(this,new x4)}validate(e,r){ZEe(this,E$,"f").validate(e,r),e.integrationType!=="DIRECT"&&(la(e.username)&&r.add(tye),la(e.password)&&r.add(rye))}}E$=new WeakMap;class uye extends Qn{constructor(){super(...arguments),this.validator=new x4}}class PQe extends null{}class MQe extends null{}class IQe extends uye{constructor(){super(...arguments),this.validator=new oye}transformInput(e){var r,n,i;return{connectionId:e.connectionId,username:(r=e.username)!==null&&r!==void 0?r:null,password:(n=e.password)!==null&&n!==void 0?n:null,integrationType:(i=e.integrationType)!==null&&i!==void 0?i:null}}}class NQe extends Qn{constructor(){super(...arguments),this.validator={validate:(e,r)=>{e.integrationType!==void 0&&e.integrationType!==null&&(e.integrationType.length===0&&r.add(nye),e.integrationType.some(n=>n===""||n.trim()==="")&&r.add(iye)),e.status!==void 0&&e.status!==null&&(e.status.length===0&&r.add(sye),e.status.some(n=>n===""||n.trim()==="")&&r.add(aye))}}}data(){return this.input()}}const cye="deviceToken is required",lye="platformName must be a valid DevicePlatform value",dye="applicationName is required",fye="connectionId is required";var y$;(function(t){t.IOS="IOS",t.ANDROID="ANDROID"})(y$||(y$={}));const _ye=new Set(Object.values(y$));function hye(t){return _ye.has(t)}function pye(t){return!hye(t)}class F4{validate(e,r){Js(e.deviceToken)&&r.add(cye)}}class mye extends F4{validate(e,r){super.validate(e,r),pye(e.platformName.toUpperCase())&&r.add(lye),Js(e.applicationName)&&r.add(dye)}}class DQe extends Qn{constructor(){super(...arguments),this.validator=new mye}}class LQe extends Qn{constructor(){super(...arguments),this.validator=new F4}}class T${validate(e,r){Js(e.connectionId)&&r.add(fye)}}class wQe extends Qn{constructor(){super(...arguments),this.validator=new T$}}class UQe extends Qn{constructor(){super(...arguments),this.validator=new T$}}class $Qe extends Qn{constructor(){super(...arguments),this.validator=new T$}}const Sye="string parameter serializedNotification must be provided",gye="serialized notification must have a non-empty notification_id field of type string",G4="serialized notification must have an itbl object containing a non-empty messageId field of type string",vye="parsed notification must be a non-null object.",Eye="serialized notification is not valid JSON.";class yye{validate(e,r){if(Oa(e.serializedNotification)||typeof e.serializedNotification!="string"||Js(e.serializedNotification)){r.add(Sye);return}let n=null;try{n=JSON.parse(e.serializedNotification)}catch{r.add(Eye);return}if(typeof n!="object"||n===null){r.add(vye);return}const{itbl:i,notification_id:s}=n;if((Oa(s)||typeof s!="string"||Js(s))&&r.add(gye),typeof i!="object"||Ra(i)){r.add(G4);return}(Oa(i.messageId)||typeof i.messageId!="string"||Js(i.messageId))&&r.add(G4)}}class xQe extends Qn{constructor(){super(...arguments),this.validator=new yye}}var A$=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Yv;class Tye extends ua{constructor(){super(...arguments),Yv.set(this,new W_)}validate(e,r){(Oa(e.coverage)||Js(e.coverage))&&r.add("The claim summary request must contain a coverage ID."),Jn(e.dateReceived)&&A$(this,Yv,"f").validate(e.dateReceived,r),Jn(e.servicePeriod)&&A$(this,Yv,"f").validate(e.servicePeriod,r),Jn(e.dateProcessed)&&A$(this,Yv,"f").validate(e.dateProcessed,r),super.validate(e,r)}}Yv=new WeakMap;class FQe extends ca{constructor(){super(...arguments),this.validator=new Tye}}const Aye="SearchReference value should be a non-empty string";class k4{validate(e,r){Ra(e.value)||(typeof e.value!="string"||Js(e.value))&&r.add(Aye)}}const Cye="SearchStringValue should be a non-empty string";class Wv{validate(e,r){if(Ra(e.values))return;let n=!1;for(const i of e.values)Js(i)&&(n=!0);n&&r.add(Cye)}}var nR=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},C$,b$,iR;class bye extends ua{constructor(){super(...arguments),C$.set(this,new Wv),b$.set(this,new W_),iR.set(this,new k4)}validate(e,r){super.validate(e,r),Jn(e.id)&&nR(this,C$,"f").validate(e.id,r),Jn(e.lastUpdated)&&nR(this,b$,"f").validate(e.lastUpdated,r),Jn(e.beneficiary)&&nR(this,iR,"f").validate(e.beneficiary,r),Jn(e.patient)&&nR(this,iR,"f").validate(e.patient,r)}}C$=new WeakMap,b$=new WeakMap,iR=new WeakMap;class GQe extends ca{constructor(){super(...arguments),this.validator=new bye}}class Rye extends ua{validate(e,r){super.validate(e,r)}}class kQe extends ca{constructor(){super(...arguments),this.validator=new Rye}}class Oye{validate(e,r){(Oa(e.claimId)||Js(e.claimId))&&r.add("The EOB document request must contain a claimId.")}}class VQe extends Qn{constructor(){super(...arguments),this.validator=new Oye}}var K_=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},R$,sR,zv,O$;class Pye extends ua{constructor(){super(...arguments),R$.set(this,new Wv),sR.set(this,new W_),zv.set(this,new k4),O$.set(this,new z_)}validate(e,r){super.validate(e,r),Jn(e.id)&&K_(this,R$,"f").validate(e.id,r),Jn(e.lastUpdated)&&K_(this,sR,"f").validate(e.lastUpdated,r),Jn(e.created)&&K_(this,sR,"f").validate(e.created,r),Jn(e.patient)&&K_(this,zv,"f").validate(e.patient,r),Jn(e.provider)&&K_(this,zv,"f").validate(e.provider,r),Jn(e.coverage)&&K_(this,zv,"f").validate(e.coverage,r),Jn(e.status)&&K_(this,O$,"f").validate(e.status,r)}}R$=new WeakMap,sR=new WeakMap,zv=new WeakMap,O$=new WeakMap;class BQe extends ca{constructor(){super(...arguments),this.validator=new Pye}}var P$=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},M$,I$,N$;class Mye{constructor(){M$.set(this,new W_),I$.set(this,new Wv),N$.set(this,new z_)}validate(e,r){var n;An(e._source)&&P$(this,I$,"f").validate(e._source,r),An(e.date)&&P$(this,M$,"f").validate(e.date,r),An(e._count)&&e._count<0&&r.add("Value of count cannot be less than 0"),An(e._getpagesoffset)&&e._getpagesoffset<0&&r.add("Value of getpagesoffset cannot be less than 0"),An((n=e.supporting_info)===null||n===void 0?void 0:n.value)&&Js(e.supporting_info.value)&&r.add("Supporting Information must have a non-empty value."),An(e.status)&&P$(this,N$,"f").validate(e.status,r)}}M$=new WeakMap,I$=new WeakMap,N$=new WeakMap;class jQe extends Qn{constructor(){super(...arguments),this.validator=new Mye}}class Iye{validate(e,r){if(!Ra(e.cancelationReason)){if(Ra(e.cancelationReason.coding)||e.cancelationReason.coding.length===0){r.add("cancelationReason must have at least one coding");return}for(const n of e.cancelationReason.coding)(Ra(n?.code)||Ra(n?.system))&&r.add("cancelationReason.coding must have a code and a system")}}}class HQe extends Qn{constructor(){super(...arguments),this.validator=new Iye}}class Nye{validate(e,r){if(Ra(e.notificationPreferences)||e.notificationPreferences.length===0){r.add("notificationPreferences is required and must not be empty");return}e.notificationPreferences.forEach((n,i)=>{Ra(n.method)&&r.add(`notificationPreferences[${i}].method is required`),Ra(n.enabled)&&r.add(`notificationPreferences[${i}].enabled is required`)})}}class qQe extends Qn{constructor(){super(...arguments),this.validator=new Nye}}class Dye{validate(e,r){var n;la((n=e.organization.value)===null||n===void 0?void 0:n.trim())&&r.add("Organization reference is required and must have a non-empty value.")}}class QQe extends Qn{constructor(){super(...arguments),this.validator=new Dye}}class aR{validate(e,r,n={}){const{requireRole:i=!0}=n;An(e.id)?Js(e.id)?r.add("Member id cannot be empty"):e.id.length>255&&r.add("Member id cannot exceed 255 characters"):r.add("Member id is required"),An(e.type)?Js(e.type)&&r.add("Member type cannot be empty"):r.add("Member type is required");const s=An(e.role);if(i&&!s&&r.add("Member role is required"),s&&e.role)for(let a=0;a<e.role.length;a++){const o=e.role[a];An(o)?Js(o)&&r.add(`Role ${a}: Cannot be blank`):r.add(`Role ${a}: Cannot be null or undefined`)}}}class YQe extends Qn{constructor(){super(...arguments),this.validator=new aR}}class Lye{constructor(){this.updateValidator=new aR}validate(e,r){this.updateValidator.validate(e,r,{requireRole:!1})}}class WQe extends Qn{constructor(){super(...arguments),this.validator=new Lye}}class wye{constructor(){this.updateValidator=new aR}validate(e,r){this.updateValidator.validate(e,r,{requireRole:!0})}}class zQe extends Qn{constructor(){super(...arguments),this.validator=new wye}}class Uye{constructor(){this.updateValidator=new aR}validate(e,r){if(!An(e.members)){r.add("Members array is required");return}if(e.members.length===0){r.add("Members array cannot be empty");return}for(let n=0;n<e.members.length;n++){const i=e.members[n];if(!An(i)){r.add(`Member ${n}: Cannot be null or undefined`);continue}const s=new _3;this.updateValidator.validate(i,s,{requireRole:!0});for(const a of s.errors())r.add(`Member ${n}: ${a}`)}}}class KQe extends Qn{constructor(){super(...arguments),this.validator=new Uye}}class $ye extends ua{validate(e,r){super.validate(e,r)}}class xye extends ca{constructor(){super(...arguments),this.validator=new $ye}}class Fye{validate(e,r){const n=e.questionnaireResponse;if(Ra(n)){r.add("questionnaireResponse is required");return}if((la(n.resourceType)||n.resourceType!=="QuestionnaireResponse")&&r.add('questionnaireResponse.resourceType must be "QuestionnaireResponse"'),la(n.status)&&r.add("questionnaireResponse.status is required"),la(n.questionnaire)&&r.add("questionnaireResponse.questionnaire is required"),Ra(n.contained)||n.contained.length===0)r.add("questionnaireResponse.contained must have at least one item");else{let i=null;for(const s of n.contained){if(Ra(s)){r.add("questionnaireResponse.contained item cannot be null or undefined");break}if(s.resourceType==="Questionnaire"){i=s;break}}if(Ra(i)){r.add("questionnaireResponse.contained must contain a Questionnaire resource");return}la(i.id)&&r.add("questionnaireResponse.contained Questionnaire resource must have an id")}}}class JQe extends Qn{constructor(){super(...arguments),this.validator=new Fye}}class Gye{validate(e,r){const n=e.questionnaireResponse;if(Ra(n)){r.add("questionnaireResponse is required");return}(la(n.resourceType)||n.resourceType!=="QuestionnaireResponse")&&r.add('questionnaireResponse.resourceType must be "QuestionnaireResponse"'),la(n.status)&&r.add("questionnaireResponse.status is required"),la(n.questionnaire)&&r.add("questionnaireResponse.questionnaire is required")}}class XQe extends Qn{constructor(){super(...arguments),this.validator=new Gye}}var oR=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},D$,L$,uR;class kye extends ua{constructor(){super(...arguments),D$.set(this,new W_),L$.set(this,new Wv),uR.set(this,new z_)}validate(e,r){super.validate(e,r),An(e.id)&&oR(this,L$,"f").validate(e.id,r),An(e.lastUpdated)&&oR(this,D$,"f").validate(e.lastUpdated,r),An(e.status)&&oR(this,uR,"f").validate(e.status,r),An(e.tag)&&oR(this,uR,"f").validate(e.tag,r)}}D$=new WeakMap,L$=new WeakMap,uR=new WeakMap;class ZQe extends ca{constructor(){super(...arguments),this.validator=new kye}}var Kv=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},w$,im;class Vye extends ua{constructor(){super(...arguments),w$.set(this,new Wv),im.set(this,new z_)}validate(e,r){super.validate(e,r),An(e.id)&&Kv(this,w$,"f").validate(e.id,r),An(e.tag)&&Kv(this,im,"f").validate(e.tag,r),An(e.security)&&Kv(this,im,"f").validate(e.security,r),An(e.context)&&Kv(this,im,"f").validate(e.context,r),An(e.identifier)&&Kv(this,im,"f").validate(e.identifier,r)}}w$=new WeakMap,im=new WeakMap;class eYe extends ca{constructor(){super(...arguments),this.validator=new Vye}}class Bye extends ua{validate(e,r){super.validate(e,r)}}class tYe extends ca{constructor(){super(...arguments),this.validator=new Bye}}class jye{constructor(){this.dataURIRegex=/^data:[a-zA-Z0-9]+\/[a-zA-Z0-9-.+]+;base64,([A-Za-z0-9+/]*={0,2})$/}validate(e,r){e.file.trim()||r.add("File content is required"),e.file.trim()&&!this.dataURIRegex.test(e.file)&&r.add("File must be a valid data URI with base64 encoding (e.g., data:image/png;base64,...)"),e.fileName.trim()||r.add("File name is required")}}class rYe extends Qn{constructor(){super(...arguments),this.validator=new jye}}class Hye{validate(e,r){e.attachmentId.trim()||r.add("Attachment ID is required")}}class nYe extends Qn{constructor(){super(...arguments),this.validator=new Hye}}class qye{validate(e,r){e.subject.trim()||r.add("Subject is required"),e.comment.body.trim()||r.add("Comment body is required"),e.fields.category.trim()||r.add("Category is required")}}class iYe extends Qn{constructor(){super(...arguments),this.validator=new qye}}class Qye extends ua{validate(e,r){super.validate(e,r)}}class sYe extends ca{constructor(){super(...arguments),this.validator=new Qye}}class Yye extends ua{validate(e,r){e.requestId<0&&r.add("requestId must be a non-negative number"),super.validate(e,r)}}class aYe extends ca{constructor(){super(...arguments),this.validator=new Yye}}class Wye{validate(e,r){e.requestId<0&&r.add("Request ID must be a non-negative integer"),la(e.body.trim())&&r.add("Comment body is required")}}class oYe extends Qn{constructor(){super(...arguments),this.validator=new Wye}}class zye{validate(e,r){la(e.attachmentId.trim())&&r.add("attachmentId must be a non-empty string"),e.requestId<0&&r.add("requestId must be a non-negative number")}}class uYe extends Qn{constructor(){super(...arguments),this.validator=new zye}}const Kye="code cannot be null or empty";class Jye{validate(e,r){la(e.code)&&r.add(Kye)}}class cYe extends Qn{constructor(){super(...arguments),this.validator=new Jye}}const Xye="consentId cannot be null or empty";class Zye{validate(e,r){la(e.consentId)&&r.add(Xye)}}class eTe extends Qn{constructor(){super(...arguments),this.validator=new Zye}}var U$=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(d){try{l(n.next(d))}catch(p){a(p)}}function c(d){try{l(n.throw(d))}catch(p){a(p)}}function l(d){d.done?s(d.value):i(d.value).then(o,c)}l((n=n.apply(t,e||[])).next())})};class $${constructor(e=new Map){this.storage=e}get(e){return U$(this,void 0,void 0,function*(){return this.storage.get(e)})}set(e,r){return U$(this,void 0,void 0,function*(){this.storage.set(e,r)})}delete(e){return U$(this,void 0,void 0,function*(){return this.storage.delete(e)})}}const tTe={logLevel:o$.Error,timeout:3e4,retryPolicy:{attempts:3,interval:1e3},telemetryEnabled:!1,tokenStorage:new $$,language:null,overrides:{unauthedApiUrl:null,authedApiUrl:null}};var xl;(function(t){t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.TRACE=1]="TRACE",t[t.TRACE2=2]="TRACE2",t[t.TRACE3=3]="TRACE3",t[t.TRACE4=4]="TRACE4",t[t.DEBUG=5]="DEBUG",t[t.DEBUG2=6]="DEBUG2",t[t.DEBUG3=7]="DEBUG3",t[t.DEBUG4=8]="DEBUG4",t[t.INFO=9]="INFO",t[t.INFO2=10]="INFO2",t[t.INFO3=11]="INFO3",t[t.INFO4=12]="INFO4",t[t.WARN=13]="WARN",t[t.WARN2=14]="WARN2",t[t.WARN3=15]="WARN3",t[t.WARN4=16]="WARN4",t[t.ERROR=17]="ERROR",t[t.ERROR2=18]="ERROR2",t[t.ERROR3=19]="ERROR3",t[t.ERROR4=20]="ERROR4",t[t.FATAL=21]="FATAL",t[t.FATAL2=22]="FATAL2",t[t.FATAL3=23]="FATAL3",t[t.FATAL4=24]="FATAL4"})(xl||(xl={}));var rTe=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},V4=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Jv,In;(function(t){t[t.VERBOSE=0]="VERBOSE",t[t.DEBUG=1]="DEBUG",t[t.INFO=2]="INFO",t[t.WARN=3]="WARN",t[t.ERROR=4]="ERROR",t[t.FATAL=5]="FATAL"})(In||(In={}));const nTe={[In.VERBOSE]:"VERBOSE",[In.DEBUG]:"DEBUG",[In.INFO]:"INFO",[In.WARN]:"WARN",[In.ERROR]:"ERROR",[In.FATAL]:"FATAL"};class sm{constructor(e){Jv.set(this,void 0),rTe(this,Jv,e,"f")}get severity(){return V4(this,Jv,"f")}shouldLog(e){return e>=V4(this,Jv,"f")}static severityText(e){return nTe[e]}static severityFromText(e){switch(e){case"VERBOSE":return In.VERBOSE;case"DEBUG":return In.DEBUG;case"INFO":return In.INFO;case"WARN":return In.WARN;case"ERROR":return In.ERROR;case"FATAL":return In.FATAL;default:throw new Error(`Invalid severity text: ${e}`)}}}Jv=new WeakMap;var x$=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},el=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Jd,B4,cR,Xv,lR,J_;class j4{constructor(e,r,n){Jd.add(this),cR.set(this,void 0),Xv.set(this,void 0),lR.set(this,void 0),x$(this,cR,n,"f"),x$(this,Xv,new sm(e),"f"),x$(this,lR,r,"f")}name(){return el(this,cR,"f")}severity(){return el(this,Xv,"f").severity}verbose(e,r){el(this,Jd,"m",J_).call(this,In.VERBOSE,e,r)}debug(e,r){el(this,Jd,"m",J_).call(this,In.DEBUG,e,r)}info(e,r){el(this,Jd,"m",J_).call(this,In.INFO,e,r)}warn(e,r){el(this,Jd,"m",J_).call(this,In.WARN,e,r)}error(e,r){let n;r instanceof fr&&(n={error:r.failure()?r.error().message:r.data()}),r instanceof Error&&(n={error:r.message}),n===void 0&&(n=r),el(this,Jd,"m",J_).call(this,In.ERROR,e,n)}fatal(e,r){el(this,Jd,"m",J_).call(this,In.FATAL,e,r)}static otelSeverityNumber(e){switch(e){case In.VERBOSE:return xl.TRACE;case In.DEBUG:return xl.DEBUG;case In.INFO:return xl.INFO;case In.WARN:return xl.WARN;case In.ERROR:return xl.ERROR;case In.FATAL:return xl.FATAL;default:return xl.UNSPECIFIED}}}B4=j4,cR=new WeakMap,Xv=new WeakMap,lR=new WeakMap,Jd=new WeakSet,J_=function(e,r,n){!el(this,Xv,"f").shouldLog(e)||el(this,lR,"f").emit({timestamp:Date.now(),severityNumber:B4.otelSeverityNumber(e),severityText:sm.severityText(e),body:r,attributes:n??{}})};var H4=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},q4=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},dR,fR;class iTe{constructor(e,r){dR.set(this,void 0),fR.set(this,void 0),H4(this,fR,e,"f"),H4(this,dR,r.loggerProvider(),"f")}getLogger(e){const r=e??"default",n=q4(this,dR,"f").getLogger(r);return new j4(q4(this,fR,"f"),n,r)}}dR=new WeakMap,fR=new WeakMap;class sTe{format(e,r,n,i){let a=`[${new Date().toISOString()}] ${sm.severityText(e)}`;return n!==void 0&&(a+=` (${n})`),a+=`: ${r}`,i===void 0?[a]:[a,i]}}var F$=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Xs=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},tl,rl,Fl;class aTe{constructor(e,r){tl.set(this,void 0),rl.set(this,void 0),Fl.set(this,void 0),F$(this,rl,new sm(e),"f"),F$(this,tl,r,"f"),F$(this,Fl,new sTe,"f")}name(){return Xs(this,tl,"f")}severity(){return Xs(this,rl,"f").severity}verbose(e,r){Xs(this,rl,"f").shouldLog(In.VERBOSE)&&console.debug(...Xs(this,Fl,"f").format(In.VERBOSE,e,Xs(this,tl,"f"),r))}debug(e,r){Xs(this,rl,"f").shouldLog(In.DEBUG)&&console.debug(...Xs(this,Fl,"f").format(In.DEBUG,e,Xs(this,tl,"f"),r))}info(e,r){Xs(this,rl,"f").shouldLog(In.INFO)&&console.info(...Xs(this,Fl,"f").format(In.INFO,e,Xs(this,tl,"f"),r))}warn(e,r){Xs(this,rl,"f").shouldLog(In.WARN)&&console.warn(...Xs(this,Fl,"f").format(In.WARN,e,Xs(this,tl,"f"),r))}error(e,r){let n=r;r instanceof fr&&(n=r.failure()?r.error():r.data()),Xs(this,rl,"f").shouldLog(In.ERROR)&&console.error(...Xs(this,Fl,"f").format(In.ERROR,e,Xs(this,tl,"f"),n))}fatal(e,r){Xs(this,rl,"f").shouldLog(In.FATAL)&&console.error(...Xs(this,Fl,"f").format(In.FATAL,e,Xs(this,tl,"f"),r))}}tl=new WeakMap,rl=new WeakMap,Fl=new WeakMap;var oTe=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},uTe=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},_R;class Zs{constructor(e=In.FATAL){_R.set(this,void 0),oTe(this,_R,e,"f")}getLogger(e){return new aTe(uTe(this,_R,"f"),e)}}_R=new WeakMap;var cTe=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},G$,Q4;class lTe{constructor(){G$.add(this)}createLogProvider(e,r){switch(cTe(this,G$,"m",Q4).call(this,e)){case"otel":if(r===void 0)throw new Error('telemetry is required for "otel" logging');return new iTe(e.logLevel,r);case"console":return new Zs(e.logLevel)}}}G$=new WeakSet,Q4=function(e){return e.telemetry.enabled?"otel":"console"};var Wi=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Gl=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Uu,am,Xd,om,Zd,X_,Y4,W4,z4,K4,J4,X4,Z4,e6,t6,r6;class hR{constructor(e){Uu.add(this),am.set(this,void 0),Xd.set(this,void 0),om.set(this,void 0),Zd.set(this,void 0),X_.set(this,void 0),this.bwellConfig=Wi(this,Uu,"m",J4).call(this,e),Gl(this,am,sm.severityFromText(this.bwellConfig.logLevel),"f"),Gl(this,X_,Wi(this,Uu,"m",r6).call(this),"f"),Gl(this,om,Wi(this,Uu,"m",Z4).call(this),"f"),Gl(this,Xd,Wi(this,Uu,"m",e6).call(this),"f"),Gl(this,Zd,Wi(this,Uu,"m",t6).call(this),"f")}static initialize(e){try{const r=new hR(e);return fr.success(r)}catch(r){if(xa.isBwellError(r))return fr.failure(r);throw r}}get logLevel(){return Wi(this,am,"f")}get graphQL(){return Wi(this,om,"f")}get telemetry(){return Wi(this,Xd,"f")}get http(){return Wi(this,Zd,"f")}get context(){return Wi(this,X_,"f")}setContextUser(e){Wi(this,X_,"f").user=e}mergeRemoteConfig(e){Gl(this,am,Wi(this,Uu,"m",Y4).call(this,e),"f"),Gl(this,om,Wi(this,Uu,"m",W4).call(this,e),"f"),Gl(this,Xd,Object.freeze(Wi(this,Uu,"m",z4).call(this,e)),"f"),Gl(this,Zd,Object.freeze(Wi(this,Uu,"m",K4).call(this,e)),"f")}}am=new WeakMap,Xd=new WeakMap,om=new WeakMap,Zd=new WeakMap,X_=new WeakMap,Uu=new WeakSet,Y4=function(e){var r;const n=(r=e?.logLevel)!==null&&r!==void 0?r:null;return n===null?Wi(this,am,"f"):sm.severityFromText(n)},W4=function(e){var r;const n=(r=e?.graphQLClient)!==null&&r!==void 0?r:null;if(n===null)return Wi(this,om,"f");const{authedApiUrl:i,unauthedApiUrl:s}=this.bwellConfig.overrides;return{unauthApiUrl:s??n.url,apiUrl:i??n.authUrl}},z4=function(e){var r,n;const i=(r=e?.telemetry)!==null&&r!==void 0?r:null;if(i===null)return Wi(this,Xd,"f");const s=(n=i.enabled)!==null&&n!==void 0?n:Wi(this,Xd,"f").enabled;if(i.collectorUrl.endsWith("/"))throw new Error('Telemetry config "collectorUrl" cannot end with a trailing slash.');let a;try{a=new URL(i.collectorUrl)}catch{throw new Error('Telemetry config "collectorUrl" malformed/is not a proper URL.')}if(a.pathname!=="/")throw new Error('Telemetry config "collectorUrl" cannot contain a path.');return Object.assign(Object.assign({},Wi(this,Xd,"f")),{enabled:s,collectorUrl:i.collectorUrl})},K4=function(e){var r,n,i;const s=(r=e?.httpClient)!==null&&r!==void 0?r:null;return s===null?Wi(this,Zd,"f"):{timeout:(n=s.requestTimeout)!==null&&n!==void 0?n:Wi(this,Zd,"f").timeout,retryPolicy:(i=s.retry)!==null&&i!==void 0?i:Wi(this,Zd,"f").retryPolicy}},J4=function(e){return Object.assign(Object.assign({},tTe),e)},X4=function(){try{return dEe(this.bwellConfig.clientKey)}catch{throw new rEe("It appears there is a problem with your Client Key. Contact b.well support for further assistance.")}},Z4=function(){var e,r;return{apiUrl:(e=this.bwellConfig.overrides.authedApiUrl)!==null&&e!==void 0?e:`https://api-gateway.${Wi(this,X_,"f").env}.icanbwell.com/federated-graph-authed/graphql`,unauthApiUrl:(r=this.bwellConfig.overrides.unauthedApiUrl)!==null&&r!==void 0?r:`https://api-gateway.${Wi(this,X_,"f").env}.icanbwell.com/federated-graph/graphql`}},e6=function(){return{collectorUrl:"https://collector.services.icanbwell.com",enabled:this.bwellConfig.telemetryEnabled,timeout:this.bwellConfig.timeout}},t6=function(){return{timeout:this.bwellConfig.timeout,retryPolicy:{attempts:this.bwellConfig.retryPolicy.attempts,interval:this.bwellConfig.retryPolicy.interval}}},r6=function(){return{clientKey:this.bwellConfig.clientKey,env:Wi(this,Uu,"m",X4).call(this),user:null}};var dTe=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(d){try{l(n.next(d))}catch(p){a(p)}}function c(d){try{l(n.throw(d))}catch(p){a(p)}}function l(d){d.done?s(d.value):i(d.value).then(o,c)}l((n=n.apply(t,e||[])).next())})},n6=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},pR=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},um,mR;class fTe{constructor(e,r=new Zs){um.set(this,void 0),mR.set(this,void 0),n6(this,mR,e,"f"),n6(this,um,r.getLogger("ConfigManager"),"f")}initialize(e){return dTe(this,void 0,void 0,function*(){const r=hR.initialize(e);if(r.failure())return r;const n=r.data();pR(this,um,"f").verbose("Initializing SDK Configuration");const i=yield pR(this,mR,"f").initialize(n.context.clientKey);if(i.failure())return i.intoFailure();const s=i.data();try{n.mergeRemoteConfig(s)}catch(a){pR(this,um,"f").error("Error merging SDK config with remote config.",a)}return pR(this,um,"f").info("Remote SDK Configuration merged with user config"),fr.success(n)})}}um=new WeakMap,mR=new WeakMap;class ef extends Error{response;request;constructor(e,r){const n=`${ef.extractMessage(e)}: ${JSON.stringify({response:e,request:r})}`;super(n),Object.setPrototypeOf(this,ef.prototype),this.response=e,this.request=r,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,ef)}static extractMessage(e){return e.errors?.[0]?.message??`GraphQL Error (Code: ${String(e.status)})`}}const i6=t=>t.toUpperCase(),k$=t=>typeof t=="function"?t():t,s6=(t,e)=>t.map((r,n)=>[r,e[n]]),cm=t=>{let e={};return t instanceof Headers?e=_Te(t):Array.isArray(t)?t.forEach(([r,n])=>{r&&n!==void 0&&(e[r]=n)}):t&&(e=t),e},_Te=t=>{const e={};return t.forEach((r,n)=>{e[n]=r}),e},hTe=t=>{try{const e=t();return pTe(e)?e.catch(r=>a6(r)):e}catch(e){return a6(e)}},a6=t=>t instanceof Error?t:new Error(String(t)),pTe=t=>typeof t=="object"&&t!==null&&"then"in t&&typeof t.then=="function"&&"catch"in t&&typeof t.catch=="function"&&"finally"in t&&typeof t.finally=="function",V$=t=>{throw new Error(`Unhandled case: ${String(t)}`)},SR=t=>typeof t=="object"&&t!==null&&!Array.isArray(t),lYe=t=>Object.entries(t),dYe=t=>Object.values(t),fYe=(t,e)=>Object.fromEntries(Object.entries(t).map(([r,n])=>[r,e(n,r)])),_Ye=t=>t.charAt(0).toLowerCase()+t.slice(1);function hYe(t){if(!Array.isArray(t))throw new Error(`Expected array. Got: ${String(t)}`)}function pYe(t){if(t===null||typeof t!="object")throw new Error(`Expected object. Got: ${String(t)}`)}const mYe=t=>t.charAt(0).toUpperCase()+t.slice(1),SYe=t=>{let e=!1,r,n;return{promise:new Promise((s,a)=>{r=s,n=a}),isResolved:()=>e,resolve:s=>{if(e=!0,t?.strict&&e)throw new Error(`Deferred is already resolved. Attempted to resolve with: ${JSON.stringify(s)}`);r(s)},reject:s=>n(s)}},mTe=(...t)=>{process.env.DEBUG&&console.log(...t)},gYe=(...t)=>(...e)=>{mTe(...t,...e)},vYe=t=>{const e=[],r=[];for(const n of t)n instanceof Error?e.push(n):r.push(n);return[r,e]};var STe;const EYe=async(...t)=>{const e=gTe(t);return new STe(e.url).batchRequests(e)},gTe=t=>t.length===1?t[0]:{url:t[0],documents:t[1],requestHeaders:t[2],signal:void 0},vTe=(t,e)=>t.documents?t:{documents:t,requestHeaders:e,signal:void 0};var ETe;const yYe=async(...t)=>{const[e,r,...n]=t,i=yTe(e,r,...n);return new ETe(i.url).rawRequest({...i})},yTe=(t,e,...r)=>{const[n,i]=r;return typeof t=="string"?{url:t,query:e,variables:n,requestHeaders:i,signal:void 0}:t},TTe=(t,e,r)=>t.query?t:{query:t,variables:e,requestHeaders:r,signal:void 0};var ATe=v(2455);const TYe="Accept",B$="Content-Type",j$="application/json",o6="application/graphql-response+json",AYe=null,u6=t=>t.replace(/([\s,]|#[^\n\r]+)+/g," ").trim(),CTe=t=>{const e=t.toLowerCase();return e.includes(o6)||e.includes(j$)},c6=t=>{try{if(Array.isArray(t))return{_tag:"Batch",executionResults:t.map(l6)};if(SR(t))return{_tag:"Single",executionResult:l6(t)};throw new Error(`Invalid execution result: result is not object or array.
13600
+ `));function dqe(t){const e=Object.assign(Object.assign({},Xc),t);return Jc.useMutation(sve,e)}var ave,ove;const KK=null;function fqe(t={}){return ave(Object.assign(Object.assign({},t),{variables:Object.assign(Object.assign({},t.variables),{category:KK})}))}function _qe(t={}){return ove(Object.assign(Object.assign({},t),{variables:Object.assign(Object.assign({},t.variables),{category:KK})}))}var uve,cve;const JK=null;function hqe(t={}){return uve(Object.assign(Object.assign({},t),{variables:Object.assign(Object.assign({},t.variables),{category:JK})}))}function pqe(t={}){return cve(Object.assign(Object.assign({},t),{variables:Object.assign(Object.assign({},t.variables),{category:JK})}))}var lve,dve;const XK=null;function mqe(t={}){return lve(Object.assign(Object.assign({},t),{variables:Object.assign(Object.assign({},t.variables),{category:XK})}))}function Sqe(t={}){return dve(Object.assign(Object.assign({},t),{variables:Object.assign(Object.assign({},t.variables),{category:XK})}))}var ZK,fve,_ve;const gqe=t=>ZK(fve,t),vqe=t=>ZK(_ve,t);var e3=v(46),Nv,bb;class t3{constructor(){this.type="backend",Nv.set(this,void 0),bb.set(this,void 0)}init(e,{clientSlug:r,apiClient:n}){if(!n)throw e.logger.error('"apiClient" not supplied to "QueryBackend".'),new Error('"apiClient" required for "QueryBackend".');qd(this,Nv,r,"f"),qd(this,bb,Jw(n),"f")}read(e,r,n){return cb(this,void 0,void 0,function*(){try{const{translation:i}=yield si(this,bb,"f").getClientTranslations({name:si(this,Nv,"f"),key:r,lang:e});n(null,i?.json||{})}catch{const s=`Error fetching translation with key "${r}" and client "${si(this,Nv,"f")||"N/A"}".`;n(s,null)}})}}Nv=new WeakMap,bb=new WeakMap,t3.type="backend";var Wp;class r3{constructor(e){this.type="logger",Wp.set(this,void 0),qd(this,Wp,e,"f")}log([e,r,...n]){si(this,Wp,"f").info({meta:r},e,...n)}warn([e,r,...n]){si(this,Wp,"f").error({meta:r},e,...n)}error([e,r,...n]){si(this,Wp,"f").error({meta:r},e,...n)}}Wp=new WeakMap,r3.type="logger";var Rb,Ob,B_,Dv,ba,j_;const n3="appLanguage";class ko{constructor({keys:e,nativeBridge:r,fallbackKeys:n=[],defaultLanguage:i="en",logger:s,parent:a,debug:o=!1,remoteConfig:c={}}){B_.set(this,void 0),Dv.set(this,void 0),ba.set(this,void 0),j_.set(this,void 0),qd(this,B_,e,"f"),qd(this,Dv,n,"f"),qd(this,j_,r,"f");const l={lng:i,fallbackNS:si(this,Dv,"f"),debug:o,defaultNS:e,returnNull:!1};a?qd(this,ba,a.cloneInstance(l),"f"):(qd(this,ba,Xa.createInstance(),"f"),s&&si(this,ba,"f").use(new r3(s.child({library:"@icanbwell/i18n"}))),c.apiClient&&si(this,ba,"f").use(t3),si(this,ba,"f").init(Object.assign(Object.assign({},l),{fallbackLng:!1,partialBundledLanguages:!0,ns:[],resources:{},backend:c,saveMissing:!0,missingKeyHandler:(d,p,A)=>si(this,ba,"f").services.logger.error(`missing key: ${A}; language: ${d}; key: ${p}`)}))),this.t=si(this,ba,"f").t,ko.resolvedLanguage=si(this,ba,"f").resolvedLanguage||i}load(){var e;return cb(this,void 0,void 0,function*(){const r=(yield(e=si(this,j_,"f"))===null||e===void 0?void 0:e.storage.getItem(n3))||ko.resolvedLanguage;r!==ko.resolvedLanguage&&(yield si(this,ba,"f").changeLanguage(r),ko.resolvedLanguage=r),yield si(this,ba,"f").loadNamespaces(si(this,B_,"f"));const n=si(this,B_,"f").filter(i=>!si(this,ba,"f").hasResourceBundle(r,i));if(n.length)throw new Error(`Error loading translations for key(s): ${n.join(", ")}`);return si(ko,Rb,"f",Ob).emit("changeLanguage",r),this})}child(e){return new ko(Object.assign(Object.assign({},e),{nativeBridge:si(this,j_,"f"),fallbackKeys:[...si(this,Dv,"f"),...si(this,B_,"f")],parent:si(this,ba,"f"),defaultLanguage:si(this,ba,"f").language}))}get isLoaded(){return si(this,B_,"f").every(e=>si(this,ba,"f").hasResourceBundle(si(this,ba,"f").language,e))}changeLanguage(e){var r,n;return cb(this,void 0,void 0,function*(){ko.resolvedLanguage=e,yield si(this,ba,"f").changeLanguage(e),si(ko,Rb,"f",Ob).emit("changeLanguage",e),yield(r=si(this,j_,"f"))===null||r===void 0?void 0:r.storage.setItem(n3,e),(n=si(this,j_,"f"))===null||n===void 0||n.reloadView(!0)})}get resolvedLanguage(){return ko.resolvedLanguage}onChangeLanguage(e){si(ko,Rb,"f",Ob).on("changeLanguage",e)}}Rb=ko,B_=new WeakMap,Dv=new WeakMap,ba=new WeakMap,j_=new WeakMap,Ob={value:new e3},ko.resolvedLanguage="en";var zp;class hve{constructor(e){zp.set(this,void 0),(0,m.__classPrivateFieldSet)(this,zp,e,"f")}get isWithin(){return!!window.ReactNativeWebView}open(e){(0,m.__classPrivateFieldGet)(this,zp,"f").emit("openwebview",e)}close(e){(0,m.__classPrivateFieldGet)(this,zp,"f").emit("closewebview",e)}reload(e=!1){(0,m.__classPrivateFieldGet)(this,zp,"f").emit("reloadwebview",e)}}zp=new WeakMap;var pve=v(3857),mve=v.n(pve);const Sve=(t,e)=>mve().bind(`${t}.${String(e)}`),Vo=t=>e=>Sve(t,e);var Pb,oU;const Yd=Vo("biometrics");class gve{constructor(e){Pb.set(this,void 0),oU.set(this,Yd("isAvailable")),this.isAvailable=()=>(0,m.__awaiter)(this,void 0,void 0,function*(){return(0,m.__classPrivateFieldGet)(this,Pb,"f").isWithin?yield(0,m.__classPrivateFieldGet)(this,oU,"f").call(this):!1}),this.getBiometryInformation=Yd("getBiometryInformation"),this.biometricKeysExist=Yd("biometricKeysExist"),this.createKeys=Yd("createKeys"),this.createSignature=Yd("createSignature"),this.deleteKeys=Yd("deleteKeys"),this.checkPermission=Yd("checkPermission"),this.requestPermission=Yd("requestPermission"),(0,m.__classPrivateFieldSet)(this,Pb,e,"f")}}Pb=new WeakMap,oU=new WeakMap;const vve=Vo("events");class Eve{constructor(){this.emit=vve("emit")}}var uU=v(4962),Kp,cU,lU,dU;const fU=Vo("storage");class yve{constructor(e){Kp.set(this,void 0),cU.set(this,fU("setItem")),lU.set(this,fU("getItem")),dU.set(this,fU("removeItem")),(0,m.__classPrivateFieldSet)(this,Kp,e,"f")}setItem(e,r){return(0,m.__awaiter)(this,void 0,void 0,function*(){(0,m.__classPrivateFieldGet)(this,Kp,"f").isWithin?yield(0,m.__classPrivateFieldGet)(this,cU,"f").call(this,e,r):uU.A.setItem(e,r)})}getItem(e){return(0,m.__classPrivateFieldGet)(this,Kp,"f").isWithin?(0,m.__classPrivateFieldGet)(this,lU,"f").call(this,e):uU.A.getItem(e)}removeItem(e){return(0,m.__awaiter)(this,void 0,void 0,function*(){(0,m.__classPrivateFieldGet)(this,Kp,"f").isWithin?yield(0,m.__classPrivateFieldGet)(this,dU,"f").call(this,e):uU.A.removeItem(e)})}}Kp=new WeakMap,cU=new WeakMap,lU=new WeakMap,dU=new WeakMap;var Mb,_U;const Lv=Vo("camera");class Tve{constructor(e){Mb.set(this,void 0),_U.set(this,Lv("isAvailable")),this.isAvailable=()=>(0,m.__awaiter)(this,void 0,void 0,function*(){return(0,m.__classPrivateFieldGet)(this,Mb,"f").isWithin?yield(0,m.__classPrivateFieldGet)(this,_U,"f").call(this):!1}),this.checkPermission=Lv("checkPermission"),this.checkRollPermission=Lv("checkRollPermission"),this.requestPermission=Lv("requestPermission"),this.requestRollPermission=Lv("requestRollPermission"),(0,m.__classPrivateFieldSet)(this,Mb,e,"f")}}Mb=new WeakMap,_U=new WeakMap;var Wd=v(3758),H_,hU,pU,mU,SU;const Ib=Vo("geolocation");class Ave{constructor(e){H_.set(this,void 0),hU.set(this,Ib("isAvailable")),pU.set(this,Ib("getCurrentPosition")),mU.set(this,Ib("checkPermission")),SU.set(this,Ib("requestPermission")),this.isAvailable=()=>(0,m.__awaiter)(this,void 0,void 0,function*(){return(0,m.__classPrivateFieldGet)(this,H_,"f").isWithin?(0,m.__classPrivateFieldGet)(this,hU,"f").call(this):!!navigator.geolocation}),this.getCurrentPosition=r=>(0,m.__awaiter)(this,void 0,void 0,function*(){if((0,m.__classPrivateFieldGet)(this,H_,"f").isWithin)return(0,m.__classPrivateFieldGet)(this,pU,"f").call(this,r);try{const{state:n}=yield navigator.permissions.query({name:"geolocation"});if(n==="granted"||n==="prompt")return yield new Promise((i,s)=>navigator.geolocation.getCurrentPosition(i,s,r))}catch(n){throw new Ui.b(`Failed to retrieve the permission or the position is unavailable. ${n.message}`,{errorCode:Wd.O.UNKNOWN})}throw new Ui.b("Permission Denied.",{errorCode:Wd.O.INSUFFICIENT_PERMISSIONS})}),this.checkPermission=()=>(0,m.__awaiter)(this,void 0,void 0,function*(){return(0,m.__classPrivateFieldGet)(this,H_,"f").isWithin?(0,m.__classPrivateFieldGet)(this,mU,"f").call(this):(yield navigator.permissions.query({name:"geolocation"})).state}),this.requestPermission=()=>(0,m.__awaiter)(this,void 0,void 0,function*(){if((0,m.__classPrivateFieldGet)(this,H_,"f").isWithin)return yield(0,m.__classPrivateFieldGet)(this,SU,"f").call(this);{const{state:r}=yield navigator.permissions.query({name:"geolocation"});return(r==="granted"||r==="prompt")&&(yield new Promise((n,i)=>navigator.geolocation.getCurrentPosition(n,i))),r}}),(0,m.__classPrivateFieldSet)(this,H_,e,"f")}}H_=new WeakMap,hU=new WeakMap,pU=new WeakMap,mU=new WeakMap,SU=new WeakMap;var Cve=v(1204),bve=v.n(Cve),Rve=v(7931),i3=v.n(Rve),wv,Nb;const Ove=t=>{if(!bve()(t))return!1;try{return new URL(t).protocol==="https:"}catch{return!1}},Pve=Vo("print");class Mve{constructor(e){wv.set(this,void 0),Nb.set(this,Pve("print")),(0,m.__classPrivateFieldSet)(this,wv,e,"f")}print(e){return(0,m.__awaiter)(this,void 0,void 0,function*(){if(e.html){if((0,m.__classPrivateFieldGet)(this,wv,"f").isWithin)return yield(0,m.__classPrivateFieldGet)(this,Nb,"f").call(this,{html:e.html});i3()({type:"raw-html",printable:e.html})}else if(e.filePath&&Ove(e.filePath)){const r={filePath:e.filePath};if((0,m.__classPrivateFieldGet)(this,wv,"f").isWithin)return yield(0,m.__classPrivateFieldGet)(this,Nb,"f").call(this,r);i3()({type:"pdf",printable:r.filePath})}else throw new Ui.b("Filepath must be an https URL.",{errorCode:Wd.O.UNKNOWN})})}}wv=new WeakMap,Nb=new WeakMap;var q_,gU,vU,EU,yU;const Db=Vo("documentDownload"),TU={"image/jpeg":"jpeg","image/png":"png","image/svg+xml":"svg","application/pdf":"pdf","text/calendar":"ics"},Ive=t=>{const e=t.trim();if(!e||e==="."||e==="..")throw new Ui.b("Invalid filename.",{errorCode:Wd.O.UNKNOWN});if(/[\\/]/.test(e)||e.includes("\0"))throw new Ui.b("Invalid filename.",{errorCode:Wd.O.UNKNOWN});return e},Nve=t=>{const e=/^\s*data:([a-z]+\/[a-z0-9\-+]+(;[a-z-]+=[a-z0-9-]+)?)?(;base64)?,[a-z0-9!$&',()*+,;=\-._~:@/?%\s]*\s*$/i;return!!t.match(e)},Dve=t=>t.substring(t.indexOf(":")+1,t.indexOf(";")),Lve=(t,e)=>{if(!Nve(e))throw new Ui.b("Invalid Data URL Format.",{errorCode:Wd.O.UNKNOWN});const r=Dve(e);return Lb(r),`${t}.${TU[r]}`},Lb=t=>{if(!Object.keys(TU).includes(t))throw new Ui.b("Invalid or unallowed file type.",{errorCode:Wd.O.UNKNOWN})};class wve{constructor(e){q_.set(this,void 0),gU.set(this,Db("isAvailable")),vU.set(this,Db("writeFile")),EU.set(this,Db("checkPermission")),yU.set(this,Db("requestPermission")),this.isAvailable=r=>(0,m.__awaiter)(this,void 0,void 0,function*(){return Lb(r),(0,m.__classPrivateFieldGet)(this,q_,"f").isWithin?(0,m.__classPrivateFieldGet)(this,gU,"f").call(this,r):!0}),this.writeFile=(r,n)=>(0,m.__awaiter)(this,void 0,void 0,function*(){const i=Ive(r);if(Object.values(TU).some(a=>i.includes(a)))throw new Ui.b("Filename should not contain extension",{errorCode:Wd.O.UNKNOWN});const s=Lve(i,n);if((0,m.__classPrivateFieldGet)(this,q_,"f").isWithin)return(0,m.__classPrivateFieldGet)(this,vU,"f").call(this,s,n);{const a=document.createElement("a");return a.href=n,a.download=s,a.click(),"Files"}}),this.checkPermission=r=>(0,m.__awaiter)(this,void 0,void 0,function*(){return Lb(r),(0,m.__classPrivateFieldGet)(this,q_,"f").isWithin?(0,m.__classPrivateFieldGet)(this,EU,"f").call(this,r):"granted"}),this.requestPermission=r=>(0,m.__awaiter)(this,void 0,void 0,function*(){return Lb(r),(0,m.__classPrivateFieldGet)(this,q_,"f").isWithin?yield(0,m.__classPrivateFieldGet)(this,yU,"f").call(this,r):"granted"}),(0,m.__classPrivateFieldSet)(this,q_,e,"f")}}q_=new WeakMap,gU=new WeakMap,vU=new WeakMap,EU=new WeakMap,yU=new WeakMap;const Uv=Object.freeze({UNAVAILABLE:"unavailable",BLOCKED:"blocked",DENIED:"denied",GRANTED:"granted",LIMITED:"limited"}),AU="Only supported by iOS 14 and above";async function Uve(){throw new Error(AU)}async function $ve(t){throw new Error(AU)}async function xve(){throw new Error(AU)}async function s3(){return Uv.UNAVAILABLE}async function a3(){return{status:Uv.UNAVAILABLE,settings:{}}}async function o3(t){return t.reduce((e,r)=>(e[r]=Uv.UNAVAILABLE,e),{})}const Zc={check:s3,checkLocationAccuracy:Uve,checkMultiple:o3,checkNotifications:a3,openLimitedPhotoLibraryPicker:xve,openSettings:Promise.reject,request:s3,requestLocationAccuracy:$ve,requestMultiple:o3,requestNotifications:a3},Eqe=Object.freeze({ANDROID:{},IOS:{},WINDOWS:{}});var yqe,Tqe;const Aqe=Zc.check,Cqe=Zc.checkLocationAccuracy,bqe=Zc.checkMultiple,Rqe=Zc.checkNotifications,Oqe=Zc.openLimitedPhotoLibraryPicker,Pqe=Zc.openSettings,Mqe=Zc.request,Iqe=Zc.requestLocationAccuracy,Nqe=Zc.requestMultiple,Dqe=Zc.requestNotifications,Lqe=null;var Q_,CU,bU,RU,OU;const wb=Vo("documentPicker"),Fve=t=>new Promise((e,r)=>{const n=new FileReader;n.readAsDataURL(t),n.onload=()=>e(n.result.replace("data:","").replace(/^.+,/,"")),n.onerror=r}),u3=t=>new Promise((e,r)=>{const n=document.createElement("input");n.type="file",t===!0&&(n.multiple=t),n.onchange=({target:i})=>(0,m.__awaiter)(void 0,void 0,void 0,function*(){try{e(yield Promise.all(Object.values(i.files).map(s=>(0,m.__awaiter)(void 0,void 0,void 0,function*(){return{type:s.type,name:s.name,size:s.size,base64:yield Fve(s)}}))))}catch(s){r(s)}}),n.click()});class Gve{constructor(e){Q_.set(this,void 0),CU.set(this,wb("pickMultiple")),bU.set(this,wb("pickSingle")),RU.set(this,wb("checkPermission")),OU.set(this,wb("requestPermission")),this.pickMultiple=()=>(0,m.__classPrivateFieldGet)(this,Q_,"f").isWithin?(0,m.__classPrivateFieldGet)(this,CU,"f").call(this):u3(!0),this.checkPermission=()=>(0,m.__awaiter)(this,void 0,void 0,function*(){return(0,m.__classPrivateFieldGet)(this,Q_,"f").isWithin?yield(0,m.__classPrivateFieldGet)(this,RU,"f").call(this):Promise.resolve(Uv.GRANTED)}),this.requestPermission=()=>(0,m.__awaiter)(this,void 0,void 0,function*(){return(0,m.__classPrivateFieldGet)(this,Q_,"f").isWithin?yield(0,m.__classPrivateFieldGet)(this,OU,"f").call(this):Promise.resolve(Uv.GRANTED)}),(0,m.__classPrivateFieldSet)(this,Q_,e,"f")}pickSingle(){return(0,m.__awaiter)(this,void 0,void 0,function*(){return(0,m.__classPrivateFieldGet)(this,Q_,"f").isWithin?(0,m.__classPrivateFieldGet)(this,bU,"f").call(this):(yield u3(!1))[0]})}}Q_=new WeakMap,CU=new WeakMap,bU=new WeakMap,RU=new WeakMap,OU=new WeakMap;var Y_,PU,MU,IU,NU;const Ub=Vo("pushNotifications");class kve{constructor(e){Y_.set(this,void 0),PU.set(this,Ub("isAvailable")),MU.set(this,Ub("getDeviceToken")),IU.set(this,Ub("checkPermission")),NU.set(this,Ub("requestPermission")),this.isAvailable=()=>(0,m.__awaiter)(this,void 0,void 0,function*(){return(0,m.__classPrivateFieldGet)(this,Y_,"f").isWithin?(0,m.__classPrivateFieldGet)(this,PU,"f").call(this):!1}),this.getDeviceToken=()=>(0,m.__awaiter)(this,void 0,void 0,function*(){if((0,m.__classPrivateFieldGet)(this,Y_,"f").isWithin)return(0,m.__classPrivateFieldGet)(this,MU,"f").call(this);throw new Error("This method is currently not supported on web")}),this.checkPermission=()=>(0,m.__awaiter)(this,void 0,void 0,function*(){return(0,m.__classPrivateFieldGet)(this,Y_,"f").isWithin?(0,m.__classPrivateFieldGet)(this,IU,"f").call(this):"unavailable"}),this.requestPermission=()=>(0,m.__awaiter)(this,void 0,void 0,function*(){return(0,m.__classPrivateFieldGet)(this,Y_,"f").isWithin?yield(0,m.__classPrivateFieldGet)(this,NU,"f").call(this):"unavailable"}),(0,m.__classPrivateFieldSet)(this,Y_,e,"f")}}Y_=new WeakMap,PU=new WeakMap,MU=new WeakMap,IU=new WeakMap,NU=new WeakMap;var $b,DU;const Vve=Vo("deepLink");class Bve{constructor(e){$b.set(this,void 0),DU.set(this,Vve("openLink")),this.openLink=(r,n="_blank")=>(0,m.__awaiter)(this,void 0,void 0,function*(){if((0,m.__classPrivateFieldGet)(this,$b,"f").isWithin)return(0,m.__classPrivateFieldGet)(this,DU,"f").call(this,r,n);window.open(r.webUrl,n)}),(0,m.__classPrivateFieldSet)(this,$b,e,"f")}}$b=new WeakMap,DU=new WeakMap;var xb,LU;const jve=Vo("system");class Hve{constructor(e){xb.set(this,void 0),LU.set(this,jve("openSettings")),this.openSettings=()=>(0,m.__awaiter)(this,void 0,void 0,function*(){if((0,m.__classPrivateFieldGet)(this,xb,"f").isWithin)return yield(0,m.__classPrivateFieldGet)(this,LU,"f").call(this)}),(0,m.__classPrivateFieldSet)(this,xb,e,"f")}}xb=new WeakMap,LU=new WeakMap;var $v,wU,UU;const c3=Vo("utils");class qve{constructor(e){$v.set(this,void 0),wU.set(this,c3("getPlatform")),UU.set(this,c3("getBundleId")),(0,m.__classPrivateFieldSet)(this,$v,e,"f")}getPlatform(){return(0,m.__awaiter)(this,void 0,void 0,function*(){return(0,m.__classPrivateFieldGet)(this,$v,"f").isWithin?(0,m.__classPrivateFieldGet)(this,wU,"f").call(this):"web"})}getBundleId(){return(0,m.__awaiter)(this,void 0,void 0,function*(){if((0,m.__classPrivateFieldGet)(this,$v,"f").isWithin)return(0,m.__classPrivateFieldGet)(this,UU,"f").call(this);console.warn("bundleId not available on the web")})}}$v=new WeakMap,wU=new WeakMap,UU=new WeakMap;var Fb,$U,xU,FU,GU,kU,VU,zd;const Jp=Vo("connectDevices");class Qve{constructor(e){Fb.set(this,void 0),$U.set(this,Jp("startSession")),xU.set(this,Jp("syncData")),FU.set(this,Jp("refreshData")),GU.set(this,Jp("endSession")),kU.set(this,Jp("getCurrentUser")),VU.set(this,Jp("checkPermissions")),zd.set(this,()=>(0,m.__classPrivateFieldGet)(this,Fb,"f").isWithin),this.startSession=r=>(0,m.__awaiter)(this,void 0,void 0,function*(){if((0,m.__classPrivateFieldGet)(this,zd,"f").call(this))return(0,m.__classPrivateFieldGet)(this,$U,"f").call(this,r)}),this.syncData=(r=30)=>(0,m.__awaiter)(this,void 0,void 0,function*(){return(0,m.__classPrivateFieldGet)(this,zd,"f").call(this)?(0,m.__classPrivateFieldGet)(this,xU,"f").call(this,r):[]}),this.refreshData=(r=30)=>(0,m.__awaiter)(this,void 0,void 0,function*(){return(0,m.__classPrivateFieldGet)(this,zd,"f").call(this)?(0,m.__classPrivateFieldGet)(this,FU,"f").call(this,r):[]}),this.endSession=()=>(0,m.__awaiter)(this,void 0,void 0,function*(){if((0,m.__classPrivateFieldGet)(this,zd,"f").call(this))return(0,m.__classPrivateFieldGet)(this,GU,"f").call(this)}),this.getCurrentUser=()=>(0,m.__awaiter)(this,void 0,void 0,function*(){return(0,m.__classPrivateFieldGet)(this,zd,"f").call(this)?(0,m.__classPrivateFieldGet)(this,kU,"f").call(this):null}),this.checkPermissions=()=>(0,m.__awaiter)(this,void 0,void 0,function*(){return(0,m.__classPrivateFieldGet)(this,zd,"f").call(this)?(0,m.__classPrivateFieldGet)(this,VU,"f").call(this):!1}),(0,m.__classPrivateFieldSet)(this,Fb,e,"f")}}Fb=new WeakMap,$U=new WeakMap,xU=new WeakMap,FU=new WeakMap,GU=new WeakMap,kU=new WeakMap,VU=new WeakMap,zd=new WeakMap;var Xp,BU,jU,HU;const qU=Vo("passkey");class Yve{constructor(e){Xp.set(this,void 0),BU.set(this,qU("isSupported")),jU.set(this,qU("create")),HU.set(this,qU("get")),this.isSupported=()=>(0,m.__awaiter)(this,void 0,void 0,function*(){return(0,m.__classPrivateFieldGet)(this,Xp,"f").isWithin?(0,m.__classPrivateFieldGet)(this,BU,"f").call(this):!1}),this.create=r=>(0,m.__awaiter)(this,void 0,void 0,function*(){if(!(0,m.__classPrivateFieldGet)(this,Xp,"f").isWithin)throw new Error("Native passkey bridge is only available within a native WebView.");return(0,m.__classPrivateFieldGet)(this,jU,"f").call(this,r)}),this.get=r=>(0,m.__awaiter)(this,void 0,void 0,function*(){if(!(0,m.__classPrivateFieldGet)(this,Xp,"f").isWithin)throw new Error("Native passkey bridge is only available within a native WebView.");return(0,m.__classPrivateFieldGet)(this,HU,"f").call(this,r)}),(0,m.__classPrivateFieldSet)(this,Xp,e,"f")}}Xp=new WeakMap,BU=new WeakMap,jU=new WeakMap,HU=new WeakMap;class Wve{constructor(){this.events=new Eve,this.webview=new hve(this.events),this.biometrics=new gve(this.webview),this.storage=new yve(this.webview),this.camera=new Tve(this.webview),this.geolocation=new Ave(this.webview),this.print=new Mve(this.webview),this.documentDownload=new wve(this.webview),this.documentPicker=new Gve(this.webview),this.pushNotifications=new kve(this.webview),this.deepLink=new Bve(this.webview),this.utils=new qve(this.webview),this.system=new Hve(this.webview),this.connectDevices=new Qve(this.webview),this.passkey=new Yve(this.webview)}reloadView(e=!1){this.webview.isWithin?this.webview.reload(e):globalThis.location.reload()}}const QU=new Wve;var xv;(function(t){t.one="1.0.0"})(xv||(xv={}));const Gb="orchestrator:native-bridge",zve={id:Gb,dependencies:{featureServices:{}},create:()=>({[xv.one]:()=>({featureService:QU})})};var Fv;(function(t){t.one="1.0.0"})(Fv||(Fv={}));const kb="orchestrator:translation-service",Kve={id:kb,dependencies:{featureServices:{[Na]:bu.one,[qc]:Gd.one,[Ji]:Qa.one,[hv]:Up.one,[Gb]:xv.one}},create:({featureServices:t})=>{const e=t[Na],r=t[qc],n=t[hv],{slug:i}=t[Ji].getClientContext(),s=t[Gb],a=new ko({keys:[],nativeBridge:s,defaultLanguage:"en",logger:r,remoteConfig:{clientSlug:i,apiClient:e}});return n.setProfileProperties({language:a.resolvedLanguage}),a.onChangeLanguage(o=>n.setProfileProperties({language:o})),{[Fv.one]:()=>({featureService:a})}}};var Zp,em,Vb,lu,Gv,Bb;const jb="tokens",YU="delegationContext",WU="userSessionId";class Jve{constructor({apiClient:e,stateService:r,identityGatewaySdk:n,storage:i,logger:s}){Zp.set(this,void 0),em.set(this,void 0),Vb.set(this,void 0),lu.set(this,void 0),Gv.set(this,void 0),Bb.set(this,[]),(0,m.__classPrivateFieldSet)(this,Zp,e,"f"),(0,m.__classPrivateFieldSet)(this,em,r,"f"),(0,m.__classPrivateFieldSet)(this,Vb,n,"f"),(0,m.__classPrivateFieldSet)(this,lu,i,"f"),(0,m.__classPrivateFieldSet)(this,Gv,s,"f")}registerPreLogoutHandler(e){(0,m.__classPrivateFieldGet)(this,Bb,"f").push(e)}getStoredTokens(){const e=(0,m.__classPrivateFieldGet)(this,lu,"f").getItem(jb);return e?JSON.parse(e):void 0}removeStoredTokens(){(0,m.__classPrivateFieldGet)(this,lu,"f").removeItem(jb),this.clearSessionId(),this.clearDelegationContext()}clearSessionId(){(0,m.__classPrivateFieldGet)(this,lu,"f").removeItem(WU)}ensureSessionId(){var e;try{if((0,m.__classPrivateFieldGet)(this,lu,"f").getItem(WU))return;(0,m.__classPrivateFieldGet)(this,lu,"f").setItem(WU,JSON.stringify({sessionId:crypto.randomUUID()}))}catch(r){(e=(0,m.__classPrivateFieldGet)(this,Gv,"f"))===null||e===void 0||e.error(r instanceof Error?r:new Error(String(r)),"Failed to mint session id")}}storeTokens(e){const r=Object.assign(Object.assign({},e),{idToken:Object.assign(Object.assign({},e.idToken),{payload:(0,Xi.normalizeTokenPayload)(e.idToken.payload)})});return(0,m.__classPrivateFieldGet)(this,lu,"f").setItem(jb,JSON.stringify(r)),r}storeDelegationContext(e){(0,m.__classPrivateFieldGet)(this,lu,"f").setItem(YU,JSON.stringify(e))}getDelegationContext(){var e,r;const n=(0,m.__classPrivateFieldGet)(this,lu,"f").getItem(YU);if(!n)return null;try{const i=JSON.parse(n);return!i?.consentId||!(!((r=(e=i?.delegateTokens)===null||e===void 0?void 0:e.accessToken)===null||r===void 0)&&r.jwtToken)?null:i}catch{return null}}clearDelegationContext(){(0,m.__classPrivateFieldGet)(this,lu,"f").removeItem(YU)}logout(){var e;return(0,m.__awaiter)(this,void 0,void 0,function*(){for(const s of(0,m.__classPrivateFieldGet)(this,Bb,"f"))try{yield s()}catch(a){(e=(0,m.__classPrivateFieldGet)(this,Gv,"f"))===null||e===void 0||e.error(a instanceof Error?a:new Error(String(a)),"Pre-logout handler failed")}const r=(0,m.__classPrivateFieldGet)(this,em,"f").getUserTokenData().accessToken.jwtToken,{key:n,variant:i}=(0,m.__classPrivateFieldGet)(this,em,"f").getClientContext();i!==q.GUEST&&(yield(0,m.__classPrivateFieldGet)(this,Vb,"f").logout({accessToken:r},{context:{headers:{clientKey:n}}})),(0,m.__classPrivateFieldGet)(this,Zp,"f").stop(),(0,m.__classPrivateFieldGet)(this,Zp,"f").clearAuth(),yield(0,m.__classPrivateFieldGet)(this,Zp,"f").clearStore(),(0,m.__classPrivateFieldGet)(this,em,"f").logoutUser(),(0,m.__classPrivateFieldGet)(this,lu,"f").removeItem(jb),this.clearSessionId(),this.clearDelegationContext()})}}Zp=new WeakMap,em=new WeakMap,Vb=new WeakMap,lu=new WeakMap,Gv=new WeakMap,Bb=new WeakMap;var kv;(function(t){t.one="1.0.0"})(kv||(kv={}));const Hb="orchestrator:identity-utils",Xve={id:Hb,dependencies:{featureServices:{[Na]:bu.one,[qc]:Gd.one,[Ji]:Qa.one,[hv]:Up.one}},create:({featureServices:t})=>{const e=t[Na];return{[kv.one]:()=>({featureService:new Jve({apiClient:e,stateService:t[Ji],identityGatewaySdk:dW(e),storage:window.sessionStorage,logger:t[qc]})})}}};var qb;(function(t){t.one="1.0.0"})(qb||(qb={}));const l3="orchestrator:globaleventemitter-service",Zve=t=>({id:l3,create:()=>({[qb.one]:()=>({featureService:t})})});var Qb;(function(t){t.one="1.0.0"})(Qb||(Qb={}));const d3="orchestrator:reboot-controller",eEe=t=>({id:d3,create:()=>({[Qb.one]:()=>({featureService:t})})}),Yb="orchestrator:bwell-sdk";var Vv;(function(t){t.one="1.0.0"})(Vv||(Vv={}));const tEe=t=>({id:Yb,dependencies:{featureServices:{[Ji]:Qa.one,[kb]:Fv.one,[qc]:Gd.one}},create:({featureServices:e})=>{const r=e[Ji],n=e[kb],i=e[qc],s=t;let a=!1,o=!1;const c=F=>{if(typeof F=="string")return F;if(F&&typeof F=="object"&&"message"in F){const k=F.message;return typeof k=="string"?k:String(k)}return String(F)},l=F=>/uninitialized|not been initialized/i.test(c(F)),d=F=>{try{s.language.setLanguage(F)}catch(k){if(l(k)){o||(o=!0,i.info({},"embeddable-core: Deferring language switch until SDK initialization completes"));return}i.info({error:c(k)},"embeddable-core: Non-fatal language switch issue in SDK")}},p=F=>{try{const k=s.language.getLanguage();F!==k&&d(F)}catch(k){if(l(k))return;i.info({error:c(k)},"embeddable-core: Non-fatal language read issue in SDK")}},A=()=>{var F;!(!((F=r.getUser().tokenData)===null||F===void 0)&&F.idToken)||(d(n.resolvedLanguage),a||(a=!0,n.onChangeLanguage(p)))};return r.getStore().subscribe(A),{[Vv.one]:()=>({featureService:s})}}});class xa extends Error{constructor(e,r){super(e),this.name="BWellError",r?.cause&&(this.cause=r.cause)}static isBwellError(e){return e instanceof xa}}class wqe extends xa{constructor(e="Authentication Error"){super(e),this.name="AuthenticationError"}}class Uqe extends xa{constructor(e="Illegal Argument Error"){super(e),this.name="IllegalArgumentError"}}class $qe extends xa{constructor(e="Illegal State Error"){super(e),this.name="IllegalStateError"}}class rEe extends xa{constructor(e="Invalid Client Key Error"){super(e),this.name="InvalidClientKeyError"}}class zU extends xa{constructor(e,r){super(e),this.credentials=r,this.name="InvalidCredentialsTypeError"}}class tm extends xa{constructor(e="Invalid Token Error"){super(e),this.name="InvalidTokenError"}}class nEe extends xa{constructor(e,r){super(e),this.status=r,this.name="NetworkError"}}class iEe extends xa{constructor(e){super(e.message()),this.operationOutcome=e,this.name="OperationOutcomeError"}}class KU extends xa{constructor(e,r){super(e),this.data=r,this.name="UnknownError"}}class sEe extends xa{constructor(e){super(e.join(". ")),this.errors=e,this.name="ValidationError"}}class sr{constructor(e,r){this.data=e,r!==null&&(this.error=r)}hasError(){return this.error!==void 0}static error(e){return new sr(void 0,e)}}var f3=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Wb=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Bv,jv;class fr{static success(e){return new aEe(e)}static failure(e){return new zb(e)}}class aEe extends fr{constructor(e){super(),Bv.set(this,void 0),f3(this,Bv,e,"f")}data(){return Wb(this,Bv,"f")}error(){throw Wb(this,Bv,"f")}success(){return!0}failure(){return!1}toQueryResult(){return new sr(this.data())}}Bv=new WeakMap;class zb extends fr{constructor(e){super(),jv.set(this,void 0),f3(this,jv,e,"f")}data(){throw Wb(this,jv,"f")}error(){return Wb(this,jv,"f")}success(){return!1}failure(){return!0}intoFailure(){return fr.failure(this.error())}toQueryResult(){return new sr(void 0,this.error())}}jv=new WeakMap;var JU=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Hv;class _3{constructor(){Hv.set(this,[])}add(e){JU(this,Hv,"f").push(e)}errors(){return JU(this,Hv,"f")}hasErrors(){return JU(this,Hv,"f").length>0}}Hv=new WeakMap;var h3=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},XU=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},qv,Kb;class oEe{constructor(e){qv.set(this,void 0),Kb.set(this,void 0),h3(this,Kb,e,"f"),h3(this,qv,this.transformInput(e),"f")}validate(){return fr.success(null)}data(){return XU(this,qv,"f")}toJSON(){return XU(this,qv,"f")}transformInput(e){return e}input(){return XU(this,Kb,"f")}}qv=new WeakMap,Kb=new WeakMap;class Qn extends oEe{validate(){const e=new _3;return this.validator.validate(this.input(),e),e.hasErrors()?fr.failure(new sEe(e.errors())):fr.success(null)}}var p3=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Jb,m3,S3;const g3=100,uEe=20;class ua{constructor(){Jb.add(this)}validate(e,r){p3(this,Jb,"m",m3).call(this,e.page,r),p3(this,Jb,"m",S3).call(this,e.pageSize,r)}}Jb=new WeakSet,m3=function(e,r){e<0&&r.add("page must be a positive number")},S3=function(e,r){e!==void 0&&(e<=0&&r.add("Page size must be greater than 0"),e>g3&&r.add(`Page size must not exceed ${g3}`))};class ca extends Qn{constructor(){super(...arguments),this.validator=new ua}transformInput(e){return Object.assign({pageSize:uEe},e)}}function ZU(){return new Date().toISOString()}function cEe(){var t;return!(typeof process>"u"||((t=process.versions)===null||t===void 0?void 0:t.node)===void 0)}function lEe(){return typeof window<"u"}function v3(){if(lEe())return"browser";if(cEe())return"node";throw new Error("Invalid runtime")}function E3(t){switch(v3()){case"browser":return t.browser();case"node":return t.node()}}function y3(t){switch(v3()){case"node":return Buffer.from(t,"base64").toString("utf-8");case"browser":return atob(t)}}function An(t){return t!=null}function Ra(t){return t==null}function xqe(t){return An(t)&&t!==""}function la(t){return t==null||t===""}function Oa(t){return t===void 0}function Jn(t){return t!==void 0}function dEe(t){return JSON.parse(y3(t)).env}const fEe=3;function T3(t){const e=t.split("."),r=e[1];if(r===void 0||e.length!==fEe)throw new tm("Token is missing data and may be corrupted");try{return JSON.parse(y3(r))}catch(n){const i=n;throw new tm(`Unable to parse token payload: ${i.name} - ${i.message}`)}}function A3(t){const r=T3(t).exp;if(typeof r!="number")throw new tm("The access token is missing an expiration date and is most likely corrupted.");return r*1e3}const _Ee="custom:clientFhirPersonId",hEe="custom:bwellFhirPatientId";function pEe(t){const e=T3(t),r=e[hEe],n=e[_Ee];return An(r)&&An(n)?{bwellFhirPersonId:r,clientFhirPersonId:n}:null}function Js(t){return t.trim()===""}const C3="1.110.0";function mEe(){return C3}var e$;(function(t){t.Arrived="ARRIVED",t.Booked="BOOKED",t.Cancelled="CANCELLED",t.CheckedIn="CHECKED_IN",t.EnteredInError="ENTERED_IN_ERROR",t.Fulfilled="FULFILLED",t.Noshow="NOSHOW",t.Pending="PENDING",t.Proposed="PROPOSED",t.Waitlist="WAITLIST"})(e$||(e$={}));var b3;(function(t){t.Guest="GUEST",t.Other="OTHER",t.Self="SELF"})(b3||(b3={}));var R3;(function(t){t.Guest="GUEST"})(R3||(R3={}));var Xb;(function(t){t.CmsNetworkShareMyRecords="CMS_NETWORK_SHARE_MY_RECORDS",t.CommunicationPreferencesPhi="COMMUNICATION_PREFERENCES_PHI",t.DataSharing="DATA_SHARING",t.DirectImportRecords="DIRECT_IMPORT_RECORDS",t.HealthCircleAdolescent="HEALTH_CIRCLE_ADOLESCENT",t.HealthCircleMinor="HEALTH_CIRCLE_MINOR",t.HealthMatch="HEALTH_MATCH",t.IasImportRecords="IAS_IMPORT_RECORDS",t.MobileCommunicationPreferences="MOBILE_COMMUNICATION_PREFERENCES",t.PersonalizedHealthOffersAndAds="PERSONALIZED_HEALTH_OFFERS_AND_ADS",t.ProaAttestation="PROA_ATTESTATION",t.Tos="TOS"})(Xb||(Xb={}));var O3;(function(t){t.Complete="COMPLETE",t.Error="ERROR",t.Partial="PARTIAL",t.Queued="QUEUED"})(O3||(O3={}));var P3;(function(t){t.Institutional="INSTITUTIONAL",t.Oral="ORAL",t.Pharmacy="PHARMACY",t.Professional="PROFESSIONAL",t.Vision="VISION"})(P3||(P3={}));var M3;(function(t){t.Bwell="bwell"})(M3||(M3={}));var I3;(function(t){t.Bwell="BWELL"})(I3||(I3={}));var N3;(function(t){t.Basic="BASIC",t.Identity="IDENTITY",t.Oauth="OAUTH"})(N3||(N3={}));var t$;(function(t){t.Deny="DENY",t.Permit="PERMIT"})(t$||(t$={}));var r$;(function(t){t.Active="ACTIVE",t.Draft="DRAFT",t.EnteredInError="ENTERED_IN_ERROR",t.Inactive="INACTIVE",t.Proposed="PROPOSED",t.Rejected="REJECTED"})(r$||(r$={}));var D3;(function(t){t.Medical="MEDICAL",t.Pharmacy="PHARMACY"})(D3||(D3={}));var L3;(function(t){t.Usd="USD"})(L3||(L3={}));var w3;(function(t){t.Accepted="ACCEPTED",t.Rejected="REJECTED"})(w3||(w3={}));var U3;(function(t){t.AccessEnded="ACCESS_ENDED",t.Connected="CONNECTED",t.Deleted="DELETED",t.Disconnected="DISCONNECTED",t.Error="ERROR",t.Expired="EXPIRED"})(U3||(U3={}));var $3;(function(t){t.Clinical="CLINICAL",t.Device="DEVICE",t.Insurance="INSURANCE",t.Lab="LAB",t.Pharmacy="PHARMACY",t.Practitioner="PRACTITIONER"})($3||($3={}));var Zb;(function(t){t.Connecthub="connecthub",t.Nppes="nppes"})(Zb||(Zb={}));var x3;(function(t){t.Connecthub="CONNECTHUB",t.Nppes="NPPES"})(x3||(x3={}));var F3;(function(t){t.Fri="FRI",t.Mon="MON",t.Sat="SAT",t.Sun="SUN",t.Thu="THU",t.Tue="TUE",t.Wed="WED"})(F3||(F3={}));var G3;(function(t){t.Deleted="DELETED"})(G3||(G3={}));var k3;(function(t){t.Kilometers="KILOMETERS",t.Meters="METERS",t.Miles="MILES"})(k3||(k3={}));var V3;(function(t){t.BwellPatient="BWELL_PATIENT",t.BwellPerson="BWELL_PERSON",t.ClientPatient="CLIENT_PATIENT",t.ClientPerson="CLIENT_PERSON"})(V3||(V3={}));var B3;(function(t){t.Active="active",t.EnteredInError="entered_in_error",t.Error="error",t.Off="off",t.Suspended="suspended",t.Test="test"})(B3||(B3={}));var j3;(function(t){t.Active="ACTIVE",t.EnteredInError="ENTERED_IN_ERROR",t.Error="ERROR",t.Off="OFF",t.Suspended="SUSPENDED",t.Test="TEST"})(j3||(j3={}));var n$;(function(t){t.CustomEvent="CUSTOM_EVENT",t.MobilePushOpen="MOBILE_PUSH_OPEN"})(n$||(n$={}));var i$;(function(t){t.Female="female",t.Male="male",t.Other="other",t.Unknown="unknown"})(i$||(i$={}));var s$;(function(t){t.Person="Person"})(s$||(s$={}));var a$;(function(t){t.Characteristic="characteristic",t.Communication="communication",t.Gender="gender",t.Specialty="specialty"})(a$||(a$={}));var H3;(function(t){t.Characteristic="CHARACTERISTIC",t.Communication="COMMUNICATION",t.Gender="GENDER",t.InsurancePlan="INSURANCE_PLAN",t.Specialty="SPECIALTY"})(H3||(H3={}));var q3;(function(t){t.Female="female",t.Male="male",t.Other="other",t.Unknown="unknown"})(q3||(q3={}));var Q3;(function(t){t.Female="FEMALE",t.Male="MALE",t.Other="OTHER",t.Unknown="UNKNOWN"})(Q3||(Q3={}));var Y3;(function(t){t.AllergyIntolerance="ALLERGY_INTOLERANCE",t.CarePlan="CARE_PLAN",t.Condition="CONDITION",t.Encounter="ENCOUNTER",t.Immunization="IMMUNIZATION",t.Labs="LABS",t.Medications="MEDICATIONS",t.Procedure="PROCEDURE",t.VitalSigns="VITAL_SIGNS"})(Y3||(Y3={}));var W3;(function(t){t.Official="_official",t.Old="_old",t.Secondary="_secondary",t.Temp="_temp",t.Usual="_usual"})(W3||(W3={}));var z3;(function(t){t.Cognito="COGNITO",t.Descope="DESCOPE"})(z3||(z3={}));var K3;(function(t){t.Direct="DIRECT",t.DirectIas="DIRECT_IAS",t.Ial2="IAL2",t.IndirectIas="INDIRECT_IAS",t.Proa="PROA"})(K3||(K3={}));var J3;(function(t){t.Clicked="clicked"})(J3||(J3={}));var X3;(function(t){t.Clicked="CLICKED"})(X3||(X3={}));var o$;(function(t){t.Debug="DEBUG",t.Error="ERROR",t.Info="INFO",t.Verbose="VERBOSE",t.Warn="WARN"})(o$||(o$={}));var Z3;(function(t){t.Sms="SMS"})(Z3||(Z3={}));var u$;(function(t){t.Activity="ACTIVITY",t.Exam="EXAM",t.Imaging="IMAGING",t.Laboratory="LABORATORY",t.Procedure="PROCEDURE",t.SocialHistory="SOCIAL_HISTORY",t.Survey="SURVEY",t.Therapy="THERAPY",t.VitalSigns="VITAL_SIGNS"})(u$||(u$={}));var e4;(function(t){t.CancelDelete="CANCEL_DELETE",t.ConfirmDelete="CONFIRM_DELETE",t.DeletionInProgress="DELETION_IN_PROGRESS",t.ImmediateExecution="IMMEDIATE_EXECUTION",t.RequestDelete="REQUEST_DELETE"})(e4||(e4={}));var c$;(function(t){t.C19Vaccine="C19Vaccine",t.Device="Device",t.Insurance="Insurance",t.Laboratory="Laboratory",t.Pharmacy="Pharmacy",t.Provider="Provider",t.Bus="bus",t.Cg="cg",t.Crs="crs",t.Dept="dept",t.Edu="edu",t.Govt="govt",t.Ins="ins",t.Other="other",t.Pay="pay",t.Prov="prov",t.Reli="reli",t.Team="team"})(c$||(c$={}));var t4;(function(t){t.Bus="BUS",t.C19Vaccine="C19VACCINE",t.Cg="CG",t.Crs="CRS",t.Dept="DEPT",t.Device="DEVICE",t.Edu="EDU",t.Govt="GOVT",t.Ins="INS",t.Insurance="INSURANCE",t.Laboratory="LABORATORY",t.Other="OTHER",t.Pay="PAY",t.Pharmacy="PHARMACY",t.Prov="PROV",t.Provider="PROVIDER",t.Reli="RELI",t.Team="TEAM"})(t4||(t4={}));var r4;(function(t){t.Add="add",t.Copy="copy",t.Move="move",t.Remove="remove",t.Replace="replace",t.Test="test"})(r4||(r4={}));var n4;(function(t){t.ExistingPatients="EXISTING_PATIENTS",t.NewPatients="NEW_PATIENTS"})(n4||(n4={}));var i4;(function(t){t.Patient="Patient",t.Person="Person"})(i4||(i4={}));var s4;(function(t){t.Practice="practice",t.Practitioner="practitioner"})(s4||(s4={}));var a4;(function(t){t.Practice="PRACTICE",t.Practitioner="PRACTITIONER"})(a4||(a4={}));var o4;(function(t){t.QuestionnaireResponse="QuestionnaireResponse"})(o4||(o4={}));var u4;(function(t){t.Closed="CLOSED",t.Hold="HOLD",t.New="NEW",t.Open="OPEN",t.Pending="PENDING",t.Solved="SOLVED"})(u4||(u4={}));var c4;(function(t){t.AllergyIntolerance="ALLERGY_INTOLERANCE",t.CarePlan="CARE_PLAN",t.Condition="CONDITION",t.DocumentReference="DOCUMENT_REFERENCE",t.Encounter="ENCOUNTER",t.Immunization="IMMUNIZATION",t.MedicationDispense="MEDICATION_DISPENSE",t.MedicationRequest="MEDICATION_REQUEST",t.MedicationStatement="MEDICATION_STATEMENT",t.Observation="OBSERVATION",t.Procedure="PROCEDURE"})(c4||(c4={}));var l4;(function(t){t.DataConnections="DATA_CONNECTIONS",t.FindCare="FIND_CARE"})(l4||(l4={}));var d4;(function(t){t.Device="DEVICE",t.Insurance="INSURANCE",t.Laboratory="LABORATORY",t.Pharmacy="PHARMACY",t.Practice="PRACTICE",t.Practitioner="PRACTITIONER"})(d4||(d4={}));var f4;(function(t){t.Abortion="ABORTION",t.AbuseNeglect="ABUSE_NEGLECT",t.DomesticViolence="DOMESTIC_VIOLENCE",t.GenderAffirming="GENDER_AFFIRMING",t.GeneticTesting="GENETIC_TESTING",t.HivAids="HIV_AIDS",t.Mammography="MAMMOGRAPHY",t.MentalHealth="MENTAL_HEALTH",t.ReproductiveHealthcare="REPRODUCTIVE_HEALTHCARE",t.SexualAssault="SEXUAL_ASSAULT",t.Std="STD",t.SubstanceAbuse="SUBSTANCE_ABUSE",t.SubstanceAlcohol="SUBSTANCE_ALCOHOL"})(f4||(f4={}));var _4;(function(t){t.UpdatedAt="UPDATED_AT"})(_4||(_4={}));var l$;(function(t){t.Content="content",t.Distance="distance",t.Relevance="relevance"})(l$||(l$={}));var h4;(function(t){t.Content="CONTENT",t.DataSourceRank="DATA_SOURCE_RANK",t.Distance="DISTANCE",t.Name="NAME",t.NextAvailable="NEXT_AVAILABLE",t.OnlineBookingAvailable="ONLINE_BOOKING_AVAILABLE",t.Rating="RATING",t.Relevance="RELEVANCE"})(h4||(h4={}));var eR;(function(t){t.Asc="asc",t.Desc="desc"})(eR||(eR={}));var p4;(function(t){t.Asc="ASC",t.Desc="DESC"})(p4||(p4={}));var m4;(function(t){t.CareSearch="CARE_SEARCH",t.Proa="PROA",t.ProviderDetails="PROVIDER_DETAILS",t.Sayt="SAYT",t.Unspecified="UNSPECIFIED"})(m4||(m4={}));var S4;(function(t){t.DataDeleted="DATA_DELETED",t.Deleting="DELETING",t.Error="ERROR",t.Pending="PENDING",t.Retrieved="RETRIEVED",t.Retrieving="RETRIEVING"})(S4||(S4={}));var d$;(function(t){t.Accepted="ACCEPTED",t.Cancelled="CANCELLED",t.Completed="COMPLETED",t.Draft="DRAFT",t.EnteredInError="ENTERED_IN_ERROR",t.Failed="FAILED",t.InProgress="IN_PROGRESS",t.OnHold="ON_HOLD",t.Ready="READY",t.Received="RECEIVED",t.Rejected="REJECTED",t.Requested="REQUESTED"})(d$||(d$={}));var tR;(function(t){t.Accurate="accurate",t.Estimate="estimate"})(tR||(tR={}));var g4;(function(t){t.Active="ACTIVE",t.Completed="COMPLETED"})(g4||(g4={}));var v4;(function(t){t.PersonMatchError="PERSON_MATCH_ERROR",t.ServerError="SERVER_ERROR"})(v4||(v4={}));const SEe=new Set(Object.values(i$));function E4(t){return SEe.has(t)}const gEe=new Set(Object.values(r$));function vEe(t){return gEe.has(t)}const EEe=new Set(Object.values(Xb));function y4(t){return EEe.has(t)}const yEe=new Set(Object.values(t$));function TEe(t){return yEe.has(t)}class AEe{validate(e,r){!Oa(e.gender)&&!E4(e.gender)&&r.add(`Invalid gender value: "${e.gender}"`),!Oa(e.middleNames)&&e.middleNames.length>0&&Oa(e.firstName)&&r.add("middleNames requires firstName to be provided")}}class Fqe extends Qn{constructor(){super(...arguments),this.validator=new AEe}}class CEe{validate(e,r){y4(e.category)||r.add(`Invalid consent category code: "${e.category}"`),!Oa(e.organizationId)&&Js(e.organizationId)&&r.add("organizationId cannot be empty")}}class Gqe extends Qn{constructor(){super(...arguments),this.validator=new CEe}}class bEe{validate(e,r){vEe(e.status)||r.add(`Invalid consent status: "${e.status}"`),TEe(e.provision)||r.add(`Invalid consent provision type: "${e.provision}"`),y4(e.category)||r.add(`Invalid consent category code: "${e.category}"`),!Oa(e.organizationId)&&Js(e.organizationId)&&r.add("organizationId cannot be empty"),e.category===Xb.ProaAttestation&&Oa(e.organizationId)&&r.add("organizationId must be provided when category is PROA_ATTESTATION")}}class kqe extends Qn{constructor(){super(...arguments),this.validator=new bEe}}class REe{validate(e,r){la(e.exportId)&&r.add("exportId is required"),la(e.password)&&r.add("password is required")}}class Vqe extends Qn{constructor(){super(...arguments),this.validator=new REe}}var Bqe;class jqe extends null{}var du=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},mo,Kd,T4,A4,C4,b4,R4,O4;class W_{constructor(){mo.add(this)}validate(e,r){if(!e.values||e.values.length===0){r.add("At least one SearchDateValue must be set to instantiate a SearchDate");return}for(const n of e.values)du(this,mo,"m",T4).call(this,n,r)}}mo=new WeakSet,Kd=function(e,r){e&&e!==null&&isNaN(e.getTime())&&r.add("The date is not valid")},T4=function(e,r){const{equals:n,notEquals:i,greaterThan:s,greaterThanOrEqualTo:a,lessThan:o,lessThanOrEqualTo:c,approximately:l}=e,p=[n,i,s,a,o,c,l].filter(A=>A!=null).length;if(p===0){r.add("At least one SearchDateValue must be set to instantiate a SearchDate");return}du(this,mo,"m",A4).call(this,e,p,r),du(this,mo,"m",R4).call(this,e,r),du(this,mo,"m",O4).call(this,e,r)},A4=function(e,r,n){const{equals:i,notEquals:s,approximately:a}=e;if(i&&r>1){n.add("The equals value cannot be set with any other values");return}if(s&&r>1){n.add("The notEquals value cannot be set with any other values");return}if(a&&r>1){n.add("The approximately value cannot be set with any other values");return}du(this,mo,"m",C4).call(this,e,n),du(this,mo,"m",b4).call(this,e,n)},C4=function(e,r){e.greaterThan&&e.greaterThanOrEqualTo&&r.add("The greaterThan/greaterThanOrEqualTo value cannot be set with both values")},b4=function(e,r){e.lessThan&&e.lessThanOrEqualTo&&r.add("The lessThan/lessThanOrEqualTo value cannot be set with both values")},R4=function(e,r){const{equals:n,notEquals:i,greaterThan:s,greaterThanOrEqualTo:a,lessThan:o,lessThanOrEqualTo:c,approximately:l}=e;n&&du(this,mo,"m",Kd).call(this,n,r),i&&du(this,mo,"m",Kd).call(this,i,r),s&&du(this,mo,"m",Kd).call(this,s,r),a&&du(this,mo,"m",Kd).call(this,a,r),o&&du(this,mo,"m",Kd).call(this,o,r),c&&du(this,mo,"m",Kd).call(this,c,r),l&&du(this,mo,"m",Kd).call(this,l,r)},O4=function(e,r){const{greaterThan:n,greaterThanOrEqualTo:i,lessThan:s,lessThanOrEqualTo:a}=e;n&&a&&n>=a&&r.add("The greaterThan value must be less than the lessThanOrEqualTo value"),i&&s&&i>=s&&r.add("The greaterThanOrEqualTo value must be less than the lessThan value"),n&&s&&n>=s&&r.add("The greaterThan value must be less than the lessThan value"),i&&a&&i>=a&&r.add("The greaterThanOrEqualTo value must be less than the lessThanOrEqualTo value")};var f$=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Qv;class z_{constructor(){Qv.set(this,new OEe)}validate(e,r){var n;if(e.value===void 0&&e.values===void 0&&e.notEquals===void 0){r.add("Either SearchToken value or values or notEquals must be provided");return}if(e.value!==void 0&&f$(this,Qv,"f").validate(e.value,r),e.values!==void 0&&e.values.length===0){r.add("At least one Coding must be set to instantiate a SearchToken");return}for(const i of(n=e.values)!==null&&n!==void 0?n:[])f$(this,Qv,"f").validate(i,r);if(e.notEquals!==void 0){if(e.notEquals.values!==void 0){if(e.notEquals.values.length===0){r.add("If notEquals values are provided, at least one Coding must be set");return}for(const i of e.notEquals.values)f$(this,Qv,"f").validate(i,r)}e.notEquals.code===void 0&&e.notEquals.value===void 0&&e.notEquals.system===void 0&&e.notEquals.values===void 0&&r.add("NotEquals must have at least one non-null property (code, value, system, or values)")}}}Qv=new WeakMap;class OEe{validate(e,r){!e.system&&!e.code&&r.add("Each Coding in the list must have at least one non-null and non-empty value for system or code")}}var Hqe,rm=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},_$,h$,p$,m$,S$,g$;class P4 extends ua{constructor(){super(...arguments),_$.set(this,new z_),h$.set(this,new W_)}validate(e,r){super.validate(e,r),e.groupCode&&rm(this,_$,"f").validate(e.groupCode,r),e.lastUpdated&&rm(this,h$,"f").validate(e.lastUpdated,r)}}_$=new WeakMap,h$=new WeakMap;class PEe{validate(e,r){e.length===0&&r.add("Prescription array must not be empty.")}}class M4 extends ua{constructor(){super(...arguments),p$.set(this,new PEe),m$.set(this,new W_)}validate(e,r){super.validate(e,r),e.lastUpdated!==void 0&&rm(this,m$,"f").validate(e.lastUpdated,r),e.prescription!==void 0&&rm(this,p$,"f").validate(e.prescription,r)}}p$=new WeakMap,m$=new WeakMap;class MEe extends ua{validate(e,r){var n;super.validate(e,r),!((n=e?.ids)===null||n===void 0)&&n.length||r.add("ids must not be empty")}}class IEe extends ca{constructor(){super(...arguments),this.validator=new P4}}class qqe extends null{}class Qqe extends null{}class Yqe extends null{}class Wqe extends null{}class zqe extends null{}class Kqe extends null{}class Jqe extends null{}class Xqe extends null{}class Zqe extends null{}class eQe extends null{}class tQe extends null{}class rQe extends null{}class nQe extends null{}class iQe extends null{}class sQe extends null{}class aQe extends null{}class oQe extends null{}class uQe extends null{}class cQe extends null{}class lQe extends null{}class NEe extends M4{constructor(){super(...arguments),S$.set(this,new z_)}validate(e,r){super.validate(e,r),e.medicationCode!==void 0&&rm(this,S$,"f").validate(e.medicationCode,r)}}S$=new WeakMap;class dQe extends ca{constructor(){super(...arguments),this.validator=new M4}}class fQe extends ca{constructor(){super(...arguments),this.validator=new NEe}}class DEe extends P4{constructor(){super(...arguments),g$.set(this,new z_)}validate(e,r){super.validate(e,r),e.medicationCode!==void 0&&rm(this,g$,"f").validate(e.medicationCode,r)}}g$=new WeakMap;class _Qe extends IEe{constructor(){super(...arguments),this.validator=new DEe}}class hQe extends null{}class pQe extends null{}class mQe extends ca{constructor(){super(...arguments),this.validator=new MEe}}class LEe{validate(e,r){Js(e.medicationStatementId)&&r.add("The medication pricing request must possess a medication statement id.")}}class SQe extends Qn{constructor(){super(...arguments),this.validator=new LEe}}class wEe{validate(e,r){Js(e.bodySystemId)&&r.add("The body system score request must contain a body system id.")}}class gQe extends Qn{constructor(){super(...arguments),this.validator=new wEe}}class UEe extends ua{validate(e,r){Js(e.medicationStatementId)&&r.add("The medication knowledge request must possess a medication statement id."),super.validate(e,r)}}class vQe extends ca{constructor(){super(...arguments),this.validator=new UEe}}class $Ee extends ua{validate(e,r){Js(e.labId)&&r.add("The lab knowledge request must contain a lab id."),super.validate(e,r)}}class EQe extends ca{constructor(){super(...arguments),this.validator=new $Ee}}var I4;(function(t){t.Active="ACTIVE",t.Completed="COMPLETED"})(I4||(I4={}));class xEe{validate(e,r){Ra(e)&&r.add("input must be provided."),la(e.id)&&r.add("id must be a non-empty string."),Ra(e.status)&&r.add("status is required.")}}class yQe extends Qn{constructor(){super(...arguments),this.validator=new xEe}}const FEe=new Set(Object.values(d$));function N4(t){return FEe.has(t)}var GEe=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},v$,D4;class kEe extends ua{constructor(){super(...arguments),v$.add(this)}validate(e,r){if(super.validate(e,r),!Oa(e.status)){const n=Array.isArray(e.status)?e.status:[e.status];for(const i of n)GEe(this,v$,"m",D4).call(this,i,r)}}}v$=new WeakSet,D4=function(e,r){N4(e)||r.add(`Invalid task status: "${e}"`)};class TQe extends ca{constructor(){super(...arguments),this.validator=new kEe}}class VEe{validate(e,r){N4(e.newStatus)||r.add(`Invalid task status: "${e.newStatus}"`)}}class AQe extends Qn{constructor(){super(...arguments),this.validator=new VEe}}var rR=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},nm,L4,w4,U4,$4;class CQe extends ca{constructor(){super(...arguments),this.validator=new BEe}}class BEe extends ua{constructor(){super(...arguments),nm.add(this)}validate(e,r){super.validate(e,r),Jn(e.organizationTypeFilters)&&rR(this,nm,"m",L4).call(this,e.organizationTypeFilters,r),Jn(e.sortBy)&&rR(this,nm,"m",w4).call(this,e.sortBy,r),Jn(e.filterFields)&&rR(this,nm,"m",U4).call(this,e.filterFields,r),Jn(e.gender)&&rR(this,nm,"m",$4).call(this,e.gender,r)}}nm=new WeakSet,L4=function(e,r){for(const n of e)HEe(n)||r.add(`Invalid organizationTypeFilters value: "${n}"`)},w4=function(e,r){Jn(e.field)&&!QEe(e.field)&&r.add(`Invalid sortBy.field value: "${e.field}"`),Jn(e.order)&&!WEe(e.order)&&r.add(`Invalid sortBy.order value: "${e.order}"`)},U4=function(e,r){for(const n of e)KEe(n)||r.add(`Invalid filterField value: "${n}"`)},$4=function(e,r){E4(e)||r.add(`Invalid gender value: "${e}"`)};const jEe=new Set(Object.values(c$));function HEe(t){return jEe.has(t)}const qEe=new Set(Object.values(l$));function QEe(t){return qEe.has(t)}const YEe=new Set(Object.values(eR));function WEe(t){return YEe.has(t)}const zEe=new Set(Object.values(a$));function KEe(t){return zEe.has(t)}var bQe;class RQe extends null{}class OQe extends ca{constructor(){super(...arguments),this.validator=new JEe}}class JEe extends ua{validate(e,r){super.validate(e,r)}}const XEe="data-connection-status";var ZEe=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},E$;const eye="connectionId cannot be null or empty",tye="username cannot be null or empty",rye="password cannot be null or empty",nye="integrationType array cannot be empty",iye="integrationType array cannot contain blank or empty strings",sye="status array cannot be empty",aye="status array cannot contain blank or empty strings";class x4{validate(e,r){e.connectionId===""&&r.add(eye)}}class oye{constructor(){E$.set(this,new x4)}validate(e,r){ZEe(this,E$,"f").validate(e,r),e.integrationType!=="DIRECT"&&(la(e.username)&&r.add(tye),la(e.password)&&r.add(rye))}}E$=new WeakMap;class uye extends Qn{constructor(){super(...arguments),this.validator=new x4}}class PQe extends null{}class MQe extends null{}class IQe extends uye{constructor(){super(...arguments),this.validator=new oye}transformInput(e){var r,n,i;return{connectionId:e.connectionId,username:(r=e.username)!==null&&r!==void 0?r:null,password:(n=e.password)!==null&&n!==void 0?n:null,integrationType:(i=e.integrationType)!==null&&i!==void 0?i:null}}}class NQe extends Qn{constructor(){super(...arguments),this.validator={validate:(e,r)=>{e.integrationType!==void 0&&e.integrationType!==null&&(e.integrationType.length===0&&r.add(nye),e.integrationType.some(n=>n===""||n.trim()==="")&&r.add(iye)),e.status!==void 0&&e.status!==null&&(e.status.length===0&&r.add(sye),e.status.some(n=>n===""||n.trim()==="")&&r.add(aye))}}}data(){return this.input()}}const cye="deviceToken is required",lye="platformName must be a valid DevicePlatform value",dye="applicationName is required",fye="connectionId is required";var y$;(function(t){t.IOS="IOS",t.ANDROID="ANDROID"})(y$||(y$={}));const _ye=new Set(Object.values(y$));function hye(t){return _ye.has(t)}function pye(t){return!hye(t)}class F4{validate(e,r){Js(e.deviceToken)&&r.add(cye)}}class mye extends F4{validate(e,r){super.validate(e,r),pye(e.platformName.toUpperCase())&&r.add(lye),Js(e.applicationName)&&r.add(dye)}}class DQe extends Qn{constructor(){super(...arguments),this.validator=new mye}}class LQe extends Qn{constructor(){super(...arguments),this.validator=new F4}}class T${validate(e,r){Js(e.connectionId)&&r.add(fye)}}class wQe extends Qn{constructor(){super(...arguments),this.validator=new T$}}class UQe extends Qn{constructor(){super(...arguments),this.validator=new T$}}class $Qe extends Qn{constructor(){super(...arguments),this.validator=new T$}}const Sye="string parameter serializedNotification must be provided",gye="serialized notification must have a non-empty notification_id field of type string",G4="serialized notification must have an itbl object containing a non-empty messageId field of type string",vye="parsed notification must be a non-null object.",Eye="serialized notification is not valid JSON.";class yye{validate(e,r){if(Oa(e.serializedNotification)||typeof e.serializedNotification!="string"||Js(e.serializedNotification)){r.add(Sye);return}let n=null;try{n=JSON.parse(e.serializedNotification)}catch{r.add(Eye);return}if(typeof n!="object"||n===null){r.add(vye);return}const{itbl:i,notification_id:s}=n;if((Oa(s)||typeof s!="string"||Js(s))&&r.add(gye),typeof i!="object"||Ra(i)){r.add(G4);return}(Oa(i.messageId)||typeof i.messageId!="string"||Js(i.messageId))&&r.add(G4)}}class xQe extends Qn{constructor(){super(...arguments),this.validator=new yye}}var A$=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Yv;class Tye extends ua{constructor(){super(...arguments),Yv.set(this,new W_)}validate(e,r){(Oa(e.coverage)||Js(e.coverage))&&r.add("The claim summary request must contain a coverage ID."),Jn(e.dateReceived)&&A$(this,Yv,"f").validate(e.dateReceived,r),Jn(e.servicePeriod)&&A$(this,Yv,"f").validate(e.servicePeriod,r),Jn(e.dateProcessed)&&A$(this,Yv,"f").validate(e.dateProcessed,r),super.validate(e,r)}}Yv=new WeakMap;class FQe extends ca{constructor(){super(...arguments),this.validator=new Tye}}const Aye="SearchReference value should be a non-empty string";class k4{validate(e,r){Ra(e.value)||(typeof e.value!="string"||Js(e.value))&&r.add(Aye)}}const Cye="SearchStringValue should be a non-empty string";class Wv{validate(e,r){if(Ra(e.values))return;let n=!1;for(const i of e.values)Js(i)&&(n=!0);n&&r.add(Cye)}}var nR=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},C$,b$,iR;class bye extends ua{constructor(){super(...arguments),C$.set(this,new Wv),b$.set(this,new W_),iR.set(this,new k4)}validate(e,r){super.validate(e,r),Jn(e.id)&&nR(this,C$,"f").validate(e.id,r),Jn(e.lastUpdated)&&nR(this,b$,"f").validate(e.lastUpdated,r),Jn(e.beneficiary)&&nR(this,iR,"f").validate(e.beneficiary,r),Jn(e.patient)&&nR(this,iR,"f").validate(e.patient,r)}}C$=new WeakMap,b$=new WeakMap,iR=new WeakMap;class GQe extends ca{constructor(){super(...arguments),this.validator=new bye}}class Rye extends ua{validate(e,r){super.validate(e,r)}}class kQe extends ca{constructor(){super(...arguments),this.validator=new Rye}}class Oye{validate(e,r){(Oa(e.claimId)||Js(e.claimId))&&r.add("The EOB document request must contain a claimId.")}}class VQe extends Qn{constructor(){super(...arguments),this.validator=new Oye}}var K_=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},R$,sR,zv,O$;class Pye extends ua{constructor(){super(...arguments),R$.set(this,new Wv),sR.set(this,new W_),zv.set(this,new k4),O$.set(this,new z_)}validate(e,r){super.validate(e,r),Jn(e.id)&&K_(this,R$,"f").validate(e.id,r),Jn(e.lastUpdated)&&K_(this,sR,"f").validate(e.lastUpdated,r),Jn(e.created)&&K_(this,sR,"f").validate(e.created,r),Jn(e.patient)&&K_(this,zv,"f").validate(e.patient,r),Jn(e.provider)&&K_(this,zv,"f").validate(e.provider,r),Jn(e.coverage)&&K_(this,zv,"f").validate(e.coverage,r),Jn(e.status)&&K_(this,O$,"f").validate(e.status,r)}}R$=new WeakMap,sR=new WeakMap,zv=new WeakMap,O$=new WeakMap;class BQe extends ca{constructor(){super(...arguments),this.validator=new Pye}}var P$=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},M$,I$,N$;class Mye{constructor(){M$.set(this,new W_),I$.set(this,new Wv),N$.set(this,new z_)}validate(e,r){var n;An(e._source)&&P$(this,I$,"f").validate(e._source,r),An(e.date)&&P$(this,M$,"f").validate(e.date,r),An(e._count)&&e._count<0&&r.add("Value of count cannot be less than 0"),An(e._getpagesoffset)&&e._getpagesoffset<0&&r.add("Value of getpagesoffset cannot be less than 0"),An((n=e.supporting_info)===null||n===void 0?void 0:n.value)&&Js(e.supporting_info.value)&&r.add("Supporting Information must have a non-empty value."),An(e.status)&&P$(this,N$,"f").validate(e.status,r)}}M$=new WeakMap,I$=new WeakMap,N$=new WeakMap;class jQe extends Qn{constructor(){super(...arguments),this.validator=new Mye}}class Iye{validate(e,r){if(!Ra(e.cancelationReason)){if(Ra(e.cancelationReason.coding)||e.cancelationReason.coding.length===0){r.add("cancelationReason must have at least one coding");return}for(const n of e.cancelationReason.coding)(Ra(n?.code)||Ra(n?.system))&&r.add("cancelationReason.coding must have a code and a system")}}}class HQe extends Qn{constructor(){super(...arguments),this.validator=new Iye}}class Nye{validate(e,r){if(Ra(e.notificationPreferences)||e.notificationPreferences.length===0){r.add("notificationPreferences is required and must not be empty");return}e.notificationPreferences.forEach((n,i)=>{Ra(n.method)&&r.add(`notificationPreferences[${i}].method is required`),Ra(n.enabled)&&r.add(`notificationPreferences[${i}].enabled is required`)})}}class qQe extends Qn{constructor(){super(...arguments),this.validator=new Nye}}class Dye{validate(e,r){var n;la((n=e.organization.value)===null||n===void 0?void 0:n.trim())&&r.add("Organization reference is required and must have a non-empty value.")}}class QQe extends Qn{constructor(){super(...arguments),this.validator=new Dye}}class aR{validate(e,r,n={}){const{requireRole:i=!0}=n;An(e.id)?Js(e.id)?r.add("Member id cannot be empty"):e.id.length>255&&r.add("Member id cannot exceed 255 characters"):r.add("Member id is required"),An(e.type)?Js(e.type)&&r.add("Member type cannot be empty"):r.add("Member type is required");const s=An(e.role);if(i&&!s&&r.add("Member role is required"),s&&e.role)for(let a=0;a<e.role.length;a++){const o=e.role[a];An(o)?Js(o)&&r.add(`Role ${a}: Cannot be blank`):r.add(`Role ${a}: Cannot be null or undefined`)}}}class YQe extends Qn{constructor(){super(...arguments),this.validator=new aR}}class Lye{constructor(){this.updateValidator=new aR}validate(e,r){this.updateValidator.validate(e,r,{requireRole:!1})}}class WQe extends Qn{constructor(){super(...arguments),this.validator=new Lye}}class wye{constructor(){this.updateValidator=new aR}validate(e,r){this.updateValidator.validate(e,r,{requireRole:!0})}}class zQe extends Qn{constructor(){super(...arguments),this.validator=new wye}}class Uye{constructor(){this.updateValidator=new aR}validate(e,r){if(!An(e.members)){r.add("Members array is required");return}if(e.members.length===0){r.add("Members array cannot be empty");return}for(let n=0;n<e.members.length;n++){const i=e.members[n];if(!An(i)){r.add(`Member ${n}: Cannot be null or undefined`);continue}const s=new _3;this.updateValidator.validate(i,s,{requireRole:!0});for(const a of s.errors())r.add(`Member ${n}: ${a}`)}}}class KQe extends Qn{constructor(){super(...arguments),this.validator=new Uye}}class $ye extends ua{validate(e,r){super.validate(e,r)}}class xye extends ca{constructor(){super(...arguments),this.validator=new $ye}}class Fye{validate(e,r){const n=e.questionnaireResponse;if(Ra(n)){r.add("questionnaireResponse is required");return}if((la(n.resourceType)||n.resourceType!=="QuestionnaireResponse")&&r.add('questionnaireResponse.resourceType must be "QuestionnaireResponse"'),la(n.status)&&r.add("questionnaireResponse.status is required"),la(n.questionnaire)&&r.add("questionnaireResponse.questionnaire is required"),Ra(n.contained)||n.contained.length===0)r.add("questionnaireResponse.contained must have at least one item");else{let i=null;for(const s of n.contained){if(Ra(s)){r.add("questionnaireResponse.contained item cannot be null or undefined");break}if(s.resourceType==="Questionnaire"){i=s;break}}if(Ra(i)){r.add("questionnaireResponse.contained must contain a Questionnaire resource");return}la(i.id)&&r.add("questionnaireResponse.contained Questionnaire resource must have an id")}}}class JQe extends Qn{constructor(){super(...arguments),this.validator=new Fye}}class Gye{validate(e,r){const n=e.questionnaireResponse;if(Ra(n)){r.add("questionnaireResponse is required");return}(la(n.resourceType)||n.resourceType!=="QuestionnaireResponse")&&r.add('questionnaireResponse.resourceType must be "QuestionnaireResponse"'),la(n.status)&&r.add("questionnaireResponse.status is required"),la(n.questionnaire)&&r.add("questionnaireResponse.questionnaire is required")}}class XQe extends Qn{constructor(){super(...arguments),this.validator=new Gye}}var oR=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},D$,L$,uR;class kye extends ua{constructor(){super(...arguments),D$.set(this,new W_),L$.set(this,new Wv),uR.set(this,new z_)}validate(e,r){super.validate(e,r),An(e.id)&&oR(this,L$,"f").validate(e.id,r),An(e.lastUpdated)&&oR(this,D$,"f").validate(e.lastUpdated,r),An(e.status)&&oR(this,uR,"f").validate(e.status,r),An(e.tag)&&oR(this,uR,"f").validate(e.tag,r)}}D$=new WeakMap,L$=new WeakMap,uR=new WeakMap;class ZQe extends ca{constructor(){super(...arguments),this.validator=new kye}}var Kv=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},w$,im;class Vye extends ua{constructor(){super(...arguments),w$.set(this,new Wv),im.set(this,new z_)}validate(e,r){super.validate(e,r),An(e.id)&&Kv(this,w$,"f").validate(e.id,r),An(e.tag)&&Kv(this,im,"f").validate(e.tag,r),An(e.security)&&Kv(this,im,"f").validate(e.security,r),An(e.context)&&Kv(this,im,"f").validate(e.context,r),An(e.identifier)&&Kv(this,im,"f").validate(e.identifier,r)}}w$=new WeakMap,im=new WeakMap;class eYe extends ca{constructor(){super(...arguments),this.validator=new Vye}}class Bye extends ua{validate(e,r){super.validate(e,r)}}class tYe extends ca{constructor(){super(...arguments),this.validator=new Bye}}class jye{constructor(){this.dataURIRegex=/^data:[a-zA-Z0-9]+\/[a-zA-Z0-9-.+]+;base64,([A-Za-z0-9+/]*={0,2})$/}validate(e,r){e.file.trim()||r.add("File content is required"),e.file.trim()&&!this.dataURIRegex.test(e.file)&&r.add("File must be a valid data URI with base64 encoding (e.g., data:image/png;base64,...)"),e.fileName.trim()||r.add("File name is required")}}class rYe extends Qn{constructor(){super(...arguments),this.validator=new jye}}class Hye{validate(e,r){e.attachmentId.trim()||r.add("Attachment ID is required")}}class nYe extends Qn{constructor(){super(...arguments),this.validator=new Hye}}class qye{validate(e,r){e.subject.trim()||r.add("Subject is required"),e.comment.body.trim()||r.add("Comment body is required"),e.fields.category.trim()||r.add("Category is required")}}class iYe extends Qn{constructor(){super(...arguments),this.validator=new qye}}class Qye extends ua{validate(e,r){super.validate(e,r)}}class sYe extends ca{constructor(){super(...arguments),this.validator=new Qye}}class Yye extends ua{validate(e,r){e.requestId<0&&r.add("requestId must be a non-negative number"),super.validate(e,r)}}class aYe extends ca{constructor(){super(...arguments),this.validator=new Yye}}class Wye{validate(e,r){e.requestId<0&&r.add("Request ID must be a non-negative integer"),la(e.body.trim())&&r.add("Comment body is required")}}class oYe extends Qn{constructor(){super(...arguments),this.validator=new Wye}}class zye{validate(e,r){la(e.attachmentId.trim())&&r.add("attachmentId must be a non-empty string"),e.requestId<0&&r.add("requestId must be a non-negative number")}}class uYe extends Qn{constructor(){super(...arguments),this.validator=new zye}}const Kye="code cannot be null or empty";class Jye{validate(e,r){la(e.code)&&r.add(Kye)}}class cYe extends Qn{constructor(){super(...arguments),this.validator=new Jye}}const Xye="consentId cannot be null or empty";class Zye{validate(e,r){la(e.consentId)&&r.add(Xye)}}class eTe extends Qn{constructor(){super(...arguments),this.validator=new Zye}}var U$=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(d){try{l(n.next(d))}catch(p){a(p)}}function c(d){try{l(n.throw(d))}catch(p){a(p)}}function l(d){d.done?s(d.value):i(d.value).then(o,c)}l((n=n.apply(t,e||[])).next())})};class $${constructor(e=new Map){this.storage=e}get(e){return U$(this,void 0,void 0,function*(){return this.storage.get(e)})}set(e,r){return U$(this,void 0,void 0,function*(){this.storage.set(e,r)})}delete(e){return U$(this,void 0,void 0,function*(){return this.storage.delete(e)})}}const tTe={logLevel:o$.Error,timeout:3e4,retryPolicy:{attempts:3,interval:1e3},telemetryEnabled:!1,tokenStorage:new $$,language:null,overrides:{unauthedApiUrl:null,authedApiUrl:null}};var xl;(function(t){t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.TRACE=1]="TRACE",t[t.TRACE2=2]="TRACE2",t[t.TRACE3=3]="TRACE3",t[t.TRACE4=4]="TRACE4",t[t.DEBUG=5]="DEBUG",t[t.DEBUG2=6]="DEBUG2",t[t.DEBUG3=7]="DEBUG3",t[t.DEBUG4=8]="DEBUG4",t[t.INFO=9]="INFO",t[t.INFO2=10]="INFO2",t[t.INFO3=11]="INFO3",t[t.INFO4=12]="INFO4",t[t.WARN=13]="WARN",t[t.WARN2=14]="WARN2",t[t.WARN3=15]="WARN3",t[t.WARN4=16]="WARN4",t[t.ERROR=17]="ERROR",t[t.ERROR2=18]="ERROR2",t[t.ERROR3=19]="ERROR3",t[t.ERROR4=20]="ERROR4",t[t.FATAL=21]="FATAL",t[t.FATAL2=22]="FATAL2",t[t.FATAL3=23]="FATAL3",t[t.FATAL4=24]="FATAL4"})(xl||(xl={}));var rTe=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},V4=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Jv,In;(function(t){t[t.VERBOSE=0]="VERBOSE",t[t.DEBUG=1]="DEBUG",t[t.INFO=2]="INFO",t[t.WARN=3]="WARN",t[t.ERROR=4]="ERROR",t[t.FATAL=5]="FATAL"})(In||(In={}));const nTe={[In.VERBOSE]:"VERBOSE",[In.DEBUG]:"DEBUG",[In.INFO]:"INFO",[In.WARN]:"WARN",[In.ERROR]:"ERROR",[In.FATAL]:"FATAL"};class sm{constructor(e){Jv.set(this,void 0),rTe(this,Jv,e,"f")}get severity(){return V4(this,Jv,"f")}shouldLog(e){return e>=V4(this,Jv,"f")}static severityText(e){return nTe[e]}static severityFromText(e){switch(e){case"VERBOSE":return In.VERBOSE;case"DEBUG":return In.DEBUG;case"INFO":return In.INFO;case"WARN":return In.WARN;case"ERROR":return In.ERROR;case"FATAL":return In.FATAL;default:throw new Error(`Invalid severity text: ${e}`)}}}Jv=new WeakMap;var x$=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},el=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Jd,B4,cR,Xv,lR,J_;class j4{constructor(e,r,n){Jd.add(this),cR.set(this,void 0),Xv.set(this,void 0),lR.set(this,void 0),x$(this,cR,n,"f"),x$(this,Xv,new sm(e),"f"),x$(this,lR,r,"f")}name(){return el(this,cR,"f")}severity(){return el(this,Xv,"f").severity}verbose(e,r){el(this,Jd,"m",J_).call(this,In.VERBOSE,e,r)}debug(e,r){el(this,Jd,"m",J_).call(this,In.DEBUG,e,r)}info(e,r){el(this,Jd,"m",J_).call(this,In.INFO,e,r)}warn(e,r){el(this,Jd,"m",J_).call(this,In.WARN,e,r)}error(e,r){let n;r instanceof fr&&(n={error:r.failure()?r.error().message:r.data()}),r instanceof Error&&(n={error:r.message}),n===void 0&&(n=r),el(this,Jd,"m",J_).call(this,In.ERROR,e,n)}fatal(e,r){el(this,Jd,"m",J_).call(this,In.FATAL,e,r)}static otelSeverityNumber(e){switch(e){case In.VERBOSE:return xl.TRACE;case In.DEBUG:return xl.DEBUG;case In.INFO:return xl.INFO;case In.WARN:return xl.WARN;case In.ERROR:return xl.ERROR;case In.FATAL:return xl.FATAL;default:return xl.UNSPECIFIED}}}B4=j4,cR=new WeakMap,Xv=new WeakMap,lR=new WeakMap,Jd=new WeakSet,J_=function(e,r,n){!el(this,Xv,"f").shouldLog(e)||el(this,lR,"f").emit({timestamp:Date.now(),severityNumber:B4.otelSeverityNumber(e),severityText:sm.severityText(e),body:r,attributes:n??{}})};var H4=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},q4=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},dR,fR;class iTe{constructor(e,r){dR.set(this,void 0),fR.set(this,void 0),H4(this,fR,e,"f"),H4(this,dR,r.loggerProvider(),"f")}getLogger(e){const r=e??"default",n=q4(this,dR,"f").getLogger(r);return new j4(q4(this,fR,"f"),n,r)}}dR=new WeakMap,fR=new WeakMap;class sTe{format(e,r,n,i){let a=`[${new Date().toISOString()}] ${sm.severityText(e)}`;return n!==void 0&&(a+=` (${n})`),a+=`: ${r}`,i===void 0?[a]:[a,i]}}var F$=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Xs=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},tl,rl,Fl;class aTe{constructor(e,r){tl.set(this,void 0),rl.set(this,void 0),Fl.set(this,void 0),F$(this,rl,new sm(e),"f"),F$(this,tl,r,"f"),F$(this,Fl,new sTe,"f")}name(){return Xs(this,tl,"f")}severity(){return Xs(this,rl,"f").severity}verbose(e,r){Xs(this,rl,"f").shouldLog(In.VERBOSE)&&console.debug(...Xs(this,Fl,"f").format(In.VERBOSE,e,Xs(this,tl,"f"),r))}debug(e,r){Xs(this,rl,"f").shouldLog(In.DEBUG)&&console.debug(...Xs(this,Fl,"f").format(In.DEBUG,e,Xs(this,tl,"f"),r))}info(e,r){Xs(this,rl,"f").shouldLog(In.INFO)&&console.info(...Xs(this,Fl,"f").format(In.INFO,e,Xs(this,tl,"f"),r))}warn(e,r){Xs(this,rl,"f").shouldLog(In.WARN)&&console.warn(...Xs(this,Fl,"f").format(In.WARN,e,Xs(this,tl,"f"),r))}error(e,r){let n=r;r instanceof fr&&(n=r.failure()?r.error():r.data()),Xs(this,rl,"f").shouldLog(In.ERROR)&&console.error(...Xs(this,Fl,"f").format(In.ERROR,e,Xs(this,tl,"f"),n))}fatal(e,r){Xs(this,rl,"f").shouldLog(In.FATAL)&&console.error(...Xs(this,Fl,"f").format(In.FATAL,e,Xs(this,tl,"f"),r))}}tl=new WeakMap,rl=new WeakMap,Fl=new WeakMap;var oTe=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},uTe=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},_R;class Zs{constructor(e=In.FATAL){_R.set(this,void 0),oTe(this,_R,e,"f")}getLogger(e){return new aTe(uTe(this,_R,"f"),e)}}_R=new WeakMap;var cTe=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},G$,Q4;class lTe{constructor(){G$.add(this)}createLogProvider(e,r){switch(cTe(this,G$,"m",Q4).call(this,e)){case"otel":if(r===void 0)throw new Error('telemetry is required for "otel" logging');return new iTe(e.logLevel,r);case"console":return new Zs(e.logLevel)}}}G$=new WeakSet,Q4=function(e){return e.telemetry.enabled?"otel":"console"};var Wi=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Gl=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Uu,am,Xd,om,Zd,X_,Y4,W4,z4,K4,J4,X4,Z4,e6,t6,r6;class hR{constructor(e){Uu.add(this),am.set(this,void 0),Xd.set(this,void 0),om.set(this,void 0),Zd.set(this,void 0),X_.set(this,void 0),this.bwellConfig=Wi(this,Uu,"m",J4).call(this,e),Gl(this,am,sm.severityFromText(this.bwellConfig.logLevel),"f"),Gl(this,X_,Wi(this,Uu,"m",r6).call(this),"f"),Gl(this,om,Wi(this,Uu,"m",Z4).call(this),"f"),Gl(this,Xd,Wi(this,Uu,"m",e6).call(this),"f"),Gl(this,Zd,Wi(this,Uu,"m",t6).call(this),"f")}static initialize(e){try{const r=new hR(e);return fr.success(r)}catch(r){if(xa.isBwellError(r))return fr.failure(r);throw r}}get logLevel(){return Wi(this,am,"f")}get graphQL(){return Wi(this,om,"f")}get telemetry(){return Wi(this,Xd,"f")}get http(){return Wi(this,Zd,"f")}get context(){return Wi(this,X_,"f")}setContextUser(e){Wi(this,X_,"f").user=e}mergeRemoteConfig(e){Gl(this,am,Wi(this,Uu,"m",Y4).call(this,e),"f"),Gl(this,om,Wi(this,Uu,"m",W4).call(this,e),"f"),Gl(this,Xd,Object.freeze(Wi(this,Uu,"m",z4).call(this,e)),"f"),Gl(this,Zd,Object.freeze(Wi(this,Uu,"m",K4).call(this,e)),"f")}}am=new WeakMap,Xd=new WeakMap,om=new WeakMap,Zd=new WeakMap,X_=new WeakMap,Uu=new WeakSet,Y4=function(e){var r;const n=(r=e?.logLevel)!==null&&r!==void 0?r:null;return n===null?Wi(this,am,"f"):sm.severityFromText(n)},W4=function(e){var r;const n=(r=e?.graphQLClient)!==null&&r!==void 0?r:null;if(n===null)return Wi(this,om,"f");const{authedApiUrl:i,unauthedApiUrl:s}=this.bwellConfig.overrides;return{unauthApiUrl:s??n.url,apiUrl:i??n.authUrl}},z4=function(e){var r,n;const i=(r=e?.telemetry)!==null&&r!==void 0?r:null;if(i===null)return Wi(this,Xd,"f");const s=(n=i.enabled)!==null&&n!==void 0?n:Wi(this,Xd,"f").enabled;if(i.collectorUrl.endsWith("/"))throw new Error('Telemetry config "collectorUrl" cannot end with a trailing slash.');let a;try{a=new URL(i.collectorUrl)}catch{throw new Error('Telemetry config "collectorUrl" malformed/is not a proper URL.')}if(a.pathname!=="/")throw new Error('Telemetry config "collectorUrl" cannot contain a path.');return Object.assign(Object.assign({},Wi(this,Xd,"f")),{enabled:s,collectorUrl:i.collectorUrl})},K4=function(e){var r,n,i;const s=(r=e?.httpClient)!==null&&r!==void 0?r:null;return s===null?Wi(this,Zd,"f"):{timeout:(n=s.requestTimeout)!==null&&n!==void 0?n:Wi(this,Zd,"f").timeout,retryPolicy:(i=s.retry)!==null&&i!==void 0?i:Wi(this,Zd,"f").retryPolicy}},J4=function(e){return Object.assign(Object.assign({},tTe),e)},X4=function(){try{return dEe(this.bwellConfig.clientKey)}catch{throw new rEe("It appears there is a problem with your Client Key. Contact b.well support for further assistance.")}},Z4=function(){var e,r;return{apiUrl:(e=this.bwellConfig.overrides.authedApiUrl)!==null&&e!==void 0?e:`https://api-gateway.${Wi(this,X_,"f").env}.icanbwell.com/federated-graph-authed/graphql`,unauthApiUrl:(r=this.bwellConfig.overrides.unauthedApiUrl)!==null&&r!==void 0?r:`https://api-gateway.${Wi(this,X_,"f").env}.icanbwell.com/federated-graph/graphql`}},e6=function(){return{collectorUrl:"https://collector.services.icanbwell.com",enabled:this.bwellConfig.telemetryEnabled,timeout:this.bwellConfig.timeout}},t6=function(){return{timeout:this.bwellConfig.timeout,retryPolicy:{attempts:this.bwellConfig.retryPolicy.attempts,interval:this.bwellConfig.retryPolicy.interval}}},r6=function(){return{clientKey:this.bwellConfig.clientKey,env:Wi(this,Uu,"m",X4).call(this),user:null}};var dTe=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(d){try{l(n.next(d))}catch(p){a(p)}}function c(d){try{l(n.throw(d))}catch(p){a(p)}}function l(d){d.done?s(d.value):i(d.value).then(o,c)}l((n=n.apply(t,e||[])).next())})},n6=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},pR=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},um,mR;class fTe{constructor(e,r=new Zs){um.set(this,void 0),mR.set(this,void 0),n6(this,mR,e,"f"),n6(this,um,r.getLogger("ConfigManager"),"f")}initialize(e){return dTe(this,void 0,void 0,function*(){const r=hR.initialize(e);if(r.failure())return r;const n=r.data();pR(this,um,"f").verbose("Initializing SDK Configuration");const i=yield pR(this,mR,"f").initialize(n.context.clientKey);if(i.failure())return i.intoFailure();const s=i.data();try{n.mergeRemoteConfig(s)}catch(a){pR(this,um,"f").error("Error merging SDK config with remote config.",a)}return pR(this,um,"f").info("Remote SDK Configuration merged with user config"),fr.success(n)})}}um=new WeakMap,mR=new WeakMap;class ef extends Error{response;request;constructor(e,r){const n=`${ef.extractMessage(e)}: ${JSON.stringify({response:e,request:r})}`;super(n),Object.setPrototypeOf(this,ef.prototype),this.response=e,this.request=r,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,ef)}static extractMessage(e){return e.errors?.[0]?.message??`GraphQL Error (Code: ${String(e.status)})`}}const i6=t=>t.toUpperCase(),k$=t=>typeof t=="function"?t():t,s6=(t,e)=>t.map((r,n)=>[r,e[n]]),cm=t=>{let e={};return t instanceof Headers?e=_Te(t):Array.isArray(t)?t.forEach(([r,n])=>{r&&n!==void 0&&(e[r]=n)}):t&&(e=t),e},_Te=t=>{const e={};return t.forEach((r,n)=>{e[n]=r}),e},hTe=t=>{try{const e=t();return pTe(e)?e.catch(r=>a6(r)):e}catch(e){return a6(e)}},a6=t=>t instanceof Error?t:new Error(String(t)),pTe=t=>typeof t=="object"&&t!==null&&"then"in t&&typeof t.then=="function"&&"catch"in t&&typeof t.catch=="function"&&"finally"in t&&typeof t.finally=="function",V$=t=>{throw new Error(`Unhandled case: ${String(t)}`)},SR=t=>typeof t=="object"&&t!==null&&!Array.isArray(t),lYe=t=>Object.entries(t),dYe=t=>Object.values(t),fYe=(t,e)=>Object.fromEntries(Object.entries(t).map(([r,n])=>[r,e(n,r)])),_Ye=t=>t.charAt(0).toLowerCase()+t.slice(1);function hYe(t){if(!Array.isArray(t))throw new Error(`Expected array. Got: ${String(t)}`)}function pYe(t){if(t===null||typeof t!="object")throw new Error(`Expected object. Got: ${String(t)}`)}const mYe=t=>t.charAt(0).toUpperCase()+t.slice(1),SYe=t=>{let e=!1,r,n;return{promise:new Promise((s,a)=>{r=s,n=a}),isResolved:()=>e,resolve:s=>{if(e=!0,t?.strict&&e)throw new Error(`Deferred is already resolved. Attempted to resolve with: ${JSON.stringify(s)}`);r(s)},reject:s=>n(s)}},mTe=(...t)=>{process.env.DEBUG&&console.log(...t)},gYe=(...t)=>(...e)=>{mTe(...t,...e)},vYe=t=>{const e=[],r=[];for(const n of t)n instanceof Error?e.push(n):r.push(n);return[r,e]};var STe;const EYe=async(...t)=>{const e=gTe(t);return new STe(e.url).batchRequests(e)},gTe=t=>t.length===1?t[0]:{url:t[0],documents:t[1],requestHeaders:t[2],signal:void 0},vTe=(t,e)=>t.documents?t:{documents:t,requestHeaders:e,signal:void 0};var ETe;const yYe=async(...t)=>{const[e,r,...n]=t,i=yTe(e,r,...n);return new ETe(i.url).rawRequest({...i})},yTe=(t,e,...r)=>{const[n,i]=r;return typeof t=="string"?{url:t,query:e,variables:n,requestHeaders:i,signal:void 0}:t},TTe=(t,e,r)=>t.query?t:{query:t,variables:e,requestHeaders:r,signal:void 0};var ATe=v(2455);const TYe="Accept",B$="Content-Type",j$="application/json",o6="application/graphql-response+json",AYe=null,u6=t=>t.replace(/([\s,]|#[^\n\r]+)+/g," ").trim(),CTe=t=>{const e=t.toLowerCase();return e.includes(o6)||e.includes(j$)},c6=t=>{try{if(Array.isArray(t))return{_tag:"Batch",executionResults:t.map(l6)};if(SR(t))return{_tag:"Single",executionResult:l6(t)};throw new Error(`Invalid execution result: result is not object or array.
13601
13601
  Got:
13602
13602
  ${String(t)}`)}catch(e){return e}},l6=t=>{if(typeof t!="object"||t===null)throw new Error("Invalid execution result: result is not object");let e,r,n;if("errors"in t){if(!SR(t.errors)&&!Array.isArray(t.errors))throw new Error("Invalid execution result: errors is not plain object OR array");e=t.errors}if("data"in t){if(!SR(t.data)&&t.data!==null)throw new Error("Invalid execution result: data is not plain object");r=t.data}if("extensions"in t){if(!SR(t.extensions))throw new Error("Invalid execution result: extensions is not plain object");n=t.extensions}return{data:r,errors:e,extensions:n}},bTe=t=>t._tag==="Batch"?t.executionResults.some(d6):d6(t.executionResult),d6=t=>Array.isArray(t.errors)?t.errors.length>0:Boolean(t.errors),f6=t=>typeof t=="object"&&t!==null&&"kind"in t&&t.kind===ATe.b.OPERATION_DEFINITION;var RTe=v(5157),OTe=v(2704);const PTe=t=>{let e;const r=t.definitions.filter(f6);return r.length===1&&(e=r[0].name?.value),e},MTe=t=>{let e=!1;const r=t.definitions.filter(f6);return r.length===1&&(e=r[0].operation==="mutation"),e},H$=(t,e)=>{const r=typeof t=="string"||"kind"in t?t:String(t),n=typeof r=="string"?r:(0,OTe.y)(r);let i=!1,s;if(e)return{expression:n,isMutation:i,operationName:s};const a=hTe(()=>typeof r=="string"?(0,RTe.qg)(r):r);return a instanceof Error?{expression:n,isMutation:i,operationName:s}:(s=PTe(a),i=MTe(a),{expression:n,operationName:s,isMutation:i})},q$=JSON,Q$=async t=>{const e={...t,method:t.request._tag==="Single"?t.request.document.isMutation?"POST":i6(t.method??"post"):t.request.hasMutations?"POST":i6(t.method??"post"),fetchOptions:{...t.fetchOptions,errorPolicy:t.fetchOptions.errorPolicy??"none"}},n=await NTe(e.method)(e),i=await n.text();let s;try{s=ITe(i,n.headers.get(B$),t.fetchOptions.jsonSerializer??q$)}catch(o){s=o}const a={status:n.status,headers:n.headers,body:i};if(!n.ok){if(s instanceof Error)return new ef({...a},{query:t.request._tag==="Single"?t.request.document.expression:t.request.query,variables:t.request.variables});const o=s._tag==="Batch"?{...s.executionResults,...a}:{...s.executionResult,...a};return new ef(o,{query:t.request._tag==="Single"?t.request.document.expression:t.request.query,variables:t.request.variables})}if(s instanceof Error)throw s;if(bTe(s)&&e.fetchOptions.errorPolicy==="none"){const o=s._tag==="Batch"?{...s.executionResults,...a}:{...s.executionResult,...a};return new ef(o,{query:t.request._tag==="Single"?t.request.document.expression:t.request.query,variables:t.request.variables})}switch(s._tag){case"Single":return{...a,..._6(e)(s.executionResult)};case"Batch":return{...a,data:s.executionResults.map(_6(e))};default:V$(s)}},_6=t=>e=>({extensions:e.extensions,data:e.data,errors:t.fetchOptions.errorPolicy==="all"?e.errors:void 0}),ITe=(t,e,r)=>e&&CTe(e)?c6(r.parse(t)):c6(t),NTe=t=>async e=>{const r=new Headers(e.headers);let n=null,i;r.has("Accept")||r.set("Accept",[o6,j$].join(", ")),t==="POST"?(i=(e.fetchOptions.jsonSerializer??q$).stringify(DTe(e)),typeof i=="string"&&!r.has(B$)&&r.set(B$,j$)):n=LTe(e);const s={method:t,headers:r,body:i,...e.fetchOptions};let a=new URL(e.url),o=s;if(e.middleware){const l=await Promise.resolve(e.middleware({...s,url:e.url,operationName:e.request._tag==="Single"?e.request.document.operationName:void 0,variables:e.request.variables})),{url:d,...p}=l;a=new URL(d),o=p}return n&&n.forEach((l,d)=>{a.searchParams.append(d,l)}),await(e.fetch??fetch)(a,o)},DTe=t=>{switch(t.request._tag){case"Single":return{query:t.request.document.expression,variables:t.request.variables,operationName:t.request.document.operationName};case"Batch":return s6(t.request.query,t.request.variables??[]).map(([e,r])=>({query:e,variables:r}));default:throw V$(t.request)}},LTe=t=>{const e=t.fetchOptions.jsonSerializer??q$,r=new URLSearchParams;switch(t.request._tag){case"Single":return r.append("query",u6(t.request.document.expression)),t.request.variables&&r.append("variables",e.stringify(t.request.variables)),t.request.document.operationName&&r.append("operationName",t.request.document.operationName),r;case"Batch":{const n=t.request.variables?.map(a=>e.stringify(a))??[],i=t.request.query.map(u6),s=s6(i,n).map(([a,o])=>({query:a,variables:o}));return r.append("query",e.stringify(s)),r}default:throw V$(t.request)}};class wTe{url;requestConfig;constructor(e,r={}){this.url=e,this.requestConfig=r}rawRequest=async(...e)=>{const[r,n,i]=e,s=TTe(r,n,i),{headers:a,fetch:o=globalThis.fetch,method:c="POST",requestMiddleware:l,responseMiddleware:d,excludeOperationName:p,...A}=this.requestConfig,{url:F}=this;s.signal!==void 0&&(A.signal=s.signal);const k=H$(s.query,p),H=await Q$({url:F,request:{_tag:"Single",document:k,variables:s.variables},headers:{...cm(k$(a)),...cm(s.requestHeaders)},fetch:o,method:c,fetchOptions:A,middleware:l});if(d&&await d(H,{operationName:k.operationName,variables:n,url:this.url}),H instanceof Error)throw H;return H};async request(e,...r){const[n,i]=r,s=$Te(e,n,i),{headers:a,fetch:o=globalThis.fetch,method:c="POST",requestMiddleware:l,responseMiddleware:d,excludeOperationName:p,...A}=this.requestConfig,{url:F}=this;s.signal!==void 0&&(A.signal=s.signal);const k=H$(s.document,p),H=await Q$({url:F,request:{_tag:"Single",document:k,variables:s.variables},headers:{...cm(k$(a)),...cm(s.requestHeaders)},fetch:o,method:c,fetchOptions:A,middleware:l});if(d&&await d(H,{operationName:k.operationName,variables:s.variables,url:this.url}),H instanceof Error)throw H;return H.data}async batchRequests(e,r){const n=vTe(e,r),{headers:i,excludeOperationName:s,...a}=this.requestConfig;n.signal!==void 0&&(a.signal=n.signal);const o=n.documents.map(({document:A})=>H$(A,s)),c=o.map(({expression:A})=>A),l=o.some(({isMutation:A})=>A),d=n.documents.map(({variables:A})=>A),p=await Q$({url:this.url,request:{_tag:"Batch",operationName:void 0,query:c,hasMutations:l,variables:d},headers:{...cm(k$(i)),...cm(n.requestHeaders)},fetch:this.requestConfig.fetch??globalThis.fetch,method:this.requestConfig.method||"POST",fetchOptions:a,middleware:this.requestConfig.requestMiddleware});if(this.requestConfig.responseMiddleware&&await this.requestConfig.responseMiddleware(p,{operationName:void 0,variables:d,url:this.url}),p instanceof Error)throw p;return p.data}setHeaders(e){return this.requestConfig.headers=e,this}setHeader(e,r){const{headers:n}=this.requestConfig;return n?n[e]=r:this.requestConfig.headers={[e]:r},this}setEndpoint(e){return this.url=e,this}}var UTe;async function CYe(t,e,...r){const n=xTe(t,e,...r);return new UTe(n.url).request({...n})}const $Te=(t,e,r)=>t.document?t:{document:t,variables:e,requestHeaders:r,signal:void 0},xTe=(t,e,...r)=>{const[n,i]=r;return typeof t=="string"?{url:t,document:e,variables:n,requestHeaders:i,signal:void 0}:t};var bYe;const RYe=null,ea=`
13603
13603
  fragment CodingFields on Coding {
@@ -15866,6 +15866,25 @@ ${FTe}`,EAe=`
15866
15866
  language
15867
15867
  }
15868
15868
  }
15869
+ priorAuthorizations {
15870
+ id
15871
+ authNumber
15872
+ memberFocus {
15873
+ name
15874
+ }
15875
+ status
15876
+ careSetting
15877
+ authStartDate
15878
+ authEndDate
15879
+ requestingProvider
15880
+ servicingProvider
15881
+ services {
15882
+ serviceCode
15883
+ serviceDescription
15884
+ approvedDate
15885
+ lineStatus
15886
+ }
15887
+ }
15869
15888
  }
15870
15889
  paging_info {
15871
15890
  page_number