@qratilabs/qrati-connect 2.23.0-beta.2 → 2.23.0-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import{T as e,b as t,d as n,f as r,h as a,p as i,s,t as o,v as l}from"./qbHuxVSe.js";import{C as c,D as d,L as u,M as m,N as g,O as h,P as p,S as f,_ as v,b as w,d as T,f as y,g as N,h as q,i as x,j as b,m as E,n as C,p as S,u as I,v as L,x as z,y as k}from"./WtQ5axEj.js";import{n as A,r as M,t as _}from"./9VAO1NmP.js";import{t as P,u as R}from"./lVJD5cJY.js";import{t as V}from"./fwDYCLiL.js";import{n as O,t as j}from"./BekfKWcG.js";import{a as F,c as B,i as H,l as U,n as G,o as $,r as D,s as W,t as Q,u as K}from"./DIYTs0k3.js";import{t as Z}from"./B2KTsK_w.js";import{r as Y}from"./DWbLshVZ.js";import{n as J,t as X}from"./2SYk3iBo.js";import{t as ee}from"./C9HFLidt.js";import{t as te}from"./C0vZ8zxT.js";import{t as ne}from"./CJpmOICA.js";import{a as re,i as ae,n as ie,o as se,r as oe,s as le,t as ce}from"./we0Hcb5C.js";import{n as de,r as ue,t as me}from"./D8Se70tP2.js";import{n as ge,t as he}from"./C6SiAA6Z2.js";function pe({className:e}){/* @__PURE__ */
1
+ import{T as e,b as t,d as n,f as r,h as a,p as i,s,t as o,v as l}from"./qbHuxVSe.js";import{C as c,D as d,L as u,M as m,N as g,O as h,P as p,S as f,_ as v,b as w,d as T,f as y,g as N,h as q,i as x,j as b,m as E,n as C,p as S,u as I,v as L,x as z,y as k}from"./WtQ5axEj.js";import{n as A,r as M,t as _}from"./9VAO1NmP.js";import{t as P,u as R}from"./lVJD5cJY.js";import{t as V}from"./fwDYCLiL.js";import{n as O,t as j}from"./BekfKWcG.js";import{a as F,c as B,i as H,l as U,n as G,o as $,r as D,s as W,t as Q,u as K}from"./DQ4anWD-.js";import{t as Z}from"./B2KTsK_w.js";import{r as Y}from"./DWbLshVZ.js";import{n as J,t as X}from"./2SYk3iBo.js";import{t as ee}from"./C9HFLidt.js";import{t as te}from"./C0vZ8zxT.js";import{t as ne}from"./CJpmOICA.js";import{a as re,i as ae,n as ie,o as se,r as oe,s as le,t as ce}from"./we0Hcb5C.js";import{n as de,r as ue,t as me}from"./D8Se70tP2.js";import{n as ge,t as he}from"./C6SiAA6Z2.js";function pe({className:e}){/* @__PURE__ */
2
2
  return o("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:e,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */o("path",{fill:"currentColor",d:"M5 21q-.825 0-1.412-.587T3 19V5q0-.825.588-1.412T5 3h14q.825 0 1.413.588T21 5v14q0 .825-.587 1.413T19 21zm0-2h14V5H5zm0 0V5zm2-2h10q.3 0 .45-.275t-.05-.525l-2.75-3.675q-.15-.2-.4-.2t-.4.2L11.25 16L9.4 13.525q-.15-.2-.4-.2t-.4.2l-2 2.675q-.2.25-.05.525T7 17"})})}function fe({className:e}){/* @__PURE__ */
3
3
  return o("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:e,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */o("path",{fill:"currentColor",d:"M15.188 14.688Q16.5 13.375 16.5 11.5t-1.312-3.187T12 7T8.813 8.313T7.5 11.5t1.313 3.188T12 16t3.188-1.312m-5.1-1.276Q9.3 12.625 9.3 11.5t.788-1.912T12 8.8t1.913.788t.787 1.912t-.787 1.913T12 14.2t-1.912-.787m-4.2 3.787q-2.763-1.8-4.363-4.75q-.125-.225-.187-.462t-.063-.488t.063-.488t.187-.462q1.6-2.95 4.363-4.75T12 4t6.113 1.8t4.362 4.75q.125.225.188.463t.062.487t-.062.488t-.188.462q-1.6 2.95-4.362 4.75T12 19t-6.113-1.8m11.3-1.687Q19.55 14.025 20.8 11.5q-1.25-2.525-3.613-4.012T12 6T6.813 7.488T3.2 11.5q1.25 2.525 3.613 4.013T12 17t5.188-1.487"})})}var ve=({description:e,maxLines:n=2,className:i})=>{const[s,l]=a(!1),[c,d]=a(!1),u=r(null),m=r(null);return t(()=>{l(!1)},[e]),t(()=>{if(!u.current||!e)return void d(!1);const t=u.current,r=()=>{const e=window.getComputedStyle(t),a=Math.max(0,Math.floor(t.getBoundingClientRect().width));if(!a)return void(m.current=window.requestAnimationFrame(r));const i=e.lineHeight,s=parseFloat(e.fontSize)||16;let o=1.2*s;i&&"normal"!==i&&(o=i.endsWith("px")?parseFloat(i):parseFloat(i)*s);const l=document.createElement("div");l.style.position="absolute",l.style.visibility="hidden",l.style.pointerEvents="none",l.style.whiteSpace="normal",l.style.width=`${a}px`,l.style.boxSizing=e.boxSizing,l.style.padding=e.padding,l.style.margin=e.margin,l.style.fontSize=e.fontSize,l.style.fontFamily=e.fontFamily,l.style.fontWeight=e.fontWeight,l.style.lineHeight=e.lineHeight,l.style.letterSpacing=e.letterSpacing,l.style.wordBreak="break-word",l.innerText=t.innerText||"",document.body.appendChild(l);const c=l.scrollHeight;document.body.removeChild(l),d(c>o*n+1)},a=()=>{null!==m.current&&window.cancelAnimationFrame(m.current),m.current=window.requestAnimationFrame(r)};let i;a(),window.addEventListener("resize",a);try{i=new MutationObserver(a),i.observe(t,{characterData:!0,childList:!0,subtree:!0})}catch{}return()=>{window.removeEventListener("resize",a),null!==m.current&&window.cancelAnimationFrame(m.current),i?.disconnect()}},[e,n]),e?/* @__PURE__ */o("div",{className:x("relative w-full",i),children:[/* @__PURE__ */o("p",{ref:u,className:x(O({variant:"body2",color:"muted",align:"center"}),"w-full",s?void 0:`line-clamp-${n}`),children:[e,c&&s&&/* @__PURE__ */o("button",{type:"button",onClick:()=>l(!1),className:"text-primary ml-2 text-sm font-medium hover:underline cursor-pointer",children:"see less"})]}),c&&!s&&/* @__PURE__ */o("span",{className:"bg-background absolute right-0 bottom-0 inline-flex items-center pl-2",children:[/* @__PURE__ */o("span",{className:"text-muted-foreground",children:"..."}),/* @__PURE__ */o("button",{type:"button",onClick:()=>l(!0),className:"text-primary ml-1 text-sm font-medium hover:underline cursor-pointer",children:"see more"})]})]}):null},we=()=>{const{t:e}=Y(),{eventSlug:t}=R(),{event:n}=te({eventSlug:t}),{props:r,organization:a}=C(),{curateLabel:i,leaderboardLabel:s}=r??{},{eventViews:l,contentCount:c,curationCount:u}=(({event:e})=>{const{props:t,organization:n}=C(),r=t?.organizationId,{isLoading:a,data:i}=p({queryKey:["event-stats",r??"",e?._id??""],queryFn:async()=>{try{return(await g.get(I.GET_EVENT_STATISTICS,{searchParams:{eventSlug:e?.slug},headers:{"x-org-id":r}}).json()).data}catch(t){throw new Error(t instanceof Error?t.message:String(t)||"Failed to fetch event stats")}},enabled:!!e&&Boolean(n?.integrationSettings?.showEventStats)});return{isLoading:a,eventViews:"number"==typeof i?.eventViews?i.eventViews:i?.eventViews?.views??0,contentCount:i?.contentCount||0,curationCount:i?.curationCount||0}})({event:n});/* @__PURE__ */
4
4
  return o("div",{className:"w-full space-y-3",children:[