PageSourceSearch

https://www.newyork-caregivers.com/build/assets/ShareContent-DYk95TNm.js

js newyork-caregivers.com collected 2026-09-29 14:45:22 UTC 17,467 bytes, 2 lines download raw bytes

1import{a8 as ce,a6 as A,Z as s,j as i,h as U,g as n,ad as r,p as I,i as N,aO as de,aP as z,N as j,F as E,a4 as K,s as P,a2 as v,W as x,Y as X,o as L,aN as ee,aG as te,e as w,A as ne,aj as F,aA as Y,aJ as ue,M as me,al as _e,aM as he,T as fe,c as pe}from"./vendor-core-CnGKUgNT.js";import{b as oe,a as ve}from"./OpenInAppPrompt-Du36Q9oD.js";import{i as k,f as ae,v as se}from"./EventWaitlist-DNtR5ZIV.js";import{_ as ye,G as ge}from"./ForumGuidelinesContent-u0IpKM3r.js";import{o as be,e as R}from"./HeaderItem-Bh2UgW68.js";import{g as le}from"./trualta-global-data-types-CT_5hg_q.js";import{aZ as Ie,a1 as Te,aI as Ce,z as we,aJ as ke}from"./app-routes-CoXjSNtd.js";import{u as G}from"./LocalEventConfirmationLink-D72Zqb-T.js";import{$ as Ee}from"./eventRegistrationStore-BKMDP8zw.js";try{let e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="85da2a50-c480-4136-8b5a-4d7c5eb39652",e._sentryDebugIdIdentifier="sentry-dbid-85da2a50-c480-4136-8b5a-4d7c5eb39652")}catch{}const $e={name:"CertificationModuleItem",components:{ConfirmationDialog:oe,AppIcon:k,DisplaySeatTime:ye},props:{moduleItem:{type:Object,required:!1},certificationId:{type:Number,required:!1},certification:{type:Object,required:!1},moduleId:{type:Number,required:!1},isQuizItem:{type:Boolean,required:!1},isEnrolled:{type:Boolean,default:!1}},data(){return{moduleQuizCompleted:!1,showEnrollmentDialog:!1}},mounted(){window.eventBus.$on("completed-quizzes",this.handleCompletedQuizzes)},methods:{handleIcon(e){return e&&e.type==="article"?"book-open-alt":e&&e.type==="video"?"play-solid":e&&e.type==="elearn"?"presentation-screen":"quiz"},handleUrl(e){return e&&e.url?`${e.url}?certificationId=${this.certificationId}&moduleId=${this.moduleId}`:`/certifications/${this.certification.slug}/modules/${this.handleModuleId()}/quiz`},handleModuleId(){return this.moduleId?this.certification.modules.filter(e=>e.id===this.moduleId)[0].slug:""},handleCompletedQuizzes(e){const a=e.filter(t=>t.module_id===this.moduleId);this.moduleQuizCompleted=a.length>0},handleItemClick(e){const a=this.handleUrl(e);if(this.isEnrolled){if(be){ce.visit(a);return}window.location.href=a;return}this.showEnrollmentDialog=!0},handleEnrollmentConfirm(){window.eventBus.$emit("enrollment-confirmed"),this.showEnrollmentDialog=!1}}},Ne={class:"certification-module-item__title"},De={key:0,class:"certification-module-item__type"},Le={key:1,class:"certification-module-item__type"},Ue={key:2,class:"certification-module-item__sit-time"};function Se(e,a,t,p,c,m){const l=A("AppIcon"),d=A("display-seat-time"),u=A("confirmation-dialog");return s(),i("div",{class:j(["certification-module-item",{"certification-module-item--completed":t.moduleItem&&t.moduleItem.user_contents&&t.moduleItem.user_contents.length||c.moduleQuizCompleted&&t.isQuizItem}]),role:"button",tabindex:"0",onClick:a[1]||(a[1]=y=>m.handleItemClick(t.moduleItem)),onKeydown:a[2]||(a[2]=de(z(y=>m.handleItemClick(t.moduleItem),["prevent"]),["enter"]))},[t.moduleItem&&t.moduleItem.user_contents&&t.moduleItem.user_contents.length||c.moduleQuizCompleted&&t.isQuizItem?(s(),U(l,{key:0,name:"check",class:"icon-certification-landing-info complete"})):(s(),U(l,{key:1,name:m.handleIcon(t.moduleItem),class:"icon-certification-landing-info"},null,8,["name"])),n("div",null,[n("p",Ne,r(t.moduleItem?t.moduleItem.title:e.__TT("Quiz Chapter")),1),t.moduleItem?(s(),i("span",De,r(t.moduleItem.type),1)):(s(),i("span",Le,r(e.__TT("Quiz")),1)),t.moduleItem?(s(),i("span",Ue,[I(d,{time:t.moduleItem.sit_time}
1,null,8,["time"])])):N("",!0)]),I(u,{title:e.__TT("start-this-certification"),message:e.__TT("to-access-this-chapter-you-need-to-start-the-certification"),"is-open":c.showEnrollmentDialog,"primary-action":"confirm","confirm-label":e.__TT("Start"),cancelLabel:e.__TT("Cancel"),onConfirm:m.handleEnrollmentConfirm,onCancel:a[0]||(a[0]=y=>c.showEnrollmentDialog=!1)},null,8,["title","message","is-open","confirm-label","cancelLabel","onConfirm"])],34)}const Me=le($e,[["render",Se]]),Be={components:{CertificationModuleItem:Me},props:{modules:{type:Array,required:!0},certificationId:{type:Number,required:!0},certification:{type:Object,required:!1},moduleId:{type:Number,required:!1},isQuizPresent:{type:Boolean,required:!1}}};function ze(e,a,t,p,c,m){const l=A("certification-module-item");return s(),i("div",null,[(s(!0),i(E,null,K(t.modules,d=>(s(),U(l,{"module-item":d,key:d.id,certificationId:t.certificationId,"module-id":t.moduleId,"is-enrolled":""},null,8,["module-item","certificationId","module-id"]))),128)),t.isQuizPresent?(s(),U(l,{key:0,certificationId:t.certificationId,certification:t.certification,"module-id":t.moduleId,"is-quiz-item":!0,"is-enrolled":""},null,8,["certificationId","certification","module-id"])):N("",!0)])}const Re=le(Be,[["render",ze]]),Rt=Object.freeze(Object.defineProperty({__proto__:null,default:Re},Symbol.toStringTag,{value:"Module"})),Oe=["id"],qe={class:"learning-comment__top-half"},Ae={class:"learning-comment__user"},je=["src"],Pe={class:"caption-4","data-test":"comment-author-name"},Qe={class:"is-comment-time","data-test":"comment-time"},Ve={key:0},He={class:"learning-comment__bottom-half"},We={class:"learning-comment__content"},Fe={key:0,class:"field"},Ye={key:0,class:"help is-danger","data-test":"comment-validation-error"},Ke=["innerHTML"],ie=P({__name:"LearningComment",props:{comment:{},authUserId:{},contentId:{}},emits:["delete","update"],setup(e,{emit:a}){const t=e,p=a,c=v(!1),m=v(""),l=v(null),d=w(()=>t.comment.author.id===t.authUserId),u=v(t.comment.author.displayName);function y(g){d.value&&(u.value=g)}x(()=>{window.eventBus.$on("displayNameUpdated",y)}),X(()=>{window.eventBus.$off("displayNameUpdated",y)});function S(){c.value=!0,m.value=t.comment.comment,l.value=null}function $(){c.value=!1,m.value="",l.value=null}async function C(){var g,b;l.value=null;try{const T=await R.patch(Ie.url({tenantComment:t.comment.id}),{comment:m.value,content_id:t.contentId});p("update",T.data.comment),c.value=!1}catch(T){if(T instanceof ne&&T.status===ae.UNPROCESSABLE_ENTITY){l.value=(b=(g=T.response)==null?void 0:g.data)==null?void 0:b.message;return}}}function B(){p("delete",t.comment.id)}return(g,b)=>(s(),i("li",{class:"learning-comment",id:`comment-${e.comment.id}`,"data-test":"learning-comment"},[n("div",qe,[n("div",Ae,[n("img",{src:e.comment.author.profilePicture,alt:"User photo",class:"commenter-picture",width:"46","data-test":"comment-author-picture"},null,8,je),n("span",Pe,r(u.value||g.__TT("anonymous-user")),1),n("span",Qe,r(e.comment.createdAtHuman),1)]),d.value?(s(),i("div",Ve,[c.value?(s(),i(E,{key:0},[n("button",{class:"ds-hyperlink",onClick:z(C,["prevent"]),"data-test":"comment-save-button"},r(g.__TT("Save")),1),b[1]||(b[1]=L(" | ",-1)),n("button",{class:"ds-hyperlink",onClick:z($,["prevent"]),"data-test":"comment-cancel-button"},r(g.__TT("Cancel")),1)],64)):(s(),i(E,{key:1},[n("button",{class:"ds-hyperlink",onClick:z(S,["prevent"]),"data-test":"comment-edit-button"},r(g.__TT("Edit")),1),b[2]||(b[2]=L(" | ",-1)),n("button",{class:"ds-hyperlink",onClick:z(B,["prevent"]),"data-test":"comment-delete-button"},r(g.__TT("Delete")),1)],64))])):N("",!0)]),n("div",He,[n("div",We,[c.value?(s(),i("div",Fe,[ee(n("textarea",{"onUpdate:modelValue":b[0]||(b[0]=T=>m.value=T),class:"textarea",name:"updated_comment","data-test":"comment-edit-textarea"},null,512),[[te,m.value]]),l.value?(s(),i("p",Ye,r(l.value),1)):N("",!0)])):(s(),i("p",{key:1,class:"p-1",innerHTML:e.comment.comment,"data-test":"comment-content"},null,8,Ke))])])],8,Oe))}}),Ge={class:"display-name"},Je={class:"display-name__name"},Ze=P({__name:"UserDisplayName",props:{authUser:{}},setup(e){const a=e,{openModal:t,closeTopModal:p}=G(),{translate:c}
1=se(),m=v(a.authUser.displayName);function l(){t(ge,{userId:a.authUser.id,currentDisplayName:m.value??"",isEdit:!0,title:c("Display Name"),onCompleted:d=>{d!==null&&(m.value=d,window.eventBus.$emit("displayNameUpdated",d)),p()}})}return(d,u)=>(s(),i("section",Ge,[n("span",Je,r(m.value||d.__TT("anonymous-user")),1),n("button",{class:"ds-hyperlink",onClick:l},[I(k,{name:"pen-to-square"}),n("span",null,r(d.__TT("Edit Display Name")),1)])]))}}),xe={class:"ds-modal__header"},Xe={id:"learning-comments-modal-title",class:"h-4"},et=["aria-label"],tt={class:"learning-comments-modal__comments","data-test":"modal-comments-list"},nt=P({__name:"LearningCommentsModal",props:{commentsRef:{},authUserId:{},contentId:{},onDelete:{type:Function},onUpdate:{type:Function}},setup(e){const{closeTopModal:a}=G();return(t,p)=>(s(),i(E,null,[n("header",xe,[n("h4",Xe,r(t.__TT("Comments"))+" ("+r(e.commentsRef.length)+") ",1),n("button",{type:"button",class:"ds-modal__close",onClick:p[0]||(p[0]=(...c)=>F(a)&&F(a)(...c)),"aria-label":t.__TT("Close comments list")},[I(k,{name:"close",class:"icon--trualta-green"})],8,et)]),p[1]||(p[1]=n("hr",{class:"main-divider"},null,-1)),n("ul",tt,[(s(!0),i(E,null,K(e.commentsRef,c=>(s(),U(ie,{key:c.id,comment:c,"auth-user-id":e.authUserId,"content-id":e.contentId,onDelete:e.onDelete,onUpdate:e.onUpdate},null,8,["comment","auth-user-id","content-id","onDelete","onUpdate"]))),128))])],64))}}),ot={class:"learning-comments no-print",id:"learning-comments-section"},at={class:"prompt-icon","aria-hidden":"true"},st={class:"h-2"},lt={class:"learning-comments__user"},it=["src"],rt={class:"learning-comments__form"},ct={class:"field"},dt={key:0,class:"help is-danger","data-test":"comment-validation-error"},ut=["disabled"],mt={key:0,class:"learning-comments__comments","data-test":"comments-list"},J=5,_t=P({__name:"LearningCommentsSection",props:{contentId:{},authUser:{}},setup(e){const a=e,{openModal:t}=G(),p=w(()=>{const o=u.value.slice(0,J);if(y.value!==null&&!o.some(_=>_.id===y.value)){const _=u.value.find(f=>f.id===y.value);if(_)return[_,...o]}return o}),c=w(()=>u.value.length>J),m=Y("comments-prompt"),l=v(""),d=v(null),u=v([]),y=v(null),S=v(!1),$=v(!1),C=v(null);ue(()=>u.value.length,o=>{window.eventBus.$emit("learning-comments:count-updated",o)});async function B(){const o=await R.get(Te.url({content:a.contentId}));u.value=o.data}async function g(){var o,_;try{const f=await R.post(Ce.url(),{comment:l.value,content_id:a.contentId});u.value.unshift(f.data.comment),l.value=""}catch(f){if(f instanceof ne&&f.status===ae.UNPROCESSABLE_ENTITY){d.value=(_=(o=f.response)==null?void 0:o.data)==null?void 0:_.message;return}}}function b(o){const _=u.value.findIndex(f=>f.id===o.id);_!==-1&&(u.value[_]=o)}function T(o){C.value=o,$.value=!0}async function Q(){if(C.value!==null)try{await R.delete(we.url({tenantComment:C.value})),u.value=u.value.filter(o=>o.id!==C.value)}catch(o){console.error("Error deleting comment:",o)}finally{$.value=!1,C.value=null}}function V(){$.value=!1,C.value=null}function H(){t(nt,{commentsRef:u,authUserId:a.authUser.id,contentId:a.contentId,onDelete:T,onUpdate:b},{size:"standard",lightDismiss:!0,draggable:!0,animated:!0,ariaLabelledBy:"learning-comments-modal-title",className:"learning-comments-modal ds-modal--slide-up"})}function h(){if(!m.value)return;const o=m.value.getBoundingClientRect(),_=window.innerHeight;S.value=o.top<_*.85&&o.bottom>0}function O(o){const M=()=>o.scrollIntoView({behavior:"auto",block:"center"});M();const re=window.setInterval(M,100),D=()=>{window.clearInterval(re),window.removeEventListener("wheel",D),window.removeEventListener("touchstart",D),window.removeEventListener("keydown",D)};window.setTimeout(D,2500),window.addEventListener("wheel",D,{passive:!0}),window.addEventListener("touchstart",D,{passive:!0}),window.addEventListener("keydown",D),Array.from(document.images).filter(q=>!q.complete).forEach(q=>{q.addEventListener("load",M,{once:!0}),q.addEventListener("error",M,{once:!0})})}async function W(){const o=window.location.hash.match(/^#comment-(\d+)$/);if(!o)return;const _=Number(o[1]);if(!u.value.some(M=>M.id===_))return;y.value=_,await me();const f=document.getElementById(`comment-${_}`);f&&O(f)}return x(async()=>{window.addEventListener("scroll",h),h(),await B(),await W()}),X(()=>{window.removeEventListener("scroll",h)}),(o,_)=>(s(),i("section",ot,[n("div",{ref:"comments-prompt",class:j(["learning-comments__prompt",{"learning-comments__prompt--animate":S.value}]),"data-test":"comments-prompt"},[n("div",at,[I(k,{name:"light-bulb-on",class:"icon--alternative-yellow"}
1)]),n("h2",st,r(e.authUser.displayName)+", "+r(o.__TT("learning-comments-prompt")),1)],2),n("div",lt,[I(Ze,{"auth-user":e.authUser},null,8,["auth-user"]),n("img",{src:e.authUser.profilePicture,class:"commenter-picture",alt:"user photo"},null,8,it)]),n("div",rt,[n("div",ct,[ee(n("textarea",{"onUpdate:modelValue":_[0]||(_[0]=f=>l.value=f),id:"comment",class:"textarea",placeholder:"Comment",name:"comment","data-test":"new-comment-textarea"},null,512),[[te,l.value]]),d.value?(s(),i("p",dt,r(d.value),1)):N("",!0)]),n("button",{id:"BTN_learning-comments-post",class:"ds-button ds-button--outlined",onClick:g,disabled:l.value.trim()==="","data-test":"post-comment-button"},r(o.__TT("Post Comment")),9,ut)]),u.value.length?(s(),i("ul",mt,[(s(!0),i(E,null,K(p.value,f=>(s(),U(ie,{key:f.id,comment:f,"auth-user-id":e.authUser.id,"content-id":e.contentId,onDelete:T,onUpdate:b},null,8,["comment","auth-user-id","content-id"]))),128))])):N("",!0),c.value?(s(),i("button",{key:1,id:"BTN_learning-comments-show-all",class:"ds-hyperlink",onClick:H,"data-test":"show-more-comments-button"},r(o.__TT("show-all-comments"))+" ("+r(u.value.length)+") ",1)):N("",!0),I(oe,{"is-open":$.value,title:o.__TT("Are you sure you want to delete this comment?"),"confirm-label":o.__TT("Yes"),"cancel-label":o.__TT("No"),"primary-action":"confirm",onConfirm:Q,onCancel:V},null,8,["is-open","title","confirm-label","cancel-label"])]))}}),Ot=Object.freeze(Object.defineProperty({__proto__:null,default:_t},Symbol.toStringTag,{value:"Module"})),ht=["id","aria-busy"],ft={key:0,class:"sr-only"},pt={class:"ds-modal__header"},vt={class:"ds-modal__article"},yt=["innerHTML"],gt={class:"ds-modal__footer"},bt={class:"ds-modal__menu"},It={class:"ds-modal__menu-item"},Tt=["id","disabled"],Ct={class:"ds-modal__menu-item"},wt={key:0,class:"ds-button ds-button--light",disabled:""},kt=["id","href"],Z="share-resource-dialog",Et={__name:"ShareContent",props:{globalId:{type:Number,required:!0},resourceTitle:{type:String,required:!0},type:{type:String,required:!0,validator:e=>Ee.includes(e)},look:{type:String,default:"button",validator:e=>["button","hyperlink"].includes(e)}},setup(e){const a=e,t=se(),p=Y("vDialogRef"),c=Y("shareButtonRef"),m=v(!1),l=v(null),d=v(""),{copy:u,copied:y}=_e({source:d,copiedDuring:1e3}),S=w(()=>l.value?l.value:t.translate("share-resource-copy-title")),$=w(()=>l.value?t.translate("share-resource-limit-reached"):t.translate("share-resource-copy-description",{resource:a.resourceTitle})),C=w(()=>a.look==="hyperlink"?"ds-hyperlink":"ds-button"),B=w(()=>y.value?"ds-button-secondary ds-button-secondary--light":"ds-button ds-button--light"),g=w(()=>{var o;const h=a.type==="elearn"?t.translate("resource").toLowerCase():t.translate(a.type).toLowerCase(),O=a.resourceTitle.trim(),W=(o=d.value)==null?void 0:o.trim();return encodeURIComponent(t.translate("share-resource-email-body",{type:h,title:O,link:W}))}),b=w(()=>`mailto:?subject=${encodeURIComponent(t.translate("share-resource-email-subject"))}&body=${g.value}`);async function T(){d.value=await V(),p.value.show()}function Q(){u(),setTimeout(()=>{p.value.close()},600)}async function V(){try{const{data:h}=await R.post(ke.url(),{resource_global_id:a.globalId,resource_type:a.type});return l.value=null,h.guest_link}catch(h){if(pe.isAxiosError(h)){l.value=h.response.data.message;return}return l.value="Something went wrong generating the link.",""}}function H(){y.value=!1,d.value=""}return(h,O)=>
1(s(),i(E,null,[n("button",{id:`BTN_share-resource-${e.globalId}`,ref_key:"shareButtonRef",ref:c,onClick:T,class:j(C.value),"aria-haspopup":"dialog","aria-busy":m.value},[I(k,{name:"external-link"}),L(" "+r(h.__TT("Share"))+" ",1),m.value?(s(),i("span",ft,r(h.__TT("Loading")),1)):N("",!0)],10,ht),(s(),U(fe,{to:"body"},[I(ve,{ref_key:"vDialogRef",ref:p,size:"mini",draggable:"","aria-labelledby":Z,animated:"","trigger-element":c.value,class:"share ds-modal--slide-up",onClosed:H},{default:he(()=>[n("header",pt,[n("h3",{id:Z,class:"ds-modal__title"},r(S.value),1)]),n("article",vt,[n("p",{class:"ds-modal__description",innerHTML:$.value},null,8,yt)]),n("footer",gt,[n("menu",bt,[n("li",It,[n("button",{id:`BTN_copy-shareable-link-${e.globalId}`,onClick:Q,type:"button",class:j(B.value),disabled:l.value},[F(y)?(s(),i(E,{key:0},[I(k,{name:"check-circle-solid",class:"icon-check-circle bg-color-green icon-md"}),L(" "+r(h.__TT("copied")),1)],64)):(s(),i(E,{key:1},[I(k,{name:"link"}),L(" "+r(h.__TT("copy-link")),1)],64))],10,Tt)]),n("li",Ct,[l.value?(s(),i("button",wt,[I(k,{name:"envelope"}),L(" "+r(h.__TT("email")),1)])):(s(),i("a",{key:1,id:`LNK_email-shareable-link-${e.globalId}`,href:b.value,role:"button",class:"ds-button ds-button--light"},[I(k,{name:"envelope"}),L(" "+r(h.__TT("email")),1)],8,kt))])])])]),_:1},8,["trigger-element"])]))],64))}},qt=Object.freeze(Object.defineProperty({__proto__:null,default:Et},Symbol.toStringTag,{value:"Module"}));export{Me as C,Ot as L,qt as S,_t as _,Re as a,Rt as b,Et as c};
2//# sourceMappingURL=ShareContent-DYk95TNm.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.