PageSourceSearch

https://engage-easy.web.app/assets/ViewSharedCourse-C-QxdPX5.js

js engage-easy.web.app collected 2026-10-03 12:22:43 UTC 2,676 bytes, 2 lines download raw bytes

1import{a0 as v,g4 as k,ap as C,l as I,r as i,u as N,j as s,A as _,ab as L,W as y,ao as S,ac as P,p as R,av as q,q as A,g5 as D,g6 as U,ae as T}from"./prerender-L9pmTMDN.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};n.SENTRY_RELEASE={id:"[email protected]"};var r=new n.Error().stack;r&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[r]="d2699778-e132-42eb-b6bc-53f2b0551d7a",n._sentryDebugIdIdentifier="sentry-dbid-d2699778-e132-42eb-b6bc-53f2b0551d7a")}catch{}})();function F(){const{plainLabel:n}=v(),{onAuthStateChangedCalled:r}=k(),{linkId:d}=C(),u=new URLSearchParams(I().search).get("doNotIncrementViewCount")||"",[a,f]=i.useState(),[m,c]=i.useState(""),o=i.useRef(null),{data:p,isFetching:j,isFetched:E}=N([A.user.viewSharedCourse,d,u,m],()=>{var e;if(!d)throw new Error("linkId is required");return U(d,{password:m,email:((e=T())==null?void 0:e.email)||void 0,doNotIncrementViewCount:u})},{enabled:r,onSuccess:()=>{f(void 0)},onError:e=>{var x,b,g,h;const w=((b=(x=e==null?void 0:e.response)==null?void 0:x.data)==null?void 0:b.code)||"unknown",l=((h=(g=e==null?void 0:e.response)==null?void 0:g.data)==null?void 0:h.message)||(e==null?void 0:e.message)||"Unknown error";f({code:w,message:l}),D(l,{transactionName:"fetchCourseByLink",extra:{code:w,message:l}})}}),t=j&&!E;return a!=null&&a.code?a.code==="password_required"||a.code==="password_incorrect"?s.jsx("div",{className:"flex justify-center items-center flex-1 flex-col",children:s.jsxs("div",{className:"w-full max-w-md bg-white border border-gray-300 rounded shadow-sm p-12 text-center flex flex-col",children:[s.jsx("h2",{children:"Password required"}),(a==null?void 0:a.code)==="password_incorrect"&&s.jsx(_,{danger:!0,children:"Incorrect password"}),s.jsx(L.Input,{children:s.jsx("input",{name:"password",placeholder:n("Password"),type:"password",className:"w-full",disabled:t,onKeyUp:e=>{(e.key==="Enter"||e.keyCode===13)&&c(e.currentTarget.value)},ref:o})}),s.jsx(y,{size:"small",onClick:()=>{o.current&&c(o.current.value)},disabled:t,loading:t,outline:t,className:"mt-8 self-center",children:"confirm"})]})}):s.jsxs("div",{className:"flex justify-center items-center flex-1 flex-col",children:[s.jsx(S,{type:"Error",description:a==null?void 0:a.message}),a.code==="unknown"&&s.jsx(y,{onClick:()=>{o.current&&c(o.current.value)},disabled:t,loading:t,size:"small",className:"mt-5 flex-0",children:"try again"})]}):P.isEmpty(p)?s.jsx(R,{}):s.jsx("div",{className:"flex-1 bg-white",children:s.jsx(q,{course:p,scormDisabled:!0})})}export{F as default};
2//# sourceMappingURL=ViewSharedCourse-C-QxdPX5.js.map

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.