1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._posthogChunkIds=e._posthogChunkIds||{},e._posthogChunkIds[n]="01a0cef7-9b98-7111-bc50-0753c25d192b")}catch(e){}}();"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6551],{96306(e,t,a){a.d(t,{A:()=>le});var l=a(63696),n=a(27167),s=a(17243),r=a(19720),o=a(11583),i=a(55578),c=a(48600),d=a(80903),m=a(39453),w=a(68546),u=a(29401),h=a(23533),p=a(16125),f=a(11956),v=a(21811),g=a(66876),E=a(27825),b=a(86289),y=a(28098);const x=({value:e,label:t,isLoading:a,onClick:n})=>{const s=l.createElement(l.Fragment,null,a?l.createElement(y.E,{className:"tw-mx-auto tw-h-7 tw-w-12 tw-bg-white/30"}):l.createElement("div",{className:"tw-text-xl tw-font-bold tw-leading-tight tw-text-white"},e),l.createElement("div",{className:"tw-mt-1 tw-text-sm tw-font-medium tw-text-white/70"},t));return n?l.createElement("button",{type:"button",onClick:n,className:(0,f.cn)("tw-rounded-xl tw-bg-white/10 tw-px-3 tw-py-4 tw-text-center","tw-cursor-pointer tw-border tw-border-white/10 tw-transition-colors hover:tw-bg-white/20","focus:tw-outline-none focus-visible:tw-ring-2 focus-visible:tw-ring-white/60")},s):l.createElement("div",{className:"tw-rounded-xl tw-border tw-border-white/10 tw-bg-white/10 tw-px-3 tw-py-4 tw-text-center"},s)},N=({profile:e,stats:t,isStatsLoading:a,onClickCheckIns:n,onAvatarUpload:s,onAvatarRemove:r,isAvatarUploading:o,onClose:i,onDelete:c})=>{const d=e.getAvatarUrl(),m=e.getInitials();return l.createElement("section",{className:"tw-relative tw-rounded-xl tw-border tw-border-gray-200 tw-bg-black tw-px-6 tw-py-6"},i&&l.createElement("button",{type:"button",className:"tw-absolute tw-right-3 tw-top-3 tw-p-1 tw-text-white tw-bg-transparent tw-border-none tw-transition-transform hover:tw-scale-125",onClick:i,"aria-label":"Close"},l.createElement(v.A,{className:"tw-h-5 tw-w-5"})),l.createElement("div",{className:"tw-flex tw-flex-col tw-items-center"},l.createElement("div",{className:"avatar-glow avatar-breathe"},l.createElement(b.A,{avatarUrl:d,alt:e.getName(),fallback:m,onUpload:s,cropBeforeUpload:!0,onRemove:r,isUploading:o,showLabel:!0,className:"tw-h-[150px] tw-w-[150px] tw-bg-white tw-shadow-lg",fallbackClassName:"tw-bg-white tw-text-3xl tw-font-semibold tw-text-gray-700"})),l.createElement("h1",{className:"tw-mt-4 tw-text-xl tw-font-bold tw-text-white"},e.getName()||"Unnamed"),e.email?l.createElement("p",{className:"tw-mt-1 tw-text-sm tw-text-white/80"},e.email):null),l.createElement("div",{className:"tw-mt-6 tw-grid tw-grid-cols-3 tw-gap-3"},l.createElement(x,{value:t.checkIns,label:"Check-ins",isLoading:a,onClick:n}),l.createElement(x,{value:t.totalTimeLabel,label:"Total Time",isLoading:a}),l.createElement(x,{value:t.avgLabel,label:"Avg per Check-in",isLoading:a})),l.createElement("div",{className:"tw-mt-5 tw-flex tw-justify-center tw-gap-4"},l.createElement("button",{type:"button",onClick:n,className:"tw-flex tw-h-12 tw-w-12 tw-items-center tw-justify-center tw-rounded-xl tw-border tw-border-white/20 tw-bg-transparent tw-text-white tw-transition-colors hover:tw-bg-white/10",title:"Attendance History","aria-label":"Attendance History"},l.createElement(g.A,{className:"tw-h-6 tw-w-6"})),l.createElement("button",{type:"button",className:"tw-flex tw-h-12 tw-w-12 tw-items-center tw-justify-center tw-rounded-xl tw-border tw-border-red-500 tw-bg-transparent tw-text-red-500 tw-transition-colors hover:tw-bg-red-500/10",title:"Archive","aria-label":"Archive",onClick:c},l.createElement(E.A,{className:"tw-h-6 tw-w-6"}))))};var k=a(51196),C=a(64199),S=a(67201),A=a(93354),M=a(84095),D=a(13461),O=a(64587),F=a(82519),P=a(26782);const I=e=>e instanceof m.LG?e.getFormattedMessage():e instanceof Error?e.message:"An unknown error occurred";class L extends l.Component{constructor(e){super(e),this.state={isLoading:!0,passes:[],error:void 0,visibleModal:void 0},this.loadPasses=this.loadPasses.bind(this),this.openCreateModal=this.openCreateModal.bind(this),this.openViewAllModal=this.openViewAllModal.bind(this),this.closeModal=this.closeModal.bind(this),this.handleModalReload=this.handleModalReload.bind(this)}componentDidMount(){this.loadPasses()}componentDidUpdate(e){e.profile.id!==this.props.profile.id&&(this.setState({isLoading:!0,passes:[],error:void 0,visibleModal:void 0}),this.loadPasses())}async loadPasses(){this.setState({isLoading:!0,error:void 0});try{const e=await A.Ay.fetchPassports({profileId:this.props.profile.id,sortBy:"type"});this.setState({passes:e,isLoading:!1})}catch(e){console.error("[PassesSection]","loadPasses",e),this.setState({error:I(e),isLoading:!1})}}openCreateModal(){this.setState({visibleModal:"create"})}openViewAllModal(){this.setState({visibleModal:"viewAll"})}closeModal(){this.setState({visibleModal:void 0})}handleModalReload(){this.closeModal(),this.loadPasses()}render(){const{profile:e}=this.props,{passes:t,isLoading:a,error:n,visibleModal:s}=this.state,o=t[0];return l.createElement("section",{className:"tw-rounded-xl tw-border tw-border-gray-200 tw-bg-white tw-px-6 tw-py-6"},l.createElement("div",{className:"tw-mb-4 tw-flex tw-items-center tw-justify-between tw-gap-2"},l.createElement("h2",{className:"tw-m-0 tw-text-base tw-font-bold tw-text-gray-900"},"Passes"),l.createElement("div",{className:"tw-flex tw-items-center tw-gap-2"},l.createElement(F.$,{type:"button",size:"icon",onClick:this.openCreateModal,className:"tw-h-8 tw-w-8 tw-bg-gray-900 tw-text-white hover:tw-bg-gray-900/90"},l.createElement(S.A,{className:"tw-h-4 tw-w-4"})),t.length>0&&l.createElement("div",{className:"tw-relative"},l.createElement("span",{className:"tw-absolute -tw-right-2 -tw-top-2 tw-flex tw-h-5 tw-min-w-5 tw-items-center tw-justify-center tw-rounded-full tw-bg-gray-900 tw-px-1 tw-text-xs tw-font-medium tw-text-white"},t.length),l.createElement(F.$,{type:"button",variant:"outline",size:"sm",onClick:this.openViewAllModal},"View All")))),a&&l.createElement("div",{className:"tw-space-y-3"},l.createElement(y.E,{className:"tw-mx-auto tw-h-40 tw-w-40"}),l.createElement(y.E,{className:"tw-mx-auto tw-h-4 tw-w-1/2"})),!a&&n&&l.createElement(p.Fc,{variant:"destructive"},l.createElement(r.A,{className:"tw-h-4 tw-w-4"}),l.createElement(p.XL,null,"Could not load passes"),l.createElement(p.TN,null,n)),!a&&!n&&o&&(()=>{const e=Math.min(t.length-1,2);return l.createElement("div",{className:"tw-flex tw-flex-col tw-items-center tw-gap-3"},l.createElement("div",{className:"tw-relative",style:{paddingBottom:10*e}},Array.from({length:e}).map((e,t)=>l.createElement("div",{key:t,className:"tw-absolute tw-rounded-xl tw-border tw-border-gray-200 tw-bg-white",style:{inset:0,top:10*(t+1)}})),l.createElement("div",{className:"tw-relative tw-rounded-xl tw-border tw-border-gray-200 tw-bg-white tw-p-4"},l.createElement(O.A,{pass:o,qrSize:160,hideBarcodeBottomText:!0}))),l.createElement("div",{className:"tw-flex tw-flex-col tw-items-center tw-gap-1 tw-text-center"},l.createElement("p",{className:"tw-mb-0 tw-text-sm tw-font-medium tw-text-gray-900"},o.getName()),null!=o.archivedAt&&l.createElement(P.E,{variant:"destructive"},"Archived")))})(),!a&&!n&&!o&&l.createElement("p",{className:"tw-text-sm tw-text-gray-500"},"No passes yet."),"create"===s&&l.createElement(M.A,{isOpen:!0,toggle:this.closeModal,profileId:e.id,onCreatePass:this.handleModalReload}),"viewAll"===s&&l.createElement(D.A,{isOpen:!0,onClose:this.closeModal,profile:e,passes:t,onPassesUpdated:this.loadPasses}))}}var R=a(64186),U=a(81829),j=a(11477),T=a(14437);const V="[useSuggestions]",$=({profile:e,onMerged:t,onDismiss:a})=>{const{suggestions:n,isLoading:s,reload:r}=(({profileId:e,profileName:t})=>{const[a,n]=(0,l.useState)([]),[s,r]=(0,l.useState)(!1),[i,d]=(0,l.useState)(void 0),[m,w]=(0,l.useState)(null),[u,h]=(0,l.useState)(new Set),p=(0,l.useCallback)(()=>
1{if(!t)return n([]),void r(!1);r(!0),d(void 0),c.Ay.searchProfiles(new c.AL({searchText:t,pageSize:5,pageNumber:0})).then(t=>{n(t.objects.filter(t=>t.id!==e))}).catch(e=>{console.error(V,"searchProfiles",e),d(e instanceof Error?e.message:"Failed to load suggestions")}).finally(()=>{r(!1)})},[e,t]);(0,l.useEffect)(()=>{p()},[p]);const f=(0,l.useCallback)(async t=>{w(t.id);try{await new c.Ay(t).mergeProfileInto(e),h(e=>new Set(e).add(t.id))}catch(e){console.error(V,"mergeProfileInto",e),o.oR.error("Failed to start profile merge")}finally{w(null)}},[e]);return{suggestions:(0,l.useMemo)(()=>a.filter(e=>!u.has(e.id)),[a,u]),isLoading:s,error:i,mergingId:m,merge:f,reload:p}})({profileId:e.id,profileName:e.getName()}),[i,d]=(0,l.useState)(!1),m=(0,l.useCallback)(()=>{d(!1)},[]),w=(0,l.useCallback)(()=>{d(!1),r(),null==t||t()},[r,t]);if(s||0===n.length)return null;const u=1===n.length,p=n[0],f=n.slice(0,2).map(e=>e.getName()||"Unnamed"),v=n.length-2;let g;return g=n.length<=2?f.join(", "):`${f.join(", ")} & ${v} more`,l.createElement("section",{className:"tw-relative tw-rounded-xl tw-border tw-border-dashed tw-border-gray-400 tw-bg-white tw-px-6 tw-py-8"},a&&l.createElement(j.A,{onClick:a,variant:"default",className:"tw-absolute tw-top-4 tw-right-4",ariaLabel:"Dismiss suggestions"}),l.createElement("div",{className:"tw-flex tw-flex-col tw-items-center tw-gap-1"},u?l.createElement(l.Fragment,null,l.createElement(b.A,{avatarUrl:p.getAvatarUrl(),alt:p.getName(),fallback:p.getInitials(),className:"tw-h-20 tw-w-20",color:"gray"}),l.createElement("span",{className:"tw-block tw-text-lg tw-font-bold tw-text-gray-900 tw-mt-2"},p.getName()||"Unnamed"),p.email&&l.createElement("span",{className:"tw-block tw-text-base tw-text-muted-foreground"},p.email),p.phone&&l.createElement("span",{className:"tw-block tw-text-base tw-text-muted-foreground"},T.p.toHumanFormatted(p.phone)),l.createElement("span",{className:"tw-block tw-text-base tw-text-muted-foreground"},"Possible duplicate profile")):l.createElement(l.Fragment,null,l.createElement("div",{className:"tw-flex tw-items-center tw-justify-center"},n.slice(0,3).map((e,t)=>l.createElement("div",{key:e.id,className:"tw-rounded-full tw-border-2 tw-border-white",style:{marginLeft:t>0?"-12px":0,zIndex:3-t}},l.createElement(b.A,{avatarUrl:e.getAvatarUrl(),alt:e.getName(),fallback:e.getInitials(),className:"tw-h-14 tw-w-14",color:"gray"})))),l.createElement("span",{className:"tw-block tw-text-lg tw-font-bold tw-text-gray-900 tw-mt-2"},g),l.createElement("span",{className:"tw-block tw-text-base tw-text-muted-foreground"},"Possible duplicate profiles")),l.createElement(F.$,{variant:"default",size:"lg",className:"tw-mt-1 tw-rounded-xl tw-px-8",onClick:()=>d(!0)},u?"Merge":"Merge All")),i&&l.createElement(h.A,{profile:e,isOpen:i,toggle:m,reload:w}))},J=()=>l.createElement("div",{className:"tw-space-y-4 tw-px-4 tw-pt-4"},l.createElement("div",{className:"tw-rounded-xl tw-border tw-border-gray-200 tw-bg-black tw-px-6 tw-py-6"},l.createElement("div",{className:"tw-flex tw-flex-col tw-items-center"},l.createElement(y.E,{className:"tw-h-[150px] tw-w-[150px] tw-rounded-full tw-bg-white/10"}),l.createElement(y.E,{className:"tw-mt-4 tw-h-6 tw-w-36 tw-bg-white/10"}),l.createElement(y.E,{className:"tw-mt-2 tw-h-4 tw-w-48 tw-bg-white/10"})),l.createElement("div",{className:"tw-mt-6 tw-grid tw-grid-cols-3 tw-gap-3"},l.createElement(y.E,{className:"tw-h-[72px] tw-rounded-xl tw-bg-white/10"}),l.createElement(y.E,{className:"tw-h-[72px] tw-rounded-xl tw-bg-white/10"}),l.createElement(y.E,{className:"tw-h-[72px] tw-rounded-xl tw-bg-white/10"}))),l.createElement("div",{className:"tw-rounded-xl tw-border tw-border-gray-200 tw-bg-white tw-px-6 tw-py-6"},l.createElement(y.E,{className:"tw-mb-4 tw-h-5 tw-w-28"}),l.createElement("div",{className:"tw-space-y-5"},[...Array(5)].map((e,t)=>l.createElement("div",{key:t,className:"tw-flex tw-items-center tw-gap-4"},l.createElement(y.E,{className:"tw-h-4 tw-w-28 tw-shrink-0"}),l.createElement(y.E,{className:"tw-h-10 tw-flex-1"}))))));var q=a(24076),z=Object.defineProperty,Y=Object.defineProperties,W=Object.getOwnPropertyDescriptors,_=Object.getOwnPropertySymbols,B=Object.prototype.hasOwnProperty,H=Object.prototype.propertyIsEnumerable,G=(e,t,a)=>t in e?z(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,Q=(e,t)=>{for(var a in t||(t={}))B.call(t,a)&&G(e,a,t[a]);if(_)for(var a of _(t))H.call(t,a)&&G(e,a,t[a]);return e};const X="[Feature: ProfileDetailsPage]",Z={checkIns:0,totalTimeLabel:"0 min",avgLabel:"0 min"},K=e=>e instanceof m.LG?e.getFormattedMessage():e instanceof Error?e.message:"An unknown error occurred",ee=(e,t)=>
1{const a=Object.assign(Object.create(Object.getPrototypeOf(e)),e);return a.update(t),a};class te extends l.Component{constructor(e){super(e),this.isMounted_=!1,this.state={profile:void 0,pendingPatch:{},isFetching:!0,fetchError:void 0,stats:Z,recentCheckIns:[],isStatsLoading:!0,isSaving:!1,saveError:void 0,isAvatarUploading:!1,activeModal:"None",fieldPreferences:i.Ay.loadFromLocalStorage()||new i.Ay,suggestionsDismissed:!1},this.loadProfile=this.loadProfile.bind(this),this.loadStats=this.loadStats.bind(this),this.handlePatch=this.handlePatch.bind(this),this.handleCustomFieldSaved=this.handleCustomFieldSaved.bind(this),this.handleAvatarUpload=this.handleAvatarUpload.bind(this),this.handleAvatarRemove=this.handleAvatarRemove.bind(this),this.flushSave=this.flushSave.bind(this),this.renderPlaceholderSection=this.renderPlaceholderSection.bind(this),this.renderBody=this.renderBody.bind(this),this.debouncedSave=(0,s.debounce)(this.flushSave,600),this.handleOpenPreviewModal=this.handleOpenPreviewModal.bind(this),this.handleClosePreviewModal=this.handleClosePreviewModal.bind(this),this.handlePreviewSaved=this.handlePreviewSaved.bind(this),this.handleOpenDeleteModal=this.handleOpenDeleteModal.bind(this),this.handleCloseDeleteModal=this.handleCloseDeleteModal.bind(this),this.handleOpenMergeFromDelete=this.handleOpenMergeFromDelete.bind(this),this.handleCloseMergeModal=this.handleCloseMergeModal.bind(this),this.handleMerged=this.handleMerged.bind(this),this.handleProfileDeleted=this.handleProfileDeleted.bind(this)}componentDidMount(){this.isMounted_=!0,this.loadProfile(),this.loadStats()}componentDidUpdate(e){e.profileId!==this.props.profileId&&(this.debouncedSave.cancel(),this.setState({pendingPatch:{},isFetching:!0,fetchError:void 0,stats:Z,recentCheckIns:[],isStatsLoading:!0,saveError:void 0,isAvatarUploading:!1}),this.loadProfile(),this.loadStats())}componentWillUnmount(){this.debouncedSave.flush(),this.isMounted_=!1}safeSetState(e){this.isMounted_&&this.setState(e)}async loadProfile(){const{profileId:e}=this.props;this.safeSetState({isFetching:!0,fetchError:void 0});try{const t=await c.Ay.fetchProfile(e);this.safeSetState({profile:t,isFetching:!1,fetchError:void 0})}catch(e){console.error(X,"fetchProfile",e),this.safeSetState({fetchError:K(e),isFetching:!1})}}async loadStats(){const{profileId:e}=this.props;this.safeSetState({isStatsLoading:!0});try{const{stats:t,recentCheckIns:a}=await c.Ay.fetchProfileStats(e,{includeArchived:!0});this.safeSetState({stats:{checkIns:t.totalCheckIns,totalTimeLabel:(0,d.a)(t.totalElapsedTime),avgLabel:(0,d.a)(t.avgElapsedTime)},recentCheckIns:a,isStatsLoading:!1})}catch(e){console.error(X,"fetchProfileStats",e),this.safeSetState({stats:Z,isStatsLoading:!1})}}handlePatch(e){const{profile:t}=this.state;t&&this.setState(t=>({profile:ee(t.profile,e),pendingPatch:Q(Q({},t.pendingPatch),e),saveError:void 0}),()=>this.debouncedSave())}handleCustomFieldSaved(e,t){this.setState(a=>{if(!a.profile)return null;const l=ee(a.profile,{});var n;return l.customFields=(n=Q({},a.profile.getCustomFields()),Y(n,W({[e]:t}))),{profile:l}},()=>{var e,t;this.state.profile&&(null==(t=(e=this.props).onSaved)||t.call(e,this.state.profile))})}async handleAvatarUpload(e){var t,a;const{profile:l,isAvatarUploading:n}=this.state;if(l&&!n){this.setState({isAvatarUploading:!0});try{const n=await new c.Ay(l).uploadAvatar(e);this.safeSetState({profile:n,isAvatarUploading:!1}),o.oR.success("Avatar updated"),null==(a=(t=this.props).onSaved)||a.call(t,n)}catch(e){console.error(X,"uploadAvatar",e),this.safeSetState({isAvatarUploading:!1}),o.oR.error(K(e))}}}async handleAvatarRemove(){var e,t;const{profile:a,isAvatarUploading:l}=this.state;if(a&&!l){this.setState({isAvatarUploading:!0});try{await new c.Ay(a).deleteAvatar();const l=ee(a,{});l.avatarURL=void 0,this.safeSetState({profile:l,isAvatarUploading:!1}),o.oR.success("Avatar removed"),null==(t=(e=this.props).onSaved)||t.call(e,l)}catch(e){console.error(X,"deleteAvatar",e),this.safeSetState({isAvatarUploading:!1}),o.oR.error(K(e))}}}async flushSave(){var e,t;const{profile:a,pendingPatch:l,isSaving:n}=this.state;if(a&&!n&&0!==Object.keys(l).length){this.setState({isSaving:!0,pendingPatch:{},saveError:void 0});try{const n=await new c.Ay(a).updateProfile(a),s=this.state.pendingPatch,r=Object.keys(s).length>0;this.safeSetState({profile:ee(n,Q(Q({},l),s)),isSaving:!1,saveError:void 0}),o.oR.success("Saved"),null==(t=(e=this.props).onSaved)||t.call(e,n),r&&this.debouncedSave()}catch(e){console.error(X,"updateProfile",e);const t=K(e);this.safeSetState({isSaving:!1,saveError:t}),o.oR.error(t)}}}handleOpenPreviewModal(){this.setState({activeModal:"Preview"})}handleClosePreviewModal(){this.setState({activeModal:"None"})}handlePreviewSaved(e){this.setState({fieldPreferences:e})}handleOpenDeleteModal(){this.setState({activeModal:"Delete"})}handleCloseDeleteModal(){this.setState({activeModal:"None"})}handleOpenMergeFromDelete(){this.setState({activeModal:"Merge"})}handleCloseMergeModal(){this.setState({activeModal:"None"})}handleMerged(){var e,t,a,l;null==(t=(e=this.props).onMerged)||t.call(e),null==(l=(a=this.props).onClose)||l.call(a)}handleProfileDeleted(){var e,t,a,l;this.setState({activeModal:"None"}),o.oR.success("Profile deleted successfully"),null==(t=(e=this.props).onDeleted)||t.call(e),null==(l=(a=this.props).onClose)||l.call(a)}renderPlaceholderSection(e){return l.createElement("section",{key:e,className:"tw-rounded-xl tw-border tw-border-gray-200 tw-bg-white tw-px-6 tw-py-6"},l.createElement("h2",{className:"tw-text-base tw-font-bold tw-text-gray-900"},e),l.createElement("p",{className:"tw-mt-2 tw-text-sm tw-text-gray-500"},"Coming soon"))}renderBody(){var e;const{profile:t,stats:a,recentCheckIns:n,isFetching:s,fetchError:o,isStatsLoading:c,saveError:d,isAvatarUploading:m}=this.state;return s&&!t?l.createElement(J,null):o||!t?l.createElement("div",{className:"tw-p-6"},l.createElement(p.Fc,{variant:"destructive"},l.createElement(r.A,{className:"tw-h-4 tw-w-4"}),l.createElement(p.XL,null,"Could not load profile"),l.createElement(p.TN,null,null!=o?o:"Profile not found"))):l.createElement(q.A.Provider,{value:{openPreviewModal:this.handleOpenPreviewModal,fieldPreferences:this.state.fieldPreferences}},l.createElement("div",{className:"tw-space-y-4 tw-px-4 tw-pt-4","data-lpignore":"true","data-1p-ignore":!0},l.createElement(N,{profile:t,stats:a,isStatsLoading:c,onAvatarUpload:this.handleAvatarUpload,onAvatarRemove:this.handleAvatarRemove,isAvatarUploading:m,onClickCheckIns:this.props.onOpenHistory,onClose:this.props.onClose,onDelete:this.handleOpenDeleteModal}),l.createElement(k.A,{profile:t,onPatch:this.handlePatch}),l.createElement(C.A,{profile:t,onFieldSaved:this.handleCustomFieldSaved}),!this.state.suggestionsDismissed&&l.createElement($,{profile:t,onMerged:this.handleMerged,onDismiss:()=>this.setState({suggestionsDismissed:!0})}),this.state.fieldPreferences.isSectionVisible(i.pb.LISTS_SECTION)&&l.createElement(R.A,{profile:t,noun:this.props.noun}),this.state.fieldPreferences.isSectionVisible(i.pb.PASSES_SECTION)&&l.createElement(L,{profile:t}),this.state.fieldPreferences.isSectionVisible(i.pb.ATTENDANCE_SECTION)&&l.createElement(U.A,{participants:n,isLoading:c,onViewAll:this.props.onOpenHistory})),d&&l.createElement("div",{className:"tw-px-6 tw-pb-4"},l.createElement(p.Fc,{variant:"destructive"},l.createElement(r.A,{className:"tw-h-4 tw-w-4"}),l.createElement(p.XL,null,"Could not save changes"),l.createElement(p.TN,null,d))),l.createElement(w.A,{isOpen:"Preview"===this.state.activeModal,didClose
1:this.handleClosePreviewModal,onSaved:this.handlePreviewSaved,hasParticipant:!1}),l.createElement(u.A,{isOpen:"Delete"===this.state.activeModal,onClose:this.handleCloseDeleteModal,profile:null!=(e=this.state.profile)?e:null,onDelete:this.handleProfileDeleted,onMergeInstead:this.handleOpenMergeFromDelete}),"Merge"===this.state.activeModal&&this.state.profile&&l.createElement(h.A,{profile:this.state.profile,isOpen:!0,toggle:this.handleCloseMergeModal,reload:this.handleMerged}))}render(){const{className:e}=this.props,{isFetching:t,profile:a}=this.state;return l.createElement("div",{className:(0,f.cn)("tw-relative tw-flex tw-h-full tw-w-full tw-flex-col tw-overflow-x-hidden tw-bg-gray-50 tw-transition-opacity tw-duration-150",t&&a&&"tw-opacity-80 tw-pointer-events-none",e)},this.renderBody())}}var ae=a(25133);const le=({profile:e,onClose:t,onSaved:a,onMerged:s,onOpenHistory:r})=>{const o=(0,ae.ST)();return l.createElement(n._s,{open:!!e,direction:"right",modal:!1,onOpenChange:e=>{e||t()}},l.createElement(n.zj,{overlayClassName:"!tw-bg-transparent tw-pointer-events-none",className:"tw-w-full sm:tw-max-w-[640px] tw-overflow-y-auto tw-overflow-x-hidden"},e&&l.createElement(te,{profileId:e.id,noun:o,onClose:t,onSaved:a,onMerged:s,onOpenHistory:r})))}},36064(e,t,a){a.d(t,{w:()=>qe,A:()=>Ye});var l=a(63696),n=a(91835),s=a(27755),r=a(51218),o=a(11583),i=a(86289),c=a(1890),d=a(67669),m=a(76245),w=a(48600),u=a(17243),h=a(6969),p=a(45947),f=a(55412),v=a(25077),g=a(64203),E=a(49670),b=a(11789),y=a(99717),x=a(96165),N=a(26352),k=a(79639),C=a(28341),S=a(94634),A=a(52729),M=a(23591),D=a(53053),O=a(10431),F=a(85889),P=a(69469),I=a(79695),L=a(34627),R=a(44535),U=a(70708),j=a(43449),T=Object.defineProperty,V=Object.defineProperties,$=Object.getOwnPropertyDescriptors,J=Object.getOwnPropertySymbols,q=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable,Y=(e,t,a)=>t in e?T(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,W=(e,t)=>{for(var a in t||(t={}))q.call(t,a)&&Y(e,a,t[a]);if(J)for(var a of J(t))z.call(t,a)&&Y(e,a,t[a]);return e},_=(e,t)=>V(e,$(t));const B=e=>{switch(e){case U.j.Text:return h.A;case U.j.Phone:return p.A;case U.j.Email:return f.A;case U.j.Number:return v.A;case U.j.Date:return g.A;case U.j.Datetime:return E.A;case U.j.Boolean:return b.A;case U.j.Enum:case U.j.MultiSelect:return y.A;default:return x.A}},H=({label:e,icon:t,htmlFor:a,children:n})=>l.createElement("div",{className:"tw-flex tw-items-center tw-gap-4"},l.createElement(D.J,{htmlFor:a,className:"tw-flex tw-w-40 tw-shrink-0 tw-items-center tw-gap-2 tw-text-sm tw-font-medium tw-text-gray-900"},l.createElement(t,{className:"tw-h-4 tw-w-4"}),e),l.createElement("div",{className:"tw-flex-1"},n)),G=({profile:e,globalCustomFields:t,onProfileUpdate:a})=>{const[n,s]=(0,l.useState)({name:e.name||"",email:e.email||"",address:e.address||"",checkInCode:e.checkInCode||"",notes:e.notes||"",favorite:e.favorite||!1}),[,r]=(0,l.useState)(null),i=(0,l.useRef)((0,u.debounce)(async(t,l)=>{try{r(t);const n=new w.Ay(e),s=new w.xL({[t]:l});await n.updateProfile(s),e[t]=l,null==a||a(e),o.oR.success("Saved")}catch(e){console.error(`Error saving ${t}:`,e),o.oR.error(e instanceof j.X?e.message:`Failed to save ${t}`)}finally{r(null)}},600)).current,c=(e,t)=>{s(a=>_(W({},a),{[e]:t})),i(e,t)},d=(0,l.useCallback)(e=>{i("phone",e)},[i]),m=(0,l.useCallback)(e=>{s(t=>_(W({},t),{address:e})),i("address",e)},[i]);return l.createElement("div",{className:"tw-w-full tw-px-1 tw-flex tw-flex-col tw-gap-2"},l.createElement(P.Zp,{className:"tw-border tw-border-gray-200 tw-ring-0"},l.createElement(P.Wu,{className:"tw-flex tw-flex-col tw-gap-5"},l.createElement(D.J,{className:"tw-text-base tw-font-bold tw-text-gray-900"},"Primary Information"),l.createElement(H,{label:"Name",icon:N.A,htmlFor:"name"},l.createElement(M.p,{id:"name",value:n.name,onChange:e=>c("name",e.target.value),placeholder:"Enter name"})),l.createElement(H,{label:"Email",icon:f.A,htmlFor:"email"},l.createElement(M.p,{id:"email",type:"email",value:n.email,onChange:e=>c("email",e.target.value),placeholder:"[email protected]"})),l.createElement(H,{label:"Phone",icon:p.A,htmlFor:"phone"},l.createElement(L.A,{id:"phone",value:e.phone||"",onChange:d})),l.createElement(H,{label:"Address",icon:k.A},l.createElement(R.A,{value:n.address,onAddressSelect:m,placeholder:"Search for an address"})),l.createElement(H,{label:"Favorite",icon:C.A},l.createElement("div",{className:"tw-flex tw-items-center tw-gap-3"},l.createElement(O.d,{id:"favorite",checked:n.favorite,onCheckedChange:e=>c("favorite",e)}),l.createElement("span",{className:"tw-text-sm tw-text-gray-600"},n.favorite?"Yes":"No"))),l.createElement(H,{label:"Code",icon:S.A,htmlFor:"checkInCode"},l.createElement(M.p,{id:"checkInCode",value:n.checkInCode,onChange:e=>c("checkInCode",e.target.value),placeholder:"Check-in code"})),l.createElement(H,{label:"Notes",icon:A.A,htmlFor:"notes"},l.createElement(F.T,{id:"notes",value:n.notes,onChange:e=>c("notes",e.target.value),placeholder:"Special notes about this profile",rows:3})))),t.length>0&&l.createElement(P.Zp,{className:"tw-border tw-border-gray-200 tw-ring-0"},l.createElement(P.Wu,{className:"tw-flex tw-flex-col tw-gap-5"},l.createElement(D.J,{className:"tw-text-base tw-font-bold tw-text-gray-900"},"Custom Fields"),t.map(t=>{const n=(e.getCustomFields()||{}
1)[t.name];return l.createElement(H,{key:t.name,label:t.name,icon:B(t.type)},l.createElement(I.Q,{type:t.type,value:n,defaultValue:t.default,enableDefaultVal:!1,enums:t.list,nullable:!0,onChangeVal:a=>{e.customFields=_(W({},e.customFields),{[t.name]:a})},popoverPlacement:"top",onDebouncedChangeVal:()=>{(async(t,l)=>{try{const n=new U.A(_(W({},t.getObject()),{value:l})),s=new w.Ay(e);await s.updateProfileCustomField(n),e.customFields=_(W({},e.customFields),{[t.name]:l}),null==a||a(e),o.oR.success("Saved")}catch(e){console.error("Error saving custom field:",e),o.oR.error(e instanceof j.X?e.message:"Failed to save custom field")}})(t,e.customFields[t.name])},debounceWaitTimeMillis:600}))}))))};var Q=a(42689),X=a.n(Q),Z=a(50002),K=a(5737),ee=a(11956),te=a(475),ae=a(82519),le=a(9571),ne=a(21811),se=a(39677),re=a(97281),oe=a(59390),ie=a(55481),ce=a(21496),de=a(80903),me=a(89402),we=a(25133),ue=a(60891);const he=({activities:e,onCheckInSelect:t})=>{const a=(0,we.ST)(),n=(0,l.useMemo)(()=>{const l=[];return e.forEach(e=>{const n=e.listName||`Unknown ${a.one}`;e.checkedIn&&e.checkInDate&&l.push({id:`${e.id}-checkin`,status:"completed",date:new Date(e.checkInDate),title:`Checked in â ${n}`,onClick:()=>t(e.id)}),e.checkedOut&&e.checkOutDate&&l.push({id:`${e.id}-checkout`,status:"pending",date:new Date(e.checkOutDate),title:`Checked out â ${n}`,meta:e.checkInDate&&e.checkOutDate?e.getElapsedTimeFormatted():void 0,onClick:()=>t(e.id)})}),l.sort((e,t)=>t.date.getTime()-e.date.getTime()),l},[e,t,a]);return l.createElement(ue.A,{items:n})},pe=[{id:"today",label:"Today",getDateRange:()=>({start:X()().startOf("day").toDate(),end:X()().endOf("day").toDate()})},{id:"yesterday",label:"Yesterday",getDateRange:()=>({start:X()().subtract(1,"day").startOf("day").toDate(),end:X()().subtract(1,"day").endOf("day").toDate()})},{id:"currentWeek",label:"This Week",getDateRange:()=>({start:X()().startOf("week").toDate(),end:X()().endOf("week").toDate()})},{id:"previousWeek",label:"Last Week",getDateRange:()=>({start:X()().subtract(1,"week").startOf("week").toDate(),end:X()().subtract(1,"week").endOf("week").toDate()})},{id:"currentMonth",label:"This Month",getDateRange:()=>({start:X()().startOf("month").toDate(),end:X()().endOf("month").toDate()})},{id:"lastMonth",label:"Last Month",getDateRange:()=>({start:X()().subtract(1,"month").startOf("month").toDate(),end:X()().subtract(1,"month").endOf("month").toDate()})}],fe=({profile:e,onCheckInSelect:t,onExportRequest:a})=>{const n=(0,we.ST)(),[s,r]=(0,l.useState)("allTime"),[o,i]=(0,l.useState)(void 0),[c,d]=(0,l.useState)(X()().startOf("month").toDate()),[m,u]=(0,l.useState)([]),[h,p]=(0,l.useState)(!0),[f,v]=(0,l.useState)(!1),[g,E]=(0,l.useState)(0),[b,y]=(0,l.useState)(0),[x,N]=(0,l.useState)(0),[k,C]=(0,l.useState)(0),[S,A]=(0,l.useState)(!1),[M,D]=(0,l.useState)([]),[O,F]=(0,l.useState)("none"),P=()=>{var t;const a={includeArchived:!!e.isArchived||void 0};if("allTime"!==s&&(null==o?void 0:o.from)){const{gt:e,lt:l}=(0,te.a3)(o.from,null!=(t=o.to)?t:o.from);a.gtCheckInDate=e,a.ltCheckInDate=l}return a};(0,l.useEffect)(()=>{C(0),u([]),I(),L(0)},[s,o,e.id]),(0,l.useEffect)(()=>{R()},[c,e.id]);const I=async()=>{try{const{stats:t}=await w.Ay.fetchProfileStats(e.id,P());E(t.totalCheckIns),y(t.totalElapsedTime),N(t.avgElapsedTime)}catch(e){console.error("Error fetching profile stats:",e)}},L=async t=>{0===t?p(!0):v(!0);try{const a=P(),l={profileId:e.id,page:t,pageSize:100,checkedIn:!0,sortOrder:me.Vo.Descending,gtCheckInDate:a.gtCheckInDate,ltCheckInDate:a.ltCheckInDate,includeArchived:!!e.isArchived||void 0},n=await ce.Ay.fetchParticipants(new ce.x6(l)),s=n.data.map(e=>new ie.A(e));u(0===t?s:e=>[...e,...s]),C(t),A(100===s.length&&100*(t+1)<n.count)}catch(e){console.error("Error fetching timeline activities:",e)}finally{p(!1),v(!1)}},R=async()=>{try{const t=X()(c).startOf("month").subtract(1,"second").toDate(),a=X()(c).endOf("month").toDate(),l=(await ce.Ay.fetchParticipants(new ce.x6({profileId:e.id,page:0,pageSize:100,gtCheckInDate:t,ltCheckInDate:a,checkedIn:!0,sortOrder:me.Vo.Descending,includeArchived:!!e.isArchived||void 0}))).data.map(e=>X()(e.checkInDate).startOf("day").toDate()),n=Array.from(new Set(l.map(e=>e.getTime()))).map(e=>new Date(e));D(n)}catch(e){console.error("Error fetching month check-in dates:",e)}},U="allTime"!==s,j=()=>{L(k+1)},T=(0,l.useMemo)(()=>({hasCheckIn:M}),[M]),V=(0,l.useMemo)(()=>
1{if("none"===O)return null;const e=e=>e.checkInDate?X()(e.checkInDate):X()(e.createdAt);return"week"===O?m.reduce((t,a)=>{const l=e(a),n=(e=>X()(e).format("MMM D"))(l.clone().startOf("week").toDate()),s=(e=>X()(e).format("MMM D, YYYY"))(l.clone().endOf("week").toDate()),r=`${n} - ${s}`;return t[r]||(t[r]=[]),t[r].push(a),t},{}):"month"===O?m.reduce((t,a)=>{const l=(e=>X()(e).format("MMMM YYYY"))(e(a).toDate());return t[l]||(t[l]=[]),t[l].push(a),t},{}):m.reduce((e,t)=>{const a=t.listName||`Unknown ${n.one}`;return e[a]||(e[a]=[]),e[a].push(t),e},{})},[m,O,n]);return l.createElement("div",{className:"tw-flex tw-flex-1 tw-flex-col tw-overflow-hidden tw-min-h-0"},l.createElement("div",{className:"tw-text-center tw-mb-4"},h&&0===m.length?l.createElement("span",{className:"tw-flex tw-items-center tw-justify-center tw-gap-2 tw-text-gray-600"},l.createElement(oe.A,{withoutMargin:!0})):l.createElement(l.Fragment,null,l.createElement("p",{className:"tw-text-base tw-text-gray-700 tw-mb-1"},"Checked in ",l.createElement("span",{className:"tw-font-semibold tw-text-black"},g)," ",1===g?"time":"times"," ",(()=>{switch(s){case"allTime":return"so far";case"today":return"today";case"yesterday":return"yesterday";case"currentWeek":return"this week";case"previousWeek":return"last week";case"currentMonth":return"this month";case"lastMonth":return"last month";case"custom":return(null==o?void 0:o.from)?o.to&&!X()(o.from).isSame(o.to,"day")?`from ${(e=>X()(e).format("MMM D"))(o.from)} - ${(e=>X()(e).format("MMM D, YYYY"))(o.to)}`:`on ${(e=>X()(e).format("Do MMM YYYY"))(o.from)}`:"";default:return""}})()),l.createElement("p",{className:"tw-text-sm tw-text-gray-500 tw-mb-0"},"With a total time elapsed of"," ",l.createElement("span",{className:"tw-font-medium tw-text-gray-700"},(0,de.a)(b)),", At an average of"," ",l.createElement("span",{className:"tw-font-medium tw-text-gray-700"},(0,de.a)(x))," ","per check in."))),l.createElement("div",{className:"tw-flex tw-flex-1 tw-gap-6 tw-overflow-hidden tw-min-h-0"},l.createElement("div",{className:"tw-flex-shrink-0 tw-flex tw-flex-col"},l.createElement(Z.y,{month:c,selected:o,onSelect:e=>{if(null==e?void 0:e.from)if(i(e),e.to){const t=pe.find(t=>{if("allTime"===t.id)return!1;const a=t.getDateRange();return a.start&&a.end&&X()(e.from).isSame(a.start,"day")&&X()(e.to).isSame(a.end,"day")});r((null==t?void 0:t.id)||"custom")}else{const t=X()(e.from);t.isSame(X()(),"day")?r("today"):t.isSame(X()().subtract(1,"day"),"day")?r("yesterday"):r("custom")}},onMonthChange:e=>{d(e)},numberOfMonths:1,modifiers:T,modifiersClassNames:{hasCheckIn:"has-checkin-dot"}}),U&&l.createElement("div",{className:"tw-flex tw-justify-center tw-my-4"},l.createElement("button",{onClick:()=>{r("allTime"),i(void 0),d(X()().startOf("month").toDate())},className:"tw-flex tw-items-center tw-gap-1 tw-text-xs tw-text-gray-500 hover:tw-text-gray-700 tw-bg-transparent tw-border-0 tw-cursor-pointer tw-p-0"},l.createElement(ne.A,{className:"tw-h-3 tw-w-3"}),"Clear selection")),l.createElement("div",{className:"tw-grid tw-grid-cols-3 tw-gap-1.5"},pe.map(e=>l.createElement(ae.$,{key:e.id,variant:"outline",className:(0,ee.cn)(K.Pp,s===e.id&&"!tw-bg-primary !tw-text-primary-foreground hover:!tw-bg-primary/90"),onClick:()=>(e=>{r(e);const t=pe.find(t=>t.id===e);if(t){const e=t.getDateRange();e.start&&e.end&&(i({from:e.start,to:e.end}),d(X()(e.start).startOf("month").toDate()))}})(e.id)},e.label)))),l.createElement("div",{className:"tw-flex-1 tw-flex tw-flex-col tw-overflow-hidden tw-min-h-0"},l.createElement("div",{className:"tw-flex tw-items-center tw-justify-between tw-mb-2"},l.createElement(ae.$,{variant:"link",size:"sm",onClick:a,className:"tw-h-7 tw-gap-1 tw-px-2.5 tw-text-xs tw-text-gray-700 hover:tw-text-gray-900"},l.createElement(se.A,{className:"tw-h-3.5 tw-w-3.5"}),"Export Excel"),l.createElement("div",{className:"tw-flex tw-items-center tw-gap-3"},l.createElement("div",{className:"tw-flex tw-items-center tw-gap-2"},l.createElement("span",{className:"tw-text-xs tw-text-gray-500 tw-w-full"},"Group by:"),l.createElement(le.l6,{value:O,onValueChange:e=>F(e)},l.createElement(le.bq,{className:"tw-h-7 tw-w-24 tw-text-xs focus:tw-ring-0 focus:tw-ring-offset-0 focus-visible:tw-ring-0 focus-visible:tw-ring-offset-0",style:{outline:"none",boxShadow:"none",width:"fit-content"}},l.createElement(le.yv,null)),l.createElement(le.gC,null,l.createElement(le.eb,{value:"none"},"None"),l.createElement(le.eb,{value:"week"},"Week"),l.createElement(le.eb,{value:"month"},"Month"),l.createElement(le.eb,{value:"list"},n.one)))))),l.createElement("div",{className:"tw-flex-1 tw-overflow-y-auto tw-border tw-border-gray-200 tw-rounded-lg tw-p-4"},h&&0===m.length?l.createElement("div",{className:"tw-flex tw-items-center tw-justify-center tw-h-full"},l.createElement(oe.A,{withoutMargin:!0})):0===m.length?l.createElement("div",{className:"tw-flex tw-flex-col tw-items-center tw-justify-center tw-h-full tw-text-center"},l.createElement(re.A,{className:"tw-h-12 tw-w-12 tw-text-gray-300 tw-mb-3"}),l.createElement("p",{className:"tw-text-gray-500 tw-font-medium tw-mb-0"},"No check-ins found")):"none"===O?l.createElement("div",null,l.createElement(he,{activities:m,onCheckInSelect:t}),S&&l.createElement("div",{className:"tw-flex tw-justify-center tw-mt-4"},l.createElement(ae.$,{variant:"outline",size:"sm",onClick:j,disabled:f},f?"Loading...":"Load more"))):l.createElement("div",{className:"tw-space-y-4"},V&&Object.entries(V).map(([e,a])=>l.createElement("div",{key:e,className:"tw-bg-gray-50 tw-rounded-lg tw-p-3"},l.createElement("div",{className:"tw-text-sm tw-font-semibold tw-text-gray-700 tw-mb-2 tw-flex tw-items-center tw-justify-between"},l.createElement("span",null,e),l.createElement("span",{className:"tw-bg-gray-200 tw-text-gray-600 tw-px-2 tw-py-0.5 tw-rounded-full tw-text-xs"},a.length)),l.createElement(he,{activities:a,onCheckInSelect:t}))),S&&l.createElement("div",{className:"tw-flex tw-justify-center tw-mt-4"},l.createElement(ae.$,{variant:"outline",size:"sm",onClick:j,disabled:f},f?"Loading...":"Load more")))))))};var ve=a(78797),ge=a(31738),Ee=a(19264),be=a(97677),ye=a(70472),xe=a(38793),Ne=a(91315);
1const ke=({participant:e,field:t,handleCustomFieldChange:a})=>{const n=e;return l.createElement(I.Q,{type:t.type,value:t.value,defaultValue:t.defaultValue,enableDefaultVal:!1,enums:t.listValues,nullable:!0,placeholder:t.name,onChangeVal:e=>{var a,l;const s=null!=(l=null==(a=n.checkInCustomFields)?void 0:a.findIndex(e=>e.uniqueId===t.uniqueId))?l:-1;-1!==s&&n.checkInCustomFields&&(n.checkInCustomFields[s].value=e)},onDebouncedChangeVal:()=>{a(n,t)},debounceWaitTimeMillis:600,extraClasses:"tw-w-full"})};var Ce=a(13538),Se=a(69255),Ae=a(7985),Me=a(57713);const De={[Se.xV.text]:"text",[Se.xV.tags]:"tags",[Se.xV.number]:"number",[Se.xV.phone]:"phone",[Se.xV.boolean]:"boolean",[Se.xV.date]:"date",[Se.xV.datetime]:"datetime"},Oe=({responses:e})=>(null==e?void 0:e.length)?l.createElement(l.Fragment,null,e.map((e,t)=>{var a;if(e.type===Se.xV.information)return null;if(e.type===Se.xV.signature){const a="string"==typeof e.value?e.value:null;return a?l.createElement("div",{key:t},l.createElement(Me.A,{src:a,heading:e.question})):null}const n=e.type?De[e.type]:void 0,s=null!=e.value&&n?(0,Ae.eQ)(e.value,n,!0):null!=(a=e.value)?a:"-";return l.createElement(P.Zp,{key:t},l.createElement(P.Wu,{className:"tw-flex tw-flex-col tw-gap-2"},l.createElement(D.J,{className:"tw-text-sm tw-font-medium"},"Question: ",e.question),l.createElement(D.J,{className:"tw-text-sm tw-font-medium"},"Answer: ",s||"-")))})):null;var Fe=a(41764),Pe=Object.defineProperty,Ie=Object.defineProperties,Le=Object.getOwnPropertyDescriptors,Re=Object.getOwnPropertySymbols,Ue=Object.prototype.hasOwnProperty,je=Object.prototype.propertyIsEnumerable,Te=(e,t,a)=>t in e?Pe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,Ve=(e,t)=>{for(var a in t||(t={}))Ue.call(t,a)&&Te(e,a,t[a]);if(Re)for(var a of Re(t))je.call(t,a)&&Te(e,a,t[a]);return e},$e=(e,t)=>Ie(e,Le(t));const Je=({participantId:e,onCheckInDetailsUpdate:t})=>{var a,n;const[s,i]=(0,l.useState)(null),[c,d]=(0,l.useState)(null),[m,w]=(0,l.useState)(!0),[u,h]=(0,l.useState)(!1),p=(0,we.ST)(),[f,v]=(0,l.useState)(),[g,E]=(0,l.useState)(),[b,y]=(0,l.useState)(),[x,N]=(0,l.useState)(),k=(0,l.useRef)(null),C=(0,l.useRef)(null);(0,l.useEffect)(()=>()=>{k.current&&clearTimeout(k.current),C.current&&clearTimeout(C.current)},[]),(0,l.useEffect)(()=>{(async()=>{w(!0),i(null),d(null),v(void 0),E(void 0),y(void 0),N(void 0);try{const t=await ce.Ay.fetch(e);if(i(t),t.listId){const e=await Ee.Ay.fetchListByID(t.listId);d(e)}else d(null)}catch(e){console.error("Error loading:",e),o.oR.error("Failed to load check-in details")}finally{w(!1)}})()},[e]);const S=async(e,a)=>{if(s)try{const a=(e.checkInCustomFields||[]).reduce((e,t)=>(e[t.uniqueId]=t.value,e),{}),l=new ce.Ay(e),n=await l.updateCheckInDetails({checkInCustomFields:a});i(n),null==t||t(n),o.oR.success("Check-in custom field saved")}catch(e){console.error("Error saving custom field:",e),o.oR.error("Failed to save check-in custom field")}},A=()=>{const e=null==s?void 0:s.getPreRegistrationSurveyResponseObject();return e&&0!==Object.keys(e).length?Object.entries(e).map(([e,t])=>({question:(null==t?void 0:t.question)||e,value:null==t?void 0:t.value,type:null==t?void 0:t.type})):null},O=e=>l.createElement("div",{className:"tw-h-[150px] tw-rounded-md tw-overflow-hidden tw-relative tw-cursor-pointer tw-group",onClick:()=>{return t=e.latitude,a=e.longitude,void window.open(`https://www.google.com/maps?q=${t},${a}`,"_blank");var t,a}},l.createElement(be.A,{mapCenter:{lat:e.latitude,lng:e.longitude},marker:{center:{lat:e.latitude,lng:e.longitude},radius:0,zoom:12},mapClass:"tw-rounded-md",containerStyle:{height:"150px"}}),l.createElement("div",{className:"tw-absolute tw-inset-0 tw-bg-black/0 group-hover:tw-bg-black/30 tw-transition-colors tw-flex tw-items-center tw-justify-center"},l.createElement("div",{className:"tw-opacity-0 group-hover:tw-opacity-100 tw-transition-opacity tw-bg-white tw-px-3 tw-py-2 tw-rounded-md tw-shadow-lg tw-flex tw-items-center tw-gap-2"},l.createElement(ve.A,{className:"tw-h-4 tw-w-4 tw-text-gray-700"}),l.createElement("span",{className:"tw-text-sm tw-font-medium tw-text-gray-700"},"Open in Google Maps"))));return m?l.createElement("div",{className:"tw-flex tw-items-center tw-justify-center tw-h-full"},l.createElement(oe.A,{withoutMargin:!0})):s?l.createElement("div",{className:"tw-w-full tw-px-1 tw-flex tw-flex-col tw-gap-2"},c&&l.createElement(P.Zp,null,l.createElement(P.Wu,{className:"tw-flex tw-flex-col tw-gap-4"},l.createElement(D.J,{className:"tw-text-[15px] tw-font-bold"},"List Summary"),l.createElement(r.w,null),l.createElement(ye.A,{list:c,compact:!0}))),s.checkInCustomFields&&s.checkInCustomFields.length>0&&l.createElement(P.Zp,null,l.createElement(P.Wu,{className:"tw-flex tw-flex-col tw-gap-4"},l.createElement("div",{className:"tw-flex tw-justify-between tw-items-center"},l.createElement(D.J,{className:"tw-text-[15px] tw-font-bold"},"Check-in Custom Fields"),l.createElement(ae.$,{variant:"outline",size:"sm",onClick:()=>{h(!0)}},l.createElement(ge.A,{className:"tw-h-4 tw-w-4"}),"Edit")),l.createElement(r.w,null),s.checkInCustomFields.map((e,t)=>l.createElement("div",{key:e.uniqueId,className:"tw-flex tw-flex-col tw-gap-1"},l.createElement(D.J,{className:"tw-text-sm tw-font-medium tw-mb-1"},e.name),l.createElement(ke,{participant:s,field:e,handleCustomFieldChange:S}))))),s.checkedOut&&l.createElement(P.Zp,null,l.createElement(P.Wu,{className:"tw-flex tw-flex-col tw-gap-4"},l.createElement(D.J,{className:"tw-text-[15px] tw-font-bold"},"Check-out Details"),l.createElement(r.w,null),l.createElement("div",{className:"tw-gap-4 tw-flex tw-flex-col m-0"},l.createElement("div",{className:"tw-flex tw-flex-col tw-gap-1"},l.createElement(D.J,{className:"tw-text-sm tw-font-medium tw-mb-1"},"Check-out Date"),l.createElement(Ce.W,{value:null!=(a=s.checkOutDate)?a:void 0,onChange:e=>(async e=>{if(s){s.checkOutDate=e,i(Ve({},s));try{const e=new ce.Ay(s);
1await e.updateCheckInDetails({checkOutDate:s.checkOutDate}),o.oR.success("Check-out date saved")}catch(e){o.oR.error("Failed to save check-out date")}}})(null!=e?e:null)})),s.checkInDate&&s.checkOutDate&&l.createElement("div",{className:"tw-flex tw-flex-col tw-gap-1"},l.createElement(D.J,{className:"tw-text-sm tw-font-medium tw-mb-1"},"Time Elapsed"),l.createElement(M.p,{className:"tw-text-sm tw-font-medium tw-text-gray-900 tw-mb-0",value:te.Ay.formatDurationReadable(s.checkInDate,s.checkOutDate),readOnly:!0})),l.createElement("div",{className:"tw-flex tw-flex-col tw-gap-1"},l.createElement(D.J,{className:"tw-text-sm tw-font-medium tw-mb-1"},"Check-out Note"),l.createElement(M.p,{value:s.checkOutNotes||"",onChange:e=>{return a=e.target.value,void(s&&(i($e(Ve({},s),{checkOutNotes:a})),C.current&&clearTimeout(C.current),C.current=setTimeout(async()=>{try{await new ce.Ay(s).updateCheckInDetails({checkOutNotes:a}),null==t||t($e(Ve({},s),{checkOutNotes:a})),o.oR.success("Check-out note saved")}catch(e){o.oR.error("Failed to save check-out note")}},500)));var a},placeholder:"Add a check-out note..."})),l.createElement(xe.A,{label:"Check-out Signature",signatureUrl:void 0!==x?x:s.checkOutSignatureURL,onSave:async e=>{if(s){N(e);try{const t=new ce.Ay(s),a=await t.updateCheckInDetails({checkOutSignature:e});i(a),o.oR.success(e?"Signature saved":"Signature removed")}catch(e){o.oR.error("Failed to save signature")}finally{N(void 0)}}}}),l.createElement(Ne.A,{label:"Check-out Photo",photoUrl:void 0!==b?b:s.checkOutPhotoURL,onSave:async e=>{if(s){y(e);try{const t=new ce.Ay(s),a=await t.updateCheckInDetails({checkOutPhoto:e});i(a),o.oR.success(e?"Photo saved":"Photo removed")}catch(e){o.oR.error("Failed to save photo")}finally{y(void 0)}}}}),s.checkOutLocation&&l.createElement("div",{className:"tw-flex tw-flex-col tw-gap-1"},l.createElement(D.J,{className:"tw-text-sm tw-font-medium tw-mb-1"},"Check-out Location"),s.checkOutLocation&&O(s.checkOutLocation)),s.checkOutSurveyData&&s.checkOutSurveyData.length>0&&l.createElement("div",{className:"tw-flex tw-flex-col tw-gap-1"},l.createElement(D.J,{className:"tw-text-sm tw-font-medium tw-mb-1"},"Check-out Survey Responses"),l.createElement(Oe,{responses:s.checkOutSurveyData})),A()&&A().length>0&&l.createElement("div",{className:"tw-flex tw-flex-col tw-gap-1"},l.createElement(D.J,{className:"tw-text-sm tw-font-medium tw-mb-1"},"Pre-registration Survey Responses"),l.createElement(Oe,{responses:A()}))))),l.createElement(P.Zp,null,l.createElement(P.Wu,{className:"tw-flex tw-flex-col tw-gap-4"},l.createElement(D.J,{className:"tw-text-[15px] tw-font-bold"},"Check-in Details"),l.createElement(r.w,null),l.createElement("div",{className:"tw-flex tw-flex-col tw-gap-1"},l.createElement(D.J,{className:"tw-text-sm tw-font-medium tw-mb-1"},"Check-in Date"),l.createElement(Ce.W,{value:null!=(n=s.checkInDate)?n:void 0,onChange:e=>(async e=>{if(s){s.checkInDate=e,i(Ve({},s));try{const e=new ce.Ay(s);await e.updateCheckInDetails({checkInDate:s.checkInDate}),null==t||t(Ve({},s)),o.oR.success("Check-in date saved")}catch(e){o.oR.error("Failed to save check-in date")}}})(null!=e?e:null)})),l.createElement("div",{className:"tw-flex tw-flex-col tw-gap-1"},l.createElement(D.J,{className:"tw-text-sm tw-font-medium tw-mb-1"},"Check-in Note"),l.createElement(M.p,{value:s.checkInNotes||"",onChange:e=>{return a=e.target.value,void(s&&(i($e(Ve({},s),{checkInNotes:a})),k.current&&clearTimeout(k.current),k.current=setTimeout(async()=>{try{await new ce.Ay(s).updateCheckInDetails({checkInNotes:a}),null==t||t($e(Ve({},s),{checkInNotes:a})),o.oR.success("Check-in note saved")}catch(e){o.oR.error("Failed to save check-in note")}},500)));var a},placeholder:"Add a check-in note..."})),l.createElement("div",{className:"tw-flex tw-flex-col tw-gap-1"},l.createElement(D.J,{className:"tw-text-sm tw-font-medium tw-mb-1"},"Check-in Signature"),l.createElement(xe.A,{signatureUrl:void 0!==g?g:s.checkInSignatureURL,onSave:async e=>{if(s){E(e);try{const t=new ce.Ay(s),a=await t.updateCheckInDetails({checkInSignature:e});i(a),o.oR.success(e?"Signature saved":"Signature removed")}catch(e){o.oR.error("Failed to save signature")}finally{E(void 0)}}}})),l.createElement("div",{className:"tw-flex tw-flex-col tw-gap-1"},l.createElement(D.J,{className:"tw-text-sm tw-font-medium tw-mb-1"},"Check-in Photo"),l.createElement(Ne.A,{photoUrl:void 0!==f?f:s.checkInPhotoURL,onSave:async e=>{if(s){v(e);
1try{const t=new ce.Ay(s),a=await t.updateCheckInDetails({checkInPhoto:e});i(a),o.oR.success(e?"Photo saved":"Photo removed")}catch(e){o.oR.error("Failed to save photo")}finally{v(void 0)}}}})),s.checkInLocation&&l.createElement("div",{className:"tw-flex tw-flex-col tw-gap-1"},l.createElement(D.J,{className:"tw-text-sm tw-font-medium tw-mb-1"},"Check-in Location"),s.checkInLocation&&O(s.checkInLocation)),s.checkInSurveyData&&s.checkInSurveyData.length>0&&l.createElement("div",{className:"tw-flex tw-flex-col tw-gap-1"},l.createElement(D.J,{className:"tw-text-sm tw-font-medium tw-mb-1"},"Check-in Survey Responses"),l.createElement(Oe,{responses:s.checkInSurveyData})),A()&&A().length>0&&l.createElement("div",{className:"tw-flex tw-flex-col tw-gap-1"},l.createElement(D.J,{className:"tw-text-sm tw-font-medium tw-mb-1"},"Pre-registration Survey Responses"),l.createElement(Oe,{responses:A()})))),l.createElement(Fe.A,{noun:p,isOpen:u,didClose:()=>h(!1),didSave:e=>{i($e(Ve({},s),{checkInCustomFields:e})),null==t||t($e(Ve({},s),{checkInCustomFields:e}))}})):l.createElement("div",{className:"tw-text-center tw-py-8 tw-text-gray-500"},"No data available")};var qe=(e=>(e.Details="details",e.History="history",e.CheckIn="checkin",e))(qe||{});const ze={details:"Details",history:"Attendance",checkin:"Check-in"},Ye=({isOpen:e,onClose:t,profile:a,globalCustomFields:u,initialTab:h="details",initialParticipantId:p=null,onProfileUpdate:f,onCheckInDetailsUpdate:v})=>{const[g,E]=(0,l.useState)(h),b=(0,we.ST)(),[y,x]=(0,l.useState)(!1),[N,k]=(0,l.useState)(!1),[C,S]=(0,l.useState)(p);(0,l.useEffect)(()=>{e&&(E(h),S(p))},[e,h,p]);const A=async e=>{if(a){x(!0);try{const t=new w.Ay(a),l=await t.uploadAvatar(e);a.avatarURL=l.avatarURL,null==f||f(a),o.oR.success("Avatar updated successfully")}catch(e){console.error("Error uploading avatar:",e),o.oR.error("Failed to upload avatar")}finally{x(!1)}}},M=async()=>{if(a){x(!0);try{const e=new w.Ay(a);await e.deleteAvatar(),a.avatarURL=void 0,null==f||f(a),o.oR.success("Avatar removed successfully")}catch(e){console.error("Error removing avatar:",e),o.oR.error("Failed to remove avatar")}finally{x(!1)}}};if(!a)return null;const D=null!==C?["details","history","checkin"]:["details","history"],O="history"===g?"!tw-max-w-4xl":"!tw-max-w-xl";return l.createElement(n.lG,{open:e,onOpenChange:e=>!e&&t()},l.createElement(n.Cf,{className:`!tw-flex tw-flex-col tw-max-h-[90vh] tw-overflow-hidden tw-p-6 tw-transition-all tw-duration-200 tw-w-[95vw] ${O}`,closeButtonVariant:"filled",onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault()},l.createElement("div",{className:"tw-flex-1 tw-flex tw-flex-col tw-overflow-hidden tw-min-h-0"},l.createElement("div",{className:"tw-flex tw-items-center tw-justify-between tw-mb-4 tw-gap-4"},l.createElement("div",{className:"tw-flex tw-items-center tw-gap-4"},l.createElement(i.A,{avatarUrl:a.avatarURL,alt:a.name,fallback:(0,m.SL)(a.name,1)||"?",onUpload:A,cropBeforeUpload:!0,onRemove:M,isUploading:y,color:"dark",className:"tw-h-[90px] tw-w-[90px] tw-shrink-0",fallbackClassName:"tw-text-2xl tw-font-semibold"}),l.createElement("span",{className:"tw-text-xl tw-font-medium tw-text-gray-800"},a.name)),l.createElement(s.A,{options:D.map(e=>ze[e]),value:D.indexOf(g),onChange:e=>E(D[e]),className:"tw-self-center"})),l.createElement(r.w,{className:"tw-mb-4"}),"details"===g&&l.createElement("div",{className:"tw-flex-1 tw-overflow-y-auto webkit-scrollbar tw-py-2"},l.createElement(G,{profile:a,globalCustomFields:u,isUpdatingAvatar:y,onAvatarUpload:A,onAvatarDelete:M,onProfileUpdate:f})),"history"===g&&l.createElement("div",{className:"tw-flex tw-flex-col tw-flex-1 tw-overflow-hidden tw-min-h-0"},l.createElement(fe,{profile:a,onCheckInSelect:e=>{S(e),E("checkin")},onExportRequest:()=>k(!0)})),"checkin"===g&&C&&l.createElement("div",{className:"tw-flex-1 tw-overflow-y-auto webkit-scrollbar"},l.createElement(Je,{key:C,participantId:C,onCheckInDetailsUpdate:v})))),N&&l.createElement(c.A,{noun:b,isOpen:N,didClose:()=>k(!1),selectedProfile:a,defaultFormat:d.s.Excel}))}},81829(e,t,a){a.d(t,{A:()=>
1o});var l=a(63696),n=a(82519),s=a(28098),r=a(60891);const o=({participants:e,isLoading:t,onViewAll:a})=>{if(t)return l.createElement("section",{className:"tw-rounded-xl tw-border tw-border-gray-200 tw-bg-white tw-px-6 tw-py-6"},l.createElement("div",{className:"tw-mb-4 tw-flex tw-items-center tw-justify-between tw-gap-2"},l.createElement("h2",{className:"tw-m-0 tw-text-base tw-font-bold tw-text-gray-900"},"Check-in Activity")),l.createElement("div",{className:"tw-space-y-4"},[1,2,3].map(e=>l.createElement("div",{key:e,className:"tw-flex tw-gap-4"},l.createElement(s.E,{className:"tw-h-6 tw-w-6 tw-rounded-full tw-flex-shrink-0"}),l.createElement("div",{className:"tw-flex-1 tw-space-y-2"},l.createElement(s.E,{className:"tw-h-4 tw-w-3/4"}),l.createElement(s.E,{className:"tw-h-3 tw-w-1/3"}))))));const o=e.slice(0,5).filter(e=>!!e.checkInDate).map(e=>({id:e.id,status:e.checkedOut?"completed":"pending",date:new Date(e.checkInDate),title:e.listName?`Checked in â ${e.listName}`:"Checked in"}));return l.createElement("section",{className:"tw-rounded-xl tw-border tw-border-gray-200 tw-bg-white tw-px-6 tw-py-6"},l.createElement("div",{className:"tw-mb-4 tw-flex tw-items-center tw-justify-between tw-gap-2"},l.createElement("h2",{className:"tw-m-0 tw-text-base tw-font-bold tw-text-gray-900"},"Check-in Activity"),a&&l.createElement(n.$,{type:"button",variant:"outline",size:"sm",onClick:a},"View All")),l.createElement(r.A,{items:o}))}},64199(e,t,a){a.d(t,{A:()=>R});var l=a(63696),n=a(19720),s=a(11583),r=a(48600),o=a(39453),i=a(79695),c=a(44325),d=a(97281),m=a(64203),w=a(25077),u=a(99717),h=a(55412),p=a(45947),f=a(11789),v=a(6969),g=a(70708),E=a(82519),b=a(16125),y=a(28098),x=a(24076),N=a(67847),k=Object.defineProperty,C=Object.defineProperties,S=Object.getOwnPropertyDescriptors,A=Object.getOwnPropertySymbols,M=Object.prototype.hasOwnProperty,D=Object.prototype.propertyIsEnumerable,O=(e,t,a)=>t in e?k(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,F=(e,t)=>{for(var a in t||(t={}))M.call(t,a)&&O(e,a,t[a]);if(A)for(var a of A(t))D.call(t,a)&&O(e,a,t[a]);return e};const P="[CustomFieldsSection]",I=e=>{switch(e){case g.j.Text:return v.A;case g.j.Phone:return p.A;case g.j.Email:return h.A;case g.j.Number:return w.A;case g.j.Datetime:return m.A;case g.j.Date:return d.A;case g.j.Boolean:return f.A;case g.j.Enum:case g.j.MultiSelect:return u.A;default:return v.A}},L=e=>e instanceof o.LG?e.getFormattedMessage():e instanceof Error?e.message:"An unknown error occurred";class R extends l.Component{constructor(e){super(e),this.fieldChangeCallbacks=new Map,this.fieldSaveCallbacks=new Map,this.state={isLoading:!0,globalFields:[],pendingFields:new Set,savingFields:{},error:void 0,visibleModal:void 0},this.loadFields=this.loadFields.bind(this),this.handleFieldChange=this.handleFieldChange.bind(this),this.handleFieldSave=this.handleFieldSave.bind(this),this.openModifyModal=this.openModifyModal.bind(this),this.closeModifyModal=this.closeModifyModal.bind(this),this.handleModifySaved=this.handleModifySaved.bind(this)}componentDidMount(){this.loadFields()}componentDidUpdate(e){e.profile.id!==this.props.profile.id&&(this.setState({isLoading:!0,globalFields:[],pendingFields:new Set,savingFields:{},error:void 0,visibleModal:void 0}),this.loadFields())}async loadFields(){this.setState({isLoading:!0,error:void 0});try{const e=await new r.Ay(this.props.profile).fetchProfileCustomFields();this.setState({globalFields:e,isLoading:!1,pendingFields:new Set})}catch(e){console.error(P,"loadFields",e),this.setState({error:L(e),isLoading:!1})}}resolveValue(e){var t,a;return null!=(a=e.value)?a:null==(t=this.props.profile.customFields)?void 0:t[e.name]}handleFieldChange(e,t){this.setState(a=>{const l=a.globalFields.map(a=>{if(a.name!==e)return a;const l=a.clone();return l.setValue(t),l}),n=new Set(a.pendingFields);return n.add(e),{globalFields:l,pendingFields:n,error:void 0}})}async handleFieldSave(e){var t,a;const l=e.name,n=this.state.globalFields.find(e=>e.name===l);if(!n)return;const o=n.clone();this.setState(e=>{const t=new Set(e.pendingFields);return t.delete(l),{pendingFields:t,savingFields:(a=F({},e.savingFields),n={[l]:!0},C(a,S(n)))};var a,n});try{const e=await new r.Ay(this.props.profile).updateProfileCustomField(o);this.setState(t=>{const a=F({}
1,t.savingFields);return delete a[l],t.pendingFields.has(l)?{savingFields:a}:{savingFields:a,globalFields:t.globalFields.map(t=>t.name===l?e:t)}}),s.oR.success("Saved"),null==(a=(t=this.props).onFieldSaved)||a.call(t,l,e.getValue())}catch(e){console.error(P,"handleFieldSave",l,e);const t=L(e);this.setState(e=>{const t=F({},e.savingFields);return delete t[l],{savingFields:t}}),s.oR.error(t)}}getFieldChangeCallback(e){let t=this.fieldChangeCallbacks.get(e);return t||(t=t=>this.handleFieldChange(e,t),this.fieldChangeCallbacks.set(e,t)),t}getFieldSaveCallback(e){let t=this.fieldSaveCallbacks.get(e.name);return t||(t=()=>this.handleFieldSave(e),this.fieldSaveCallbacks.set(e.name,t)),t}openModifyModal(){this.setState({visibleModal:"modify"})}closeModifyModal(){this.setState({visibleModal:void 0})}handleModifySaved(){this.setState({visibleModal:void 0},this.loadFields)}render(){var e;const{globalFields:t,isLoading:a,savingFields:s,error:r,visibleModal:o}=this.state,d=null==(e=this.context)?void 0:e.fieldPreferences,m=d?t.filter(e=>d.isProfileCustomFieldVisible(e.name)):t;return l.createElement("section",{className:"tw-rounded-xl tw-border tw-border-gray-200 tw-bg-white tw-px-6 tw-py-6"},l.createElement("div",{className:"tw-mb-4 tw-flex tw-items-center tw-justify-between tw-gap-2"},l.createElement("h2",{className:"tw-m-0 tw-text-base tw-font-bold tw-text-gray-900"},"Custom Fields"),l.createElement(E.$,{type:"button",variant:"outline",size:"sm",onClick:this.openModifyModal},"Modify Fields")),a&&l.createElement("div",{className:"tw-space-y-3"},l.createElement(y.E,{className:"tw-h-10 tw-w-full"}),l.createElement(y.E,{className:"tw-h-10 tw-w-full"}),l.createElement(y.E,{className:"tw-h-10 tw-w-full"})),!a&&r&&l.createElement(b.Fc,{variant:"destructive",className:"tw-mb-3"},l.createElement(n.A,{className:"tw-h-4 tw-w-4"}),l.createElement(b.XL,null,"Could not load custom fields"),l.createElement(b.TN,null,r)),!a&&!r&&0===t.length&&l.createElement("p",{className:"tw-text-sm tw-text-gray-500"},"No custom fields yet."),!a&&!r&&m.length>0&&l.createElement("div",{className:"tw-space-y-5"},m.map(e=>{const t=!0===s[e.name];return l.createElement(N.A,{key:e.name,label:e.name,icon:I(e.type),htmlFor:`custom-field-${e.name}`,className:t?"tw-opacity-60":void 0},l.createElement(i.Q,{inputKey:`custom-field-${e.name}`,type:e.type,value:this.resolveValue(e),defaultValue:e.default,enableDefaultVal:!1,enums:e.list,nullable:!0,placeholder:e.name,onChangeVal:this.getFieldChangeCallback(e.name),onDebouncedChangeVal:this.getFieldSaveCallback(e),debounceWaitTimeMillis:600}))})),"modify"===o&&l.createElement(c.A,{isOpen:!0,didClose:this.closeModifyModal,didSave:this.handleModifySaved}))}}R.contextType=x.A},67847(e,t,a){a.d(t,{A:()=>d});var l=a(63696),n=a(13479),s=a(69944),r=a(53053),o=a(73602),i=a(11956),c=a(24076);const d=({label:e,icon:t,htmlFor:a,className:d,children:m})=>{const{openPreviewModal:w}=(0,c.p)();return l.createElement("div",{className:(0,i.cn)("tw-group tw-flex tw-items-center tw-gap-4",d)},l.createElement(r.J,{htmlFor:a,className:"tw-relative tw-flex tw-w-44 tw-shrink-0 tw-items-center tw-gap-2 tw-text-sm tw-font-medium tw-text-gray-500"},l.createElement(o.rI,null,l.createElement(o.ty,{asChild:!0},l.createElement("button",{type:"button",className:"tw-absolute -tw-left-7 tw-flex tw-h-7 tw-w-7 tw-items-center tw-justify-center tw-rounded-md tw-opacity-0 tw-transition-opacity hover:tw-bg-gray-100 group-hover:tw-opacity-100 data-[state=open]:tw-opacity-100"},l.createElement(n.A,{className:"tw-h-4 tw-w-4 tw-text-gray-400"}))),l.createElement(o.SQ,{align:"start",className:"tw-w-auto"},l.createElement(o._2,{onSelect:w},l.createElement(s.A,{className:"tw-h-4 tw-w-4"}),"Hide field"))),l.createElement(t,{className:"tw-h-4 tw-w-4"}),e),l.createElement("div",{className:"tw-flex-1"},m))}},64186(e,t,a){a.d(t,{A:()=>f});var l=a(63696),n=a(42689),s=a.n(n),r=a(19720),o=a(23577),i=a(7492),c=a(39453),d=a(76195),m=a(33272),w=a(82519),u=a(16125),h=a(28098);const p=e=>e instanceof c.LG?e.getFormattedMessage():e instanceof Error?e.message:"An unknown error occurred";class f extends l.Component{constructor(e){super(e),this.state={isLoading:!0,rows:[],totalProfileListsCount:0,error:void 0,visibleModal:"none"},this.loadActivities=this.loadActivities.bind(this),this.handleOpenAddToLists=this.handleOpenAddToLists.bind(this),this.handleCloseAddToLists=this.handleCloseAddToLists.bind(this)}handleOpenAddToLists(){this.setState({visibleModal:"addToLists"})}handleCloseAddToLists(){this.setState({visibleModal:"none"})}componentDidMount(){this.loadActivities()}componentDidUpdate(e){e.profile.id!==this.props.profile.id&&(this.setState({isLoading:!0,rows:[],totalProfileListsCount:0,error:void 0}),this.loadActivities())}async loadActivities(){this.setState({isLoading:!0,error:void 0});try{const e=await o.Ay.fetchProfileLists(new o.XS({profileId:this.props.profile.id,onlyAddedLists:!0,listSortType:o.uh.LastParticipantUpdatedAt,listSortDirection:i.UE.DESC,page:0,pageSize:5,includeArchivedLists:!!this.props.profile.isArchived||void 0}));this.setState({rows:e.data,totalProfileListsCount:e.totalCount,isLoading:!1})}catch(e){console.error("[ListsSection]","loadActivities",e),this.setState({error:p(e),isLoading:!1})}}
1renderActivitySubtitle(e){const t=e.addedAt,a=e.lastCheckInDate;return t&&(!a||t>a)?`Added ${s().unix(t).fromNow()}`:a?`Checked in ${s().unix(a).fromNow()}`:""}render(){const{noun:e}=this.props,{rows:t,totalProfileListsCount:a,isLoading:n,error:o,visibleModal:i}=this.state,c="addToLists"===i,p=a>5;return l.createElement("section",{className:"tw-rounded-xl tw-border tw-border-gray-200 tw-bg-white tw-px-6 tw-py-6"},l.createElement("div",{className:"tw-mb-4 tw-flex tw-items-center tw-justify-between tw-gap-2"},l.createElement("h2",{className:"tw-m-0 tw-text-base tw-font-bold tw-text-gray-900"},e.many),l.createElement("div",{className:"tw-flex tw-items-center tw-gap-3"},!n&&!o&&l.createElement("div",{className:"tw-relative"},p&&l.createElement("span",{className:"tw-absolute -tw-right-2 -tw-top-2 tw-flex tw-h-5 tw-min-w-5 tw-items-center tw-justify-center tw-rounded-full tw-bg-gray-900 tw-px-1 tw-text-xs tw-font-medium tw-text-white"},a),l.createElement(w.$,{type:"button",variant:"outline",size:"sm",onClick:this.handleOpenAddToLists},0===t.length?"Add":"View All")))),n&&l.createElement("div",{className:"tw-space-y-2"},l.createElement(h.E,{className:"tw-h-8 tw-w-full"}),l.createElement(h.E,{className:"tw-h-8 tw-w-full"}),l.createElement(h.E,{className:"tw-h-8 tw-w-full"})),!n&&o&&l.createElement(u.Fc,{variant:"destructive"},l.createElement(r.A,{className:"tw-h-4 tw-w-4"}),l.createElement(u.XL,null,"Could not load ",e.lowerMany),l.createElement(u.TN,null,o)),!n&&!o&&0===t.length&&l.createElement("p",{className:"tw-mb-0 tw-text-sm tw-text-gray-500"},"Not in any ",e.lowerMany,"."),!n&&!o&&t.length>0&&l.createElement("div",{className:"tw-flex tw-flex-col tw-gap-2"},t.map(e=>{const t=[];e.listDate&&t.push(s().unix(e.listDate).format("M/D/YYYY h A"));const a=this.renderActivitySubtitle(e);return a&&t.push(a),l.createElement("div",{key:e.listId,className:"tw-flex tw-items-center tw-gap-3 tw-py-1"},l.createElement(m.eu,{className:"tw-h-9 tw-w-9"},e.listLogoUrl?l.createElement(m.BK,{src:e.listLogoUrl,alt:e.listName}):null,l.createElement(m.q5,{className:"tw-bg-gray-100 tw-text-xs tw-font-semibold tw-text-gray-700"},(e=>{const t=e.trim().split(/\s+/).map(e=>e.replace(/[^\p{L}\p{N}]/gu,"")).filter(Boolean);return 0===t.length?"?":1===t.length?t[0].slice(0,2).toUpperCase():(t[0][0]+t[1][0]).toUpperCase()})(e.listName))),l.createElement("div",{className:"tw-flex tw-min-w-0 tw-flex-col"},l.createElement("span",{className:"tw-text-sm tw-text-gray-900 tw-truncate"},e.listName,e.isRecurring&&l.createElement("span",{className:"tw-ml-1 tw-text-xs tw-text-gray-400"},"(Recurring)")),l.createElement("span",{className:"tw-text-xs tw-text-gray-500 tw-truncate"},t.join(" · "))))})),c&&l.createElement(d.A,{profileId:this.props.profile.id,isOpen:c,noun:e,onToggle:this.handleCloseAddToLists,onListsChanged:this.loadActivities}))}}},51196(e,t,a){a.d(t,{A:()=>x});var l=a(63696),n=a(23591),s=a(85889),r=a(10431),o=a(34627),i=a(44535),c=a(54891),d=a(19784),m=a(77673),w=a(55412),u=a(79639),h=a(45947),p=a(94634),f=a(28341),v=a(52729),g=a(26352),E=a(55578),b=a(24076),y=a(67847);const x=({profile:e,onPatch:t})=>{var a,x,N,k,C,S;const{fieldPreferences:A}=(0,b.p)(),M=e=>A.isProfilePrimaryFieldVisible(e);return l.createElement("section",{className:"tw-rounded-xl tw-border tw-border-gray-200 tw-bg-white tw-px-6 tw-py-6"},l.createElement("div",{className:"tw-space-y-5"},l.createElement(y.A,{label:"Name",icon:g.A,htmlFor:"profile-name"},l.createElement(n.p,{id:"profile-name",type:"text",autoComplete:"off",placeholder:"Name",value:null!=(a=e.name)?a:"",onChange:e=>t({name:e.target.value})})),M(E.pb.EMAIL)&&l.createElement(y.A,{label:"Email",icon:w.A,htmlFor:"profile-email"},l.createElement(n.p,{id:"profile-email",type:"email",autoComplete:"off",placeholder:"[email protected]",value:null!=(x=e.email)?x:"",onChange:e=>t({email:e.target.value})})),M(E.pb.PHONE)&&l.createElement(y.A,{label:"Phone",icon:h.A,htmlFor:"profile-phone"},l.createElement(o.A,{key:e.id,id:"profile-phone",value:null!=(N=e.phone)?N:"",onChange:e=>t({phone:e})})),M(E.pb.FAVORITE)&&l.createElement(y.A,{label:"Favorite",icon:f.A},l.createElement("div",{className:"tw-flex tw-items-center tw-gap-3"},l.createElement(r.d,{id:"profile-favorite",checked:!!e.favorite,onCheckedChange:e=>t({favorite:e})}),l.createElement("span",{className:"tw-text-sm tw-text-gray-900"},e.favorite?"Yes":"No"))),M(E.pb.UPDATED_AT)&&l.createElement(y.A,{label:"Updated At",icon:m.A,htmlFor:"profile-updated-at"},l.createElement(n.p,{id:"profile-updated-at",type:"text",disabled:!0,value:(0,c.J)(e.updatedAt)})),M(E.pb.CREATED_AT)&&l.createElement(y.A,{label:"Created At",icon:d.A,htmlFor:"profile-created-at"},l.createElement(n.p,{id:"profile-created-at",type:"text",disabled:!0,value:(0,c.J)(e.createdAt)})),M(E.pb.CHECK_IN_CODE)&&l.createElement(y.A,{label:"Code",icon:p.A,htmlFor:"profile-check-in-code"},l.createElement(n.p,{id:"profile-check-in-code",type:"text",inputMode:"numeric",autoComplete:"off",placeholder:"Check-in code",value:null!=(k=e.checkInCode)?k:"",onCh
1ange:e=>{const a=e.target.value.replace(/\D/g,"");t({checkInCode:a})}})),M(E.pb.ADDRESS)&&l.createElement(y.A,{label:"Address",icon:u.A},l.createElement(i.A,{key:e.id,value:null!=(C=e.address)?C:"",onAddressSelect:e=>t({address:e}),placeholder:"Search for an address"})),M(E.pb.NOTES)&&l.createElement(y.A,{label:"Notes",icon:v.A,htmlFor:"profile-notes"},l.createElement(s.T,{id:"profile-notes",autoComplete:"off",placeholder:"Special notes about this profile",value:null!=(S=e.notes)?S:"",onChange:e=>t({notes:e.target.value}),rows:3}))))}},24076(e,t,a){a.d(t,{A:()=>r,p:()=>s});var l=a(63696);const n=(0,l.createContext)(null),s=()=>{const e=(0,l.useContext)(n);if(!e)throw new Error("useProfileDetails must be used within ProfileDetailsContext.Provider");return e},r=n},40804(e,t,a){a.d(t,{A:()=>s});var l=a(63696),n=a(51990);const s=e=>{const{surveyData:t,didUpdate:a,responses:s}=e,r=t.data;return l.createElement("div",{className:"text-center"},r.map((e,t)=>l.createElement("div",{key:`id_survey_question_${e.id}_${t}`,className:"mt-3 border-bottom py-4"},l.createElement(n.A,{value:s[e.id]?s[e.id].value:void 0,onChangeValue:t=>a(e,t),surveyQuestion:e}))))}},53789(e,t,a){a.d(t,{A:()=>i});var l=a(63696),n=a(69255),s=a(7985),r=a(63700);const o=({response:e})=>{if(e.type===n.xV.signature){const t="string"==typeof e.value?e.value:void 0;return t?l.createElement("div",null,l.createElement("p",{className:"tw-my-0 tw-text-xs tw-text-gray-500"},e.question),l.createElement("div",{className:"tw-mt-1"},l.createElement(r.A,{src:t,alt:e.question,className:"tw-h-16 tw-w-32",fit:"contain"}))):null}return l.createElement("div",null,l.createElement("p",{className:"tw-my-0 tw-text-xs tw-text-gray-500"},e.question),l.createElement("p",{className:"tw-my-0 tw-text-sm tw-text-gray-700"},function(e){var t;if(null==e.value)return"";const a=function(e){switch(e){case n.xV.text:return"text";case n.xV.tags:return"tags";case n.xV.number:return"number";case n.xV.phone:return"phone";case n.xV.boolean:return"boolean";case n.xV.date:return"date";case n.xV.datetime:return"datetime";default:return}}(e.type);return String(a?null!=(t=(0,s.eQ)(e.value,a,!0))?t:"":e.value)}(e)||"â"))},i=({responses:e})=>{if(!(null==e?void 0:e.length))return null;const t=e.filter(e=>e.type!==n.xV.information);return 0===t.length?null:l.createElement("div",{className:"tw-space-y-3"},t.map((e,t)=>l.createElement(o,{key:t,response:e})))}},44898(e,t,a){a.d(t,{A:()=>s});var l=a(63696),n=a(53789);const s=({participant:e})=>{const t=(0,l.useMemo)(()=>{const t=e.preRegistrationSurveyData;return t?Object.entries(t).map(([e,t])=>({question:"string"==typeof(null==t?void 0:t.question)?t.question:e,value:null==t?void 0:t.value,type:null==t?void 0:t.type})):[]},[e.preRegistrationSurveyData]);return 0===t.length?null:l.createElement("section",{className:"tw-rounded-xl tw-border tw-border-gray-200 tw-bg-white tw-px-6 tw-py-6"},l.createElement("h2",{className:"tw-my-0 tw-text-base tw-font-bold tw-text-gray-900"},"Pre-registration Survey"),l.createElement("div",{className:"tw-mt-6"},l.createElement(n.A,{responses:t})))}},93589(e,t,a){a.d(t,{A:()=>f});var l=a(63696),n=a(59490),s=a(11956),r=a(91835),o=a(16125),i=a(32431),c=a(68053),d=a(88262),m=a(63551),w=a(69002),u=a(48904),h=a(59879),p=a(85744);const f=({modalVisible:e,didToggleModal:t})=>{const[a,f]=(0,l.useState)(null),v="settings"===a,g="send"===a,E=(0,l.useRef)(!1);(0,l.useEffect)(()=>{e?E.current||(E.current=!0,n.Ay.track(new n.Kc)):E.current=!1},[e]);const{linkConfig:b,hostedUrl:y,savedRevision:x,error:N,updateLinkConfig:k,applyLinkConfig:C}=(0,p.a)(e),S=!!b,{maxWidth:A,grid:M}=(0,h.N)(S?a:null),D=`/d/presentation-view/${i.ux.UNIVERSAL_CHECKIN}`,O=e=>{e||(f(null),t())};return l.createElement(r.lG,{open:e,onOpenChange:O},l.createElement(r.Cf,{hideCloseButton:!0,position:"top","data-testid":"modal-share-universal-checkin",className:(0,s.cn)(A,"tw-max-h-[95vh] tw-gap-0 tw-overflow-hidden !tw-p-0 tw-transition-[max-width] tw-duration-300 tw-ease-out")},l.createElement(r.L3,{className:"tw-sr-only"},"Universal Check-in Link and QR Code"),l.createElement(r.rr,{className:"tw-sr-only"},"Share, preview, and configure your universal check-in link."),S?l.createElement("div",{className:(0,s.cn)(M,a?"tw-h-[90vh]":"tw-max-h-[90vh]","tw-overflow-hidden")},l.createElement(d.A,{listName:"Universal Check-in Link",hostedUrl:y,settingsOpen:v,onToggleSettings:()=>f(e=>"settings"===e?null:"settings"),sendOpen:g,onSend:()=>f(e=>"send"===e?null:"send"),presentationHref:D,showRotatingQr:!1,listId:"",uniqueId:b.uniqueId,isUniversal:!0}),v&&l.createElement(c.A,{hostedUrl:y,savedRevision:x}),v&&l.createElement(w.A,{linkConfig:b,updateLinkConfig:k,applyLinkConfig:C,onClose:()=>O(!1)}),g&&l.createElement(u.A,{context:{kind:"checkin-link-share",uniqueId:b.uniqueId,hostedUrl:null!=y?y:""},onClose:()=>O(!1)})):N?l.createElement("div",{className:"tw-p-6"},l.createElement(o.Fc,{variant:"destructive"},l.createElement(o.XL,null,"Could not load the universal check-in link"),l.createElement(o.TN,null,N))):l.createElement(m.A,null)))}},85744(e,t,a){a.d(t,{a:()=>c});var l=a(63696),n=a(11583),s=a(70769),r=a(39453);const o="[useUniversalCheckInLink]",i=e=>
1new r.LG(e).getFormattedMessage(),c=e=>{const[t,a]=(0,l.useState)(),[r,c]=(0,l.useState)(!1),[d,m]=(0,l.useState)(!1),[w,u]=(0,l.useState)(0),[h,p]=(0,l.useState)(),f=(0,l.useCallback)(()=>p(void 0),[]),v=(0,l.useRef)(t);v.current=t;const g=(0,l.useRef)(!1),E=(0,l.useRef)(void 0),b=(0,l.useCallback)(async()=>{c(!0),p(void 0);try{const e=await s.Y.fetchUniversalLink();a(e),v.current=e}catch(e){console.error(o,"load",e),p(i(e))}finally{c(!1)}},[]);(0,l.useEffect)(()=>{e&&!g.current&&(g.current=!0,b())},[e,b]),(0,l.useEffect)(()=>()=>{E.current&&window.clearTimeout(E.current)},[]);const y=(0,l.useCallback)(async(e,t,l)=>{const r=!!(null==l?void 0:l.file)||!!(null==l?void 0:l.resetCoverImage);r?c(!0):m(!0),p(void 0);try{let n=e;((e,t)=>!e||e.enabled!==t.enabled||JSON.stringify(e.settings.toJSON())!==JSON.stringify(t.settings.toJSON()))(t,e)&&(n=await new s.Y(e).updateUniversalLinkSettings(e.settings)),(r||((e,t)=>!e||JSON.stringify(e.customization.toJSON())!==JSON.stringify(t.customization.toJSON()))(t,e))&&(n=await new s.Y(e).updateUniversalCustomization(e.customization,null==l?void 0:l.file,null==l?void 0:l.resetCoverImage)),r&&(a(n),v.current=n),u(e=>e+1)}catch(e){console.error(o,"persist",e),t&&(a(t),v.current=t);const l=i(e);p(l),n.oR.error(l)}finally{r?c(!1):m(!1)}},[]),x=(0,l.useCallback)((e,t)=>{const l=v.current,n=e.clone();a(n),v.current=n,y(n,l,t)},[y]),N=(0,l.useCallback)((e,t)=>{const l=v.current;if(!l)return;const n=l.clone();e(n),a(n),v.current=n,(null==t?void 0:t.debounce)?(E.current&&window.clearTimeout(E.current),E.current=window.setTimeout(()=>y(n,l,t),800)):y(n,l,t)},[y]),k=(0,l.useCallback)(async()=>{try{const e=await s.Y.fetchUniversalLink();a(e),v.current=e}catch(e){console.error(o,"refetch",e),p(i(e))}},[]);return{linkConfig:t,hostedUrl:null==t?void 0:t.hostedUrl,isLoading:r,isSaving:d,savedRevision:w,error:h,clearError:f,updateLinkConfig:N,applyLinkConfig:x,refetch:k}}},75817(e,t,a){a.d(t,{A:()=>f});var l=a(63696),n=a(59490),s=a(11956),r=a(91835),o=a(16125),i=a(32431),c=a(68053),d=a(7008),m=a(21649),w=a(68352),u=a(48904),h=a(52551),p=a(30354);const f=({modalVisible:e,didToggleModal:t})=>{const[a,f]=(0,l.useState)(null),v="settings"===a,g="send"===a,E=(0,l.useRef)(!1);(0,l.useEffect)(()=>{e?E.current||(E.current=!0,n.Ay.track(new n.UG)):E.current=!1},[e]);const{linkConfig:b,hostedUrl:y,savedRevision:x,error:N,updateLinkConfig:k,applyLinkConfig:C,refetch:S}=(0,p.W)(e),A=!!b,{maxWidth:M,grid:D}=(0,h.N)(A?a:null),O=`/d/presentation-view/${i.ux.UNIVERSAL_REGISTRATION}`,F=e=>{e||(f(null),t())};return l.createElement(r.lG,{open:e,onOpenChange:F},l.createElement(r.Cf,{hideCloseButton:!0,position:"top","data-testid":"modal-share-universal-registration",className:(0,s.cn)(M,"tw-max-h-[95vh] tw-gap-0 tw-overflow-hidden !tw-p-0 tw-transition-[max-width] tw-duration-300 tw-ease-out")},l.createElement(r.L3,{className:"tw-sr-only"},"Universal Registration Link and QR Code"),l.createElement(r.rr,{className:"tw-sr-only"},"Share, preview, and configure your universal registration link."),A?l.createElement("div",{className:(0,s.cn)(D,a?"tw-h-[90vh]":"tw-max-h-[90vh]","tw-overflow-hidden")},l.createElement(d.A,{listName:"Universal Registration Link",hostedUrl:y,settingsOpen:v,onToggleSettings:()=>f(e=>"settings"===e?null:"settings"),sendOpen:g,onSend:()=>f(e=>"send"===e?null:"send"),presentationHref:O,isUniversal:!0}),v&&l.createElement(c.A,{hostedUrl:y,savedRevision:x}),v&&l.createElement(w.A,{linkConfig:b,updateLinkConfig:k,applyLinkConfig:C,refetch:S}),g&&l.createElement(u.A,{context:{kind:"registration-link-share",uniqueId:b.uniqueId,hostedUrl:null!=y?y:""},onClose:()=>F(!1)})):N?l.createElement("div",{className:"tw-p-6"},l.createElement(o.Fc,{variant:"destructive"},l.createElement(o.XL,null,"Could not load the universal registration link"),l.createElement(o.TN,null,N))):l.createElement(m.A,null)))}},30354(e,t,a){a.d(t,{W:()=>E});var l=a(63696),n=a(11583),s=a(90054),r=a(48842),o=a(39453),i=Object.defineProperty,c=Object.defineProperties,d=Object.getOwnPropertyDescriptors,m=Object.getOwnPropertySymbols,w=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable,h=(e,t,a)=>t in e?i(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,p=(e,t)=>{for(var a in t||(t={}))w.call(t,a)&&h(e,a,t[a]);if(m)for(var a of m(t))u.call(t,a)&&h(e,a,t[a]);return e};const f="[useUniversalRegistrationLink]",v=e=>new o.LG(e).getFormattedMessage(),g=e=>{var t,a,l;return Object.assign(Object.create(s.A.prototype),e,{settings:p({},e.settings),customization:(a=p({},e.customization),l={registrationFields:[...null!=(t=e.customization.registrationFields)?t:[]]},c(a,d(l)))})},E=e=>{const[t,a]=(0,l.useState)(),[s,o]=(0,l.useState)(!1),[i,c]=(0,l.useState)(!1),[d,m]=(0,l.useState)(0),[w,u]=(0,l.useState)(),h=(0,l.useCallback)(()=>u(void 0),[]),p=(0,l.useRef)(t);p.current=t;const E=(0,l.useRef)(!1),b=(0,l.useRef)(void 0),y=(0,l.useCallback)(async()=>{o(!0),u(void 0);try{const e=await r.A.fetchLinkConfig();a(e),p.current=e}catch(e){console.error(f,"load",e),u(v(e))}finally{o(!1)}},[]);(0,l.useEffect)(()=>{e&&!E.current&&(E.current=!0,y())},[e,y]),(0,l.useEffect)(()=>()=>{b.current&&window.clearTimeout(b.current)},[]);const x=(0,l.useCallback)(async(e,t,l)=>{const s=!!(null==l?void 0:l.file)||!!(null==l?void 0:l.resetCoverImage);s?o(!0):c(!0),u(void 0);try{const t=await new r.A(e).updateSettingsAndCustomization(e.settings,e.customization,null==l?void 0:l.file,null==l?void 0:l.resetCoverImage);t.setList(e.connectedList),s&&(a(t),p.current=t),m(e=>e+1)}catch(e){console.error(f,"persist",e),t&&(a(t),p.current=t);const l=v(e);u(l),n.oR.error(l)}finally{s?o(!1):c(!1)}},[]),N=(0,l.useCallback)((e,t)=>{const l=p.current,n=g(e);a(n),p.current=n,x(n,l,t)},[x]),k=(0,l.useCallback)((e,t)=>{const l=p.current;if(!l)return;const n=g(l);e(n),a(n),p.current=n,(null==t?void 0:t.debounce)?(b.current&&window.clearTimeout(b.current),b.current=window.setTimeout(()=>x(n,l,t),800)):x(n,l,t)},[x]),C=(0,l.useCallback)(async()=>{try{const e=await r.A.fetchLinkConfig();a(e),p.current=e}catch(e){console.error(f,"refetch",e),u(v(e))}},[]);return{linkConfig:t,hostedUrl:null==t?void 0:t.hostedUrl,isLoading:s,isSaving:i,savedRevision:d,error:w,clearError:h,updateLinkConfig:k,applyLinkConfig:N,refetch:C}}}}]); 2//# chunkId=01a0cef7-9b98-7111-bc50-0753c25d192b
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.