@icanbwell/composite 1.1161.0 → 1.1161.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +1 -1
- package/native.js +1 -1
- package/package.json +3 -3
package/index.js
CHANGED
|
@@ -866,7 +866,7 @@ https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_liter
|
|
|
866
866
|
<div class="wrapper">
|
|
867
867
|
<bwell-error-component />
|
|
868
868
|
</div>
|
|
869
|
-
`}}customElements.get(ve)===void 0&&customElements.define(ve,Ee);const De=[{name:"loader",defaultElement:document.createElement(ne)},{name:"error",defaultElement:document.createElement(ve)}],Se=["error","loading"],Ie={error:"error",loading:"loader"},xe=({src:Ot,elementNameSuffix:Dt,version:Qt,prefetchFeatureApp:zt})=>(0,p.__awaiter)(void 0,void 0,void 0,function*(){var Ke,We,Ct,Qe,Ye,It,mn,Sn,et,Rt,kt,qn,Sr,pn,Ln;window.bwell||(window.bwell=new ue({metadata:{version:Qt}}));const mr=`bwell-${Dt}`;if(customElements.get(mr)!==void 0)return;class Bn extends h{constructor(){super(),Ke.add(this),We.set(this,(0,z.nanoid)()),Ct.set(this,void 0),Qe.set(this,document.createElement("feature-app-loader")),Ye.set(this,new q.EventEmitter),It.set(this,void 0),mn.set(this,void 0),Sn.set(this,void 0),et.set(this,void 0),Rt.set(this,void 0),kt.set(this,void 0),this.attachShadow({mode:"open"});const Qr=new pe(De).attachToShadowRoot(this.shadowRoot);Qr.addEventListener("visibilitychange",({visibility:Nt,container:_e,name:ot})=>{ot==="error"&&Nt==="visible"&&window.bwell._registerEmbeddableContent(_e),(0,p.__classPrivateFieldGet)(this,Qe,"f").style.display=Nt==="hidden"?"unset":"hidden"}),(0,p.__classPrivateFieldSet)(this,kt,{slots:Qr,attributes:new V().bindTo(this),loaderEventEmitter:(0,p.__classPrivateFieldGet)(this,Ye,"f")},"f"),(0,p.__classPrivateFieldSet)(this,It,(0,p.__classPrivateFieldGet)(this,Ke,"m",qn).bind(this),"f"),(0,p.__classPrivateFieldSet)(this,mn,(0,p.__classPrivateFieldGet)(this,Ke,"m",Sr).bind(this),"f"),(0,p.__classPrivateFieldSet)(this,Sn,(0,p.__classPrivateFieldGet)(this,Ke,"m",Ln).call(this,"error"),"f"),(0,p.__classPrivateFieldSet)(this,et,(0,p.__classPrivateFieldGet)(this,Ke,"m",Ln).call(this,"loading"),"f")}connectedCallback(){return(0,p.__awaiter)(this,void 0,void 0,function*(){(0,p.__classPrivateFieldGet)(this,Sn,"f").call(this,(0,p.__classPrivateFieldGet)(this,kt,"f").attributes.get("error")),(0,p.__classPrivateFieldGet)(this,et,"f").call(this,(0,p.__classPrivateFieldGet)(this,kt,"f").attributes.get("loading")),(0,p.__classPrivateFieldGet)(this,kt,"f").slots.addEventListener("visibilitychange",(0,p.__classPrivateFieldGet)(this,mn,"f")),(0,p.__classPrivateFieldGet)(this,kt,"f").attributes.addChangeListener("error",(0,p.__classPrivateFieldGet)(this,Sn,"f")),(0,p.__classPrivateFieldGet)(this,kt,"f").attributes.addChangeListener("loading",(0,p.__classPrivateFieldGet)(this,et,"f")),(0,p.__classPrivateFieldGet)(this,kt,"f").slots.showSlot("loader");try{yield window.bwell.validateLoad()}catch{(0,p.__classPrivateFieldGet)(this,kt,"f").slots.showSlot("error")}(0,p.__classPrivateFieldSet)(this,We,this.id||(0,p.__classPrivateFieldGet)(this,We,"f"),"f"),(0,p.__classPrivateFieldSet)(this,Ct,new T((0,p.__classPrivateFieldGet)(this,We,"f")),"f"),(0,p.__classPrivateFieldGet)(this,Ct,"f").registerDispatcher(Qr=>this.dispatchEvent(Qr)),window.bwell.isInitialized?(0,p.__classPrivateFieldGet)(this,It,"f").call(this):(window.bwell.once("initialized",(0,p.__classPrivateFieldGet)(this,It,"f")),window.bwell.once("error",()=>{(0,p.__classPrivateFieldGet)(this,kt,"f").slots.showSlot("error")}),zt&&(0,b.h)(Ot).catch(()=>{(0,p.__classPrivateFieldGet)(this,kt,"f").slots.showSlot("error")}))})}disconnectedCallback(){var Qr;(0,p.__classPrivateFieldGet)(this,Ye,"f").emit("disconnect"),(0,p.__classPrivateFieldGet)(this,kt,"f").slots.removeEventListener("visibilitychange",(0,p.__classPrivateFieldGet)(this,mn,"f")),(0,p.__classPrivateFieldGet)(this,kt,"f").attributes.removeChangeListener("error",(0,p.__classPrivateFieldGet)(this,Sn,"f")),(0,p.__classPrivateFieldGet)(this,kt,"f").attributes.removeChangeListener("loading",(0,p.__classPrivateFieldGet)(this,et,"f")),(Qr=(0,p.__classPrivateFieldGet)(this,Ct,"f"))===null||Qr===void 0||Qr.deregister(),(0,p.__classPrivateFieldGet)(this,Ye,"f").removeAllListeners()}}We=new WeakMap,Ct=new WeakMap,Qe=new WeakMap,Ye=new WeakMap,It=new WeakMap,mn=new WeakMap,Sn=new WeakMap,et=new WeakMap,Rt=new WeakMap,kt=new WeakMap,Ke=new WeakSet,qn=function(){(0,p.__classPrivateFieldGet)(this,Qe,"f").setAttribute("featureAppId",`bwell-embeddable:${mr}`),(0,p.__classPrivateFieldGet)(this,Qe,"f").setAttribute("src",Ot),(0,p.__classPrivateFieldGet)(this,Qe,"f").config={id:(0,p.__classPrivateFieldGet)(this,We,"f"),name:Dt,elementName:mr,utils:(0,p.__classPrivateFieldGet)(this,kt,"f")},this.shadowRoot.appendChild((0,p.__classPrivateFieldGet)(this,Qe,"f"))},Sr=function({visibility:Qr,name:Nt}){(0,p.__classPrivateFieldGet)(this,Qe,"f").style.display=Qr==="hidden"?"unset":"hidden"},pn=function(Qr){(0,p.__classPrivateFieldGet)(this,Rt,"f")(),(0,p.__classPrivateFieldSet)(this,Rt,void 0,"f")},Ln=function(Qr){return Nt=>{const _e=Se.findIndex(Je=>Je===Qr);if(!Se.slice(0,_e).some(Je=>(0,p.__classPrivateFieldGet)(this,kt,"f").attributes.get(Je)!==null)){if(Nt!==null)(0,p.__classPrivateFieldGet)(this,Rt,"f")&&(0,p.__classPrivateFieldGet)(this,Ke,"m",pn).call(this,Qr),(0,p.__classPrivateFieldSet)(this,Rt,(0,p.__classPrivateFieldGet)(this,kt,"f").slots.showSlotLocked(Ie[Qr]),"f");else if(Nt===null&&(0,p.__classPrivateFieldGet)(this,Rt,"f")){(0,p.__classPrivateFieldGet)(this,Ke,"m",pn).call(this,Qr);const Je=Se.find(tt=>(0,p.__classPrivateFieldGet)(this,kt,"f").attributes.get(tt)!==null);Je&&(0,p.__classPrivateFieldSet)(this,Rt,(0,p.__classPrivateFieldGet)(this,kt,"f").slots.showSlotLocked(Ie[Je]),"f")}}}},customElements.define(mr,Bn)}),Fe={rE:"1.1161.0"},it="composite";var gt=e(67321);xe({src:`https://embeddables.prod.icanbwell.com/${it}/${Fe.rE}/scripts/embeddable.federated.js`,elementNameSuffix:it,version:Fe.rE,prefetchFeatureApp:!0})},79566:(Y,l,e)=>{"use strict";var n=e(31085),t=e(94043),r=e(45250),s=e(35473),o=e(25624),i=Object.defineProperty,a=Object.defineProperties,g=Object.getOwnPropertyDescriptors,c=Object.getOwnPropertySymbols,u=Object.prototype.hasOwnProperty,C=Object.prototype.propertyIsEnumerable,A=(b,h,f)=>h in b?i(b,h,{enumerable:!0,configurable:!0,writable:!0,value:f}):b[h]=f,m=(b,h)=>{for(var f in h||(h={}))u.call(h,f)&&A(b,f,h[f]);if(c)for(var f of c(h))C.call(h,f)&&A(b,f,h[f]);return b},d=(b,h)=>a(b,g(h));const O=(b,h,f)=>{const v=_.cloneDeep(b);if(!v.contained||h<0)return v;const M=v.contained.findIndex(x=>x.resourceType==="Questionnaire");if(M!==-1&&!f){const x=v.contained[M];if(x.item){if(!x.item.some(y=>isPageExtensionPresent(y)))return v;let z=0,S=x.item.length;for(let y=0;y<x.item.length;y++){const E=x.item[y];if(isPageExtensionPresent(E)){if(z===h+1){S=y;break}z++}}x.item=x.item.slice(0,S),v.contained[M]=x}}else f&&M!==-1&&(v.contained[M]=d(m({},v.contained[M]),{item:f}));return v},p=({formId:b,questionnaireResponse:h,showQuestionPrefix:f,nextQuestion:v,onGoBack:M,handleHiddenQuestion:x,errorConfig:T,onClearError:z,customErrorConfigurations:S,showStepper:y,hideBackButton:E,onFormDataChange:R,externalComponentRenderMap:P,className:L,children:D})=>{var N,w,V;const{currentGroupIndex:q,hasCustomError:I}=useFHIRQuestionnaire(),k=(N=h.questionnaire)==null?void 0:N.replace("#",""),U=(w=h?.contained)==null?void 0:w.find(K=>K.id===k&&K.resourceType==="Questionnaire"),F=(K,G,ae)=>{let oe=_.cloneDeep(h);oe.item=K,oe=trimQuestionnaireItems(oe,q,ae),v(oe,G)};return jsx("div",{className:cx(`${I?"mb-3":"mb-8"} flex w-full flex-col gap-8`,L),children:jsx(FHIRQuestionnaire,{formId:b,onFormDataChange:R,questionnaireResponseItem:(V=h?.item)!=null?V:[],questionnaireSchema:U,status:h.status,showQuestionPrefix:f,errorConfig:T,customErrorConfigurations:S,isAdaptiveFlow:!0,onComplete:F,onGoBack:M,onClearError:z,handleHiddenQuestion:x,showStepper:y,hideBackButton:E,externalComponentRenderMap:P,children:D})})}},19622:(Y,l,e)=>{"use strict";e.d(l,{K:()=>v});var n=e(31085),t=e(14041),r=e(94043),s=e(76323),o=e(36087),i=e(56192),a=e(76808),g=e(66267),c=Object.defineProperty,u=Object.defineProperties,C=Object.getOwnPropertyDescriptors,A=Object.getOwnPropertySymbols,m=Object.prototype.hasOwnProperty,d=Object.prototype.propertyIsEnumerable,O=(M,x,T)=>x in M?c(M,x,{enumerable:!0,configurable:!0,writable:!0,value:T}):M[x]=T,p=(M,x)=>{for(var T in x||(x={}))m.call(x,T)&&O(M,T,x[T]);if(A)for(var T of A(x))d.call(x,T)&&O(M,T,x[T]);return M},b=(M,x)=>u(M,C(x)),h=(M,x,T)=>new Promise((z,S)=>{var y=P=>{try{R(T.next(P))}catch(L){S(L)}},E=P=>{try{R(T.throw(P))}catch(L){S(L)}},R=P=>P.done?z(P.value):Promise.resolve(P.value).then(y,E);R((T=T.apply(M,x)).next())});const f=10,v=({id:M="location-filter-desktop",initialValue:x,onInputChange:T,onValueChange:z,isDisabled:S=!1,className:y="",setIsLoading:E,errorText:R})=>{const P=(0,a.Ul)(),{i18n:{t:L},loading:D}=(0,g.E_)({keys:["shared-translations"]}),N=x?.placeId,w=x?.description,[V,q]=(0,t.useState)(""),[I,k]=(0,t.useState)(""),[U,F]=(0,t.useState)(null),[K,G]=(0,t.useState)(null),[ae,oe]=(0,t.useState)(!1),te=(0,t.useRef)(!1),pe=[{id:"placeholder",label:"No Locations",isDisabled:!0}],[be,ze]=(0,t.useState)(pe),[ge,re]=(0,t.useState)(pe),[se,{loading:me,error:he}]=(0,i.Ncb)({fetchPolicy:"cache-first",onError:()=>{P?.error("Failed to fetch geocode data")}}),[de,{loading:ue,error:ne}]=(0,i.qtq)({fetchPolicy:"cache-first",onError:()=>{P?.error("Failed to fetch geocode by lat/lon data")}}),[J,{loading:ve,error:Ee}]=(0,i.zUC)({fetchPolicy:"cache-first",onError:()=>{P?.error("Failed to fetch place autocomplete data"),ze(pe)},onCompleted:Qt=>{var zt,Ke;const We=(Ke=(zt=Qt.placeAutocomplete)==null?void 0:zt.predictions)==null?void 0:Ke.map(Ct=>{var Qe;return{id:Ct.placeId,label:(0,s.removeAfterLastComma)(Ct.description),mainText:Ct?.mainText||((Qe=Ct.description.split(",")[0])==null?void 0:Qe.trim()),secondaryText:(0,s.removeAfterLastComma)(Ct?.secondaryText||Ct.description.split(",").slice(1).join(",").trim())}});ze(We?.length?We:pe)}}),De=(0,t.useMemo)(()=>be.map(Qt=>b(p({},Qt),{displayLabel:(0,r.RZ)(Qt?.label||"",V)})),[V,be]),Se=Qt=>h(void 0,null,function*(){var zt,Ke,We,Ct,Qe,Ye,It,mn,Sn,et,Rt,kt,qn,Sr,pn,Ln;if(F(Qt),G(Qt),oe(!1),Qt&&typeof Qt=="string"){const mr=be.find(tt=>tt.id===Qt),Bn=mr?.label||V;if(!mr)return;q(Bn),k(Bn),setTimeout(()=>{const tt=[{id:mr.id,label:mr.label}];ze(tt),re(tt)},f);const Xr=yield se({variables:{placeId:Qt}}),Qr=(Ke=(zt=Xr?.data)==null?void 0:zt.geocodingByPlaceId)==null?void 0:Ke.latitude,Nt=(Ct=(We=Xr?.data)==null?void 0:We.geocodingByPlaceId)==null?void 0:Ct.longitude,_e=((Ye=(Qe=Xr?.data)==null?void 0:Qe.geocodingByPlaceId)==null?void 0:Ye.zipCode)||"",ot=((mn=(It=Xr?.data)==null?void 0:It.geocodingByPlaceId)==null?void 0:mn.state)||"",Je=((et=(Sn=Xr?.data)==null?void 0:Sn.geocodingByPlaceId)==null?void 0:et.stateCode)||"";if(Qr&&Nt)if(!_e||!Je){const tt=yield de({variables:{latitude:String(Qr),longitude:String(Nt)}}),rt=((kt=(Rt=tt?.data)==null?void 0:Rt.geocodingByLatLon)==null?void 0:kt.zipCode)||"",lt=((Sr=(qn=tt?.data)==null?void 0:qn.geocodingByLatLon)==null?void 0:Sr.state)||"",St=((Ln=(pn=tt?.data)==null?void 0:pn.geocodingByLatLon)==null?void 0:Ln.stateCode)||"";z({latitude:Qr,longitude:Nt,zipCode:rt,state:lt,stateCode:St,placeId:Qt,description:Bn,value:Qt})}else z({latitude:Qr,longitude:Nt,zipCode:_e,state:ot,stateCode:Je,placeId:Qt,description:Bn,value:Qt});else oe(!0)}}),Ie=()=>!0,xe=(0,s.useDebounce)(Qt=>h(void 0,null,function*(){return yield J({variables:{input:Qt,types:"geocode"}})})),Fe=Qt=>h(void 0,null,function*(){if(oe(!1),q(Qt),T?.(Qt),!Qt||Qt.trim().length===0){F(null),ze(pe),z({latitude:0,longitude:0,zipCode:"",state:"",stateCode:"",placeId:"",description:"",value:Qt});return}const zt=Qt.trim();zt.length>=2?yield xe(zt):ze(pe)}),it=Qt=>{te.current=Qt},gt=()=>{q(I),ze(ge),F(K)};(0,t.useEffect)(()=>{(()=>h(void 0,null,function*(){var zt,Ke,We,Ct,Qe,Ye,It,mn,Sn,et,Rt,kt,qn,Sr,pn,Ln;if(N&&w){ze([{id:N,label:V||w}]),re([{id:N,label:V||w}]),F(N),G(N),q(w),k(w),w===V&&q(w);const mr=yield se({variables:{placeId:N}}),Bn=(Ke=(zt=mr?.data)==null?void 0:zt.geocodingByPlaceId)==null?void 0:Ke.latitude,Xr=(Ct=(We=mr?.data)==null?void 0:We.geocodingByPlaceId)==null?void 0:Ct.longitude,Qr=((Ye=(Qe=mr?.data)==null?void 0:Qe.geocodingByPlaceId)==null?void 0:Ye.zipCode)||"",Nt=((mn=(It=mr?.data)==null?void 0:It.geocodingByPlaceId)==null?void 0:mn.state)||"",_e=((et=(Sn=mr?.data)==null?void 0:Sn.geocodingByPlaceId)==null?void 0:et.stateCode)||"";if(Bn&&Xr)if(!Qr||!Nt||!_e){const ot=yield de({variables:{latitude:String(Bn),longitude:String(Xr)}}),Je=((kt=(Rt=ot?.data)==null?void 0:Rt.geocodingByLatLon)==null?void 0:kt.zipCode)||"",tt=((Sr=(qn=ot?.data)==null?void 0:qn.geocodingByLatLon)==null?void 0:Sr.state)||"",rt=((Ln=(pn=ot?.data)==null?void 0:pn.geocodingByLatLon)==null?void 0:Ln.stateCode)||"";z({latitude:Bn,longitude:Xr,zipCode:Je,state:tt,stateCode:rt,placeId:N,description:w,value:N})}else z({latitude:Bn,longitude:Xr,zipCode:Qr,state:Nt,stateCode:_e,placeId:N,description:w,value:N})}else F(null),G(null),q(""),k(""),ze(pe),re(pe)}))()},[]);const Ot=ae||!!he||!!ne||!!Ee||!!R,Dt=Ot?R||L("ADDRESS_TYPEAHEAD_ERROR"):"";return(0,t.useEffect)(()=>{E&&E(me||ue||D)},[E,me,ue,D]),(0,n.jsx)("div",{className:y,children:(0,n.jsx)(o.Select.ComboBox,{id:M,size:"md",isDisabled:S,inputValue:V,isLoading:ve||me||ue,placeholder:L("ADDRESS_AUTO_COMPLETE_PLACEHOLDER"),items:De,selectedKey:U,onSelectionChange:Se,onInputChange:Fe,defaultFilter:Ie,onOpenChange:it,onBlur:gt,isInvalid:Ot,hint:Dt,autoComplete:"address-line1",className:"w-full",children:Qt=>{const zt=Qt,Ke=V.trim().length>=2,We=zt.mainText||"",Ct=zt.secondaryText||"",Qe=We.trim().length>0,Ye=Ct.trim().length>0,It=Qe?(0,r.RZ)(We,V):{beforePart:"",highlightedPart:"",remainingPart:""},mn=Ye?(0,r.RZ)(Ct,V):{beforePart:"",highlightedPart:"",remainingPart:""};return(0,n.jsx)(o.Select.Item,{id:zt.id,supportingText:zt.supportingText,isDisabled:zt.isDisabled,icon:zt.icon,avatarUrl:zt.avatarUrl,textValue:zt.label,children:Ke&&Qe?(0,n.jsxs)("div",{className:"flex min-w-0 flex-col",children:[(0,n.jsxs)("div",{className:"truncate text-sm font-medium",children:[(0,n.jsx)("span",{children:It.beforePart}),(0,n.jsx)("span",{className:"text-brand-primary font-semibold",children:It.highlightedPart}),(0,n.jsx)("span",{children:It.remainingPart})]}),Ye&&(0,n.jsxs)("div",{className:"truncate text-xs text-gray-600",children:[(0,n.jsx)("span",{children:mn.beforePart}),(0,n.jsx)("span",{className:"text-brand-primary font-semibold",children:mn.highlightedPart}),(0,n.jsx)("span",{children:mn.remainingPart})]})]}):(0,n.jsx)("div",{className:"truncate",children:zt.label})})}})})}},18077:()=>{},12200:(Y,l,e)=>{"use strict";e.d(l,{AddressTypeahead:()=>n.K});var n=e(19622),t=e(18077),r=e.n(t);e.o(t,"BWELL_STORED_TOKENS_KEY")&&e.d(l,{BWELL_STORED_TOKENS_KEY:function(){return t.BWELL_STORED_TOKENS_KEY}}),e.o(t,"DeviceLocationProvider")&&e.d(l,{DeviceLocationProvider:function(){return t.DeviceLocationProvider}}),e.o(t,"LocationPermissionEnum")&&e.d(l,{LocationPermissionEnum:function(){return t.LocationPermissionEnum}}),e.o(t,"LocationType")&&e.d(l,{LocationType:function(){return t.LocationType}}),e.o(t,"SchedulingLocationCard")&&e.d(l,{SchedulingLocationCard:function(){return t.SchedulingLocationCard}}),e.o(t,"formatPhoneNumber")&&e.d(l,{formatPhoneNumber:function(){return t.formatPhoneNumber}}),e.o(t,"getInitials")&&e.d(l,{getInitials:function(){return t.getInitials}}),e.o(t,"removeAfterLastComma")&&e.d(l,{removeAfterLastComma:function(){return t.removeAfterLastComma}}),e.o(t,"shouldForceLogoutAfterAuthFailure")&&e.d(l,{shouldForceLogoutAfterAuthFailure:function(){return t.shouldForceLogoutAfterAuthFailure}}),e.o(t,"unformatPhoneNumber")&&e.d(l,{unformatPhoneNumber:function(){return t.unformatPhoneNumber}}),e.o(t,"useDebounce")&&e.d(l,{useDebounce:function(){return t.useDebounce}}),e.o(t,"useDeviceDetection")&&e.d(l,{useDeviceDetection:function(){return t.useDeviceDetection}}),e.o(t,"useDeviceLocationContext")&&e.d(l,{useDeviceLocationContext:function(){return t.useDeviceLocationContext}}),e.o(t,"useRedirect")&&e.d(l,{useRedirect:function(){return t.useRedirect}}),e.o(t,"useSearchQueryParams")&&e.d(l,{useSearchQueryParams:function(){return t.useSearchQueryParams}})},52113:(Y,l,e)=>{"use strict";var n=e(31085),t=e(36087),r=e(87896);const s=({icon:o,title:i})=>{const{isSmallScreen:a}=useDeviceDetection();return jsx("div",{className:`tw-preflight mb-5 flex justify-center ${a?"-mx-5 -mt-5":""}`,children:jsxs("div",{className:`max-w bg-utility-blue-50 border-utility-blue-200 flex h-12 w-full flex-row items-center gap-3 border-t border-b pl-5 ${a?"":"rounded-lg border-r border-l"}`,children:[o??jsx(FileSearch02,{size:20}),jsxs(Typography,{className:"text-md text-primary font-normal",tag:"h3",children:[i,jsx("span",{className:"animate-pulse",children:"..."})]})]})})}},87858:(Y,l,e)=>{"use strict";var n=e(31085),t=e(36087),r=e(66267),s=e(64081),o=e(52449);const i=({className:a})=>{const{pathname:g}=useLocation(),c=useNavigationService(),u=useBreadcrumbsConfig(),{overrides:C}=useBreadcrumbsOverrideContext(),{loading:A,i18n:{t:m}}=useI18nChild({keys:["shared"]}),d=getPathSegments(g).flatMap(O=>{const p=c.getId(O),b=c.getRouteMeta(p)||{},h=getBreadcrumbTitleKey(p,b,u);if(!h||b.breadcrumbHide)return[];const f=C[p];let v=c.getHref(p),M=h;return f&&(f.href?v=f.href:f.search&&(v=c.getHref({id:p,search:f.search})),f.titleKey&&(M=f.titleKey)),[{routeId:p,href:v,label:m(M),onClick:f?.onClick}]});return A||d.length<=1?null:jsx(BreadcrumbsBase,{type:"button",className:cx("tw-preflight hidden lg:block",a),children:d.map(O=>jsx(BreadcrumbsBase.Item,{href:O.href,onClick:O.onClick,children:O.label},O.routeId))})}},85449:(Y,l,e)=>{"use strict";e.d(l,{rJ:()=>y,GU:()=>S});var n=e(31085),t=e(14041),r=e(76323),s=e(78579),o=e(76808),i=e(5380),a=e(87896),g=e(26877);const c=(E,R)=>new Promise((P,L)=>setTimeout(()=>L(new Error(R)),E)),u=(E,R,P)=>Promise.race([E,c(R,P)]),C=5e3,A=1e4;var m=Object.defineProperty,d=Object.defineProperties,O=Object.getOwnPropertyDescriptors,p=Object.getOwnPropertySymbols,b=Object.prototype.hasOwnProperty,h=Object.prototype.propertyIsEnumerable,f=(E,R,P)=>R in E?m(E,R,{enumerable:!0,configurable:!0,writable:!0,value:P}):E[R]=P,v=(E,R)=>{for(var P in R||(R={}))b.call(R,P)&&f(E,P,R[P]);if(p)for(var P of p(R))h.call(R,P)&&f(E,P,R[P]);return E},M=(E,R)=>d(E,O(R)),x=(E,R,P)=>new Promise((L,D)=>{var N=q=>{try{V(P.next(q))}catch(I){D(I)}},w=q=>{try{V(P.throw(q))}catch(I){D(I)}},V=q=>q.done?L(q.value):Promise.resolve(q.value).then(N,w);V((P=P.apply(E,R)).next())});const T={enableHighAccuracy:!0,maximumAge:3e4,timeout:15e3},z=(0,t.createContext)({loading:!1,overrideSearchSettings:()=>Promise.resolve(),locationPermission:void 0,setLocationPermission:()=>{},position:void 0,refreshPosition:()=>Promise.resolve(void 0),requestPosition:()=>Promise.resolve(void 0),requestCurrentLocation:()=>Promise.resolve(),checkLocaitonPermission:()=>Promise.resolve(void 0)}),S=()=>(0,t.useContext)(z),y=({children:E})=>{var R;const{mobileOS:P}=(0,r.useDeviceDetection)(),L=(0,o.Ul)(),{geolocation:D}=(0,s.c)(),{queryParams:N,setQueryParams:w}=(0,a.useSearchQueryParams)(),V=(0,t.useRef)(!1),q=(0,t.useRef)(N);(0,t.useEffect)(()=>{q.current=N},[N]);const[I,k]=(0,t.useState)(!1),[U,F]=(0,t.useState)((R=N.locationPermission)!=null?R:void 0),[K,G]=(0,t.useState)(),[ae,oe]=(0,t.useState)(!1),te=(0,t.useCallback)(ve=>{F(ve);try{w(M(v({},q.current),{locationPermission:ve||i.Ef.UNAVAILABLE}))}catch(Ee){Ee instanceof Error?L?.error(Ee,"Failed to update query params"):L?.error(`Failed to update query params - ${JSON.stringify(Ee)}`)}},[w,L]),pe=(0,t.useCallback)(()=>x(void 0,null,function*(){try{return yield D.isAvailable()}catch(ve){return ve instanceof Error?L?.error(ve,"Error checking geolocation availability"):L?.error(`Error checking geolocation availability - ${JSON.stringify(ve)}`),!1}}),[D,L]),be=(0,t.useCallback)(ve=>x(void 0,null,function*(){const Ee=D.getCurrentPosition(ve).then(De=>{if(!De||!De.coords)throw new Error("Location data is invalid or unavailable");return De});try{return yield u(Ee,C,"Location request timed out. Please check that location services are enabled.")}catch(De){throw De instanceof Error&&L?.error(De,"Geolocation timeout or error"),De}}),[D,L]),ze=(0,t.useCallback)(()=>x(void 0,null,function*(){return u(D.checkPermission(),C,"Check permission timed out")}),[D]),ge=(0,t.useCallback)(()=>x(void 0,null,function*(){return u(D.requestPermission(),A,"Permission request timed out - user did not respond to permission dialog")}),[D]),re=(0,t.useCallback)(()=>x(void 0,null,function*(){try{if(!(yield pe()))return L?.error("Location services not available"),!1;const Ee=yield ze();return Ee!==i.Ef.GRANTED&&Ee!==i.Ef.PROMPT?(L?.error(`Location permission not granted: ${Ee}`),!1):!0}catch(ve){return ve instanceof Error?L?.error(ve,"Error checking location services"):L?.error(`Error checking location services - ${JSON.stringify(ve)}`),!1}}),[pe,L,ze]);(0,t.useEffect)(()=>{if(V.current)return;V.current=!0,(()=>x(void 0,null,function*(){const Ee=N.locationPermission;if(Ee===i.Ef.DENIED||Ee===i.Ef.BLOCKED||Ee===i.Ef.UNAVAILABLE){F(Ee);return}k(!0);try{if(!(yield pe())){te(i.Ef.UNAVAILABLE);return}if(Ee===i.Ef.GRANTED){try{const Ie=yield ze();if(Ie===i.Ef.GRANTED){const xe=yield be(T);xe&&(G(xe),te(i.Ef.GRANTED))}else Ie===i.Ef.PROMPT?(te(Ie),oe(!0)):te(Ie)}catch(Ie){Ie instanceof Error?L?.error(Ie,"Error getting initial location with granted permission"):L?.error(`Error getting initial location with granted permission - ${JSON.stringify(Ie)}`),te(i.Ef.UNAVAILABLE)}return}const Se=yield ze();if(te(Se),Se===i.Ef.GRANTED)try{const Ie=yield be(T);Ie?G(Ie):te(i.Ef.UNAVAILABLE)}catch(Ie){Ie instanceof Error?L?.error(Ie,"Error getting initial location"):L?.error(`Error getting initial location - ${JSON.stringify(Ie)}`),te(i.Ef.UNAVAILABLE)}else Se===i.Ef.PROMPT&&oe(!0)}catch(De){De instanceof Error?L?.error(De,"Error initializing location permission"):L?.error(`Error initializing location permission - ${JSON.stringify(De)}`),te(i.Ef.UNAVAILABLE)}finally{k(!1)}}))()},[]);const se=(0,t.useCallback)(()=>x(void 0,null,function*(){try{if(!(yield re())){te(i.Ef.UNAVAILABLE);return}k(!0);let Ee=yield ze();if(te(Ee),Ee===i.Ef.GRANTED||Ee===i.Ef.PROMPT){if(P==="Android"&&Ee===i.Ef.GRANTED)try{Ee=yield ge(),te(Ee)}catch(De){De instanceof Error?L?.error(De,"Error re-requesting Android permission"):L?.error(`Error re-requesting Android permission - ${JSON.stringify(De)}`);return}if(Ee!==i.Ef.UNAVAILABLE){const De=yield be(T);return G(De),De}}return}catch(ve){te(i.Ef.UNAVAILABLE),ve instanceof Error?L?.error(ve,"Error refreshing location"):L?.error(`Error refreshing location - ${JSON.stringify(ve)}`);return}finally{k(!1)}}),[re,L,P,te,be,ze,ge]),me=(0,t.useCallback)(()=>x(void 0,null,function*(){try{return(yield pe())?yield ze():i.Ef.UNAVAILABLE}catch(ve){return ve instanceof Error?L?.error(ve,"Error checking location permission"):L?.error(`Error checking location permission - ${JSON.stringify(ve)}`),i.Ef.UNAVAILABLE}}),[pe,L,ze]),he=(0,t.useCallback)(()=>x(void 0,null,function*(){k(!0);try{if(!(yield pe())){te(i.Ef.UNAVAILABLE);return}const Ee=yield ze();te(Ee)}catch(ve){ve instanceof Error?L?.error(ve,"Error checking and setting location permission"):L?.error(`Error checking and setting location permission - ${JSON.stringify(ve)}`),te(i.Ef.UNAVAILABLE)}finally{k(!1)}}),[pe,L,te,ze]),de=(0,t.useCallback)(()=>x(void 0,null,function*(){k(!0);try{if(!(yield pe())){te(i.Ef.UNAVAILABLE);return}const Ee=yield ze();if(Ee===i.Ef.DENIED||Ee===i.Ef.BLOCKED||Ee===i.Ef.UNAVAILABLE){te(Ee);return}const De=yield ge();if(te(De),["granted","prompt"].includes(De)){const Se=yield be(T);return G(Se),Se}return}catch(ve){if(ve instanceof Error)ve.message.includes("User denied Geolocation")||L?.error(ve,"Error requesting location");else{const Ee=ve&&typeof ve=="object"&&"message"in ve?ve.message:JSON.stringify(ve);Ee?.includes("User denied Geolocation")||L?.error(`Error requesting location - ${Ee}`)}te(i.Ef.UNAVAILABLE);return}finally{k(!1)}}),[pe,L,te,be,ge,ze]),ue=(0,t.useCallback)(()=>x(void 0,null,function*(){k(!0);try{if(!(yield pe())){te(i.Ef.UNAVAILABLE);return}const Ee=yield be(T);Ee&&(G(Ee),F(i.Ef.GRANTED),w(M(v({},q.current),{location:`${Ee.coords.latitude},${Ee.coords.longitude}`,locationType:i.iF.CURRENT_LOCATION,lat:`${Ee.coords.latitude}`,lng:`${Ee.coords.longitude}`,locationPermission:i.Ef.GRANTED})))}catch(ve){throw ve instanceof Error?L?.error(ve,"Error requesting current location"):L?.error(`Error requesting current location - ${JSON.stringify(ve)}`),te(i.Ef.UNAVAILABLE),ve}finally{k(!1)}}),[pe,L,w,te,be]),ne=(0,t.useCallback)(()=>x(void 0,null,function*(){try{k(!0);const ve=yield se();ve&&w(M(v({},q.current),{location:`${ve.coords.latitude},${ve.coords.longitude}`,locationType:i.iF.CURRENT_LOCATION,lat:`${ve.coords.latitude}`,lng:`${ve.coords.longitude}`,locationPermission:U||i.Ef.UNAVAILABLE}))}catch(ve){ve instanceof Error?L?.error(ve,"Error overriding search settings"):L?.error(`Error overriding search settings - ${JSON.stringify(ve)}`)}finally{k(!1)}}),[L,U,se,w]),J=(0,t.useMemo)(()=>({loading:I,overrideSearchSettings:ne,locationPermission:U,setLocationPermission:F,position:K,refreshPosition:se,requestPosition:de,requestCurrentLocation:ue,checkAndSetLocationPermission:he,checkLocaitonPermission:me}),[I,ne,U,K,se,de,ue,he,me]);return(0,n.jsxs)(z.Provider,{value:J,children:[ae&&(0,n.jsx)(g.J,{isOpen:ae,onClose:()=>oe(!1),title:"Find results nearby",description:"Enable location services to see results near you. We'll only use your location while you're searching."}),E]})}},82825:(Y,l,e)=>{"use strict";e.d(l,{GU:()=>n.GU,rJ:()=>n.rJ});var n=e(85449)},1053:(Y,l,e)=>{"use strict";e.d(l,{pc:()=>lt,GI:()=>be,rz:()=>et,Fp:()=>Sn,el:()=>mn,ao:()=>It,oA:()=>D,Yt:()=>St,g4:()=>Ye,tn:()=>Ue,n4:()=>N,gD:()=>L,Vp:()=>tt,Cx:()=>k,bK:()=>q,gi:()=>rt,Z$:()=>he,GT:()=>Je,hr:()=>de,JL:()=>ue,Ck:()=>I,dU:()=>V,wG:()=>mr,hZ:()=>pn,$e:()=>Rt,qT:()=>Sr,GQ:()=>qn,q3:()=>Ln,D_:()=>kt,Uf:()=>F,_l:()=>ge,Md:()=>ae,V7:()=>G,fe:()=>se,JP:()=>At,Z_:()=>w,zO:()=>me,UZ:()=>te,$7:()=>Ke,rb:()=>K,_W:()=>Ct,WS:()=>We,VF:()=>_e,vf:()=>Xr,PV:()=>ot,PS:()=>Bn,Iz:()=>Nt,zD:()=>oe,m3:()=>Ot,XP:()=>Dt,PM:()=>De,cX:()=>ne,G6:()=>J,Us:()=>Ie,AA:()=>Ee,G0:()=>gt,mO:()=>Fe,HH:()=>Se,PU:()=>ye,it:()=>zt,Tl:()=>it,uH:()=>Qt,c3:()=>ve,rx:()=>P});var n=e(36087),t=e(14041);const r=({size:Gt=24,color:Yt="currentColor",...rn})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gt,height:Gt,stroke:Yt,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...rn},t.createElement("path",{d:"M12 15.5H7.5c-1.396 0-2.093 0-2.661.172a4 4 0 0 0-2.667 2.667C2 18.907 2 19.604 2 21m14-3 2 2 4-4m-7.5-8.5a4.5 4.5 0 1 1-9 0 4.5 4.5 0 0 1 9 0Z"}));r.displayName="UserCheck01";const s=({size:Gt=24,color:Yt="currentColor",...rn})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gt,height:Gt,stroke:Yt,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...rn},t.createElement("path",{d:"M16 21v-1.2c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C13.72 15 12.88 15 11.2 15H6.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C2 17.28 2 18.12 2 19.8V21M16 6l2 2 4-4m-9.5 3.5a3.5 3.5 0 1 1-7 0 3.5 3.5 0 0 1 7 0Z"}));s.displayName="UserCheck02";const o=({size:Gt=24,color:Yt="currentColor",...rn})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gt,height:Gt,stroke:Yt,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...rn},t.createElement("path",{d:"M12 15.5H7.5c-1.396 0-2.093 0-2.661.172a4 4 0 0 0-2.667 2.667C2 18.907 2 19.604 2 21m17 0v-6m-3 3h6M14.5 7.5a4.5 4.5 0 1 1-9 0 4.5 4.5 0 0 1 9 0Z"}));o.displayName="UserPlus01";var i=e(8957);const a=({size:Gt=24,color:Yt="currentColor",...rn})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gt,height:Gt,stroke:Yt,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...rn},t.createElement("path",{d:"m16.5 16 5 5m0-5-5 5M12 15.5H7.5c-1.396 0-2.093 0-2.661.172a4 4 0 0 0-2.667 2.667C2 18.907 2 19.604 2 21M14.5 7.5a4.5 4.5 0 1 1-9 0 4.5 4.5 0 0 1 9 0Z"}));a.displayName="UserX01";const g=({size:Gt=24,color:Yt="currentColor",...rn})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gt,height:Gt,stroke:Yt,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...rn},t.createElement("path",{d:"M22 21v-2a4.002 4.002 0 0 0-3-3.874M15.5 3.291a4.001 4.001 0 0 1 0 7.418M17 21c0-1.864 0-2.796-.305-3.53a4 4 0 0 0-2.164-2.165C13.796 15 12.864 15 11 15H8c-1.864 0-2.796 0-3.53.305a4 4 0 0 0-2.166 2.164C2 18.204 2 19.136 2 21M13.5 7a4 4 0 1 1-8 0 4 4 0 0 1 8 0Z"}));g.displayName="Users01";const c=({size:Gt=24,color:Yt="currentColor",...rn})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gt,height:Gt,stroke:Yt,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...rn},t.createElement("path",{d:"m21 21-6-6m2-5a7 7 0 1 1-14 0 7 7 0 0 1 14 0Z"}));c.displayName="SearchSm";var u=e(15297),C=e(22716),A=e(9495);const m=({size:Gt=24,color:Yt="currentColor",...rn})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gt,height:Gt,stroke:Yt,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...rn},t.createElement("path",{d:"M4 8h16M4 16h16M8 3v18m8-18v18"}));m.displayName="Hash01";const d=({size:Gt=24,color:Yt="currentColor",...rn})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gt,height:Gt,stroke:Yt,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...rn},t.createElement("path",{d:"m9.5 3-3 18m11-18-3 18m6-13h-17m16 8h-17"}));d.displayName="Hash02";const O=({size:Gt=24,color:Yt="currentColor",...rn})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gt,height:Gt,stroke:Yt,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...rn},t.createElement("path",{d:"M15 4.6c0-.56 0-.84-.109-1.054a1 1 0 0 0-.437-.437C14.24 3 13.96 3 13.4 3h-2.8c-.56 0-.84 0-1.054.109a1 1 0 0 0-.437.437C9 3.76 9 4.04 9 4.6v2.8c0 .56 0 .84-.109 1.054a1 1 0 0 1-.437.437C8.24 9 7.96 9 7.4 9H4.6c-.56 0-.84 0-1.054.109a1 1 0 0 0-.437.437C3 9.76 3 10.04 3 10.6v2.8c0 .56 0 .84.109 1.054a1 1 0 0 0 .437.437C3.76 15 4.04 15 4.6 15h2.8c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C9 15.76 9 16.04 9 16.6v2.8c0 .56 0 .84.109 1.054a1 1 0 0 0 .437.437C9.76 21 10.04 21 10.6 21h2.8c.56 0 .84 0 1.054-.109a1 1 0 0 0 .437-.437C15 20.24 15 19.96 15 19.4v-2.8c0-.56 0-.84.109-1.054a1 1 0 0 1 .437-.437C15.76 15 16.04 15 16.6 15h2.8c.56 0 .84 0 1.054-.109a1 1 0 0 0 .437-.437C21 14.24 21 13.96 21 13.4v-2.8c0-.56 0-.84-.109-1.054a1 1 0 0 0-.437-.437C20.24 9 19.96 9 19.4 9h-2.8c-.56 0-.84 0-1.054-.109a1 1 0 0 1-.437-.437C15 8.24 15 7.96 15 7.4V4.6Z"}));O.displayName="MedicalCross";const p=({size:Gt=24,color:Yt="currentColor",...rn})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gt,height:Gt,stroke:Yt,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...rn},t.createElement("path",{d:"M12 2v5m0-5c-.713 0-1.41.075-2.08.217M12 2c.713 0 1.41.075 2.08.217M12 7a5 5 0 0 0-5 5m5-5a5 5 0 0 1 5 5m-5 5v5m0-5a5 5 0 0 0 5-5m-5 5a5 5 0 0 1-5-5m5 10c.712 0 1.407-.075 2.077-.216M12 22a10.02 10.02 0 0 1-2.085-.218M4.93 4.93l3.535 3.535m7.072 7.072 3.535 3.535M2 12h5m-5 0c0 .713.075 1.41.217 2.08M2 12c0-.714.075-1.411.217-2.083M17 12h5m0 0c0-.713-.075-1.41-.217-2.08M22 12c0 .713-.075 1.409-.216 2.08M4.928 19.07l3.535-3.536m7.072-7.07 3.535-3.536m-1.624-1.317a10.053 10.053 0 0 1 2.942 2.943m-.003 10.895a10.053 10.053 0 0 1-2.941 2.94m-10.891-.002a10.055 10.055 0 0 1-2.94-2.937m0-10.896a10.054 10.054 0 0 1 2.94-2.942"}));p.displayName="Virus";const b=({size:Gt=24,color:Yt="currentColor",...rn})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gt,height:Gt,stroke:Yt,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...rn},t.createElement("path",{d:"M22 10H2m9 4H6M2 8.2v7.6c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C3.52 19 4.08 19 5.2 19h13.6c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C22 17.48 22 16.92 22 15.8V8.2c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C20.48 5 19.92 5 18.8 5H5.2c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C2 6.52 2 7.08 2 8.2Z"}));b.displayName="CreditCard02";const h=({size:Gt=24,color:Yt="currentColor",...rn})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gt,height:Gt,stroke:Yt,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...rn},t.createElement("path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"}));h.displayName="Link03";var f=e(85418);const v=({size:Gt=24,color:Yt="currentColor",...rn})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gt,height:Gt,stroke:Yt,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...rn},t.createElement("path",{d:"M16 4c.93 0 1.395 0 1.776.102a3 3 0 0 1 2.122 2.122C20 6.605 20 7.07 20 8v9.2c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C17.72 22 16.88 22 15.2 22H8.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C4 19.72 4 18.88 4 17.2V8c0-.93 0-1.395.102-1.776a3 3 0 0 1 2.122-2.122C6.605 4 7.07 4 8 4m1 11 2 2 4.5-4.5M9.6 6h4.8c.56 0 .84 0 1.054-.109a1 1 0 0 0 .437-.437C16 5.24 16 4.96 16 4.4v-.8c0-.56 0-.84-.109-1.054a1 1 0 0 0-.437-.437C15.24 2 14.96 2 14.4 2H9.6c-.56 0-.84 0-1.054.109a1 1 0 0 0-.437.437C8 2.76 8 3.04 8 3.6v.8c0 .56 0 .84.109 1.054a1 1 0 0 0 .437.437C8.76 6 9.04 6 9.6 6Z"}));v.displayName="ClipboardCheck";const M=({size:Gt=24,color:Yt="currentColor",...rn})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gt,height:Gt,stroke:Yt,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...rn},t.createElement("path",{d:"M16 4c.93 0 1.395 0 1.776.102a3 3 0 0 1 2.122 2.122C20 6.605 20 7.07 20 8v9.2c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C17.72 22 16.88 22 15.2 22H8.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C4 19.72 4 18.88 4 17.2V8c0-.93 0-1.395.102-1.776a3 3 0 0 1 2.122-2.122C6.605 4 7.07 4 8 4m4 13v-6m-3 3h6M9.6 6h4.8c.56 0 .84 0 1.054-.109a1 1 0 0 0 .437-.437C16 5.24 16 4.96 16 4.4v-.8c0-.56 0-.84-.109-1.054a1 1 0 0 0-.437-.437C15.24 2 14.96 2 14.4 2H9.6c-.56 0-.84 0-1.054.109a1 1 0 0 0-.437.437C8 2.76 8 3.04 8 3.6v.8c0 .56 0 .84.109 1.054a1 1 0 0 0 .437.437C8.76 6 9.04 6 9.6 6Z"}));M.displayName="ClipboardPlus";const x=({size:Gt=24,color:Yt="currentColor",...rn})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gt,height:Gt,stroke:Yt,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...rn},t.createElement("path",{d:"M11.5 5h.434c3.048 0 4.571 0 5.15.547a2 2 0 0 1 .586 1.845c-.156.781-1.4 1.66-3.888 3.42l-4.064 2.876c-2.488 1.76-3.732 2.639-3.888 3.42a2 2 0 0 0 .586 1.845c.579.547 2.102.547 5.15.547h.934M8 5a3 3 0 1 1-6 0 3 3 0 0 1 6 0Zm14 14a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}));x.displayName="Route";const T=({size:Gt=24,color:Yt="currentColor",...rn})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gt,height:Gt,stroke:Yt,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...rn},t.createElement("path",{d:"M16 7c0-.93 0-1.395-.102-1.776a3 3 0 0 0-2.121-2.122C13.395 3 12.93 3 12 3c-.93 0-1.395 0-1.777.102a3 3 0 0 0-2.12 2.122C8 5.605 8 6.07 8 7M5.2 21h13.6c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C22 19.48 22 18.92 22 17.8v-7.6c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C20.48 7 19.92 7 18.8 7H5.2c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C2 8.52 2 9.08 2 10.2v7.6c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C3.52 21 4.08 21 5.2 21Z"}));T.displayName="Briefcase01";const z=({size:Gt=24,color:Yt="currentColor",...rn})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gt,height:Gt,stroke:Yt,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...rn},t.createElement("path",{d:"M12.913 17h7.174m-7.174 0L11 21m1.913-4 2.865-5.991c.231-.483.347-.724.505-.8a.5.5 0 0 1 .434 0c.158.076.274.317.505.8L20.087 17m0 0L22 21M2 5h6m0 0h3.5M8 5V3m3.5 2H14m-2.5 0c-.496 2.957-1.647 5.636-3.334 7.884M10 14a9.396 9.396 0 0 1-1.834-1.116m0 0C6.813 11.848 5.603 10.427 5 9m3.166 3.884A17.295 17.295 0 0 1 2 18"}));z.displayName="Translate01";const S=({size:Gt=24,color:Yt="currentColor",...rn})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gt,height:Gt,stroke:Yt,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...rn},t.createElement("path",{d:"M10 8.502a2.248 2.248 0 0 1 4.37.75c0 1.499-2.25 2.248-2.25 2.248m.03 3h.01M9.9 19.2l1.46 1.947c.217.29.326.434.459.486a.5.5 0 0 0 .362 0c.133-.052.242-.197.459-.486L14.1 19.2c.293-.39.44-.586.619-.735a2 2 0 0 1 .822-.412c.226-.053.47-.053.959-.053 1.398 0 2.097 0 2.648-.228a3 3 0 0 0 1.624-1.624C21 15.597 21 14.898 21 13.5V7.8c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C18.72 3 17.88 3 16.2 3H7.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C3 5.28 3 6.12 3 7.8v5.7c0 1.398 0 2.097.228 2.648a3 3 0 0 0 1.624 1.624C5.403 18 6.102 18 7.5 18c.489 0 .733 0 .96.053a2 2 0 0 1 .821.412c.18.149.326.344.619.735Z"}));S.displayName="AnnotationQuestion";const y=({size:Gt=24,color:Yt="currentColor",...rn})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gt,height:Gt,stroke:Yt,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...rn},t.createElement("path",{d:"M15 2.458A9.996 9.996 0 0 0 12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10c0-1.715-.432-3.33-1.193-4.74M17 5.75h.005M10.5 21.888v-2.203a.5.5 0 0 1 .12-.325l2.486-2.9a.5.5 0 0 0-.131-.76l-2.857-1.632a.499.499 0 0 1-.186-.187L8.07 10.62a.5.5 0 0 0-.478-.25l-5.528.492M21 6c0 2.21-2 4-4 6-2-2-4-3.79-4-6a4 4 0 0 1 8 0Zm-3.75-.25a.25.25 0 1 1-.5 0 .25.25 0 0 1 .5 0Z"}));y.displayName="Globe05";const E=({size:Gt=24,color:Yt="currentColor",...rn})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gt,height:Gt,stroke:Yt,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...rn},t.createElement("path",{d:"M11.302 21.615c.221.129.332.194.488.227.122.026.298.026.42 0 .156-.034.267-.098.488-.227C14.646 20.478 20 16.908 20 12V7.217c0-.799 0-1.199-.13-1.542a2 2 0 0 0-.548-.79c-.275-.243-.65-.383-1.398-.664l-5.362-2.01c-.208-.078-.312-.117-.419-.133a1 1 0 0 0-.286 0c-.107.016-.21.055-.419.133L6.076 4.22c-.748.28-1.122.421-1.398.664a2 2 0 0 0-.547.79C4 6.018 4 6.418 4 7.217V12c0 4.908 5.354 8.478 7.302 9.615Z"}));E.displayName="Shield01";const R=({size:Gt=24,color:Yt="currentColor",...rn})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gt,height:Gt,stroke:Yt,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...rn},t.createElement("path",{d:"M21 15v1.2c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.72 21 17.88 21 16.2 21H7.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 18.72 3 17.88 3 16.2V15m14-7-5-5m0 0L7 8m5-5v12"}));R.displayName="Upload01";const P=/^(https?):\/\/([a-zA-Z0-9-]+\.)+[a-zA-Z0-9-]{2,}(?::\d+)?(\/[a-zA-Z0-9\-._~:?#[\]@!$&'()*+,;=%]*)?(#\/[a-zA-Z0-9\-._~:?#[\]@!$&'()*+,;=%]*)?(\?[a-zA-Z0-9\-._~:?#[\]@!$&'()*+,;=%]*)?$/i,L="http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",D="http://hl7.org/fhir/StructureDefinition/questionnaire-hidden",N="http://hl7.org/fhir/questionnaire-item-control",w="http://hl7.org/fhir/StructureDefinition/questionnaire-maxOccurs",V="http://hl7.org/fhir/StructureDefinition/minValue",q="http://hl7.org/fhir/StructureDefinition/maxValue",I="http://icanbwell.com/fhir/StructureDefinition/minValue-error-message",k="http://icanbwell.com/fhir/StructureDefinition/maxValue-error-message",U="http://icanbwell.com/fhir/StructureDefinition/questionnaire-readOnlyExpression",F="http://icanbwell.com/fhir/StructureDefinition/navigation-linkId",K="http://hl7.org/fhir/StructureDefinition/questionnaire-supportLink",G="http://icanbwell.com/fhir/StructureDefinition/questionnaire-autocomplete",ae="http://hl7.org/fhir/StructureDefinition/entryFormat",oe="http://hl7.org/fhir/StructureDefinition/tz-code",te="tz-code",pe="footer",be="check-box",ze="header",ge="page",re="http://icanbwell.com/fhir/StructureDefinition/questionnaire-callNextQuestion",se="http://icanbwell.com/fhir/StructureDefinition/questionnaire-currentStep",me="http://icanbwell.com/fhir/StructureDefinition/questionnaire-totalSteps",he=[{patterns:["pdf"],type:"pdf"},{patterns:["word","document"],type:"doc"},{patterns:["excel","spreadsheet"],type:"xlsx"},{patterns:["powerpoint","presentation"],type:"ppt"},{patterns:["image/jpeg"],type:"jpg"},{patterns:["image/png"],type:"png"},{patterns:["image/gif"],type:"gif"},{patterns:["image/svg"],type:"svg"},{patterns:["text/plain"],type:"txt"},{patterns:["zip"],type:"zip"},{patterns:["csv"],type:"csv"}],de={"image/*":"image/*","application/pdf":".pdf","application/msword":".doc","application/vnd.openxmlformats-officedocument.wordprocessingml.document":".docx","image/jpeg":"image/jpeg","image/jpg":"image/jpg","image/png":"image/png","image/gif":"image/gif","image/webp":"image/webp","image/heic":"image/heic","image/heif":"image/heif","image/svg+xml":"image/svg+xml"},ue={"image/*":"Images",".pdf":"PDF",".doc":"DOCX",".docx":"DOCX","image/jpeg":"JPEG","image/jpg":"JPG","image/png":"PNG","image/gif":"GIF","image/webp":"WEBP","image/heic":"HEIC","image/heif":"HEIF","image/svg+xml":"SVG"},ne="ui-toolkit/CoordinatePicker",J="ui-toolkit/DetailsInfo",ve="ui-toolkit/ServiceChoice",Ee="ui-toolkit/InfoBanner",De="ui-toolkit/Button",Se="ui-toolkit/Phone",Ie="ui-toolkit/ErrorCard",xe="ui-toolkit/FormContainer",Fe="ui-toolkit/PageHeader",it="ui-toolkit/SelectableOption",gt="ui-toolkit/Modal",Ot="ui-toolkit/Alert",Dt="ui-toolkit/AppSectionAccess",Qt="ui-toolkit/SensitiveDataCategory",zt="ui-toolkit/QuestCard",Ke="http://icanbwell.com/fhir/StructureDefinition/subtitle",We="http://icanbwell.com/fhir/StructureDefinition/text-align",Ct={LEFT:"left",CENTER:"center"},Qe={MYSELF:"myself",SOMEONE_ELSE:"someone-else"},Ye="http://icanbwell.com/fhir/StructureDefinition/icon-name",It="http://icanbwell.com/fhir/StructureDefinition/error-title",mn="http://icanbwell.com/fhir/StructureDefinition/error-subtitle",Sn="http://icanbwell.com/fhir/StructureDefinition/error-icon-name",et="http://icanbwell.com/fhir/StructureDefinition/description",Rt="http://icanbwell.com/fhir/StructureDefinition/modal-description",kt="http://icanbwell.com/fhir/StructureDefinition/modal-title",qn="http://icanbwell.com/fhir/StructureDefinition/modal-icon-name",Sr="http://icanbwell.com/fhir/StructureDefinition/modal-icon-color",pn="http://icanbwell.com/fhir/StructureDefinition/button-text",Ln="http://icanbwell.com/fhir/StructureDefinition/secondary-button-text",mr="http://icanbwell.com/fhir/StructureDefinition/modal-button-action",Bn="http://icanbwell.com/fhir/StructureDefinition/trigger-text",Xr="http://icanbwell.com/fhir/StructureDefinition/trigger-icon-name",Qr="http://icanbwell.com/fhir/StructureDefinition/primary-button-text",Nt="http://icanbwell.com/fhir/StructureDefinition/trigger-variant",_e="http://icanbwell.com/fhir/StructureDefinition/trigger-color",ot="http://icanbwell.com/fhir/StructureDefinition/trigger-size",Je="http://hl7.org/fhir/StructureDefinition/mimeType",tt="http://hl7.org/fhir/StructureDefinition/maxSize",rt="http://icanbwell.com/fhir/StructureDefinition/message-severity",lt="http://icanbwell.com/fhir/StructureDefinition/alert-color",St="http://icanbwell.com/fhir/StructureDefinition/hideLabel",st="http://icanbwell.com/fhir/StructureDefinition/placeholder",le="http://icanbwell.com/fhir/StructureDefinition/hint-text",ye="ui-toolkit/PrefilledMemberDemographicsAlert",Ue="http://hl7.org/fhir/issue-severity",Te="http://icanbwell.com/fhir/StructureDefinition/button-type",Tt="http://icanbwell.com/fhir/StructureDefinition/button-action",Zt="button-type",vn="http://icanbwell.com/fhir/StructureDefinition/analytics-form-name",_n="http://icanbwell.com/fhir/StructureDefinition/analytics-event-name",Ar="http://icanbwell.com/fhir/StructureDefinition/analytics-page-name",Ft="http://icanbwell.com/fhir/StructureDefinition/analytics-property-name",we="http://icanbwell.com/fhir/StructureDefinition/analytics-option-name",Ze={},At={"user-check":r,"user-check-02":s,"user-plus":o,"user-01":i.f,"user-x":a,"users-01":g,"search-sm":c,"info-circle":u.d,"help-circle":C.m,x:A.X,hash:m,"hash-02":d,"folder-heart":n.FolderHeart,"medical-cross":O,virus:p,pill:n.Pill,vaccine:n.Vaccine,"face-mask":n.FaceMask,"heart-beat":n.HeartBeat,"credit-card-02":b,"link-03":h,"search-lg":f.q,"clipboard-check":v,"clipboard-plus":M,route:x,"briefcase-01":T,"translate-01":z,"annotation-question":S,"globe-05":y,"shield-01":E,"upload-01":R}},25624:(Y,l,e)=>{"use strict";e.d(l,{$H:()=>N,$O:()=>gt,CP:()=>kt,Fy:()=>Rt,GN:()=>be,J4:()=>lt,MU:()=>G,Nw:()=>ot,Qr:()=>y,Ue:()=>St,Yo:()=>Ee,a0:()=>z,cz:()=>E,di:()=>I,eC:()=>st,iI:()=>k,lv:()=>q,mR:()=>vn,nt:()=>S,od:()=>V,t7:()=>Ot,u0:()=>x,yQ:()=>Zt,zj:()=>ue});var n=e(17637),t=e(43915),r=e(37234),s=e(65328),o=e(91595),i=e(27779),a=e.n(i),g=e(45250),c=e.n(g),u=e(16681),C=e(18807),A=e(1053),m=Object.defineProperty,d=Object.defineProperties,O=Object.getOwnPropertyDescriptors,p=Object.getOwnPropertySymbols,b=Object.prototype.hasOwnProperty,h=Object.prototype.propertyIsEnumerable,f=(Lt,Et,bt)=>Et in Lt?m(Lt,Et,{enumerable:!0,configurable:!0,writable:!0,value:bt}):Lt[Et]=bt,v=(Lt,Et)=>{for(var bt in Et||(Et={}))b.call(Et,bt)&&f(Lt,bt,Et[bt]);if(p)for(var bt of p(Et))h.call(Et,bt)&&f(Lt,bt,Et[bt]);return Lt},M=(Lt,Et)=>d(Lt,O(Et));const x=(Lt,Et,bt,qt)=>{if(Lt){const hn=Lt(Et,v({defaultValue:bt},qt));if(hn&&hn!==Et)return hn}return qt?Object.entries(qt).reduce((hn,[Tn,zr])=>hn.replace(`{{${Tn}}}`,String(zr)),bt):bt},T=Lt=>{var Et;return(Et=Lt.filter(bt=>bt.url.includes("questionnaire-itemControl")).flatMap(bt=>{var qt,hn;return(hn=(qt=bt.valueCodeableConcept)==null?void 0:qt.coding)!=null?hn:[]}).find(bt=>{var qt;return(qt=bt.code)==null?void 0:qt.startsWith("ui-toolkit/")}))==null?void 0:Et.code},z=Lt=>{var Et;const bt=(Et=Lt.extension)==null?void 0:Et.find(qt=>qt.url===A.V7);return bt?.valueCode||"off"},S=(Lt,Et,bt)=>{const qt=(0,C.A)(bt);return Lt&&Et&&bt?qt.replace("<p>",`<span>${Et} `).replace("</p>","</span>").trim():qt.replace("<p>","<span>").replace("</p>","</span>").trim()},y=Lt=>{const Et=Lt?.find(bt=>bt.url===A.Vp);return Et?.valueInteger},E=Lt=>{const Et=Lt?.find(bt=>bt.url===A.Z_);return Et?.valueInteger},R={date:"MM/DD/YYYY",choice:"Select an option"},P="Type your response here...",L=(Lt,Et)=>{const bt=Lt?.find(qt=>qt.url===PLACEHOLDER_EXTENSION_URL);return bt?.valueString||Et&&R[Et]||P},D=Lt=>{const Et=Lt?.find(bt=>bt.url===HINT_TEXT_EXTENSION_URL);return Et?.valueString},N=Lt=>{const Et=Lt?.filter(bt=>bt.url===A.GT&&bt.valueCode).map(bt=>A.hr[bt.valueCode]||bt.valueCode);return Et?.length?Et.join(","):void 0},w=Lt=>Lt.split(",").map(qt=>qt.trim()).map(qt=>A.JL[qt]||qt).filter((qt,hn,Tn)=>Tn.indexOf(qt)===hn).join(", "),V=(Lt,Et,bt)=>{const qt=w(Lt),hn=qt.lastIndexOf(","),Tn=hn!==-1?`${qt.substring(0,hn)} or${qt.substring(hn+1)}`:qt,zr=[Et&&`max. ${parseFloat((Et/(1e3*1e3)).toFixed(1))}MB`,bt&&`upto ${bt} file${bt>1?"s":""}`].filter(Boolean);return zr.length>0?`${Tn} (${zr.join(", ")})`:Tn},q=Lt=>{const Et=Lt?.find(bt=>bt?.url===A.zD||bt?.url===A.UZ);return Et?.valueCode||Intl.DateTimeFormat().resolvedOptions().timeZone},I=(Lt,Et)=>{var bt,qt,hn;const Tn=Et?.find(zr=>zr.url.includes(Lt));return(hn=(qt=(bt=Tn?.valueInteger)!=null?bt:Tn?.valueDecimal)!=null?qt:Tn?.valueString)!=null?hn:Tn?.valueDate},k=Lt=>{if(!!Lt){if(/^\d{4}-\d{2}-\d{2}$/.test(Lt))return Lt;try{const Et=(0,i.evaluate)({},Lt);if(Array.isArray(Et)&&Et.length>0){const bt=Et[0];if(bt instanceof Date&&!isNaN(bt.getTime())){const qt=bt.getFullYear(),hn=String(bt.getMonth()+1).padStart(2,"0"),Tn=String(bt.getDate()).padStart(2,"0");return`${qt}-${hn}-${Tn}`}if(typeof bt=="string"&&/^\d{4}-\d{2}-\d{2}$/.test(bt))return bt}}catch{}}},U=(Lt,Et)=>{var bt,qt;const hn=Et?.find(zr=>zr.url===Lt);if(!hn)return;const Tn=(bt=hn.valueString)!=null?bt:hn.valueDate;return Tn||k((qt=hn.valueExpression)==null?void 0:qt.expression)},F=(Lt,Et)=>{if(!(!Lt||Lt.length===0))for(const bt of Lt){const qt=I(Et,bt.extension);if(qt!==void 0)return qt;if(bt.item&&bt.item.length>0){const hn=F(bt.item,Et);if(hn!==void 0)return hn}}},K=(Lt,Et)=>{try{const bt=String(Lt??Et);let qt;if(bt.includes("/"))qt=(0,n.A)(bt,"MM/dd/yyyy",new Date);else{const hn=bt.split("T")[0];qt=(0,t.A)(hn)}return(0,r.A)(qt)}catch(bt){return console.error("Date parsing error:",bt,Lt),null}},G=(Lt,Et)=>{var bt;for(const qt of Lt){if(qt.linkId===Et)return qt;if((bt=qt.item)!=null&&bt.length){const hn=G(qt.item,Et);if(hn!==void 0)return hn}}},ae=(Lt,Et)=>{var bt;const qt=[];for(const hn of Lt)if(hn.linkId===Et&&qt.push(hn),(bt=hn.item)!=null&&bt.length){const Tn=ae(hn.item,Et);qt.push(...Tn)}return qt},oe=(Lt,Et,bt=0)=>ae(Lt,Et)[bt];function te(Lt){return Lt!=null}const pe=(Lt,Et)=>{var bt,qt,hn;if("answerString"in Lt&&te(Lt.answerString)){if(Lt.operator==="=")return Et?.valueString===Lt.answerString;if(Lt.operator==="!=")return Et?.valueString!==Lt.answerString}if("answerBoolean"in Lt&&te(Lt.answerBoolean)){if(Lt.operator==="=")return Et?.valueBoolean===Lt.answerBoolean;if(Lt.operator==="!=")return Et?.valueBoolean!==Lt.answerBoolean}if("answerInteger"in Lt&&te(Lt.answerInteger)||"answerDecimal"in Lt&&te(Lt.answerDecimal)){const Tn=Number(Et?.valueInteger||Et?.valueDecimal),zr=Number(Lt.answerInteger||Lt.answerDecimal);if(Lt.operator==="=")return Tn===zr;if(Lt.operator==="!=")return Tn!==zr;if(Lt.operator===">")return Tn>zr;if(Lt.operator==="<")return Tn<zr;if(Lt.operator===">=")return Tn>=zr;if(Lt.operator==="<=")return Tn<=zr}if("answerQuantity"in Lt&&te(Lt.answerQuantity)){const Tn=Et?.valueQuantity,zr=Lt.answerQuantity;if(Tn?.unit!==zr?.unit)return!1;if(Lt.operator==="=")return Tn.value===zr.value;if(Lt.operator==="!=")return Tn.value!==zr.value;if(Lt.operator===">")return Tn.value>zr.value;if(Lt.operator==="<")return Tn.value<zr.value;if(Lt.operator===">=")return Tn.value>=zr.value;if(Lt.operator==="<=")return Tn.value<=zr.value}if("answerCoding"in Lt&&te(Lt.answerCoding)){const Tn=Et?.valueCoding,zr=Lt.answerCoding;if(Lt.operator==="=")return Tn?.code===zr.code;if(Lt.operator==="!=")return Tn?.code!==zr.code}if("answerReference"in Lt&&te(Lt.answerReference)){const Tn=Et?.valueReference,zr=Lt.answerReference;if(Lt.operator==="=")return Tn?.reference===zr.reference;if(Lt.operator==="!=")return Tn?.reference!==zr.reference}if("answerDate"in Lt&&te(Lt.answerDate)||"answerDateTime"in Lt&&te(Lt.answerDateTime)||"answerTime"in Lt&&te(Lt.answerTime)){const Tn=new Date((hn=(qt=(bt=Et?.valueDate)!=null?bt:Et?.valueDateTime)!=null?qt:Et?.valueTime)!=null?hn:""),zr=new Date(Lt.answerDate||Lt.answerDateTime||Lt.answerTime||"");if(Lt.operator==="=")return Tn.getTime()===zr.getTime();if(Lt.operator==="!=")return Tn.getTime()!==zr.getTime();if(Lt.operator===">")return Tn.getTime()>zr.getTime();if(Lt.operator==="<")return Tn.getTime()<zr.getTime();if(Lt.operator===">=")return Tn.getTime()>=zr.getTime();if(Lt.operator==="<=")return Tn.getTime()<=zr.getTime()}return Lt.operator==="exists"?Et!=null===Lt.answerBoolean:!0},be=(Lt,Et,bt)=>{const qt=hn=>{const Tn=ae(bt,hn.question);return Tn.length===0||Tn.every(zr=>!zr.answer||zr.answer.length===0)?pe(hn,void 0):Tn.some(zr=>{var zn;return(zn=zr.answer)==null?void 0:zn.some(gn=>pe(hn,gn&&Object.keys(gn).length>0?gn:void 0))})};return Lt&&Lt?.length>0?Et==="any"?Lt?.some(hn=>qt(hn)):Lt?.every(hn=>qt(hn)):!0},ze=(Lt,Et,bt,qt,hn)=>{if(!Lt||Lt.length===0)return!0;const Tn=zr=>{var zn;let gn;if(qt&&typeof hn=="number"){const Mt=bt.filter(Pt=>Pt.linkId===qt)[hn];if(Mt?.item){const Pt=Mt.item.find(Ut=>Ut.linkId===zr.question);if(Pt?.answer&&Pt.answer.length>0)return(zn=Pt?.answer)==null?void 0:zn.some(Ut=>pe(zr,Ut&&Object.keys(Ut).length>0?Ut:void 0))}}if(!gn){const en=ae(bt,zr.question);if(en.length>0)return en.some(Mt=>{var Pt;return(Pt=Mt.answer)==null?void 0:Pt.some(Ut=>pe(zr,Ut&&Object.keys(Ut).length>0?Ut:void 0))});gn=void 0}return pe(zr,gn)};return Et==="any"?Lt.some(zr=>Tn(zr)):Lt.every(zr=>Tn(zr))},ge=(Lt,Et)=>{var bt;if(!!((bt=Lt?.valueExpression)!=null&&bt.expression))try{const qt=evaluate(Et,Lt.valueExpression.expression);return Array.isArray(qt)?qt.some(hn=>Boolean(hn)):Boolean(qt)}catch{return}},re=(Lt,Et)=>{var bt;const qt=(bt=Lt.extension)==null?void 0:bt.find(Tn=>Tn.url===READ_ONLY_EXPRESSION_EXTENSION_URL),hn=ge(qt,Et);return M(v({},Lt),{readOnly:hn??Lt.readOnly})},se=(Lt,Et,bt,qt)=>{const{required:hn,maxLength:Tn,type:zr,extension:zn,enableWhen:gn,enableBehavior:en,repeats:Mt,answerOption:Pt}=Lt;if(!be(gn,en,Et)||Lt.type==="group"||Lt.type==="display")return"";if(Mt)return me(Lt,Et,bt,qt);const Ut=ne(Lt,Et);return Ut&&J(Ut,Lt)?ve(Lt,Et,bt,Ut,qt):ue(zn,zr,hn,Tn,bt,Pt,qt)},me=(Lt,Et,bt,qt)=>{const{required:hn}=Lt;if(hn){if(!bt||bt.length===0)return x(qt,Translations.VALIDATION_AT_LEAST_ONE_REQUIRED,"At least one item is required");let Tn=!1;for(let zr=0;zr<bt.length;zr++){const zn=bt[zr];if(zn&&Object.keys(zn).length>0&&Object.values(zn).some(en=>en!=null&&en!==""&&(Array.isArray(en)?en.length>0:!0))){Tn=!0;const en=ue(Lt.extension,Lt.type,!0,Lt.maxLength,[zn],Lt.answerOption,qt);if(en)return x(qt,Translations.VALIDATION_ITEM_ERROR,"Item {{index}}: {{error}}",{index:zr+1,error:en});if(Lt.item&&Lt.item.length>0){const Mt=he(Lt.item,Et,Lt.linkId,zr,qt);if(Mt)return x(qt,Translations.VALIDATION_ITEM_ERROR,"Item {{index}}: {{error}}",{index:zr+1,error:Mt})}}else return x(qt,Translations.VALIDATION_ITEM_FIELD_REQUIRED,"Item {{index}}: This field is required",{index:zr+1})}if(!Tn)return x(qt,Translations.VALIDATION_AT_LEAST_ONE_REQUIRED,"At least one item is required")}else if(bt&&bt.length>0)for(let Tn=0;Tn<bt.length;Tn++){const zr=bt[Tn];if(zr&&Object.keys(zr).length>0&&Object.values(zr).some(gn=>gn!=null&&gn!==""&&(Array.isArray(gn)?gn.length>0:!0))){const gn=ue(Lt.extension,Lt.type,!1,Lt.maxLength,[zr],Lt.answerOption,qt);if(gn)return x(qt,Translations.VALIDATION_ITEM_ERROR,"Item {{index}}: {{error}}",{index:Tn+1,error:gn});if(Lt.item&&Lt.item.length>0){const en=he(Lt.item,Et,Lt.linkId,Tn,qt);if(en)return x(qt,Translations.VALIDATION_ITEM_ERROR,"Item {{index}}: {{error}}",{index:Tn+1,error:en})}}}return""},he=(Lt,Et,bt,qt,hn)=>{var Tn,zr;for(const zn of Lt){if(!ze(zn.enableWhen,zn.enableBehavior,Et,bt,qt))continue;const gn=G(Et,bt),en=(Tn=gn?.item)==null?void 0:Tn.find(Pt=>Pt.linkId===zn.linkId),Mt=(zr=en?.answer)!=null&&zr[qt]?[en.answer[qt]]:void 0;if(zn.required){if(!Mt||!Mt[0]||!de(Mt[0]))return x(hn,Translations.VALIDATION_NAMED_FIELD_REQUIRED,"{{fieldName}} is required",{fieldName:zn.text||zn.linkId});const Pt=ue(zn.extension,zn.type,!0,zn.maxLength,Mt,zn.answerOption,hn);if(Pt)return`${zn.text||zn.linkId}: ${Pt}`}else if(Mt&&Mt[0]&&de(Mt[0])){const Pt=ue(zn.extension,zn.type,!1,zn.maxLength,Mt,zn.answerOption,hn);if(Pt)return`${zn.text||zn.linkId}: ${Pt}`}if(zn.item&&zn.item.length>0){const Pt=he(zn.item,Et,zn.linkId,qt,hn);if(Pt)return Pt}}return""},de=Lt=>!Lt||Object.keys(Lt).length===0?!1:Object.values(Lt).some(Et=>Et!=null&&Et!==""&&(Array.isArray(Et)?Et.length>0:!0)),ue=(Lt,Et,bt,qt,hn,Tn,zr)=>{var zn,gn,en,Mt,Pt;let Ut="";const ln=!!Lt?.find(Rr=>{var $r,c0;return Rr.url===A.gD&&((c0=($r=Rr.valueCodeableConcept)==null?void 0:$r.coding)==null?void 0:c0.some(Lo=>Lo.system===A.n4&&Lo.code===A.GI))}),Jt=hn?.[0],En={choice:((zn=Jt?.valueCoding)==null?void 0:zn.code)||(Jt?.valueString&&Tn?.some(Rr=>Rr.valueString===Jt.valueString)?Jt.valueString:null),"open-choice":((gn=Jt?.valueCoding)==null?void 0:gn.code)||Jt?.valueString,boolean:Jt?.valueBoolean,string:Jt?.valueString,text:Jt?.valueString,url:Jt?.valueUri,integer:Jt?.valueInteger,decimal:Jt?.valueDecimal,dateTime:Jt?.valueDateTime,date:Jt?.valueDate,time:Jt?.valueTime,quantity:(en=Jt?.valueQuantity)==null?void 0:en.value,reference:(Mt=Jt?.valueReference)==null?void 0:Mt.display,attachment:(Pt=Jt?.valueAttachment)==null?void 0:Pt.title};if(!(Et in En))return"";const Gn=En[Et],Hr={required:()=>bt&&(Gn==null||Gn===""||Gn==="NaN"||Number.isNaN(Gn)||Et==="boolean"&&Gn!==!0&&ln)?x(zr,u.p.VALIDATION_FIELD_REQUIRED,"This field is required"):"",maxLength:()=>qt&&Gn!==null&&Gn!==void 0&&Gn.toString().length>qt?x(zr,u.p.VALIDATION_MAX_LENGTH,"Input should not exceed {{maxLength}} characters",{maxLength:qt}):"",minLength:()=>{const Rr=I("minLength",Lt);return Rr&&Gn!==null&&Gn!==void 0&&Gn.toString().length<Number(Rr)?x(zr,u.p.VALIDATION_MIN_LENGTH,"Input should be at least {{minLength}} characters",{minLength:Rr}):""},urlRegex:()=>{const Rr=new RegExp(A.rx),$r=I("regexError",Lt),c0=$r??x(zr,u.p.VALIDATION_INVALID_URL,"Please enter a valid url starting from http:// and https://");return Rr&&Et==="url"&&Gn&&!Rr.test(Gn)?String(c0):""},regex:()=>{const Rr=I("regex",Lt);if(!Rr||typeof Gn!="string")return"";const $r=new RegExp(Rr),c0=I("regexError",Lt),Lo=c0??x(zr,u.p.VALIDATION_INVALID_INPUT,"Please enter a valid input");return $r&&Gn&&!$r.test(Gn)?String(Lo):""},dateTime:()=>{if(Et==="dateTime"&&Gn){const Rr=Gn?.toString(),$r=new Date(Rr);return isNaN($r.getTime())?x(zr,u.p.VALIDATION_INVALID_DATETIME,"Please enter a valid date-time"):""}return""},date:()=>{if(Et!=="date"||!Gn)return"";const Rr=Gn.replace(/\D/g,"");return Rr.length>0&&Rr.length<8||isNaN(new Date(Gn).getTime())?x(zr,u.p.VALIDATION_INVALID_DATE,"Invalid date"):""},minValue:()=>{var Rr;if(Et==="date"){const c0=U(A.dU,Lt),Lo=K(c0??"01/01/1900","01/01/1900"),B0=K(Gn,"");if(!Lo||!B0)return"";if((0,s.A)(B0,Lo)){const eo=(Rr=Lt?.find(j0=>j0.url===A.Ck))==null?void 0:Rr.valueString;return eo??x(zr,u.p.VALIDATION_DATE_BEFORE_MIN,"Date should not be before {{minDate}}",{minDate:c0??"01/01/1900"})}return""}const $r=I("minValue",Lt);return $r!=null&&Gn!==null&&Gn!==void 0&&Gn<$r?x(zr,u.p.VALIDATION_MIN_VALUE,"Input should not be less than {{minValue}}",{minValue:$r}):""},maxValue:()=>{var Rr;if(Et==="date"){const c0=U(A.bK,Lt),Lo=K(c0??"01/01/2100","01/01/2100"),B0=K(Gn,"");if(!Lo||!B0)return"";if((0,o.A)(B0,Lo)){const eo=(Rr=Lt?.find(j0=>j0.url===A.Cx))==null?void 0:Rr.valueString;return eo??x(zr,u.p.VALIDATION_DATE_AFTER_MAX,"Date should not be after {{maxDate}}",{maxDate:c0??"01/01/2100"})}return""}const $r=I("maxValue",Lt);return $r!=null&&Gn!==null&&Gn!==void 0&&Gn>$r?x(zr,u.p.VALIDATION_MAX_VALUE,"Input should not exceed {{maxValue}}",{maxValue:$r}):""}};return Ut=Hr.required()||Hr.maxLength()||Hr.minLength()||Hr.urlRegex()||Hr.regex()||Hr.dateTime()||Hr.date()||Hr.minValue()||Hr.maxValue()||"",Ut},ne=(Lt,Et)=>{for(const bt of Et)if(bt.item){if(bt.item.find(Tn=>Tn.linkId===Lt.linkId))return bt;const hn=ne(Lt,bt.item);if(hn)return hn}return null},J=(Lt,Et)=>{if(Lt.answer&&Lt.answer.length>1)return!0;if(Lt.item){const bt=Lt.item.find(qt=>qt.linkId===Et.linkId);if(bt&&bt.answer&&bt.answer.length>1)return!0}return!1},ve=(Lt,Et,bt,qt,hn)=>{var Tn,zr;const{required:zn}=Lt,gn=(Tn=qt.item)==null?void 0:Tn.find(Pt=>Pt.linkId===Lt.linkId),en=gn?.answer||[],Mt=((zr=qt.answer)==null?void 0:zr.length)||1;for(let Pt=0;Pt<Mt;Pt++){const Ut=en[Pt];if(zn){if(!Ut||!de(Ut))return x(hn,Translations.VALIDATION_ITEM_ERROR,"Item {{index}}: {{error}}",{index:Pt+1,error:x(hn,Translations.VALIDATION_NAMED_FIELD_REQUIRED,"{{fieldName}} is required",{fieldName:Lt.text||Lt.linkId})});const ln=ue(Lt.extension,Lt.type,!0,Lt.maxLength,[Ut],Lt.answerOption,hn);if(ln)return x(hn,Translations.VALIDATION_ITEM_ERROR,"Item {{index}}: {{error}}",{index:Pt+1,error:ln})}else if(Ut&&de(Ut)){const ln=ue(Lt.extension,Lt.type,!1,Lt.maxLength,[Ut],Lt.answerOption,hn);if(ln)return x(hn,Translations.VALIDATION_ITEM_ERROR,"Item {{index}}: {{error}}",{index:Pt+1,error:ln})}}return""},Ee=(Lt,Et)=>{for(const bt of Lt){if(bt?.linkId===Et)return bt;if(bt?.item&&bt.item.length>0){const qt=Ee(bt.item,Et);if(qt)return qt}}},De=Lt=>{var Et;return!!((Et=Lt.extension)!=null&&Et.find(bt=>{var qt,hn;return bt.url===ITEM_CONTROL_EXTENSION_URL&&((hn=(qt=bt.valueCodeableConcept)==null?void 0:qt.coding)==null?void 0:hn.some(Tn=>Tn.system===ITEM_CONTROL_EXTENSION_CODING_SYSTEM&&Tn.code===FOOTER_CODE))}))},Se=Lt=>{var Et;return!!((Et=Lt.extension)!=null&&Et.find(bt=>bt.url===A.oA&&bt.valueBoolean))},Ie=Lt=>{var Et;return!!((Et=Lt.extension)!=null&&Et.find(bt=>{var qt,hn;return bt.url===ITEM_CONTROL_EXTENSION_URL&&((hn=(qt=bt.valueCodeableConcept)==null?void 0:qt.coding)==null?void 0:hn.some(Tn=>Tn.system===ITEM_CONTROL_EXTENSION_CODING_SYSTEM&&Tn.code===HEADER_CODE))}))},xe=Lt=>{var Et;return!!((Et=Lt.extension)!=null&&Et.find(bt=>{var qt,hn;return bt.url===A.gD&&((hn=(qt=bt.valueCodeableConcept)==null?void 0:qt.coding)==null?void 0:hn.some(Tn=>Tn.system===A.n4&&Tn.code===A._l))}))},Fe=Lt=>{var Et;return!!((Et=Lt.extension)!=null&&Et.find(bt=>bt.url===QUESTIONNAIRE_CALL_NEXT_QUESTION_EXTENSION_URL&&bt.valueBoolean))},it=Lt=>{var Et;return!!((Et=Lt.extension)!=null&&Et.find(bt=>{var qt,hn;return bt.url===ITEM_CONTROL_EXTENSION_URL&&((hn=(qt=bt.valueCodeableConcept)==null?void 0:qt.coding)==null?void 0:hn.some(Tn=>Tn.system===ITEM_CONTROL_EXTENSION_CODING_SYSTEM&&Tn.code===CHECKBOX_CODE))}))},gt=Lt=>{var Et;const bt=(Et=Lt.extension)==null?void 0:Et.find(qt=>qt.url===A.fe);return bt?.valueInteger},Ot=Lt=>{var Et;const bt=(Et=Lt.extension)==null?void 0:Et.find(qt=>qt.url===A.zO);return bt?.valueInteger},Dt=Lt=>{var Et;const bt=(Et=Lt?.extension)==null?void 0:Et.find(qt=>qt.url===QUESTIONNAIRE_TOTAL_STEPS_EXTENSION_URL);return bt?.valueInteger},Qt=(Lt,Et,bt,qt,hn,Tn)=>{const zr=gn=>Et.filter(en=>en.linkId===gn),zn=new Set;return Lt.map(gn=>{if(zn.has(gn.linkId)||De(gn))return null;const Mt=zr(gn.linkId),Pt=gn.type==="group"&&gn.repeats;if(zn.add(gn.linkId),Pt){const Ut=[];if(Mt.forEach((ln,Jt)=>{const En={linkId:gn.linkId,text:gn.text};let Gn;if(bt===gn.linkId&&typeof Tn=="number"&&Tn===Jt&&hn&&hn.length>0){const Hr=ln?.item||[];Gn=[...Hr],hn.forEach(Rr=>{const $r=Gn.findIndex(c0=>c0.linkId===Rr.linkId);$r>=0?Gn[$r]=M(v({},Hr[$r]),{answer:Rr.answer}):Gn.push(Rr)})}else gn.item&&(Gn=Qt(gn.item,ln?.item||[],bt,qt,hn,Jt));bt===gn.linkId&&typeof Tn=="number"&&Tn===Jt&&qt?En.answer=qt:En.answer=ln.answer||[{}],Gn&&Gn.length>0?En.item=Gn:ln.item&&(En.item=ln.item),Ut.push(En)}),bt===gn.linkId&&typeof Tn=="number"&&Tn>=Mt.length)for(let ln=Mt.length;ln<=Tn;ln++){const Jt={linkId:gn.linkId,text:gn.text,answer:ln===Tn&&qt?qt:[{}]};ln===Tn&&hn&&hn.length>0?Jt.item=hn:gn.item&&(Jt.item=Qt(gn.item,[],void 0,void 0,void 0,void 0)),Ut.push(Jt)}return Ut}else if(gn.repeats&&typeof Tn=="number"&&bt===gn.linkId){const Ut=Mt[0]||{linkId:gn.linkId,text:gn.text,answer:[]},ln={linkId:gn.linkId,text:gn.text,answer:[...Ut.answer||[]]};if(qt&&qt.length>0){for(;ln.answer.length<=Tn;)ln.answer.push({});ln.answer[Tn]=qt[0]}return ln}else{const Ut=Mt[0],ln=gn.item?Qt(gn.item,Ut?.item||[],bt,qt,hn,Tn):void 0,Jt=ln&&ln.length>0,En={linkId:gn.linkId,text:gn.text};return bt&&gn.linkId===bt&&typeof Tn!="number"?(qt||!qt&&!hn?En.answer=qt:Ut?.answer&&(En.answer=Ut.answer),hn?En.item=hn:Jt&&(En.item=ln)):(Ut?.answer?En.answer=Ut.answer:En.answer=[{}],Jt&&(En.item=ln)),En}}).filter(Boolean).flat()},zt=(Lt,Et)=>{for(const bt of Lt)if(bt.linkId===Et||bt.item&&zt(bt.item,Et))return bt.linkId;return null},Ke=(Lt,Et,bt,qt)=>{var hn;const Tn=(hn=Lt?.item)!=null?hn:qt;return!Tn||Tn.length===0?!0:Tn.every(zr=>{var zn;const gn=ae(Et,zr.linkId);if(gn.length===0){const en=(zn=G(Et,zr.linkId))==null?void 0:zn.answer;if(se(zr,Et,en)&&be(zr.enableWhen,zr.enableBehavior,Et)&&bt.includes(zr.linkId))return!1}else for(const en of gn)if(se(zr,Et,en.answer)&&be(zr.enableWhen,zr.enableBehavior,Et)&&bt.includes(zr.linkId))return!1;return zr.item?Ke(zr,Et,bt):!0})},We=(Lt,Et,bt=!0)=>{for(const qt of Lt)if(qt.linkId===Et&&qt.answer&&qt.answer.length>0||qt.item&&qt.item.length>0&&We(qt.item,Et,bt))return!0;return!1},Ct=(Lt,Et,bt=0)=>{const qt=Lt.filter(hn=>hn.linkId===Et);if(qt.length>bt){const hn=qt[bt];if(hn.answer&&hn.answer.length>0)return hn.answer.some(Tn=>Tn&&Object.keys(Tn).length>0&&Object.values(Tn).some(zr=>zr!=null&&zr!==""));if(hn.item&&hn.item.length>0)return We(hn.item,Et,!1)}return We(Lt,Et,!1)},Qe=(Lt,Et)=>{if(!Lt||!Lt.item)return!1;const bt=qt=>{var hn;if(Se(qt)&&qt.required&&be(qt.enableWhen,qt.enableBehavior,Et)){const Tn=G(Et,qt.linkId),zr=ue(qt.extension,qt.type,qt.required,qt.maxLength,Tn?.answer,qt.answerOption);if(!((hn=Tn?.answer)!=null&&hn.length)||zr)return!0}if(qt.item){for(const Tn of qt.item)if(bt(Tn))return!0}return!1};for(const qt of Lt.item)if(bt(qt))return!0;return!1},Ye=Lt=>{var Et,bt,qt;if(Lt.valueString!==void 0)return Lt.valueString;if(Lt.valueBoolean!==void 0)return Lt.valueBoolean;if(Lt.valueInteger!==void 0)return Lt.valueInteger;if(Lt.valueDecimal!==void 0)return Lt.valueDecimal;if(Lt.valueDate!==void 0)return Lt.valueDate;if(Lt.valueDateTime!==void 0)return Lt.valueDateTime;if(((Et=Lt.valueCoding)==null?void 0:Et.code)!==void 0)return Lt.valueCoding.code;if(((bt=Lt.valueReference)==null?void 0:bt.reference)!==void 0)return Lt.valueReference.reference;if(((qt=Lt.valueQuantity)==null?void 0:qt.value)!==void 0)return Lt.valueQuantity.value;if(Lt.valueAttachment!==void 0)return Lt.valueAttachment},It=Lt=>{const Et={linkId:Lt.linkId};if(Lt.answer&&Lt.answer.length>0){const bt=Lt.answer.map(qt=>Ye(qt)).filter(qt=>qt!==void 0);bt.length>0&&(Et.answer=bt)}if(Lt.item&&Lt.item.length>0){const bt=Lt.item.map(qt=>It(qt)).filter(qt=>{const hn=Object.keys(qt);return hn.length>1||hn.length===1&&hn[0]!=="linkId"});bt.length>0&&(Et.item=bt)}return Et},mn=(Lt,Et,bt,qt,hn,Tn)=>{var zr;const zn=(zr=Et?.item)==null?void 0:zr[bt[qt]],gn=zn?.linkId;if(!gn)return!1;const en=ae(Lt,gn),Mt=ae(hn,gn),Pt=Ut=>{if(Ut!=null){if(Array.isArray(Ut)){const ln=Ut.filter(Jt=>Jt!=null).map(Jt=>Pt(Jt)).filter(Jt=>Jt!==void 0);return ln.length===0||ln.length===1&&typeof ln[0]=="object"&&Object.keys(ln[0]).length===0?void 0:ln}if(typeof Ut=="object"){const ln={};for(const[Jt,En]of Object.entries(Ut))if(En!=null){const Gn=Pt(En);Gn!==void 0&&(ln[Jt]=Gn)}return Object.keys(ln).length===0?void 0:ln}return Ut}};if(en.length!==Mt.length)return!1;for(let Ut=0;Ut<en.length;Ut++){const ln=en[Ut],Jt=Mt[Ut];if(!ln||!Jt)return!1;const En=It(Pt(ln)),Gn=It(Pt(Jt));if(!_.isEqual(En,Gn))return!1}return qt!==Tn},Sn=(Lt,Et,bt,qt)=>bt&&bt.length>0&&!(bt.length===1&&Object.keys(bt[0]).length===0)&&se(Lt,Et,bt,qt)||null,et=(Lt,Et,bt)=>{const qt={},hn=Tn=>{Tn.forEach(zr=>{const zn=ae(Et,zr.linkId);if(ye(zr,Lt)||zr.repeats)for(let gn=0;gn<zn.length;gn++){const en=zn[gn];if(en?.answer&&en.answer.length>0){const Mt=Sn(zr,Et,en.answer,bt);Mt&&(qt[zr.linkId]=M(v({},qt[zr.linkId]),{[gn]:Mt}))}}else{const gn=G(Et,zr.linkId);if(gn?.answer&&gn.answer.length>0){const en=Sn(zr,Et,gn.answer,bt);en&&(qt[zr.linkId]={0:en})}}zr.item&&zr.item.length>0&&hn(zr.item)})};return hn(Lt),qt},Rt=Lt=>{if(!Lt)return"";const Et=Lt.split("-");if(Et.length===3){const[bt,qt,hn]=Et;return`${bt.slice(-4)}-${qt}-${hn}`}return""},kt=Lt=>Lt.trim().replace(/[A-Za-z]+/g,""),qn=(Lt,Et)=>{const bt=(qt,hn)=>{for(const Tn of qt){if(Tn.linkId===hn)return Tn.answer;if(Tn.item&&Tn.item.length>0){const zr=bt(Tn.item,hn);if(zr!==void 0)return zr}}};return bt(Lt,Et)},Sr=(Lt,Et)=>{if(!Et||Et.length===0)return null;const bt=Lt.linkId,qt=(hn,Tn,zr=[])=>{for(const zn of hn){const gn=[...zr,zn];if(zn.item){if(zn.item.some(Pt=>Pt.linkId===Tn))return gn.some(Pt=>Pt.repeats===!0)?zn:null;if(qt(zn.item,Tn,gn))return zn}}return null};return qt(Et,bt)},pn=(Lt,Et)=>{if(!Et||Et.length===0)return!1;const bt=Lt.linkId,qt=(hn,Tn,zr=[])=>{for(const zn of hn){const gn=[...zr,zn];if(zn.item){if(zn.item.some(Pt=>Pt.linkId===Tn))return gn.some(Pt=>{const Ut=T(Pt.extension||[]);return!!Ut&&Ut!==UI_TOOLKIT_FORM_CONTAINER});if(qt(zn.item,Tn,gn))return!0}}return!1};return qt(Et,bt)},Ln=(Lt,Et,bt)=>{const qt={};if(!Lt)return qt;const{linkId:hn}=Et;if(Lt[hn]){const Tn=Lt[hn];qt[hn]=Tn[bt]||""}return Et.item&&Et.item.length>0&&Et.item.forEach(Tn=>{if(Lt[Tn.linkId]){const zr=Lt[Tn.linkId];qt[Tn.linkId]=zr[bt]||""}}),qt},mr=(Lt,Et)=>{const bt={};if(!Lt||!Lt[Et])return bt;const qt=Lt[Et];return bt[Et]=qt[0]||"",bt},Bn=Lt=>{const Et=Lt.findIndex(Tn=>!Se(Tn)),bt=Et>=0?[Et]:[],qt=new Map;let hn=null;if(Lt.forEach((Tn,zr)=>{const zn=xe(Tn);if(zn&&Tn.type==="group")zr!==Et&&bt.push(zr),qt.set(zr,[zr]),hn=zr;else if(hn!==null&&!zn){const gn=qt.get(hn)||[];qt.set(hn,[...gn,zr])}}),Lt.length>0&&bt.length>0){const Tn=bt[0];if(!qt.has(Tn)){const zr=bt.find(gn=>gn>Tn),zn=[];for(let gn=Tn;gn<(zr??Lt.length);gn++)zn.push(gn);qt.set(Tn,zn)}}return{groupIndices:bt,itemsToRenderMap:qt}},Xr=(Lt,Et,bt,qt)=>{let hn=[...qt];const Tn=(zr,zn)=>{zr.forEach(gn=>{if((!gn?.enableWhen||be(gn?.enableWhen,gn.enableBehavior,zn))&&gn.initial&&!We(zn,gn.linkId))if(gn.repeats){const en=zn.filter(Mt=>Mt.linkId===gn.linkId);en.length>0?en.forEach((Mt,Pt)=>{Ct(zn,gn.linkId,Pt)||(hn=Qt(bt,hn,gn.linkId,gn.initial,void 0,Pt))}):hn=Qt(bt,hn,gn.linkId,gn.initial)}else hn=Qt(bt,hn,gn.linkId,gn.initial);gn.item&&Tn(gn.item,zn)})};return Tn(Lt,Et),hn},Qr=(Lt,Et,bt)=>{if(!Lt)return[];const qt=[],hn=Tn=>{Tn.required===Et&&be(Tn.enableWhen,Tn.enableBehavior,bt)&&!Se(Tn)&&Tn.type!=="display"&&qt.push(Tn),Tn.item&&Tn.item.length>0&&Tn.item.forEach(hn)};return Lt.forEach(hn),qt},Nt=(Lt,Et)=>Lt.every(bt=>{var qt;const hn=ae(Et,bt.linkId);if(hn.length>0)return hn.every(Tn=>!se(bt,Et,Tn.answer));{const Tn=(qt=G(Et,bt.linkId))==null?void 0:qt.answer;return!se(bt,Et,Tn)}}),_e=(Lt,Et)=>{let bt=-1;for(let qt=Lt.length-1;qt>=0;qt--)if(Lt[qt].linkId===Et){bt=qt;break}return bt},ot=(Lt,Et)=>Lt.filter(bt=>bt.linkId!==Et).map(bt=>bt.item&&bt.item.length>0?M(v({},bt),{item:ot(bt.item,Et)}):bt),Je=(Lt,Et,bt=Lt)=>Lt.reduce((qt,hn)=>{const Tn=Ee(Et,hn.linkId);return Tn?.enableWhen&&!be(Tn.enableWhen,Tn.enableBehavior,bt)||(hn.item&&hn.item.length>0?qt.push(M(v({},hn),{item:Je(hn.item,Et,bt)})):qt.push(hn)),qt},[]),tt=(Lt,Et,bt=[])=>{const qt=[],hn=Tn=>{Tn.forEach(zr=>{qt.push(zr.linkId),zr.item&&zr.item.length>0&&hn(zr.item)})};for(let Tn=0;Tn<Lt.length;Tn++){const zr=Lt[Tn];if(zr.linkId===Et){const zn=Lt.slice(0,Tn+1),gn=Lt.slice(Tn+1),{kept:en,removed:Mt}=gn.reduce((Pt,Ut)=>{const ln=Ee(bt,Ut.linkId);return!ln||Se(ln)&&be(ln.enableWhen,ln.enableBehavior,zn)?Pt.kept.push(Ut):Pt.removed.push(Ut),Pt},{kept:[],removed:[]});return hn(Mt),{trimmedData:[...zn,...en],trimmedLinkIds:qt,found:!0}}if(zr.item&&zr.item.length>0){const zn=tt(zr.item,Et,bt);if(zn.found){const gn=Lt.slice(0,Tn),en=Lt.slice(Tn+1),Mt=[...gn,M(v({},zr),{item:zn.trimmedData})],{kept:Pt,removed:Ut}=en.reduce((ln,Jt)=>{const En=Ee(bt,Jt.linkId);return!En||Se(En)&&be(En.enableWhen,En.enableBehavior,Mt)?ln.kept.push(Jt):ln.removed.push(Jt),ln},{kept:[],removed:[]});return hn(Ut),{trimmedData:[...Mt,...Pt],trimmedLinkIds:[...zn.trimmedLinkIds,...qt],found:!0}}}}return{trimmedData:Lt,trimmedLinkIds:[],found:!1}},rt=(Lt,Et)=>Lt.filter(bt=>!Et.includes(bt.linkId)).map(bt=>bt.item&&bt.item.length>0?M(v({},bt),{item:rt(bt.item,Et)}):bt),lt=Lt=>{var Et;if(!Lt)return"empty";const bt=A.Z$.find(({patterns:qt})=>qt.some(hn=>Lt.includes(hn)));return(Et=bt?.type)!=null?Et:"empty"},St=(Lt,Et)=>{const{groupIndices:bt}=Bn(Lt),qt=Lt.findIndex(hn=>hn.linkId===Et);return qt!==-1?bt.indexOf(qt):-1},st=Lt=>{if(!Lt)return{restriction:null,warning:null};const Et=bt=>{const qt=Lt.find(Tn=>Tn.url===bt&&Tn.valueString);if(!qt?.valueString)return null;const hn=qt.valueString.replace(/\\n/g,`
|
|
869
|
+
`}}customElements.get(ve)===void 0&&customElements.define(ve,Ee);const De=[{name:"loader",defaultElement:document.createElement(ne)},{name:"error",defaultElement:document.createElement(ve)}],Se=["error","loading"],Ie={error:"error",loading:"loader"},xe=({src:Ot,elementNameSuffix:Dt,version:Qt,prefetchFeatureApp:zt})=>(0,p.__awaiter)(void 0,void 0,void 0,function*(){var Ke,We,Ct,Qe,Ye,It,mn,Sn,et,Rt,kt,qn,Sr,pn,Ln;window.bwell||(window.bwell=new ue({metadata:{version:Qt}}));const mr=`bwell-${Dt}`;if(customElements.get(mr)!==void 0)return;class Bn extends h{constructor(){super(),Ke.add(this),We.set(this,(0,z.nanoid)()),Ct.set(this,void 0),Qe.set(this,document.createElement("feature-app-loader")),Ye.set(this,new q.EventEmitter),It.set(this,void 0),mn.set(this,void 0),Sn.set(this,void 0),et.set(this,void 0),Rt.set(this,void 0),kt.set(this,void 0),this.attachShadow({mode:"open"});const Qr=new pe(De).attachToShadowRoot(this.shadowRoot);Qr.addEventListener("visibilitychange",({visibility:Nt,container:_e,name:ot})=>{ot==="error"&&Nt==="visible"&&window.bwell._registerEmbeddableContent(_e),(0,p.__classPrivateFieldGet)(this,Qe,"f").style.display=Nt==="hidden"?"unset":"hidden"}),(0,p.__classPrivateFieldSet)(this,kt,{slots:Qr,attributes:new V().bindTo(this),loaderEventEmitter:(0,p.__classPrivateFieldGet)(this,Ye,"f")},"f"),(0,p.__classPrivateFieldSet)(this,It,(0,p.__classPrivateFieldGet)(this,Ke,"m",qn).bind(this),"f"),(0,p.__classPrivateFieldSet)(this,mn,(0,p.__classPrivateFieldGet)(this,Ke,"m",Sr).bind(this),"f"),(0,p.__classPrivateFieldSet)(this,Sn,(0,p.__classPrivateFieldGet)(this,Ke,"m",Ln).call(this,"error"),"f"),(0,p.__classPrivateFieldSet)(this,et,(0,p.__classPrivateFieldGet)(this,Ke,"m",Ln).call(this,"loading"),"f")}connectedCallback(){return(0,p.__awaiter)(this,void 0,void 0,function*(){(0,p.__classPrivateFieldGet)(this,Sn,"f").call(this,(0,p.__classPrivateFieldGet)(this,kt,"f").attributes.get("error")),(0,p.__classPrivateFieldGet)(this,et,"f").call(this,(0,p.__classPrivateFieldGet)(this,kt,"f").attributes.get("loading")),(0,p.__classPrivateFieldGet)(this,kt,"f").slots.addEventListener("visibilitychange",(0,p.__classPrivateFieldGet)(this,mn,"f")),(0,p.__classPrivateFieldGet)(this,kt,"f").attributes.addChangeListener("error",(0,p.__classPrivateFieldGet)(this,Sn,"f")),(0,p.__classPrivateFieldGet)(this,kt,"f").attributes.addChangeListener("loading",(0,p.__classPrivateFieldGet)(this,et,"f")),(0,p.__classPrivateFieldGet)(this,kt,"f").slots.showSlot("loader");try{yield window.bwell.validateLoad()}catch{(0,p.__classPrivateFieldGet)(this,kt,"f").slots.showSlot("error")}(0,p.__classPrivateFieldSet)(this,We,this.id||(0,p.__classPrivateFieldGet)(this,We,"f"),"f"),(0,p.__classPrivateFieldSet)(this,Ct,new T((0,p.__classPrivateFieldGet)(this,We,"f")),"f"),(0,p.__classPrivateFieldGet)(this,Ct,"f").registerDispatcher(Qr=>this.dispatchEvent(Qr)),window.bwell.isInitialized?(0,p.__classPrivateFieldGet)(this,It,"f").call(this):(window.bwell.once("initialized",(0,p.__classPrivateFieldGet)(this,It,"f")),window.bwell.once("error",()=>{(0,p.__classPrivateFieldGet)(this,kt,"f").slots.showSlot("error")}),zt&&(0,b.h)(Ot).catch(()=>{(0,p.__classPrivateFieldGet)(this,kt,"f").slots.showSlot("error")}))})}disconnectedCallback(){var Qr;(0,p.__classPrivateFieldGet)(this,Ye,"f").emit("disconnect"),(0,p.__classPrivateFieldGet)(this,kt,"f").slots.removeEventListener("visibilitychange",(0,p.__classPrivateFieldGet)(this,mn,"f")),(0,p.__classPrivateFieldGet)(this,kt,"f").attributes.removeChangeListener("error",(0,p.__classPrivateFieldGet)(this,Sn,"f")),(0,p.__classPrivateFieldGet)(this,kt,"f").attributes.removeChangeListener("loading",(0,p.__classPrivateFieldGet)(this,et,"f")),(Qr=(0,p.__classPrivateFieldGet)(this,Ct,"f"))===null||Qr===void 0||Qr.deregister(),(0,p.__classPrivateFieldGet)(this,Ye,"f").removeAllListeners()}}We=new WeakMap,Ct=new WeakMap,Qe=new WeakMap,Ye=new WeakMap,It=new WeakMap,mn=new WeakMap,Sn=new WeakMap,et=new WeakMap,Rt=new WeakMap,kt=new WeakMap,Ke=new WeakSet,qn=function(){(0,p.__classPrivateFieldGet)(this,Qe,"f").setAttribute("featureAppId",`bwell-embeddable:${mr}`),(0,p.__classPrivateFieldGet)(this,Qe,"f").setAttribute("src",Ot),(0,p.__classPrivateFieldGet)(this,Qe,"f").config={id:(0,p.__classPrivateFieldGet)(this,We,"f"),name:Dt,elementName:mr,utils:(0,p.__classPrivateFieldGet)(this,kt,"f")},this.shadowRoot.appendChild((0,p.__classPrivateFieldGet)(this,Qe,"f"))},Sr=function({visibility:Qr,name:Nt}){(0,p.__classPrivateFieldGet)(this,Qe,"f").style.display=Qr==="hidden"?"unset":"hidden"},pn=function(Qr){(0,p.__classPrivateFieldGet)(this,Rt,"f")(),(0,p.__classPrivateFieldSet)(this,Rt,void 0,"f")},Ln=function(Qr){return Nt=>{const _e=Se.findIndex(Je=>Je===Qr);if(!Se.slice(0,_e).some(Je=>(0,p.__classPrivateFieldGet)(this,kt,"f").attributes.get(Je)!==null)){if(Nt!==null)(0,p.__classPrivateFieldGet)(this,Rt,"f")&&(0,p.__classPrivateFieldGet)(this,Ke,"m",pn).call(this,Qr),(0,p.__classPrivateFieldSet)(this,Rt,(0,p.__classPrivateFieldGet)(this,kt,"f").slots.showSlotLocked(Ie[Qr]),"f");else if(Nt===null&&(0,p.__classPrivateFieldGet)(this,Rt,"f")){(0,p.__classPrivateFieldGet)(this,Ke,"m",pn).call(this,Qr);const Je=Se.find(tt=>(0,p.__classPrivateFieldGet)(this,kt,"f").attributes.get(tt)!==null);Je&&(0,p.__classPrivateFieldSet)(this,Rt,(0,p.__classPrivateFieldGet)(this,kt,"f").slots.showSlotLocked(Ie[Je]),"f")}}}},customElements.define(mr,Bn)}),Fe={rE:"1.1161.1"},it="composite";var gt=e(67321);xe({src:`https://embeddables.prod.icanbwell.com/${it}/${Fe.rE}/scripts/embeddable.federated.js`,elementNameSuffix:it,version:Fe.rE,prefetchFeatureApp:!0})},79566:(Y,l,e)=>{"use strict";var n=e(31085),t=e(94043),r=e(45250),s=e(35473),o=e(25624),i=Object.defineProperty,a=Object.defineProperties,g=Object.getOwnPropertyDescriptors,c=Object.getOwnPropertySymbols,u=Object.prototype.hasOwnProperty,C=Object.prototype.propertyIsEnumerable,A=(b,h,f)=>h in b?i(b,h,{enumerable:!0,configurable:!0,writable:!0,value:f}):b[h]=f,m=(b,h)=>{for(var f in h||(h={}))u.call(h,f)&&A(b,f,h[f]);if(c)for(var f of c(h))C.call(h,f)&&A(b,f,h[f]);return b},d=(b,h)=>a(b,g(h));const O=(b,h,f)=>{const v=_.cloneDeep(b);if(!v.contained||h<0)return v;const M=v.contained.findIndex(x=>x.resourceType==="Questionnaire");if(M!==-1&&!f){const x=v.contained[M];if(x.item){if(!x.item.some(y=>isPageExtensionPresent(y)))return v;let z=0,S=x.item.length;for(let y=0;y<x.item.length;y++){const E=x.item[y];if(isPageExtensionPresent(E)){if(z===h+1){S=y;break}z++}}x.item=x.item.slice(0,S),v.contained[M]=x}}else f&&M!==-1&&(v.contained[M]=d(m({},v.contained[M]),{item:f}));return v},p=({formId:b,questionnaireResponse:h,showQuestionPrefix:f,nextQuestion:v,onGoBack:M,handleHiddenQuestion:x,errorConfig:T,onClearError:z,customErrorConfigurations:S,showStepper:y,hideBackButton:E,onFormDataChange:R,externalComponentRenderMap:P,className:L,children:D})=>{var N,w,V;const{currentGroupIndex:q,hasCustomError:I}=useFHIRQuestionnaire(),k=(N=h.questionnaire)==null?void 0:N.replace("#",""),U=(w=h?.contained)==null?void 0:w.find(K=>K.id===k&&K.resourceType==="Questionnaire"),F=(K,G,ae)=>{let oe=_.cloneDeep(h);oe.item=K,oe=trimQuestionnaireItems(oe,q,ae),v(oe,G)};return jsx("div",{className:cx(`${I?"mb-3":"mb-8"} flex w-full flex-col gap-8`,L),children:jsx(FHIRQuestionnaire,{formId:b,onFormDataChange:R,questionnaireResponseItem:(V=h?.item)!=null?V:[],questionnaireSchema:U,status:h.status,showQuestionPrefix:f,errorConfig:T,customErrorConfigurations:S,isAdaptiveFlow:!0,onComplete:F,onGoBack:M,onClearError:z,handleHiddenQuestion:x,showStepper:y,hideBackButton:E,externalComponentRenderMap:P,children:D})})}},19622:(Y,l,e)=>{"use strict";e.d(l,{K:()=>v});var n=e(31085),t=e(14041),r=e(94043),s=e(76323),o=e(36087),i=e(56192),a=e(76808),g=e(66267),c=Object.defineProperty,u=Object.defineProperties,C=Object.getOwnPropertyDescriptors,A=Object.getOwnPropertySymbols,m=Object.prototype.hasOwnProperty,d=Object.prototype.propertyIsEnumerable,O=(M,x,T)=>x in M?c(M,x,{enumerable:!0,configurable:!0,writable:!0,value:T}):M[x]=T,p=(M,x)=>{for(var T in x||(x={}))m.call(x,T)&&O(M,T,x[T]);if(A)for(var T of A(x))d.call(x,T)&&O(M,T,x[T]);return M},b=(M,x)=>u(M,C(x)),h=(M,x,T)=>new Promise((z,S)=>{var y=P=>{try{R(T.next(P))}catch(L){S(L)}},E=P=>{try{R(T.throw(P))}catch(L){S(L)}},R=P=>P.done?z(P.value):Promise.resolve(P.value).then(y,E);R((T=T.apply(M,x)).next())});const f=10,v=({id:M="location-filter-desktop",initialValue:x,onInputChange:T,onValueChange:z,isDisabled:S=!1,className:y="",setIsLoading:E,errorText:R})=>{const P=(0,a.Ul)(),{i18n:{t:L},loading:D}=(0,g.E_)({keys:["shared-translations"]}),N=x?.placeId,w=x?.description,[V,q]=(0,t.useState)(""),[I,k]=(0,t.useState)(""),[U,F]=(0,t.useState)(null),[K,G]=(0,t.useState)(null),[ae,oe]=(0,t.useState)(!1),te=(0,t.useRef)(!1),pe=[{id:"placeholder",label:"No Locations",isDisabled:!0}],[be,ze]=(0,t.useState)(pe),[ge,re]=(0,t.useState)(pe),[se,{loading:me,error:he}]=(0,i.Ncb)({fetchPolicy:"cache-first",onError:()=>{P?.error("Failed to fetch geocode data")}}),[de,{loading:ue,error:ne}]=(0,i.qtq)({fetchPolicy:"cache-first",onError:()=>{P?.error("Failed to fetch geocode by lat/lon data")}}),[J,{loading:ve,error:Ee}]=(0,i.zUC)({fetchPolicy:"cache-first",onError:()=>{P?.error("Failed to fetch place autocomplete data"),ze(pe)},onCompleted:Qt=>{var zt,Ke;const We=(Ke=(zt=Qt.placeAutocomplete)==null?void 0:zt.predictions)==null?void 0:Ke.map(Ct=>{var Qe;return{id:Ct.placeId,label:(0,s.removeAfterLastComma)(Ct.description),mainText:Ct?.mainText||((Qe=Ct.description.split(",")[0])==null?void 0:Qe.trim()),secondaryText:(0,s.removeAfterLastComma)(Ct?.secondaryText||Ct.description.split(",").slice(1).join(",").trim())}});ze(We?.length?We:pe)}}),De=(0,t.useMemo)(()=>be.map(Qt=>b(p({},Qt),{displayLabel:(0,r.RZ)(Qt?.label||"",V)})),[V,be]),Se=Qt=>h(void 0,null,function*(){var zt,Ke,We,Ct,Qe,Ye,It,mn,Sn,et,Rt,kt,qn,Sr,pn,Ln;if(F(Qt),G(Qt),oe(!1),Qt&&typeof Qt=="string"){const mr=be.find(tt=>tt.id===Qt),Bn=mr?.label||V;if(!mr)return;q(Bn),k(Bn),setTimeout(()=>{const tt=[{id:mr.id,label:mr.label}];ze(tt),re(tt)},f);const Xr=yield se({variables:{placeId:Qt}}),Qr=(Ke=(zt=Xr?.data)==null?void 0:zt.geocodingByPlaceId)==null?void 0:Ke.latitude,Nt=(Ct=(We=Xr?.data)==null?void 0:We.geocodingByPlaceId)==null?void 0:Ct.longitude,_e=((Ye=(Qe=Xr?.data)==null?void 0:Qe.geocodingByPlaceId)==null?void 0:Ye.zipCode)||"",ot=((mn=(It=Xr?.data)==null?void 0:It.geocodingByPlaceId)==null?void 0:mn.state)||"",Je=((et=(Sn=Xr?.data)==null?void 0:Sn.geocodingByPlaceId)==null?void 0:et.stateCode)||"";if(Qr&&Nt)if(!_e||!Je){const tt=yield de({variables:{latitude:String(Qr),longitude:String(Nt)}}),rt=((kt=(Rt=tt?.data)==null?void 0:Rt.geocodingByLatLon)==null?void 0:kt.zipCode)||"",lt=((Sr=(qn=tt?.data)==null?void 0:qn.geocodingByLatLon)==null?void 0:Sr.state)||"",St=((Ln=(pn=tt?.data)==null?void 0:pn.geocodingByLatLon)==null?void 0:Ln.stateCode)||"";z({latitude:Qr,longitude:Nt,zipCode:rt,state:lt,stateCode:St,placeId:Qt,description:Bn,value:Qt})}else z({latitude:Qr,longitude:Nt,zipCode:_e,state:ot,stateCode:Je,placeId:Qt,description:Bn,value:Qt});else oe(!0)}}),Ie=()=>!0,xe=(0,s.useDebounce)(Qt=>h(void 0,null,function*(){return yield J({variables:{input:Qt,types:"geocode"}})})),Fe=Qt=>h(void 0,null,function*(){if(oe(!1),q(Qt),T?.(Qt),!Qt||Qt.trim().length===0){F(null),ze(pe),z({latitude:0,longitude:0,zipCode:"",state:"",stateCode:"",placeId:"",description:"",value:Qt});return}const zt=Qt.trim();zt.length>=2?yield xe(zt):ze(pe)}),it=Qt=>{te.current=Qt},gt=()=>{q(I),ze(ge),F(K)};(0,t.useEffect)(()=>{(()=>h(void 0,null,function*(){var zt,Ke,We,Ct,Qe,Ye,It,mn,Sn,et,Rt,kt,qn,Sr,pn,Ln;if(N&&w){ze([{id:N,label:V||w}]),re([{id:N,label:V||w}]),F(N),G(N),q(w),k(w),w===V&&q(w);const mr=yield se({variables:{placeId:N}}),Bn=(Ke=(zt=mr?.data)==null?void 0:zt.geocodingByPlaceId)==null?void 0:Ke.latitude,Xr=(Ct=(We=mr?.data)==null?void 0:We.geocodingByPlaceId)==null?void 0:Ct.longitude,Qr=((Ye=(Qe=mr?.data)==null?void 0:Qe.geocodingByPlaceId)==null?void 0:Ye.zipCode)||"",Nt=((mn=(It=mr?.data)==null?void 0:It.geocodingByPlaceId)==null?void 0:mn.state)||"",_e=((et=(Sn=mr?.data)==null?void 0:Sn.geocodingByPlaceId)==null?void 0:et.stateCode)||"";if(Bn&&Xr)if(!Qr||!Nt||!_e){const ot=yield de({variables:{latitude:String(Bn),longitude:String(Xr)}}),Je=((kt=(Rt=ot?.data)==null?void 0:Rt.geocodingByLatLon)==null?void 0:kt.zipCode)||"",tt=((Sr=(qn=ot?.data)==null?void 0:qn.geocodingByLatLon)==null?void 0:Sr.state)||"",rt=((Ln=(pn=ot?.data)==null?void 0:pn.geocodingByLatLon)==null?void 0:Ln.stateCode)||"";z({latitude:Bn,longitude:Xr,zipCode:Je,state:tt,stateCode:rt,placeId:N,description:w,value:N})}else z({latitude:Bn,longitude:Xr,zipCode:Qr,state:Nt,stateCode:_e,placeId:N,description:w,value:N})}else F(null),G(null),q(""),k(""),ze(pe),re(pe)}))()},[]);const Ot=ae||!!he||!!ne||!!Ee||!!R,Dt=Ot?R||L("ADDRESS_TYPEAHEAD_ERROR"):"";return(0,t.useEffect)(()=>{E&&E(me||ue||D)},[E,me,ue,D]),(0,n.jsx)("div",{className:y,children:(0,n.jsx)(o.Select.ComboBox,{id:M,size:"md",isDisabled:S,inputValue:V,isLoading:ve||me||ue,placeholder:L("ADDRESS_AUTO_COMPLETE_PLACEHOLDER"),items:De,selectedKey:U,onSelectionChange:Se,onInputChange:Fe,defaultFilter:Ie,onOpenChange:it,onBlur:gt,isInvalid:Ot,hint:Dt,autoComplete:"address-line1",className:"w-full",children:Qt=>{const zt=Qt,Ke=V.trim().length>=2,We=zt.mainText||"",Ct=zt.secondaryText||"",Qe=We.trim().length>0,Ye=Ct.trim().length>0,It=Qe?(0,r.RZ)(We,V):{beforePart:"",highlightedPart:"",remainingPart:""},mn=Ye?(0,r.RZ)(Ct,V):{beforePart:"",highlightedPart:"",remainingPart:""};return(0,n.jsx)(o.Select.Item,{id:zt.id,supportingText:zt.supportingText,isDisabled:zt.isDisabled,icon:zt.icon,avatarUrl:zt.avatarUrl,textValue:zt.label,children:Ke&&Qe?(0,n.jsxs)("div",{className:"flex min-w-0 flex-col",children:[(0,n.jsxs)("div",{className:"truncate text-sm font-medium",children:[(0,n.jsx)("span",{children:It.beforePart}),(0,n.jsx)("span",{className:"text-brand-primary font-semibold",children:It.highlightedPart}),(0,n.jsx)("span",{children:It.remainingPart})]}),Ye&&(0,n.jsxs)("div",{className:"truncate text-xs text-gray-600",children:[(0,n.jsx)("span",{children:mn.beforePart}),(0,n.jsx)("span",{className:"text-brand-primary font-semibold",children:mn.highlightedPart}),(0,n.jsx)("span",{children:mn.remainingPart})]})]}):(0,n.jsx)("div",{className:"truncate",children:zt.label})})}})})}},18077:()=>{},12200:(Y,l,e)=>{"use strict";e.d(l,{AddressTypeahead:()=>n.K});var n=e(19622),t=e(18077),r=e.n(t);e.o(t,"BWELL_STORED_TOKENS_KEY")&&e.d(l,{BWELL_STORED_TOKENS_KEY:function(){return t.BWELL_STORED_TOKENS_KEY}}),e.o(t,"DeviceLocationProvider")&&e.d(l,{DeviceLocationProvider:function(){return t.DeviceLocationProvider}}),e.o(t,"LocationPermissionEnum")&&e.d(l,{LocationPermissionEnum:function(){return t.LocationPermissionEnum}}),e.o(t,"LocationType")&&e.d(l,{LocationType:function(){return t.LocationType}}),e.o(t,"SchedulingLocationCard")&&e.d(l,{SchedulingLocationCard:function(){return t.SchedulingLocationCard}}),e.o(t,"formatPhoneNumber")&&e.d(l,{formatPhoneNumber:function(){return t.formatPhoneNumber}}),e.o(t,"getInitials")&&e.d(l,{getInitials:function(){return t.getInitials}}),e.o(t,"removeAfterLastComma")&&e.d(l,{removeAfterLastComma:function(){return t.removeAfterLastComma}}),e.o(t,"shouldForceLogoutAfterAuthFailure")&&e.d(l,{shouldForceLogoutAfterAuthFailure:function(){return t.shouldForceLogoutAfterAuthFailure}}),e.o(t,"unformatPhoneNumber")&&e.d(l,{unformatPhoneNumber:function(){return t.unformatPhoneNumber}}),e.o(t,"useDebounce")&&e.d(l,{useDebounce:function(){return t.useDebounce}}),e.o(t,"useDeviceDetection")&&e.d(l,{useDeviceDetection:function(){return t.useDeviceDetection}}),e.o(t,"useDeviceLocationContext")&&e.d(l,{useDeviceLocationContext:function(){return t.useDeviceLocationContext}}),e.o(t,"useRedirect")&&e.d(l,{useRedirect:function(){return t.useRedirect}}),e.o(t,"useSearchQueryParams")&&e.d(l,{useSearchQueryParams:function(){return t.useSearchQueryParams}})},52113:(Y,l,e)=>{"use strict";var n=e(31085),t=e(36087),r=e(87896);const s=({icon:o,title:i})=>{const{isSmallScreen:a}=useDeviceDetection();return jsx("div",{className:`tw-preflight mb-5 flex justify-center ${a?"-mx-5 -mt-5":""}`,children:jsxs("div",{className:`max-w bg-utility-blue-50 border-utility-blue-200 flex h-12 w-full flex-row items-center gap-3 border-t border-b pl-5 ${a?"":"rounded-lg border-r border-l"}`,children:[o??jsx(FileSearch02,{size:20}),jsxs(Typography,{className:"text-md text-primary font-normal",tag:"h3",children:[i,jsx("span",{className:"animate-pulse",children:"..."})]})]})})}},87858:(Y,l,e)=>{"use strict";var n=e(31085),t=e(36087),r=e(66267),s=e(64081),o=e(52449);const i=({className:a})=>{const{pathname:g}=useLocation(),c=useNavigationService(),u=useBreadcrumbsConfig(),{overrides:C}=useBreadcrumbsOverrideContext(),{loading:A,i18n:{t:m}}=useI18nChild({keys:["shared"]}),d=getPathSegments(g).flatMap(O=>{const p=c.getId(O),b=c.getRouteMeta(p)||{},h=getBreadcrumbTitleKey(p,b,u);if(!h||b.breadcrumbHide)return[];const f=C[p];let v=c.getHref(p),M=h;return f&&(f.href?v=f.href:f.search&&(v=c.getHref({id:p,search:f.search})),f.titleKey&&(M=f.titleKey)),[{routeId:p,href:v,label:m(M),onClick:f?.onClick}]});return A||d.length<=1?null:jsx(BreadcrumbsBase,{type:"button",className:cx("tw-preflight hidden lg:block",a),children:d.map(O=>jsx(BreadcrumbsBase.Item,{href:O.href,onClick:O.onClick,children:O.label},O.routeId))})}},85449:(Y,l,e)=>{"use strict";e.d(l,{rJ:()=>y,GU:()=>S});var n=e(31085),t=e(14041),r=e(76323),s=e(78579),o=e(76808),i=e(5380),a=e(87896),g=e(26877);const c=(E,R)=>new Promise((P,L)=>setTimeout(()=>L(new Error(R)),E)),u=(E,R,P)=>Promise.race([E,c(R,P)]),C=5e3,A=1e4;var m=Object.defineProperty,d=Object.defineProperties,O=Object.getOwnPropertyDescriptors,p=Object.getOwnPropertySymbols,b=Object.prototype.hasOwnProperty,h=Object.prototype.propertyIsEnumerable,f=(E,R,P)=>R in E?m(E,R,{enumerable:!0,configurable:!0,writable:!0,value:P}):E[R]=P,v=(E,R)=>{for(var P in R||(R={}))b.call(R,P)&&f(E,P,R[P]);if(p)for(var P of p(R))h.call(R,P)&&f(E,P,R[P]);return E},M=(E,R)=>d(E,O(R)),x=(E,R,P)=>new Promise((L,D)=>{var N=q=>{try{V(P.next(q))}catch(I){D(I)}},w=q=>{try{V(P.throw(q))}catch(I){D(I)}},V=q=>q.done?L(q.value):Promise.resolve(q.value).then(N,w);V((P=P.apply(E,R)).next())});const T={enableHighAccuracy:!0,maximumAge:3e4,timeout:15e3},z=(0,t.createContext)({loading:!1,overrideSearchSettings:()=>Promise.resolve(),locationPermission:void 0,setLocationPermission:()=>{},position:void 0,refreshPosition:()=>Promise.resolve(void 0),requestPosition:()=>Promise.resolve(void 0),requestCurrentLocation:()=>Promise.resolve(),checkLocaitonPermission:()=>Promise.resolve(void 0)}),S=()=>(0,t.useContext)(z),y=({children:E})=>{var R;const{mobileOS:P}=(0,r.useDeviceDetection)(),L=(0,o.Ul)(),{geolocation:D}=(0,s.c)(),{queryParams:N,setQueryParams:w}=(0,a.useSearchQueryParams)(),V=(0,t.useRef)(!1),q=(0,t.useRef)(N);(0,t.useEffect)(()=>{q.current=N},[N]);const[I,k]=(0,t.useState)(!1),[U,F]=(0,t.useState)((R=N.locationPermission)!=null?R:void 0),[K,G]=(0,t.useState)(),[ae,oe]=(0,t.useState)(!1),te=(0,t.useCallback)(ve=>{F(ve);try{w(M(v({},q.current),{locationPermission:ve||i.Ef.UNAVAILABLE}))}catch(Ee){Ee instanceof Error?L?.error(Ee,"Failed to update query params"):L?.error(`Failed to update query params - ${JSON.stringify(Ee)}`)}},[w,L]),pe=(0,t.useCallback)(()=>x(void 0,null,function*(){try{return yield D.isAvailable()}catch(ve){return ve instanceof Error?L?.error(ve,"Error checking geolocation availability"):L?.error(`Error checking geolocation availability - ${JSON.stringify(ve)}`),!1}}),[D,L]),be=(0,t.useCallback)(ve=>x(void 0,null,function*(){const Ee=D.getCurrentPosition(ve).then(De=>{if(!De||!De.coords)throw new Error("Location data is invalid or unavailable");return De});try{return yield u(Ee,C,"Location request timed out. Please check that location services are enabled.")}catch(De){throw De instanceof Error&&L?.error(De,"Geolocation timeout or error"),De}}),[D,L]),ze=(0,t.useCallback)(()=>x(void 0,null,function*(){return u(D.checkPermission(),C,"Check permission timed out")}),[D]),ge=(0,t.useCallback)(()=>x(void 0,null,function*(){return u(D.requestPermission(),A,"Permission request timed out - user did not respond to permission dialog")}),[D]),re=(0,t.useCallback)(()=>x(void 0,null,function*(){try{if(!(yield pe()))return L?.error("Location services not available"),!1;const Ee=yield ze();return Ee!==i.Ef.GRANTED&&Ee!==i.Ef.PROMPT?(L?.error(`Location permission not granted: ${Ee}`),!1):!0}catch(ve){return ve instanceof Error?L?.error(ve,"Error checking location services"):L?.error(`Error checking location services - ${JSON.stringify(ve)}`),!1}}),[pe,L,ze]);(0,t.useEffect)(()=>{if(V.current)return;V.current=!0,(()=>x(void 0,null,function*(){const Ee=N.locationPermission;if(Ee===i.Ef.DENIED||Ee===i.Ef.BLOCKED||Ee===i.Ef.UNAVAILABLE){F(Ee);return}k(!0);try{if(!(yield pe())){te(i.Ef.UNAVAILABLE);return}if(Ee===i.Ef.GRANTED){try{const Ie=yield ze();if(Ie===i.Ef.GRANTED){const xe=yield be(T);xe&&(G(xe),te(i.Ef.GRANTED))}else Ie===i.Ef.PROMPT?(te(Ie),oe(!0)):te(Ie)}catch(Ie){Ie instanceof Error?L?.error(Ie,"Error getting initial location with granted permission"):L?.error(`Error getting initial location with granted permission - ${JSON.stringify(Ie)}`),te(i.Ef.UNAVAILABLE)}return}const Se=yield ze();if(te(Se),Se===i.Ef.GRANTED)try{const Ie=yield be(T);Ie?G(Ie):te(i.Ef.UNAVAILABLE)}catch(Ie){Ie instanceof Error?L?.error(Ie,"Error getting initial location"):L?.error(`Error getting initial location - ${JSON.stringify(Ie)}`),te(i.Ef.UNAVAILABLE)}else Se===i.Ef.PROMPT&&oe(!0)}catch(De){De instanceof Error?L?.error(De,"Error initializing location permission"):L?.error(`Error initializing location permission - ${JSON.stringify(De)}`),te(i.Ef.UNAVAILABLE)}finally{k(!1)}}))()},[]);const se=(0,t.useCallback)(()=>x(void 0,null,function*(){try{if(!(yield re())){te(i.Ef.UNAVAILABLE);return}k(!0);let Ee=yield ze();if(te(Ee),Ee===i.Ef.GRANTED||Ee===i.Ef.PROMPT){if(P==="Android"&&Ee===i.Ef.GRANTED)try{Ee=yield ge(),te(Ee)}catch(De){De instanceof Error?L?.error(De,"Error re-requesting Android permission"):L?.error(`Error re-requesting Android permission - ${JSON.stringify(De)}`);return}if(Ee!==i.Ef.UNAVAILABLE){const De=yield be(T);return G(De),De}}return}catch(ve){te(i.Ef.UNAVAILABLE),ve instanceof Error?L?.error(ve,"Error refreshing location"):L?.error(`Error refreshing location - ${JSON.stringify(ve)}`);return}finally{k(!1)}}),[re,L,P,te,be,ze,ge]),me=(0,t.useCallback)(()=>x(void 0,null,function*(){try{return(yield pe())?yield ze():i.Ef.UNAVAILABLE}catch(ve){return ve instanceof Error?L?.error(ve,"Error checking location permission"):L?.error(`Error checking location permission - ${JSON.stringify(ve)}`),i.Ef.UNAVAILABLE}}),[pe,L,ze]),he=(0,t.useCallback)(()=>x(void 0,null,function*(){k(!0);try{if(!(yield pe())){te(i.Ef.UNAVAILABLE);return}const Ee=yield ze();te(Ee)}catch(ve){ve instanceof Error?L?.error(ve,"Error checking and setting location permission"):L?.error(`Error checking and setting location permission - ${JSON.stringify(ve)}`),te(i.Ef.UNAVAILABLE)}finally{k(!1)}}),[pe,L,te,ze]),de=(0,t.useCallback)(()=>x(void 0,null,function*(){k(!0);try{if(!(yield pe())){te(i.Ef.UNAVAILABLE);return}const Ee=yield ze();if(Ee===i.Ef.DENIED||Ee===i.Ef.BLOCKED||Ee===i.Ef.UNAVAILABLE){te(Ee);return}const De=yield ge();if(te(De),["granted","prompt"].includes(De)){const Se=yield be(T);return G(Se),Se}return}catch(ve){if(ve instanceof Error)ve.message.includes("User denied Geolocation")||L?.error(ve,"Error requesting location");else{const Ee=ve&&typeof ve=="object"&&"message"in ve?ve.message:JSON.stringify(ve);Ee?.includes("User denied Geolocation")||L?.error(`Error requesting location - ${Ee}`)}te(i.Ef.UNAVAILABLE);return}finally{k(!1)}}),[pe,L,te,be,ge,ze]),ue=(0,t.useCallback)(()=>x(void 0,null,function*(){k(!0);try{if(!(yield pe())){te(i.Ef.UNAVAILABLE);return}const Ee=yield be(T);Ee&&(G(Ee),F(i.Ef.GRANTED),w(M(v({},q.current),{location:`${Ee.coords.latitude},${Ee.coords.longitude}`,locationType:i.iF.CURRENT_LOCATION,lat:`${Ee.coords.latitude}`,lng:`${Ee.coords.longitude}`,locationPermission:i.Ef.GRANTED})))}catch(ve){throw ve instanceof Error?L?.error(ve,"Error requesting current location"):L?.error(`Error requesting current location - ${JSON.stringify(ve)}`),te(i.Ef.UNAVAILABLE),ve}finally{k(!1)}}),[pe,L,w,te,be]),ne=(0,t.useCallback)(()=>x(void 0,null,function*(){try{k(!0);const ve=yield se();ve&&w(M(v({},q.current),{location:`${ve.coords.latitude},${ve.coords.longitude}`,locationType:i.iF.CURRENT_LOCATION,lat:`${ve.coords.latitude}`,lng:`${ve.coords.longitude}`,locationPermission:U||i.Ef.UNAVAILABLE}))}catch(ve){ve instanceof Error?L?.error(ve,"Error overriding search settings"):L?.error(`Error overriding search settings - ${JSON.stringify(ve)}`)}finally{k(!1)}}),[L,U,se,w]),J=(0,t.useMemo)(()=>({loading:I,overrideSearchSettings:ne,locationPermission:U,setLocationPermission:F,position:K,refreshPosition:se,requestPosition:de,requestCurrentLocation:ue,checkAndSetLocationPermission:he,checkLocaitonPermission:me}),[I,ne,U,K,se,de,ue,he,me]);return(0,n.jsxs)(z.Provider,{value:J,children:[ae&&(0,n.jsx)(g.J,{isOpen:ae,onClose:()=>oe(!1),title:"Find results nearby",description:"Enable location services to see results near you. We'll only use your location while you're searching."}),E]})}},82825:(Y,l,e)=>{"use strict";e.d(l,{GU:()=>n.GU,rJ:()=>n.rJ});var n=e(85449)},1053:(Y,l,e)=>{"use strict";e.d(l,{pc:()=>lt,GI:()=>be,rz:()=>et,Fp:()=>Sn,el:()=>mn,ao:()=>It,oA:()=>D,Yt:()=>St,g4:()=>Ye,tn:()=>Ue,n4:()=>N,gD:()=>L,Vp:()=>tt,Cx:()=>k,bK:()=>q,gi:()=>rt,Z$:()=>he,GT:()=>Je,hr:()=>de,JL:()=>ue,Ck:()=>I,dU:()=>V,wG:()=>mr,hZ:()=>pn,$e:()=>Rt,qT:()=>Sr,GQ:()=>qn,q3:()=>Ln,D_:()=>kt,Uf:()=>F,_l:()=>ge,Md:()=>ae,V7:()=>G,fe:()=>se,JP:()=>At,Z_:()=>w,zO:()=>me,UZ:()=>te,$7:()=>Ke,rb:()=>K,_W:()=>Ct,WS:()=>We,VF:()=>_e,vf:()=>Xr,PV:()=>ot,PS:()=>Bn,Iz:()=>Nt,zD:()=>oe,m3:()=>Ot,XP:()=>Dt,PM:()=>De,cX:()=>ne,G6:()=>J,Us:()=>Ie,AA:()=>Ee,G0:()=>gt,mO:()=>Fe,HH:()=>Se,PU:()=>ye,it:()=>zt,Tl:()=>it,uH:()=>Qt,c3:()=>ve,rx:()=>P});var n=e(36087),t=e(14041);const r=({size:Gt=24,color:Yt="currentColor",...rn})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gt,height:Gt,stroke:Yt,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...rn},t.createElement("path",{d:"M12 15.5H7.5c-1.396 0-2.093 0-2.661.172a4 4 0 0 0-2.667 2.667C2 18.907 2 19.604 2 21m14-3 2 2 4-4m-7.5-8.5a4.5 4.5 0 1 1-9 0 4.5 4.5 0 0 1 9 0Z"}));r.displayName="UserCheck01";const s=({size:Gt=24,color:Yt="currentColor",...rn})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gt,height:Gt,stroke:Yt,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...rn},t.createElement("path",{d:"M16 21v-1.2c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C13.72 15 12.88 15 11.2 15H6.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C2 17.28 2 18.12 2 19.8V21M16 6l2 2 4-4m-9.5 3.5a3.5 3.5 0 1 1-7 0 3.5 3.5 0 0 1 7 0Z"}));s.displayName="UserCheck02";const o=({size:Gt=24,color:Yt="currentColor",...rn})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gt,height:Gt,stroke:Yt,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...rn},t.createElement("path",{d:"M12 15.5H7.5c-1.396 0-2.093 0-2.661.172a4 4 0 0 0-2.667 2.667C2 18.907 2 19.604 2 21m17 0v-6m-3 3h6M14.5 7.5a4.5 4.5 0 1 1-9 0 4.5 4.5 0 0 1 9 0Z"}));o.displayName="UserPlus01";var i=e(8957);const a=({size:Gt=24,color:Yt="currentColor",...rn})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gt,height:Gt,stroke:Yt,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...rn},t.createElement("path",{d:"m16.5 16 5 5m0-5-5 5M12 15.5H7.5c-1.396 0-2.093 0-2.661.172a4 4 0 0 0-2.667 2.667C2 18.907 2 19.604 2 21M14.5 7.5a4.5 4.5 0 1 1-9 0 4.5 4.5 0 0 1 9 0Z"}));a.displayName="UserX01";const g=({size:Gt=24,color:Yt="currentColor",...rn})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gt,height:Gt,stroke:Yt,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...rn},t.createElement("path",{d:"M22 21v-2a4.002 4.002 0 0 0-3-3.874M15.5 3.291a4.001 4.001 0 0 1 0 7.418M17 21c0-1.864 0-2.796-.305-3.53a4 4 0 0 0-2.164-2.165C13.796 15 12.864 15 11 15H8c-1.864 0-2.796 0-3.53.305a4 4 0 0 0-2.166 2.164C2 18.204 2 19.136 2 21M13.5 7a4 4 0 1 1-8 0 4 4 0 0 1 8 0Z"}));g.displayName="Users01";const c=({size:Gt=24,color:Yt="currentColor",...rn})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gt,height:Gt,stroke:Yt,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...rn},t.createElement("path",{d:"m21 21-6-6m2-5a7 7 0 1 1-14 0 7 7 0 0 1 14 0Z"}));c.displayName="SearchSm";var u=e(15297),C=e(22716),A=e(9495);const m=({size:Gt=24,color:Yt="currentColor",...rn})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gt,height:Gt,stroke:Yt,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...rn},t.createElement("path",{d:"M4 8h16M4 16h16M8 3v18m8-18v18"}));m.displayName="Hash01";const d=({size:Gt=24,color:Yt="currentColor",...rn})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gt,height:Gt,stroke:Yt,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...rn},t.createElement("path",{d:"m9.5 3-3 18m11-18-3 18m6-13h-17m16 8h-17"}));d.displayName="Hash02";const O=({size:Gt=24,color:Yt="currentColor",...rn})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gt,height:Gt,stroke:Yt,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...rn},t.createElement("path",{d:"M15 4.6c0-.56 0-.84-.109-1.054a1 1 0 0 0-.437-.437C14.24 3 13.96 3 13.4 3h-2.8c-.56 0-.84 0-1.054.109a1 1 0 0 0-.437.437C9 3.76 9 4.04 9 4.6v2.8c0 .56 0 .84-.109 1.054a1 1 0 0 1-.437.437C8.24 9 7.96 9 7.4 9H4.6c-.56 0-.84 0-1.054.109a1 1 0 0 0-.437.437C3 9.76 3 10.04 3 10.6v2.8c0 .56 0 .84.109 1.054a1 1 0 0 0 .437.437C3.76 15 4.04 15 4.6 15h2.8c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C9 15.76 9 16.04 9 16.6v2.8c0 .56 0 .84.109 1.054a1 1 0 0 0 .437.437C9.76 21 10.04 21 10.6 21h2.8c.56 0 .84 0 1.054-.109a1 1 0 0 0 .437-.437C15 20.24 15 19.96 15 19.4v-2.8c0-.56 0-.84.109-1.054a1 1 0 0 1 .437-.437C15.76 15 16.04 15 16.6 15h2.8c.56 0 .84 0 1.054-.109a1 1 0 0 0 .437-.437C21 14.24 21 13.96 21 13.4v-2.8c0-.56 0-.84-.109-1.054a1 1 0 0 0-.437-.437C20.24 9 19.96 9 19.4 9h-2.8c-.56 0-.84 0-1.054-.109a1 1 0 0 1-.437-.437C15 8.24 15 7.96 15 7.4V4.6Z"}));O.displayName="MedicalCross";const p=({size:Gt=24,color:Yt="currentColor",...rn})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gt,height:Gt,stroke:Yt,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...rn},t.createElement("path",{d:"M12 2v5m0-5c-.713 0-1.41.075-2.08.217M12 2c.713 0 1.41.075 2.08.217M12 7a5 5 0 0 0-5 5m5-5a5 5 0 0 1 5 5m-5 5v5m0-5a5 5 0 0 0 5-5m-5 5a5 5 0 0 1-5-5m5 10c.712 0 1.407-.075 2.077-.216M12 22a10.02 10.02 0 0 1-2.085-.218M4.93 4.93l3.535 3.535m7.072 7.072 3.535 3.535M2 12h5m-5 0c0 .713.075 1.41.217 2.08M2 12c0-.714.075-1.411.217-2.083M17 12h5m0 0c0-.713-.075-1.41-.217-2.08M22 12c0 .713-.075 1.409-.216 2.08M4.928 19.07l3.535-3.536m7.072-7.07 3.535-3.536m-1.624-1.317a10.053 10.053 0 0 1 2.942 2.943m-.003 10.895a10.053 10.053 0 0 1-2.941 2.94m-10.891-.002a10.055 10.055 0 0 1-2.94-2.937m0-10.896a10.054 10.054 0 0 1 2.94-2.942"}));p.displayName="Virus";const b=({size:Gt=24,color:Yt="currentColor",...rn})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gt,height:Gt,stroke:Yt,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...rn},t.createElement("path",{d:"M22 10H2m9 4H6M2 8.2v7.6c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C3.52 19 4.08 19 5.2 19h13.6c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C22 17.48 22 16.92 22 15.8V8.2c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C20.48 5 19.92 5 18.8 5H5.2c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C2 6.52 2 7.08 2 8.2Z"}));b.displayName="CreditCard02";const h=({size:Gt=24,color:Yt="currentColor",...rn})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gt,height:Gt,stroke:Yt,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...rn},t.createElement("path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"}));h.displayName="Link03";var f=e(85418);const v=({size:Gt=24,color:Yt="currentColor",...rn})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gt,height:Gt,stroke:Yt,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...rn},t.createElement("path",{d:"M16 4c.93 0 1.395 0 1.776.102a3 3 0 0 1 2.122 2.122C20 6.605 20 7.07 20 8v9.2c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C17.72 22 16.88 22 15.2 22H8.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C4 19.72 4 18.88 4 17.2V8c0-.93 0-1.395.102-1.776a3 3 0 0 1 2.122-2.122C6.605 4 7.07 4 8 4m1 11 2 2 4.5-4.5M9.6 6h4.8c.56 0 .84 0 1.054-.109a1 1 0 0 0 .437-.437C16 5.24 16 4.96 16 4.4v-.8c0-.56 0-.84-.109-1.054a1 1 0 0 0-.437-.437C15.24 2 14.96 2 14.4 2H9.6c-.56 0-.84 0-1.054.109a1 1 0 0 0-.437.437C8 2.76 8 3.04 8 3.6v.8c0 .56 0 .84.109 1.054a1 1 0 0 0 .437.437C8.76 6 9.04 6 9.6 6Z"}));v.displayName="ClipboardCheck";const M=({size:Gt=24,color:Yt="currentColor",...rn})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gt,height:Gt,stroke:Yt,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...rn},t.createElement("path",{d:"M16 4c.93 0 1.395 0 1.776.102a3 3 0 0 1 2.122 2.122C20 6.605 20 7.07 20 8v9.2c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C17.72 22 16.88 22 15.2 22H8.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C4 19.72 4 18.88 4 17.2V8c0-.93 0-1.395.102-1.776a3 3 0 0 1 2.122-2.122C6.605 4 7.07 4 8 4m4 13v-6m-3 3h6M9.6 6h4.8c.56 0 .84 0 1.054-.109a1 1 0 0 0 .437-.437C16 5.24 16 4.96 16 4.4v-.8c0-.56 0-.84-.109-1.054a1 1 0 0 0-.437-.437C15.24 2 14.96 2 14.4 2H9.6c-.56 0-.84 0-1.054.109a1 1 0 0 0-.437.437C8 2.76 8 3.04 8 3.6v.8c0 .56 0 .84.109 1.054a1 1 0 0 0 .437.437C8.76 6 9.04 6 9.6 6Z"}));M.displayName="ClipboardPlus";const x=({size:Gt=24,color:Yt="currentColor",...rn})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gt,height:Gt,stroke:Yt,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...rn},t.createElement("path",{d:"M11.5 5h.434c3.048 0 4.571 0 5.15.547a2 2 0 0 1 .586 1.845c-.156.781-1.4 1.66-3.888 3.42l-4.064 2.876c-2.488 1.76-3.732 2.639-3.888 3.42a2 2 0 0 0 .586 1.845c.579.547 2.102.547 5.15.547h.934M8 5a3 3 0 1 1-6 0 3 3 0 0 1 6 0Zm14 14a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}));x.displayName="Route";const T=({size:Gt=24,color:Yt="currentColor",...rn})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gt,height:Gt,stroke:Yt,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...rn},t.createElement("path",{d:"M16 7c0-.93 0-1.395-.102-1.776a3 3 0 0 0-2.121-2.122C13.395 3 12.93 3 12 3c-.93 0-1.395 0-1.777.102a3 3 0 0 0-2.12 2.122C8 5.605 8 6.07 8 7M5.2 21h13.6c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C22 19.48 22 18.92 22 17.8v-7.6c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C20.48 7 19.92 7 18.8 7H5.2c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C2 8.52 2 9.08 2 10.2v7.6c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C3.52 21 4.08 21 5.2 21Z"}));T.displayName="Briefcase01";const z=({size:Gt=24,color:Yt="currentColor",...rn})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gt,height:Gt,stroke:Yt,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...rn},t.createElement("path",{d:"M12.913 17h7.174m-7.174 0L11 21m1.913-4 2.865-5.991c.231-.483.347-.724.505-.8a.5.5 0 0 1 .434 0c.158.076.274.317.505.8L20.087 17m0 0L22 21M2 5h6m0 0h3.5M8 5V3m3.5 2H14m-2.5 0c-.496 2.957-1.647 5.636-3.334 7.884M10 14a9.396 9.396 0 0 1-1.834-1.116m0 0C6.813 11.848 5.603 10.427 5 9m3.166 3.884A17.295 17.295 0 0 1 2 18"}));z.displayName="Translate01";const S=({size:Gt=24,color:Yt="currentColor",...rn})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gt,height:Gt,stroke:Yt,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...rn},t.createElement("path",{d:"M10 8.502a2.248 2.248 0 0 1 4.37.75c0 1.499-2.25 2.248-2.25 2.248m.03 3h.01M9.9 19.2l1.46 1.947c.217.29.326.434.459.486a.5.5 0 0 0 .362 0c.133-.052.242-.197.459-.486L14.1 19.2c.293-.39.44-.586.619-.735a2 2 0 0 1 .822-.412c.226-.053.47-.053.959-.053 1.398 0 2.097 0 2.648-.228a3 3 0 0 0 1.624-1.624C21 15.597 21 14.898 21 13.5V7.8c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C18.72 3 17.88 3 16.2 3H7.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C3 5.28 3 6.12 3 7.8v5.7c0 1.398 0 2.097.228 2.648a3 3 0 0 0 1.624 1.624C5.403 18 6.102 18 7.5 18c.489 0 .733 0 .96.053a2 2 0 0 1 .821.412c.18.149.326.344.619.735Z"}));S.displayName="AnnotationQuestion";const y=({size:Gt=24,color:Yt="currentColor",...rn})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gt,height:Gt,stroke:Yt,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...rn},t.createElement("path",{d:"M15 2.458A9.996 9.996 0 0 0 12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10c0-1.715-.432-3.33-1.193-4.74M17 5.75h.005M10.5 21.888v-2.203a.5.5 0 0 1 .12-.325l2.486-2.9a.5.5 0 0 0-.131-.76l-2.857-1.632a.499.499 0 0 1-.186-.187L8.07 10.62a.5.5 0 0 0-.478-.25l-5.528.492M21 6c0 2.21-2 4-4 6-2-2-4-3.79-4-6a4 4 0 0 1 8 0Zm-3.75-.25a.25.25 0 1 1-.5 0 .25.25 0 0 1 .5 0Z"}));y.displayName="Globe05";const E=({size:Gt=24,color:Yt="currentColor",...rn})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gt,height:Gt,stroke:Yt,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...rn},t.createElement("path",{d:"M11.302 21.615c.221.129.332.194.488.227.122.026.298.026.42 0 .156-.034.267-.098.488-.227C14.646 20.478 20 16.908 20 12V7.217c0-.799 0-1.199-.13-1.542a2 2 0 0 0-.548-.79c-.275-.243-.65-.383-1.398-.664l-5.362-2.01c-.208-.078-.312-.117-.419-.133a1 1 0 0 0-.286 0c-.107.016-.21.055-.419.133L6.076 4.22c-.748.28-1.122.421-1.398.664a2 2 0 0 0-.547.79C4 6.018 4 6.418 4 7.217V12c0 4.908 5.354 8.478 7.302 9.615Z"}));E.displayName="Shield01";const R=({size:Gt=24,color:Yt="currentColor",...rn})=>t.createElement("svg",{viewBox:"0 0 24 24",width:Gt,height:Gt,stroke:Yt,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...rn},t.createElement("path",{d:"M21 15v1.2c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.72 21 17.88 21 16.2 21H7.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 18.72 3 17.88 3 16.2V15m14-7-5-5m0 0L7 8m5-5v12"}));R.displayName="Upload01";const P=/^(https?):\/\/([a-zA-Z0-9-]+\.)+[a-zA-Z0-9-]{2,}(?::\d+)?(\/[a-zA-Z0-9\-._~:?#[\]@!$&'()*+,;=%]*)?(#\/[a-zA-Z0-9\-._~:?#[\]@!$&'()*+,;=%]*)?(\?[a-zA-Z0-9\-._~:?#[\]@!$&'()*+,;=%]*)?$/i,L="http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",D="http://hl7.org/fhir/StructureDefinition/questionnaire-hidden",N="http://hl7.org/fhir/questionnaire-item-control",w="http://hl7.org/fhir/StructureDefinition/questionnaire-maxOccurs",V="http://hl7.org/fhir/StructureDefinition/minValue",q="http://hl7.org/fhir/StructureDefinition/maxValue",I="http://icanbwell.com/fhir/StructureDefinition/minValue-error-message",k="http://icanbwell.com/fhir/StructureDefinition/maxValue-error-message",U="http://icanbwell.com/fhir/StructureDefinition/questionnaire-readOnlyExpression",F="http://icanbwell.com/fhir/StructureDefinition/navigation-linkId",K="http://hl7.org/fhir/StructureDefinition/questionnaire-supportLink",G="http://icanbwell.com/fhir/StructureDefinition/questionnaire-autocomplete",ae="http://hl7.org/fhir/StructureDefinition/entryFormat",oe="http://hl7.org/fhir/StructureDefinition/tz-code",te="tz-code",pe="footer",be="check-box",ze="header",ge="page",re="http://icanbwell.com/fhir/StructureDefinition/questionnaire-callNextQuestion",se="http://icanbwell.com/fhir/StructureDefinition/questionnaire-currentStep",me="http://icanbwell.com/fhir/StructureDefinition/questionnaire-totalSteps",he=[{patterns:["pdf"],type:"pdf"},{patterns:["word","document"],type:"doc"},{patterns:["excel","spreadsheet"],type:"xlsx"},{patterns:["powerpoint","presentation"],type:"ppt"},{patterns:["image/jpeg"],type:"jpg"},{patterns:["image/png"],type:"png"},{patterns:["image/gif"],type:"gif"},{patterns:["image/svg"],type:"svg"},{patterns:["text/plain"],type:"txt"},{patterns:["zip"],type:"zip"},{patterns:["csv"],type:"csv"}],de={"image/*":"image/*","application/pdf":".pdf","application/msword":".doc","application/vnd.openxmlformats-officedocument.wordprocessingml.document":".docx","image/jpeg":"image/jpeg","image/jpg":"image/jpg","image/png":"image/png","image/gif":"image/gif","image/webp":"image/webp","image/heic":"image/heic","image/heif":"image/heif","image/svg+xml":"image/svg+xml"},ue={"image/*":"Images",".pdf":"PDF",".doc":"DOCX",".docx":"DOCX","image/jpeg":"JPEG","image/jpg":"JPG","image/png":"PNG","image/gif":"GIF","image/webp":"WEBP","image/heic":"HEIC","image/heif":"HEIF","image/svg+xml":"SVG"},ne="ui-toolkit/CoordinatePicker",J="ui-toolkit/DetailsInfo",ve="ui-toolkit/ServiceChoice",Ee="ui-toolkit/InfoBanner",De="ui-toolkit/Button",Se="ui-toolkit/Phone",Ie="ui-toolkit/ErrorCard",xe="ui-toolkit/FormContainer",Fe="ui-toolkit/PageHeader",it="ui-toolkit/SelectableOption",gt="ui-toolkit/Modal",Ot="ui-toolkit/Alert",Dt="ui-toolkit/AppSectionAccess",Qt="ui-toolkit/SensitiveDataCategory",zt="ui-toolkit/QuestCard",Ke="http://icanbwell.com/fhir/StructureDefinition/subtitle",We="http://icanbwell.com/fhir/StructureDefinition/text-align",Ct={LEFT:"left",CENTER:"center"},Qe={MYSELF:"myself",SOMEONE_ELSE:"someone-else"},Ye="http://icanbwell.com/fhir/StructureDefinition/icon-name",It="http://icanbwell.com/fhir/StructureDefinition/error-title",mn="http://icanbwell.com/fhir/StructureDefinition/error-subtitle",Sn="http://icanbwell.com/fhir/StructureDefinition/error-icon-name",et="http://icanbwell.com/fhir/StructureDefinition/description",Rt="http://icanbwell.com/fhir/StructureDefinition/modal-description",kt="http://icanbwell.com/fhir/StructureDefinition/modal-title",qn="http://icanbwell.com/fhir/StructureDefinition/modal-icon-name",Sr="http://icanbwell.com/fhir/StructureDefinition/modal-icon-color",pn="http://icanbwell.com/fhir/StructureDefinition/button-text",Ln="http://icanbwell.com/fhir/StructureDefinition/secondary-button-text",mr="http://icanbwell.com/fhir/StructureDefinition/modal-button-action",Bn="http://icanbwell.com/fhir/StructureDefinition/trigger-text",Xr="http://icanbwell.com/fhir/StructureDefinition/trigger-icon-name",Qr="http://icanbwell.com/fhir/StructureDefinition/primary-button-text",Nt="http://icanbwell.com/fhir/StructureDefinition/trigger-variant",_e="http://icanbwell.com/fhir/StructureDefinition/trigger-color",ot="http://icanbwell.com/fhir/StructureDefinition/trigger-size",Je="http://hl7.org/fhir/StructureDefinition/mimeType",tt="http://hl7.org/fhir/StructureDefinition/maxSize",rt="http://icanbwell.com/fhir/StructureDefinition/message-severity",lt="http://icanbwell.com/fhir/StructureDefinition/alert-color",St="http://icanbwell.com/fhir/StructureDefinition/hideLabel",st="http://icanbwell.com/fhir/StructureDefinition/placeholder",le="http://icanbwell.com/fhir/StructureDefinition/hint-text",ye="ui-toolkit/PrefilledMemberDemographicsAlert",Ue="http://hl7.org/fhir/issue-severity",Te="http://icanbwell.com/fhir/StructureDefinition/button-type",Tt="http://icanbwell.com/fhir/StructureDefinition/button-action",Zt="button-type",vn="http://icanbwell.com/fhir/StructureDefinition/analytics-form-name",_n="http://icanbwell.com/fhir/StructureDefinition/analytics-event-name",Ar="http://icanbwell.com/fhir/StructureDefinition/analytics-page-name",Ft="http://icanbwell.com/fhir/StructureDefinition/analytics-property-name",we="http://icanbwell.com/fhir/StructureDefinition/analytics-option-name",Ze={},At={"user-check":r,"user-check-02":s,"user-plus":o,"user-01":i.f,"user-x":a,"users-01":g,"search-sm":c,"info-circle":u.d,"help-circle":C.m,x:A.X,hash:m,"hash-02":d,"folder-heart":n.FolderHeart,"medical-cross":O,virus:p,pill:n.Pill,vaccine:n.Vaccine,"face-mask":n.FaceMask,"heart-beat":n.HeartBeat,"credit-card-02":b,"link-03":h,"search-lg":f.q,"clipboard-check":v,"clipboard-plus":M,route:x,"briefcase-01":T,"translate-01":z,"annotation-question":S,"globe-05":y,"shield-01":E,"upload-01":R}},25624:(Y,l,e)=>{"use strict";e.d(l,{$H:()=>N,$O:()=>gt,CP:()=>kt,Fy:()=>Rt,GN:()=>be,J4:()=>lt,MU:()=>G,Nw:()=>ot,Qr:()=>y,Ue:()=>St,Yo:()=>Ee,a0:()=>z,cz:()=>E,di:()=>I,eC:()=>st,iI:()=>k,lv:()=>q,mR:()=>vn,nt:()=>S,od:()=>V,t7:()=>Ot,u0:()=>x,yQ:()=>Zt,zj:()=>ue});var n=e(17637),t=e(43915),r=e(37234),s=e(65328),o=e(91595),i=e(27779),a=e.n(i),g=e(45250),c=e.n(g),u=e(16681),C=e(18807),A=e(1053),m=Object.defineProperty,d=Object.defineProperties,O=Object.getOwnPropertyDescriptors,p=Object.getOwnPropertySymbols,b=Object.prototype.hasOwnProperty,h=Object.prototype.propertyIsEnumerable,f=(Lt,Et,bt)=>Et in Lt?m(Lt,Et,{enumerable:!0,configurable:!0,writable:!0,value:bt}):Lt[Et]=bt,v=(Lt,Et)=>{for(var bt in Et||(Et={}))b.call(Et,bt)&&f(Lt,bt,Et[bt]);if(p)for(var bt of p(Et))h.call(Et,bt)&&f(Lt,bt,Et[bt]);return Lt},M=(Lt,Et)=>d(Lt,O(Et));const x=(Lt,Et,bt,qt)=>{if(Lt){const hn=Lt(Et,v({defaultValue:bt},qt));if(hn&&hn!==Et)return hn}return qt?Object.entries(qt).reduce((hn,[Tn,zr])=>hn.replace(`{{${Tn}}}`,String(zr)),bt):bt},T=Lt=>{var Et;return(Et=Lt.filter(bt=>bt.url.includes("questionnaire-itemControl")).flatMap(bt=>{var qt,hn;return(hn=(qt=bt.valueCodeableConcept)==null?void 0:qt.coding)!=null?hn:[]}).find(bt=>{var qt;return(qt=bt.code)==null?void 0:qt.startsWith("ui-toolkit/")}))==null?void 0:Et.code},z=Lt=>{var Et;const bt=(Et=Lt.extension)==null?void 0:Et.find(qt=>qt.url===A.V7);return bt?.valueCode||"off"},S=(Lt,Et,bt)=>{const qt=(0,C.A)(bt);return Lt&&Et&&bt?qt.replace("<p>",`<span>${Et} `).replace("</p>","</span>").trim():qt.replace("<p>","<span>").replace("</p>","</span>").trim()},y=Lt=>{const Et=Lt?.find(bt=>bt.url===A.Vp);return Et?.valueInteger},E=Lt=>{const Et=Lt?.find(bt=>bt.url===A.Z_);return Et?.valueInteger},R={date:"MM/DD/YYYY",choice:"Select an option"},P="Type your response here...",L=(Lt,Et)=>{const bt=Lt?.find(qt=>qt.url===PLACEHOLDER_EXTENSION_URL);return bt?.valueString||Et&&R[Et]||P},D=Lt=>{const Et=Lt?.find(bt=>bt.url===HINT_TEXT_EXTENSION_URL);return Et?.valueString},N=Lt=>{const Et=Lt?.filter(bt=>bt.url===A.GT&&bt.valueCode).map(bt=>A.hr[bt.valueCode]||bt.valueCode);return Et?.length?Et.join(","):void 0},w=Lt=>Lt.split(",").map(qt=>qt.trim()).map(qt=>A.JL[qt]||qt).filter((qt,hn,Tn)=>Tn.indexOf(qt)===hn).join(", "),V=(Lt,Et,bt)=>{const qt=w(Lt),hn=qt.lastIndexOf(","),Tn=hn!==-1?`${qt.substring(0,hn)} or${qt.substring(hn+1)}`:qt,zr=[Et&&`max. ${parseFloat((Et/(1e3*1e3)).toFixed(1))}MB`,bt&&`upto ${bt} file${bt>1?"s":""}`].filter(Boolean);return zr.length>0?`${Tn} (${zr.join(", ")})`:Tn},q=Lt=>{const Et=Lt?.find(bt=>bt?.url===A.zD||bt?.url===A.UZ);return Et?.valueCode||Intl.DateTimeFormat().resolvedOptions().timeZone},I=(Lt,Et)=>{var bt,qt,hn;const Tn=Et?.find(zr=>zr.url.includes(Lt));return(hn=(qt=(bt=Tn?.valueInteger)!=null?bt:Tn?.valueDecimal)!=null?qt:Tn?.valueString)!=null?hn:Tn?.valueDate},k=Lt=>{if(!!Lt){if(/^\d{4}-\d{2}-\d{2}$/.test(Lt))return Lt;try{const Et=(0,i.evaluate)({},Lt);if(Array.isArray(Et)&&Et.length>0){const bt=Et[0];if(bt instanceof Date&&!isNaN(bt.getTime())){const qt=bt.getFullYear(),hn=String(bt.getMonth()+1).padStart(2,"0"),Tn=String(bt.getDate()).padStart(2,"0");return`${qt}-${hn}-${Tn}`}if(typeof bt=="string"&&/^\d{4}-\d{2}-\d{2}$/.test(bt))return bt}}catch{}}},U=(Lt,Et)=>{var bt,qt;const hn=Et?.find(zr=>zr.url===Lt);if(!hn)return;const Tn=(bt=hn.valueString)!=null?bt:hn.valueDate;return Tn||k((qt=hn.valueExpression)==null?void 0:qt.expression)},F=(Lt,Et)=>{if(!(!Lt||Lt.length===0))for(const bt of Lt){const qt=I(Et,bt.extension);if(qt!==void 0)return qt;if(bt.item&&bt.item.length>0){const hn=F(bt.item,Et);if(hn!==void 0)return hn}}},K=(Lt,Et)=>{try{const bt=String(Lt??Et);let qt;if(bt.includes("/"))qt=(0,n.A)(bt,"MM/dd/yyyy",new Date);else{const hn=bt.split("T")[0];qt=(0,t.A)(hn)}return(0,r.A)(qt)}catch(bt){return console.error("Date parsing error:",bt,Lt),null}},G=(Lt,Et)=>{var bt;for(const qt of Lt){if(qt.linkId===Et)return qt;if((bt=qt.item)!=null&&bt.length){const hn=G(qt.item,Et);if(hn!==void 0)return hn}}},ae=(Lt,Et)=>{var bt;const qt=[];for(const hn of Lt)if(hn.linkId===Et&&qt.push(hn),(bt=hn.item)!=null&&bt.length){const Tn=ae(hn.item,Et);qt.push(...Tn)}return qt},oe=(Lt,Et,bt=0)=>ae(Lt,Et)[bt];function te(Lt){return Lt!=null}const pe=(Lt,Et)=>{var bt,qt,hn;if("answerString"in Lt&&te(Lt.answerString)){if(Lt.operator==="=")return Et?.valueString===Lt.answerString;if(Lt.operator==="!=")return Et?.valueString!==Lt.answerString}if("answerBoolean"in Lt&&te(Lt.answerBoolean)){if(Lt.operator==="=")return Et?.valueBoolean===Lt.answerBoolean;if(Lt.operator==="!=")return Et?.valueBoolean!==Lt.answerBoolean}if("answerInteger"in Lt&&te(Lt.answerInteger)||"answerDecimal"in Lt&&te(Lt.answerDecimal)){const Tn=Number(Et?.valueInteger||Et?.valueDecimal),zr=Number(Lt.answerInteger||Lt.answerDecimal);if(Lt.operator==="=")return Tn===zr;if(Lt.operator==="!=")return Tn!==zr;if(Lt.operator===">")return Tn>zr;if(Lt.operator==="<")return Tn<zr;if(Lt.operator===">=")return Tn>=zr;if(Lt.operator==="<=")return Tn<=zr}if("answerQuantity"in Lt&&te(Lt.answerQuantity)){const Tn=Et?.valueQuantity,zr=Lt.answerQuantity;if(Tn?.unit!==zr?.unit)return!1;if(Lt.operator==="=")return Tn.value===zr.value;if(Lt.operator==="!=")return Tn.value!==zr.value;if(Lt.operator===">")return Tn.value>zr.value;if(Lt.operator==="<")return Tn.value<zr.value;if(Lt.operator===">=")return Tn.value>=zr.value;if(Lt.operator==="<=")return Tn.value<=zr.value}if("answerCoding"in Lt&&te(Lt.answerCoding)){const Tn=Et?.valueCoding,zr=Lt.answerCoding;if(Lt.operator==="=")return Tn?.code===zr.code;if(Lt.operator==="!=")return Tn?.code!==zr.code}if("answerReference"in Lt&&te(Lt.answerReference)){const Tn=Et?.valueReference,zr=Lt.answerReference;if(Lt.operator==="=")return Tn?.reference===zr.reference;if(Lt.operator==="!=")return Tn?.reference!==zr.reference}if("answerDate"in Lt&&te(Lt.answerDate)||"answerDateTime"in Lt&&te(Lt.answerDateTime)||"answerTime"in Lt&&te(Lt.answerTime)){const Tn=new Date((hn=(qt=(bt=Et?.valueDate)!=null?bt:Et?.valueDateTime)!=null?qt:Et?.valueTime)!=null?hn:""),zr=new Date(Lt.answerDate||Lt.answerDateTime||Lt.answerTime||"");if(Lt.operator==="=")return Tn.getTime()===zr.getTime();if(Lt.operator==="!=")return Tn.getTime()!==zr.getTime();if(Lt.operator===">")return Tn.getTime()>zr.getTime();if(Lt.operator==="<")return Tn.getTime()<zr.getTime();if(Lt.operator===">=")return Tn.getTime()>=zr.getTime();if(Lt.operator==="<=")return Tn.getTime()<=zr.getTime()}return Lt.operator==="exists"?Et!=null===Lt.answerBoolean:!0},be=(Lt,Et,bt)=>{const qt=hn=>{const Tn=ae(bt,hn.question);return Tn.length===0||Tn.every(zr=>!zr.answer||zr.answer.length===0)?pe(hn,void 0):Tn.some(zr=>{var zn;return(zn=zr.answer)==null?void 0:zn.some(gn=>pe(hn,gn&&Object.keys(gn).length>0?gn:void 0))})};return Lt&&Lt?.length>0?Et==="any"?Lt?.some(hn=>qt(hn)):Lt?.every(hn=>qt(hn)):!0},ze=(Lt,Et,bt,qt,hn)=>{if(!Lt||Lt.length===0)return!0;const Tn=zr=>{var zn;let gn;if(qt&&typeof hn=="number"){const Mt=bt.filter(Pt=>Pt.linkId===qt)[hn];if(Mt?.item){const Pt=Mt.item.find(Ut=>Ut.linkId===zr.question);if(Pt?.answer&&Pt.answer.length>0)return(zn=Pt?.answer)==null?void 0:zn.some(Ut=>pe(zr,Ut&&Object.keys(Ut).length>0?Ut:void 0))}}if(!gn){const en=ae(bt,zr.question);if(en.length>0)return en.some(Mt=>{var Pt;return(Pt=Mt.answer)==null?void 0:Pt.some(Ut=>pe(zr,Ut&&Object.keys(Ut).length>0?Ut:void 0))});gn=void 0}return pe(zr,gn)};return Et==="any"?Lt.some(zr=>Tn(zr)):Lt.every(zr=>Tn(zr))},ge=(Lt,Et)=>{var bt;if(!!((bt=Lt?.valueExpression)!=null&&bt.expression))try{const qt=evaluate(Et,Lt.valueExpression.expression);return Array.isArray(qt)?qt.some(hn=>Boolean(hn)):Boolean(qt)}catch{return}},re=(Lt,Et)=>{var bt;const qt=(bt=Lt.extension)==null?void 0:bt.find(Tn=>Tn.url===READ_ONLY_EXPRESSION_EXTENSION_URL),hn=ge(qt,Et);return M(v({},Lt),{readOnly:hn??Lt.readOnly})},se=(Lt,Et,bt,qt)=>{const{required:hn,maxLength:Tn,type:zr,extension:zn,enableWhen:gn,enableBehavior:en,repeats:Mt,answerOption:Pt}=Lt;if(!be(gn,en,Et)||Lt.type==="group"||Lt.type==="display")return"";if(Mt)return me(Lt,Et,bt,qt);const Ut=ne(Lt,Et);return Ut&&J(Ut,Lt)?ve(Lt,Et,bt,Ut,qt):ue(zn,zr,hn,Tn,bt,Pt,qt)},me=(Lt,Et,bt,qt)=>{const{required:hn}=Lt;if(hn){if(!bt||bt.length===0)return x(qt,Translations.VALIDATION_AT_LEAST_ONE_REQUIRED,"At least one item is required");let Tn=!1;for(let zr=0;zr<bt.length;zr++){const zn=bt[zr];if(zn&&Object.keys(zn).length>0&&Object.values(zn).some(en=>en!=null&&en!==""&&(Array.isArray(en)?en.length>0:!0))){Tn=!0;const en=ue(Lt.extension,Lt.type,!0,Lt.maxLength,[zn],Lt.answerOption,qt);if(en)return x(qt,Translations.VALIDATION_ITEM_ERROR,"Item {{index}}: {{error}}",{index:zr+1,error:en});if(Lt.item&&Lt.item.length>0){const Mt=he(Lt.item,Et,Lt.linkId,zr,qt);if(Mt)return x(qt,Translations.VALIDATION_ITEM_ERROR,"Item {{index}}: {{error}}",{index:zr+1,error:Mt})}}else return x(qt,Translations.VALIDATION_ITEM_FIELD_REQUIRED,"Item {{index}}: This field is required",{index:zr+1})}if(!Tn)return x(qt,Translations.VALIDATION_AT_LEAST_ONE_REQUIRED,"At least one item is required")}else if(bt&&bt.length>0)for(let Tn=0;Tn<bt.length;Tn++){const zr=bt[Tn];if(zr&&Object.keys(zr).length>0&&Object.values(zr).some(gn=>gn!=null&&gn!==""&&(Array.isArray(gn)?gn.length>0:!0))){const gn=ue(Lt.extension,Lt.type,!1,Lt.maxLength,[zr],Lt.answerOption,qt);if(gn)return x(qt,Translations.VALIDATION_ITEM_ERROR,"Item {{index}}: {{error}}",{index:Tn+1,error:gn});if(Lt.item&&Lt.item.length>0){const en=he(Lt.item,Et,Lt.linkId,Tn,qt);if(en)return x(qt,Translations.VALIDATION_ITEM_ERROR,"Item {{index}}: {{error}}",{index:Tn+1,error:en})}}}return""},he=(Lt,Et,bt,qt,hn)=>{var Tn,zr;for(const zn of Lt){if(!ze(zn.enableWhen,zn.enableBehavior,Et,bt,qt))continue;const gn=G(Et,bt),en=(Tn=gn?.item)==null?void 0:Tn.find(Pt=>Pt.linkId===zn.linkId),Mt=(zr=en?.answer)!=null&&zr[qt]?[en.answer[qt]]:void 0;if(zn.required){if(!Mt||!Mt[0]||!de(Mt[0]))return x(hn,Translations.VALIDATION_NAMED_FIELD_REQUIRED,"{{fieldName}} is required",{fieldName:zn.text||zn.linkId});const Pt=ue(zn.extension,zn.type,!0,zn.maxLength,Mt,zn.answerOption,hn);if(Pt)return`${zn.text||zn.linkId}: ${Pt}`}else if(Mt&&Mt[0]&&de(Mt[0])){const Pt=ue(zn.extension,zn.type,!1,zn.maxLength,Mt,zn.answerOption,hn);if(Pt)return`${zn.text||zn.linkId}: ${Pt}`}if(zn.item&&zn.item.length>0){const Pt=he(zn.item,Et,zn.linkId,qt,hn);if(Pt)return Pt}}return""},de=Lt=>!Lt||Object.keys(Lt).length===0?!1:Object.values(Lt).some(Et=>Et!=null&&Et!==""&&(Array.isArray(Et)?Et.length>0:!0)),ue=(Lt,Et,bt,qt,hn,Tn,zr)=>{var zn,gn,en,Mt,Pt;let Ut="";const ln=!!Lt?.find(Rr=>{var $r,c0;return Rr.url===A.gD&&((c0=($r=Rr.valueCodeableConcept)==null?void 0:$r.coding)==null?void 0:c0.some(Lo=>Lo.system===A.n4&&Lo.code===A.GI))}),Jt=hn?.[0],En={choice:((zn=Jt?.valueCoding)==null?void 0:zn.code)||(Jt?.valueString&&Tn?.some(Rr=>Rr.valueString===Jt.valueString)?Jt.valueString:null),"open-choice":((gn=Jt?.valueCoding)==null?void 0:gn.code)||Jt?.valueString,boolean:Jt?.valueBoolean,string:Jt?.valueString,text:Jt?.valueString,url:Jt?.valueUri,integer:Jt?.valueInteger,decimal:Jt?.valueDecimal,dateTime:Jt?.valueDateTime,date:Jt?.valueDate,time:Jt?.valueTime,quantity:(en=Jt?.valueQuantity)==null?void 0:en.value,reference:(Mt=Jt?.valueReference)==null?void 0:Mt.display,attachment:(Pt=Jt?.valueAttachment)==null?void 0:Pt.title};if(!(Et in En))return"";const Gn=En[Et],Hr={required:()=>bt&&(Gn==null||Gn===""||Gn==="NaN"||Number.isNaN(Gn)||Et==="boolean"&&Gn!==!0&&ln)?x(zr,u.p.VALIDATION_FIELD_REQUIRED,"This field is required"):"",maxLength:()=>qt&&Gn!==null&&Gn!==void 0&&Gn.toString().length>qt?x(zr,u.p.VALIDATION_MAX_LENGTH,"Input should not exceed {{maxLength}} characters",{maxLength:qt}):"",minLength:()=>{const Rr=I("minLength",Lt);return Rr&&Gn!==null&&Gn!==void 0&&Gn.toString().length<Number(Rr)?x(zr,u.p.VALIDATION_MIN_LENGTH,"Input should be at least {{minLength}} characters",{minLength:Rr}):""},urlRegex:()=>{const Rr=new RegExp(A.rx),$r=I("regexError",Lt),c0=$r??x(zr,u.p.VALIDATION_INVALID_URL,"Please enter a valid url starting from http:// and https://");return Rr&&Et==="url"&&Gn&&!Rr.test(Gn)?String(c0):""},regex:()=>{const Rr=I("regex",Lt);if(!Rr||typeof Gn!="string")return"";const $r=new RegExp(Rr),c0=I("regexError",Lt),Lo=c0??x(zr,u.p.VALIDATION_INVALID_INPUT,"Please enter a valid input");return $r&&Gn&&!$r.test(Gn)?String(Lo):""},dateTime:()=>{if(Et==="dateTime"&&Gn){const Rr=Gn?.toString(),$r=new Date(Rr);return isNaN($r.getTime())?x(zr,u.p.VALIDATION_INVALID_DATETIME,"Please enter a valid date-time"):""}return""},date:()=>{if(Et!=="date"||!Gn)return"";const Rr=Gn.replace(/\D/g,"");return Rr.length>0&&Rr.length<8||isNaN(new Date(Gn).getTime())?x(zr,u.p.VALIDATION_INVALID_DATE,"Invalid date"):""},minValue:()=>{var Rr;if(Et==="date"){const c0=U(A.dU,Lt),Lo=K(c0??"01/01/1900","01/01/1900"),B0=K(Gn,"");if(!Lo||!B0)return"";if((0,s.A)(B0,Lo)){const eo=(Rr=Lt?.find(j0=>j0.url===A.Ck))==null?void 0:Rr.valueString;return eo??x(zr,u.p.VALIDATION_DATE_BEFORE_MIN,"Date should not be before {{minDate}}",{minDate:c0??"01/01/1900"})}return""}const $r=I("minValue",Lt);return $r!=null&&Gn!==null&&Gn!==void 0&&Gn<$r?x(zr,u.p.VALIDATION_MIN_VALUE,"Input should not be less than {{minValue}}",{minValue:$r}):""},maxValue:()=>{var Rr;if(Et==="date"){const c0=U(A.bK,Lt),Lo=K(c0??"01/01/2100","01/01/2100"),B0=K(Gn,"");if(!Lo||!B0)return"";if((0,o.A)(B0,Lo)){const eo=(Rr=Lt?.find(j0=>j0.url===A.Cx))==null?void 0:Rr.valueString;return eo??x(zr,u.p.VALIDATION_DATE_AFTER_MAX,"Date should not be after {{maxDate}}",{maxDate:c0??"01/01/2100"})}return""}const $r=I("maxValue",Lt);return $r!=null&&Gn!==null&&Gn!==void 0&&Gn>$r?x(zr,u.p.VALIDATION_MAX_VALUE,"Input should not exceed {{maxValue}}",{maxValue:$r}):""}};return Ut=Hr.required()||Hr.maxLength()||Hr.minLength()||Hr.urlRegex()||Hr.regex()||Hr.dateTime()||Hr.date()||Hr.minValue()||Hr.maxValue()||"",Ut},ne=(Lt,Et)=>{for(const bt of Et)if(bt.item){if(bt.item.find(Tn=>Tn.linkId===Lt.linkId))return bt;const hn=ne(Lt,bt.item);if(hn)return hn}return null},J=(Lt,Et)=>{if(Lt.answer&&Lt.answer.length>1)return!0;if(Lt.item){const bt=Lt.item.find(qt=>qt.linkId===Et.linkId);if(bt&&bt.answer&&bt.answer.length>1)return!0}return!1},ve=(Lt,Et,bt,qt,hn)=>{var Tn,zr;const{required:zn}=Lt,gn=(Tn=qt.item)==null?void 0:Tn.find(Pt=>Pt.linkId===Lt.linkId),en=gn?.answer||[],Mt=((zr=qt.answer)==null?void 0:zr.length)||1;for(let Pt=0;Pt<Mt;Pt++){const Ut=en[Pt];if(zn){if(!Ut||!de(Ut))return x(hn,Translations.VALIDATION_ITEM_ERROR,"Item {{index}}: {{error}}",{index:Pt+1,error:x(hn,Translations.VALIDATION_NAMED_FIELD_REQUIRED,"{{fieldName}} is required",{fieldName:Lt.text||Lt.linkId})});const ln=ue(Lt.extension,Lt.type,!0,Lt.maxLength,[Ut],Lt.answerOption,hn);if(ln)return x(hn,Translations.VALIDATION_ITEM_ERROR,"Item {{index}}: {{error}}",{index:Pt+1,error:ln})}else if(Ut&&de(Ut)){const ln=ue(Lt.extension,Lt.type,!1,Lt.maxLength,[Ut],Lt.answerOption,hn);if(ln)return x(hn,Translations.VALIDATION_ITEM_ERROR,"Item {{index}}: {{error}}",{index:Pt+1,error:ln})}}return""},Ee=(Lt,Et)=>{for(const bt of Lt){if(bt?.linkId===Et)return bt;if(bt?.item&&bt.item.length>0){const qt=Ee(bt.item,Et);if(qt)return qt}}},De=Lt=>{var Et;return!!((Et=Lt.extension)!=null&&Et.find(bt=>{var qt,hn;return bt.url===ITEM_CONTROL_EXTENSION_URL&&((hn=(qt=bt.valueCodeableConcept)==null?void 0:qt.coding)==null?void 0:hn.some(Tn=>Tn.system===ITEM_CONTROL_EXTENSION_CODING_SYSTEM&&Tn.code===FOOTER_CODE))}))},Se=Lt=>{var Et;return!!((Et=Lt.extension)!=null&&Et.find(bt=>bt.url===A.oA&&bt.valueBoolean))},Ie=Lt=>{var Et;return!!((Et=Lt.extension)!=null&&Et.find(bt=>{var qt,hn;return bt.url===ITEM_CONTROL_EXTENSION_URL&&((hn=(qt=bt.valueCodeableConcept)==null?void 0:qt.coding)==null?void 0:hn.some(Tn=>Tn.system===ITEM_CONTROL_EXTENSION_CODING_SYSTEM&&Tn.code===HEADER_CODE))}))},xe=Lt=>{var Et;return!!((Et=Lt.extension)!=null&&Et.find(bt=>{var qt,hn;return bt.url===A.gD&&((hn=(qt=bt.valueCodeableConcept)==null?void 0:qt.coding)==null?void 0:hn.some(Tn=>Tn.system===A.n4&&Tn.code===A._l))}))},Fe=Lt=>{var Et;return!!((Et=Lt.extension)!=null&&Et.find(bt=>bt.url===QUESTIONNAIRE_CALL_NEXT_QUESTION_EXTENSION_URL&&bt.valueBoolean))},it=Lt=>{var Et;return!!((Et=Lt.extension)!=null&&Et.find(bt=>{var qt,hn;return bt.url===ITEM_CONTROL_EXTENSION_URL&&((hn=(qt=bt.valueCodeableConcept)==null?void 0:qt.coding)==null?void 0:hn.some(Tn=>Tn.system===ITEM_CONTROL_EXTENSION_CODING_SYSTEM&&Tn.code===CHECKBOX_CODE))}))},gt=Lt=>{var Et;const bt=(Et=Lt.extension)==null?void 0:Et.find(qt=>qt.url===A.fe);return bt?.valueInteger},Ot=Lt=>{var Et;const bt=(Et=Lt.extension)==null?void 0:Et.find(qt=>qt.url===A.zO);return bt?.valueInteger},Dt=Lt=>{var Et;const bt=(Et=Lt?.extension)==null?void 0:Et.find(qt=>qt.url===QUESTIONNAIRE_TOTAL_STEPS_EXTENSION_URL);return bt?.valueInteger},Qt=(Lt,Et,bt,qt,hn,Tn)=>{const zr=gn=>Et.filter(en=>en.linkId===gn),zn=new Set;return Lt.map(gn=>{if(zn.has(gn.linkId)||De(gn))return null;const Mt=zr(gn.linkId),Pt=gn.type==="group"&&gn.repeats;if(zn.add(gn.linkId),Pt){const Ut=[];if(Mt.forEach((ln,Jt)=>{const En={linkId:gn.linkId,text:gn.text};let Gn;if(bt===gn.linkId&&typeof Tn=="number"&&Tn===Jt&&hn&&hn.length>0){const Hr=ln?.item||[];Gn=[...Hr],hn.forEach(Rr=>{const $r=Gn.findIndex(c0=>c0.linkId===Rr.linkId);$r>=0?Gn[$r]=M(v({},Hr[$r]),{answer:Rr.answer}):Gn.push(Rr)})}else gn.item&&(Gn=Qt(gn.item,ln?.item||[],bt,qt,hn,Jt));bt===gn.linkId&&typeof Tn=="number"&&Tn===Jt&&qt?En.answer=qt:En.answer=ln.answer||[{}],Gn&&Gn.length>0?En.item=Gn:ln.item&&(En.item=ln.item),Ut.push(En)}),bt===gn.linkId&&typeof Tn=="number"&&Tn>=Mt.length)for(let ln=Mt.length;ln<=Tn;ln++){const Jt={linkId:gn.linkId,text:gn.text,answer:ln===Tn&&qt?qt:[{}]};ln===Tn&&hn&&hn.length>0?Jt.item=hn:gn.item&&(Jt.item=Qt(gn.item,[],void 0,void 0,void 0,void 0)),Ut.push(Jt)}return Ut}else if(gn.repeats&&typeof Tn=="number"&&bt===gn.linkId){const Ut=Mt[0]||{linkId:gn.linkId,text:gn.text,answer:[]},ln={linkId:gn.linkId,text:gn.text,answer:[...Ut.answer||[]]};if(qt&&qt.length>0){for(;ln.answer.length<=Tn;)ln.answer.push({});ln.answer[Tn]=qt[0]}return ln}else{const Ut=Mt[0],ln=gn.item?Qt(gn.item,Ut?.item||[],bt,qt,hn,Tn):void 0,Jt=ln&&ln.length>0,En={linkId:gn.linkId,text:gn.text};return bt&&gn.linkId===bt&&typeof Tn!="number"?(qt||!qt&&!hn?En.answer=qt:Ut?.answer&&(En.answer=Ut.answer),hn?En.item=hn:Jt&&(En.item=ln)):(Ut?.answer?En.answer=Ut.answer:En.answer=[{}],Jt&&(En.item=ln)),En}}).filter(Boolean).flat()},zt=(Lt,Et)=>{for(const bt of Lt)if(bt.linkId===Et||bt.item&&zt(bt.item,Et))return bt.linkId;return null},Ke=(Lt,Et,bt,qt)=>{var hn;const Tn=(hn=Lt?.item)!=null?hn:qt;return!Tn||Tn.length===0?!0:Tn.every(zr=>{var zn;const gn=ae(Et,zr.linkId);if(gn.length===0){const en=(zn=G(Et,zr.linkId))==null?void 0:zn.answer;if(se(zr,Et,en)&&be(zr.enableWhen,zr.enableBehavior,Et)&&bt.includes(zr.linkId))return!1}else for(const en of gn)if(se(zr,Et,en.answer)&&be(zr.enableWhen,zr.enableBehavior,Et)&&bt.includes(zr.linkId))return!1;return zr.item?Ke(zr,Et,bt):!0})},We=(Lt,Et,bt=!0)=>{for(const qt of Lt)if(qt.linkId===Et&&qt.answer&&qt.answer.length>0||qt.item&&qt.item.length>0&&We(qt.item,Et,bt))return!0;return!1},Ct=(Lt,Et,bt=0)=>{const qt=Lt.filter(hn=>hn.linkId===Et);if(qt.length>bt){const hn=qt[bt];if(hn.answer&&hn.answer.length>0)return hn.answer.some(Tn=>Tn&&Object.keys(Tn).length>0&&Object.values(Tn).some(zr=>zr!=null&&zr!==""));if(hn.item&&hn.item.length>0)return We(hn.item,Et,!1)}return We(Lt,Et,!1)},Qe=(Lt,Et)=>{if(!Lt||!Lt.item)return!1;const bt=qt=>{var hn;if(Se(qt)&&qt.required&&be(qt.enableWhen,qt.enableBehavior,Et)){const Tn=G(Et,qt.linkId),zr=ue(qt.extension,qt.type,qt.required,qt.maxLength,Tn?.answer,qt.answerOption);if(!((hn=Tn?.answer)!=null&&hn.length)||zr)return!0}if(qt.item){for(const Tn of qt.item)if(bt(Tn))return!0}return!1};for(const qt of Lt.item)if(bt(qt))return!0;return!1},Ye=Lt=>{var Et,bt,qt;if(Lt.valueString!==void 0)return Lt.valueString;if(Lt.valueBoolean!==void 0)return Lt.valueBoolean;if(Lt.valueInteger!==void 0)return Lt.valueInteger;if(Lt.valueDecimal!==void 0)return Lt.valueDecimal;if(Lt.valueDate!==void 0)return Lt.valueDate;if(Lt.valueDateTime!==void 0)return Lt.valueDateTime;if(((Et=Lt.valueCoding)==null?void 0:Et.code)!==void 0)return Lt.valueCoding.code;if(((bt=Lt.valueReference)==null?void 0:bt.reference)!==void 0)return Lt.valueReference.reference;if(((qt=Lt.valueQuantity)==null?void 0:qt.value)!==void 0)return Lt.valueQuantity.value;if(Lt.valueAttachment!==void 0)return Lt.valueAttachment},It=Lt=>{const Et={linkId:Lt.linkId};if(Lt.answer&&Lt.answer.length>0){const bt=Lt.answer.map(qt=>Ye(qt)).filter(qt=>qt!==void 0);bt.length>0&&(Et.answer=bt)}if(Lt.item&&Lt.item.length>0){const bt=Lt.item.map(qt=>It(qt)).filter(qt=>{const hn=Object.keys(qt);return hn.length>1||hn.length===1&&hn[0]!=="linkId"});bt.length>0&&(Et.item=bt)}return Et},mn=(Lt,Et,bt,qt,hn,Tn)=>{var zr;const zn=(zr=Et?.item)==null?void 0:zr[bt[qt]],gn=zn?.linkId;if(!gn)return!1;const en=ae(Lt,gn),Mt=ae(hn,gn),Pt=Ut=>{if(Ut!=null){if(Array.isArray(Ut)){const ln=Ut.filter(Jt=>Jt!=null).map(Jt=>Pt(Jt)).filter(Jt=>Jt!==void 0);return ln.length===0||ln.length===1&&typeof ln[0]=="object"&&Object.keys(ln[0]).length===0?void 0:ln}if(typeof Ut=="object"){const ln={};for(const[Jt,En]of Object.entries(Ut))if(En!=null){const Gn=Pt(En);Gn!==void 0&&(ln[Jt]=Gn)}return Object.keys(ln).length===0?void 0:ln}return Ut}};if(en.length!==Mt.length)return!1;for(let Ut=0;Ut<en.length;Ut++){const ln=en[Ut],Jt=Mt[Ut];if(!ln||!Jt)return!1;const En=It(Pt(ln)),Gn=It(Pt(Jt));if(!_.isEqual(En,Gn))return!1}return qt!==Tn},Sn=(Lt,Et,bt,qt)=>bt&&bt.length>0&&!(bt.length===1&&Object.keys(bt[0]).length===0)&&se(Lt,Et,bt,qt)||null,et=(Lt,Et,bt)=>{const qt={},hn=Tn=>{Tn.forEach(zr=>{const zn=ae(Et,zr.linkId);if(ye(zr,Lt)||zr.repeats)for(let gn=0;gn<zn.length;gn++){const en=zn[gn];if(en?.answer&&en.answer.length>0){const Mt=Sn(zr,Et,en.answer,bt);Mt&&(qt[zr.linkId]=M(v({},qt[zr.linkId]),{[gn]:Mt}))}}else{const gn=G(Et,zr.linkId);if(gn?.answer&&gn.answer.length>0){const en=Sn(zr,Et,gn.answer,bt);en&&(qt[zr.linkId]={0:en})}}zr.item&&zr.item.length>0&&hn(zr.item)})};return hn(Lt),qt},Rt=Lt=>{if(!Lt)return"";const Et=Lt.split("-");if(Et.length===3){const[bt,qt,hn]=Et;return`${bt.slice(-4)}-${qt}-${hn}`}return""},kt=Lt=>Lt.trim().replace(/[A-Za-z]+/g,""),qn=(Lt,Et)=>{const bt=(qt,hn)=>{for(const Tn of qt){if(Tn.linkId===hn)return Tn.answer;if(Tn.item&&Tn.item.length>0){const zr=bt(Tn.item,hn);if(zr!==void 0)return zr}}};return bt(Lt,Et)},Sr=(Lt,Et)=>{if(!Et||Et.length===0)return null;const bt=Lt.linkId,qt=(hn,Tn,zr=[])=>{for(const zn of hn){const gn=[...zr,zn];if(zn.item){if(zn.item.some(Pt=>Pt.linkId===Tn))return gn.some(Pt=>Pt.repeats===!0)?zn:null;if(qt(zn.item,Tn,gn))return zn}}return null};return qt(Et,bt)},pn=(Lt,Et)=>{if(!Et||Et.length===0)return!1;const bt=Lt.linkId,qt=(hn,Tn,zr=[])=>{for(const zn of hn){const gn=[...zr,zn];if(zn.item){if(zn.item.some(Pt=>Pt.linkId===Tn))return gn.some(Pt=>{const Ut=T(Pt.extension||[]);return!!Ut&&Ut!==UI_TOOLKIT_FORM_CONTAINER});if(qt(zn.item,Tn,gn))return!0}}return!1};return qt(Et,bt)},Ln=(Lt,Et,bt)=>{const qt={};if(!Lt)return qt;const{linkId:hn}=Et;if(Lt[hn]){const Tn=Lt[hn];qt[hn]=Tn[bt]||""}return Et.item&&Et.item.length>0&&Et.item.forEach(Tn=>{if(Lt[Tn.linkId]){const zr=Lt[Tn.linkId];qt[Tn.linkId]=zr[bt]||""}}),qt},mr=(Lt,Et)=>{const bt={};if(!Lt||!Lt[Et])return bt;const qt=Lt[Et];return bt[Et]=qt[0]||"",bt},Bn=Lt=>{const Et=Lt.findIndex(Tn=>!Se(Tn)),bt=Et>=0?[Et]:[],qt=new Map;let hn=null;if(Lt.forEach((Tn,zr)=>{const zn=xe(Tn);if(zn&&Tn.type==="group")zr!==Et&&bt.push(zr),qt.set(zr,[zr]),hn=zr;else if(hn!==null&&!zn){const gn=qt.get(hn)||[];qt.set(hn,[...gn,zr])}}),Lt.length>0&&bt.length>0){const Tn=bt[0];if(!qt.has(Tn)){const zr=bt.find(gn=>gn>Tn),zn=[];for(let gn=Tn;gn<(zr??Lt.length);gn++)zn.push(gn);qt.set(Tn,zn)}}return{groupIndices:bt,itemsToRenderMap:qt}},Xr=(Lt,Et,bt,qt)=>{let hn=[...qt];const Tn=(zr,zn)=>{zr.forEach(gn=>{if((!gn?.enableWhen||be(gn?.enableWhen,gn.enableBehavior,zn))&&gn.initial&&!We(zn,gn.linkId))if(gn.repeats){const en=zn.filter(Mt=>Mt.linkId===gn.linkId);en.length>0?en.forEach((Mt,Pt)=>{Ct(zn,gn.linkId,Pt)||(hn=Qt(bt,hn,gn.linkId,gn.initial,void 0,Pt))}):hn=Qt(bt,hn,gn.linkId,gn.initial)}else hn=Qt(bt,hn,gn.linkId,gn.initial);gn.item&&Tn(gn.item,zn)})};return Tn(Lt,Et),hn},Qr=(Lt,Et,bt)=>{if(!Lt)return[];const qt=[],hn=Tn=>{Tn.required===Et&&be(Tn.enableWhen,Tn.enableBehavior,bt)&&!Se(Tn)&&Tn.type!=="display"&&qt.push(Tn),Tn.item&&Tn.item.length>0&&Tn.item.forEach(hn)};return Lt.forEach(hn),qt},Nt=(Lt,Et)=>Lt.every(bt=>{var qt;const hn=ae(Et,bt.linkId);if(hn.length>0)return hn.every(Tn=>!se(bt,Et,Tn.answer));{const Tn=(qt=G(Et,bt.linkId))==null?void 0:qt.answer;return!se(bt,Et,Tn)}}),_e=(Lt,Et)=>{let bt=-1;for(let qt=Lt.length-1;qt>=0;qt--)if(Lt[qt].linkId===Et){bt=qt;break}return bt},ot=(Lt,Et)=>Lt.filter(bt=>bt.linkId!==Et).map(bt=>bt.item&&bt.item.length>0?M(v({},bt),{item:ot(bt.item,Et)}):bt),Je=(Lt,Et,bt=Lt)=>Lt.reduce((qt,hn)=>{const Tn=Ee(Et,hn.linkId);return Tn?.enableWhen&&!be(Tn.enableWhen,Tn.enableBehavior,bt)||(hn.item&&hn.item.length>0?qt.push(M(v({},hn),{item:Je(hn.item,Et,bt)})):qt.push(hn)),qt},[]),tt=(Lt,Et,bt=[])=>{const qt=[],hn=Tn=>{Tn.forEach(zr=>{qt.push(zr.linkId),zr.item&&zr.item.length>0&&hn(zr.item)})};for(let Tn=0;Tn<Lt.length;Tn++){const zr=Lt[Tn];if(zr.linkId===Et){const zn=Lt.slice(0,Tn+1),gn=Lt.slice(Tn+1),{kept:en,removed:Mt}=gn.reduce((Pt,Ut)=>{const ln=Ee(bt,Ut.linkId);return!ln||Se(ln)&&be(ln.enableWhen,ln.enableBehavior,zn)?Pt.kept.push(Ut):Pt.removed.push(Ut),Pt},{kept:[],removed:[]});return hn(Mt),{trimmedData:[...zn,...en],trimmedLinkIds:qt,found:!0}}if(zr.item&&zr.item.length>0){const zn=tt(zr.item,Et,bt);if(zn.found){const gn=Lt.slice(0,Tn),en=Lt.slice(Tn+1),Mt=[...gn,M(v({},zr),{item:zn.trimmedData})],{kept:Pt,removed:Ut}=en.reduce((ln,Jt)=>{const En=Ee(bt,Jt.linkId);return!En||Se(En)&&be(En.enableWhen,En.enableBehavior,Mt)?ln.kept.push(Jt):ln.removed.push(Jt),ln},{kept:[],removed:[]});return hn(Ut),{trimmedData:[...Mt,...Pt],trimmedLinkIds:[...zn.trimmedLinkIds,...qt],found:!0}}}}return{trimmedData:Lt,trimmedLinkIds:[],found:!1}},rt=(Lt,Et)=>Lt.filter(bt=>!Et.includes(bt.linkId)).map(bt=>bt.item&&bt.item.length>0?M(v({},bt),{item:rt(bt.item,Et)}):bt),lt=Lt=>{var Et;if(!Lt)return"empty";const bt=A.Z$.find(({patterns:qt})=>qt.some(hn=>Lt.includes(hn)));return(Et=bt?.type)!=null?Et:"empty"},St=(Lt,Et)=>{const{groupIndices:bt}=Bn(Lt),qt=Lt.findIndex(hn=>hn.linkId===Et);return qt!==-1?bt.indexOf(qt):-1},st=Lt=>{if(!Lt)return{restriction:null,warning:null};const Et=bt=>{const qt=Lt.find(Tn=>Tn.url===bt&&Tn.valueString);if(!qt?.valueString)return null;const hn=qt.valueString.replace(/\\n/g,`
|
|
870
870
|
`).split(`
|
|
871
871
|
`).map(Tn=>Tn.trim()).filter(Boolean).map(Tn=>Tn.startsWith("*")?Tn.substring(1).trim():Tn);return hn.length===0?null:hn.length===1?{isList:!1,items:hn}:{isList:!0,items:hn}};return{restriction:Et("restriction"),warning:Et("warning")}},le=(Lt,Et)=>{var bt;switch(Et.type){case"boolean-to-string":return typeof Lt=="boolean"?Lt?Et.trueValue:Et.falseValue:Lt;case"map":return Et.mapping&&Lt in Et.mapping?Et.mapping[Lt]:Lt;case"date-format":return Lt;case"number-format":if(typeof Lt=="number"){let qt=Lt.toFixed((bt=Et.decimals)!=null?bt:0);return Et.prefix&&(qt=Et.prefix+qt),Et.suffix&&(qt=qt+Et.suffix),qt}return Lt;case"passthrough":default:return Lt}},ye=(Lt,Et)=>{const bt=Lt.linkId,qt=(Tn,zr,zn=[])=>{for(const gn of Tn){const en=[...zn,gn];if(gn.item){if(gn.item.some(Ut=>Ut.linkId===zr))return en.filter(Ut=>Ut.repeats===!0);const Pt=qt(gn.item,zr,en);if(Pt.length>0)return Pt}}return[]},hn=qt(Et,bt);return hn.length>0?hn[hn.length-1]:null},Ue=(Lt,Et)=>{if(!Lt?.item)return[];const bt=[];for(const qt of Lt.item){if(qt.type!=="group")continue;be(qt.enableWhen,qt.enableBehavior,Et||[])&&qt.linkId&&bt.push(qt.linkId)}return bt},Te=(Lt,Et)=>{const bt=Ue(Lt,Et||void 0);return bt[bt.length-1]},Tt=({questionnaire:Lt,extensionUrl:Et,errorCode:bt})=>{if(!bt||!Lt?.item)return;const qt=Lt.item.find(hn=>{var Tn;return(Tn=hn.extension)==null?void 0:Tn.some(zr=>zr.url===Et&&zr.valueString===bt)});return qt?.linkId},Zt=(Lt,Et)=>{var bt;const qt=(bt=Lt.extension)==null?void 0:bt.find(Tn=>Tn.url===A.rb);if(!qt?.valueString)return;const hn=qt.valueString;return Ee(Et,hn)},vn=Lt=>{var Et;return!!((Et=Lt.extension)!=null&&Et.find(bt=>bt.url===A.rb))},_n=(Lt,Et)=>Lt.filter(bt=>bt.linkId!==Et).map(bt=>bt.item&&bt.item.length>0?M(v({},bt),{item:_n(bt.item,Et)}):bt),Ar=Lt=>{const Et=I(ANALYTICS_FORM_NAME_EXTENSION_URL,Lt.extension);return Et??F(Lt.item,ANALYTICS_FORM_NAME_EXTENSION_URL)},Ft=Lt=>I(ANALYTICS_EVENT_NAME_EXTENSION_URL,Lt.extension),we=Lt=>I(ANALYTICS_PAGE_NAME_EXTENSION_URL,Lt.extension),Ze=Lt=>I(ANALYTICS_PROPERTY_NAME_EXTENSION_URL,Lt.extension),At=Lt=>I(ANALYTICS_OPTION_NAME_EXTENSION_URL,Lt),Gt=(Lt,Et)=>{var bt,qt,hn;if(!Lt.answerOption)return;const Tn=G(Et,Lt.linkId),zr=(hn=(qt=(bt=Tn?.answer)==null?void 0:bt[0])==null?void 0:qt.valueCoding)==null?void 0:hn.code;if(!zr)return;const zn=Lt.answerOption.find(gn=>{var en;return((en=gn.valueCoding)==null?void 0:en.code)===zr});if(!!zn)return At(zn.extension)},Yt=(Lt,Et)=>{const bt={},qt=hn=>{if(!!hn)for(const Tn of hn){const zr=Ze(Tn);if(zr){let zn;switch(Tn.type){case"choice":zn=Gt(Tn,Et);break;default:break}zn&&(bt[zr]=zn)}Tn.item&&Tn.item.length>0&&qt(Tn.item)}};return qt(Lt.item),bt},rn=Lt=>!!(Lt.initial&&Lt.initial.length>0),$n=(Lt,Et,bt,qt)=>{if(!Lt)return[];const hn=[],Tn=zr=>{zr.forEach(zn=>{if(bt&&bt.includes(zn.linkId)||qt&&zn.enableWhen&&!be(zn.enableWhen,zn.enableBehavior,qt))return;const gn=Se(zn),en=Et.includes(zn.linkId);(en||gn&&zn.required)&&hn.push(zn),en&&zn.item&&zn.item.length>0&&Tn(zn.item)})};return Tn(Lt),hn},Vr=(Lt,Et,bt,qt,hn,Tn)=>{var zr;if(bt<0||!qt?.item)return!0;const zn=hn.current[bt],gn=bt+1,en=hn.current[gn],Mt=bt===0?0:zn,Pt=en??qt.item.length,Ut=[];for(let Hr=Mt;Hr<Pt;Hr++){const Rr=(zr=qt?.item)==null?void 0:zr[Hr];if(Rr){if(Tn&&Tn.includes(Rr.linkId)||Rr.enableWhen&&!be(Rr.enableWhen,Rr.enableBehavior,Lt))continue;const $r=Se(Rr);(Et.includes(Rr.linkId)||$r&&Rr.required)&&Ut.push(Rr),Rr.item&&Rr.item.length>0&&Ut.push(...$n(Rr.item,Et,Tn,Lt))}}const ln=Ut.filter(Hr=>Hr.required===!0),Jt=Ut.filter(Hr=>Hr.required!==!0),En=Nt(ln,Lt),Gn=Jt?.every(Hr=>{var Rr;const $r=(Rr=G(Lt,Hr.linkId))==null?void 0:Rr.answer;return $r?!se(Hr,Lt,$r):!0});return!ln?.length||En&&Gn}},32957:(Y,l,e)=>{"use strict";var n=e(31085),t=e(14041),r=e(44738),s=e(36087),o=e(8322),i=e(1053),a=e(25624);const g=({item:jn})=>{const Wr=jn.text||"",Ur=jn.extension||[],Xo=_i=>{var Ii;return(Ii=Ur.find(zi=>zi.url===_i))==null?void 0:Ii.valueString},ko=Xo(i.$7),si=Xo(i.pc)||"default";return(0,n.jsx)(s.AlertFloating,{title:Wr,description:ko??"",color:si})};var c=e(7630),u=e(16212),C=Object.defineProperty,A=Object.getOwnPropertySymbols,m=Object.prototype.hasOwnProperty,d=Object.prototype.propertyIsEnumerable,O=(jn,Wr,Ur)=>Wr in jn?C(jn,Wr,{enumerable:!0,configurable:!0,writable:!0,value:Ur}):jn[Wr]=Ur,p=(jn,Wr)=>{for(var Ur in Wr||(Wr={}))m.call(Wr,Ur)&&O(jn,Ur,Wr[Ur]);if(A)for(var Ur of A(Wr))d.call(Wr,Ur)&&O(jn,Ur,Wr[Ur]);return jn};const b=({item:jn})=>{const[Wr,Ur]=(0,t.useState)(!1),Xo=jn.extension||[],ko=tn=>{var Pn;return(Pn=Xo.find(sr=>sr.url===tn))==null?void 0:Pn.valueString},si=ko(i.PS)||jn.text||"",_i=ko(i.Iz)||"button",Ii=ko(i.VF),zi=ko(i.PV),Vi=ko(i.vf),di=Vi?i.JP[Vi]:void 0,ta=ko(i.D_)||"",Aa=ko(i.$e),Dr=ko(i.GQ),tr=ko(i.qT)||"gray",dr=ko(i.hZ),Pe=ko(i.wG),Ce=ko(i.q3),$e=Dr?i.JP[Dr]:void 0,vt=()=>Ur(!0),jt=()=>{switch(_i){case"icon-button":return(0,n.jsxs)("button",{onClick:vt,className:"text-secondary hover:text-primary! flex cursor-pointer items-center gap-2 rounded-lg p-2 transition-opacity",type:"button","aria-label":si||ta||void 0,children:[di&&(0,n.jsx)(di,{"aria-hidden":!0,className:"text-fg-tertiary size-5"}),si&&(0,n.jsx)("span",{className:"text-sm",children:si})]});default:return(0,n.jsx)(s.Button,{color:Ii??"secondary",size:zi??"md",iconLeading:di,onClick:vt,"aria-label":si,children:si})}};return(0,n.jsxs)(n.Fragment,{children:[jt(),(0,n.jsx)(s.Modal,p(p(p({id:`modal-${jn.linkId}`,isOpen:Wr,onOpenChange:Ur,title:{content:ta},description:{content:Aa?(0,n.jsx)("div",{className:"tw-preflight [&>ul]:flex [&>ul]:list-disc [&>ul]:flex-col [&>ul]:gap-2.5 [&>ul]:pl-5",dangerouslySetInnerHTML:{__html:u.Wp.sanitizeHtml(Aa)}}):void 0},closeButton:{onCloseClick:()=>Ur(!1)}},$e?{featuredIcon:{icon:$e,color:tr,size:"lg",className:"bg-white"}}:{}),dr?{primaryButton:{children:dr,onClick:()=>{var tn,Pn;Pe==="open-zendesk"&&((Pn=(tn=globalThis.zE)==null?void 0:tn.activate)==null||Pn.call(tn,{hideOnClose:!0})),Ur(!1)}}}:{}),Ce?{secondaryButton:{children:Ce,onClick:()=>Ur(!1)}}:{}))]})};var h=e(18522);const f=({item:jn})=>{var Wr,Ur,Xo,ko,si,_i,Ii,zi,Vi,di,ta,Aa;const{hasExternalError:Dr}=(0,h.c)(),tr=jn.text||"",dr=(Ur=(Wr=jn.extension)==null?void 0:Wr.find(xr=>xr.url===i.ao))==null?void 0:Ur.valueString,Pe=Dr&&dr?dr:tr,Ce=(ko=(Xo=jn.extension)==null?void 0:Xo.find(xr=>xr.url===i.$7))==null?void 0:ko.valueString,$e=(_i=(si=jn.extension)==null?void 0:si.find(xr=>xr.url===i.el))==null?void 0:_i.valueString,vt=Dr&&$e?$e:Ce,jt=(zi=(Ii=jn.extension)==null?void 0:Ii.find(xr=>xr.url===i.g4))==null?void 0:zi.valueString,tn=(di=(Vi=jn.extension)==null?void 0:Vi.find(xr=>xr.url===i.Fp))==null?void 0:di.valueString,Pn=jt?i.JP[jt]:void 0,sr=tn?i.JP[tn]:void 0,bn=Dr&&sr?sr:Pn,Xn=((Aa=(ta=jn.extension)==null?void 0:ta.find(xr=>xr.url===i.WS))==null?void 0:Aa.valueString)===i._W.LEFT,un=Xn?"items-start":"items-center",fr=Xn?"text-left":"text-center",pr=Xn?"text-2xl font-semibold":"text-3xl font-medium";return(0,n.jsxs)("div",{className:`flex flex-col ${un} gap-4`,children:[bn&&(0,n.jsx)(s.FeaturedIcon,{icon:bn,color:Dr&&sr?"error":"brand",size:"xl"}),(0,n.jsxs)("div",{className:`flex flex-col ${un} gap-1`,children:[(0,n.jsx)("h1",{className:`text-primary max-w-[330px] ${fr} ${pr} md:max-w-[352px]`,children:Pe}),(0,n.jsx)("p",{className:`text-md text-secondary ${fr}`,children:vt})]})]})};var v=e(15297),M=e(17814),x=Object.defineProperty,T=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,S=Object.prototype.propertyIsEnumerable,y=(jn,Wr,Ur)=>Wr in jn?x(jn,Wr,{enumerable:!0,configurable:!0,writable:!0,value:Ur}):jn[Wr]=Ur,E=(jn,Wr)=>{for(var Ur in Wr||(Wr={}))z.call(Wr,Ur)&&y(jn,Ur,Wr[Ur]);if(T)for(var Ur of T(Wr))S.call(Wr,Ur)&&y(jn,Ur,Wr[Ur]);return jn};const R=({item:jn})=>{const[Wr,Ur]=(0,t.useState)(!1),Xo=(0,M.T$)(),ko=jn.extension||[],si=dr=>{var Pe;return(Pe=ko.find(Ce=>Ce.url===dr))==null?void 0:Pe.valueString},_i=jn.text||"",Ii=si(i.PS)||"",zi=si(i.D_)||"",Vi=si(i.$e),di=si(i.GQ),ta=si(i.qT)||"gray",Aa=si(i.hZ),Dr=si(i.q3),tr=di?i.JP[di]:void 0;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"bg-secondary ring-border-secondary flex items-center justify-between rounded-lg px-4 py-2.5 ring-1",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)(v.d,{className:"text-tertiary size-4 shrink-0"}),(0,n.jsx)("span",{className:"text-primary text-sm font-semibold",children:_i})]}),Ii&&(0,n.jsx)("button",{type:"button",className:"text-link-primary cursor-pointer text-sm font-semibold",onClick:()=>Ur(!0),children:Ii})]}),(0,n.jsx)(s.Modal,E(E(E({id:`modal-${jn.linkId}`,isOpen:Wr,onOpenChange:Ur,title:{content:zi},description:{content:Vi?(0,n.jsx)("div",{className:"tw-preflight [&>ul]:flex [&>ul]:list-disc [&>ul]:flex-col [&>ul]:gap-2.5 [&>ul]:pl-5",dangerouslySetInnerHTML:{__html:u.Wp.sanitizeHtml(Vi)}}):void 0},closeButton:{onCloseClick:()=>Ur(!1)}},tr?{featuredIcon:{icon:tr,color:ta,size:"lg",className:"bg-white"}}:{}),Aa?{primaryButton:{children:Aa,onClick:()=>{Ur(!1),Xo.navigate({id:"profile"})}}}:{}),Dr?{secondaryButton:{children:Dr,onClick:()=>Ur(!1)}}:{}))]})},P=({item:jn,selectedAnswer:Wr,handleInputChange:Ur})=>{var Xo,ko,si;const _i=(Xo=jn.answerOption)!=null?Xo:[],Ii=(si=(ko=Wr?.[0])==null?void 0:ko.valueCoding)==null?void 0:si.code;return(0,n.jsx)("div",{className:"flex flex-col gap-3",children:_i.map(zi=>{var Vi,di,ta,Aa,Dr,tr,dr;const Pe=(di=(Vi=zi.valueCoding)==null?void 0:Vi.code)!=null?di:"",Ce=(Aa=(ta=zi.valueCoding)==null?void 0:ta.display)!=null?Aa:"",$e=Ii===Pe,vt=(Dr=zi.extension)==null?void 0:Dr.find(sr=>sr.url===i.g4),jt=(tr=zi.extension)==null?void 0:tr.find(sr=>sr.url===i.rz),tn=vt?.valueString?i.JP[vt.valueString]:void 0,Pn=(dr=jt?.valueString)!=null?dr:"";return(0,n.jsx)(s.SelectableOption,{icon:tn,title:Ce,description:Pn,isSelected:$e,onSelect:()=>{Ur(jn,[{valueCoding:{code:Pe,display:Ce}}])}},Pe)})})};var L=e(72866),D=e(94043),N=e(94627);const w=({text:jn,isLabel:Wr,required:Ur,className:Xo,id:ko})=>(0,n.jsxs)("p",{id:ko,className:Xo??"mb-md text-md",children:[(0,n.jsx)(s.Content,{as:"span",className:(0,D.cx)(Wr&&"text-secondary text-sm font-medium sm:text-sm"),dangerouslySetInnerHTML:{__html:(0,N.p)(jn||"")}}),Ur&&(0,n.jsx)("span",{className:"text-brand-tertiary ml-1 text-sm font-medium","aria-hidden":"true",children:"*"})]}),V="(###) ###-####",q=(jn,Wr)=>{const Ur=jn.replace(/\D/g,"");let Xo="",ko=0;for(let si=0;si<Wr.length&&ko<Ur.length;si++)Wr[si]==="#"?(Xo+=Ur[ko],ko++):Xo+=Wr[si];return Xo},I=jn=>{if(!jn)return V;const Wr=jn.find(Ur=>Ur.url===i.Md);return Wr?.valueString||V},k=({item:jn,onCompleteHandler:Wr,selectedAnswer:Ur,handleInputChange:Xo,showQuestionPrefix:ko,errors:si,isLoading:_i})=>{var Ii;const{linkId:zi,text:Vi,required:di,prefix:ta,readOnly:Aa,extension:Dr}=jn,tr=I(Dr),dr=((Ii=Ur?.[0])==null?void 0:Ii.valueString)||"",[Pe,Ce]=(0,t.useState)("");(0,t.useEffect)(()=>{if(dr){const Pn=q(dr,tr);Ce(Pn)}},[dr,tr]);const $e=Vi?(0,a.nt)(ko,ta,Vi):"",vt=si?.[zi]||"",jt=Pn=>{const sr=q(Pn,tr);Ce(sr),Xo(jn,[{valueString:sr}])},tn=()=>{Wr&&Wr(zi)};return(0,n.jsxs)("div",{"data-testid":zi,children:[$e&&(0,n.jsx)(w,{isLabel:!0,text:$e,required:di||!1}),(0,n.jsx)(s.Input,{id:zi,"aria-label":zi,"data-testid":zi,type:"tel",placeholder:"Enter phone number",value:Pe,onChange:jt,onBlur:tn,isDisabled:Aa||_i,isRequired:di,hint:vt,isInvalid:!!vt,size:"md"},zi)]})},U=({item:jn,questionnaireSchemaItems:Wr})=>{var Ur;const{isLoading:Xo,setCurrentGroupIndex:ko}=(0,h.c)(),si=(Ur=jn.extension)==null?void 0:Ur.find(Vi=>Vi.url===i.Uf),_i=si?.valueString,Ii=jn.text||"Save & continue",zi=()=>{if(_i){const Vi=(0,a.Ue)(Wr||[],_i);Vi!==-1&&ko(Vi)}};return(0,n.jsx)("div",{"data-testid":jn.linkId,className:"flex w-full justify-center",children:(0,n.jsx)(s.Button,{className:"md:w-xxs h-10 w-full text-sm",color:"primary",isLoading:Xo,onClick:zi,isDisabled:jn.readOnly,children:Ii})})},F=({size:jn=24,color:Wr="currentColor",...Ur})=>t.createElement("svg",{viewBox:"0 0 24 24",width:jn,height:jn,stroke:Wr,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...Ur},t.createElement("path",{d:"M10 16h4m-5.2 6h6.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C20 19.72 20 18.88 20 17.2V6.8c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C17.72 2 16.88 2 15.2 2H8.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C4 4.28 4 5.12 4 6.8v10.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C6.28 22 7.12 22 8.8 22ZM15 9a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}));F.displayName="Passport";var K=e(56327);const G=({size:jn=24,color:Wr="currentColor",...Ur})=>t.createElement("svg",{viewBox:"0 0 24 24",width:jn,height:jn,stroke:Wr,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...Ur},t.createElement("path",{d:"M5.316 19.438A4.001 4.001 0 0 1 9 17h6a4.001 4.001 0 0 1 3.684 2.438M16 9.5a4 4 0 1 1-8 0 4 4 0 0 1 8 0Zm6 2.5c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z"}));G.displayName="UserCircle";var ae=e(14711);const oe=({size:jn=24,color:Wr="currentColor",...Ur})=>t.createElement("svg",{viewBox:"0 0 24 24",width:jn,height:jn,stroke:Wr,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...Ur},t.createElement("path",{d:"m2 7 8.165 5.715c.661.463.992.695 1.351.784a2 2 0 0 0 .968 0c.36-.09.69-.32 1.351-.784L22 7M6.8 20h10.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C22 17.72 22 16.88 22 15.2V8.8c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C19.72 4 18.88 4 17.2 4H6.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C2 6.28 2 7.12 2 8.8v6.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C4.28 20 5.12 20 6.8 20Z"}));oe.displayName="Mail01";var te=e(31165),pe=e(14449),be=e(59931),ze=e(27163);const ge=jn=>{try{const Wr=jn.match(/^(\d{4})-(\d{2})-(\d{2})/);if(!Wr)return jn;const[,Ur,Xo,ko]=Wr;return new Date(Date.UTC(parseInt(Ur),parseInt(Xo)-1,parseInt(ko))).toLocaleDateString("en-US",{weekday:"short",year:"numeric",month:"short",day:"numeric",timeZone:"UTC"})}catch{return jn}},re=jn=>{try{if(jn.includes("AM")||jn.includes("PM"))return jn;const Wr=jn.match(/T?(\d{2}):(\d{2}):(\d{2})/);if(!Wr)return jn;const[,Ur,Xo]=Wr,ko=parseInt(Ur),si=ko>=12?"PM":"AM";return`${ko%12||12}:${Xo} ${si}`}catch{return jn}},se=(jn,Wr,Ur=v.d)=>{var Xo;const ko=(Xo=jn.extension)==null?void 0:Xo.find(si=>si.url===i.g4);return ko?.valueString&&i.JP[ko.valueString]?i.JP[ko.valueString]:jn.linkId&&Wr[jn.linkId]?Wr[jn.linkId]:Ur},me={"appointment-review/first-name":F,"appointment-review/last-name":F,"appointment-review/dob":K.V,"appointment-review/gender":G,"appointment-review/phone":ae.b,"appointment-review/email":oe,"appointment-review/vaccines":s.Vaccine,"appointment-review/appointment-date":K.V,"appointment-review/appointment-time":te.z,"appointment-review/facility-name":s.HospitalBuilding,"appointment-review/facility-phone":ae.b,"appointment-review/facility-address":pe.X},he=["appointment-review/appointment-date"],de=["appointment-review/appointment-time"],ue=["appointment-review/facility-phone"],ne=["appointment-review/facility-address"],J=["appointment-review/phone","appointment-review/facility-phone"],ve=({item:jn,questionnaireSchemaItems:Wr})=>{var Ur;const{setCurrentGroupIndex:Xo}=(0,h.c)(),{trackEvent:ko}=(0,o.st)(),si=jn.item||[];if(si.length===0)return null;const _i=(Ur=jn.extension)==null?void 0:Ur.find(di=>di.url===i.Uf),Ii=_i?.valueString,zi=()=>{if(ko("edit_info_clicked",{section:jn.text,_event_metadata:{description:"When a user clicks the Edit info link on the confirm details page during booking an appointment"}}),Ii){const di=(0,a.Ue)(Wr||[],Ii);di!==-1&&Xo(di)}},Vi=si.map(di=>{let ta="";if(di.initial&&di.initial.length>0){const tr=di.initial.map(dr=>{var Pe,Ce,$e,vt,jt,tn,Pn,sr;let bn=((Pe=dr.valueCoding)==null?void 0:Pe.display)||((Ce=dr.valueReference)==null?void 0:Ce.display)||dr.valueString||"";if(bn&&typeof bn=="string"){if(he.includes(di.linkId)){const Xn=(jt=(vt=($e=dr.valueReference)==null?void 0:$e.extension)==null?void 0:vt.find(un=>un?.url===i.zD||un?.url===i.UZ))==null?void 0:jt.valueCode;if(Xn)try{bn=(0,be.formatToTimeZone)(bn,"YYYY-MM-DD",{timeZone:Xn})}catch{}bn=ge(bn)}else if(de.includes(di.linkId)){const Xn=(sr=(Pn=(tn=dr.valueReference)==null?void 0:tn.extension)==null?void 0:Pn.find(un=>un?.url===i.zD||un?.url===i.UZ))==null?void 0:sr.valueCode;if(Xn)try{bn=(0,be.formatToTimeZone)(bn,"h:mm A",{timeZone:Xn})}catch{bn=re(bn)}else bn=re(bn)}}return bn}).filter(Boolean);tr.length>1||di.repeats&&tr.length>0?ta=tr:tr.length===1&&(ta=tr[0])}if(!ta||Array.isArray(ta)&&ta.length===0)return null;let Aa;ue.includes(di.linkId)?Aa="phone":ne.includes(di.linkId)&&(Aa="address");let Dr;return J.includes(di.linkId)&&(Dr="phone"),{Icon:se(di,me),label:di.text||di.linkId,value:ta,linkType:Aa,displayType:Dr}}).filter(Boolean);return Vi.length===0?null:(0,n.jsx)("div",{"data-testid":jn.linkId,children:(0,n.jsx)(ze.InfoCard,{title:jn.text||"Details",infoDetails:Vi,actionButtonText:Ii&&"Edit info",onActionButtonClick:Ii?zi:void 0})})},Ee=({size:jn=24,color:Wr="currentColor",...Ur})=>t.createElement("svg",{viewBox:"0 0 24 24",width:jn,height:jn,stroke:Wr,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...Ur},t.createElement("path",{d:"M12 9v4m0 4h.01M10.615 3.892 2.39 18.098c-.456.788-.684 1.182-.65 1.506a1 1 0 0 0 .406.705c.263.191.718.191 1.629.191h16.45c.91 0 1.365 0 1.628-.191a1 1 0 0 0 .407-.705c.034-.324-.195-.718-.65-1.506L13.383 3.892c-.454-.785-.681-1.178-.978-1.31a1 1 0 0 0-.813 0c-.296.132-.523.525-.978 1.31Z"}));Ee.displayName="AlertTriangle";var De=e(18807);const Se=({item:jn})=>{const{setHideFooterButton:Wr,incrementCustomErrorCount:Ur,decrementCustomErrorCount:Xo,addErrorLinkId:ko,removeErrorLinkId:si}=(0,h.c)();return(0,t.useEffect)(()=>(Wr(!0),Ur(),ko(jn.linkId),()=>{Wr(!1),Xo(),si(jn.linkId)}),[Wr,Ur,Xo,ko,si,jn.linkId]),(0,n.jsx)("div",{"data-testid":jn.linkId,className:"flex w-full justify-center",children:(0,n.jsx)(s.EmptyState,{className:"mt-5xl",description:(0,n.jsx)(s.Content,{as:"span",dangerouslySetInnerHTML:{__html:(0,De.p)(jn.text||"")}}),featuredIconProps:{icon:(0,n.jsx)(Ee,{}),color:"gray",className:"rounded-full shadow-0 ring-bg-primary"}})})},Ie={information:"info",warning:"warning",error:"error",fatal:"fatal",success:"success"},xe=({item:jn})=>{var Wr,Ur,Xo,ko;const{incrementCustomErrorCount:si,decrementCustomErrorCount:_i,addErrorLinkId:Ii,removeErrorLinkId:zi,setHideFooterButton:Vi}=(0,h.c)(),[di,ta]=(0,t.useState)(!1),Aa=(Wr=jn.extension)==null?void 0:Wr.find($e=>$e.url===i.gi),Dr=(Xo=(Ur=Aa?.valueCodeableConcept)==null?void 0:Ur.coding)==null?void 0:Xo.find($e=>$e.system===i.tn),tr=Dr?.code||"error",dr=Ie[tr]||"error";(0,t.useEffect)(()=>{if(dr==="error")return si(),Vi(!0),ta(!0),()=>{_i(),Vi(!1)};if(dr==="fatal")return si(),Ii(jn.linkId),Vi(!0),ta(!0),()=>{_i(),zi(jn.linkId),Vi(!1)};ta(!0)},[dr]);const Pe=Dr?.display||"Error",Ce=(ko=jn.text)!=null?ko:"";return di?(0,n.jsx)("div",{"data-testid":jn.linkId,children:(0,n.jsx)(s.InfoBanner,{type:dr==="fatal"?"error":dr,title:Pe,description:Ce})}):null};var Fe=e(65735);const it=({configKey:jn,customErrorConfigurations:Wr})=>{if(!Wr)return null;const Ur=Wr[jn];if(!Ur)return null;const{icon:Xo,title:ko,description:si,primaryButton:_i,secondaryButton:Ii}=Ur;return(0,n.jsx)(s.EmptyState,{className:"mt-5xl",title:ko,description:si,featuredIconProps:{icon:Xo,color:"gray"},primaryButton:_i,secondaryButton:Ii})},gt=10,Ot=({item:jn,customErrorConfigurations:Wr,selectedAnswer:Ur,handleInputChange:Xo,showQuestionPrefix:ko,errors:si,isLoading:_i})=>{var Ii,zi,Vi,di;const{trackEvent:ta}=(0,o.st)(),{setHideFooterButton:Aa}=(0,h.c)(),{linkId:Dr,text:tr,required:dr,answerOption:Pe,prefix:Ce,readOnly:$e}=jn,vt=jn?.type==="reference",jt=(Ii=Ur?.map(cn=>{var kn,nr;return vt?(kn=cn.valueReference)==null?void 0:kn.display:(nr=cn.valueCoding)==null?void 0:nr.code}).filter(cn=>cn!==void 0))!=null?Ii:[],[tn,Pn]=(0,t.useState)(jt.length),sr=tr?(0,a.nt)(ko,Ce,tr):"",bn=(Vi=(zi=jn.extension)==null?void 0:zi.find(cn=>cn.url===i.Z_))==null?void 0:Vi.valueInteger,Xn=(di=Pe?.map(cn=>{var kn,nr,Zr,f0;return{value:vt?((kn=cn.valueReference)==null?void 0:kn.display)||"":((nr=cn.valueCoding)==null?void 0:nr.code)||"",label:vt?((Zr=cn.valueReference)==null?void 0:Zr.display)||"":((f0=cn.valueCoding)==null?void 0:f0.display)||"",valueReference:cn.valueReference}}))!=null?di:[],un=si?.[Dr],fr=Xn.length>gt,pr=fr?Xn.slice(0,gt):Xn,xr=fr?Xn.slice(gt):[],A0=xr.some(cn=>jt?.includes(cn?.value)),[d0,Y0]=(0,t.useState)(A0);if(!(jn.answerOption&&jn.answerOption.length>0))return Aa(!0),(0,n.jsx)(it,{configKey:jn.linkId,customErrorConfigurations:Wr});const ft=Xn.filter(cn=>jt?.includes(cn?.value)).map(cn=>{var kn;const{restriction:nr,warning:Zr}=vt?(0,a.eC)((kn=cn.valueReference)==null?void 0:kn.extension):{restriction:null,warning:null};return{label:cn.label,restriction:nr,warning:Zr}}).filter(cn=>cn.restriction||cn.warning),$t=(cn,kn)=>{var nr;ta("vaccine_type_checkbox_selected",{on_or_off:cn?"on":"off",vaccine:kn,_event_metadata:{description:"A user clicked the checkbox next to a vaccine type."}});let Zr;if(cn){const f0=Xn.find(bo=>bo.value===kn);Zr=[...(nr=Ur?.filter(bo=>Object.keys(bo).length!==0))!=null?nr:[],vt?{valueReference:f0?.valueReference}:{valueCoding:{code:kn,display:f0?.label}}],Pn(bo=>bo+1)}else Zr=Ur?.filter(f0=>{var bo,D0;return vt?((bo=f0.valueReference)==null?void 0:bo.display)!==kn:((D0=f0.valueCoding)==null?void 0:D0.code)!==kn})||[{}],Pn(f0=>f0-1);Xo&&Xo(jn,Zr)};return(0,n.jsxs)("div",{"data-testid":Dr,children:[sr&&(0,n.jsx)(w,{text:sr,required:dr||!1}),fr&&(0,n.jsx)("div",{className:"mt-3xl mb-md text-primary font-medium",children:"Most Popular"}),(0,n.jsx)("div",{children:pr.map((cn,kn)=>{const nr=jt?.includes(cn?.value),Zr=!nr&&bn?tn>=bn:!1;return(0,n.jsx)("div",{className:kn!==pr.length-1?"mb-2xl mx-lg":"mx-lg",children:(0,n.jsx)(s.Checkbox,{size:"md","data-testid":cn.value,id:kn.toString(),name:cn.label,isInvalid:!!un,isSelected:nr,label:cn.label,onChange:f0=>$t(f0,cn.value),isDisabled:$e||_i||Zr})},kn)})}),fr&&!d0&&!A0&&(0,n.jsx)("div",{className:"mt-3xl flex justify-center",children:(0,n.jsx)(s.Button,{type:"button",onClick:()=>{Y0(!0),ta("see_all_vaccines_clicked",{_event_metadata:{description:"A user clicked the see all link on the vaccine type page."}})},color:"link-color",size:"sm",isDisabled:$e||_i,children:"See all"})}),fr&&d0&&(0,n.jsx)("div",{className:"mt-3xl mb-md font-medium",children:"Other Vaccines"}),fr&&d0&&(0,n.jsx)("div",{children:xr.map((cn,kn)=>{const nr=jt?.includes(cn?.value),Zr=!nr&&bn?tn>=bn:!1;return(0,n.jsx)("div",{className:kn!==xr.length-1?"mb-2xl mx-lg":"mx-lg",children:(0,n.jsx)(s.Checkbox,{size:"md","data-testid":cn.value,id:(gt+kn).toString(),name:cn.label,isInvalid:!!un,isSelected:nr,label:cn.label,onChange:f0=>$t(f0,cn.value),isDisabled:$e||_i||Zr})},gt+kn)})}),(0,n.jsx)(s.HintText,{isInvalid:!!un,children:un}),ft.length>0&&(0,n.jsx)("div",{className:"mt-3xl space-y-2",children:ft.map((cn,kn)=>(0,n.jsxs)("div",{children:[cn.restriction&&(0,n.jsx)(s.InfoBanner,{type:"warning",title:`[Restriction] ${cn.label}`,description:cn.restriction.isList?(0,n.jsx)("ul",{className:"ml-5 list-disc space-y-1",children:cn.restriction.items.map((nr,Zr)=>(0,n.jsx)("li",{className:"text-sm",children:nr},Zr))}):(0,n.jsx)("p",{className:"text-sm",children:cn.restriction.items[0]})}),cn.warning&&(0,n.jsx)("div",{className:cn.restriction?"mt-2":"",children:(0,n.jsx)(s.InfoBanner,{type:"warning",title:`[Warning] ${cn.label}`,description:cn.warning.isList?(0,n.jsx)("ul",{className:"ml-5 list-disc space-y-1",children:cn.warning.items.map((nr,Zr)=>(0,n.jsx)("li",{className:"text-sm",children:nr},Zr))}):(0,n.jsx)("p",{className:"text-sm",children:cn.warning.items[0]})})})]},kn))})]})};var Dt=e(76323),Qt=e(56192),zt=e(66267),Ke=Object.defineProperty,We=Object.defineProperties,Ct=Object.getOwnPropertyDescriptors,Qe=Object.getOwnPropertySymbols,Ye=Object.prototype.hasOwnProperty,It=Object.prototype.propertyIsEnumerable,mn=(jn,Wr,Ur)=>Wr in jn?Ke(jn,Wr,{enumerable:!0,configurable:!0,writable:!0,value:Ur}):jn[Wr]=Ur,Sn=(jn,Wr)=>{for(var Ur in Wr||(Wr={}))Ye.call(Wr,Ur)&&mn(jn,Ur,Wr[Ur]);if(Qe)for(var Ur of Qe(Wr))It.call(Wr,Ur)&&mn(jn,Ur,Wr[Ur]);return jn},et=(jn,Wr)=>We(jn,Ct(Wr)),Rt=(jn,Wr,Ur)=>new Promise((Xo,ko)=>{var si=zi=>{try{Ii(Ur.next(zi))}catch(Vi){ko(Vi)}},_i=zi=>{try{Ii(Ur.throw(zi))}catch(Vi){ko(Vi)}},Ii=zi=>zi.done?Xo(zi.value):Promise.resolve(zi.value).then(si,_i);Ii((Ur=Ur.apply(jn,Wr)).next())});const kt=({item:jn,handleInputChange:Wr,onCompleteHandler:Ur,errors:Xo})=>{const{i18n:{t:ko},loading:si}=(0,zt.E_)({keys:["shared-translations","ui-toolkit-modern"]}),{trackEvent:_i}=(0,o.st)(),{linkId:Ii,required:zi,readOnly:Vi}=jn,di=Xo?.[Ii]||"",[ta,Aa]=(0,t.useState)(Dt.LocationType.CURRENT_LOCATION),[Dr,tr]=(0,t.useState)(""),dr=(0,t.useRef)({}),[Pe,Ce]=(0,t.useState)([{id:Dt.LocationType.CURRENT_LOCATION,label:"Current Location"},{id:Dt.LocationType.ADDRESS,label:"Address"},{id:Dt.LocationType.ZIP_CODE,label:"Zip code"}]),{isLoading:$e,setIsLoading:vt,setIsCurrentFormValid:jt,isCurrentFormValid:tn}=(0,h.c)(),{position:Pn,loading:sr,locationPermission:bn}=(0,Dt.useDeviceLocationContext)(),{queryParams:Xn,setQueryParams:un}=(0,Dt.useSearchQueryParams)(),[fr,{loading:pr}]=(0,Qt.qtq)({fetchPolicy:"cache-first"}),[xr,{loading:A0}]=(0,Qt.YyG)({fetchPolicy:"cache-first"}),d0=jn.item?(0,a.Yo)(jn.item,"postal-code"):void 0,Y0=jn.item?(0,a.Yo)(jn.item,"state"):void 0,jo=jn.item?(0,a.Yo)(jn.item,"latitude"):void 0,ft=jn.item?(0,a.Yo)(jn.item,"longitude"):void 0,$t=R0=>{if(!R0||!d0)return tr(""),!1;const yo=(0,a.zj)(d0.extension,d0.type,!1,d0.maxLength,[{valueString:R0}],void 0,ko);return yo?(tr(ta!==Dt.LocationType.ZIP_CODE?ko("SELECT_DIFFERENT_LOCATION_TYPE_ERROR"):yo),!1):(tr(""),!0)},cn=()=>{const{latitude:R0,longitude:yo,state:Do,zipcode:Q0}=dr.current;return!!(R0&&yo&&Do&&Q0)},kn=(0,t.useCallback)(R0=>{dr.current={latitude:void 0,longitude:void 0,state:void 0,zipcode:void 0,placeId:void 0,addressDescription:void 0},jn.item&&(Y0&&Wr(Y0,[{valueString:""}]),jo&&Wr(jo,[{valueDecimal:void 0}]),ft&&Wr(ft,[{valueDecimal:void 0}]),d0&&Wr(d0,[{valueString:""}])),un({lat:"",lng:"",location:"",zipCode:"",placeId:"",addressDescription:"",locationType:R0,locationPermission:bn}),jt&&jt(!1),tr("")},[Wr,jn.item,jo,bn,ft,jt,un,Y0,d0]);(0,t.useEffect)(()=>{if(!zi)return;!cn()&&jt&&jt(!1)},[tn,zi,jt]);const nr=R0=>{dr.current=Sn(Sn({},dr.current),R0),R0.addressDescription&&_i("address_selected",{value:R0.addressDescription,_event_metadata:{description:"A user selected an address from the typeahead."}}),bo(dr.current.latitude,dr.current.longitude,dr.current.state,dr.current.zipcode,dr.current.placeId,dr.current.addressDescription)},Zr=R0=>Rt(void 0,null,function*(){var yo,Do,Q0;if(tr(""),dr.current.zipcode=R0,jt&&jt(!1),$t(R0)){_i("zip_code_entered",{value:R0,_event_metadata:{description:"A user entered a zip code."}});const J0=yield xr({variables:{location:R0}}),O0=(yo=J0?.data)==null?void 0:yo.geocoding,So=J0?.error;if(O0){const W0=O0.stateCode||"",Gi=(Do=O0.latitude)!=null?Do:void 0,zo=(Q0=O0.longitude)!=null?Q0:void 0;nr({latitude:Gi,longitude:zo,state:W0,zipcode:R0,placeId:void 0,addressDescription:void 0})}else So&&(nr({latitude:void 0,longitude:void 0,state:void 0,zipcode:R0,placeId:void 0,addressDescription:void 0}),tr(ko("SELECT_DIFFERENT_ZIPCODE_OR_LOCATION_TYPE_ERROR")))}else bo(dr.current.latitude,dr.current.longitude,dr.current.state,R0)}),f0=()=>{const R0=dr.current.zipcode||"";!R0||ta!==Dt.LocationType.ZIP_CODE||$t(R0)};(0,t.useEffect)(()=>{Xn.locationType&&(Aa(Xn.locationType),Xn.locationType===Dt.LocationType.ZIP_CODE&&Xn.zipCode&&Zr(Xn.zipCode),Xn.locationType===Dt.LocationType.ADDRESS&&Xn.placeId&&Xn.addressDescription&&(dr.current.addressDescription=Xn.addressDescription,dr.current.placeId=Xn.placeId))},[]),(0,t.useEffect)(()=>{const R0=[Dt.LocationPermissionEnum.DENIED,Dt.LocationPermissionEnum.UNAVAILABLE,Dt.LocationPermissionEnum.BLOCKED].includes(Xn.locationPermission),yo=[Dt.LocationPermissionEnum.GRANTED,Dt.LocationPermissionEnum.PROMPT].includes(Xn.locationPermission);if(R0&&Pe.length!==2){if(Ce([{id:Dt.LocationType.ADDRESS,label:"Address"},{id:Dt.LocationType.ZIP_CODE,label:"Zip code"}]),ta===Dt.LocationType.CURRENT_LOCATION||!Xn.locationType||Xn.locationType===""){const Do=Xn.locationType===Dt.LocationType.ZIP_CODE?Dt.LocationType.ZIP_CODE:Dt.LocationType.ADDRESS;Aa(Do),un(et(Sn({},Xn),{locationType:Do})),kn(Do)}tr("")}yo&&Pe.length!==3&&Ce([{id:Dt.LocationType.CURRENT_LOCATION,label:"Current Location"},{id:Dt.LocationType.ADDRESS,label:"Address"},{id:Dt.LocationType.ZIP_CODE,label:"Zip code"}])},[ta,bn,Pe.length,Xn,un,kn]);const bo=(R0,yo,Do,Q0,J0,O0)=>{if(!jn.item)return;Y0&&Wr(Y0,[{valueString:Do||""}]),jo&&Wr(jo,[{valueDecimal:R0}]),ft&&Wr(ft,[{valueDecimal:yo}]),d0&&Wr(d0,[{valueString:Q0||""}]),un(et(Sn({},Xn),{lat:String(R0),lng:String(yo),location:`${R0},${yo}`,zipCode:Q0||"",placeId:J0||"",addressDescription:O0||"",locationPermission:bn}));const So=cn()&&$t(Q0||"");jt&&jt(So),Ur&&Ur(Ii)};(0,t.useEffect)(()=>{const R0=()=>Rt(void 0,null,function*(){var yo;try{const Do=yield fr({variables:{latitude:String(Pn?.coords.latitude),longitude:String(Pn?.coords.longitude)}}),Q0=(yo=Do?.data)==null?void 0:yo.geocodingByLatLon,J0=Q0?.stateCode||"",O0=Q0?.zipCode||"";(!O0||!J0)&&tr(ko("SELECT_DIFFERENT_LOCATION_TYPE_ERROR")),nr({latitude:Pn?.coords.latitude,longitude:Pn?.coords.longitude,state:J0,zipcode:O0,placeId:void 0,addressDescription:void 0})}catch{Aa(Dt.LocationType.ADDRESS)}});ta===Dt.LocationType.CURRENT_LOCATION&&Pn&&R0()},[ta,Pn]);const D0=R0=>{if(!R0||!R0.latitude||!R0.longitude||!R0.zipCode||!R0.stateCode){nr({latitude:void 0,longitude:void 0,state:void 0,zipcode:void 0,placeId:void 0,addressDescription:void 0}),R0&&typeof R0.value=="string"&&R0.value.trim().length!==0&&tr(ko("SELECT_DIFFERENT_ADDRESS_OR_LOCATION_TYPE_ERROR"));return}nr({latitude:R0.latitude,longitude:R0.longitude,state:R0.stateCode,zipcode:R0.zipCode,placeId:R0.placeId,addressDescription:R0.description})};return(0,t.useEffect)(()=>{vt(sr||pr||A0||si)},[sr,pr,A0,si,vt]),(0,t.useEffect)(()=>{Xn.locationType!==ta&&un(et(Sn({},Xn),{locationType:ta}))},[ta]),(0,n.jsxs)("div",{"data-testid":jn.linkId,children:[(0,n.jsx)(w,{isLabel:!0,className:"mb-sm text-md",text:"Location type",required:zi||!1}),(0,n.jsx)(s.Select,{id:Ii,"aria-label":Ii,"data-testid":Ii,isDisabled:Vi||pr||A0||$e,selectedKey:ta,onSelectionChange:R0=>{var yo;_i("location_type_input_selected",{choice:(yo=Pe.find(({id:Do})=>Do===R0))==null?void 0:yo.label,_event_metadata:{description:"A user changed the location type input."}}),R0!==ta&&(kn(R0),Aa(R0))},hint:di,isInvalid:!!di,items:Pe,placeholder:"Select an option",isRequired:zi,children:R0=>(0,n.jsx)(s.Select.Item,{id:R0.id,"data-testid":R0.id,value:R0,children:R0.label},R0.id)},Ii),ta===Dt.LocationType.CURRENT_LOCATION&&(0,n.jsx)(s.HintText,{isInvalid:!!Dr,children:Dr}),ta===Dt.LocationType.ADDRESS&&(0,n.jsxs)("div",{className:"mt-3xl",children:[(0,n.jsx)(w,{isLabel:!0,className:"mb-sm text-md",text:"Address",required:zi||!1}),(0,n.jsx)(Dt.AddressTypeahead,{onValueChange:D0,isDisabled:$e,setIsLoading:vt,initialValue:{placeId:dr.current.placeId||"",description:dr.current.addressDescription||""},errorText:Dr||di})]}),ta===Dt.LocationType.ZIP_CODE&&(0,n.jsxs)("div",{className:"mt-3xl",children:[(0,n.jsx)(w,{isLabel:!0,className:"mb-sm text-md",text:"Zip code",required:zi||!1}),(0,n.jsx)(s.Input,{isRequired:zi,size:"md","aria-label":"zipcode-input","data-testid":"zipcode-input",id:`${Ii}-zipcode`,placeholder:"Type your response here...",value:dr.current.zipcode||"",onChange:Zr,onBlur:f0,isDisabled:Vi||A0||$e,hint:Dr||di,isInvalid:!!Dr||!!di,autoComplete:"postal-code"},`${Ii}-zipcode`)]})]})},qn=jn=>(0,n.jsx)(Dt.DeviceLocationProvider,{children:(0,n.jsx)(kt,Sn({},jn))}),Sr={[i.cX]:qn,[i.G6]:ve,[i.c3]:Ot,[i.AA]:xe,[i.mO]:f,[i.PM]:U,[i.HH]:k,[i.Us]:Se,[i.Tl]:P,[i.G0]:b,[i.m3]:g,[i.PU]:R,[i.XP]:c.l,[i.uH]:L.v,[i.it]:Fe.d};var pn,Ln=new Uint8Array(16);function mr(){if(!pn&&(pn=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!pn))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return pn(Ln)}const Bn=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function Xr(jn){return typeof jn=="string"&&Bn.test(jn)}const Qr=Xr;for(var Nt=[],_e=0;_e<256;++_e)Nt.push((_e+256).toString(16).substr(1));function ot(jn){var Wr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,Ur=(Nt[jn[Wr+0]]+Nt[jn[Wr+1]]+Nt[jn[Wr+2]]+Nt[jn[Wr+3]]+"-"+Nt[jn[Wr+4]]+Nt[jn[Wr+5]]+"-"+Nt[jn[Wr+6]]+Nt[jn[Wr+7]]+"-"+Nt[jn[Wr+8]]+Nt[jn[Wr+9]]+"-"+Nt[jn[Wr+10]]+Nt[jn[Wr+11]]+Nt[jn[Wr+12]]+Nt[jn[Wr+13]]+Nt[jn[Wr+14]]+Nt[jn[Wr+15]]).toLowerCase();if(!Qr(Ur))throw TypeError("Stringified UUID is invalid");return Ur}const Je=ot;function tt(jn,Wr,Ur){jn=jn||{};var Xo=jn.random||(jn.rng||mr)();if(Xo[6]=Xo[6]&15|64,Xo[8]=Xo[8]&63|128,Wr){Ur=Ur||0;for(var ko=0;ko<16;++ko)Wr[Ur+ko]=Xo[ko];return Wr}return Je(Xo)}const rt=tt,lt=(jn,Wr="application/octet-stream")=>{try{const Ur=window.atob(jn),Xo=new Uint8Array(Ur.length);for(let si=0;si<Ur.length;si++)Xo[si]=Ur.charCodeAt(si);return new Blob([Xo],{type:Wr}).size}catch{return 0}},St=(jn,Wr)=>`data:${Wr};base64,${jn}`,st=(jn,Wr,Ur=512)=>{const Xo=window.atob(jn),ko=[];for(let _i=0;_i<Xo.length;_i+=Ur){const Ii=Xo.slice(_i,_i+Ur),zi=new Array(Ii.length);for(let di=0;di<Ii.length;di++)zi[di]=Ii.charCodeAt(di);const Vi=new Uint8Array(zi);ko.push(Vi)}const si=new Blob(ko,{type:Wr});return URL.createObjectURL(si)},le=jn=>{const Wr=new Date().toISOString().replace(/[:.-]/g,"");return`${jn.split(" ").join("-")}_${Wr}`},ye=4e3,Ue=.8,Te=(jn,Wr)=>{var Ur,Xo;const ko=(Ur=Wr?.maxDimension)!=null?Ur:ye,si=(Xo=Wr?.quality)!=null?Xo:Ue;return new Promise((_i,Ii)=>{if(!jn.type.startsWith("image/")){_i(jn);return}if(jn.type==="image/heic"||jn.type==="image/heif"||jn.name.toLowerCase().endsWith(".heic")||jn.name.toLowerCase().endsWith(".heif")){_i(jn);return}const Vi=new Image,di=new FileReader;di.onload=()=>{const ta=di.result;Vi.onload=()=>{let{width:Aa,height:Dr}=Vi;if(Aa>ko||Dr>ko){const $e=ko/Math.max(Aa,Dr);Aa=Math.round(Aa*$e),Dr=Math.round(Dr*$e)}const tr=document.createElement("canvas");tr.width=Aa,tr.height=Dr;const dr=tr.getContext("2d");if(!dr){_i(jn);return}dr.drawImage(Vi,0,0,Aa,Dr);const Pe=jn.type==="image/png"?"image/png":"image/jpeg",Ce=jn.type==="image/png"?void 0:si;tr.toBlob($e=>{if(!$e||$e.size>=jn.size){_i(jn);return}_i(new File([$e],jn.name,{type:Pe}))},Pe,Ce)},Vi.onerror=()=>{Ii(new Error(`Failed to load image: ${jn.name}`))},Vi.src=ta},di.onerror=()=>{Ii(new Error(`Failed to read file: ${jn.name}`))},di.readAsDataURL(jn)})},Tt=50,Zt=(jn,Wr=Tt)=>{if(jn.length<=Wr)return jn;const Ur=jn.lastIndexOf("."),Xo=Ur!==-1?jn.slice(Ur):"",ko=Ur!==-1?jn.slice(0,Ur):jn,si=Wr-Xo.length-1,_i=Math.ceil(si/2),Ii=Math.floor(si/2);return`${ko.slice(0,_i)}\u2026${ko.slice(-Ii)}${Xo}`};var vn=Object.defineProperty,_n=Object.defineProperties,Ar=Object.getOwnPropertyDescriptors,Ft=Object.getOwnPropertySymbols,we=Object.prototype.hasOwnProperty,Ze=Object.prototype.propertyIsEnumerable,At=(jn,Wr,Ur)=>Wr in jn?vn(jn,Wr,{enumerable:!0,configurable:!0,writable:!0,value:Ur}):jn[Wr]=Ur,Gt=(jn,Wr)=>{for(var Ur in Wr||(Wr={}))we.call(Wr,Ur)&&At(jn,Ur,Wr[Ur]);if(Ft)for(var Ur of Ft(Wr))Ze.call(Wr,Ur)&&At(jn,Ur,Wr[Ur]);return jn},Yt=(jn,Wr)=>_n(jn,Ar(Wr)),rn=(jn,Wr,Ur)=>new Promise((Xo,ko)=>{var si=zi=>{try{Ii(Ur.next(zi))}catch(Vi){ko(Vi)}},_i=zi=>{try{Ii(Ur.throw(zi))}catch(Vi){ko(Vi)}},Ii=zi=>zi.done?Xo(zi.value):Promise.resolve(zi.value).then(si,_i);Ii((Ur=Ur.apply(jn,Wr)).next())});const $n=({item:jn,onCompleteHandler:Wr,selectedAnswer:Ur,handleInputChange:Xo,showQuestionPrefix:ko,errors:si,isLoading:_i})=>{const{linkId:Ii,text:zi,required:Vi,prefix:di,readOnly:ta,repeats:Aa,extension:Dr}=jn,tr=(0,a.Qr)(Dr),dr=(0,a.cz)(Dr),Pe=(0,a.$H)(Dr)||"image/*,.pdf,.doc,.docx",Ce=zi?(0,a.nt)(ko,di,zi):"",$e=si?.[Ii]||"",[vt,jt]=(0,t.useState)([]),tn=(0,t.useRef)(Ur||[]);(0,t.useEffect)(()=>{Ur&&(tn.current=Ur)},[Ur]),(0,t.useEffect)(()=>{Ur?.length&&jt(fr=>{const pr=fr.filter(A0=>A0.isLoading||A0.failed);return[...Ur.filter(A0=>A0.valueAttachment).map((A0,d0)=>{var Y0,jo,ft,$t,cn;const kn=((Y0=A0.valueAttachment)==null?void 0:Y0.title)||`attachment-${d0}`,nr=(jo=A0.valueAttachment)==null?void 0:jo.id,Zr=fr.find(D0=>nr&&D0.id===nr||!nr&&D0.id===`existing-${d0}`),f0=(ft=A0.valueAttachment)==null?void 0:ft.data,bo=f0?lt(f0,($t=A0.valueAttachment)==null?void 0:$t.contentType):0;return{id:nr||Zr?.id||`existing-${d0}`,name:kn,size:Zr?.size||bo,progress:100,failed:!1,type:(0,a.J4)((cn=A0.valueAttachment)==null?void 0:cn.contentType),isLoading:!1}}),...pr]})},[Ur]);const Pn=fr=>{let pr=Array.from(fr);if(dr!==void 0){const A0=dr-vt.length;if(A0<=0)return;pr=pr.slice(0,A0)}const xr=pr.map(A0=>{const d0=A0.name.replace(/\s+/g,"-");return{id:rt(),name:d0,size:A0.size,progress:0,type:(0,a.J4)(A0.type),failed:!1,isLoading:!0}});jt(A0=>[...A0,...xr]),xr.forEach(A0=>{const d0=pr.find(Y0=>Y0.name.replace(/\s+/g,"-")===A0.name);d0&&sr(d0,A0.id)})},sr=(fr,pr)=>rn(void 0,null,function*(){try{const xr=yield Te(fr);if(tr&&xr.size>tr){const $t=parseFloat((tr/1e6).toFixed(1));jt(cn=>cn.map(kn=>kn.id===pr?Yt(Gt({},kn),{isLoading:!1,failed:!0,disableRetry:!0,errorMessage:`File size exceeds ${$t} MB limit`}):kn));return}const A0=yield un(xr),d0=xr.name.replace(/\s+/g,"-");jt($t=>$t.map(cn=>cn.id===pr?Yt(Gt({},cn),{isLoading:!1,progress:100,failed:!1}):cn));const Y0={valueAttachment:{id:pr,contentType:xr.type,data:A0,title:d0}},ft=[...(tn.current||[]).filter($t=>$t.valueAttachment||Object.keys($t).length>0),Y0];tn.current=ft,Xo(jn,ft),Wr(Ii)}catch{jt(A0=>A0.map(d0=>d0.id===pr?Yt(Gt({},d0),{isLoading:!1,failed:!0}):d0))}}),bn=fr=>{const pr=vt.find(xr=>xr.id===fr);if(jt(xr=>xr.filter(A0=>A0.id!==fr)),pr){const xr=(tn.current||[]).filter((A0,d0)=>{var Y0;if(fr.startsWith("existing-")){const jo=parseInt(fr.replace("existing-",""));return d0!==jo}return((Y0=A0.valueAttachment)==null?void 0:Y0.id)!==fr}).filter(A0=>A0.valueAttachment||Object.keys(A0).length>0);tn.current=xr,Xo(jn,xr.length>0?xr:[{}])}},Xn=fr=>{const pr=vt.find(xr=>xr.id===fr);if(pr){jt(A0=>A0.map(d0=>d0.id===fr?Yt(Gt({},d0),{failed:!1,isLoading:!0,progress:0}):d0));const xr=new File([""],pr.name,{type:"application/octet-stream"});sr(xr,fr)}},un=fr=>new Promise((pr,xr)=>{const A0=new FileReader;A0.onload=()=>{const Y0=A0.result.split(",")[1];pr(Y0)},A0.onerror=xr,A0.readAsDataURL(fr)});return(0,n.jsxs)("div",{children:[Ce&&(0,n.jsx)(w,{isLabel:!0,className:"mb-sm text-md",text:Ce,required:Vi||!1}),(0,n.jsx)(s.FileUpload,{files:vt,onDropFiles:Pn,onDeleteFile:bn,onRetryFile:Xn,onDropUnacceptedFiles:()=>{},hint:(0,a.od)(Pe,tr,dr),accept:Pe,allowsMultiple:Aa!==!1,isDisabled:ta||_i||dr!==void 0&&vt.length>=dr,className:"w-full",showDisclosureModal:!0}),$e&&(0,n.jsx)("div",{className:"text-error-primary mt-2 text-sm",children:$e})]})},Vr=({item:jn,onCompleteHandler:Wr,selectedAnswer:Ur,handleInputChange:Xo,showQuestionPrefix:ko,errors:si,isLoading:_i})=>{var Ii,zi;const{linkId:Vi,text:di,prefix:ta,readOnly:Aa,required:Dr,extension:tr}=jn,{trackQuestionnaireEvent:dr}=(0,h.c)(),Pe=di?(0,a.nt)(ko,ta,di):"",Ce=si?.[Vi];return tr?.find(vt=>{var jt,tn;return vt.url===i.gD&&((tn=(jt=vt.valueCodeableConcept)==null?void 0:jt.coding)==null?void 0:tn.some(Pn=>Pn.system===i.n4&&Pn.code===i.GI))})?(0,n.jsxs)("div",{"data-testid":Vi,children:[(0,n.jsxs)("div",{className:"flex items-start gap-3","data-testid":Vi,children:[(0,n.jsx)(s.Checkbox,{size:"md",id:Vi,name:Vi,isDisabled:Aa||_i,isSelected:(Ii=Ur?.[0])==null?void 0:Ii.valueBoolean,"aria-label":Vi,label:"",className:"mt-1",onChange:vt=>{dr(jn.linkId,{value:vt}),Xo(jn,[{valueBoolean:vt}]),Wr(jn.linkId)}}),Pe&&(0,n.jsx)(w,{isLabel:!0,text:Pe,required:Dr||!1})]}),(0,n.jsx)(s.HintText,{isInvalid:!!Ce,children:Ce})]}):(0,n.jsxs)("div",{"data-testid":Vi,children:[Pe&&(0,n.jsx)(w,{isLabel:!0,text:Pe,required:Dr||!1}),(0,n.jsxs)(s.RadioGroup,{size:"md",id:Vi,name:Vi,"aria-label":Vi,value:String((zi=Ur?.[0])==null?void 0:zi.valueBoolean)||"",onChange:vt=>{Xo(jn,[{valueBoolean:vt==="true"}]),Wr(jn.linkId)},isInvalid:!!Ce,children:[(0,n.jsx)(s.RadioButton,{size:"md",value:"true",label:"Yes",isDisabled:Aa||_i}),(0,n.jsx)(s.RadioButton,{size:"md",value:"false",label:"No",isDisabled:Aa||_i})]},Vi),Ce&&(0,n.jsx)("div",{children:(0,n.jsx)("span",{className:(0,D.cx)("text-error-primary","text-sm","mt-[1.5]"),children:Ce})})]})};var Lt=Object.defineProperty,Et=Object.getOwnPropertySymbols,bt=Object.prototype.hasOwnProperty,qt=Object.prototype.propertyIsEnumerable,hn=(jn,Wr,Ur)=>Wr in jn?Lt(jn,Wr,{enumerable:!0,configurable:!0,writable:!0,value:Ur}):jn[Wr]=Ur,Tn=(jn,Wr)=>{for(var Ur in Wr||(Wr={}))bt.call(Wr,Ur)&&hn(jn,Ur,Wr[Ur]);if(Et)for(var Ur of Et(Wr))qt.call(Wr,Ur)&&hn(jn,Ur,Wr[Ur]);return jn};const zr=({item:jn,onCompleteHandler:Wr,selectedAnswer:Ur,handleInputChange:Xo,showQuestionPrefix:ko,errors:si,isLoading:_i,placeholder:Ii,hintText:zi})=>{var Vi,di,ta;const{linkId:Aa,text:Dr,required:tr,answerOption:dr,prefix:Pe,readOnly:Ce}=jn,$e=Dr?(0,a.nt)(ko,Pe,Dr):"",vt=dr?.map(Pn=>{var sr,bn,Xn,un;return{id:((sr=Pn.valueCoding)==null?void 0:sr.code)||Pn.valueString||"",label:((bn=Pn.valueCoding)==null?void 0:bn.display)||Pn.valueString||"",value:((Xn=Pn.valueCoding)==null?void 0:Xn.code)||Pn.valueString||"",extension:Pn.extension||[],system:((un=Pn.valueCoding)==null?void 0:un.system)||void 0}})||[],jt=((di=(Vi=Ur?.[0])==null?void 0:Vi.valueCoding)==null?void 0:di.code)||((ta=Ur?.[0])==null?void 0:ta.valueString)||"",tn=si?.[Aa];return(0,n.jsxs)("div",{children:[$e&&(0,n.jsx)(w,{isLabel:!0,className:"mb-sm text-md",text:$e,required:tr||!1}),(0,n.jsx)(s.Select,{id:Aa,"aria-label":Aa,"data-testid":Aa,isDisabled:Ce||_i,selectedKey:jt,onSelectionChange:Pn=>{const sr=String(Pn),bn=vt.find(fr=>fr.value===sr),Xn=bn?bn.label:"",un=Boolean(dr?.find(fr=>fr.valueString===sr));Xo(jn,[un?{valueString:sr}:{valueCoding:Tn({code:sr,display:Xn},bn?.system?{system:bn.system}:{}),extension:bn?.extension||[]}]),Wr(jn.linkId)},isInvalid:!!tn,hint:tn||zi,items:vt,placeholder:Ii,isRequired:tr,children:Pn=>(0,n.jsx)(s.Select.Item,{id:Pn.id,"data-testid":Pn.value,value:Pn.value,children:Pn.label},Pn.id)},Aa)]})};var zn=Object.defineProperty,gn=Object.getOwnPropertySymbols,en=Object.prototype.hasOwnProperty,Mt=Object.prototype.propertyIsEnumerable,Pt=(jn,Wr,Ur)=>Wr in jn?zn(jn,Wr,{enumerable:!0,configurable:!0,writable:!0,value:Ur}):jn[Wr]=Ur,Ut=(jn,Wr)=>{for(var Ur in Wr||(Wr={}))en.call(Wr,Ur)&&Pt(jn,Ur,Wr[Ur]);if(gn)for(var Ur of gn(Wr))Mt.call(Wr,Ur)&&Pt(jn,Ur,Wr[Ur]);return jn};const ln=jn=>{var Wr,Ur,Xo;const{item:ko,selectedAnswer:si,updatedText:_i,required:Ii,errorMessage:zi}=jn,Vi=ko?.type==="reference",di=(Wr=si?.map(dr=>{var Pe,Ce;return Vi?(Pe=dr.valueReference)==null?void 0:Pe.display:(Ce=dr.valueCoding)==null?void 0:Ce.code}).filter(dr=>dr!==void 0))!=null?Wr:[],[ta,Aa]=(0,t.useState)(di.length),Dr=(Xo=(Ur=ko.extension)==null?void 0:Ur.find(dr=>dr.url===i.Z_))==null?void 0:Xo.valueInteger,tr=(dr,Pe)=>{var Ce,$e,vt;let jt;if(dr){const tn=jn.options.find(Pn=>Pn.value===Pe);jt=[...($e=(Ce=jn.selectedAnswer)==null?void 0:Ce.filter(Pn=>Object.keys(Pn).length!==0))!=null?$e:[],Vi?{valueReference:tn?.valueReference}:{valueCoding:Ut({code:Pe,display:tn?.label},tn?.system?{system:tn.system}:{}),extension:tn?.extension||[]}],Aa(Pn=>Pn+1)}else jt=((vt=jn.selectedAnswer)==null?void 0:vt.filter(tn=>{var Pn,sr;return Vi?((Pn=tn.valueReference)==null?void 0:Pn.display)!==Pe:((sr=tn.valueCoding)==null?void 0:sr.code)!==Pe}))||[{}],Aa(tn=>tn-1);jn.handleInputChange(jn.item,jt)};return(0,n.jsxs)("div",{"data-testid":ko.linkId,children:[_i&&(0,n.jsx)(w,{isLabel:!0,text:_i,required:Ii||!1}),(0,n.jsx)("div",{children:jn.options.map((dr,Pe)=>(0,n.jsx)(s.Checkbox,{size:"md","data-testid":dr.value,id:Pe.toString(),className:Pe!==jn.options.length-1?"mb-2xl":"",name:dr.label,isInvalid:!!zi,isSelected:di?.includes(dr?.value),label:dr.label,onChange:Ce=>tr(Ce,dr.value),isDisabled:jn.readOnly||jn.isLoading||(!di?.includes(dr?.value)&&Dr?ta>=Dr:!1)},Pe))}),(0,n.jsx)(s.HintText,{isInvalid:!!zi,children:zi})]})},Jt=({item:jn,onCompleteHandler:Wr,updatedText:Ur,options:Xo,handleInputChange:ko,errorMessage:si,readOnly:_i,initialValue:Ii,selectedAnswer:zi,isLoading:Vi,required:di})=>{var ta,Aa;const Dr=`${jn.linkId}-label`,tr=`${jn.linkId}-error`;return(0,n.jsxs)("div",{"data-testid":jn.linkId,children:[Ur&&(0,n.jsx)(w,{id:Dr,isLabel:!0,text:Ur,required:di||!1}),(0,n.jsx)(s.RadioGroup,{size:"md",id:jn.linkId,name:jn.linkId,"aria-labelledby":Ur?Dr:void 0,"aria-describedby":si?tr:void 0,isRequired:di,className:Xo.length===2?"flex-row flex-wrap gap-8":"gap-6",value:((Aa=(ta=zi?.[0])==null?void 0:ta.valueCoding)==null?void 0:Aa.code)||Ii||"",onChange:dr=>{const Pe=dr,Ce=Xo.find(vt=>vt.value===Pe),$e=Ce?Ce.label:"";ko(jn,[{valueCoding:{code:Pe,display:$e,system:Ce?.system||void 0},extension:Ce?.extension||[]}]),Wr(jn.linkId)},isInvalid:!!si,children:Xo.map(dr=>(0,n.jsx)(s.RadioButton,{size:"md","data-testid":dr.value,isDisabled:_i||Vi,value:dr.value,label:dr.label},dr.value))},jn.linkId),si&&(0,n.jsx)("div",{id:tr,children:(0,n.jsx)("span",{className:(0,D.cx)("text-error-primary","text-sm","mt-[1.5]"),children:si})})]})};var En=Object.defineProperty,Gn=Object.getOwnPropertySymbols,Hr=Object.prototype.hasOwnProperty,Rr=Object.prototype.propertyIsEnumerable,$r=(jn,Wr,Ur)=>Wr in jn?En(jn,Wr,{enumerable:!0,configurable:!0,writable:!0,value:Ur}):jn[Wr]=Ur,c0=(jn,Wr)=>{for(var Ur in Wr||(Wr={}))Hr.call(Wr,Ur)&&$r(jn,Ur,Wr[Ur]);if(Gn)for(var Ur of Gn(Wr))Rr.call(Wr,Ur)&&$r(jn,Ur,Wr[Ur]);return jn};const Lo=({item:jn,onCompleteHandler:Wr,selectedAnswer:Ur,handleInputChange:Xo,showQuestionPrefix:ko,errors:si,isLoading:_i,placeholder:Ii,hintText:zi})=>{var Vi,di,ta,Aa,Dr;const{linkId:tr,text:dr,required:Pe,answerOption:Ce,prefix:$e,readOnly:vt}=jn,jt=jn?.type==="reference",tn=dr?(0,a.nt)(ko,$e,dr):"",sr=(()=>{var xr,A0;const d0=Ce?.find(Y0=>Y0.initialSelected===!0);return d0?jt?((xr=d0.valueReference)==null?void 0:xr.display)||"":((A0=d0?.valueCoding)==null?void 0:A0.code)||"":""})(),bn=(Ce?.map(xr=>{var A0,d0,Y0,jo,ft;return{label:((A0=xr?.valueCoding)==null?void 0:A0.display)||((d0=xr?.valueReference)==null?void 0:d0.display)||"",value:jt?((Y0=xr.valueReference)==null?void 0:Y0.display)||"":((jo=xr.valueCoding)==null?void 0:jo.code)||"",valueReference:jt?xr.valueReference:{},extension:xr.extension||[],system:((ft=xr.valueCoding)==null?void 0:ft.system)||""}})||[]).filter(xr=>xr.label),Xn=si?.[tr],un=(Dr=(Aa=(ta=(di=(Vi=jn?.extension)==null?void 0:Vi.find(xr=>xr.url.includes("questionnaire-itemControl")))==null?void 0:di.valueCodeableConcept)==null?void 0:ta.coding)==null?void 0:Aa[0])==null?void 0:Dr.code;let fr=null;const pr={item:jn,onCompleteHandler:Wr,updatedText:tn,options:bn,handleInputChange:Xo,errorMessage:Xn,required:Pe,readOnly:vt,initialValue:sr,selectedAnswer:Ur,isLoading:_i,showQuestionPrefix:ko,placeholder:Ii,hintText:zi};switch(un){case"drop-down":fr=(0,n.jsx)(zr,c0({},pr));break;case"check-box":fr=(0,n.jsx)(ln,c0({},pr));break;case"radio-button":fr=(0,n.jsx)(Jt,c0({},pr));break}return(0,n.jsx)(n.Fragment,{children:fr})};var B0=e(73697),eo=e(71924),j0=e(46776),ho=e(16681);const br=jn=>`${String(jn.month).padStart(2,"0")}/${String(jn.day).padStart(2,"0")}/${jn.year}`,Mr=({item:jn,onCompleteHandler:Wr,selectedAnswer:Ur,handleInputChange:Xo,showQuestionPrefix:ko,errors:si,isLoading:_i,placeholder:Ii,hintText:zi})=>{var Vi,di,ta;const{linkId:Aa,text:Dr,required:tr,prefix:dr,readOnly:Pe}=jn,Ce=(0,t.useRef)(null),[$e,vt]=(0,t.useState)(!1),[jt,tn]=(0,t.useState)(null),{t:Pn}=(0,r.SS)(),{setIsCurrentFormValid:sr,isCurrentFormValid:bn,trackQuestionnaireEvent:Xn}=(0,h.c)(),un=Dr?(0,a.nt)(ko,dr,Dr):"",fr=si?.[Aa]||"",pr=(Vi=jn.extension)==null?void 0:Vi.find(Q0=>Q0.url===i.dU),xr=(di=jn.extension)==null?void 0:di.find(Q0=>Q0.url===i.bK),A0=(0,t.useMemo)(()=>{var Q0;const J0=pr?.valueString||pr?.valueDate;return J0||(0,a.iI)((Q0=pr?.valueExpression)==null?void 0:Q0.expression)},[pr]),d0=(0,t.useMemo)(()=>{var Q0;const J0=xr?.valueString||xr?.valueDate;return J0||(0,a.iI)((Q0=xr?.valueExpression)==null?void 0:Q0.expression)},[xr]),Y0=(0,t.useMemo)(()=>{if(A0&&/^\d{4}-\d{2}-\d{2}$/.test(A0))try{return(0,B0._U)(A0)}catch{}return(0,B0._U)("1900-01-01")},[A0]),jo=(0,t.useMemo)(()=>{if(d0&&/^\d{4}-\d{2}-\d{2}$/.test(d0))try{return(0,B0._U)(d0)}catch(Q0){console.warn("Failed to parse maxDateStr:",d0,Q0)}return(0,B0._U)("2099-12-31")},[d0]),$t=(Q0=>{if(!Q0)return"";const J0=Q0.match(/^(\d{4})-(\d{2})-(\d{2})$/);if(!J0)return Q0;const[,O0,So,W0]=J0;return`${So}/${W0}/${O0}`})(((ta=Ur?.[0])==null?void 0:ta.valueDate)||""),cn=Q0=>{if(!Q0)return"";const J0=Q0.replace(/\D/g,"");if(J0.length===0)return"";if(J0.length<=2)return J0.length===2?`${J0}/`:J0;const O0=W0=>{const Gi=W0.slice(0,2),zo=W0.slice(2);return zo.length===2?`${Gi}/${zo}/`:`${Gi}/${zo}`},So=W0=>{const Gi=W0.slice(0,2),zo=W0.slice(2,4),Ti=W0.slice(4,8);return`${Gi}/${zo}/${Ti}`};return J0.length<=4?O0(J0):So(J0)},kn=()=>{if(Pe||_i)return;if($t.match(/^(\d{4})-(\d{2})-(\d{2})$/))try{const J0=(0,B0._U)($t);tn(J0)}catch{tn(null)}else{const J0=$t.match(/^(\d{2})\/(\d{2})\/(\d{4})$/);if(J0){const[,O0,So,W0]=J0,Gi=parseInt(O0,10),zo=parseInt(So,10);if(Gi>=1&&Gi<=12&&zo>=1&&zo<=31)try{const Ti=(0,B0._U)(`${W0}-${O0}-${So}`);tn(Ti)}catch{tn(null)}else tn(null)}else tn(null)}vt(!0)},nr=()=>{if(jt){const Q0=`${jt.year}-${String(jt.month).padStart(2,"0")}-${String(jt.day).padStart(2,"0")}`;Xn(jn.linkId,{value:(0,a.CP)(`${String(jt.month).padStart(2,"0")}/${String(jt.day).padStart(2,"0")}/${jt.year}`)}),Xo(jn,[{valueDate:(0,a.Fy)(Q0)}])}vt(!1),tn(null)},Zr=()=>{vt(!1),tn(null)},f0=Q0=>{var J0;const O0=((J0=Ce.current)==null?void 0:J0.selectionStart)||0,So=$t,W0=cn(Q0),Gi=W0.match(/^(\d{2})\/(\d{2})\/(\d{4})$/);if(Gi){const[,zo,Ti,Ca]=Gi,ca=parseInt(zo,10),e1=parseInt(Ti,10),js=parseInt(Ca,10);if(bo(ca,e1,js).isValid){const $i=`${Ca}-${zo}-${Ti}`;Xn(jn.linkId,{value:(0,a.CP)(`${zo}/${Ti}/${Ca}`)}),Xo(jn,[{valueDate:(0,a.Fy)($i)}])}else Xo(jn,[{valueDate:W0}])}else Xo(jn,[{valueDate:W0}]);setTimeout(()=>{if(Ce.current){const zo=So.replace(/\D/g,""),Ti=W0.replace(/\D/g,"");let Ca=O0;W0===So&&(Ca=O0-1),Ti.length>=zo.length&&W0!==So?W0[O0-1]==="/"?Ca=O0+1:Ca=O0:Ti.length<zo.length&&(So[O0-1]==="/"?Ca=Math.max(0,O0-1):Ca=O0),Ce.current.setSelectionRange(Ca,Ca)}},0)},bo=(Q0,J0,O0)=>{if(Q0<1||Q0>12)return{isValid:!1,error:(0,a.u0)(Pn,ho.p.VALIDATION_MONTH_RANGE,"Month must be between 01 and 12")};if(J0<1||J0>31)return{isValid:!1,error:(0,a.u0)(Pn,ho.p.VALIDATION_DAY_RANGE,"Day must be between 01 and 31")};const So=new Date(O0,Q0,0).getDate();if(J0>So)return{isValid:!1,error:(0,a.u0)(Pn,ho.p.VALIDATION_INVALID_DAY_FOR_MONTH,"Invalid day for the selected month")};if(A0||d0){const W0=new eo.ng(O0,Q0,J0);if(A0&&/^\d{4}-\d{2}-\d{2}$/.test(A0))try{const Gi=(0,B0._U)(A0);if(W0.compare(Gi)<0){const zo=(0,a.di)(i.Ck,jn.extension);if(zo)return{isValid:!1,error:zo};const Ti=br(Gi);return{isValid:!1,error:(0,a.u0)(Pn,ho.p.VALIDATION_DATE_ON_OR_AFTER,"Date must be on or after {{minDate}}",{minDate:Ti})}}}catch{}if(d0&&/^\d{4}-\d{2}-\d{2}$/.test(d0))try{const Gi=(0,B0._U)(d0);if(W0.compare(Gi)>0){const zo=(0,a.di)(i.Cx,jn.extension);if(zo)return{isValid:!1,error:zo};const Ti=br(Gi);return{isValid:!1,error:(0,a.u0)(Pn,ho.p.VALIDATION_DATE_ON_OR_BEFORE,"Date must be on or before {{maxDate}}",{maxDate:Ti})}}}catch{}}return{isValid:!0,error:""}},D0=()=>{const Q0=$t.replace(/\D/g,"");if(Q0.length>0&&Q0.length<8){Wr(jn.linkId);return}const J0=$t.match(/^(\d{2})\/(\d{2})\/(\d{4})$/);if(!J0&&Q0.length>=6){Wr(jn.linkId);return}if(J0){const[,O0,So,W0]=J0,Gi=parseInt(O0,10),zo=parseInt(So,10),Ti=parseInt(W0,10);if(bo(Gi,zo,Ti).isValid){const Ca=`${W0}-${O0}-${So}`;Xo(jn,[{valueDate:(0,a.Fy)(Ca)}])}}Wr(jn.linkId)},yo=(()=>{if(!$t)return"";const Q0=$t.replace(/\D/g,"");if(Q0.length>0&&Q0.length<8)return"";const J0=$t.match(/^(\d{2})\/(\d{2})\/(\d{4})$/);if(!J0&&Q0.length>=6)return bn&&sr(!1),(0,a.u0)(Pn,ho.p.VALIDATION_INVALID_DATE,"Invalid date");if(J0){const[,O0,So,W0]=J0,Gi=parseInt(O0,10),zo=parseInt(So,10),Ti=parseInt(W0,10),{isValid:Ca,error:ca}=bo(Gi,zo,Ti);if(!Ca)return bn&&sr(!1),ca||(0,a.u0)(Pn,ho.p.VALIDATION_INVALID_DATE,"Invalid date")}return""})(),Do=!!fr||!!yo;return(0,n.jsxs)("div",{children:[un&&(0,n.jsx)(w,{isLabel:!0,className:"mb-sm text-md",text:un,required:tr||!1}),(0,n.jsxs)("div",{className:"relative flex flex-row items-center",children:[(0,n.jsx)("button",{type:"button",disabled:Pe||_i,className:(0,D.cx)("absolute top-2.5 right-3 z-3 cursor-pointer p-0.5","outline-focus-ring rounded-sm focus-visible:outline-2 focus-visible:outline-offset-2",(Pe||_i)&&"cursor-not-allowed opacity-50"),onClick:kn,"aria-label":"Open calendar",children:(0,n.jsx)(K.V,{className:"size-5 text-gray-400"})}),(0,n.jsx)("div",{className:(0,D.cx)("pointer-events-none absolute top-[7px] right-[2px] z-2 h-[30px] w-[35px] bg-white",(Pe||_i)&&"bg-disabled_subtle")}),(0,n.jsx)(s.Input,{ref:Ce,isRequired:tr,size:"md",type:"text",name:Aa,"data-testid":Aa,id:Aa,value:$t,onChange:f0,placeholder:Ii,isDisabled:Pe||_i,onBlur:D0,hint:yo||fr||zi,isInvalid:Do,className:(0,D.cx)("[&_input::-webkit-inner-spin-button]:hidden","[&_input::-webkit-clear-button]:hidden","[&_input::-webkit-calendar-picker-indicator]:hidden")},Aa)]}),(0,n.jsx)(s.Modal,{id:"calendar-date-picker-modal",isOpen:$e,onOpenChange:Q0=>{Q0||Zr()},primaryButton:{children:"Apply",onClick:nr,isDisabled:!jt},secondaryButton:{children:"Cancel",onClick:Zr},children:(0,n.jsx)(j0.lr,{value:jt,onChange:tn,minValue:Y0,maxValue:jo,children:(0,n.jsx)(s.Calendar,{showDateInput:!1,minValue:Y0,maxValue:jo,onYearPickerOpen:()=>{tn(null)}})})})]})},Or=({item:jn,onCompleteHandler:Wr,selectedAnswer:Ur,handleInputChange:Xo,showQuestionPrefix:ko,errors:si,isLoading:_i})=>{var Ii;const{linkId:zi,text:Vi,required:di,prefix:ta,readOnly:Aa}=jn,Dr=Vi?(0,a.nt)(ko,ta,Vi):"",tr=si?.[zi]||"";return(0,n.jsxs)("div",{children:[Dr&&(0,n.jsx)(w,{isLabel:!0,className:"mb-sm text-md",text:Dr,required:di||!1}),(0,n.jsx)(s.Input,{isRequired:di,size:"md",type:"datetime-local",id:zi,"aria-label":zi,"data-testid":zi,placeholder:"Type your response here...",value:((Ii=Ur?.[0])==null?void 0:Ii.valueDateTime)||"",onChange:dr=>{let Pe=dr;const[Ce,$e]=Pe.split("T");Ce&&$e&&(Pe=`${(0,a.Fy)(Ce)}T${$e}:00`),Xo(jn,[{valueDateTime:Pe}])},isDisabled:Aa||_i,onBlur:()=>{Wr(jn.linkId)},hint:tr,isInvalid:!!tr},zi)]})},T0=({item:jn,onCompleteHandler:Wr,selectedAnswer:Ur,handleInputChange:Xo,showQuestionPrefix:ko,errors:si,isLoading:_i,placeholder:Ii,hintText:zi})=>{var Vi;const{linkId:di,text:ta,required:Aa,prefix:Dr,readOnly:tr}=jn,dr=ta?(0,a.nt)(ko,Dr,ta):"",Pe=si?.[di]||"",Ce=(0,a.a0)(jn),$e=(Vi=Ur?.[0])==null?void 0:Vi.valueDecimal,[vt,jt]=(0,t.useState)(String($e??""));return(0,t.useEffect)(()=>{jt(String($e??""))},[$e]),(0,n.jsxs)("div",{children:[dr&&(0,n.jsx)(w,{isLabel:!0,text:dr,required:Aa||!1}),(0,n.jsx)(s.Input,{isRequired:Aa,size:"md",id:di,"aria-label":di,"data-testid":di,placeholder:Ii,value:vt,onChange:tn=>{jt(tn)},isDisabled:tr||_i,onBlur:()=>{const tn=parseFloat(vt);jt(isNaN(tn)?"":String(tn)),Xo(jn,[{valueDecimal:isNaN(tn)?void 0:tn}]),Wr(jn.linkId)},type:"number",hint:Pe||zi,isInvalid:!!Pe,autoComplete:Ce},di)]})},m0=({item:jn,showStepper:Wr=!1})=>{var Ur;const{text:Xo,linkId:ko,type:si}=jn,_i=Xo&&(0,a.nt)(!1,"",Xo),Ii=(Ur=jn.extension)==null?void 0:Ur.find(ta=>ta.url===i.Yt),zi=Ii?.valueBoolean===!0,Vi=si==="group"&&(0,a.$O)(jn)!==void 0,di=()=>{const ta=(0,a.$O)(jn),Aa=(0,a.t7)(jn);if(ta===void 0||Aa===void 0||Aa<=0)return[];const Dr=[];for(let tr=1;tr<=Aa;tr++){let dr="incomplete";tr<ta?dr="complete":tr===ta&&(dr="current"),Dr.push({title:"",description:"",status:dr})}return Dr};return _i&&!zi?(0,n.jsxs)("div",{"data-testid":ko,children:[(0,n.jsx)(w,{text:_i,required:!1,className:""}),Wr&&Vi&&(0,n.jsx)("div",{className:"mt-xl",children:(0,n.jsx)(s.Progress.MinimalIconsConnected,{orientation:"horizontal",size:"sm",items:di()})})]}):null},no=({item:jn,onCompleteHandler:Wr,selectedAnswer:Ur,handleInputChange:Xo,showQuestionPrefix:ko,errors:si,isLoading:_i,placeholder:Ii,hintText:zi})=>{var Vi;const{linkId:di,text:ta,required:Aa,prefix:Dr,readOnly:tr}=jn,dr=ta?(0,a.nt)(ko,Dr,ta):"",Pe=si?.[di]||"",Ce=(0,a.a0)(jn);return(0,n.jsxs)("div",{children:[dr&&(0,n.jsx)(w,{isLabel:!0,className:"mb-sm text-md",text:dr,required:Aa||!1}),(0,n.jsx)(s.Input,{isRequired:Aa,"data-testid":di,size:"md",id:di,"aria-label":di,placeholder:Ii,value:String((Vi=Ur?.[0])==null?void 0:Vi.valueInteger)||"",onChange:$e=>{Xo(jn,[{valueInteger:Number($e)}])},isDisabled:tr||_i,onBlur:()=>{Wr(jn.linkId)},type:"number",hint:Pe||zi,isInvalid:!!Pe,autoComplete:Ce},di)]})},_o=({item:jn,onCompleteHandler:Wr,selectedAnswer:Ur,handleInputChange:Xo,showQuestionPrefix:ko,errors:si,isLoading:_i,placeholder:Ii,hintText:zi})=>{var Vi,di,ta;const{linkId:Aa,text:Dr,extension:tr,required:dr,prefix:Pe,readOnly:Ce}=jn,$e=Dr?(0,a.nt)(ko,Pe,Dr):"",vt=tr?.find(Pn=>Pn.url.includes("questionnaire-unitOption")),jt=si?.[Aa],tn=(0,a.a0)(jn);return(0,n.jsxs)("div",{children:[$e&&(0,n.jsx)(w,{isLabel:!0,text:$e,required:dr||!1}),(0,n.jsx)(s.InputGroup,{isRequired:dr,size:"md",id:Aa,"aria-label":Aa,"data-testid":Aa,value:(Vi=Ur?.[0])!=null&&Vi.valueQuantity?String((di=Ur[0].valueQuantity)==null?void 0:di.value):"",onChange:Pn=>{Xo(jn,[{valueQuantity:{value:parseFloat(Pn)}}])},isDisabled:Ce||_i,onBlur:()=>{var Pn,sr,bn;const Xn=(Pn=Ur?.[0])!=null&&Pn.valueQuantity?parseFloat(String((bn=(sr=Ur?.[0])==null?void 0:sr.valueQuantity)==null?void 0:bn.value)).toFixed(2):"";Xo(jn,[{valueQuantity:{value:parseFloat(Xn)}}]),Wr(jn.linkId)},hint:jt||zi,isInvalid:!!jt,trailingAddon:(0,n.jsx)("p",{className:"bg-primary ring-primary flex size-full w-max items-center rounded-lg rounded-l-none p-1 text-center ring-1 ring-inset",children:(ta=vt?.valueCoding)==null?void 0:ta.display}),children:(0,n.jsx)(s.InputBase,{type:"number",placeholder:Ii,autoComplete:tn})},Aa)]})},Uo={CURRENT_LOCATION:"current-location",ADDRESS:"address",ZIP_CODE:"zip-code"},li={[Uo.CURRENT_LOCATION]:ho.p.CURRENT_LOCATION,[Uo.ZIP_CODE]:ho.p.ZIP_CODE,[Uo.ADDRESS]:ho.p.ADDRESS},Li={mi:{singular:ho.p.MILE,plural:ho.p.MILES}},Ri=({resourceData:jn,handleInputChange:Wr,item:Ur,questionnaireSchemaItems:Xo})=>{var ko;const{t:si}=(0,r.SS)(),{queryParams:_i}=(0,Dt.useSearchQueryParams)(),Ii=_i.locationType||"",{setCurrentGroupIndex:zi,handleContinueButtonClick:Vi,setHideFooterButton:di}=(0,h.c)(),{trackEvent:ta}=(0,o.st)();(0,t.useEffect)(()=>{if(!Ur.readOnly)return di(!0),()=>{di(!1)}},[Ur.readOnly,di]);const Aa=(ko=Ur.extension)==null?void 0:ko.find(sr=>sr.url===i.Uf),Dr=Aa?.valueString,tr=()=>{if(Dr){const sr=(0,a.Ue)(Xo||[],Dr);sr!==-1&&zi(sr)}},dr=sr=>{const bn=sr.find(Xn=>Xn.url.includes("description"));return bn?.valueString||""},Pe=sr=>{const bn=sr.find(A0=>A0.url.includes("distance-value")),Xn=sr.find(A0=>A0.url.includes("distance-unit")),un=bn?.valueString?Number(bn.valueString):NaN,fr=Xn?.valueString||"";if(!fr||isNaN(un))return null;const pr=Math.round(un);let xr=fr;return Li[fr]&&(xr=si(pr===1?Li[fr].singular:Li[fr].plural)),Ii&&li[Ii]?si(ho.p.LOCATION_DISTANCE,{distance:`${pr} ${xr}`,locationType:si(li[Ii])}):si(ho.p.LOCATION_DISTANCE_AWAY,{distance:`${pr} ${xr}`})},Ce=sr=>({id:sr.id||"",providerName:sr.name||"",specialty:"",distance:Pe(sr.extension||[])||"",placeholderIcon:s.WalgreensLogo,address:sr.address||"",valueReference:sr.valueReference||{reference:sr.id}}),$e=sr=>{var bn,Xn,un,fr;const pr=sr;return Ce({id:pr.id,name:(bn=pr.name)!=null?bn:"",address:(fr=(un=(Xn=pr?.address)==null?void 0:Xn.line)==null?void 0:un[0])!=null?fr:"",extension:pr?.extension,valueReference:{reference:pr.id}})},vt=sr=>Ce({id:sr?.reference,name:sr?.display,address:dr(sr?.extension||[]),extension:sr?.extension,valueReference:sr}),tn=(()=>jn&&Array.isArray(jn)&&jn.length>0?jn.map($e):Ur.initial&&Array.isArray(Ur.initial)&&Ur.initial.length>0?Ur.initial.map(sr=>vt(sr.valueReference)):Ur.answerOption?Ur.answerOption.map(sr=>vt(sr.valueReference)):[])(),Pn=sr=>{Wr(Ur,[{valueReference:sr}])};return(0,n.jsx)("div",{className:(0,s.cx)("gap-md flex flex-col",!Ur.readOnly&&"pb-4xl"),children:Ur.readOnly?tn.map(({address:sr,id:bn,providerName:Xn,placeholderIcon:un,distance:fr})=>(0,n.jsx)(Dt.SchedulingLocationCard,{className:"shadow-sm",avatar:{placeholderIcon:un},locationName:Xn,address:sr,distance:fr,actionButtonText:Dr?"Change location":void 0,onActionButtonClick:Dr?tr:void 0},bn)):tn.map(({address:sr,id:bn,providerName:Xn,placeholderIcon:un,specialty:fr,valueReference:pr,distance:xr})=>(0,n.jsx)(s.LocationCard,{className:"shadow-sm",avatar:{placeholderIcon:un},providerName:{content:Xn},specialty:{content:fr},location:{address:sr,distance:xr},actionButton:{children:"Schedule appointment",onClick:()=>{ta("schedule_appointment_clicked",{page_on:"Choose your pharmacy",location:sr,_event_metadata:{description:"A user clicked the Schedule appointment cta"}}),Pn(pr),Vi?.()}}},bn))})};var fi=e(79079),Di=e(32066),hi=e(43915),qi=e(36181),ki=e(37234),Ga=e(65388),wr=Object.defineProperty,er=Object.defineProperties,Jr=Object.getOwnPropertyDescriptors,Nr=Object.getOwnPropertySymbols,H0=Object.prototype.hasOwnProperty,Mn=Object.prototype.propertyIsEnumerable,Wn=(jn,Wr,Ur)=>Wr in jn?wr(jn,Wr,{enumerable:!0,configurable:!0,writable:!0,value:Ur}):jn[Wr]=Ur,Tr=(jn,Wr)=>{for(var Ur in Wr||(Wr={}))H0.call(Wr,Ur)&&Wn(jn,Ur,Wr[Ur]);if(Nr)for(var Ur of Nr(Wr))Mn.call(Wr,Ur)&&Wn(jn,Ur,Wr[Ur]);return jn},u0=(jn,Wr)=>er(jn,Jr(Wr));const Zn={"ui-toolkit/LocationCard":Ri,"ui-toolkit/TimeSlotSelection":({resourceData:jn,item:Wr,handleInputChange:Ur,selectedAnswer:Xo,questionnaireSchemaItems:ko,formData:si,onCompleteHandler:_i})=>{var Ii,zi;const{t:Vi}=(0,fi.S)(),{trackEvent:di}=(0,o.st)(),{isLoading:ta,setIsInlineNextQuestionTriggered:Aa}=(0,h.c)(),Dr=O0=>{const So=O0.match(/^(\d{4}-\d{2}-\d{2})/);return So?So[1]:O0},tr=(0,t.useCallback)(O0=>{var So;return(So=O0.find(W0=>W0?.url===i.zD||W0?.url===i.UZ))==null?void 0:So.valueCode},[]),dr=(0,t.useCallback)((O0,So)=>{const W0=tr(So);if(!W0)return re(O0);try{return(0,be.formatToTimeZone)(O0,"h:mm A",{timeZone:W0})}catch{return re(O0)}},[tr]),Pe=(0,t.useCallback)((O0,So)=>{const W0=tr(So);if(!W0)return Dr(O0);try{return(0,be.formatToTimeZone)(O0,"YYYY-MM-DD",{timeZone:W0})}catch{return Dr(O0)}},[tr]),Ce=O0=>{const So=O0.match(/^(\d{4})-(\d{2})-(\d{2})/);if(So){const[,W0,Gi,zo]=So;return new Date(parseInt(W0),parseInt(Gi)-1,parseInt(zo))}return new Date},vt=(()=>{var O0;if((O0=Xo?.[0])!=null&&O0.valueReference){const So=Xo[0].valueReference,W0=So.display||"",Gi=Pe(W0,So.extension||[]);if(Gi)return{date:Ce(Gi),slotId:So.reference||""}}return{date:new Date,slotId:""}})(),[jt,tn]=(0,t.useState)(vt.date),[Pn,sr]=(0,t.useState)(vt.slotId),[bn,Xn]=(0,t.useState)(new Set),un=(0,t.useMemo)(()=>new eo.ng(jt.getFullYear(),jt.getMonth()+1,jt.getDate()),[jt]),fr=O0=>({display:O0.display||"",id:O0.id||"",start:O0.start||"",extension:Array.isArray(O0.extension)?O0.extension:[],identifier:Array.isArray(O0.identifier)?O0.identifier:[],type:O0.type||""}),pr=O0=>{var So;return fr({display:(So=O0.start)!=null?So:"",id:O0.id,start:O0.start,extension:O0.extension,identifier:O0.identifier})},xr=O0=>fr({display:O0?.display||"",id:O0?.reference,start:O0?.display,extension:O0?.extension,identifier:O0?.identifier,type:O0?.type}),A0=()=>{if(Array.isArray(jn)&&jn.length>0)return jn.filter(O0=>O0.resourceType==="Appointment").map(pr);if(Wr.initial&&Array.isArray(Wr.initial)&&Wr.initial.length>0)return Wr.initial.map(O0=>xr(O0.valueReference));if(Wr.answerOption)return Wr.answerOption.map(O0=>xr(O0.valueReference))},d0=(0,t.useMemo)(()=>A0()||[],[jn,Xo,Wr]),Y0=(0,t.useMemo)(()=>{const O0={};return d0.forEach(So=>{if(So.start&&So.id){const W0=Pe(So.start,So.extension);O0[W0]||(O0[W0]=[]),O0[W0].push({display:So.display,id:So.id,start:So.start,extension:So.extension})}}),O0},[d0,Pe]),jo=(0,t.useMemo)(()=>{const O0=Object.keys(Y0).sort(),So=[];if(O0.length===0)return So.push(un),bn.forEach(zo=>{const Ti=(0,hi.A)(zo);So.push(new eo.ng(Ti.getFullYear(),Ti.getMonth()+1,Ti.getDate()))}),So;const W0=(0,hi.A)(O0[O0.length-1]),Gi=new eo.ng(W0.getFullYear(),W0.getMonth()+1,W0.getDate());for(let zo=un;zo.compare(Gi)<=0;zo=zo.add({days:1})){const Ti=`${zo.year}-${String(zo.month).padStart(2,"0")}-${String(zo.day).padStart(2,"0")}`;Y0[Ti]||So.push(zo)}if(!(0,a.mR)(Wr)){const zo=(0,Di.Ec)((0,Di.Xj)()).add({days:30});let Ti=Gi.add({days:1});for(;Ti.compare(zo)<=0;)So.push(Ti),Ti=Ti.add({days:1})}return bn.forEach(zo=>{const Ti=(0,hi.A)(zo),Ca=new eo.ng(Ti.getFullYear(),Ti.getMonth()+1,Ti.getDate());So.some(ca=>ca.year===Ca.year&&ca.month===Ca.month&&ca.day===Ca.day)||So.push(Ca)}),So},[Y0,bn,un,Wr]),ft=(0,t.useMemo)(()=>(0,a.mR)(Wr)?s.MAX_AVAILABLE_TIME_SLOT_DAYS:30,[Wr]),$t=(0,t.useMemo)(()=>Object.keys(Y0).map(O0=>{const So=(0,hi.A)(O0);return new eo.ng(So.getFullYear(),So.getMonth()+1,So.getDate())}),[Y0]),cn=(0,qi.A)((0,ki.A)(jt),"yyyy-MM-dd"),kn=(0,t.useMemo)(()=>Y0[cn]||[],[Y0,cn]);(0,t.useEffect)(()=>{const O0=Object.entries(Y0).sort(([So],[W0])=>So.localeCompare(W0)).slice(0,3).reduce((So,[W0,Gi])=>u0(Tr({},So),{[`${W0} ${bo}`]:Gi.map(zo=>{var Ti;return(0,Ga.YX)({time:zo.start,timeZone:(0,a.lv)((Ti=kn[0])==null?void 0:Ti.extension)}).time})}),{});di("slots_returned",{Specialty:"Vaccines",first_three_days_slots:O0,_event_metadata:{description:"The API called for bookable slots based on the user's answers on who, when, where and why they want to book an appointment."}})},[]);const nr=t.useRef(null),Zr=t.useRef(null),f0=t.useRef(!1);(0,t.useEffect)(()=>{var O0;const So=Object.keys(Y0).sort();So.length===0||f0.current||(f0.current=!0,(O0=Xo?.[0])!=null&&O0.valueReference||tn((0,hi.A)(So[0])))},[Y0]),(0,t.useEffect)(()=>{var O0;const So=Object.keys(Y0).sort();if(So.length===0)return;const Gi=!(nr.current===null)&&JSON.stringify(nr.current)!==JSON.stringify(Y0);if(nr.current=Y0,!!Gi&&(Xn(new Set),Zr.current)){const zo=Zr.current;if(!(((O0=Y0[zo])==null?void 0:O0.length)>0)){const Ca=new Set,ca=(0,hi.A)(zo),e1=(0,hi.A)(So[0]);let js=ca;for(;js<e1;){const $i=(0,qi.A)(js,"yyyy-MM-dd");Ca.add($i),js=new Date(js),js.setDate(js.getDate()+1)}Xn(Ca),sr("")}Zr.current=null}},[Y0]);const bo=(0,t.useMemo)(()=>{const O0=kn[0];if(!O0?.extension)return"";const So=tr(O0.extension);try{return(0,be.formatToTimeZone)(new Date,"(z)",{timeZone:So??""})}catch{return""}},[kn,tr]),D0=(0,t.useMemo)(()=>{const O0=Vi(s.Translations.NEXT_AVAILABLE_APPOINTMENTS);return bo?`${O0} ${bo}`:O0},[Vi,bo]),R0=(0,t.useMemo)(()=>{const O0=(0,Di.Ec)((0,Di.Xj)()).add({days:ft}),So=`${O0.year}-${String(O0.month).padStart(2,"0")}-${String(O0.day).padStart(2,"0")}`,Gi=Object.keys(Y0).sort().find(zo=>zo>cn&&zo<=So);if(Gi){const zo=(0,hi.A)(Gi);return new eo.ng(zo.getFullYear(),zo.getMonth()+1,zo.getDate())}return null},[Y0,cn,ft]),yo=()=>{if(R0){const O0=R0.toDate((0,Di.Xj)());tn(O0),sr("")}},Do=O0=>{if(!O0){sr(""),Ur(Wr,void 0);return}sr(O0.id);const So=[{valueReference:{display:O0.display,reference:O0.id,extension:O0.extension,identifier:O0.identifier,type:O0.type}}];Ur(Wr,So)},Q0=O0=>{var So;if(!O0||ta||!f0.current)return;const W0=Object.keys(Y0).sort(),Gi=W0[W0.length-1],zo=W0[0],Ti=`${O0.year}-${String(O0.month).padStart(2,"0")}-${String(O0.day).padStart(2,"0")}`;if(Gi&&(Ti>Gi||zo&&Ti<zo)&&(0,a.mR)(Wr)&&ko&&!jo?.some(ca=>ca.compare(O0)===0)){const ca=(0,a.yQ)(Wr,ko);if(ca){Zr.current=Ti;let e1="-06:00";if((So=d0[0])!=null&&So.start){const t1=d0[0].start.match(/([+-]\d{2}:\d{2})$/);t1&&(e1=t1[1])}const $i=[{valueDateTime:`${Ti}T23:59:59${e1}`}],C1=Ur(ca,$i);Ur(Wr,void 0,(0,a.Nw)(C1||si||[],Wr.linkId),void 0,!0),Aa(!0),_i(ca.linkId,!0,!0)}}const Ca=O0.toDate((0,Di.Xj)());tn(Ca)},J0=O0=>{if(!O0)return;const So=kn.find(W0=>W0.id===O0);di("slot_selected",{Specialty:"Vaccines",time_slot:So?(0,Ga.YX)({time:So.start,timeZone:(0,a.lv)(kn[0].extension)}).dateWithTime:"",_event_metadata:{description:"A user clicked an option to select a slot or search a different date set if no slots were found."}}),Do(So??null)};return(0,n.jsx)(s.TimeSlot,{onChange:Q0,disabledDates:jo,highlightedDates:$t,loading:ta,minValue:(0,Di.Ec)((0,Di.Xj)()),maxValue:(0,Di.Ec)((0,Di.Xj)()).add({days:ft}),value:un,defaultValue:un,appointmentSlots:{title:D0,onChange:J0,defaultValue:Xo&&((zi=(Ii=Xo[0])==null?void 0:Ii.valueReference)==null?void 0:zi.reference)||void 0,value:Pn||void 0,items:kn.map(O0=>({label:dr(O0.start,O0.extension),value:O0.id}))||[]},nextAppointment:{children:(0,n.jsxs)("p",{className:"text-secondary text-center text-sm font-normal",children:[Vi(s.Translations.NO_NEXT_AVAILABLE_APPOINTMENTS),R0&&(0,n.jsx)("button",{onClick:yo,className:"ml-2 cursor-pointer font-normal text-blue-700 underline",children:Vi(s.Translations.GO_TO_NEXT_AVAILABLE_TIMESLOT)})]})}})}};var _r=Object.defineProperty,ao=Object.defineProperties,qo=Object.getOwnPropertyDescriptors,Qi=Object.getOwnPropertySymbols,ji=Object.prototype.hasOwnProperty,ua=Object.prototype.propertyIsEnumerable,Po=(jn,Wr,Ur)=>Wr in jn?_r(jn,Wr,{enumerable:!0,configurable:!0,writable:!0,value:Ur}):jn[Wr]=Ur,z0=(jn,Wr)=>{for(var Ur in Wr||(Wr={}))ji.call(Wr,Ur)&&Po(jn,Ur,Wr[Ur]);if(Qi)for(var Ur of Qi(Wr))ua.call(Wr,Ur)&&Po(jn,Ur,Wr[Ur]);return jn},Xa=(jn,Wr)=>ao(jn,qo(Wr)),Cs=(jn,Wr)=>{var Ur={};for(var Xo in jn)ji.call(jn,Xo)&&Wr.indexOf(Xo)<0&&(Ur[Xo]=jn[Xo]);if(jn!=null&&Qi)for(var Xo of Qi(jn))Wr.indexOf(Xo)<0&&ua.call(jn,Xo)&&(Ur[Xo]=jn[Xo]);return Ur};const Rs=(jn,Wr)=>jn.answerOption?jn.answerOption.map(Ur=>{var Xo,ko;const si=(ko=(Xo=Ur.valueReference)==null?void 0:Xo.reference)==null?void 0:ko.replace("#","");return Wr.find(_i=>_i.id===si)}).filter(Boolean):[],zs=jn=>{var Wr,Ur,Xo;const ko=jn.find(si=>{var _i,Ii;return si.url.includes("questionnaire-itemControl")&&((Ii=(_i=si.valueCodeableConcept)==null?void 0:_i.coding)==null?void 0:Ii.some(zi=>{var Vi;return(Vi=zi.code)==null?void 0:Vi.startsWith("ui-toolkit/")}))});return(Xo=(Ur=(Wr=ko?.valueCodeableConcept)==null?void 0:Wr.coding)==null?void 0:Ur.find(si=>{var _i;return(_i=si.code)==null?void 0:_i.startsWith("ui-toolkit/")}))==null?void 0:Xo.code},ss=jn=>{var{uiToolkitCode:Wr,props:Ur}=jn,Xo=Ur,{item:ko,contained:si=[],customErrorConfigurations:_i}=Xo,Ii=Cs(Xo,["item","contained","customErrorConfigurations"]);const{setHideFooterButton:zi}=(0,h.c)(),Vi=Zn[Wr];if(!Vi)return(0,n.jsx)(n.Fragment,{});const di=Rs(ko,si),ta=di.length>0;return!(ko.answerOption&&ko.answerOption.length>0)&&!ta&&!ko.readOnly?(zi(!0),(0,n.jsx)(it,{configKey:Wr,customErrorConfigurations:_i})):(0,n.jsx)(Vi,Xa(z0({},Ii),{item:ko,contained:si,customErrorConfigurations:_i,resourceData:di,"data-testid":ko.linkId}))},ar={attachment:$n,choice:Lo,boolean:Vr,integer:no,string:({item:jn,onCompleteHandler:Wr,selectedAnswer:Ur,handleInputChange:Xo,showQuestionPrefix:ko,errors:si,isLoading:_i,placeholder:Ii,hintText:zi})=>{var Vi;const{linkId:di,text:ta,required:Aa,prefix:Dr,readOnly:tr}=jn,dr=ta?(0,a.nt)(ko,Dr,ta):"",Pe=si?.[di]||"",Ce=(0,a.a0)(jn);return(0,n.jsxs)("div",{children:[dr&&(0,n.jsx)(w,{isLabel:!0,className:"mb-sm text-md",text:dr,required:Aa||!1}),(0,n.jsx)(s.Input,{isRequired:Aa,size:"md","aria-label":di,"data-testid":di,id:di,type:Ce==="tel"?"tel":"text",placeholder:Ii,value:((Vi=Ur?.[0])==null?void 0:Vi.valueString)||"",onChange:$e=>{Xo(jn,[{valueString:$e}])},isDisabled:tr||_i,onBlur:$e=>{const vt=$e.target.value,jt=vt.trim();jt!==vt&&Xo(jn,[{valueString:jt}]),Wr(jn.linkId)},hint:Pe||zi,isInvalid:!!Pe,autoComplete:Ce},di)]})},url:({item:jn,onCompleteHandler:Wr,selectedAnswer:Ur,handleInputChange:Xo,showQuestionPrefix:ko,errors:si,isLoading:_i,placeholder:Ii,hintText:zi})=>{var Vi;const{linkId:di,text:ta,required:Aa,prefix:Dr,readOnly:tr}=jn,dr=ta?(0,a.nt)(ko,Dr,ta):"",Pe=si?.[di]||"",Ce=(0,a.a0)(jn);return(0,n.jsxs)("div",{children:[dr&&(0,n.jsx)(w,{isLabel:!0,className:"mb-sm text-md",text:dr,required:Aa||!1}),(0,n.jsx)(s.Input,{isRequired:Aa,size:"md",type:"url",id:di,"data-testid":di,"aria-label":di,placeholder:Ii,value:((Vi=Ur?.[0])==null?void 0:Vi.valueUri)||"",onChange:$e=>{Xo(jn,[{valueUri:$e}])},isDisabled:tr||_i,onBlur:$e=>{const vt=$e.target.value,jt=vt.trim();jt!==vt&&Xo(jn,[{valueUri:jt}]),Wr(jn.linkId)},hint:Pe||zi,isInvalid:!!Pe,autoComplete:Ce},di)]})},text:({item:jn,onCompleteHandler:Wr,selectedAnswer:Ur,handleInputChange:Xo,showQuestionPrefix:ko,errors:si,isLoading:_i,placeholder:Ii,hintText:zi})=>{var Vi;const{linkId:di,text:ta,required:Aa,prefix:Dr,readOnly:tr,maxLength:dr}=jn,Pe=ta?(0,a.nt)(ko,Dr,ta):"",Ce=si?.[di]||"",$e=(0,a.a0)(jn);return(0,n.jsxs)("div",{children:[Pe&&(0,n.jsx)(w,{isLabel:!0,className:"mb-sm text-md",text:Pe,required:Aa||!1}),(0,n.jsx)(s.TextArea,{isRequired:Aa,id:di,"aria-label":di,"data-testid":di,rows:3,placeholder:Ii,value:((Vi=Ur?.[0])==null?void 0:Vi.valueString)||"",onChange:vt=>{Xo(jn,[{valueString:vt}])},isDisabled:tr||_i,onBlur:vt=>{const jt=vt.target.value,tn=jt.trim();tn!==jt&&Xo(jn,[{valueString:tn}]),Wr(jn.linkId)},hint:Ce||zi,counter:!0,isInvalid:!!Ce,maxLength:dr,autoComplete:$e},di)]})},date:Mr,time:({item:jn,onCompleteHandler:Wr,selectedAnswer:Ur,handleInputChange:Xo,showQuestionPrefix:ko,errors:si,isLoading:_i})=>{var Ii;const{linkId:zi,text:Vi,required:di,prefix:ta,readOnly:Aa}=jn,Dr=Vi?(0,a.nt)(ko,ta,Vi):"",tr=si?.[zi]||"";return(0,n.jsxs)("div",{children:[Dr&&(0,n.jsx)(w,{isLabel:!0,text:Dr,required:di||!1}),(0,n.jsx)(s.Input,{isRequired:di,size:"md",type:"time",id:zi,"data-testid":zi,"aria-label":zi,placeholder:"Type your response here...",value:((Ii=Ur?.[0])==null?void 0:Ii.valueTime)||"",onChange:dr=>{Xo(jn,[{valueTime:dr}])},isDisabled:Aa||_i,onBlur:()=>{Wr(jn.linkId)},hint:tr,isInvalid:!!tr},zi)]})},dateTime:Or,quantity:_o,decimal:T0,question:m0,display:m0,group:m0,reference:jn=>{var Wr,Ur,Xo,ko,si;const{setHideFooterButton:_i}=(0,h.c)(),{item:Ii,customErrorConfigurations:zi}=jn,Vi=Ii.extension||[],di=zs(Vi);return di?(0,n.jsx)(ss,{uiToolkitCode:di,props:jn}):((si=(ko=(Xo=(Ur=(Wr=Ii?.extension)==null?void 0:Wr.find(Aa=>Aa.url.includes("questionnaire-itemControl")))==null?void 0:Ur.valueCodeableConcept)==null?void 0:Xo.coding)==null?void 0:ko[0])==null?void 0:si.code)==="check-box"?Ii.answerOption&&Ii.answerOption.length>0?(0,n.jsx)(Lo,Xa(z0({},jn),{item:Ii})):(_i(!0),(0,n.jsx)(it,{configKey:Ii.linkId,customErrorConfigurations:zi})):null}};var M0=(jn,Wr,Ur)=>new Promise((Xo,ko)=>{var si=zi=>{try{Ii(Ur.next(zi))}catch(Vi){ko(Vi)}},_i=zi=>{try{Ii(Ur.throw(zi))}catch(Vi){ko(Vi)}},Ii=zi=>zi.done?Xo(zi.value):Promise.resolve(zi.value).then(si,_i);Ii((Ur=Ur.apply(jn,Wr)).next())});const _0=({item:jn,selectedAnswer:Wr,showQuestionPrefix:Ur})=>{const{text:Xo,prefix:ko,required:si}=jn,_i=Xo?getUpdatedQuestionText(Ur,ko,Xo):"",[Ii,zi]=useState(null),[Vi,di]=useState(!1),{documentDownload:ta,webview:Aa}=useNativeBridge(),Dr=(Wr||[]).filter(Ce=>{var $e,vt;return(($e=Ce.valueAttachment)==null?void 0:$e.data)&&((vt=Ce.valueAttachment)==null?void 0:vt.title)}).map((Ce,$e)=>{var vt,jt,tn,Pn,sr,bn,Xn;return{id:((vt=Ce.valueAttachment)==null?void 0:vt.id)||`preview-${$e}`,fileName:((jt=Ce.valueAttachment)==null?void 0:jt.title)||`attachment-${$e}`,contentType:((tn=Ce.valueAttachment)==null?void 0:tn.contentType)||"application/octet-stream",base64Data:((Pn=Ce.valueAttachment)==null?void 0:Pn.data)||"",size:getBase64Size(((sr=Ce.valueAttachment)==null?void 0:sr.data)||"",(bn=Ce.valueAttachment)==null?void 0:bn.contentType),type:getFileTypeFromMimeType((Xn=Ce.valueAttachment)==null?void 0:Xn.contentType)}}),tr=useCallback(Ce=>{const{fileName:$e,contentType:vt,base64Data:jt}=Ce;if(Aa.isWithin)zi({fileName:$e,contentType:vt,base64Data:jt}),di(!0);else{const tn=base64toObjectUrl(jt,vt),Pn=document.createElement("a");Pn.href=tn,Pn.download=$e,document.body.appendChild(Pn),Pn.click(),document.body.removeChild(Pn),URL.revokeObjectURL(tn)}},[Aa.isWithin]),dr=useCallback(()=>M0(void 0,null,function*(){!Ii||(yield ta.writeFile(Ii.fileName,prepareDataUrl(Ii.base64Data,Ii.contentType)))}),[Ii,ta]),Pe=useCallback(()=>{di(!1),zi(null)},[]);return Dr.length?jsxs("div",{children:[_i&&jsx(FHIRQuestionnaireQuestionText,{isLabel:!0,className:"mb-sm text-md",text:_i,required:si||!1}),jsx(FileUploadList,{role:"group",className:"flex-row flex-wrap",children:Dr.map(Ce=>jsx("button",{type:"button",onClick:()=>tr(Ce),className:"max-w-full min-w-0 cursor-pointer border-0 bg-transparent p-0",children:jsx(FileListItemProgressFill,{as:"div",name:truncateFileName(Ce.fileName),size:Ce.size,type:Ce.type})},Ce.id))}),jsx(DownloadDisclosureModal,{opened:Vi,onClose:Pe,onDownload:dr,contentType:Ii?.contentType||"",analyticsEventPrefix:"Questionnaire Attachment - Disclosure"})]}):null};var _t=Object.defineProperty,Xe=Object.defineProperties,ct=Object.getOwnPropertyDescriptors,wt=Object.getOwnPropertySymbols,In=Object.prototype.hasOwnProperty,lr=Object.prototype.propertyIsEnumerable,Pr=(jn,Wr,Ur)=>Wr in jn?_t(jn,Wr,{enumerable:!0,configurable:!0,writable:!0,value:Ur}):jn[Wr]=Ur,y0=(jn,Wr)=>{for(var Ur in Wr||(Wr={}))In.call(Wr,Ur)&&Pr(jn,Ur,Wr[Ur]);if(wt)for(var Ur of wt(Wr))lr.call(Wr,Ur)&&Pr(jn,Ur,Wr[Ur]);return jn},U0=(jn,Wr)=>Xe(jn,ct(Wr));const X0=(jn,Wr,Ur,Xo)=>{var ko;const si=jn.extension||[];if(Xo?.[BUTTON_TYPE_EXTERNAL_KEY]&&si.some(di=>di.url===BUTTON_TYPE_EXTENSION_URL))return Xo[BUTTON_TYPE_EXTERNAL_KEY];if(isHiddenExtensionPresent(jn)||hasParentWithUIToolkitWidget(jn,Wr))return null;if(Ur&&jn.type==="attachment")return FHIRQuestionnaireAttachmentPreview;const _i=getUIToolkitCode(si),Ii=si.filter(di=>di.url.includes("questionnaire-itemControl")).flatMap(di=>{var ta,Aa;return(Aa=(ta=di.valueCodeableConcept)==null?void 0:ta.coding)!=null?Aa:[]})||[];let zi;return Xo&&(zi=(ko=Ii.find(di=>di.code&&Xo[di.code]))==null?void 0:ko.code),(zi&&Xo?Xo[zi]:void 0)||UI_TOOLKIT_WIDGET_MAP[_i||""]||typeToRenderFunctionMap[jn.type]||null},oi=jn=>{var Wr;const{item:Ur,selectedAnswer:Xo,handleInputChange:ko,showQuestionPrefix:si,errors:_i,questionnaireSchemaItems:Ii,formData:zi,isNestedRepeatedItem:Vi=!1}=jn,{linkId:di,text:ta,prefix:Aa,required:Dr,repeats:tr}=Ur,dr=getMaxOccursFromExtensions(Ur.extension),Pe=getPlaceholderFromExtensions(Ur.extension,Ur.type),[Ce,$e]=useState(()=>{if(Ur.type==="group"&&Ur.item&&Ur.item.length>0){const xr=zi?.filter(A0=>A0.linkId===Ur.linkId)||[];if(xr.length>0)return xr.map((A0,d0)=>d0)}else if(Xo&&Xo.length>0)return Xo.map((xr,A0)=>A0);return[0]}),vt=dr!==void 0&&Ce.length>=dr,jt=ta?getUpdatedQuestionText(si,Aa,ta):"",tn=()=>{const xr=Math.max(...Ce,-1)+1,A0=[...Ce,xr];if($e(A0),Ur.type==="group"&&Ur.item&&Ur.item.length>0){const d0=Ur.item.map(jo=>({linkId:jo.linkId,text:jo.text,answer:[{}]})),Y0={linkId:Ur.linkId,text:Ur.text,answer:[{}],item:d0};ko(Ur,void 0,[Y0])}else{const d0=[...Xo||[]];d0.push({}),ko(Ur,d0)}},Pn=xr=>{if(Ce.length<=1)return;const A0=Ce.filter((d0,Y0)=>Y0!==Ce.length-1);if($e(A0),Ur.type==="group"&&Ur.item&&Ur.item.length>0){const d0=[];if(zi?.forEach((Y0,jo)=>{Y0.linkId===di&&d0.push({item:Y0,originalIndex:jo})}),xr>=0&&xr<d0.length){const Y0=d0[xr],jo=zi?.filter((ft,$t)=>$t!==Y0.originalIndex);ko(Ur,void 0,jo,void 0,!0)}}else{const d0=Xo?.filter((Y0,jo)=>jo!==xr)||[];ko(Ur,d0.length>0?d0:[{}])}},sr=xr=>{if(!zi||!Ur.item)return[];const A0=jo=>{const ft=[];for(const $t of jo)if($t.linkId===Ur.linkId&&ft.push($t),$t.item&&$t.item.length>0){const cn=A0($t.item);ft.push(...cn)}return ft},Y0=A0(zi)[xr];return Y0?.item?Y0.item:[]},bn=(xr,A0)=>{if(isHiddenExtensionPresent(xr))return null;const d0=sr(A0);if(!isQuestionEnabledForInstance(xr.enableWhen,xr.enableBehavior,zi||[],Ur.linkId,A0))return null;if(xr.repeats){const cn=findNestedAnswer(d0,xr.linkId),kn=U0(y0({},jn),{item:xr,selectedAnswer:cn||[{}],errors:getInstanceErrors(_i,Ur,A0),handleInputChange:(nr,Zr,f0)=>ko(nr,Zr,f0,A0)});return jsx("div",{children:jsx(oi,U0(y0({},kn),{isNestedRepeatedItem:!0}))},xr.linkId)}if(xr.type==="group"&&xr.item&&!getUIToolkitCode(xr?.extension||[]))return jsxs("div",{children:[xr.text&&jsx("h5",{className:"mb-3 text-base font-medium text-gray-800",children:xr.text}),jsx("div",{className:"space-y-3",children:xr.item.map(cn=>{if(!isQuestionEnabledForInstance(cn.enableWhen,cn.enableBehavior,zi||[],Ur.linkId,A0))return null;const nr=X0(cn,Ii,jn.isLoading,jn.externalComponentRenderMap);if(!nr)return null;const Zr=findNestedAnswer(d0,cn.linkId),f0=U0(y0({},jn),{item:cn,selectedAnswer:Zr,placeholder:getPlaceholderFromExtensions(cn.extension,cn.type),errors:getInstanceErrors(_i,Ur,A0),handleInputChange:(bo,D0,R0)=>ko(bo,D0,R0,A0)});return createElement(nr,U0(y0({},f0),{key:cn.linkId}))})})]},xr.linkId);const jo=X0(xr,Ii,jn.isLoading,jn.externalComponentRenderMap);if(!jo)return null;const ft=findNestedAnswer(d0,xr.linkId),$t=U0(y0({},jn),{item:xr,selectedAnswer:ft,placeholder:getPlaceholderFromExtensions(xr.extension,xr.type),errors:getInstanceErrors(_i,Ur,A0),handleInputChange:(cn,kn,nr)=>ko(cn,kn,nr,A0)});return createElement(jo,U0(y0({},$t),{key:`${xr.linkId}-${A0}`}))},Xn=()=>{const xr=getDirectErrors(_i,di);return jsxs("div",{className:"flex flex-col gap-2",children:[xr[di]&&jsx("div",{className:"text-error-primary text-sm font-medium",children:xr[di]}),!vt&&jsx("div",{className:"flex items-center justify-center",children:jsx(Button,{color:"link-color",size:"sm",onClick:tn,className:"mt-4 text-center",isDisabled:jn.isLoading,iconLeading:jsx(Plus,{className:"h-4 w-4"}),children:"Add Item"})})]})},un=xr=>Ce.length>1&&jsx(Button,{color:"tertiary-destructive",onClick:()=>Pn(xr),className:"text-error-primary hover:text-error-primary-hover","aria-label":`Remove Item ${xr+1}`,iconLeading:jsx(Trash02,{className:"h-4 w-4"}),isDisabled:jn.isLoading}),fr=X0(Ur,Ii,jn.isLoading,jn.externalComponentRenderMap);return hasRepeatingParent(Ur,Ii)&&!Vi?null:!tr||tr&&hasCheckboxExtension(Ur)?fr?jsx(fr,U0(y0({},jn),{placeholder:Pe,errors:{[Ur.linkId]:((Wr=_i?.[Ur.linkId])==null?void 0:Wr[0])||""}})):null:Ur.type==="group"&&Ur.item&&Ur.item.length>0&&Ur.repeats?jsxs("div",{"data-testid":`${di}-repeating`,children:[jt&&jsx(FHIRQuestionnaireQuestionText,{text:jt,required:Dr||!1}),Ce.map(xr=>{var A0;return jsxs("div",{className:"relative mb-4",children:[jsxs("div",{className:`mb-4 flex items-center justify-between ${xr>0?"mt-8":""}`,children:[jsxs("p",{className:"mb-2 text-sm font-bold",children:["Item ",xr+1]}),un(xr)]}),jsx("div",{className:"space-y-4",children:(A0=Ur.item)==null?void 0:A0.map(d0=>bn(d0,xr))})]},`${di}-instance-${xr}`)}),Xn()]}):fr?jsxs("div",{"data-testid":`${di}-repeating`,children:[Ce.map(xr=>{const A0=Xo?.[xr]?[Xo[xr]]:void 0,d0=U0(y0({},jn),{item:Ur,selectedAnswer:A0,errors:getInstanceErrors(_i,Ur,xr),handleInputChange:(Y0,jo,ft)=>ko(Y0,jo,ft,xr)});return jsxs("div",{className:"relative mb-2",children:[jsxs("div",{className:"flex items-end justify-between",children:[jsxs("p",{className:"mb-2 text-sm font-bold",children:["Item ",xr+1]}),un(xr)]}),jsx(fr,y0({},d0))]},`${di}-instance-${xr}`)}),jsxs("div",{children:[(()=>{const A0=getDirectErrors(_i,di)[di];return A0&&jsx("div",{className:"text-error-primary mb-3 text-sm font-medium",children:A0})})(),!vt&&jsx("div",{className:"flex items-center justify-center",children:jsx(Button,{color:"link-color",size:"sm",onClick:tn,className:"mt-4 text-center",isDisabled:jn.isLoading,iconLeading:jsx(Plus,{className:"h-4 w-4"}),children:"Add Item"})})]})]}):null};var Jo=Object.defineProperty,ci=Object.defineProperties,wi=Object.getOwnPropertyDescriptors,ma=Object.getOwnPropertySymbols,oa=Object.prototype.hasOwnProperty,ba=Object.prototype.propertyIsEnumerable,Za=(jn,Wr,Ur)=>Wr in jn?Jo(jn,Wr,{enumerable:!0,configurable:!0,writable:!0,value:Ur}):jn[Wr]=Ur,rs=(jn,Wr)=>{for(var Ur in Wr||(Wr={}))oa.call(Wr,Ur)&&Za(jn,Ur,Wr[Ur]);if(ma)for(var Ur of ma(Wr))ba.call(Wr,Ur)&&Za(jn,Ur,Wr[Ur]);return jn},_a=(jn,Wr)=>ci(jn,wi(Wr));const qs=null,d1=({formId:jn,questionnaireSchema:Wr,questionnaireResponseItem:Ur,errorConfig:Xo,customErrorConfigurations:ko,showQuestionPrefix:si=!0,isAdaptiveFlow:_i=!1,status:Ii,hideBackButton:zi=!1,showStepper:Vi=!1,onComplete:di,onClearError:ta,handleHiddenQuestion:Aa,onGoBack:Dr,onFormDataChange:tr=()=>{},externalComponentRenderMap:dr,children:Pe})=>{var Ce,$e;const{setHandleContinueButtonClick:vt,setHandleBackButtonClick:jt,setIsCurrentFormValid:tn,setCurrentGroupLinkId:Pn,setCurrentGroupIndex:sr,setTotalSteps:bn,setHideFooterButton:Xn,setIsInlineNextQuestionTriggered:un,isCurrentFormValid:fr,currentGroupIndex:pr,isLoading:xr,hasCustomError:A0,groupItemIndicesRef:d0,errorLinkIds:Y0}=useFHIRQuestionnaire(),{trackEvent:jo}=useAnalytics(),{t:ft}=useUIToolkitTranslations(),[$t,cn]=useState([]),[kn,nr]=useState(new Set),[Zr,f0]=useState([]),[bo,D0]=useState([]),R0=d0,yo=useRef(new Map),Do=useRef(new Set),[Q0,J0]=useState({}),[O0,So]=useState(!1),[W0,Gi]=useState(Wr),zo=useRef(Ur||[]),Ti=useRef(!1),Ca=useRef(!1),ca=useMemo(()=>getTotalStepsFromQuestionnaire(Wr),[Wr]),[e1,js]=useState(!1),$i=useRef([]),C1=($o,yi)=>{var Go,Pi,Hi,Wa,os,Oa;if(isCallNextQuestionExtensionPresent($o))return $o.linkId;const Da=validateCurrentPage(yi,$t,pr,W0,R0),s1=ya=>{for(const Zs of ya){if((!Zs.enableWhen||isQuestionEnabled(Zs.enableWhen,Zs.enableBehavior,yi))&&isCallNextQuestionExtensionPresent(Zs))return Zs.linkId;if(Zs.item){const al=s1(Zs.item);if(al)return al}}},_s=(ya,Zs)=>{for(const o1 of ya)if(o1.item){const al=o1.item.findIndex(l1=>l1.linkId===Zs);if(al!==-1)return s1(o1.item.slice(al+1));const g1=_s(o1.item,Zs);if(g1!==void 0)return g1}},il=_s((Go=W0?.item)!=null?Go:[],$o.linkId);if(il)return il;const Ml=R0.current[pr],ml=pr+1,kl=R0.current[ml],Wu=pr===0?0:Ml,vo=(Hi=kl??((Pi=W0?.item)==null?void 0:Pi.length))!=null?Hi:0;let Vn=-1;for(let ya=Wu;ya<vo;ya++){const Zs=(Wa=W0?.item)==null?void 0:Wa[ya];if(Zs?.linkId===$o.linkId){Vn=ya;break}}const Bi=(ya,Zs=[])=>(ya.forEach(o1=>{var al;if((!o1.enableWhen||isQuestionEnabled(o1.enableWhen,o1.enableBehavior,yi))&&isCallNextQuestionExtensionPresent(o1))if(o1.required){const l1=(al=findResponseItem(yi,o1.linkId))==null?void 0:al.answer;(l1&&l1.length>0&&Object.keys(l1[0]).length>0||o1.initial&&o1.initial.length>0&&!kn.has(o1.linkId))&&Zs.push(o1.linkId)}else Zs.push(o1.linkId);o1.item&&o1.item.length>0&&Bi(o1.item,Zs)}),Zs),Xi=[],Ja=Vn!==-1?Vn+1:vo;for(let ya=Wu;ya<Ja;ya++){const Zs=(os=W0?.item)==null?void 0:os[ya];Zs&&Bi([Zs],Xi)}if(Xi.length>0&&Da){const ya=Xi[Xi.length-1],Zs=l1=>l1.flatMap(Bs=>[Bs,...Bs.item?Zs(Bs.item):[]]),o1=Zs((Oa=W0?.item)!=null?Oa:[]),al=o1.findIndex(l1=>l1.linkId===ya),g1=o1.findIndex(l1=>l1.linkId===$o.linkId);return al!==-1&&g1>al?void 0:ya}},t1=$o=>C1($o,zo.current)?!0:$o.item&&$o.item.length>0?$o.item.some(t1):!1,hs=()=>{var $o,yi;if(!_i||pr<0||!W0?.item)return{shouldTriggerInlineLoading:!1,canNavigateToNextGroup:!1,hasMoreGroups:!1};const Go=R0.current[pr],Pi=yo.current.get(Go)||[Go],Hi=($o=W0.item)==null?void 0:$o[Pi[Pi.length-1]],Wa=Hi?t1(Hi):!1,os=pr<R0.current.length-1;let Oa=!1;if(Wa&&os){const Da=pr+1,s1=R0.current[Da],_s=(yi=W0?.item)==null?void 0:yi[s1],il=!_s?.enableWhen||isQuestionEnabled(_s.enableWhen,_s.enableBehavior,zo.current),Ml=_s?isPageExtensionPresent(_s):!1;Oa=il&&Ml}return{shouldTriggerInlineLoading:Wa,canNavigateToNextGroup:Oa,hasMoreGroups:os}},F1=($o,yi,Go,Pi)=>{const Hi=getUpdatedFormData(W0?.item||[],zo.current,$o,yi,Go,Pi);return zo.current=Hi,tr(Hi),Hi},yr=($o,yi,Go,Pi,Hi)=>{F1(yi,Go,Pi,Hi),Pi.forEach(Wa=>{const os=getValidationError(_a(rs({},$o),{linkId:Wa.linkId}),zo.current,Wa.answer,ft);os&&J0(Oa=>_a(rs({},Oa),{[Wa.linkId]:typeof Hi=="number"?_a(rs({},Oa[Wa.linkId]),{[Hi]:os}):os}))})},Qn=($o,yi,Go,Pi,Hi)=>{var Wa;const os=F1(yi,Go,Pi,Hi),Oa=(Wa=findResponseItem(os,yi))==null?void 0:Wa.answer,Da=getValidationError($o,zo.current,Oa,ft);J0(s1=>_a(rs({},s1),{[yi]:typeof Hi=="number"?_a(rs({},s1[yi]),{[Hi]:Da}):Da}))},Ir=($o,yi)=>{const Go=validateCurrentPage(yi,$t,pr,W0,R0);if(tn(Go),W0?.item){const Pi=validateAllItemsRecursively(W0.item,yi,ft);if(Object.keys(Pi).length>0)J0(Hi=>rs(rs({},Hi),Pi));else{const Hi=W0.item,Wa={},os=Oa=>{Oa.forEach(Da=>{Wa[Da.linkId]={},Da.item&&os(Da.item)})};os(Hi),J0(Oa=>rs(rs({},Oa),Wa))}}},hr=($o,yi,Go,Pi,Hi=!1)=>{var Wa;const{linkId:os}=$o;if(Hi)return zo.current=Go||[],Ir(os,Go||[]),zo.current;if(Go&&Go.length>0&&$o.type==="group"&&$o.repeats){let _s=zo.current.length;for(let Ml=zo.current.length-1;Ml>=0;Ml--)if(zo.current[Ml].linkId===os){_s=Ml+1;break}const il=[...zo.current.slice(0,_s),...Go,...zo.current.slice(_s)];return zo.current=il,Ir(os,il),zo.current}if(typeof Pi=="number"&&yi){const _s=hasRepeatingParent($o,W0?.item||[]);if(_s){const il=zo.current.filter(ml=>ml.linkId===_s.linkId);if(Pi<il.length){const ml=zo.current.map(kl=>{if(kl.linkId===_s.linkId&&zo.current.slice(0,zo.current.indexOf(kl)).filter(vo=>vo.linkId===_s.linkId).length===Pi){const vo=(Xi,Ja)=>{const ya=new Map(Xi.map(o1=>[o1.linkId,o1])),Zs=[];return Ja?.forEach(o1=>{const al=ya.get(o1.linkId);if(o1.linkId===os)Zs.push(rs({linkId:o1.linkId,text:o1.text,answer:yi},al?.item&&{item:al.item}));else if(al)if(o1.item&&o1.item.length>0){const g1=vo(al.item||[],o1.item);Zs.push(_a(rs({},al),{item:g1}))}else Zs.push(al);else if(o1.item&&o1.item.length>0){const g1=vo([],o1.item);g1.some(Bs=>Bs.linkId===os||Bs.item&&Vn(Bs.item,os))&&Zs.push({linkId:o1.linkId,text:o1.text,answer:[{}],item:g1})}ya.delete(o1.linkId)}),ya.forEach(o1=>{Zs.push(o1)}),Zs},Vn=(Xi,Ja)=>Xi.some(ya=>ya.linkId===Ja||ya.item&&Vn(ya.item,Ja)),Bi=vo(kl.item||[],_s.item);return _a(rs({},kl),{item:Bi})}return kl});zo.current=ml,tr(ml)}else{const ml=Pi+1,kl=il.length;if(kl<ml||ml===1){const Wu=[],vo=(Xi,Ja,ya)=>Xi.map(Zs=>{const o1={linkId:Zs.linkId,text:Zs.text,answer:Zs.linkId===Ja?ya:[{}]};return Zs.item&&Zs.item.length>0&&(o1.item=vo(Zs.item,Ja,ya)),o1});for(let Xi=kl;Xi<ml;Xi++){const Ja=_s.item?vo(_s.item,os,yi):[],ya={linkId:_s.linkId,text:_s.text,answer:[{}],item:Ja};Wu.push(ya)}let Vn=zo.current.length;for(let Xi=zo.current.length-1;Xi>=0;Xi--)if(zo.current[Xi].linkId===_s.linkId){Vn=Xi+1;break}const Bi=[...zo.current.slice(0,Vn),...Wu,...zo.current.slice(Vn)];zo.current=Bi,tr(Bi)}}const Ml=getValidationError($o,zo.current,yi,ft);return J0(ml=>_a(rs({},ml),{[os]:typeof Pi=="number"?_a(rs({},ml[os]),{[Pi]:Ml}):Ml})),Ir(os,zo.current),zo.current}}if(typeof Pi=="number")return Go&&Go.length>0?yr($o,os,yi,Go,Pi):Qn($o,os,yi,Go,Pi),zo.current;const Oa=F1(os,yi,Go),Da=(Wa=findResponseItem(Oa,os))==null?void 0:Wa.answer,s1=getValidationError($o,Oa,Da,ft);return J0(_s=>_a(rs({},_s),{[os]:typeof Pi=="number"?_a(rs({},_s[os]),{[Pi]:s1}):s1})),Ir(os,Oa),zo.current},kr=()=>{var $o;for(let yi=pr+1;yi<R0.current.length;yi++){const Go=R0.current[yi],Pi=($o=W0?.item)==null?void 0:$o[Go];if(!!Pi&&(!Pi.enableWhen||isQuestionEnabled(Pi.enableWhen,Pi.enableBehavior,zo.current)))return!0}return!1},V0=()=>{var $o,yi,Go,Pi,Hi;const Wa=($o=Wr?.item)==null?void 0:$o[R0.current[pr]];if(Wa){const Da=(yi=getAnalyticsEventName(Wa))!=null?yi:"questionnaire_form",s1=getAnalyticsPageName(Wa);if(s1){const _s=(Go=getAnalyticsFormName(Wr))!=null?Go:Wr.name,il=collectAnalyticsProperties(Wa,zo.current),Ml={};_s&&(Ml.form_name=_s),Ml.page_name=s1,Object.assign(Ml,il),jo(Da,Ml)}}const os=pr<R0.current.length-1,Oa=checkCurrentStepDataMatch(zo.current,W0,R0.current,pr,Ur,R0.current.length-1);if(_i&&os){const Da=pr+1,s1=R0.current[Da],_s=(Pi=W0?.item)==null?void 0:Pi[s1],il=!_s?.enableWhen||isQuestionEnabled(_s.enableWhen,_s.enableBehavior,zo.current),Ml=_s?isPageExtensionPresent(_s):!1;if(il&&Ml&&Oa){sr(Da),tn(!1),window.scrollTo(0,0);return}}if(Oa&&R0.current.length>0){kr()?sr(pr+1):(di(removeDisabledItems(zo.current,W0?.item||[])),tn(!1),window.scrollTo(0,0));return}if(pr<R0.current.length-1){const Da=(Hi=W0?.item)==null?void 0:Hi[R0.current[pr]];if(!Da){di(removeDisabledItems(zo.current,W0?.item||[]));return}const s1=Da.linkId,_s=findLastGroupInstanceIndex(zo.current,s1),il=zo.current.slice(0,_s+1);if(!validateCurrentPage(il,$t,pr,W0,R0))return;_i?(zo.current=il,tr(il),di(zo.current),tn(!1)):R0.current.length>0&&(kr()?sr(pr+1):(di(removeDisabledItems(zo.current,W0?.item||[])),window.scrollTo(0,0)))}else di(removeDisabledItems(zo.current,W0?.item||[])),tn(!1),window.scrollTo(0,0)};useEffect(()=>{var $o;vt(()=>V0),jt(()=>Oi),tn(fr);const yi=($o=W0?.item)==null?void 0:$o[R0.current[pr]];yi&&Pn(yi.linkId)},[fr,pr]),useEffect(()=>{if(!Wr?.item)return;const{groupIndices:$o,itemsToRenderMap:yi}=collectGroupItemIndices(Wr.item);R0.current=$o,yo.current=yi;const Go=ca??$o.length;bn(Go),f0($o),_i?(Ca.current||sr($o.length>0?$o.length-1:0),un(!1),Ca.current=!1):pr===-1&&sr(0)},[Wr?.item,ca]),useEffect(()=>{if(pr<0||!W0?.item)return;const $o=validateCurrentPage(zo.current,$t,pr,W0,R0);if(!$o){tn(!1);return}const{shouldTriggerInlineLoading:yi,canNavigateToNextGroup:Go,hasMoreGroups:Pi}=hs();if(_i&&yi){if(!Pi){tn(!1);return}if(Go&&$o){tn(!0);return}else{tn(!1);return}}tn($o)},[pr,W0?.item,A0,_i,zo.current,$t]),useEffect(()=>{if(!Wr?.item||Ti.current)return;const $o=initializeQuestionnaireItems(Wr.item,zo.current,Wr.item,zo.current);if($o!==zo.current){zo.current=$o;const Go=(Hi=>{const Wa=new Set,os=Oa=>{Oa.forEach(Da=>{var s1;const _s=Da.initial&&Da.initial.length>0,il=(Da.type==="choice"||Da.type==="open-choice")&&((s1=Da.answerOption)==null?void 0:s1.some(Ml=>Ml.initialSelected===!0));(_s||il)&&(!Da.enableWhen||isQuestionEnabled(Da.enableWhen,Da.enableBehavior,zo.current))&&Wa.add(Da.linkId),Da.item&&os(Da.item)})};return os(Hi),Wa})(W0?.item||[]);nr(Go);const Pi=validateAllItemsRecursively(W0?.item||[],zo.current,ft);Object.keys(Pi).length>0&&J0(Hi=>rs(rs({},Hi),Pi))}Ti.current=!0},[W0?.item,Wr,ft]),useEffect(()=>{Gi(Wr)},[Wr]),useEffect(()=>{if(Y0.size===0)return;const $o=Oa=>!Oa.enableWhen||isQuestionEnabled(Oa.enableWhen,Oa.enableBehavior,zo.current)?Y0.has(Oa.linkId)?!0:(Oa.item||[]).some($o):!1,yi=Oa=>Oa.flatMap(Da=>[Da.linkId,...yi(Da.item||[])]),Go=Oa=>{const Da=Oa.findIndex($o);return Da===-1?Oa.flatMap(s1=>Go(s1.item||[])):Oa.slice(Da+1).flatMap(s1=>[s1.linkId,...yi(s1.item||[])])};if(!W0?.item)return;const Pi=Go(W0.item);if(Pi.length===0)return;Gi(Oa=>Oa?.item?_a(rs({},Oa),{item:removeItemsFromSchema(Oa.item,Pi)}):Oa);const Hi=Oa=>Oa.flatMap(Da=>[Da,...Da.item?Hi(Da.item):[]]),Wa=W0.item,os=Wa.findIndex(Oa=>Hi([Oa]).some(Da=>Y0.has(Da.linkId)&&(!Da.enableWhen||isQuestionEnabled(Da.enableWhen,Da.enableBehavior,zo.current))));if(os!==-1){const Oa=new Set(Hi(Wa.slice(os)).map(Da=>Da.linkId));$i.current=$i.current.filter(Da=>!Oa.has(Da))}nr(Oa=>{const Da=new Set(Oa);return Pi.forEach(s1=>Da.delete(s1)),Da})},[Y0]),useEffect(()=>{pr>=0&&window.scrollTo(0,0)},[pr]),useEffect(()=>{var $o;if(!_i||$t.length===0||xr||Y0.size>0||!W0?.item)return;const yi=R0.current[pr];if(yi===void 0)return;const Go=yo.current.get(yi)||[yi],Pi=[];if(Go.forEach(Da=>{var s1;const _s=(s1=W0?.item)==null?void 0:s1[Da];_s&&hasInitialValue(_s)&&Pi.push(_s)}),Pi.length===0||!Pi.some(Da=>C1(Da,zo.current)&&!$i.current.includes(Da.linkId)?($i.current.push(Da.linkId),!0):!1))return;const Wa=validateCurrentPage(zo.current,$t,pr,W0,R0),os=($o=W0?.item)==null?void 0:$o[yi],Oa=isHiddenAnswerInValid(os,zo.current);!Wa||Oa||(Do.current.add(pr),un(!0),Ca.current=!0,K0(Pi[Pi.length-1].linkId))},[pr,$t,_i,xr,W0]);const K0=($o,yi=!1,Go=!1)=>{var Pi,Hi,Wa;if(yi){di(removeDisabledItems(zo.current,W0?.item||[]),Go),tn(!1);return}const os=findQuestionByLinkId(W0?.item||[],$o);if(!os)return;const Oa=(Pi=findResponseItem(zo.current,$o))==null?void 0:Pi.answer;if(getValidationError(os,zo.current,Oa,ft))return;const Da=getUpdatedFormData(W0?.item||[],zo.current,$o,Oa),s1=C1(os,Da);if(!s1)return;const _s=(Hi=findResponseItem(Ur||[],$o))==null?void 0:Hi.answer,il=l1=>JSON.stringify(l1,(Bs,D1)=>D1??void 0);if(il(Oa)===il(_s)||$o!==s1&&$i.current.includes(s1))return;tn(!1);const Ml=findRootGroupLinkId(W0?.item||[],$o);let ml=Da,kl=[];const Wu=deepTrimFormData(Da,s1,W0?.item||[]);ml=Wu.trimmedData,kl=Wu.trimmedLinkIds;const vo=findQuestionByLinkId(W0?.item||[],Ml||"");zo.current=ml;const Vn=findGroupPositionByLinkId(W0?.item||[],$o||""),Bi=Vn!==-1?Vn:pr;let Xi;const Ja=(()=>{var l1;const Bs=(l1=W0?.item)!=null?l1:[],D1=(O1,lu)=>O1.some(Ku=>Ku.linkId===lu||(Ku.item?D1(Ku.item,lu):!1)),Al=Bs.findIndex(O1=>O1.linkId===s1||(O1.item?D1(O1.item,s1):!1));if(Al===-1)return[];const gl=O1=>O1.flatMap(lu=>[lu.linkId,...lu.item?gl(lu.item):[]]),Kl=O1=>O1.flatMap(lu=>[lu,...lu.item?Kl(lu.item):[]]),su=Kl(Bs),Cu=su.findIndex(O1=>O1.linkId===s1),W1=new Set;let lc=!0;for(;lc;){lc=!1;for(const O1 of su){if(W1.has(O1.linkId)||!O1.enableWhen)continue;O1.enableWhen.some(Ku=>{const ed=su.findIndex(Oc=>Oc.linkId===Ku.question);return ed!==-1&&ed<=Cu||W1.has(Ku.question)})&&(W1.add(O1.linkId),lc=!0)}}const uc=$i.current.includes(s1)?(()=>{const O1=new Set(gl([Bs[Al]]));return su.slice(Cu+1).filter(lu=>O1.has(lu.linkId)&&!W1.has(lu.linkId)&&!isHiddenExtensionPresent(lu)).map(lu=>lu.linkId)})():[],Ac=Kl(Bs.slice(Al+1)).filter(O1=>!W1.has(O1.linkId)&&!isHiddenExtensionPresent(O1)).map(O1=>O1.linkId);return[...uc,...Ac]})();if(Ja.length>0){Xi=removeItemsFromSchema(W0?.item||[],Ja),Gi(_a(rs({},W0),{item:Xi}));const l1=new Set(Ja);$i.current=$i.current.filter(Bs=>!l1.has(Bs))}const ya=[...kl,...Ja],Zs=validateCurrentPage(ml,$t,Bi,W0,R0,ya),o1=findQuestionByLinkId(W0?.item||[],s1),al=(Wa=findResponseItem(ml,s1))==null?void 0:Wa.answer,g1=!o1?.required||al!==void 0&&al.length>0&&Object.keys(al[0]).length>0;if(Zs&&g1&&!isHiddenAnswerInValid(vo,ml)){un(!0),Ca.current=!0;const Bs=((D1,Al)=>{const gl=[];let Kl=!1;const su=Cu=>{for(const W1 of Cu)Kl?(gl.push(W1.linkId),W1.item&&su(W1.item)):W1.linkId===Al?Kl=!0:W1.item&&su(W1.item)};return su(D1),gl})(W0?.item||[],s1);Bs.length>0&&($i.current=$i.current.filter(D1=>!Bs.includes(D1)),nr(D1=>{const Al=new Set(D1);return Bs.forEach(gl=>Al.delete(gl)),Al})),$i.current.push(s1),di(removeDisabledItems(ml,W0?.item||[]),!0,Xi||W0.item)}},Wt=($o,yi,Go=!1)=>{const Pi=updateItemWithReadOnlyExpression($o,W0),Hi={item:Pi,selectedAnswer:yi,handleInputChange:hr,showQuestionPrefix:si,onCompleteHandler:K0,errors:Q0,isLoading:xr,isCurrentFormValid:fr,contained:W0?.contained,questionnaireSchemaItems:W0?.item,customErrorConfigurations:ko,formData:zo.current,showStepper:Vi,totalStepsFromExtension:ca,externalComponentRenderMap:dr,hintText:getHintTextFromExtensions(Pi.extension)};if(typeof Aa=="function"&&Go)Aa($o,Hi,zo.current);else if($o.type in typeToRenderFunctionMap&&!Go)return $t.includes($o.linkId)||cn(Wa=>[...Wa,$o.linkId]),jsx(RenderFHIRQuestionnaireItem,rs({},Hi),$o.linkId);return null},ri=$o=>{const yi=Hi=>!Hi.enableWhen||isQuestionEnabled(Hi.enableWhen,Hi.enableBehavior,zo.current)?Y0.has(Hi.linkId)?!0:(Hi.item||[]).some(yi):!1,Go=$o.findIndex(yi),Pi=Go!==-1?$o.slice(0,Go+1):$o;return Go!==-1&&$o.slice(Go+1).forEach(Hi=>{zo.current.some(os=>os.linkId===Hi.linkId)&&(zo.current=removeAnswerFromFormData(zo.current,Hi.linkId))}),Pi.map(Hi=>{var Wa,os;const Oa=isHiddenExtensionPresent(Hi);let Da=(Wa=findResponseItem(zo.current,Hi.linkId))==null?void 0:Wa.answer;if((!Da||Object.keys((os=Da?.[0])!=null?os:{}).length===0)&&!kn.has(Hi.linkId)){if(Hi.initial&&Hi.initial.length>0)Da=Hi.initial,nr(s1=>new Set(s1).add(Hi.linkId));else if((Hi.type==="choice"||Hi.type==="open-choice")&&Hi.answerOption){const s1=Hi.answerOption.filter(_s=>_s.initialSelected===!0);s1.length>0&&(Da=s1.map(_s=>{let il={};return _s.valueCoding?il={valueCoding:{code:_s.valueCoding.code,display:_s.valueCoding.display,system:_s.valueCoding.system}}:_s.valueReference&&(il={valueReference:{reference:_s.valueReference.reference,display:_s.valueReference.display}}),il}).filter(_s=>Object.keys(_s).length>0),nr(_s=>new Set(_s).add(Hi.linkId)))}Da&&(zo.current=getUpdatedFormData(W0?.item||[],zo.current,Hi.linkId,Da))}if(!Hi?.enableWhen||isQuestionEnabled(Hi?.enableWhen,Hi.enableBehavior,zo.current)){const s1=qs.includes(Hi.linkId)||getUIToolkitCode(Hi.extension||[])===UI_TOOLKIT_FORM_CONTAINER;return jsxs(React.Fragment,{children:[Wt(Hi,Da,Oa),Hi.item&&!Oa&&(s1?jsx(FormContainer,{children:jsx("div",{className:"gap-3xl flex flex-col",children:ri(Hi.item)})}):ri(Hi.item))]},Hi.linkId)}else if(Hi.type==="group"&&!Oa)return bo.includes(Hi.linkId)||(ca===void 0&&bn(R0.current.length-1||-1),R0.current=R0.current.filter((s1,_s)=>_s!==pr),D0(s1=>[...s1,Hi.linkId])),null})};if(pr>=0){const $o=[];let yi=0,Go=0;for(;yi<Zr.length&&Go<R0.current.length;){const Pi=Zr[yi],Hi=R0.current[Go];if(Pi<Hi){const Wa=(Ce=W0?.item)==null?void 0:Ce[Pi];(!Wa?.enableWhen||isQuestionEnabled(Wa.enableWhen,Wa.enableBehavior,zo.current))&&$o.push(yi),yi++}else Pi===Hi&&yi++,Go++}for(;yi<Zr.length;){const Pi=Zr[yi],Hi=($e=W0?.item)==null?void 0:$e[Pi];(!Hi?.enableWhen||isQuestionEnabled(Hi.enableWhen,Hi.enableBehavior,zo.current))&&$o.push(yi),yi++}if($o.length>0){ca===void 0&&bn(R0.current.length+$o.length),$o.reverse().forEach(Hi=>{const Wa=Zr[Hi];let os=0;for(let Oa=0;Oa<R0.current.length;Oa++){if(R0.current[Oa]>Wa){os=Oa;break}os=Oa+1}R0.current.splice(os,0,Wa)});const Pi=$o.map(Hi=>{var Wa;const os=Zr[Hi],Oa=(Wa=W0?.item)==null?void 0:Wa[os];return Oa?.linkId}).filter(Boolean);D0(Hi=>Hi.filter(Wa=>!Pi.includes(Wa)))}Zr.forEach(Pi=>{var Hi;const Wa=(Hi=W0?.item)==null?void 0:Hi[Pi];Wa?.enableWhen&&!isQuestionEnabled(Wa.enableWhen,Wa.enableBehavior,zo.current)&&zo.current.some(Oa=>Oa.linkId===Wa.linkId)&&(zo.current=removeAnswerFromFormData(zo.current,Wa.linkId))})}const Oi=()=>{var $o;if(Xo&&!O0&&pr>0&&Ii!=="completed")sr(R0.current.length-1),So(!0),Xn(!1),ta?.();else if(pr>0&&Ii!=="completed"){let yi=pr-1;for(;yi>0;){const Go=R0.current[yi],Pi=($o=W0?.item)==null?void 0:$o[Go];if(!Pi?.enableWhen||isQuestionEnabled(Pi.enableWhen,Pi.enableBehavior,zo.current))break;yi--}sr(yi),tn(!0),Xn(!1),ta?.()}else Dr?.()},xa=$o=>$o.preventDefault();return useEffect(()=>{const $o=setTimeout(()=>{js(!0)},0);return()=>clearTimeout($o)},[]),e1?jsxs(Fragment,{children:[jsxs("form",{id:jn,className:"w-full","data-testid":"questionnaire-form",onSubmit:xa,children:[!zi&&jsxs("div",{className:"tw group text-secondary gap-md mb-2xl hover:text-secondary_hover flex w-fit cursor-pointer items-center text-sm font-semibold hover:font-bold",role:"button","data-testid":"questionnaire-back-button",tabIndex:0,onClick:()=>Oi(),onKeyDown:$o=>{($o.key==="Enter"||$o.key===" ")&&Oi()},children:[jsx(ArrowLeft,{}),jsx("span",{className:"group-hover:underline",children:"Back"})]}),Xo&&!O0?jsx(EmptyState,{className:"mt-5xl",title:Xo.title,description:Xo.description,featuredIconProps:{icon:Xo.icon,color:"gray"},primaryButton:Xo.primaryButton,secondaryButton:Xo.secondaryButton?_a(rs({},Xo.secondaryButton),{onClick:Oi}):void 0}):jsxs(Fragment,{children:[!W0?.item&&xr&&jsx(LoadingIndicator,{size:"md",label:"",testId:"questionnaire-loading-indicator"}),W0?.item&&jsx("div",{className:"gap-3xl flex flex-col",children:ri(pr>=0?W0.item.filter(($o,yi)=>{const Go=R0.current[pr];return(yo.current.get(Go)||[Go]).includes(yi)}):W0?.item||[])})]})]}),Ti.current&&Pe]}):jsx(LoadingIndicator,{})}},78912:()=>{},7630:(Y,l,e)=>{"use strict";e.d(l,{l:()=>b});var n=e(31085),t=e(14041),r=e(36087),s=e(1053),o=e(25624),i=e(18522),a=Object.defineProperty,g=Object.defineProperties,c=Object.getOwnPropertyDescriptors,u=Object.getOwnPropertySymbols,C=Object.prototype.hasOwnProperty,A=Object.prototype.propertyIsEnumerable,m=(h,f,v)=>f in h?a(h,f,{enumerable:!0,configurable:!0,writable:!0,value:v}):h[f]=v,d=(h,f)=>{for(var v in f||(f={}))C.call(f,v)&&m(h,v,f[v]);if(u)for(var v of u(f))A.call(f,v)&&m(h,v,f[v]);return h},O=(h,f)=>g(h,c(f));const p=({selected:h,onClick:f,icon:v,title:M,description:x,readOnly:T})=>{const z=(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:(0,r.cx)("mr-4 flex h-[64px] w-[64px] items-center justify-center rounded-md",h?"bg-utility-accent-500/20":"bg-gray-100",h?"text-accent-800":"text-quaternary"),children:v}),(0,n.jsxs)("div",{className:"flex flex-1 flex-col",children:[(0,n.jsx)("div",{className:"font-body flex w-full flex-row items-start justify-between",children:(0,n.jsx)("div",{className:"text-md text-secondary font-semibold",children:M})}),(0,n.jsx)("div",{className:"text-sm font-normal text-gray-600",children:x})]})]}),S=(0,r.cx)("p-lg flex w-full items-start rounded-xl border-2 text-left shadow-none transition-colors",T?"cursor-not-allowed":"cursor-pointer",T?"border-gray-200 bg-white":h?"border-blue-700 bg-white":"border-gray-100 bg-white",!T&&!h&&"hover:border-gray-400");return T?(0,n.jsx)("div",{className:S,children:z}):(0,n.jsx)("button",{type:"button",onClick:f,className:S,"aria-pressed":!!h,children:z})},b=({item:h,handleInputChange:f,formData:v,isLoading:M})=>{const{incrementCustomErrorCount:x,decrementCustomErrorCount:T}=(0,i.c)(),z=(0,t.useMemo)(()=>{var N;return(N=h.item)!=null?N:[]},[h.item]),S=h.readOnly===!0,y=(0,t.useMemo)(()=>z.filter(N=>!N.enableWhen||(0,o.GN)(N.enableWhen,N.enableBehavior,v??[])),[z,v]),E=(0,t.useMemo)(()=>z.filter(N=>N.enableWhen&&!(0,o.GN)(N.enableWhen,N.enableBehavior,v??[])),[z,v]),R=N=>{var w,V;if(!v)return!1;const q=(0,o.MU)(v,N);return((V=(w=q?.answer)==null?void 0:w[0])==null?void 0:V.valueBoolean)===!0},P=(0,t.useMemo)(()=>y.some(N=>R(N.linkId)),[y,v]),L=(0,t.useRef)(!1);(0,t.useEffect)(()=>{if(S||y.length===0){L.current&&(T(),L.current=!1);return}!P&&!L.current?(x(),L.current=!0):P&&L.current&&(T(),L.current=!1)},[P,S,y.length,x,T]),(0,t.useEffect)(()=>{E.forEach(N=>{var w,V;const q=v?(0,o.MU)(v,N.linkId):void 0;(!q||((V=(w=q.answer)==null?void 0:w[0])==null?void 0:V.valueBoolean)!==!1)&&f(N,[{valueBoolean:!1}])})},[E]),(0,t.useEffect)(()=>()=>{L.current&&T()},[]);const D=N=>{const w=R(N.linkId);f(N,[{valueBoolean:!w}])};return(0,n.jsx)("div",O(d({className:"flex flex-col gap-3"},M?{inert:""}:{}),{children:y.map(N=>{var w,V,q,I;const k=R(N.linkId),U=(w=N.extension)==null?void 0:w.find(ae=>ae.url===s.g4),F=(V=N.extension)==null?void 0:V.find(ae=>ae.url===s.rz),K=U?.valueString?s.JP[U.valueString]:void 0,G=(q=F?.valueString)!=null?q:"";return(0,n.jsx)(p,{icon:K?(0,n.jsx)(K,{className:"h-6 w-6"}):void 0,title:(I=N.text)!=null?I:"",description:G,selected:k,readOnly:S,onClick:S?void 0:()=>D(N)},N.linkId)})}))}},72866:(Y,l,e)=>{"use strict";e.d(l,{v:()=>i});var n=e(31085),t=e(94627),r=e(36087),s=e(25624);const o=({selected:a,onClick:g,label:c,readOnly:u})=>{const C=(0,r.cx)("rounded-sm border-2 px-3 py-2 text-sm font-medium transition-colors",u?"cursor-default":"cursor-pointer",a?"border-brand bg-brand-50 text-primary":"border-secondary bg-primary text-secondary",!u&&!a&&"hover:border-tertiary");return u?(0,n.jsx)("div",{className:C,children:c}):(0,n.jsx)("button",{type:"button",onClick:g,className:C,"aria-pressed":!!a,children:c})},i=({item:a,handleInputChange:g,formData:c})=>{var u;const C=(u=a.item)!=null?u:[],A=a.readOnly===!0,m=O=>{var p,b;if(!c)return!1;const h=(0,s.MU)(c,O);return((b=(p=h?.answer)==null?void 0:p[0])==null?void 0:b.valueBoolean)===!0},d=O=>{const p=m(O.linkId);g(O,[{valueBoolean:!p}])};return(0,n.jsxs)("div",{className:"flex flex-col gap-3",children:[a.text&&(0,n.jsx)("p",{className:"text-secondary text-sm",dangerouslySetInnerHTML:{__html:(0,t.p)(a.text)}}),(0,n.jsx)("div",{className:"flex flex-wrap gap-3",children:C.map(O=>{var p;const b=m(O.linkId);return(0,n.jsx)(o,{label:(p=O.text)!=null?p:"",selected:b,readOnly:A,onClick:A?void 0:()=>d(O)},O.linkId)})})]})}},65735:(Y,l,e)=>{"use strict";e.d(l,{d:()=>s});var n=e(31085),t=e(36087),r=e(1053);const s=({item:o})=>{var i,a,g,c;const u=o.text||"",C=(a=(i=o.extension)==null?void 0:i.find(d=>d.url===r.rz))==null?void 0:a.valueString,A=(c=(g=o.extension)==null?void 0:g.find(d=>d.url===r.g4))==null?void 0:c.valueString,m=A?r.JP[A]:void 0;return(0,n.jsxs)("div",{className:"bg-primary flex items-start gap-4 rounded-lg px-4 py-6 shadow-sm","data-testid":o.linkId,children:[m&&(0,n.jsx)(t.FeaturedIcon,{icon:m,color:"brand",size:"lg",className:"text-accent-600 size-14"}),(0,n.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-2",children:[(0,n.jsx)("p",{className:"text-primary text-lg font-semibold",children:u}),C&&(0,n.jsx)("p",{className:"text-secondary text-sm",children:C})]})]})}},18522:(Y,l,e)=>{"use strict";e.d(l,{c:()=>O});var n=e(31085),t=e(14041),r=e(8322),s=e(25624),o=Object.defineProperty,i=Object.defineProperties,a=Object.getOwnPropertyDescriptors,g=Object.getOwnPropertySymbols,c=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable,C=(b,h,f)=>h in b?o(b,h,{enumerable:!0,configurable:!0,writable:!0,value:f}):b[h]=f,A=(b,h)=>{for(var f in h||(h={}))c.call(h,f)&&C(b,f,h[f]);if(g)for(var f of g(h))u.call(h,f)&&C(b,f,h[f]);return b},m=(b,h)=>i(b,a(h));const d=(0,t.createContext)(void 0),O=()=>{const b=(0,t.useContext)(d);if(!b)throw new Error("useFHIRQuestionnaire must be used within an FHIRQuestionnaireProvider");return b},p=({children:b,analyticsConfig:h})=>{const{trackEvent:f}=useAnalytics(),[v,M]=useState(null),[x,T]=useState(null),[z,S]=useState(!1),[y,E]=useState(null),[R,P]=useState(-1),[L,D]=useState(!1),[N,w]=useState(-1),[V,q]=useState(!1),[I,k]=useState(0),[U,F]=useState(!1),[K,G]=useState(!1),ae=useRef([]),[oe,te]=useState(new Set),pe=useCallback(de=>{te(ue=>{const ne=new Set(ue);return ne.add(de),ne})},[]),be=useCallback(de=>{te(ue=>{const ne=new Set(ue);return ne.delete(de),ne})},[]),ze=useCallback(()=>{k(de=>de+1)},[]),ge=useCallback(de=>{F(de)},[]),re=useCallback(()=>{k(de=>Math.max(0,de-1))},[]),se=I>0,me=useCallback((de,ue,ne)=>{if(!h)return;const J=h[de];if(!J)return;let ve;if(Array.isArray(J))if(ne)ve=J.find(xe=>xe.inputType===ne);else{console.warn(`Multiple analytics configs found for linkId "${de}" but no inputType provided. Skipping tracking.`);return}else{if(ne&&J.inputType&&J.inputType!==ne)return;ve=J}if(!ve)return;let Ee=A({},ue);ve.valueTransform&&(Ee=Object.keys(ue).reduce((xe,Fe)=>{var it;const gt=(it=ve.valueTransform)==null?void 0:it[Fe];return xe[Fe]=gt?applyValueTransform(ue[Fe],gt):ue[Fe],xe},{}));let De=A({},Ee);ve.propertyMapping&&(De=Object.keys(Ee).reduce((xe,Fe)=>{var it;const gt=((it=ve.propertyMapping)==null?void 0:it[Fe])||Fe;return xe[gt]=Ee[Fe],xe},{}));const Se=ve.eventName,Ie=ve.description;f(Se,m(A(A({},De),ve.properties),{_event_metadata:Ie?{description:Ie}:void 0}))},[h,f]),he={isCurrentFormValid:z,currentGroupLinkId:y,currentGroupIndex:R,hideFooterButton:L,totalSteps:N,isLoading:V,isInlineNextQuestionTriggered:K,hasCustomError:se,analyticsConfig:h,hasExternalError:U,handleContinueButtonClick:v,handleBackButtonClick:x,setHandleContinueButtonClick:M,setHandleBackButtonClick:T,setIsCurrentFormValid:S,setCurrentGroupLinkId:E,setCurrentGroupIndex:P,setHideFooterButton:D,setTotalSteps:w,setIsLoading:q,setIsInlineNextQuestionTriggered:G,incrementCustomErrorCount:ze,decrementCustomErrorCount:re,errorLinkIds:oe,addErrorLinkId:pe,removeErrorLinkId:be,trackQuestionnaireEvent:me,setHasExternalError:ge,groupItemIndicesRef:ae};return jsx(d.Provider,{value:he,children:b})}},35473:(Y,l,e)=>{"use strict";var n=e(32957),t=e(18522),r=e(78912),s=e.n(r);e.o(r,"BWELL_STORED_TOKENS_KEY")&&e.d(l,{BWELL_STORED_TOKENS_KEY:function(){return r.BWELL_STORED_TOKENS_KEY}}),e.o(r,"LocationPermissionEnum")&&e.d(l,{LocationPermissionEnum:function(){return r.LocationPermissionEnum}}),e.o(r,"LocationType")&&e.d(l,{LocationType:function(){return r.LocationType}}),e.o(r,"SchedulingLocationCard")&&e.d(l,{SchedulingLocationCard:function(){return r.SchedulingLocationCard}}),e.o(r,"formatPhoneNumber")&&e.d(l,{formatPhoneNumber:function(){return r.formatPhoneNumber}}),e.o(r,"getInitials")&&e.d(l,{getInitials:function(){return r.getInitials}}),e.o(r,"removeAfterLastComma")&&e.d(l,{removeAfterLastComma:function(){return r.removeAfterLastComma}}),e.o(r,"shouldForceLogoutAfterAuthFailure")&&e.d(l,{shouldForceLogoutAfterAuthFailure:function(){return r.shouldForceLogoutAfterAuthFailure}}),e.o(r,"unformatPhoneNumber")&&e.d(l,{unformatPhoneNumber:function(){return r.unformatPhoneNumber}}),e.o(r,"useDebounce")&&e.d(l,{useDebounce:function(){return r.useDebounce}}),e.o(r,"useDeviceDetection")&&e.d(l,{useDeviceDetection:function(){return r.useDeviceDetection}}),e.o(r,"useRedirect")&&e.d(l,{useRedirect:function(){return r.useRedirect}}),e.o(r,"useSearchQueryParams")&&e.d(l,{useSearchQueryParams:function(){return r.useSearchQueryParams}});var o=e(25624),i=e(1053),a=e(7630),g=e(72866),c=e(65735)},61388:(Y,l,e)=>{"use strict";e.d(l,{n:()=>s});var n=e(31085),t=e(36087),r=e(33180);const s=({actionButtonText:o,onActionButtonClick:i,title:a,infoDetails:g})=>(0,n.jsxs)("div",{className:"bg-primary py-2xl px-lg rounded-2xl shadow-sm",children:[(0,n.jsxs)("div",{className:"gap-lg mb-2xl flex items-center justify-between",children:[(0,n.jsx)("p",{className:"text-primary text-md font-semibold",children:a}),o&&i&&(0,n.jsx)(t.Button,{color:"link-color",onClick:i,className:"text-link-primary hover:text-link-primary focus:text-link-primary focus-visible:text-link-primary",children:o})]}),(0,n.jsx)(r.InfoCardDetails,{infoDetails:g})]})},79286:()=>{},97257:(Y,l,e)=>{"use strict";e.d(l,{d:()=>o});var n=e(31085),t=e(94043),r=e(76323),s=e(36087);const o=({infoDetails:i,className:a})=>{const{redirectToBook:g,redirectToMap:c,redirectToUrl:u}=(0,r.useRedirect)(),C=(d,O,p)=>{d.preventDefault(),O.linkType==="phone"?g(p):O.linkType==="address"?c({address:p}):O.linkType==="url"&&O.link?u(O.link):O.link&&window.open(O.link,"_blank","noopener,noreferrer")},A=(d,O)=>{switch(O){case"phone":return(0,r.formatPhoneNumber)(d);default:return d}},m=(d,O)=>O.linkType||O.link?(0,n.jsx)(s.Button,{color:"link-color",onClick:p=>C(p,O,d),className:"text-md text-link-primary hover:text-link-primary focus:text-link-primary focus-visible:text-link-primary text-left font-normal! wrap-anywhere underline underline-offset-2",children:A(d,O.displayType)}):(0,n.jsx)("p",{className:"text-primary text-md m-0 wrap-anywhere",children:A(d,O.displayType)});return(0,n.jsx)("div",{className:(0,t.cx)("gap-2xl flex flex-col",a),children:i.map((d,O)=>{const p=d.Icon;return(0,n.jsxs)("div",{className:"gap-md flex items-start",children:[(0,n.jsx)(s.FeaturedIcon,{icon:(0,n.jsx)(p,{className:"text-fg-secondary"}),size:"lg",color:"gray"}),(0,n.jsxs)("div",{children:[(0,n.jsx)("p",{className:"text-tertiary m-0 mb-1 text-sm",children:d.label}),(()=>{const b=Array.isArray(d.value)?d.value:[d.value];return b.length>1?(0,n.jsx)("ul",{className:"m-0 list-disc pl-5",children:b.map((h,f)=>(0,n.jsx)("li",{className:"text-primary text-md font-medium",children:m(h,d)},f))}):m(b[0],d)})()]})]},O)})})}},71428:()=>{},3203:(Y,l,e)=>{"use strict";e.d(l,{InfoCardDetails:()=>n.d});var n=e(97257),t=e(71428),r=e.n(t);e.o(t,"BWELL_STORED_TOKENS_KEY")&&e.d(l,{BWELL_STORED_TOKENS_KEY:function(){return t.BWELL_STORED_TOKENS_KEY}}),e.o(t,"LocationPermissionEnum")&&e.d(l,{LocationPermissionEnum:function(){return t.LocationPermissionEnum}}),e.o(t,"LocationType")&&e.d(l,{LocationType:function(){return t.LocationType}}),e.o(t,"SchedulingLocationCard")&&e.d(l,{SchedulingLocationCard:function(){return t.SchedulingLocationCard}}),e.o(t,"formatPhoneNumber")&&e.d(l,{formatPhoneNumber:function(){return t.formatPhoneNumber}}),e.o(t,"getInitials")&&e.d(l,{getInitials:function(){return t.getInitials}}),e.o(t,"removeAfterLastComma")&&e.d(l,{removeAfterLastComma:function(){return t.removeAfterLastComma}}),e.o(t,"shouldForceLogoutAfterAuthFailure")&&e.d(l,{shouldForceLogoutAfterAuthFailure:function(){return t.shouldForceLogoutAfterAuthFailure}}),e.o(t,"unformatPhoneNumber")&&e.d(l,{unformatPhoneNumber:function(){return t.unformatPhoneNumber}}),e.o(t,"useDebounce")&&e.d(l,{useDebounce:function(){return t.useDebounce}}),e.o(t,"useDeviceDetection")&&e.d(l,{useDeviceDetection:function(){return t.useDeviceDetection}}),e.o(t,"useRedirect")&&e.d(l,{useRedirect:function(){return t.useRedirect}}),e.o(t,"useSearchQueryParams")&&e.d(l,{useSearchQueryParams:function(){return t.useSearchQueryParams}})},33180:(Y,l,e)=>{"use strict";e.d(l,{InfoCardDetails:()=>n.InfoCardDetails});var n=e(3203);e.o(n,"BWELL_STORED_TOKENS_KEY")&&e.d(l,{BWELL_STORED_TOKENS_KEY:function(){return n.BWELL_STORED_TOKENS_KEY}}),e.o(n,"LocationPermissionEnum")&&e.d(l,{LocationPermissionEnum:function(){return n.LocationPermissionEnum}}),e.o(n,"LocationType")&&e.d(l,{LocationType:function(){return n.LocationType}}),e.o(n,"SchedulingLocationCard")&&e.d(l,{SchedulingLocationCard:function(){return n.SchedulingLocationCard}}),e.o(n,"formatPhoneNumber")&&e.d(l,{formatPhoneNumber:function(){return n.formatPhoneNumber}}),e.o(n,"getInitials")&&e.d(l,{getInitials:function(){return n.getInitials}}),e.o(n,"removeAfterLastComma")&&e.d(l,{removeAfterLastComma:function(){return n.removeAfterLastComma}}),e.o(n,"shouldForceLogoutAfterAuthFailure")&&e.d(l,{shouldForceLogoutAfterAuthFailure:function(){return n.shouldForceLogoutAfterAuthFailure}}),e.o(n,"unformatPhoneNumber")&&e.d(l,{unformatPhoneNumber:function(){return n.unformatPhoneNumber}}),e.o(n,"useDebounce")&&e.d(l,{useDebounce:function(){return n.useDebounce}}),e.o(n,"useDeviceDetection")&&e.d(l,{useDeviceDetection:function(){return n.useDeviceDetection}}),e.o(n,"useRedirect")&&e.d(l,{useRedirect:function(){return n.useRedirect}}),e.o(n,"useSearchQueryParams")&&e.d(l,{useSearchQueryParams:function(){return n.useSearchQueryParams}})},27163:(Y,l,e)=>{"use strict";e.d(l,{InfoCard:()=>n.n});var n=e(61388),t=e(79286),r=e.n(t);e.o(t,"BWELL_STORED_TOKENS_KEY")&&e.d(l,{BWELL_STORED_TOKENS_KEY:function(){return t.BWELL_STORED_TOKENS_KEY}}),e.o(t,"LocationPermissionEnum")&&e.d(l,{LocationPermissionEnum:function(){return t.LocationPermissionEnum}}),e.o(t,"LocationType")&&e.d(l,{LocationType:function(){return t.LocationType}}),e.o(t,"SchedulingLocationCard")&&e.d(l,{SchedulingLocationCard:function(){return t.SchedulingLocationCard}}),e.o(t,"formatPhoneNumber")&&e.d(l,{formatPhoneNumber:function(){return t.formatPhoneNumber}}),e.o(t,"getInitials")&&e.d(l,{getInitials:function(){return t.getInitials}}),e.o(t,"removeAfterLastComma")&&e.d(l,{removeAfterLastComma:function(){return t.removeAfterLastComma}}),e.o(t,"shouldForceLogoutAfterAuthFailure")&&e.d(l,{shouldForceLogoutAfterAuthFailure:function(){return t.shouldForceLogoutAfterAuthFailure}}),e.o(t,"unformatPhoneNumber")&&e.d(l,{unformatPhoneNumber:function(){return t.unformatPhoneNumber}}),e.o(t,"useDebounce")&&e.d(l,{useDebounce:function(){return t.useDebounce}}),e.o(t,"useDeviceDetection")&&e.d(l,{useDeviceDetection:function(){return t.useDeviceDetection}}),e.o(t,"useRedirect")&&e.d(l,{useRedirect:function(){return t.useRedirect}}),e.o(t,"useSearchQueryParams")&&e.d(l,{useSearchQueryParams:function(){return t.useSearchQueryParams}});var s=e(33180);e.o(s,"BWELL_STORED_TOKENS_KEY")&&e.d(l,{BWELL_STORED_TOKENS_KEY:function(){return s.BWELL_STORED_TOKENS_KEY}}),e.o(s,"LocationPermissionEnum")&&e.d(l,{LocationPermissionEnum:function(){return s.LocationPermissionEnum}}),e.o(s,"LocationType")&&e.d(l,{LocationType:function(){return s.LocationType}}),e.o(s,"SchedulingLocationCard")&&e.d(l,{SchedulingLocationCard:function(){return s.SchedulingLocationCard}}),e.o(s,"formatPhoneNumber")&&e.d(l,{formatPhoneNumber:function(){return s.formatPhoneNumber}}),e.o(s,"getInitials")&&e.d(l,{getInitials:function(){return s.getInitials}}),e.o(s,"removeAfterLastComma")&&e.d(l,{removeAfterLastComma:function(){return s.removeAfterLastComma}}),e.o(s,"shouldForceLogoutAfterAuthFailure")&&e.d(l,{shouldForceLogoutAfterAuthFailure:function(){return s.shouldForceLogoutAfterAuthFailure}}),e.o(s,"unformatPhoneNumber")&&e.d(l,{unformatPhoneNumber:function(){return s.unformatPhoneNumber}}),e.o(s,"useDebounce")&&e.d(l,{useDebounce:function(){return s.useDebounce}}),e.o(s,"useDeviceDetection")&&e.d(l,{useDeviceDetection:function(){return s.useDeviceDetection}}),e.o(s,"useRedirect")&&e.d(l,{useRedirect:function(){return s.useRedirect}}),e.o(s,"useSearchQueryParams")&&e.d(l,{useSearchQueryParams:function(){return s.useSearchQueryParams}})},98549:(Y,l,e)=>{"use strict";var n=e(31085);const t=({currentStep:r,totalSteps:s})=>jsx(Stack,{"data-testid":"stepper",width:"100%",children:jsx(LinearProgress,{"aria-label":`Progress bar showing step ${r} of ${s}`,sx:{height:"2px",backgroundColor:"rgba(0,0,0,0.1)","& .MuiLinearProgress-bar":{backgroundColor:"accessibility.info",borderRadius:2}},value:r/s*100,variant:"determinate"})})},26877:(Y,l,e)=>{"use strict";e.d(l,{J:()=>M});var n=e(31085),t=e(14041);const r=({size:x=24,color:T="currentColor",...z})=>t.createElement("svg",{viewBox:"0 0 24 24",width:x,height:x,stroke:T,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...z},t.createElement("path",{d:"M3.413 10.745c-.595-.232-.893-.348-.98-.515a.5.5 0 0 1 0-.461c.087-.167.385-.283.98-.515L20.3 2.664c.537-.21.806-.315.978-.258a.5.5 0 0 1 .316.316c.057.172-.048.44-.258.977l-6.59 16.888c-.232.595-.348.893-.515.98a.5.5 0 0 1-.462 0c-.167-.088-.282-.385-.514-.98l-2.628-6.759a1.075 1.075 0 0 0-.107-.232.5.5 0 0 0-.116-.117 1.069 1.069 0 0 0-.232-.106l-6.759-2.628Z"}));r.displayName="NavigationPointer01";var s=e(8322),o=e(76808),i=e(92094),a=e(5380),g=e(54783),c=e(53151),u=e(85449),C=Object.defineProperty,A=Object.defineProperties,m=Object.getOwnPropertyDescriptors,d=Object.getOwnPropertySymbols,O=Object.prototype.hasOwnProperty,p=Object.prototype.propertyIsEnumerable,b=(x,T,z)=>T in x?C(x,T,{enumerable:!0,configurable:!0,writable:!0,value:z}):x[T]=z,h=(x,T)=>{for(var z in T||(T={}))O.call(T,z)&&b(x,z,T[z]);if(d)for(var z of d(T))p.call(T,z)&&b(x,z,T[z]);return x},f=(x,T)=>A(x,m(T)),v=(x,T,z)=>new Promise((S,y)=>{var E=L=>{try{P(z.next(L))}catch(D){y(D)}},R=L=>{try{P(z.throw(L))}catch(D){y(D)}},P=L=>L.done?S(L.value):Promise.resolve(L.value).then(E,R);P((z=z.apply(x,T)).next())});const M=({setLocationUpdating:x,title:T,description:z,isOpen:S,onClose:y})=>{const{locationPermission:E,position:R,requestPosition:P,setLocationPermission:L}=(0,u.GU)(),{trackEvent:D}=(0,s.st)(),{queryParams:N,setQueryParams:w}=(0,g.i)(),[V,q]=(0,t.useState)(!1),I=(0,c.s)(a.so.LAST_LOCATION_PROMPT),k=S!==void 0?S:V;(0,t.useEffect)(()=>{(k||S)&&D("location_permissions_modal_loaded",{_event_metadata:{description:"A user was presented with the location permissions modal."}})},[S,k,D]);const U=(0,t.useCallback)(be=>{w(f(h({},N),{location:be,locationType:a.iF.CURRENT_LOCATION,locationPermission:E||""}))},[E,N,w]),F=(0,t.useCallback)(()=>{S===void 0&&(!E||[a.Ef.GRANTED].includes(E)&&I.get()||[a.Ef.PROMPT].includes(E)&&I.get()&&R||q([a.Ef.PROMPT,a.Ef.GRANTED].includes(E)))},[S,E,I,R]);(0,t.useEffect)(()=>{F()},[F]);const K=(0,o.Ul)(),G=(0,t.useCallback)(()=>v(void 0,null,function*(){x&&x(!0);let be;try{be=yield P(),be&&U&&U(`${be.coords.latitude},${be.coords.longitude}`)}catch(ze){ze instanceof Error?K?.error(ze,"Error requesting location"):K?.error(`Error requesting location - ${JSON.stringify(ze)}`),S!==void 0&&y?y():q(!1)}return x&&x(!1),!!be}),[K,U,P,x,S,y]),ae=(0,t.useCallback)(()=>v(void 0,null,function*(){D("location_permissions_cta_clicked",{click:"Use my current location",_event_metadata:{description:"A user clicked continue an option on the location permissions modal."}}),S!==void 0&&y?y():q(!1),I.set(new Date().toISOString()),yield G()}),[D,S,y,I,G]),oe=(0,t.useCallback)(be=>{D("location_permissions_cta_clicked",{click:be==="close"?"X":"Search another way",_event_metadata:{description:"A user clicked continue an option on the location permissions modal."}}),L(a.Ef.DENIED),w(f(h({},N),{locationPermission:a.Ef.DENIED})),I.remove(),S!==void 0&&y?y():q(!1)},[D,L,w,N,I,S,y]),te=(0,t.useCallback)(()=>oe("close"),[oe]),pe=(0,t.useCallback)(()=>oe("cancel"),[oe]);return(0,n.jsx)(i.Modal,{id:"location-modal",isOpen:k,className:"sm:max-w-md",title:{content:T,tag:"h1"},featuredIcon:{icon:r,color:"brand",size:"lg"},description:{content:z},closeButton:{onCloseClick:te},primaryButton:{children:"Use my current location",onClick:ae},secondaryButton:{children:"Search another way",onClick:pe}})}},35471:(Y,l,e)=>{"use strict";var n=e(26877)},98741:(Y,l,e)=>{"use strict";var n=e(31085),t=e(14041),r=Object.defineProperty,s=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable,a=(C,A,m)=>A in C?r(C,A,{enumerable:!0,configurable:!0,writable:!0,value:m}):C[A]=m,g=(C,A)=>{for(var m in A||(A={}))o.call(A,m)&&a(C,m,A[m]);if(s)for(var m of s(A))i.call(A,m)&&a(C,m,A[m]);return C};const c=C=>{if(!C||typeof C!="object")throw new Error("Invalid animation data");const A=m=>{if(!m||typeof m!="object")return m;if(Array.isArray(m))return m.map(A);const d=g({},m);delete d.ef,delete d.expr,typeof d.x=="string"&&delete d.x;for(const O in d)typeof d[O]=="object"&&(d[O]=A(d[O]));return d};return A(C)},u=({animationData:C,loop:A=!0,autoplay:m=!0,className:d=""})=>{const O=useRef(null),p=useRef(null);return useEffect(()=>{if(!!O.current){try{const b=c(C);p.current=lottie.loadAnimation({container:O.current,renderer:"svg",loop:A,autoplay:m,animationData:b})}catch(b){console.error("Failed to load Lottie animation:",b)}return()=>{var b;(b=p.current)==null||b.destroy()}}},[C,A,m]),jsx("div",{ref:O,className:d})}},81304:(Y,l,e)=>{"use strict";e.d(l,{T:()=>u});var n=e(31085),t=e(14041),r=e(78628),s=e(66267);const o=C=>C*1609.34;var i=e(27419);const a={gray50:"#f9fafb",gray100:"#f3f4f6",blue100:"#dbeafe"};var g=e(92469);const c=({center:C,isLoading:A=!1,searchRadius:m,className:d,height:O="350px",width:p="100%",googleMapsApiKey:b,ariaLabel:h})=>{const f=(0,s.Bd)(),{isLoaded:v}=(0,r.KD)({googleMapsApiKey:b||""}),M={height:typeof O=="number"?`${O}px`:O,width:typeof p=="number"?`${p}px`:p},x=(0,t.useCallback)(z=>{google.maps.event.addListenerOnce(z,"idle",()=>{if(m&&C.lat&&C.lng){const y=new google.maps.Circle({center:{lat:C.lat,lng:C.lng},radius:o(m)}).getBounds();y&&z.fitBounds(y,0)}if(h){const y=z.getDiv().querySelector('[role="region"][aria-label="Map"]');y&&y.setAttribute("aria-label",h)}})},[C,m,h]);if(!v||A)return(0,n.jsx)("div",{className:(0,i.cx)("flex animate-pulse items-center justify-center rounded-lg bg-gray-200",d),style:M,children:(0,n.jsx)("div",{className:"text-sm text-gray-500",children:f("LOADING_MAP")})});if(!C.lat||!C.lng)return(0,n.jsx)("div",{className:(0,i.cx)("flex items-center justify-center rounded-lg border-2 border-dashed border-gray-300 bg-gray-100",d),style:M,children:(0,n.jsx)("div",{className:"text-sm text-gray-500",children:f("UNABLE_TO_LOAD_MAP_NO_LOCATION")})});const T={clickableIcons:!1,disableDefaultUI:!0,disableDoubleClickZoom:!0,styles:[{featureType:"poi",elementType:"labels",stylers:[{visibility:"off"}]},{featureType:"road",elementType:"geometry",stylers:[{color:a.gray50}]},{featureType:"landscape",elementType:"geometry",stylers:[{color:a.gray100}]},{featureType:"water",elementType:"geometry",stylers:[{color:a.blue100}]}]};return(0,n.jsx)("div",{className:(0,i.cx)("focus-within:ring-focus-ring overflow-hidden rounded-lg focus-within:ring-2 focus-within:ring-offset-2 [&_iframe]:outline-none",d),children:(0,n.jsx)(r.u6,{center:{lat:C.lat,lng:C.lng},mapContainerStyle:M,onLoad:x,options:T,zoom:12,children:(0,n.jsx)(g.I,{center:C})})})},u=(0,t.memo)(c)},82184:()=>{},53269:(Y,l,e)=>{"use strict";e.d(l,{Map:()=>n.T});var n=e(81304),t=e(82184),r=e.n(t);e.o(t,"BWELL_STORED_TOKENS_KEY")&&e.d(l,{BWELL_STORED_TOKENS_KEY:function(){return t.BWELL_STORED_TOKENS_KEY}}),e.o(t,"LocationPermissionEnum")&&e.d(l,{LocationPermissionEnum:function(){return t.LocationPermissionEnum}}),e.o(t,"LocationType")&&e.d(l,{LocationType:function(){return t.LocationType}}),e.o(t,"SchedulingLocationCard")&&e.d(l,{SchedulingLocationCard:function(){return t.SchedulingLocationCard}}),e.o(t,"formatPhoneNumber")&&e.d(l,{formatPhoneNumber:function(){return t.formatPhoneNumber}}),e.o(t,"getInitials")&&e.d(l,{getInitials:function(){return t.getInitials}}),e.o(t,"removeAfterLastComma")&&e.d(l,{removeAfterLastComma:function(){return t.removeAfterLastComma}}),e.o(t,"shouldForceLogoutAfterAuthFailure")&&e.d(l,{shouldForceLogoutAfterAuthFailure:function(){return t.shouldForceLogoutAfterAuthFailure}}),e.o(t,"unformatPhoneNumber")&&e.d(l,{unformatPhoneNumber:function(){return t.unformatPhoneNumber}}),e.o(t,"useDebounce")&&e.d(l,{useDebounce:function(){return t.useDebounce}}),e.o(t,"useDeviceDetection")&&e.d(l,{useDeviceDetection:function(){return t.useDeviceDetection}}),e.o(t,"useRedirect")&&e.d(l,{useRedirect:function(){return t.useRedirect}}),e.o(t,"useSearchQueryParams")&&e.d(l,{useSearchQueryParams:function(){return t.useSearchQueryParams}});var s=e(92469)},92469:(Y,l,e)=>{"use strict";e.d(l,{I:()=>r});var n=e(31085),t=e(78628);const r=({center:s})=>typeof s?.lat=="number"&&typeof s?.lng=="number"&&!isNaN(s.lat)&&!isNaN(s.lng)?(0,n.jsx)(t.pH,{clickable:!1,"data-testid":"marker-center",position:{lat:s.lat,lng:s.lng}}):null},43743:(Y,l,e)=>{"use strict";var n=e(31085),t=e(76323),r=e(36087);const s=({name:i,profileUrl:a,subTitle:g,variant:c="default",showChevron:u=!0,onClick:C,pendingText:A})=>{const m=!!A,d=!m&&!!C,O=u&&d;return jsxs("button",{type:"button",onClick:d?C:void 0,disabled:!d,className:cx("bg-primary border-primary flex w-full items-center justify-between gap-3 rounded-lg border p-4 text-left",c==="compact"&&"rounded-xl p-3",!O&&"justify-start",d?"cursor-pointer":"cursor-default",m&&"opacity-60"),children:[jsx(Avatar,{src:a,alt:i,size:"md",initials:getInitials(i),className:"[&>span]:text-secondary"}),jsxs("div",{className:"flex flex-col items-start",children:[jsx("span",{className:"text-sm font-semibold",children:i}),m?jsxs("span",{className:"text-secondary flex items-center gap-1.5 text-sm",children:[jsx(LoadingIndicator,{size:"xs"}),A]}):jsx("span",{className:"text-secondary text-sm",children:g})]}),O&&jsx(ChevronRight,{className:"text-quaternary ml-auto size-5"})]})},o=()=>jsx("div",{className:"bg-primary border-primary animate-pulse items-center justify-between rounded-lg border p-4",children:jsxs("div",{className:"flex items-center space-x-4",children:[jsx("div",{className:"h-10 w-10 rounded-full bg-gray-300"}),jsxs("div",{className:"flex-1 space-y-2",children:[jsx("div",{className:"h-4 w-3/4 rounded bg-gray-300"}),jsx("div",{className:"h-3 w-1/2 rounded bg-gray-300"})]})]})})},4062:(Y,l,e)=>{"use strict";var n=e(31085);const t=({children:s,content:o,fullImageHeader:i=!1,header:a,title:g})=>jsx("div",{className:"tw-preflight gap-lg flex h-full w-full items-center justify-center",children:jsxs("div",{className:"max-w-16xl flex h-fit w-full flex-col items-center justify-center self-center overflow-hidden rounded-2xl",children:[i?a:jsx("div",{className:"bg-utility-accent-100 mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg",children:a}),jsxs("div",{className:"gap-lg p-sm md:pb-2xl h-fit w-full md:p-[55px]",children:[jsxs("div",{className:"text-center",children:[jsx("h1",{className:"font-display text-primary mb-md px-5 text-3xl leading-[38px] font-normal tracking-tight",children:g}),o&&jsx("h2",{className:"font-body text-secondary leading-xl text-sm font-normal",children:o})]}),s]})]})}),r=null},51254:(Y,l,e)=>{"use strict";var n=e(31085),t=e(36087);const r=({title:s,description:o,icon:i})=>{var a;return jsxs("div",{className:"tw-preflight py-md gap-md flex h-fit w-full flex-row items-start",children:[jsx(FeaturedIcon,{icon:i.icon,color:(a=i.color)!=null?a:"brand",size:"lg",className:i.iconClassName}),jsxs("div",{className:"flex flex-col",children:[jsx("p",{className:"font-body leading-xl text-secondary text-sm font-semibold",children:s}),o&&jsx("p",{className:"font-body leading-xl text-secondary text-sm font-normal",children:o})]})]})}},69092:()=>{},33457:(Y,l,e)=>{"use strict";var n=e(51254),t=e(69092),r=e.n(t);e.o(t,"BWELL_STORED_TOKENS_KEY")&&e.d(l,{BWELL_STORED_TOKENS_KEY:function(){return t.BWELL_STORED_TOKENS_KEY}}),e.o(t,"LocationPermissionEnum")&&e.d(l,{LocationPermissionEnum:function(){return t.LocationPermissionEnum}}),e.o(t,"LocationType")&&e.d(l,{LocationType:function(){return t.LocationType}}),e.o(t,"SchedulingLocationCard")&&e.d(l,{SchedulingLocationCard:function(){return t.SchedulingLocationCard}}),e.o(t,"formatPhoneNumber")&&e.d(l,{formatPhoneNumber:function(){return t.formatPhoneNumber}}),e.o(t,"getInitials")&&e.d(l,{getInitials:function(){return t.getInitials}}),e.o(t,"removeAfterLastComma")&&e.d(l,{removeAfterLastComma:function(){return t.removeAfterLastComma}}),e.o(t,"shouldForceLogoutAfterAuthFailure")&&e.d(l,{shouldForceLogoutAfterAuthFailure:function(){return t.shouldForceLogoutAfterAuthFailure}}),e.o(t,"unformatPhoneNumber")&&e.d(l,{unformatPhoneNumber:function(){return t.unformatPhoneNumber}}),e.o(t,"useDebounce")&&e.d(l,{useDebounce:function(){return t.useDebounce}}),e.o(t,"useDeviceDetection")&&e.d(l,{useDeviceDetection:function(){return t.useDeviceDetection}}),e.o(t,"useRedirect")&&e.d(l,{useRedirect:function(){return t.useRedirect}}),e.o(t,"useSearchQueryParams")&&e.d(l,{useSearchQueryParams:function(){return t.useSearchQueryParams}})},77057:(Y,l,e)=>{"use strict";e.d(l,{i:()=>Qe});var n=e(31085),t=e(36087),r=e(14041);const s=({size:Ye=24,color:It="currentColor",...mn})=>r.createElement("svg",{viewBox:"0 0 24 24",width:Ye,height:Ye,stroke:It,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...mn},r.createElement("path",{d:"M9.5 7h5m-5 4h5m-5 4h5m3.5 6V6.2c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C16.48 3 15.92 3 14.8 3H9.2c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C6 4.52 6 5.08 6 6.2V21m14 0H4"}));s.displayName="Building04";var o=e(14449),i=e(14711),a=e(58139),g=e(37121),c=e(43144);function u(Ye){Ye()}let C=null;const A=Ye=>C=Ye,m=()=>C,d=(0,r.createContext)(null),O=null;function p(){return(0,r.useContext)(d)}let h=()=>{throw new Error("uSES not initialized!")};const f=Ye=>{h=Ye},v=(Ye,It)=>Ye===It;function M(Ye=d){const It=Ye===d?p:()=>(0,r.useContext)(Ye);return function(Sn,et=v){const{store:Rt,subscription:kt,getServerState:qn}=It(),Sr=h(kt.addNestedSub,Rt.getState,qn||Rt.getState,Sn,et);return(0,r.useDebugValue)(Sr),Sr}}const x=M();var T=e(75985),z=e(524);function S(){const Ye=getBatch();let It=null,mn=null;return{clear(){It=null,mn=null},notify(){Ye(()=>{let Sn=It;for(;Sn;)Sn.callback(),Sn=Sn.next})},get(){let Sn=[],et=It;for(;et;)Sn.push(et),et=et.next;return Sn},subscribe(Sn){let et=!0,Rt=mn={callback:Sn,next:null,prev:mn};return Rt.prev?Rt.prev.next=Rt:It=Rt,function(){!et||It===null||(et=!1,Rt.next?Rt.next.prev=Rt.prev:mn=Rt.prev,Rt.prev?Rt.prev.next=Rt.next:It=Rt.next)}}}}const y={notify(){},get:()=>[]};function E(Ye,It){let mn,Sn=y;function et(mr){return Sr(),Sn.subscribe(mr)}function Rt(){Sn.notify()}function kt(){Ln.onStateChange&&Ln.onStateChange()}function qn(){return Boolean(mn)}function Sr(){mn||(mn=It?It.addNestedSub(kt):Ye.subscribe(kt),Sn=S())}function pn(){mn&&(mn(),mn=void 0,Sn.clear(),Sn=y)}const Ln={addNestedSub:et,notifyNestedSubs:Rt,handleChangeWrapper:kt,isSubscribed:qn,trySubscribe:Sr,tryUnsubscribe:pn,getListeners:()=>Sn};return Ln}const R=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",P=null,L=null;let D=null;const N=Ye=>{D=Ye},w=null,V=null,q=Ye=>{try{return JSON.stringify(Ye)}catch{return String(Ye)}};function I(Ye,It,mn){useIsomorphicLayoutEffect(()=>Ye(...It),mn)}function k(Ye,It,mn,Sn,et,Rt){Ye.current=Sn,mn.current=!1,et.current&&(et.current=null,Rt())}function U(Ye,It,mn,Sn,et,Rt,kt,qn,Sr,pn,Ln){if(!Ye)return()=>{};let mr=!1,Bn=null;const Xr=()=>{if(mr||!qn.current)return;const Nt=It.getState();let _e,ot;try{_e=Sn(Nt,et.current)}catch(Je){ot=Je,Bn=Je}ot||(Bn=null),_e===Rt.current?kt.current||pn():(Rt.current=_e,Sr.current=_e,kt.current=!0,Ln())};return mn.onStateChange=Xr,mn.trySubscribe(),Xr(),()=>{if(mr=!0,mn.tryUnsubscribe(),mn.onStateChange=null,Bn)throw Bn}}const F=()=>w;function K(Ye,It){return Ye===It}let G=!1;function ae(Ye,It,mn,{pure:Sn,areStatesEqual:et=K,areOwnPropsEqual:Rt=shallowEqual,areStatePropsEqual:kt=shallowEqual,areMergedPropsEqual:qn=shallowEqual,forwardRef:Sr=!1,context:pn=ReactReduxContext}={}){const Ln=pn,mr=mapStateToPropsFactory(Ye),Bn=mapDispatchToPropsFactory(It),Xr=mergePropsFactory(mn),Qr=Boolean(Ye);return _e=>{const ot=_e.displayName||_e.name||"Component",Je=`Connect(${ot})`,tt={shouldHandleStateChanges:Qr,displayName:Je,wrappedComponentName:ot,WrappedComponent:_e,initMapStateToProps:mr,initMapDispatchToProps:Bn,initMergeProps:Xr,areStatesEqual:et,areStatePropsEqual:kt,areOwnPropsEqual:Rt,areMergedPropsEqual:qn};function rt(st){const[le,ye,Ue]=useMemo(()=>{const{reactReduxForwardedRef:zn}=st,gn=_objectWithoutPropertiesLoose(st,L);return[st.context,zn,gn]},[st]),Te=useMemo(()=>le&&le.Consumer&&isContextConsumer(React.createElement(le.Consumer,null))?le:Ln,[le,Ln]),Tt=useContext(Te),Zt=Boolean(st.store)&&Boolean(st.store.getState)&&Boolean(st.store.dispatch),vn=Boolean(Tt)&&Boolean(Tt.store),_n=Zt?st.store:Tt.store,Ar=vn?Tt.getServerState:_n.getState,Ft=useMemo(()=>defaultSelectorFactory(_n.dispatch,tt),[_n]),[we,Ze]=useMemo(()=>{if(!Qr)return V;const zn=createSubscription(_n,Zt?void 0:Tt.subscription),gn=zn.notifyNestedSubs.bind(zn);return[zn,gn]},[_n,Zt,Tt]),At=useMemo(()=>Zt?Tt:_extends({},Tt,{subscription:we}),[Zt,Tt,we]),Gt=useRef(),Yt=useRef(Ue),rn=useRef(),$n=useRef(!1),Vr=useRef(!1),Lt=useRef(!1),Et=useRef();useIsomorphicLayoutEffect(()=>(Lt.current=!0,()=>{Lt.current=!1}),[]);const bt=useMemo(()=>()=>rn.current&&Ue===Yt.current?rn.current:Ft(_n.getState(),Ue),[_n,Ue]),qt=useMemo(()=>gn=>we?U(Qr,_n,we,Ft,Yt,Gt,$n,Lt,rn,Ze,gn):()=>{},[we]);I(k,[Yt,Gt,$n,Ue,rn,Ze]);let hn;try{hn=D(qt,bt,Ar?()=>Ft(Ar(),Ue):bt)}catch(zn){throw Et.current&&(zn.message+=`
|
|
872
872
|
The error may be correlated with this previous error:
|
package/native.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as a}from"react/jsx-runtime";import{ComponentView as o}from"@icanbwell/native-components";var s="@icanbwell/composite",p="1.1161.
|
|
1
|
+
import{jsx as a}from"react/jsx-runtime";import{ComponentView as o}from"@icanbwell/native-components";var s="@icanbwell/composite",p="1.1161.1",c="icanbwell",v="module",l="index.js",m="types/index.d.ts",b="UNLICENSED",d={url:"https://github.com/icanbwell/ui-platform.git"},y={"*":{native:["types/native.d.ts"]}},u={lint:"eslint .","lint:eslint":"npm run lint"},w={"@icanbwell/native-components":"6.14.2"},f={react:"^17.0.0 || ^18.0.0","react-dom":"^17.0.0 || ^18.0.0","react-native":"^0.71.2","react-native-webview":"^11.4.2"},O={"react-native":{optional:!0},react:{optional:!0},"react-dom":{optional:!0},"react-native-webview":{optional:!0}},j="0.1420.1",D="@icanbwell/composite. repo version: 0.1420.1",V={name:s,version:p,author:c,type:v,main:l,types:m,license:b,repository:d,typesVersions:y,scripts:u,dependencies:w,peerDependencies:f,peerDependenciesMeta:O,repoVersion:j,description:D};const g="composite";var h=Object.defineProperty,P=Object.defineProperties,x=Object.getOwnPropertyDescriptors,n=Object.getOwnPropertySymbols,C=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable,i=(r,e,t)=>e in r?h(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,M=(r,e)=>{for(var t in e||(e={}))C.call(e,t)&&i(r,t,e[t]);if(n)for(var t of n(e))E.call(e,t)&&i(r,t,e[t]);return r},N=(r,e)=>P(r,x(e));const I=r=>a(o,N(M({},r),{version:V.version,name:g}));export{I as Composite};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@icanbwell/composite",
|
|
3
|
-
"version": "1.1161.
|
|
3
|
+
"version": "1.1161.1",
|
|
4
4
|
"author": "icanbwell",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -43,6 +43,6 @@
|
|
|
43
43
|
"optional": true
|
|
44
44
|
}
|
|
45
45
|
},
|
|
46
|
-
"repoVersion": "0.1420.
|
|
47
|
-
"description": "@icanbwell/composite. repo version: 0.1420.
|
|
46
|
+
"repoVersion": "0.1420.1",
|
|
47
|
+
"description": "@icanbwell/composite. repo version: 0.1420.1"
|
|
48
48
|
}
|