You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

1 lines
24 KiB

var G=Object.defineProperty;var R=(e,s,i)=>s in e?G(e,s,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[s]=i;var f=(e,s,i)=>R(e,typeof s!="symbol"?s+"":s,i);import{V as O,f as A,e as N,y as H,C as M,_ as V,g as C,h as r,i as a,j as o,k as m,t as g,l as u,m as J,v as W,F as k,z as I,x as n}from"./index-BLqts8WY.js";import{G as q}from"./GiftedDialog-CFmou4Be.js";import{O as Q}from"./OfferDialog-BFpCo0de.js";import{T as z}from"./TopMessage-BE0GBIgW.js";import{Q as Y}from"./QuickNav-DgCyvgDx.js";import{E as K}from"./EntityIcon-CF1RwQI5.js";import{P as X}from"./ProjectIcon-BlrP4rvy.js";import{l as Z,s as ee,e as te,g as T,B as $,aN as ie,v as se,i as oe,aO as re,C as E,k as ne,n as le,p as ae,q as de,u as ce}from"./index-MyY_xqVN.js";import{_ as he}from"./blank-square-D9dGgMJw.js";import"./index-CsfPLOYu.js";var fe=Object.defineProperty,ue=Object.getOwnPropertyDescriptor,pe=(e,s,i,l)=>{for(var c=l>1?void 0:l?ue(s,i):s,p=e.length-1,d;p>=0;p--)(d=e[p])&&(c=(l?d(s,i,c):d(c))||c);return l&&c&&fe(s,i,c),c};let U=class extends O{constructor(){super(...arguments);f(this,"$notify");f(this,"activeDid","");f(this,"agentDid","");f(this,"allMyDids",[]);f(this,"allContacts",[]);f(this,"apiServer","");f(this,"checkingConfirmationForJwtId","");f(this,"description","");f(this,"expanded",!1);f(this,"fulfilledByThis",null);f(this,"fulfillersToThis",[]);f(this,"fulfillersToHitLimit",!1);f(this,"givesToThis",[]);f(this,"givesHitLimit",!1);f(this,"givesProvidedByThis",[]);f(this,"givesProvidedByHitLimit",!1);f(this,"imageUrl","");f(this,"isRegistered",!1);f(this,"issuer","");f(this,"latitude",0);f(this,"longitude",0);f(this,"name","");f(this,"offersToThis",[]);f(this,"offersHitLimit",!1);f(this,"projectId","");f(this,"recentlyCheckedAndUnconfirmableJwts",[]);f(this,"showDidCopy",!1);f(this,"startTime","");f(this,"truncatedDesc","");f(this,"truncateLength",40);f(this,"url","");f(this,"libsUtil",Z);f(this,"serverUtil",ee)}async created(){const i=await A();this.activeDid=i.activeDid||"",this.apiServer=i.apiServer||"",this.allContacts=await N.contacts.toArray(),this.isRegistered=!!i.isRegistered;try{this.allMyDids=await te()}catch(c){H("Error retrieving all account DIDs on home page:"+c,!0),this.$notify({group:"alert",type:"danger",title:"Error Loading Profile",text:"See the Help page to fix problems with your personal data."},-1)}const l=window.location.pathname.substring(9);l&&(this.projectId=decodeURIComponent(l)),this.loadProject(this.projectId,this.activeDid)}onEditClick(){const i={name:"new-edit-project",query:{projectId:this.projectId}};this.$router.push(i)}expandText(){this.expanded=!0}collapseText(){this.expanded=!1}async loadProject(i,l){var d,v,h,D,x,j,P,t,b,w,L,B,S;this.projectId=i;const c=this.apiServer+"/api/claim/byHandle/"+encodeURIComponent(i),p=await T(l);try{const y=await this.axios.get(c,{headers:p});if(y.status===200){const _=(d=y.data.claim)==null?void 0:d.startTime;if(_!=null){const F=new Date(_);this.startTime=F.toLocaleDateString()+" "+F.toLocaleTimeString()}this.agentDid=(h=(v=y.data.claim)==null?void 0:v.agent)==null?void 0:h.identifier,this.imageUrl=(D=y.data.claim)==null?void 0:D.image,this.issuer=y.data.issuer,this.name=((x=y.data.claim)==null?void 0:x.name)||"(no name)",this.description=((j=y.data.claim)==null?void 0:j.description)||"(no description)",this.truncatedDesc=this.description.slice(0,this.truncateLength),this.latitude=((b=(t=(P=y.data.claim)==null?void 0:P.location)==null?void 0:t.geo)==null?void 0:b.latitude)||0,this.longitude=((B=(L=(w=y.data.claim)==null?void 0:w.location)==null?void 0:L.geo)==null?void 0:B.longitude)||0,this.url=((S=y.data.claim)==null?void 0:S.url)||""}else console.error("Error getting project:",y),this.$notify({group:"alert",type:"danger",title:"Error",text:"There was a problem getting that project."},5e3)}catch(y){console.error("Error retrieving project:",y),this.$notify({group:"alert",type:"danger",title:"Error",text:"Something went wrong retrieving that project."},5e3)}this.givesToThis=[],this.loadGives(),this.givesProvidedByThis=[],this.loadGivesProvidedBy(),this.offersToThis=[],this.loadOffers(),this.fulfillersToThis=[],this.loadPlanFulfillersTo(),this.fulfilledByThis=null,this.loadPlanFulfilledBy()}async loadGives(){const i=this.apiServer+"/api/v2/report/givesToPlans?planIds="+encodeURIComponent(JSON.stringify([this.projectId]));let l="";this.givesToThis.length>0&&(l="&beforeId="+this.givesToThis[this.givesToThis.length-1].jwtId);const c=i+l,p=await T(this.activeDid);try{const d=await this.axios.get(c,{headers:p});d.status===200&&d.data.data?(this.givesToThis=this.givesToThis.concat(d.data.data),this.givesHitLimit=d.data.hitLimit):this.$notify({group:"alert",type:"danger",title:"Error",text:"Failed to retrieve more gives to this project."},5e3)}catch(d){const v=d;this.$notify({group:"alert",type:"danger",title:"Error",text:"Something went wrong retrieving more gives to this project."},5e3),console.error("Something went wrong retrieving more gives to this project:",v.message)}}async loadGivesProvidedBy(){const i=this.apiServer+"/api/v2/report/givesProvidedBy?providerId="+encodeURIComponent(this.projectId);let l="";this.givesProvidedByThis.length>0&&(l="&beforeId="+this.givesProvidedByThis[this.givesProvidedByThis.length-1].jwtId);const c=i+l,p=await T(this.activeDid);try{const d=await this.axios.get(c,{headers:p});d.status===200?(this.givesProvidedByThis=this.givesProvidedByThis.concat(d.data.data),this.givesProvidedByHitLimit=d.data.hitLimit):this.$notify({group:"alert",type:"danger",title:"Error",text:"Failed to retrieve gives that were provided by this project."},5e3)}catch(d){const v=d;this.$notify({group:"alert",type:"danger",title:"Error",text:"Something went wrong retrieving gives that were provided by this project."},5e3),console.error("Something went wrong retrieving gives that were provided by this project:",v.message)}}async loadOffers(){const i=this.apiServer+"/api/v2/report/offersToPlans?planIds="+encodeURIComponent(JSON.stringify([this.projectId]));let l="";this.offersToThis.length>0&&(l="&beforeId="+this.offersToThis[this.offersToThis.length-1].jwtId);const c=i+l,p=await T(this.activeDid);try{const d=await this.axios.get(c,{headers:p});d.status===200&&d.data.data?(this.offersToThis=this.offersToThis.concat(d.data.data),this.offersHitLimit=d.data.hitLimit):this.$notify({group:"alert",type:"danger",title:"Error",text:"Failed to retrieve more offers to this project."},5e3)}catch(d){const v=d;this.$notify({group:"alert",type:"danger",title:"Error",text:"Something went wrong retrieving more offers to this project."},5e3),console.error("Something went wrong retrieving more offers to this project:",v.message)}}async loadPlanFulfillersTo(){const i=this.apiServer+"/api/v2/report/planFulfillersToPlan?planHandleId="+encodeURIComponent(this.projectId);let l="";this.fulfillersToThis.length>0&&(l="&beforeId="+this.fulfillersToThis[this.fulfillersToThis.length-1].jwtId);const c=i+l,p=await T(this.activeDid);try{const d=await this.axios.get(c,{headers:p});d.status===200?(this.fulfillersToThis=this.fulfillersToThis.concat(d.data.data),this.fulfillersToHitLimit=d.data.hitLimit):this.$notify({group:"alert",type:"danger",title:"Error",text:"Failed to retrieve more plans that fullfill this project."},5e3)}catch(d){const v=d;this.$notify({group:"alert",type:"danger",title:"Error",text:"Something went wrong retrieving more plans that fulfull this project."},5e3),console.error("Something went wrong retrieving more plans that fulfill this project:",v.message)}}async loadPlanFulfilledBy(){const i=this.apiServer+"/api/v2/report/planFulfilledByPlan?planHandleId="+encodeURIComponent(this.projectId),l=await T(this.activeDid);try{const c=await this.axios.get(i,{headers:l});c.status===200?this.fulfilledByThis=c.data.data:this.$notify({group:"alert",type:"danger",title:"Error",text:"Failed to retrieve plans fulfilled by this project."},5e3)}catch(c){const p=c;this.$notify({group:"alert",type:"danger",title:"Error",text:"Something went wrong retrieving plans fulfilled by this project."},5e3),console.error("Error retrieving plans fulfilled by this project:",p.message)}}async onClickLoadProject(i){const l={path:"/project/"+encodeURIComponent(i)};this.$router.push(l),this.loadProject(i,this.activeDid)}getOpenStreetMapUrl(){return"https://www.openstreetmap.org/?mlat="+this.latitude+"&mlon="+this.longitude+"#map=15/"+this.latitude+"/"+this.longitude}openGiftDialogToProject(i){this.$refs.giveDialogToThis.open(i,void 0,void 0,((i==null?void 0:i.name)||"Someone not named")+" gave to this project")}openGiftDialogFromProject(){this.$refs.giveDialogFromThis.open(void 0,{did:this.activeDid,name:"You"},void 0,"This project gave to you")}openOfferDialog(){this.$refs.customOfferDialog.open()}onClickAllContactsGifting(){const i={name:"contact-gift",query:{projectId:this.projectId}};this.$router.push(i)}onClickLoadClaim(i){const l={path:"/claim/"+encodeURIComponent(i)};this.$router.push(l)}checkIsFulfillable(i){const l={...$,claim:i.fullClaim,claimType:"Offer",issuer:i.offeredByDid};return ie(l)}onClickFulfillGiveToOffer(i){const l={...$,claim:i.fullClaim,issuer:i.offeredByDid},c={did:se(l)};this.$refs.giveDialogToThis.open(c,void 0,i.handleId,"Given by "+((c==null?void 0:c.name)||"someone not named"))}addScheme(i){return oe(i)?i:"https://"+i}domainForWebsite(i){try{const l=new URL(i).hostname;return l?i.endsWith(l)?l:l+"...":i}catch{return i}}checkIsConfirmable(i,l){const c={...$,claim:i.fullClaim,claimType:"GiveAction",issuer:i.issuerDid};return re(this.isRegistered,c,this.activeDid,l)}shallowNotifyWhyCannotConfirm(i){const l=this.recentlyCheckedAndUnconfirmableJwts.includes(i.jwtId)?[this.activeDid]:[];E(this.$notify,this.isRegistered,"GiveAction",i,this.activeDid,l)}async deepCheckConfirmable(i){this.checkingConfirmationForJwtId=i.jwtId;const l=await ne(this.apiServer,i.jwtId,i.issuerDid,this.activeDid);this.checkIsConfirmable(i,l==null?void 0:l.confirmerIdList)?this.confirmConfirmClaim(i):(this.recentlyCheckedAndUnconfirmableJwts=[...this.recentlyCheckedAndUnconfirmableJwts,i.jwtId],E(this.$notify,this.isRegistered,"GiveAction",i,this.activeDid,l==null?void 0:l.confirmerIdList)),this.checkingConfirmationForJwtId=""}confirmConfirmClaim(i){this.$notify({group:"modal",type:"confirm",title:"Confirm",text:"Do you personally confirm that this is true?",onYes:async()=>{await this.confirmClaim(i)}},-1)}async confirmClaim(i){var d;const c={"@context":"https://schema.org","@type":"AgreeAction",object:le(ae(de(i.fullClaim,i.jwtId,i.handleId)))},p=await ce(c,this.activeDid,this.apiServer,this.axios);if(p.type==="success")this.$notify({group:"alert",type:"success",title:"Success",text:"Confirmation submitted."},5e3),this.recentlyCheckedAndUnconfirmableJwts=[...this.recentlyCheckedAndUnconfirmableJwts,i.jwtId];else{console.error("Got error submitting the confirmation:",p);const v=((d=p.error)==null?void 0:d.error)||"There was a problem submitting the confirmation.";this.$notify({group:"alert",type:"danger",title:"Error",text:v},5e3)}}};U=pe([M({components:{EntityIcon:K,GiftedDialog:q,OfferDialog:Q,ProjectIcon:X,QuickNav:Y,TopMessage:z}})],U);const me={id:"Content",class:"p-6 pb-24 max-w-3xl mx-auto"},ge={id:"ViewBreadcrumb"},ve={class:"text-lg text-center font-light relative px-7"},ye={class:"text-xl font-semibold"},be={class:"bg-slate-100 rounded-md overflow-hidden px-4 py-3 mt-4"},we={class:"pb-4 flex gap-4"},Ce={class:"pt-1"},ke={class:"overflow-hidden"},Te={class:"text-sm mb-3"},je={class:"truncate"},Ie={key:0},De={key:0},xe={key:1},Pe=["href"],$e={key:2},Ue=["href"],Le={class:"text-sm text-slate-500"},Be={key:0},Se={key:1},_e={class:"grid items-start grid-cols-1 sm:grid-cols-2 gap-4 mt-4"},Fe={key:0,class:"bg-slate-100 px-4 py-3 rounded-md"},Ee={class:"text-center"},Ge=["onClick"],Re={key:0,class:"text-center"},Oe={key:0,class:"bg-slate-100 px-4 py-3 rounded-md"},Ae={class:"text-center"},Ne={key:0},He={class:"grid grid-cols-4 sm:grid-cols-5 md:grid-cols-6 gap-x-3 gap-y-5 text-center mb-5 mt-2"},Me=["onClick"],Ve={class:"text-xs text-blue-500 font-medium text-ellipsis whitespace-nowrap overflow-hidden cursor-pointer"},Je={class:"grid items-start grid-cols-1 sm:grid-cols-3 gap-4 mt-4"},We={class:"bg-slate-100 px-4 py-3 rounded-md"},qe={key:0},Qe={class:"text-center"},ze={key:1},Ye={key:2,class:"text-sm border-t border-slate-300"},Ke={class:"flex justify-between gap-4"},Xe={key:0,class:"whitespace-nowrap"},Ze={key:0,class:"text-slate-500"},et={class:"flex justify-between"},tt=["onClick"],it=["onClick"],st={key:3,class:"text-center text-blue-500"},ot={class:"bg-slate-100 px-4 py-3 rounded-md","data-testId":"gives-to"},rt={key:0},nt={class:"text-center"},lt={key:1},at={key:2,class:"text-sm border-t border-slate-300"},dt={class:"flex justify-between gap-4"},ct={key:0,class:"whitespace-nowrap"},ht={class:"text-slate-500"},ft={key:0,class:"text-slate-500"},ut={class:"flex justify-between"},pt=["onClick"],mt=["onClick"],gt={key:1},vt=["onClick"],yt={key:1,class:"flex justify-center"},bt=["href"],wt=["src"],Ct={key:3,class:"text-center text-blue-500"},kt={class:"bg-slate-100 px-4 py-3 rounded-md","data-testId":"gives-from"},Tt={key:0},jt={class:"text-center"},It={key:1},Dt={key:2,class:"text-sm border-t border-slate-300"},xt={class:"flex justify-between gap-4"},Pt={key:0,class:"whitespace-nowrap"},$t={class:"text-slate-500"},Ut={key:0,class:"text-slate-500"},Lt={class:"flex justify-between"},Bt=["onClick"],St=["onClick"],_t={key:1},Ft=["onClick"],Et={key:1,class:"flex justify-center"},Gt=["href"],Rt=["src"],Ot={key:3,class:"text-center"};function At(e,s,i,l,c,p){const d=C("QuickNav"),v=C("TopMessage"),h=C("fa"),D=C("ProjectIcon"),x=C("EntityIcon"),j=C("GiftedDialog"),P=C("OfferDialog");return n(),r(k,null,[a(d),a(v),o("section",me,[o("div",ge,[o("h1",ve,[o("button",{onClick:s[0]||(s[0]=t=>e.$router.go(-1)),class:"text-lg text-center px-2 py-1 absolute -left-2 -top-1"},[a(h,{icon:"chevron-left",class:"fa-fw"})]),s[18]||(s[18]=m(" Project Idea "))]),o("h2",ye,[m(g(e.name)+" ",1),e.activeDid===e.issuer||e.activeDid===e.agentDid?(n(),r("button",{key:0,onClick:s[1]||(s[1]=t=>e.onEditClick()),title:"Edit","data-testId":"editClaimButton"},[a(h,{icon:"pen",class:"text-sm text-blue-500 ml-2 mb-1"})])):u("",!0)])]),o("div",be,[o("div",null,[o("div",we,[o("div",Ce,[a(D,{entityId:e.projectId,iconSize:64,imageUrl:e.imageUrl,linkToFull:!0,class:"block border border-slate-300 rounded-md max-h-16 max-w-16"},null,8,["entityId","imageUrl"])]),o("div",ke,[o("div",Te,[o("div",je,[a(h,{icon:"user",class:"fa-fw text-slate-400"}),m(" "+g(e.serverUtil.didInfo(e.issuer,e.activeDid,e.allMyDids,e.allContacts))+" ",1),e.serverUtil.isEmptyOrHiddenDid(e.issuer)?u("",!0):(n(),r("span",Ie,[o("button",{onClick:s[2]||(s[2]=t=>e.libsUtil.doCopyTwoSecRedo(e.issuer,()=>e.showDidCopy=!e.showDidCopy)),class:"ml-2 mr-2"},[a(h,{icon:"copy",class:"text-slate-400 fa-fw"})]),J(o("span",null,"Copied DID",512),[[W,e.showDidCopy]])]))]),e.startTime?(n(),r("div",De,[a(h,{icon:"calendar",class:"fa-fw text-slate-400"}),m(" "+g(e.startTime),1)])):u("",!0),e.latitude||e.longitude?(n(),r("div",xe,[a(h,{icon:"location-dot",class:"fa-fw text-slate-400"}),o("a",{href:e.getOpenStreetMapUrl(),target:"_blank",class:"underline"},[s[19]||(s[19]=m("Map View ")),a(h,{icon:"arrow-up-right-from-square",class:"fa-fw"})],8,Pe)])):u("",!0),e.url?(n(),r("div",$e,[a(h,{icon:"globe",class:"fa-fw text-slate-400"}),o("a",{href:e.addScheme(e.url),target:"_blank",class:"underline"},[m(g(e.domainForWebsite(this.url))+" ",1),a(h,{icon:"arrow-up-right-from-square",class:"fa-fw"})],8,Ue)])):u("",!0)])])]),o("div",Le,[e.expanded?(n(),r("div",Se,[m(g(e.description)+" ",1),o("a",{onClick:s[4]||(s[4]=(...t)=>e.collapseText&&e.collapseText(...t)),class:"uppercase text-xs font-semibold text-slate-700"},"- Read Less")])):(n(),r("div",Be,[m(g(e.truncatedDesc)+" ",1),e.description.length>=e.truncateLength?(n(),r("a",{key:0,onClick:s[3]||(s[3]=(...t)=>e.expandText&&e.expandText(...t)),class:"uppercase text-xs font-semibold text-slate-700"},"... Read More")):u("",!0)]))]),o("a",{onClick:s[5]||(s[5]=t=>e.onClickLoadClaim(e.projectId)),class:"cursor-pointer"},[a(h,{icon:"file-lines",class:"pl-2 pt-1 text-blue-500"})])])]),o("div",_e,[o("div",null,[e.fulfillersToThis.length>0?(n(),r("div",Fe,[s[20]||(s[20]=o("h3",{class:"text-sm uppercase font-semibold mt-3"}," Projects That Contribute To This ",-1)),o("div",Ee,[(n(!0),r(k,null,I(e.fulfillersToThis,t=>(n(),r("div",{key:t.handleId},[o("button",{onClick:b=>e.onClickLoadProject(t.handleId),class:"text-blue-500"},g(t.name),9,Ge)]))),128)),e.fulfillersToHitLimit?(n(),r("div",Re,[o("button",{onClick:s[6]||(s[6]=t=>e.loadPlanFulfillersTo())},"Load More")])):u("",!0)])])):u("",!0)]),o("div",null,[e.fulfilledByThis?(n(),r("div",Oe,[s[21]||(s[21]=o("h3",{class:"text-sm uppercase font-semibold mb-3"}," Projects Getting Contributions From This ",-1)),o("div",Ae,[o("button",{onClick:s[7]||(s[7]=t=>e.onClickLoadProject(e.fulfilledByThis.handleId)),class:"text-blue-500"},g(e.fulfilledByThis.name),1)])])):u("",!0)])]),e.activeDid&&e.isRegistered?(n(),r("div",Ne,[s[24]||(s[24]=o("div",{class:"text-center"},[o("p",{class:"mt-2 mt-4 text-center"},"Record a contribution from:")],-1)),o("ul",He,[o("li",{onClick:s[8]||(s[8]=t=>e.openGiftDialogToProject({name:"you",did:e.activeDid}))},[a(h,{icon:"hand",class:"fa-fw text-blue-500 text-5xl cursor-pointer"}),s[22]||(s[22]=o("h3",{class:"mt-5 text-xs text-blue-500 font-medium text-ellipsis whitespace-nowrap overflow-hidden cursor-pointer"}," You ",-1))]),o("li",{onClick:s[9]||(s[9]=t=>e.openGiftDialogToProject())},s[23]||(s[23]=[o("img",{src:he,class:"mx-auto border border-blue-300 rounded-md mb-1 cursor-pointer"},null,-1),o("h3",{class:"text-xs text-blue-500 italic font-medium text-ellipsis whitespace-nowrap overflow-hidden cursor-pointer"}," Unnamed/Unknown ",-1)])),(n(!0),r(k,null,I(e.allContacts.slice(0,5),t=>(n(),r("li",{key:t.did,onClick:b=>e.openGiftDialogToProject(t)},[a(x,{contact:t,iconSize:64,class:"mx-auto border border-blue-300 rounded-md mb-1 cursor-pointer"},null,8,["contact"]),o("h3",Ve,g(t.name||"(no name)"),1)],8,Me))),128)),o("li",null,[e.allContacts.length>=5?(n(),r("span",{key:0,onClick:s[10]||(s[10]=t=>e.onClickAllContactsGifting()),class:"flex align-bottom text-xs text-blue-500 mt-12 cursor-pointer"}," ... or someone else... ")):u("",!0)])]),a(j,{ref:"giveDialogToThis",toProjectId:this.projectId},null,8,["toProjectId"])])):u("",!0),o("div",Je,[o("div",We,[e.activeDid&&e.isRegistered?(n(),r("div",qe,[o("div",Qe,[o("button",{"data-testId":"offerButton",onClick:s[11]||(s[11]=t=>e.openOfferDialog()),class:"block w-full bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1 rounded-md"}," Offer to this (maybe with conditions)... ")])])):u("",!0),a(P,{ref:"customOfferDialog",projectId:this.projectId,projectName:this.name},null,8,["projectId","projectName"]),s[27]||(s[27]=o("h3",{class:"text-lg font-bold mb-3 mt-4"},"Offered To This Idea",-1)),e.offersToThis.length===0?(n(),r("div",ze,[s[25]||(s[25]=m(" (None yet. Wanna ")),o("span",{onClick:s[12]||(s[12]=t=>e.openOfferDialog()),class:"cursor-pointer text-blue-500"},"offer something... especially if others join you"),s[26]||(s[26]=m("?) "))])):(n(),r("ul",Ye,[(n(!0),r(k,null,I(e.offersToThis,t=>(n(),r("li",{key:t.id,class:"py-1.5 border-b border-slate-300"},[o("div",Ke,[o("span",null,[a(h,{icon:"user",class:"fa-fw text-slate-400"}),m(" "+g(e.serverUtil.didInfo(t.offeredByDid,e.activeDid,e.allMyDids,e.allContacts)),1)]),t.amount?(n(),r("span",Xe,[a(h,{icon:e.libsUtil.iconForUnitCode(t.unit),class:"fa-fw text-slate-400"},null,8,["icon"]),m(g(t.amount),1)])):u("",!0)]),t.objectDescription?(n(),r("div",Ze,[a(h,{icon:"comment",class:"fa-fw text-slate-400"}),m(" "+g(t.objectDescription),1)])):u("",!0),o("div",et,[o("a",{onClick:b=>e.onClickLoadClaim(t.jwtId),class:"cursor-pointer"},[a(h,{icon:"file-lines",class:"pl-2 pt-1 text-blue-500"})],8,tt),e.checkIsFulfillable(t)?(n(),r("a",{key:0,onClick:b=>e.onClickFulfillGiveToOffer(t)},[a(h,{icon:"hand-holding-heart",class:"text-blue-500 cursor-pointer"})],8,it)):u("",!0)])]))),128))])),e.offersHitLimit?(n(),r("div",st,[o("button",{onClick:s[13]||(s[13]=t=>e.loadOffers())},"Load More")])):u("",!0)]),o("div",ot,[e.activeDid&&e.isRegistered?(n(),r("div",rt,[o("div",nt,[o("button",{onClick:s[14]||(s[14]=t=>e.openGiftDialogToProject()),class:"block w-full bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1rounded-md"}," Given To This... ")])])):u("",!0),s[28]||(s[28]=o("h3",{class:"text-lg font-bold mb-3 mt-4"},"Given To This Idea",-1)),e.givesToThis.length===0?(n(),r("div",lt," (None yet. If you've seen something, say something by clicking a contact above.) ")):(n(),r("ul",at,[(n(!0),r(k,null,I(e.givesToThis,t=>{var b;return n(),r("li",{key:t.id,class:"py-1.5 border-b border-slate-300"},[o("div",dt,[o("span",null,[a(h,{icon:"user",class:"fa-fw text-slate-400"}),m(" "+g(e.serverUtil.didInfo(t.agentDid,e.activeDid,e.allMyDids,e.allContacts)),1)]),t.amount?(n(),r("span",ct,[a(h,{icon:e.libsUtil.iconForUnitCode(t.unit),class:"fa-fw text-slate-400"},null,8,["icon"]),m(g(t.amount),1)])):u("",!0)]),o("div",ht,[a(h,{icon:"calendar",class:"fa-fw text-slate-400"}),m(" "+g((b=t.issuedAt)==null?void 0:b.substring(0,10)),1)]),t.description?(n(),r("div",ft,[a(h,{icon:"comment",class:"fa-fw text-slate-400"}),m(" "+g(t.description),1)])):u("",!0),o("div",ut,[o("a",{onClick:w=>e.onClickLoadClaim(t.jwtId)},[a(h,{icon:"file-lines",class:"text-blue-500 cursor-pointer"})],8,pt),e.checkIsConfirmable(t)&&!e.recentlyCheckedAndUnconfirmableJwts.includes(t.jwtId)?(n(),r("a",{key:0,onClick:w=>e.deepCheckConfirmable(t)},[a(h,{icon:"circle-check",class:"text-blue-500 cursor-pointer"})],8,mt)):e.checkingConfirmationForJwtId===t.jwtId?(n(),r("a",gt,[a(h,{icon:"spinner",class:"fa-spin-pulse"})])):(n(),r("a",{key:2,onClick:w=>e.shallowNotifyWhyCannotConfirm(t)},[a(h,{icon:"circle-check",class:"text-slate-500 cursor-pointer"})],8,vt))]),t.fullClaim.image?(n(),r("div",yt,[o("a",{href:t.fullClaim.image,target:"_blank"},[o("img",{src:t.fullClaim.image,class:"h-24 mt-2 rounded-xl"},null,8,wt)],8,bt)])):u("",!0)])}),128))])),e.givesHitLimit?(n(),r("div",Ct,[o("button",{onClick:s[15]||(s[15]=t=>e.loadGives())},"Load More")])):u("",!0)]),o("div",kt,[e.activeDid&&e.isRegistered?(n(),r("div",Tt,[o("div",jt,[o("button",{onClick:s[16]||(s[16]=t=>e.openGiftDialogFromProject()),class:"block w-full bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1 rounded-md"}," Given By This... ")])])):u("",!0),a(j,{ref:"giveDialogFromThis",fromProjectId:this.projectId},null,8,["fromProjectId"]),s[29]||(s[29]=o("h3",{class:"text-lg font-bold mb-3 mt-4"}," Benefitted From This Project ",-1)),e.givesProvidedByThis.length===0?(n(),r("div",It,"(None yet.)")):(n(),r("ul",Dt,[(n(!0),r(k,null,I(e.givesProvidedByThis,t=>{var b;return n(),r("li",{key:t.id,class:"py-1.5 border-b border-slate-300"},[o("div",xt,[o("span",null,g(e.serverUtil.didInfo(t.recipientDid,e.activeDid,e.allMyDids,e.allContacts)),1),t.amount?(n(),r("span",Pt,[a(h,{icon:e.libsUtil.iconForUnitCode(t.unit),class:"fa-fw text-slate-400"},null,8,["icon"]),m(g(t.amount),1)])):u("",!0)]),o("div",$t,[a(h,{icon:"calendar",class:"fa-fw text-slate-400"}),m(" "+g((b=t.issuedAt)==null?void 0:b.substring(0,10)),1)]),t.description?(n(),r("div",Ut,[a(h,{icon:"comment",class:"fa-fw text-slate-400"}),m(" "+g(t.description),1)])):u("",!0),o("div",Lt,[o("a",{onClick:w=>e.onClickLoadClaim(t.jwtId)},[a(h,{icon:"file-lines",class:"text-blue-500 cursor-pointer"})],8,Bt),e.checkIsConfirmable(t)&&!e.recentlyCheckedAndUnconfirmableJwts.includes(t.jwtId)?(n(),r("a",{key:0,onClick:w=>e.deepCheckConfirmable(t)},[a(h,{icon:"circle-check",class:"text-blue-500 cursor-pointer"})],8,St)):e.checkingConfirmationForJwtId===t.jwtId?(n(),r("a",_t,[a(h,{icon:"spinner",class:"fa-spin-pulse"})])):(n(),r("a",{key:2,onClick:w=>e.shallowNotifyWhyCannotConfirm(t)},[a(h,{icon:"circle-check",class:"text-slate-500 cursor-pointer"})],8,Ft))]),t.fullClaim.image?(n(),r("div",Et,[o("a",{href:t.fullClaim.image,target:"_blank"},[o("img",{src:t.fullClaim.image,class:"h-24 mt-2 rounded-xl"},null,8,Rt)],8,Gt)])):u("",!0)])}),128))])),e.givesProvidedByHitLimit?(n(),r("div",Ot,[o("button",{onClick:s[17]||(s[17]=t=>e.loadGivesProvidedBy())},"Load More")])):u("",!0)])])])],64)}const Zt=V(U,[["render",At]]);export{Zt as default};