@qratilabs/qrati-connect 2.25.0 → 2.27.0
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.
- package/element/1dmOpMwn2.js +1 -0
- package/element/1eQ9Ef0M2.js +9 -0
- package/element/B0sEsGHn.js +8 -0
- package/element/B9ImRAum.js +1 -0
- package/element/{DGbyGc8b.js → BKENYwOQ.js} +1 -1
- package/element/BLeZg2Bz.js +1 -0
- package/element/BNaRcekR2.js +1 -0
- package/element/{qQ9Xx6H32.js → BdkTKcG52.js} +8 -8
- package/element/BmsDSHUi.js +4 -0
- package/element/Bo39kG4k2.js +1 -0
- package/element/{CsfDBJh72.js → BqiJLitq2.js} +2 -2
- package/element/BspExsK7.js +8 -0
- package/element/Bspyv2wJ2.js +24 -0
- package/element/BwwxqSTC2.js +1 -0
- package/element/C4DSwLWc.js +5 -0
- package/element/C6MqLLDX.js +3 -0
- package/element/C6YE4WUG2.js +5 -0
- package/element/{CgUphJWo.js → C7zv6hcG.js} +1 -1
- package/element/{C12iSy3L.js → C8meSsHD.js} +1 -1
- package/element/CBLQRRGX2.js +3 -0
- package/element/CBM5QMn8.js +1 -0
- package/element/CKQOToSD.js +41 -0
- package/element/CUBxHQ8u.js +1 -0
- package/element/CeHBrY_i.js +1 -0
- package/element/CfTdZB8y.js +4 -0
- package/element/CgxypkdG.js +3 -0
- package/element/{iuooW4mt.js → Cl0CwL5p.js} +8 -8
- package/element/{mQzpzQ_t.js → CpYO5bBq.js} +1 -1
- package/element/CtxIOzTC2.js +1 -0
- package/element/DGZEznLT2.js +1 -0
- package/element/DLF5ysgi.js +1 -0
- package/element/{CVRTTCyF.js → DOOdI-Oh.js} +1 -1
- package/element/{Z0-Tddye2.js → DRPgs6nu2.js} +9 -9
- package/element/DSx5wvUb2.js +1 -0
- package/element/{iknPnbyg2.js → DVFC5Z2L2.js} +28 -28
- package/element/{DlqJDAie2.js → DWqIpaZ02.js} +1 -1
- package/element/{CJXPO3HP.js → DZGp2V2-.js} +1 -1
- package/element/{Ctl9NdWl2.js → D_FNRN5A2.js} +1 -1
- package/element/DdACKOZr.js +1 -0
- package/element/{ChJXhA9c.js → DdYePHxG.js} +1 -1
- package/element/{C9T-_wQ82.js → DlAI3J0X.js} +4 -4
- package/element/{CATr-3VW.js → DmIYOIw1.js} +1 -1
- package/element/DmpmrPE5.js +1 -0
- package/element/DvisvxzJ.js +1 -0
- package/element/{C3dOFk9A.js → DyemeRjE2.js} +1 -1
- package/element/L4hWU3Nc.js +1 -0
- package/element/MU5QuIq0.js +3 -0
- package/element/{BCTYvPrD.js → OnH8Izqn.js} +1 -1
- package/element/Ot24jlyb2.js +1 -0
- package/element/{DnQ6XaLR.js → QDuBhueG.js} +1 -1
- package/element/SgRzjPnr.js +14 -0
- package/element/{DZtaQWVG2.js → Vk429P022.js} +1 -1
- package/element/{2CMH9VMM.js → X0P7ujR0.js} +1 -1
- package/element/aXvUP7X72.js +93 -0
- package/element/{BccTn5v-2.js → p0Q_2x6C.js} +1 -1
- package/element/qBKIp1ZW2.js +36 -0
- package/element/web.es.js +42 -42
- package/element/{BV9JHI5n2.js → xJZs5Gan.js} +35 -35
- package/package.json +1 -1
- package/element/BFCgbC5I2.js +0 -14
- package/element/BZu3c37u.js +0 -1
- package/element/BxbojrJs.js +0 -8
- package/element/C6dzWeQk2.js +0 -93
- package/element/C7iuJ0h32.js +0 -35
- package/element/C9kBlCZx2.js +0 -3
- package/element/CM46vluW.js +0 -1
- package/element/CMnzxWwG.js +0 -9
- package/element/CZbEGemi2.js +0 -4
- package/element/CaX2xgrP.js +0 -41
- package/element/Cko4QHwX.js +0 -1
- package/element/CqBk9L5O.js +0 -1
- package/element/D5TKEdBd2.js +0 -3
- package/element/DCj_fMN5.js +0 -5
- package/element/DF0LxcV7.js +0 -3
- package/element/DRP9vxts2.js +0 -4
- package/element/DWjheKBP2.js +0 -3
- package/element/EjMoIoSK.js +0 -1
- package/element/ZYvo9BjF2.js +0 -8
- package/element/dT6WSX65.js +0 -1
- package/element/h4ZjZXfe2.js +0 -1
- package/element/rg8L51I62.js +0 -5
- /package/element/{CfMNBPpx2.js → CfMNBPpx.js} +0 -0
- /package/element/{DPg_DKOi.js → DPg_DKOi2.js} +0 -0
- /package/element/{DnIueBGr2.js → DnIueBGr.js} +0 -0
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
import{_ as e,d as t,f as n,h as r,p as a,s as i,t as s,v as o,w as l}from"./DrrpB4Om.js";import{
|
|
1
|
+
import{_ as e,d as t,f as n,h as r,p as a,s as i,t as s,v as o,w as l}from"./DrrpB4Om.js";import{i as c,n as d,s as u,u as m}from"./CKQOToSD.js";import{n as g,r as h,t as f}from"./C8meSsHD.js";import{t as p}from"./DmpmrPE5.js";import{E as w,S as v,T,_ as y,a as N,c as q,d as x,f as b,g as E,h as C,i as S,l as I,m as z,o as L,p as k,s as M,u as A,x as _}from"./BLeZg2Bz.js";import{t as P,u as R}from"./DdYePHxG.js";import{n as O,t as V}from"./DmIYOIw1.js";import{a as F,c as j,i as B,l as H,n as U,o as G,r as $,s as W,t as D}from"./Cl0CwL5p.js";import{t as K}from"./MU5QuIq0.js";import{t as Q}from"./BKENYwOQ.js";import{t as Z}from"./CAETItHr.js";import{r as Y}from"./DGGc10Cy.js";import{t as J}from"./CBM5QMn8.js";import{n as X,t as ee}from"./DyemeRjE2.js";import{t as te}from"./DPg_DKOi2.js";import{t as ne}from"./CZ9iaxjO2.js";import{a as re,i as ae,n as ie,o as se,r as oe,s as le,t as ce}from"./BqiJLitq2.js";import{c as de,i as ue,n as me,t as ge}from"./CBLQRRGX2.js";import{n as he,t as fe}from"./DWqIpaZ02.js";function pe(e){if(e<1e3)return String(e);const[t,n]=e<1e6?[1e3,"K"]:[1e6,"M"],r=Math.round(e/t*10)/10;return`${r%1==0?r.toFixed(0):r.toFixed(1)}${n}`}function we({className:e}){/* @__PURE__ */
|
|
2
2
|
return s("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__ */s("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 ve({className:e}){/* @__PURE__ */
|
|
3
|
-
return s("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__ */s("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
|
|
3
|
+
return s("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__ */s("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 Te=({description:t,maxLines:a=2,className:i})=>{const[o,l]=r(!1),[d,u]=r(!1),m=n(null),g=n(null);return e(()=>{l(!1)},[t]),e(()=>{if(!m.current||!t)return void u(!1);const e=m.current,n=()=>{const t=window.getComputedStyle(e),r=Math.max(0,Math.floor(e.getBoundingClientRect().width));if(!r)return void(g.current=window.requestAnimationFrame(n));const i=t.lineHeight,s=parseFloat(t.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=`${r}px`,l.style.boxSizing=t.boxSizing,l.style.padding=t.padding,l.style.margin=t.margin,l.style.fontSize=t.fontSize,l.style.fontFamily=t.fontFamily,l.style.fontWeight=t.fontWeight,l.style.lineHeight=t.lineHeight,l.style.letterSpacing=t.letterSpacing,l.style.wordBreak="break-word",l.innerText=e.innerText||"",document.body.appendChild(l);const c=l.scrollHeight;document.body.removeChild(l),u(c>o*a+1)},r=()=>{null!==g.current&&window.cancelAnimationFrame(g.current),g.current=window.requestAnimationFrame(n)};let i;r(),window.addEventListener("resize",r);try{i=new MutationObserver(r),i.observe(e,{characterData:!0,childList:!0,subtree:!0})}catch{}return()=>{window.removeEventListener("resize",r),null!==g.current&&window.cancelAnimationFrame(g.current),i?.disconnect()}},[t,a]),t?/* @__PURE__ */s("div",{className:c("relative w-full",i),children:[/* @__PURE__ */s("p",{ref:m,className:c(O({variant:"body2",color:"muted",align:"center"}),"w-full",o?void 0:`line-clamp-${a}`),children:[t,d&&o&&/* @__PURE__ */s("button",{type:"button",onClick:()=>l(!1),className:"text-primary ml-2 text-sm font-medium hover:underline cursor-pointer",children:"see less"})]}),d&&!o&&/* @__PURE__ */s("span",{className:"bg-background absolute right-0 bottom-0 inline-flex items-center pl-2",children:[/* @__PURE__ */s("span",{className:"text-muted-foreground",children:"..."}),/* @__PURE__ */s("button",{type:"button",onClick:()=>l(!0),className:"text-primary ml-1 text-sm font-medium hover:underline cursor-pointer",children:"see more"})]})]}):null},ye=()=>{const{t:e}=Y(),{eventSlug:t}=R(),{event:n}=J({eventSlug:t}),{props:r,organization:a}=d(),{curateLabel:i,leaderboardLabel:o}=r??{},{eventViews:l,contentCount:c,curationCount:m}=(({event:e})=>{const{props:t,organization:n}=d(),r=t?.organizationId,{isLoading:a,data:i}=u({queryKey:["event-stats",r??"",e?._id??""],queryFn:async()=>{try{return(await p.get(S.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 s("div",{className:"w-full space-y-3",children:[
|
|
5
|
-
/* @__PURE__ */s("div",{className:"space-y-2 md:-mt-8",children:[/* @__PURE__ */s(V,{variant:"h4",align:"center",immutable:!0,className:"mx-auto max-w-2xl",children:n?.name}),/* @__PURE__ */s(
|
|
6
|
-
/* @__PURE__ */s("div",{className:"flex items-center gap-2",children:[/* @__PURE__ */s(ve,{className:"text-primary"}),/* @__PURE__ */s(
|
|
7
|
-
/* @__PURE__ */s("div",{className:"flex items-center gap-2",children:[/* @__PURE__ */s(
|
|
8
|
-
return s("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__ */s("path",{fill:"currentColor",d:"M12.275 9H19.4q-.675-1.725-2.062-2.963T14.15 4.3l-2.3 3.95q-.15.25 0 .5t.425.25m-3.6 1.25q.15.25.425.25t.425-.25L13.1 4.1q-.275-.05-.55-.075T12 4q-1.65 0-3.075.625T6.4 6.3zM4.25 14h4.575q.275 0 .438-.25t.012-.5L5.7 7.1q-.8 1.025-1.25 2.263T4 12q0 .525.063 1.013T4.25 14m5.6 5.7l2.275-3.95q.15-.25-.012-.5t-.438-.25H4.6q.675 1.725 2.063 2.963T9.85 19.7M12 20q1.65 0 3.075-.625T17.6 17.7l-2.275-3.95q-.15-.25-.425-.25t-.425.25L10.9 19.9q.275.05.538.075T12 20m6.3-3.1q.8-1.025 1.25-2.262T20 12q0-.525-.062-1.012T19.75 10h-4.575q-.275 0-.437.25t-.013.5zM12 22q-2.05 0-3.875-.788t-3.187-2.15t-2.15-3.187T2 12q0-2.075.788-3.887t2.15-3.175t3.187-2.15T12 2q2.075 0 3.888.788t3.174 2.15t2.15 3.175T22 12q0 2.05-.788 3.875t-2.15 3.188t-3.175 2.15T12 22"})})}function
|
|
9
|
-
return s("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__ */s("path",{fill:"currentColor",d:"M11.25 16L9.6 13.8q-.225-.3-.6-.3t-.6.3l-1.8 2.4q-.2.25-.05.525T7 17h10q.3 0 .45-.275t-.05-.525l-2.475-3.3q-.275-.05-.563-.125T13.8 12.6zM5 21q-.825 0-1.412-.587T3 19V5q0-.825.588-1.412T5 3h4q.425 0 .713.288T10 4t-.288.713T9 5H5v14h14v-3.325q0-.425.288-.712t.712-.288t.713.288t.287.712V19q0 .825-.587 1.413T19 21zm11.05-10q-1.85 0-3.15-1.312T11.6 6.5t1.313-3.187T16.1 2t3.188 1.313T20.6 6.5q0 .675-.2 1.3t-.5 1.15l2.35 2.35q.275.275.275.7t-.275.7t-.7.275t-.7-.275l-2.4-2.4q-.525.35-1.125.525T16.05 11m.05-2q1.05 0 1.775-.725T18.6 6.5t-.725-1.775T16.1 4t-1.775.725T13.6 6.5t.725 1.775T16.1 9"})})}function
|
|
10
|
-
return s("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__ */s("path",{fill:"currentColor",d:"M7 21q-.425 0-.712-.288T6 20t.288-.712T7 19h4v-3H4q-.825 0-1.412-.587T2 14V5q0-.825.588-1.412T4 3h16q.825 0 1.413.588T22 5v9q0 .825-.587 1.413T20 16h-7v3h4q.425 0 .713.288T18 20t-.288.713T17 21zm-3-7h16V5H4zm0 0V5z"})})}function
|
|
11
|
-
return s("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__ */s("path",{fill:"currentColor",d:"M12 20q-.825 0-1.412-.587T10 18t.588-1.412T12 16t1.413.588T14 18t-.587 1.413T12 20m0-6q-.825 0-1.412-.587T10 12t.588-1.412T12 10t1.413.588T14 12t-.587 1.413T12 14m0-6q-.825 0-1.412-.587T10 6t.588-1.412T12 4t1.413.588T14 6t-.587 1.413T12 8"})})}function
|
|
12
|
-
return s("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__ */s("path",{fill:"currentColor",d:"M9 20v-4q-1.275-.1-2.5-.275t-2.45-.45q-.425-.1-.675-.475T3.25 14t.513-.625t.812-.1q1.825.425 3.688.575T12 14t3.738-.15t3.687-.575q.45-.1.825.1t.5.625t-.137.8t-.688.475q-1.225.275-2.45.45T15 16v4q0 .425-.287.713T14 21h-4q-.425 0-.712-.288T9 20m3-7q-.85 0-1.425-.575T10 11q0-.825.575-1.412T12 9q.825 0 1.413.588T14 11q0 .85-.587 1.425T12 13m-7.5-3q-.65 0-1.075-.425T3 8.5q0-.625.425-1.062T4.5 7q.625 0 1.063.438T6 8.5q0 .65-.437 1.075T4.5 10m15 0q-.65 0-1.075-.425T18 8.5q0-.625.425-1.062T19.5 7q.625 0 1.063.438T21 8.5q0 .65-.437 1.075T19.5 10M7.25 6.25q-.65 0-1.075-.425T5.75 4.75q0-.625.425-1.062T7.25 3.25q.625 0 1.063.438T8.75 4.75q0 .65-.437 1.075T7.25 6.25m9.5 0q-.65 0-1.075-.425T15.25 4.75q0-.625.425-1.062t1.075-.438q.625 0 1.063.438t.437 1.062q0 .65-.437 1.075t-1.063.425M12 5q-.65 0-1.075-.425T10.5 3.5q0-.625.425-1.062T12 2q.625 0 1.063.438T13.5 3.5q0 .65-.437 1.075T12 5"})})}function
|
|
13
|
-
return s("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__ */s("path",{fill:"currentColor",d:"M11 12q-1.65 0-2.825-1.175T7 8t1.175-2.825T11 4t2.825 1.175T15 8t-1.175 2.825T11 12m0-2q.825 0 1.413-.587T13 8t-.587-1.412T11 6t-1.412.588T9 8t.588 1.413T11 10m10.4 12.8l-2.5-2.5q-.525.3-1.125.5T16.5 21q-1.875 0-3.187-1.312T12 16.5t1.313-3.187T16.5 12t3.188 1.313T21 16.5q0 .675-.2 1.275t-.5 1.125l2.5 2.5q.275.275.275.7t-.275.7t-.7.275t-.7-.275m-3.125-4.525Q19 17.55 19 16.5t-.725-1.775T16.5 14t-1.775.725T14 16.5t.725 1.775T16.5 19t1.775-.725M3 18v-.775q0-.85.425-1.575t1.175-1.1q1.05-.55 2.338-.962t2.637-.538q.425-.05.725.25t.3.725t-.3.738t-.725.362q-1.425.175-2.4.525t-1.65.7q-.25.125-.387.363T5 17.225V18h4.6q.425 0 .713.288T10.6 19t-.287.713T9.6 20H5q-.825 0-1.412-.587T3 18m7.175 0"})})}function
|
|
14
|
-
return s("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__ */s("path",{fill:"currentColor",d:"M5 11q-.825 0-1.412-.587T3 9V5q0-.825.588-1.412T5 3h4q.825 0 1.413.588T11 5v4q0 .825-.587 1.413T9 11zm0 10q-.825 0-1.412-.587T3 19v-4q0-.825.588-1.412T5 13h4q.825 0 1.413.588T11 15v4q0 .825-.587 1.413T9 21zm10-10q-.825 0-1.412-.587T13 9V5q0-.825.588-1.412T15 3h4q.825 0 1.413.588T21 5v4q0 .825-.587 1.413T19 11zm0 10q-.825 0-1.412-.587T13 19v-4q0-.825.588-1.412T15 13h4q.825 0 1.413.588T21 15v4q0 .825-.587 1.413T19 21zM5 9h4V5H5zm10 0h4V5h-4zm0 10h4v-4h-4zM5 19h4v-4H5zM9 9"})})}function
|
|
15
|
-
return s("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__ */s("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 3c4.97 0 9 4.03 9 9",children:/* @__PURE__ */s("animateTransform",{attributeName:"transform",dur:"1.5s",repeatCount:"indefinite",type:"rotate",values:"0 12 12;360 12 12"})})})}var Le=({event:e})=>{const t=
|
|
16
|
-
return s(U,{children:[/* @__PURE__ */s(F,{children:/* @__PURE__ */s(o?Ie
|
|
17
|
-
return s("div",{className:"text-muted-foreground sm:text-foreground flex flex-row items-center justify-end gap-6 pr-1 sm:justify-between sm:pr-4",children:["undefined"!=typeof document&&document?.fullscreenEnabled&&t&&/* @__PURE__ */s(
|
|
18
|
-
return s("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__ */s("path",{fill:"currentColor",d:"M4 18q-.425 0-.712-.288T3 17t.288-.712T4 16h16q.425 0 .713.288T21 17t-.288.713T20 18zm0-5q-.425 0-.712-.288T3 12t.288-.712T4 11h16q.425 0 .713.288T21 12t-.288.713T20 13zm0-5q-.425 0-.712-.288T3 7t.288-.712T4 6h16q.425 0 .713.288T21 7t-.288.713T20 8z"})})}var
|
|
19
|
-
return s("div",{className:"relative flex w-auto items-center gap-2",children:[/* @__PURE__ */s("button",{type:"button",className:"bg-background rounded p-1",onClick:i,children:/* @__PURE__ */s("svg",{xmlns:"http://www.w3.org/2000/svg",className:
|
|
20
|
-
/* @__PURE__ */s("input",{ref:c,type:"file",accept:"image/*",className:"hidden",onChange:e=>{const t=e.target?.files?.[0]??null;if(!t)return;const n=(t.name.split(".").pop()||"").toLowerCase();if(!
|
|
21
|
-
/* @__PURE__ */s("div",{className:"col-span-3 flex items-center gap-4 md:col-span-1",children:[v?.integrationSettings?.showGridViewToggle&&/* @__PURE__ */s(H,{buttons:
|
|
22
|
-
/* @__PURE__ */s(
|
|
23
|
-
/* @__PURE__ */s("button",{className:"absolute inset-y-0 right-3 flex items-center",onClick:
|
|
5
|
+
/* @__PURE__ */s("div",{className:"space-y-2 md:-mt-8",children:[/* @__PURE__ */s(V,{variant:"h4",align:"center",immutable:!0,className:"mx-auto max-w-2xl",children:n?.name}),/* @__PURE__ */s(Te,{description:n?.description})]}),a?.integrationSettings?.showEventStats&&/* @__PURE__ */s("div",{className:"flex justify-center",children:/* @__PURE__ */s("div",{className:"flex items-center gap-6",children:[
|
|
6
|
+
/* @__PURE__ */s("div",{className:"flex items-center gap-2",children:[/* @__PURE__ */s(ve,{className:"text-primary"}),/* @__PURE__ */s("span",{className:"font-medium",children:pe(l??0)})]}),
|
|
7
|
+
/* @__PURE__ */s("div",{className:"flex items-center gap-2",children:[/* @__PURE__ */s(we,{className:"text-primary"}),/* @__PURE__ */s("span",{className:"font-medium",children:pe(c??0)})]}),n?.engagementStyle===b.CONTEST&&/* @__PURE__ */s("div",{className:"flex items-center gap-2",children:[/* @__PURE__ */s(le,{className:"text-primary"}),/* @__PURE__ */s("span",{className:"font-medium",children:m})]})]})}),(n?.status===k.OPEN&&n?.uploadLimit&&n.uploadLimit>0||n?.status===k.OPEN&&n?.engagementStyle===b.CONTEST||n?.engagementStyle===b.REACTION&&n?.showLeaderboard||n?.engagementStyle===b.CONTEST)&&/* @__PURE__ */s("div",{className:"flex w-full flex-wrap justify-center gap-3",children:[n?.status===k.OPEN&&n?.uploadLimit&&n.uploadLimit>0&&/* @__PURE__ */s(P,{to:_.UPLOAD(n?.slug??""),children:/* @__PURE__ */s(ee,{icon:/* @__PURE__ */s(de,{className:"size-5"}),children:e("content.upload","Upload")})}),n?.status===k.OPEN&&n?.engagementStyle===b.CONTEST&&/* @__PURE__ */s(P,{to:_.CURATE(n?.slug??""),children:/* @__PURE__ */s(ee,{icon:/* @__PURE__ */s(le,{className:"size-5"}),children:i||e("content.curate","Curate")})}),n?.showLeaderboard&&/* @__PURE__ */s(P,{to:_.LEADERBOARD(n?.slug??""),children:/* @__PURE__ */s(ee,{icon:/* @__PURE__ */s(ne,{className:"size-5"}),children:o||e("content.leaderboard","Leaderboard")})})]})]})},Ne=(e,t)=>["in-review-count",e??"",t??""];function qe({className:e}){/* @__PURE__ */
|
|
8
|
+
return s("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__ */s("path",{fill:"currentColor",d:"M12.275 9H19.4q-.675-1.725-2.062-2.963T14.15 4.3l-2.3 3.95q-.15.25 0 .5t.425.25m-3.6 1.25q.15.25.425.25t.425-.25L13.1 4.1q-.275-.05-.55-.075T12 4q-1.65 0-3.075.625T6.4 6.3zM4.25 14h4.575q.275 0 .438-.25t.012-.5L5.7 7.1q-.8 1.025-1.25 2.263T4 12q0 .525.063 1.013T4.25 14m5.6 5.7l2.275-3.95q.15-.25-.012-.5t-.438-.25H4.6q.675 1.725 2.063 2.963T9.85 19.7M12 20q1.65 0 3.075-.625T17.6 17.7l-2.275-3.95q-.15-.25-.425-.25t-.425.25L10.9 19.9q.275.05.538.075T12 20m6.3-3.1q.8-1.025 1.25-2.262T20 12q0-.525-.062-1.012T19.75 10h-4.575q-.275 0-.437.25t-.013.5zM12 22q-2.05 0-3.875-.788t-3.187-2.15t-2.15-3.187T2 12q0-2.075.788-3.887t2.15-3.175t3.187-2.15T12 2q2.075 0 3.888.788t3.174 2.15t2.15 3.175T22 12q0 2.05-.788 3.875t-2.15 3.188t-3.175 2.15T12 22"})})}function xe({className:e}){/* @__PURE__ */
|
|
9
|
+
return s("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__ */s("path",{fill:"currentColor",d:"M11.25 16L9.6 13.8q-.225-.3-.6-.3t-.6.3l-1.8 2.4q-.2.25-.05.525T7 17h10q.3 0 .45-.275t-.05-.525l-2.475-3.3q-.275-.05-.563-.125T13.8 12.6zM5 21q-.825 0-1.412-.587T3 19V5q0-.825.588-1.412T5 3h4q.425 0 .713.288T10 4t-.288.713T9 5H5v14h14v-3.325q0-.425.288-.712t.712-.288t.713.288t.287.712V19q0 .825-.587 1.413T19 21zm11.05-10q-1.85 0-3.15-1.312T11.6 6.5t1.313-3.187T16.1 2t3.188 1.313T20.6 6.5q0 .675-.2 1.3t-.5 1.15l2.35 2.35q.275.275.275.7t-.275.7t-.7.275t-.7-.275l-2.4-2.4q-.525.35-1.125.525T16.05 11m.05-2q1.05 0 1.775-.725T18.6 6.5t-.725-1.775T16.1 4t-1.775.725T13.6 6.5t.725 1.775T16.1 9"})})}function be({className:e}){/* @__PURE__ */
|
|
10
|
+
return s("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__ */s("path",{fill:"currentColor",d:"M7 21q-.425 0-.712-.288T6 20t.288-.712T7 19h4v-3H4q-.825 0-1.412-.587T2 14V5q0-.825.588-1.412T4 3h16q.825 0 1.413.588T22 5v9q0 .825-.587 1.413T20 16h-7v3h4q.425 0 .713.288T18 20t-.288.713T17 21zm-3-7h16V5H4zm0 0V5z"})})}function Ee({className:e}){/* @__PURE__ */
|
|
11
|
+
return s("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__ */s("path",{fill:"currentColor",d:"M12 20q-.825 0-1.412-.587T10 18t.588-1.412T12 16t1.413.588T14 18t-.587 1.413T12 20m0-6q-.825 0-1.412-.587T10 12t.588-1.412T12 10t1.413.588T14 12t-.587 1.413T12 14m0-6q-.825 0-1.412-.587T10 6t.588-1.412T12 4t1.413.588T14 6t-.587 1.413T12 8"})})}function Ce({className:e}){/* @__PURE__ */
|
|
12
|
+
return s("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__ */s("path",{fill:"currentColor",d:"M9 20v-4q-1.275-.1-2.5-.275t-2.45-.45q-.425-.1-.675-.475T3.25 14t.513-.625t.812-.1q1.825.425 3.688.575T12 14t3.738-.15t3.687-.575q.45-.1.825.1t.5.625t-.137.8t-.688.475q-1.225.275-2.45.45T15 16v4q0 .425-.287.713T14 21h-4q-.425 0-.712-.288T9 20m3-7q-.85 0-1.425-.575T10 11q0-.825.575-1.412T12 9q.825 0 1.413.588T14 11q0 .85-.587 1.425T12 13m-7.5-3q-.65 0-1.075-.425T3 8.5q0-.625.425-1.062T4.5 7q.625 0 1.063.438T6 8.5q0 .65-.437 1.075T4.5 10m15 0q-.65 0-1.075-.425T18 8.5q0-.625.425-1.062T19.5 7q.625 0 1.063.438T21 8.5q0 .65-.437 1.075T19.5 10M7.25 6.25q-.65 0-1.075-.425T5.75 4.75q0-.625.425-1.062T7.25 3.25q.625 0 1.063.438T8.75 4.75q0 .65-.437 1.075T7.25 6.25m9.5 0q-.65 0-1.075-.425T15.25 4.75q0-.625.425-1.062t1.075-.438q.625 0 1.063.438t.437 1.062q0 .65-.437 1.075t-1.063.425M12 5q-.65 0-1.075-.425T10.5 3.5q0-.625.425-1.062T12 2q.625 0 1.063.438T13.5 3.5q0 .65-.437 1.075T12 5"})})}function Se({className:e}){/* @__PURE__ */
|
|
13
|
+
return s("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__ */s("path",{fill:"currentColor",d:"M11 12q-1.65 0-2.825-1.175T7 8t1.175-2.825T11 4t2.825 1.175T15 8t-1.175 2.825T11 12m0-2q.825 0 1.413-.587T13 8t-.587-1.412T11 6t-1.412.588T9 8t.588 1.413T11 10m10.4 12.8l-2.5-2.5q-.525.3-1.125.5T16.5 21q-1.875 0-3.187-1.312T12 16.5t1.313-3.187T16.5 12t3.188 1.313T21 16.5q0 .675-.2 1.275t-.5 1.125l2.5 2.5q.275.275.275.7t-.275.7t-.7.275t-.7-.275m-3.125-4.525Q19 17.55 19 16.5t-.725-1.775T16.5 14t-1.775.725T14 16.5t.725 1.775T16.5 19t1.775-.725M3 18v-.775q0-.85.425-1.575t1.175-1.1q1.05-.55 2.338-.962t2.637-.538q.425-.05.725.25t.3.725t-.3.738t-.725.362q-1.425.175-2.4.525t-1.65.7q-.25.125-.387.363T5 17.225V18h4.6q.425 0 .713.288T10.6 19t-.287.713T9.6 20H5q-.825 0-1.412-.587T3 18m7.175 0"})})}function Ie({className:e}){/* @__PURE__ */
|
|
14
|
+
return s("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__ */s("path",{fill:"currentColor",d:"M5 11q-.825 0-1.412-.587T3 9V5q0-.825.588-1.412T5 3h4q.825 0 1.413.588T11 5v4q0 .825-.587 1.413T9 11zm0 10q-.825 0-1.412-.587T3 19v-4q0-.825.588-1.412T5 13h4q.825 0 1.413.588T11 15v4q0 .825-.587 1.413T9 21zm10-10q-.825 0-1.412-.587T13 9V5q0-.825.588-1.412T15 3h4q.825 0 1.413.588T21 5v4q0 .825-.587 1.413T19 11zm0 10q-.825 0-1.412-.587T13 19v-4q0-.825.588-1.412T15 13h4q.825 0 1.413.588T21 15v4q0 .825-.587 1.413T19 21zM5 9h4V5H5zm10 0h4V5h-4zm0 10h4v-4h-4zM5 19h4v-4H5zM9 9"})})}function ze({className:e}){/* @__PURE__ */
|
|
15
|
+
return s("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__ */s("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 3c4.97 0 9 4.03 9 9",children:/* @__PURE__ */s("animateTransform",{attributeName:"transform",dur:"1.5s",repeatCount:"indefinite",type:"rotate",values:"0 12 12;360 12 12"})})})}var Le=({event:e})=>{const t=m(),{user:n,props:a}=d(),i=a?.organizationId,[o,l]=r(!1);/* @__PURE__ */
|
|
16
|
+
return s(U,{children:[/* @__PURE__ */s(F,{children:/* @__PURE__ */s(o?ze:Ie,{className:"size-6"})}),/* @__PURE__ */s($,{align:"end",side:"bottom",className:"w-44",children:Object.values(E).map(r=>/* @__PURE__ */s(B,{onClick:()=>(async r=>{l(!0);try{const a=new FormData;a.append("eventId",e?._id??""),a.append("galleryLayout",r),await p.post(S.UPDATE_EVENT_LAYOUT,{body:a,headers:{"x-org-id":i,Authorization:n?`Bearer ${n.token}`:void 0}}),t.invalidateQueries({queryKey:[`event-data-${i??""}-${e?.slug??""}`]})}catch(a){console.error(a)}l(!1)})(r),isChecked:e?.galleryLayout===r,title:he(r)},r))})]})},ke=({event:e,onAutoscrollClick:t})=>{const{t:n}=Y(),{isSuper:r,isOwner:i,isAdmin:o,isModerator:l}=j(),{inReviewCount:c}=(e=>{const t=m(),{props:n}=d(),r=n?.organizationId,{role:a,isSuper:i}=j(),{isLoading:s,data:o,isError:l,error:c}=u({queryKey:Ne(r,e?.slug),queryFn:async()=>{try{const t=await p.get(S.GET_CONTENTS_COUNT,{searchParams:{eventSlug:e?.slug,filter:`status:${M.IN_REVIEW}`},headers:{"x-org-id":r}}).json();if(t.error)throw new Error(t.error);return t.data}catch(t){throw new Error(t instanceof Error?t.message:String(t)||"Failed to fetch in review count")}},staleTime:0,enabled:Boolean(a)||Boolean(i)});return{loading:s,inReviewCount:o,error:l?c:null,increment:()=>{t.setQueryData(Ne(r,e?.slug),e=>(e??0)+1)},decrement:()=>{t.setQueryData(Ne(r,e?.slug),e=>Math.max(0,(e??0)-1))}}})(e),g=r||i||o||l,h=r||i||o,f=a(()=>{const t=[];return h&&t.push({title:n("event.shot_inspector","Shot Inspector"),icon:qe,href:C.EVENT_SHOT_INSPECTOR(e?.slug??"")}),e?.visibility===z.PRIVATE&&g&&t.push({title:n("event.access_requests","Access Requests"),icon:Se,href:C.EVENT_ACCESS_REQUESTS(e?.slug??"")}),e?.engagementStyle===b.CONTEST&&h&&t.push({title:n("event.curation_details","Curation Details"),icon:Ce,href:C.EVENT_CURATION_DETAILS(e?.slug??"")}),h&&t.push({title:n("event.edit_event","Edit Event"),icon:G,href:C.EVENT_SETTINGS_BASIC_DETAILS(e?.slug??"")}),t},[e,h,g]);/* @__PURE__ */
|
|
17
|
+
return s("div",{className:"text-muted-foreground sm:text-foreground flex flex-row items-center justify-end gap-6 pr-1 sm:justify-between sm:pr-4",children:["undefined"!=typeof document&&document?.fullscreenEnabled&&t&&/* @__PURE__ */s(W,{content:n("event.kiosk_mode","Kiosk Mode"),children:/* @__PURE__ */s("button",{onClick:t,className:"hidden sm:block",children:/* @__PURE__ */s(be,{className:"size-6"})})}),"undefined"!=typeof document&&document?.fullscreenEnabled&&h&&/* @__PURE__ */s(Le,{event:e}),g&&/* @__PURE__ */s(W,{content:n("event.review_contents","Review Contents"),children:/* @__PURE__ */s("a",{target:"_blank",rel:"noreferrer",href:C.EVENT_REVIEW_CONTENTS(e?.slug??""),className:"relative",children:[/* @__PURE__ */s(xe,{className:"size-6"}),Number(c)>0&&/* @__PURE__ */s("div",{className:"bg-primary text-primary-foreground absolute -top-2 -right-2 rounded-lg px-1 py-0 text-xs",children:c})]})}),f.length>0&&/* @__PURE__ */s(U,{children:[/* @__PURE__ */s(F,{children:/* @__PURE__ */s(Ee,{className:"size-6"})}),/* @__PURE__ */s($,{align:"end",side:"bottom",className:"w-48",children:f.map(e=>/* @__PURE__ */s(B,{href:e.href,icon:/* @__PURE__ */s(e.icon,{className:"text-primary"}),title:e.title,suffix:e?.chip?/* @__PURE__ */s("span",{className:"bg-primary text-primary-foreground rounded-full px-1.5 py-0.5 text-[0.5rem] font-medium sm:text-xs",children:e.chip}):void 0,isBeta:"BETA"===e?.chip},e.href??e.title))})]})]})};function Me({className:e}){/* @__PURE__ */
|
|
18
|
+
return s("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__ */s("path",{fill:"currentColor",d:"M4 18q-.425 0-.712-.288T3 17t.288-.712T4 16h16q.425 0 .713.288T21 17t-.288.713T20 18zm0-5q-.425 0-.712-.288T3 12t.288-.712T4 11h16q.425 0 .713.288T21 12t-.288.713T20 13zm0-5q-.425 0-.712-.288T3 7t.288-.712T4 6h16q.425 0 .713.288T21 7t-.288.713T20 8z"})})}var Ae=({engagementStyle:e,sort:t=A,order:n=x,onSortChange:r,onSortOrderChange:i})=>{const{t:o}=Y(),l=a(()=>{const t=Object.keys(L).map(e=>({text:o(`content.sortby_${L[e].label.toLowerCase()}`,L[e].label),value:e,activeClassName:"bg-primary text-primary-foreground"}));return e===b.CONTEST?t:t.filter(e=>e.value!==N.POPULAR)},[e,o]);/* @__PURE__ */
|
|
19
|
+
return s("div",{className:"relative flex w-auto items-center gap-2",children:[/* @__PURE__ */s("button",{type:"button",className:"bg-background rounded p-1",onClick:i,children:/* @__PURE__ */s("svg",{xmlns:"http://www.w3.org/2000/svg",className:c("text-foreground w-7 -scale-x-100 transition-transform",n===T.ASC&&"-scale-y-100"),viewBox:"0 0 24 24",children:/* @__PURE__ */s("path",{fill:"currentColor",d:"M4 18q-.425 0-.712-.288T3 17t.288-.712T4 16h4q.425 0 .713.288T9 17t-.288.713T8 18zm0-5q-.425 0-.712-.288T3 12t.288-.712T4 11h10q.425 0 .713.288T15 12t-.288.713T14 13zm0-5q-.425 0-.712-.288T3 7t.288-.712T4 6h16q.425 0 .713.288T21 7t-.288.713T20 8z"})})}),/* @__PURE__ */s(H,{className:"flex-1 lg:flex-none",selected:t,buttons:l,onChange:e=>r&&r(e)})]})},_e=["jpg","jpeg","png","webp","heic","tiff","bmp"],Pe=({value:t,onChange:i})=>{const[o,l]=r(!1),c=n(null),d=a(()=>t?URL.createObjectURL(t):null,[t]);return e(()=>()=>{d&&URL.revokeObjectURL(d)},[d]),e(()=>{!t&&c.current&&(c.current.value="")},[t]),/* @__PURE__ */s("div",{className:"flex items-center gap-3",children:[!t&&/* @__PURE__ */s("div",{className:"flex items-center gap-4",children:/* @__PURE__ */s("button",{type:"button",onClick:()=>c.current?.click(),className:"border-border flex items-center gap-2 rounded border px-3 py-2.5 "+(o?"bg-opacity-75 cursor-not-allowed":"hover:cursor-pointer"),children:/* @__PURE__ */s(o?X:se,{})})}),t&&d&&/* @__PURE__ */s("img",{src:d,alt:"Facial Search",className:"size-10 rounded object-cover"}),
|
|
20
|
+
/* @__PURE__ */s("input",{ref:c,type:"file",accept:"image/*",className:"hidden",onChange:e=>{const t=e.target?.files?.[0]??null;if(!t)return;const n=(t.name.split(".").pop()||"").toLowerCase();if(!_e.includes(n))return i(null);(async e=>{if(!e)return;l(!0);let t=e;try{const n=await ue(e);t=n.size/1024/1024>1?await me(n,{maxSizeMB:1,maxWidthOrHeight:1600,useWebWorker:!0,preserveExif:!1,maxIteration:3}):n}catch(n){console.error(n)}l(!1),i(t)})(t)}})]})},Re={[I.GRID]:{icon:/* @__PURE__ */s(Ie,{className:"size-full text-inherit"})},[I.SINGLE]:{icon:/* @__PURE__ */s(Me,{className:"size-full text-inherit"})}},Oe=Object.keys(Re).map(e=>({icon:Re[e].icon,value:e})),Ve=({engagementStyle:t,disabled:a,mode:i,onModeChange:l,sort:c,onSortChange:u,sortOrder:m,onSortOrderChange:g,handleChange:h,face:f,onFaceImageChange:p})=>{const{t:w}=Y(),{organization:v}=d(),[T,y]=r(""),[N,q]=r(null),x=n(null),b=o(()=>{x.current&&(URL.revokeObjectURL(x.current),x.current=null)},[]),E=o(e=>{if(q(e),b(),e){const t=URL.createObjectURL(e);x.current=t,p?.(t)}else p?.(void 0)},[p,b]),C=o(e=>{y(e.target.value)},[]),S=o(e=>{const t=e.key;"Enter"===t?h&&h(T.length>0?T:""):"Escape"===t&&(y(""),h&&h(""))},[T,h]),I=o(()=>{y(""),h&&h("")},[h]),z=o(()=>{h&&h(T)},[T,h]);return e(()=>{f||q(null)},[f]),e(()=>()=>{b()},[b]),/* @__PURE__ */s("fieldset",{disabled:a,className:"m-0 mb-3 grid min-w-0 grid-cols-3 border-0 p-0 md:space-y-0 md:space-x-4 "+(a?"opacity-50":""),children:[
|
|
21
|
+
/* @__PURE__ */s("div",{className:"col-span-3 flex items-center gap-4 md:col-span-1",children:[v?.integrationSettings?.showGridViewToggle&&/* @__PURE__ */s(H,{buttons:Oe,selected:i,onChange:l}),v?.integrationSettings?.showKeywordSearch&&/* @__PURE__ */s("div",{className:"flex-auto",children:/* @__PURE__ */s("div",{className:"relative min-w-32 sm:min-w-48",children:[
|
|
22
|
+
/* @__PURE__ */s(fe,{placeholder:w("content.search_placeholder","Search using text"),value:T,className:"py-2",onChange:C,onKeyUp:S}),T?.length>0&&/* @__PURE__ */s("button",{className:"absolute inset-y-0 right-10 flex items-center",onClick:I,children:/* @__PURE__ */s(Z,{className:"text-foreground w-5"})}),
|
|
23
|
+
/* @__PURE__ */s("button",{className:"absolute inset-y-0 right-3 flex items-center",onClick:z,children:/* @__PURE__ */s(D,{className:"text-foreground w-5"})})]})}),v?.integrationSettings?.showFacialSearch&&/* @__PURE__ */s(Pe,{value:N,onChange:E})]}),
|
|
24
24
|
/* @__PURE__ */s("div",{className:"col-span-3 md:col-span-1"}),
|
|
25
|
-
/* @__PURE__ */s("div",{className:"col-span-3 mt-3 md:col-span-1 md:mt-0 lg:justify-self-end",children:/* @__PURE__ */s(
|
|
25
|
+
/* @__PURE__ */s("div",{className:"col-span-3 mt-3 md:col-span-1 md:mt-0 lg:justify-self-end",children:/* @__PURE__ */s(Ae,{engagementStyle:t,sort:c,order:m,onSortChange:u,onSortOrderChange:g})})]})},Fe=()=>/* @__PURE__ */s("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-full",width:"800",height:"469.317",viewBox:"0 0 800 469.317",role:"img","aria-hidden":"true",children:/* @__PURE__ */s("g",{transform:"translate(-443.142 -257.876)",children:[
|
|
26
26
|
/* @__PURE__ */s("path",{d:"M898.247,664.1H371.155a30.276,30.276,0,0,1-30.241-30.241V352.525a30.276,30.276,0,0,1,30.241-30.241H898.247a30.276,30.276,0,0,1,30.241,30.241V633.862A30.276,30.276,0,0,1,898.247,664.1Z",transform:"translate(308.867 25.517)",fill:"#fff"}),
|
|
27
27
|
/* @__PURE__ */s("path",{d:"M557.334,341.82H30.241A30.276,30.276,0,0,1,0,311.578V30.241A30.276,30.276,0,0,1,30.241,0H557.334a30.276,30.276,0,0,1,30.241,30.241V311.578A30.276,30.276,0,0,1,557.334,341.82ZM30.241,1.833A28.441,28.441,0,0,0,1.833,30.241V311.578a28.441,28.441,0,0,0,28.409,28.409H557.334a28.441,28.441,0,0,0,28.409-28.409V30.241A28.441,28.441,0,0,0,557.334,1.833Z",transform:"matrix(0.999, -0.035, 0.035, 0.999, 643.995, 358.158)",fill:"#d6d6e3"}),
|
|
28
28
|
/* @__PURE__ */s("path",{d:"M754.171,630.2l-509.5-135.058a30.276,30.276,0,0,1-21.483-36.981L295.28,186.212a30.276,30.276,0,0,1,36.981-21.483l509.5,135.058a30.276,30.276,0,0,1,21.483,36.981L791.152,608.712A30.276,30.276,0,0,1,754.171,630.2Z",transform:"translate(220.958 94.156)",fill:"#f2f2f2"}),
|
|
29
29
|
/* @__PURE__ */s("path",{d:"M775.247,705.1H248.155a30.276,30.276,0,0,1-30.241-30.241V393.525a30.276,30.276,0,0,1,30.241-30.241H775.247a30.276,30.276,0,0,1,30.241,30.242V674.862A30.275,30.275,0,0,1,775.247,705.1Z",transform:"translate(319.149 22.09)",fill:"#fff"}),
|
|
30
30
|
/* @__PURE__ */s("path",{d:"M638.653,701.841H298.272c-.426,0-.852-.009-1.272-.033l160.985-90.663c3.065-1.762,9.943-2.382,15.361-1.385a13.912,13.912,0,0,1,4.26,1.385l108.041,60.842,5.176,2.911Z",transform:"translate(312.538 1.526)",fill:"#e6e6e6"}),
|
|
31
31
|
/* @__PURE__ */s("path",{d:"M760.145,704.279h-294.4l57.049-26.943L526.9,675.4l74.341-35.111c4.874-2.3,16.6-2.445,22.328-.434q.577.206,1.071.434Z",transform:"translate(298.432 -0.912)",fill:"#e6e6e6"}),
|
|
32
|
-
/* @__PURE__ */s("path",{d:"M248.322,365.284a28.441,28.441,0,0,0-28.409,28.409V675.03a28.441,28.441,0,0,0,28.409,28.409H775.415a28.441,28.441,0,0,0,28.409-28.409V393.693a28.441,28.441,0,0,0-28.409-28.409Z",transform:"translate(319.149 22.09)",fill:"none",stroke:"#d6d6e3",strokeWidth:"1.833"})]})}),Fe=({position:t,gamConfig:r,eventId:a,organizationId:i})=>{const{trackGamAnalytics:o}=ie(),l=n(null),d=`gam-${t}-banner-${a??"ev"}`,u=r.placementCategories?.[t];return e(()=>{let e=!1,t=null,n=null,s=null,m=null,g=null,h=null;const p=u?[u]:[],f=document.createElement("div");f.id=d,document.body.appendChild(f);const v=()=>{const e=l.current;if(!e)return;const t=e.getBoundingClientRect(),n=t.width>0&&t.height>0;f.style.display=n?"block":"none",n&&(f.style.position="fixed",f.style.top=`${t.top}px`,f.style.left=`${t.left}px`,f.style.width="728px",f.style.height="90px",f.style.zIndex="20")};return v(),window.addEventListener("scroll",v,{passive:!0}),window.addEventListener("resize",v),(async()=>{await re(),e||window.googletag.cmd.push(()=>{if(e)return;oe(d);const l=window.googletag.defineSlot(r.adUnitPath,[[728,90]],d)?.addService(window.googletag.pubads());l&&(t=l,m=window.googletag.pubads(),a?l.setConfig({targeting:{qrati_event:a,...p.length>0?{qrati_category:p}:{}}}):p.length>0&&l.setConfig({targeting:{qrati_category:p}}),g=e=>{e.slot===l&&o({eventId:a,organizationId:i,type:c.GAM_IMPRESSION,creativeId:String(e.creativeId??""),lineItemId:String(e.lineItemId??""),advertiserId:String(e.advertiserId??""),isEmpty:e.isEmpty??!1})},m.addEventListener("slotRenderEnded",g),h=e=>{e.slot===l&&o({eventId:a,organizationId:i,type:c.GAM_VIEWABLE})},m.addEventListener("impressionViewable",h),s=ce({container:f,onClick:()=>{o({eventId:a,organizationId:i,type:c.GAM_CLICK})}}),ae(),window.googletag.display(d),n=window.setTimeout(()=>{e||(v(),l.getResponseInformation?.()||window.googletag.pubads().refresh([l]))},1500))})})(),()=>{e=!0,window.removeEventListener("scroll",v),window.removeEventListener("resize",v),null!==n&&window.clearTimeout(n),s?.(),m&&"function"==typeof m.removeEventListener&&(g&&m.removeEventListener("slotRenderEnded",g),h&&m.removeEventListener("impressionViewable",h));const r=t;t=null,r&&window.googletag?.cmd?.push(()=>{window.googletag.destroySlots([r])}),f.parentNode&&f.parentNode.removeChild(f)}},[a,r.adUnitPath,i,u,t,d]),/* @__PURE__ */s("div",{className:"flex w-full items-center justify-center overflow-x-auto py-2",children:/* @__PURE__ */s("div",{ref:l,style:{width:728,height:90,minWidth:728}})})},je=({gamConfig:t,eventId:r,organizationId:a})=>{const{trackGamAnalytics:i}=ie(),o=n(null),l=`gam-right-${r??"ev"}`,d=t.placementCategories?.right??t.placementCategories?.sidebar;return e(()=>{let e=!1,n=null,s=null,u=null,m=null,g=null,h=null;const p=d?[d]:[],f=document.createElement("div");f.id=l,document.body.appendChild(f);const v=()=>{const e=o.current;if(!e)return;const t=e.getBoundingClientRect(),n=e.parentElement?.getBoundingClientRect(),r=t.width>0&&t.height>0;if(f.style.display=r?"block":"none",!r)return;const a=t.top<=0&&n?Math.min(0,n.bottom-600):t.top;f.style.position="fixed",f.style.top=`${a}px`,f.style.left=`${t.left}px`,f.style.width="160px",f.style.height="600px",f.style.zIndex="20"};return v(),window.addEventListener("scroll",v,{passive:!0}),window.addEventListener("resize",v),(async()=>{await re(),e||window.googletag.cmd.push(()=>{if(e)return;oe(l);const o=window.googletag.defineSlot(t.adUnitPath,[[160,600]],l)?.addService(window.googletag.pubads());o&&(n=o,m=window.googletag.pubads(),r?o.setConfig({targeting:{qrati_event:r,...p.length>0?{qrati_category:p}:{}}}):p.length>0&&o.setConfig({targeting:{qrati_category:p}}),g=e=>{e.slot===o&&i({eventId:r,organizationId:a,type:c.GAM_IMPRESSION,creativeId:String(e.creativeId??""),lineItemId:String(e.lineItemId??""),advertiserId:String(e.advertiserId??""),isEmpty:e.isEmpty??!1})},m.addEventListener("slotRenderEnded",g),h=e=>{e.slot===o&&i({eventId:r,organizationId:a,type:c.GAM_VIEWABLE})},m.addEventListener("impressionViewable",h),u=ce({container:f,onClick:()=>{i({eventId:r,organizationId:a,type:c.GAM_CLICK})}}),ae(),window.googletag.display(l),s=window.setTimeout(()=>{e||(v(),o.getResponseInformation?.()||window.googletag.pubads().refresh([o]))},1500))})})(),()=>{e=!0,window.removeEventListener("scroll",v),window.removeEventListener("resize",v),null!==s&&window.clearTimeout(s),u?.(),m&&"function"==typeof m.removeEventListener&&(g&&m.removeEventListener("slotRenderEnded",g),h&&m.removeEventListener("impressionViewable",h));const t=n;n=null,t&&window.googletag?.cmd?.push(()=>{window.googletag.destroySlots([t])}),f.parentNode&&f.parentNode.removeChild(f)}},[r,t.adUnitPath,a,d,l]),/* @__PURE__ */s("div",{ref:o,style:{width:160,height:600},className:"hidden shrink-0 self-start lg:block"})},Be=t(()=>import("./C7iuJ0h32.js")),He=()=>{const t=R().eventSlug,{loadingUser:c,organization:p}=C(),f=u(),[w,b]=r(""),[S,z]=r(void 0),[_,O]=r(N),[F,j]=r(v),[B,H]=r("undefined"!=typeof window&&window.innerWidth<768?q.SINGLE:q.GRID),U=n(null),{event:G,ads:$,gamConfig:D}=J({eventSlug:t}),{loading:W,isError:Y,error:X,refetch:ne,contentsWithAds:re,hasNextPage:ae,fetchNextPage:se,isFetchingNextPage:oe}=(({event:e,ads:t=[],gamConfig:n,sort:r=N,order:i=v,keywords:s,face:o,limit:l=20})=>{const{props:c,loadingUser:d,user:u}=C(),p=c?.organizationId,{isLoading:f,isError:w,error:T,data:q,hasNextPage:x,fetchNextPage:b,isFetchingNextPage:S,refetch:L}=A({queryKey:[h.CONTENTS_BY_EVENT(e?._id??""),p??"",r,i,s,o,String(l)],queryFn:async({pageParam:t=1})=>{try{return await g.get(I.GET_CONTENTS,{searchParams:{eventId:e?._id,page:t,keywords:s,faceImageUrl:o,sort:`${m[i].sortOrder}${y[r].sortField}`,limit:l},headers:{"x-org-id":p,...u?{Authorization:`Bearer ${u.token}`}:{}}}).json()}catch(T){throw new Error(T instanceof Error?T.message:String(T)||"Failed to fetch contents")}},enabled:!d&&!!e,staleTime:6e4,gcTime:3e5,refetchOnWindowFocus:"always",initialPageParam:1,getPreviousPageParam:e=>M(e),getNextPageParam:P}),z=a(()=>q?.pages?.flatMap(e=>e?.data??[])??[],[q]);return{contents:z,contentsWithAds:a(()=>"gam"===e?.adMode?n?.inGalleryEnabled?((e=[],t,n)=>{if(!n||n<=0)return e;const[r,a]=t.sizes[0]??[300,250];let i=0;const s=[];for(let o=0;o<e.length;o++)s.push(e[o]),n>0&&(o+1)%n===0&&(s.push({_id:`gam-ad-slot-${i}`,type:E.GAM_AD,slotIndex:i,width:r,height:a}),i++);return s})(z,n,e?.adPosition??5):z:((e=[],t=[],n)=>{if(!n||n<=0)return e;let r=0;const a=[];for(let i=0;i<(e?.length||0);i++)a.push(e[i]),t.length>0&&n>0&&(i+1)%n===0&&(a.push({...t[r],type:E.AD,adType:t[r].type}),r=(r+1)%t.length);return a})(z,t,e?.adPosition),[t,z,e?.adMode,e?.adPosition,n]),loading:f,isError:w,error:T,refetch:L,hasNextPage:x,fetchNextPage:b,isFetchingNextPage:S}})({event:G,ads:$,gamConfig:D,sort:_,order:F,keywords:w,face:S}),{incrementEventView:le}=ie(),{start:ce,initializing:de,running:ue}=(({ref:t,onBottomReached:a,hasNextPage:i,fetchNextPage:s,isFetchingNextPage:o})=>{const[l,c]=r(!1),[d,u]=r(!1),m=n(1),g=n(null),h=n(null),p=n(null),f=n(0),v=n(!1),w=n(null),T=n(null),y=n(!1),N=n(),q=n(),x=n(i),b=n(o),E=n(s),C=n(a);x.current=i,b.current=o,E.current=s,C.current=a,e(()=>{o||(v.current=!1)},[o]);const S=()=>{null!==g.current&&(window.cancelAnimationFrame(g.current),g.current=null)},I=e=>{const n=t.current;if(!n)return;null===p.current&&(p.current=e);const r=Math.min((e-p.current)/1e3,.05);p.current=e,f.current+=60*m.current*r;const a=Math.floor(f.current);a>0&&(n.scrollTop+=a,f.current-=a),x.current&&!b.current&&!v.current&&"function"==typeof E.current&&n.scrollTop+n.clientHeight>=.5*n.scrollHeight&&(v.current=!0,E.current()),Math.ceil(n.scrollTop)+n.clientHeight>=n.scrollHeight?(S(),h.current=window.setTimeout(()=>{u(!0),C.current?.(),v.current=!1,h.current=window.setTimeout(()=>{t.current&&(t.current.scrollTop=0),u(!1),f.current=0,p.current=null,g.current=window.requestAnimationFrame(I)},1e3)},1e3)):g.current=window.requestAnimationFrame(I)},L=()=>{S(),h.current&&(window.clearTimeout(h.current),h.current=null),null!==w.current&&w.current.release().catch(()=>{}).finally(()=>{w.current=null}),T.current&&(document.removeEventListener("visibilitychange",T.current),T.current=null),y.current&&(N.current&&document.removeEventListener("keydown",N.current),q.current&&document.removeEventListener("fullscreenchange",q.current),y.current=!1),c(!1),u(!1),t.current&&(t.current.scrollTop=0)},z=n(e=>{"+"===e.key&&(m.current=Math.min(m.current+1,10)),"-"===e.key&&(m.current=Math.max(m.current-1,1))}),k=n(()=>{document.fullscreenElement||L()});return k.current=()=>{document.fullscreenElement||L()},e(()=>()=>{L()},[]),{start:()=>{if(t?.current?.requestFullscreen)t.current.requestFullscreen();else{const e=t.current;e?.webkitRequestFullscreen?e.webkitRequestFullscreen():e?.mozRequestFullScreen?e.mozRequestFullScreen():e?.msRequestFullscreen&&e.msRequestFullscreen()}(async()=>{try{if(!("wakeLock"in navigator))return;const e=navigator;w.current=await e.wakeLock.request("screen");const t=async()=>{"visible"===document.visibilityState&&(w.current=await e.wakeLock.request("screen"))};T.current=t,document.addEventListener("visibilitychange",t)}catch(e){}})(),y.current||(N.current=e=>z.current(e),q.current=()=>k.current(),document.addEventListener("keydown",N.current),document.addEventListener("fullscreenchange",q.current),y.current=!0),f.current=0,p.current=null,v.current=!1,c(!0),S(),h.current=window.setTimeout(()=>{g.current=window.requestAnimationFrame(I)},300)},initializing:d,running:l}})({ref:U,hasNextPage:ae,fetchNextPage:se,isFetchingNextPage:oe,onBottomReached:()=>G?._id&&f.refetchQueries({queryKey:[h.CONTENTS_BY_EVENT(G._id)]})});e(()=>{G?.slug&&le(G.slug)},[G?.slug,le]);const me=a(()=>B===q.SINGLE,[B]),he=a(()=>/* @__PURE__ */s(ze,{event:G,onAutoscrollClick:ce}),[G,ce]),pe=n(null),fe=n({hasNextPage:ae,isFetchingNextPage:oe,loading:W,running:ue,fetchNextPage:se});fe.current={hasNextPage:ae,isFetchingNextPage:oe,loading:W,running:ue,fetchNextPage:se},e(()=>(pe.current=new IntersectionObserver(e=>{const t=fe.current;t.running||e[0].isIntersecting&&t.hasNextPage&&!t.isFetchingNextPage&&!t.loading&&t.fetchNextPage()},{rootMargin:"200px"}),()=>{pe.current?.disconnect(),pe.current=null}),[]);const ve=o(e=>{const t=pe.current;t&&(t.disconnect(),e&&t.observe(e))},[]),we=D?.bannerPositions??[],ye=p?._id,Ne=D&&we.includes("right"),qe=Boolean(p?.integrationSettings?.showQuickSearch);/* @__PURE__ */
|
|
32
|
+
/* @__PURE__ */s("path",{d:"M248.322,365.284a28.441,28.441,0,0,0-28.409,28.409V675.03a28.441,28.441,0,0,0,28.409,28.409H775.415a28.441,28.441,0,0,0,28.409-28.409V393.693a28.441,28.441,0,0,0-28.409-28.409Z",transform:"translate(319.149 22.09)",fill:"none",stroke:"#d6d6e3",strokeWidth:"1.833"})]})}),je=({position:t,gamConfig:r,eventId:a,organizationId:i})=>{const{trackGamAnalytics:o}=ie(),l=n(null),c=`gam-${t}-banner-${a??"ev"}`,d=r.placementCategories?.[t];return e(()=>{let e=!1,t=null,n=null,s=null,u=null,m=null,g=null;const h=d?[d]:[],f=document.createElement("div");f.id=c,document.body.appendChild(f);const p=()=>{const e=l.current;if(!e)return;const t=e.getBoundingClientRect(),n=t.width>0&&t.height>0;f.style.display=n?"block":"none",n&&(f.style.position="fixed",f.style.top=`${t.top}px`,f.style.left=`${t.left}px`,f.style.width="728px",f.style.height="90px",f.style.zIndex="20")};return p(),window.addEventListener("scroll",p,{passive:!0}),window.addEventListener("resize",p),(async()=>{await re(),e||window.googletag.cmd.push(()=>{if(e)return;oe(c);const l=window.googletag.defineSlot(r.adUnitPath,[[728,90]],c)?.addService(window.googletag.pubads());l&&(t=l,u=window.googletag.pubads(),a?l.setConfig({targeting:{qrati_event:a,...h.length>0?{qrati_category:h}:{}}}):h.length>0&&l.setConfig({targeting:{qrati_category:h}}),m=e=>{e.slot===l&&o({eventId:a,organizationId:i,type:y.GAM_IMPRESSION,creativeId:String(e.creativeId??""),lineItemId:String(e.lineItemId??""),advertiserId:String(e.advertiserId??""),isEmpty:e.isEmpty??!1})},u.addEventListener("slotRenderEnded",m),g=e=>{e.slot===l&&o({eventId:a,organizationId:i,type:y.GAM_VIEWABLE})},u.addEventListener("impressionViewable",g),s=ce({container:f,onClick:()=>{o({eventId:a,organizationId:i,type:y.GAM_CLICK})}}),ae(),window.googletag.display(c),n=window.setTimeout(()=>{e||(p(),l.getResponseInformation?.()||window.googletag.pubads().refresh([l]))},1500))})})(),()=>{e=!0,window.removeEventListener("scroll",p),window.removeEventListener("resize",p),null!==n&&window.clearTimeout(n),s?.(),u&&"function"==typeof u.removeEventListener&&(m&&u.removeEventListener("slotRenderEnded",m),g&&u.removeEventListener("impressionViewable",g));const r=t;t=null,r&&window.googletag?.cmd?.push(()=>{window.googletag.destroySlots([r])}),f.parentNode&&f.parentNode.removeChild(f)}},[a,r.adUnitPath,i,d,t,c]),/* @__PURE__ */s("div",{className:"flex w-full items-center justify-center overflow-x-auto py-2",children:/* @__PURE__ */s("div",{ref:l,style:{width:728,height:90,minWidth:728}})})},Be=({gamConfig:t,eventId:r,organizationId:a})=>{const{trackGamAnalytics:i}=ie(),o=n(null),l=`gam-right-${r??"ev"}`,c=t.placementCategories?.right??t.placementCategories?.sidebar;return e(()=>{let e=!1,n=null,s=null,d=null,u=null,m=null,g=null;const h=c?[c]:[],f=document.createElement("div");f.id=l,document.body.appendChild(f);const p=()=>{const e=o.current;if(!e)return;const t=e.getBoundingClientRect(),n=e.parentElement?.getBoundingClientRect(),r=t.width>0&&t.height>0;if(f.style.display=r?"block":"none",!r)return;const a=t.top<=0&&n?Math.min(0,n.bottom-600):t.top;f.style.position="fixed",f.style.top=`${a}px`,f.style.left=`${t.left}px`,f.style.width="160px",f.style.height="600px",f.style.zIndex="20"};return p(),window.addEventListener("scroll",p,{passive:!0}),window.addEventListener("resize",p),(async()=>{await re(),e||window.googletag.cmd.push(()=>{if(e)return;oe(l);const o=window.googletag.defineSlot(t.adUnitPath,[[160,600]],l)?.addService(window.googletag.pubads());o&&(n=o,u=window.googletag.pubads(),r?o.setConfig({targeting:{qrati_event:r,...h.length>0?{qrati_category:h}:{}}}):h.length>0&&o.setConfig({targeting:{qrati_category:h}}),m=e=>{e.slot===o&&i({eventId:r,organizationId:a,type:y.GAM_IMPRESSION,creativeId:String(e.creativeId??""),lineItemId:String(e.lineItemId??""),advertiserId:String(e.advertiserId??""),isEmpty:e.isEmpty??!1})},u.addEventListener("slotRenderEnded",m),g=e=>{e.slot===o&&i({eventId:r,organizationId:a,type:y.GAM_VIEWABLE})},u.addEventListener("impressionViewable",g),d=ce({container:f,onClick:()=>{i({eventId:r,organizationId:a,type:y.GAM_CLICK})}}),ae(),window.googletag.display(l),s=window.setTimeout(()=>{e||(p(),o.getResponseInformation?.()||window.googletag.pubads().refresh([o]))},1500))})})(),()=>{e=!0,window.removeEventListener("scroll",p),window.removeEventListener("resize",p),null!==s&&window.clearTimeout(s),d?.(),u&&"function"==typeof u.removeEventListener&&(m&&u.removeEventListener("slotRenderEnded",m),g&&u.removeEventListener("impressionViewable",g));const t=n;n=null,t&&window.googletag?.cmd?.push(()=>{window.googletag.destroySlots([t])}),f.parentNode&&f.parentNode.removeChild(f)}},[r,t.adUnitPath,a,c,l]),/* @__PURE__ */s("div",{ref:o,style:{width:160,height:600},className:"hidden shrink-0 self-start lg:block"})},He=t(()=>import("./qBKIp1ZW2.js")),Ue=()=>{const t=R().eventSlug,{loadingUser:u,organization:T}=d(),y=m(),[E,C]=r(""),[z,M]=r(void 0),[P,O]=r(A),[F,j]=r(x),[B,H]=r("undefined"!=typeof window&&window.innerWidth<768?I.SINGLE:I.GRID),U=n(null),{event:G,ads:$,gamConfig:W}=J({eventSlug:t}),{loading:D,isError:Y,error:X,refetch:ne,contentsWithAds:re,hasNextPage:ae,fetchNextPage:se,isFetchingNextPage:oe}=(({event:e,ads:t=[],gamConfig:n,sort:r=A,order:i=x,keywords:s,face:o,limit:l=20})=>{const{props:c,loadingUser:u,user:m}=d(),T=c?.organizationId,{isLoading:y,isError:N,error:b,data:E,hasNextPage:C,fetchNextPage:I,isFetchingNextPage:z,refetch:k}=h({queryKey:[v.CONTENTS_BY_EVENT(e?._id??""),T??"",r,i,s,o,String(l)],queryFn:async({pageParam:t=1})=>{try{return await p.get(S.GET_CONTENTS,{searchParams:{eventId:e?._id,page:t,keywords:s,faceImageUrl:o,sort:`${w[i].sortOrder}${L[r].sortField}`,limit:l},headers:{"x-org-id":T,...m?{Authorization:`Bearer ${m.token}`}:{}}}).json()}catch(b){throw new Error(b instanceof Error?b.message:String(b)||"Failed to fetch contents")}},enabled:!u&&!!e,staleTime:6e4,gcTime:3e5,refetchOnWindowFocus:"always",initialPageParam:1,getPreviousPageParam:e=>g(e),getNextPageParam:f}),M=a(()=>E?.pages?.flatMap(e=>e?.data??[])??[],[E]);return{contents:M,contentsWithAds:a(()=>{const r=Boolean(n?.inGalleryEnabled);return((e=[],{ads:t,gamConfig:n,position:r,gamShare:a})=>{if(r<=0)return e;const i=Boolean(n?.inGalleryEnabled),s=t.length>0;if(!i&&!s)return e;const o=i?s?Math.min(1,Math.max(0,a)):1:0,l=e=>{const n=t.length>1?t.filter(t=>t._id!==e):t,r=n.reduce((e,t)=>e+Math.max(1,t.frequency??1),0);let a=Math.random()*r;for(const t of n)if(a-=Math.max(1,t.frequency??1),a<=0)return t;return n[n.length-1]};let c=null,d=0;const u=[];for(let m=0;m<e.length;m++)if(u.push(e[m]),(m+1)%r===0){if(i&&(!s||Math.floor((d+1)*o)>Math.floor(d*o))&&n){const e=s?l(c):null;u.push({_id:`gam-ad-slot-${d}`,type:q.GAM_AD,slotIndex:d,gamConfig:n,fallbackAd:e,width:n.sizes[0]?.[0]??300,height:n.sizes[0]?.[1]??250})}else{const e=l(c);c=e._id??null,u.push({...e,type:q.AD,adType:e.type})}d++}return u})(M,{ads:"gam"!==e?.adMode||r?t:[],gamConfig:r?n:null,position:e?.adPosition??0,gamShare:(n?.inGalleryBlend??50)/100})},[M,t,e,n]),loading:y,isError:N,error:b,refetch:k,hasNextPage:C,fetchNextPage:I,isFetchingNextPage:z}})({event:G,ads:$,gamConfig:W,sort:P,order:F,keywords:E,face:z}),{incrementEventView:le}=ie(),{start:ce,initializing:de,running:ue}=(({ref:t,onBottomReached:a,hasNextPage:i,fetchNextPage:s,isFetchingNextPage:o})=>{const[l,c]=r(!1),[d,u]=r(!1),m=n(1),g=n(null),h=n(null),f=n(null),p=n(0),w=n(!1),v=n(null),T=n(null),y=n(!1),N=n(),q=n(),x=n(i),b=n(o),E=n(s),C=n(a);x.current=i,b.current=o,E.current=s,C.current=a,e(()=>{o||(w.current=!1)},[o]);const S=()=>{null!==g.current&&(window.cancelAnimationFrame(g.current),g.current=null)},I=e=>{const n=t.current;if(!n)return;null===f.current&&(f.current=e);const r=Math.min((e-f.current)/1e3,.05);f.current=e,p.current+=60*m.current*r;const a=Math.floor(p.current);a>0&&(n.scrollTop+=a,p.current-=a),x.current&&!b.current&&!w.current&&"function"==typeof E.current&&n.scrollTop+n.clientHeight>=.5*n.scrollHeight&&(w.current=!0,E.current()),Math.ceil(n.scrollTop)+n.clientHeight>=n.scrollHeight?(S(),h.current=window.setTimeout(()=>{u(!0),C.current?.(),w.current=!1,h.current=window.setTimeout(()=>{t.current&&(t.current.scrollTop=0),u(!1),p.current=0,f.current=null,g.current=window.requestAnimationFrame(I)},1e3)},1e3)):g.current=window.requestAnimationFrame(I)},z=()=>{S(),h.current&&(window.clearTimeout(h.current),h.current=null),null!==v.current&&v.current.release().catch(()=>{}).finally(()=>{v.current=null}),T.current&&(document.removeEventListener("visibilitychange",T.current),T.current=null),y.current&&(N.current&&document.removeEventListener("keydown",N.current),q.current&&document.removeEventListener("fullscreenchange",q.current),y.current=!1),c(!1),u(!1),t.current&&(t.current.scrollTop=0)},L=n(e=>{"+"===e.key&&(m.current=Math.min(m.current+1,10)),"-"===e.key&&(m.current=Math.max(m.current-1,1))}),k=n(()=>{document.fullscreenElement||z()});return k.current=()=>{document.fullscreenElement||z()},e(()=>()=>{z()},[]),{start:()=>{if(t?.current?.requestFullscreen)t.current.requestFullscreen();else{const e=t.current;e?.webkitRequestFullscreen?e.webkitRequestFullscreen():e?.mozRequestFullScreen?e.mozRequestFullScreen():e?.msRequestFullscreen&&e.msRequestFullscreen()}(async()=>{try{if(!("wakeLock"in navigator))return;const e=navigator;v.current=await e.wakeLock.request("screen");const t=async()=>{"visible"===document.visibilityState&&(v.current=await e.wakeLock.request("screen"))};T.current=t,document.addEventListener("visibilitychange",t)}catch(e){}})(),y.current||(N.current=e=>L.current(e),q.current=()=>k.current(),document.addEventListener("keydown",N.current),document.addEventListener("fullscreenchange",q.current),y.current=!0),p.current=0,f.current=null,w.current=!1,c(!0),S(),h.current=window.setTimeout(()=>{g.current=window.requestAnimationFrame(I)},300)},initializing:d,running:l}})({ref:U,hasNextPage:ae,fetchNextPage:se,isFetchingNextPage:oe,onBottomReached:()=>G?._id&&y.refetchQueries({queryKey:[v.CONTENTS_BY_EVENT(G._id)]})});e(()=>{G?.slug&&le(G.slug)},[G?.slug,le]);const me=a(()=>B===I.SINGLE,[B]),he=a(()=>/* @__PURE__ */s(ke,{event:G,onAutoscrollClick:ce}),[G,ce]),fe=n(null),pe=n({hasNextPage:ae,isFetchingNextPage:oe,loading:D,running:ue,fetchNextPage:se});pe.current={hasNextPage:ae,isFetchingNextPage:oe,loading:D,running:ue,fetchNextPage:se},e(()=>(fe.current=new IntersectionObserver(e=>{const t=pe.current;t.running||e[0].isIntersecting&&t.hasNextPage&&!t.isFetchingNextPage&&!t.loading&&t.fetchNextPage()},{rootMargin:"200px"}),()=>{fe.current?.disconnect(),fe.current=null}),[]);const we=o(e=>{const t=fe.current;t&&(t.disconnect(),e&&t.observe(e))},[]),ve=W?.bannerPositions??[],Te=T?._id,Ne=W&&ve.includes("right"),qe=Boolean(T?.integrationSettings?.showQuickSearch);/* @__PURE__ */
|
|
33
33
|
return s("div",{className:"bg-background mx-auto min-h-[80vh]",children:[
|
|
34
34
|
/* @__PURE__ */s("div",{className:"flex flex-row justify-end gap-4 pt-2",children:he}),
|
|
35
|
-
/* @__PURE__ */s("div",{className:"pb-3",children:/* @__PURE__ */s(
|
|
36
|
-
/* @__PURE__ */s(
|
|
37
|
-
/* @__PURE__ */s("div",{className:"flex items-start gap-4",children:[/* @__PURE__ */s("div",{className:"min-w-0 flex-1",children:[
|
|
38
|
-
/* @__PURE__ */s("div",{ref:U,className:
|
|
39
|
-
/* @__PURE__ */s("div",{ref:
|
|
35
|
+
/* @__PURE__ */s("div",{className:"pb-3",children:/* @__PURE__ */s(ye,{})}),W&&ve.includes("top")&&/* @__PURE__ */s(je,{position:"top",gamConfig:W,eventId:G?._id,organizationId:Te}),
|
|
36
|
+
/* @__PURE__ */s(Ve,{engagementStyle:G?.engagementStyle,disabled:u||D,mode:B,onModeChange:e=>H(e),sort:P,sortOrder:F,onSortChange:e=>O(e),onSortOrderChange:()=>j("asc"===F?"desc":"asc"),handleChange:C,face:z,onFaceImageChange:e=>M(e)}),z&&/* @__PURE__ */s("div",{className:"flex gap-4 py-2",children:[/* @__PURE__ */s("div",{className:"space-y-2",children:[/* @__PURE__ */s(V,{variant:"h4",children:"Searching using"}),/* @__PURE__ */s("img",{src:z,alt:"face",className:"h-32 rounded"})]}),/* @__PURE__ */s("div",{className:"flex flex-col justify-end gap-2",children:/* @__PURE__ */s(ee,{color:"error",icon:/* @__PURE__ */s(Z,{className:"size-5"}),onClick:()=>M(void 0),children:"Clear search"})})]}),
|
|
37
|
+
/* @__PURE__ */s("div",{className:"flex items-start gap-4",children:[/* @__PURE__ */s("div",{className:"min-w-0 flex-1",children:[u||D?/* @__PURE__ */s("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 md:grid-cols-3",children:Array.from({length:8}).map((e,t)=>/* @__PURE__ */s(Q,{className:"h-72"},t))}):Y?/* @__PURE__ */s("div",{className:"my-16 flex flex-col items-center gap-4",children:/* @__PURE__ */s(K,{title:X?.message?.toLowerCase().includes("timed out")?"Request timed out":"Failed to load",description:/* @__PURE__ */s("div",{className:"flex flex-col items-center gap-4",children:[/* @__PURE__ */s(V,{variant:"body2",color:"muted",align:"center",children:X?.message?.toLowerCase().includes("timed out")?"The search took too long to respond. Please try again.":"Something went wrong while loading content."}),/* @__PURE__ */s(ee,{icon:/* @__PURE__ */s(ge,{className:"size-5"}),onClick:()=>{ne()},children:"Retry"})]})})}):re?.length<=0?/* @__PURE__ */s("div",{className:"my-16 flex flex-col items-center gap-4",children:/* @__PURE__ */s(K,{title:"No Contents",description:"Check back soon for amazing contents.",iconSvg:/* @__PURE__ */s(Fe,{})})}):/* @__PURE__ */s(l,{children:[
|
|
38
|
+
/* @__PURE__ */s("div",{ref:U,className:c(me?"flex w-full justify-center":"",de?"opacity-0":"opacity-100",ue?"scrollbar-hide pointer-events-none transition-opacity duration-300":"pointer-events-auto transition-none","relative size-full overflow-auto"),children:/* @__PURE__ */s(i,{fallback:/* @__PURE__ */s("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",children:Array.from({length:8}).map((e,t)=>/* @__PURE__ */s(Q,{className:"h-72"},t))}),children:/* @__PURE__ */s(He,{event:G,contents:re,gamConfig:W,singleColumnMode:me,kioskMode:ue,timestampField:P===N.CAPTURE_TIME?"capturedAt":void 0,curateLink:G?.engagementStyle===b.CONTEST&&G.status===k.OPEN&&G.slug?_.CURATE(G.slug):void 0,onChangeFaceUrl:e=>M(e),showQuickSearch:qe})})}),
|
|
39
|
+
/* @__PURE__ */s("div",{ref:we,className:"h-4 w-full","aria-hidden":"true"}),oe&&/* @__PURE__ */s("div",{className:"mx-auto my-6 w-fit",children:/* @__PURE__ */s(te,{className:"size-8"})})]}),W&&ve.includes("bottom")&&/* @__PURE__ */s(je,{position:"bottom",gamConfig:W,eventId:G?._id,organizationId:Te})]}),Ne&&/* @__PURE__ */s(Be,{gamConfig:W,eventId:G?._id,organizationId:Te})]})]})};export{Ue as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{t as e}from"./DrrpB4Om.js";import{i as r}from"./
|
|
1
|
+
import{t as e}from"./DrrpB4Om.js";import{i as r}from"./CKQOToSD.js";import{t as a}from"./DmIYOIw1.js";var s=e=>e&&e.length>0?e.charAt(0).toUpperCase()+e.slice(1).toLowerCase():"",t=e=>e.trim()?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)?void 0:"Enter a valid email":"Please enter your email",o=e=>e?e.length<8?"Min password length is 8":void 0:"Please enter your password",i=e=>{if(!e.trim())return"First name is required"},n=e=>{if(!e.trim())return"Last name is required"},d=(e,r)=>e?e!==r?"Passwords do not match":void 0:"Please confirm your password",l=({label:s,type:t="text",disabled:o,error:i,iconSVG:n,actionIcon:d,onActionClick:l,actionLabel:m,className:c="",step:u,...p})=>/* @__PURE__ */e("div",{className:"relative",children:[s&&/* @__PURE__ */e(a,{variant:"body1",className:"sm:mb-1",children:s}),
|
|
2
2
|
/* @__PURE__ */e("div",{className:"relative",children:[n&&/* @__PURE__ */e("div",{className:r("pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3",o?"text-muted-foreground":" "),children:n}),/* @__PURE__ */e("input",{type:t,disabled:o,step:"number"===t?u:void 0,"aria-invalid":!!i,className:r("border-border shadow-outer focus:border-primary peer w-full rounded border px-4 py-2 focus:border focus:ring-0 focus:outline-none",o?"text-muted-foreground bg-transparent":"bg-input",i?"border-destructive animate-pulse":"border-border animate-none",n?"pl-9":"",c),...p,value:p.value??""})]}),i&&/* @__PURE__ */e(a,{variant:"caption",color:"error","data-testid":"input-error",children:i})]});export{i as a,t as i,s as n,n as o,d as r,o as s,l as t};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{D as e,_ as t,a as r,f as o,h as n,t as s}from"./DrrpB4Om.js";import{i}from"./
|
|
1
|
+
import{D as e,_ as t,a as r,f as o,h as n,t as s}from"./DrrpB4Om.js";import{i}from"./CKQOToSD.js";import{n as a}from"./BkIDQGIs.js";var l=({as:r="div",className:n,threshold:s=.5,rootMargin:i="0px",triggerOnce:a,onChange:l,onClick:h,children:c})=>{const u=o(null),d=o(!1),p=o(l);return p.current=l,t(()=>{const e=u.current;if(!e)return;d.current=!1;const t=new IntersectionObserver(e=>{e.forEach(e=>{a&&d.current||(e.isIntersecting&&(d.current=!0),p.current?.(e.isIntersecting))})},{threshold:s,rootMargin:i});return t.observe(e),()=>t.disconnect()},[s,i,a]),e(r,{ref:u,className:n,onClick:h},c)},h=Object.defineProperty,c=Object.defineProperties,u=Object.getOwnPropertyDescriptors,d=Object.getOwnPropertySymbols,p=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable,g=(e,t,r)=>t in e?h(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,m=(e,t)=>{for(var r in t||(t={}))p.call(t,r)&&g(e,r,t[r]);if(d)for(var r of d(t))f.call(t,r)&&g(e,r,t[r]);return e},b=(e,t)=>c(e,u(t)),w=(e,t)=>{var r={};for(var o in e)p.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(null!=e&&d)for(var o of d(e))t.indexOf(o)<0&&f.call(e,o)&&(r[o]=e[o]);return r},v=class extends r{constructor(){super(...arguments),this.canvas=null,this.handleRef=e=>{this.canvas=e,this.draw()},this.draw=()=>{let{hash:e,height:t,punch:r,width:o}=this.props;if(this.canvas){let n=a(e,o,t,r),s=this.canvas.getContext("2d"),i=s.createImageData(o,t);i.data.set(n),s.putImageData(i,0,0)}}}componentDidUpdate(){this.draw()}render(){let t=this.props,{hash:r,height:o,width:n}=t,s=w(t,["hash","height","width"]);return e("canvas",b(m({},s),{height:o,width:n,ref:this.handleRef}))}};v.defaultProps={height:128,width:128};var y={position:"absolute",top:0,bottom:0,left:0,right:0,width:"100%",height:"100%"};(class extends r{componentDidUpdate(){if(this.props.resolutionX<=0)throw new Error("resolutionX must be larger than zero");if(this.props.resolutionY<=0)throw new Error("resolutionY must be larger than zero")}render(){let t=this.props,{hash:r,height:o,width:n,punch:s,resolutionX:i,resolutionY:a,style:l}=t,h=w(t,["hash","height","width","punch","resolutionX","resolutionY","style"]);return e("div",b(m({},h),{style:b(m({display:"inline-block",height:o,width:n},l),{position:"relative"})}),e(v,{hash:r,height:a,width:i,punch:s,style:y}))}}).defaultProps={height:128,width:128,resolutionX:32,resolutionY:32};var j=v,O=({src:e,alt:r,threshold:a=.1,rootMargin:h="600px 0px",blurhash:c,containerClassName:u="size-full",wrapperClassName:d,imgClassName:p="",sizeMode:f="cover",position:g="center",delayMs:m=100,delayTime:b,onClick:w})=>{const v=c&&c.length>=6?c:"LEHV6nWB2yk8pyo0adR*.7kCMdnj",[y,O]=n(!1),[C,x]=n(!1),[N,k]=n(!1),z=o(null);t(()=>{O(!1),x(!1)},[e]);const M="number"==typeof b?b:m,P=d??u;t(()=>{if(!y)return N?z.current=window.setTimeout(()=>{x(!0)},M):z.current&&(clearTimeout(z.current),z.current=null),()=>{z.current&&clearTimeout(z.current)}},[N,y,M]);const D=C&&N||y;/* @__PURE__ */
|
|
2
2
|
return s(l,{as:"div",className:i(P,"relative overflow-hidden"),threshold:a,rootMargin:h,onChange:e=>k(e),children:[N&&/* @__PURE__ */s(j,{className:"size-full blur-2xl",hash:v}),D&&e&&/* @__PURE__ */s("img",{alt:r,src:e,loading:"lazy",decoding:"async",onLoad:()=>O(!0),className:i("absolute top-0 left-0 size-full object-center transition-all duration-300",y?"scale-100 opacity-100":"scale-95 opacity-0","contain"===f?"object-contain":"object-cover","top"===g?"object-top":"bottom"===g?"object-bottom":"object-center",p),onClick:e=>w?.(e)})]})};export{l as n,O as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{t as e}from"./DrrpB4Om.js";import{i as r}from"./
|
|
1
|
+
import{t as e}from"./DrrpB4Om.js";import{i as r}from"./CKQOToSD.js";import{t}from"./DyemeRjE2.js";import{n as o,o as s,r as i,t as n}from"./Vk429P022.js";function d({className:r}){/* @__PURE__ */
|
|
2
2
|
return e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:r,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */e("path",{fill:"currentColor",d:"M2.725 21q-.275 0-.5-.137t-.35-.363t-.137-.488t.137-.512l9.25-16q.15-.25.388-.375T12 3t.488.125t.387.375l9.25 16q.15.25.138.513t-.138.487t-.35.363t-.5.137zm1.725-2h15.1L12 6zm8.263-1.287Q13 17.425 13 17t-.288-.712T12 16t-.712.288T11 17t.288.713T12 18t.713-.288m0-3Q13 14.425 13 14v-3q0-.425-.288-.712T12 10t-.712.288T11 11v3q0 .425.288.713T12 15t.713-.288M12 12.5"})})}function a({open:a,onOpenChange:l,title:c,description:u,cancelText:g="Cancel",confirmText:m="Confirm",confirmColor:f="error",loading:h,onCancel:b,onConfirm:v}){/* @__PURE__ */
|
|
3
3
|
return e(n,{open:a,onOpenChange:l,children:/* @__PURE__ */e(o,{className:"w-full max-w-lg",children:[/* @__PURE__ */e("div",{className:"flex flex-col gap-6 p-2 sm:flex-row sm:items-start sm:p-4",children:[/* @__PURE__ */e("div",{className:"bg-destructive/10 mx-auto flex size-12 shrink-0 items-center justify-center rounded-full sm:mx-0",children:/* @__PURE__ */e(d,{className:"text-destructive size-6"})}),/* @__PURE__ */e("div",{className:"flex-1 space-y-2 text-center sm:text-left",children:[c&&/* @__PURE__ */e(s,{children:c}),u&&/* @__PURE__ */e(i,{children:u})]})]}),/* @__PURE__ */e("div",{className:"flex flex-col-reverse gap-3 p-4 sm:flex-row sm:justify-end",children:[/* @__PURE__ */e(t,{variant:"outlined",color:"foreground",disabled:h,className:"w-full sm:w-auto",onClick:b,children:g}),/* @__PURE__ */e(t,{color:f,loading:h,disabled:h,className:r("w-full sm:w-auto","error"===f&&"text-white"),onClick:v,children:m})]})]})})}var l={xs:"size-6 [&>*]:size-4",sm:"size-8 [&>*]:size-5",md:"size-10 [&>*]:size-6",lg:"size-12 [&>*]:size-7"},c={ghost:{primary:"text-primary hover:bg-primary/10",foreground:"text-foreground hover:bg-foreground/10",muted:"text-muted-foreground hover:bg-muted/20",error:"text-destructive hover:bg-destructive/10",success:"text-success hover:bg-success/10",warning:"text-warning hover:bg-warning/10",info:"text-info hover:bg-info/10"},filled:{primary:"bg-primary text-primary-foreground hover:bg-primary/90",foreground:"bg-foreground text-background hover:bg-foreground/90",muted:"bg-muted text-muted-foreground hover:bg-muted/80",error:"bg-destructive text-white hover:bg-destructive/90",success:"bg-success text-white hover:bg-success/90",warning:"bg-warning text-white hover:bg-warning/90",info:"bg-info text-white hover:bg-info/90"},outlined:{primary:"border border-primary text-primary hover:bg-primary/10",foreground:"border border-foreground text-foreground hover:bg-foreground/10",muted:"border border-border text-muted-foreground hover:bg-muted/20",error:"border border-destructive text-destructive hover:bg-destructive/10",success:"border border-success text-success hover:bg-success/10",warning:"border border-warning text-warning hover:bg-warning/10",info:"border border-info text-info hover:bg-info/10"}};function u({icon:t,size:o="md",variant:s="ghost",color:i="foreground",loading:n,disabled:d,tooltip:a,className:u,...g}){const m="default"===s?"filled":s,f=r("inline-flex cursor-pointer items-center justify-center rounded-full transition-colors disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50",l[o],c[m]?.[i]||c[m]?.foreground,u);/* @__PURE__ */
|
|
4
4
|
return e("button",{type:"button",disabled:d||n,className:f,title:a,...g,children:n?/* @__PURE__ */e("svg",{className:"animate-spin",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:/* @__PURE__ */e("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})}):t})}function g({className:r}){/* @__PURE__ */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=Object.create,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,l=Object.getPrototypeOf,n=Object.prototype.hasOwnProperty,a=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),u=(e,r)=>{let o={};for(var l in e)t(o,l,{get:e[l],enumerable:!0});return r||t(o,Symbol.toStringTag,{value:"Module"}),o},p=(a,u,p)=>(p=null!=a?e(l(a)):{},((e,l,a,u)=>{if(l&&"object"==typeof l||"function"==typeof l)for(var p,b=o(l),c=0,s=b.length;c<s;c++)p=b[c],n.call(e,p)||void 0===p||t(e,p,{get:(e=>l[e]).bind(null,p),enumerable:!(u=r(l,p))||u.enumerable});return e})(!u&&a&&a.__esModule?p:t(p,"default",{value:a,enumerable:!0}),a));export{u as n,p as r,a as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{E as t,S as e,_ as n,f as s,h as r,p as i,t as a,v as o,w as l,y as c}from"./DrrpB4Om.js";import{i as u}from"./
|
|
1
|
+
import{E as t,S as e,_ as n,f as s,h as r,p as i,t as a,v as o,w as l,y as c}from"./DrrpB4Om.js";import{i as u}from"./CKQOToSD.js";var h=t(null),p=t(null),d=class{entries;index=0;listeners=/* @__PURE__ */new Set;constructor(t="/"){this.entries=[{path:t}]}get location(){return this.entries[this.index]?.path??"/"}get state(){return this.entries[this.index]?.state}push(t,e){this.entries=this.entries.slice(0,this.index+1),this.index=this.entries.push({path:t,state:e})-1,this.notify()}replace(t,e){this.entries[this.index]={path:t,state:e},this.notify()}go(t){const e=this.index+t;e>=0&&e<this.entries.length&&(this.index=e,this.notify())}listen(t){return this.listeners.add(t),()=>this.listeners.delete(t)}notify(){this.listeners.forEach(t=>t(this.location))}},f=class{listeners=/* @__PURE__ */new Set;get location(){return window.location.hash.replace(/^#/,"")||"/"}get state(){return window.history.state?.__qrati_state}makeUrl(t){return`${window.location.pathname+window.location.search}#${t}`}push(t,e){window.history.pushState({__qrati_state:e},"",this.makeUrl(t)),this.notify()}replace(t,e){window.history.replaceState({__qrati_state:e},"",this.makeUrl(t)),this.notify()}go(t){window.history.go(t)}listen(t){this.listeners.add(t);const e=()=>this.notify();return window.addEventListener("popstate",e),window.addEventListener("hashchange",e),queueMicrotask(()=>t(this.location)),()=>{this.listeners.delete(t),window.removeEventListener("popstate",e),window.removeEventListener("hashchange",e)}}notify(){this.listeners.forEach(t=>t(this.location))}};function m(){const t=c(p);if(!t)throw new Error("useParams must be used inside a Route");return t.params}function w(){const t=c(h);if(!t)throw new Error("useNavigate must be used inside a Router");const{navigate:e,go:n}=t;return o((t,s)=>{"number"!=typeof t?e(t,s):n(t)},[e,n])}function y(){const t=c(h);if(!t)throw new Error("useLocation must be used inside a Router");return{pathname:t.location,state:t.state,search:"",hash:""}}function v(t,e,n=!0){const s=t.split("/").filter(Boolean),r=function(t){const e=[],n=t.split("/").filter(Boolean);for(const s of n)if("*"===s)e.push({type:"wildcard"});else if(s.startsWith(":")){const t=s.endsWith("?"),n=t?s.slice(1,-1):s.slice(1);e.push({type:"param",name:n,optional:t})}else e.push({type:"static",value:s});return e}(e),i={};let a=0;for(const o of r)if("static"===o.type){if(s[a]!==o.value)return null;a++}else if("param"===o.type){if(a<s.length){try{i[o.name]=decodeURIComponent(s[a])}catch{i[o.name]=s[a]}a++}else if(!o.optional)return null}else if("wildcard"===o.type){i["*"]=s.slice(a).join("/"),a=s.length;break}return n&&a<s.length?null:{params:i}}function g(t,e){return e.startsWith("/")?e:t.endsWith("/")?t+e:`${t}/${e}`}function k(t,e,n=""){for(const s of e){const e=s.path.startsWith("/")?s.path:g(n,s.path);if(s.children&&s.children.length>0){const n=v(t,e,!1);if(n){const r=[{route:s,params:n.params}],i=k(t,s.children,e);if(i)r.push(...i);else{const t=s.children.find(t=>""===t.path);t&&r.push({route:t,params:{}})}return r}}const r=v(t,e,!0);if(r)return[{route:s,params:r.params}]}return null}function E({mode:t,initialPath:e,children:l}){const c=s("memory"===t?new d(e):new f),[u,p]=r(c.current.location),[m,w]=r(c.current.state);n(()=>(p(c.current.location),w(c.current.state),c.current.listen(t=>{p(t),w(c.current.state)})),[]);const y=o((t,e)=>{const n=c.current;e&&e.replace?n.replace(t,e.state):n.push(t,e?.state)},[]),v=o(t=>{c.current.go(t)},[]),g=i(()=>({location:u,state:m,navigate:y,go:v,mode:t}),[u,m,y,v,t]);/* @__PURE__ */
|
|
2
2
|
return a(h.Provider,{value:g,children:l})}function _(t){return null}function x(t){return e(t).filter(t=>t?.type===_).map(t=>({path:t.props.path,element:t.props.element,children:t.props.children?x(t.props.children):void 0}))}function C({children:t}){const{location:n}=c(h),r=s([]),o=e(t).filter(t=>t?.type===_).map(t=>t.props.path).join("\0"),u=s("");o!==u.current&&(u.current=o,r.current=x(t));const d=r.current,f=i(()=>k(n,d),[n,d]),m=i(()=>(f??[]).reduce((t,e)=>({...t,...e.params}),{}),[f]),w=i(()=>{if(!f)return null;let t=null;for(let e=f.length-1;e>=0;e--){const n=f[e].route.element;t=/* @__PURE__ */a(p.Provider,{value:{params:m,outlet:t},children:/* @__PURE__ */a(n,{})})}return t},[f,m]);return f?/* @__PURE__ */a(l,{children:w}):null}function N(){/* @__PURE__ */
|
|
3
3
|
return a(l,{children:c(p)?.outlet})}function W({to:t,state:e,replace:n,children:s,className:r,onClick:i,...l}){const u=c(h);/* @__PURE__ */
|
|
4
4
|
return a("a",{href:t,onClick:o(s=>{s.preventDefault(),i?.(s),u?.navigate(t,{state:e,replace:n})},[u,t,e,n,i]),className:r,...l,children:s})}function b({to:t,state:e,replace:n,children:s,className:r,activeClassName:l,onClick:p,...d}){const f=c(h),m=i(()=>{if(!f)return!1;const e=f.location;return e===t||!("/"===t||!e.startsWith(`${t}/`))},[f?.location,t]);/* @__PURE__ */
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{d as e,s as r,t,v as o}from"./DrrpB4Om.js";import{
|
|
1
|
+
import{d as e,s as r,t,v as o}from"./DrrpB4Om.js";import{n as s}from"./CKQOToSD.js";import{x as l}from"./BLeZg2Bz.js";import{l as i}from"./DdYePHxG.js";import"./B9ImRAum.js";var n=e(()=>import("./C6MqLLDX.js")),a=e(()=>import("./BmsDSHUi.js")),c=e(()=>import("./CgxypkdG.js")),p=e(()=>import("./CfTdZB8y.js")),d=()=>/* @__PURE__ */t("div",{class:"flex h-full items-center justify-center",children:/* @__PURE__ */t("div",{class:"text-center",children:[
|
|
2
2
|
/* @__PURE__ */t("svg",{xmlns:"http://www.w3.org/2000/svg",class:"text-muted-foreground mx-auto mb-3 size-10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5",children:[/* @__PURE__ */t("path",{d:"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7z"}),/* @__PURE__ */t("circle",{cx:"12",cy:"9",r:"2.5"})]}),
|
|
3
3
|
/* @__PURE__ */t("p",{class:"text-foreground",children:"No location data available."}),
|
|
4
|
-
/* @__PURE__ */t("p",{class:"text-muted-foreground mt-1 text-xs",children:"Events need location data to appear on the map."})]})}),m=()=>/* @__PURE__ */t("div",{class:"flex h-full items-center justify-center",children:/* @__PURE__ */t("div",{class:"border-primary size-8 animate-spin rounded-full border-4 border-t-transparent"})}),g=({events:e,isLoading:g=!1})=>{const{organization:x}=s(),f=i(),h=x?.integrationSettings??{},u=h.mapProvider??"openstreetmap",v=o(e=>{f(l.GALLERY(e))},[f]);if("openstreetmap_free"===u)/* @__PURE__ */return t("div",{class:"relative mt-3 h-screen sm:mt-6",children:/* @__PURE__ */t(r,{fallback:/* @__PURE__ */t(m,{}),children:/* @__PURE__ */t(n,{onExplore:v,logoUrl:x?.logoUrl})})});const y=h.mapTilerApiKey??"",b=h.googleMapsApiKey??"",
|
|
5
|
-
return t("div",{class:"relative mt-3 h-screen sm:mt-6",children:g?/* @__PURE__ */t(m,{}):"openstreetmap"===u&&!y||"google"===u&&!b||"mapbox"===u&&!
|
|
4
|
+
/* @__PURE__ */t("p",{class:"text-muted-foreground mt-1 text-xs",children:"Events need location data to appear on the map."})]})}),m=()=>/* @__PURE__ */t("div",{class:"flex h-full items-center justify-center",children:/* @__PURE__ */t("div",{class:"border-primary size-8 animate-spin rounded-full border-4 border-t-transparent"})}),g=({events:e,isLoading:g=!1})=>{const{organization:x}=s(),f=i(),h=x?.integrationSettings??{},u=h.mapProvider??"openstreetmap",v=o(e=>{f(l.GALLERY(e))},[f]);if("openstreetmap_free"===u)/* @__PURE__ */return t("div",{class:"relative mt-3 h-screen sm:mt-6",children:/* @__PURE__ */t(r,{fallback:/* @__PURE__ */t(m,{}),children:/* @__PURE__ */t(n,{onExplore:v,logoUrl:x?.logoUrl})})});const y=h.mapTilerApiKey??"",b=h.googleMapsApiKey??"",j=h.mapboxApiKey??"",w=e.filter(e=>"number"==typeof e.location?.x&&"number"==typeof e.location?.y);/* @__PURE__ */
|
|
5
|
+
return t("div",{class:"relative mt-3 h-screen sm:mt-6",children:g?/* @__PURE__ */t(m,{}):"openstreetmap"===u&&!y||"google"===u&&!b||"mapbox"===u&&!j?/* @__PURE__ */t("div",{class:"flex h-full items-center justify-center",children:/* @__PURE__ */t("div",{class:"text-center",children:[
|
|
6
6
|
/* @__PURE__ */t("svg",{xmlns:"http://www.w3.org/2000/svg",class:"text-muted-foreground mx-auto mb-3 size-10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5",children:[/* @__PURE__ */t("path",{d:"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7z"}),/* @__PURE__ */t("circle",{cx:"12",cy:"9",r:"2.5"})]}),
|
|
7
7
|
/* @__PURE__ */t("p",{class:"text-foreground",children:"API key is required to display the map."}),
|
|
8
|
-
/* @__PURE__ */t("p",{class:"text-muted-foreground mt-1 text-xs",children:"Provide a map API key in your organization settings."})]})}):0===
|
|
8
|
+
/* @__PURE__ */t("p",{class:"text-muted-foreground mt-1 text-xs",children:"Provide a map API key in your organization settings."})]})}):0===w.length?/* @__PURE__ */t(d,{}):/* @__PURE__ */t(r,{fallback:/* @__PURE__ */t(m,{}),children:["openstreetmap"===u&&/* @__PURE__ */t(a,{is3D:!1,apiKey:y,onExplore:v,logoUrl:x?.logoUrl}),"mapbox"===u&&/* @__PURE__ */t(p,{onExplore:v,apiKey:j,is3D:!1,logoUrl:x?.logoUrl}),"google"===u&&/* @__PURE__ */t(c,{apiKey:b,onExplore:v,logoUrl:x?.logoUrl})]})})};export{g as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t}from"./DrrpB4Om.js";import{i as e,o as r}from"./
|
|
1
|
+
import{t}from"./DrrpB4Om.js";import{i as e,o as r}from"./CKQOToSD.js";var l=t=>"boolean"==typeof t?`${t}`:0===t?"0":t,o=r,a=(t,e)=>r=>{var a;if(null==(null==e?void 0:e.variants))return o(t,null==r?void 0:r.class,null==r?void 0:r.className);const{variants:n,defaultVariants:i}=e,s=Object.keys(n).map(t=>{const e=null==r?void 0:r[t],o=null==i?void 0:i[t];if(null===e)return null;const a=l(e)||l(o);return n[t][a]}),d=r&&Object.entries(r).reduce((t,e)=>{let[r,l]=e;return void 0===l||(t[r]=l),t},{});return o(t,s,null==e||null===(a=e.compoundVariants)||void 0===a?void 0:a.reduce((t,e)=>{let{class:r,className:l,...o}=e;return Object.entries(o).every(t=>{let[e,r]=t;return Array.isArray(r)?r.includes({...i,...d}[e]):{...i,...d}[e]===r})?[...t,r,l]:t},[]),null==r?void 0:r.class,null==r?void 0:r.className)},n={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",p:"p",blockquote:"blockquote",body1:"p",body2:"p",body3:"p",caption:"span",overline:"span",lead:"p"},i=a("antialiased",{variants:{variant:{h1:"scroll-m-20 text-4xl font-bold tracking-tight lg:text-5xl",h2:"scroll-m-20 text-3xl font-bold tracking-tight lg:text-4xl",h3:"scroll-m-20 text-2xl font-semibold tracking-tight",h4:"scroll-m-20 text-xl font-semibold",h5:"scroll-m-20 text-lg font-semibold",h6:"scroll-m-20 text-base font-semibold",body1:"text-base leading-relaxed font-medium",body2:"text-sm leading-relaxed",body3:"text-sm leading-relaxed sm:text-base",p:"text-base leading-7",lead:"text-muted-foreground text-xl leading-relaxed",blockquote:"border-primary/30 text-muted-foreground border-l-4 pl-4 text-base italic",caption:"text-muted-foreground text-xs",overline:"text-muted-foreground text-xs font-medium tracking-widest uppercase"},color:{foreground:"text-foreground",muted:"text-muted-foreground",primary:"text-primary",info:"text-info",warning:"text-warning",success:"text-success",error:"text-destructive",inherit:"text-inherit",secondary:"text-muted-foreground",white:"text-white",black:"text-black",a11y:"text-primary-foreground",light:"text-text-primary-light"},align:{left:"text-left",right:"text-right",center:"text-center",justify:"text-justify"},weight:{normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold"}},defaultVariants:{variant:"body1",color:"foreground",align:"left"}}),s=({variant:r="body1",color:l,align:o,weight:a,transform:s,lines:d,shadow:u,noWrap:x,className:c,immutable:m,...g})=>/* @__PURE__ */t(n[r],{className:e(i({variant:r,color:l,align:o,weight:a}),s,d&&d>0?`line-clamp-${d}`:void 0,u&&"drop-shadow-[0_1px_2px_rgba(0,0,0,0.5)]",x&&"truncate",c),...g,children:g.children});export{i as n,a as r,s as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=class extends Error{name="KyError";get isKyError(){return!0}},t=class extends e{name="HTTPError";response;request;options;data;constructor(e,t,o){const r=`${e.status||0===e.status?e.status:""} ${e.statusText??""}`.trim();super(`Request failed with ${r?`status code ${r}`:"an unknown error"}: ${t.method} ${t.url}`),this.response=e,this.request=t,this.options=o}},o=class extends e{name="NetworkError";request;constructor(e,t){super(`Request failed due to a network error: ${e.method} ${e.url}`,t),this.request=e}},r=class extends Error{name="NonError";value;constructor(e){let t="Non-error value was thrown";try{"string"==typeof e?t=e:e&&"object"==typeof e&&"message"in e&&"string"==typeof e.message&&(t=e.message)}catch{}super(t),this.value=e}},s=class extends e{name="ForceRetryError";customDelay;code;customRequest;constructor(e){const t=e?.cause?e.cause instanceof Error?e.cause:new r(e.cause):void 0;super(e?.code?`Forced retry: ${e.code}`:"Forced retry",t?{cause:t}:void 0),this.customDelay=e?.delay,this.code=e?.code,this.customRequest=e?.request}},n=class extends Error{name="SchemaValidationError";issues;constructor(e){super("Response schema validation failed"),this.issues=e}},i=class extends e{name="TimeoutError";request;constructor(e){super(`Request timed out: ${e.method} ${e.url}`),this.request=e}},a=(()=>{let e=!1,t=!1;const o="function"==typeof globalThis.ReadableStream,r="function"==typeof globalThis.Request;if(o&&r)try{t=new globalThis.Request("https://empty.invalid",{body:new globalThis.ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type")}catch(s){if(s instanceof Error&&"unsupported BodyInit type"===s.message)return!1;throw s}return e&&!t})(),h="function"==typeof globalThis.AbortController,c="function"==typeof globalThis.AbortSignal&&"function"==typeof globalThis.AbortSignal.any,u="function"==typeof globalThis.ReadableStream,l="function"==typeof globalThis.FormData,p=["get","post","put","patch","head","delete"],f={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*",bytes:"*/*"},d=Symbol("stop"),y=class{options;constructor(e){this.options=e}},m=e=>new y(e),g={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,baseUrl:!0,prefix:!0,retry:!0,timeout:!0,totalTimeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,onUploadProgress:!0,fetch:!0,context:!0},b={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,duplex:!0},w=new TextEncoder,R=(e,t,o)=>{let r,s=0;return e.pipeThrough(new TransformStream({transform(e,n){if(n.enqueue(e),r){s+=r.byteLength;let e=0===t?0:s/t;e>=1&&(e=1-Number.EPSILON),o?.({percent:e,totalBytes:Math.max(t,s),transferredBytes:s},r)}r=e},flush(){r&&(s+=r.byteLength,o?.({percent:1,totalBytes:Math.max(t,s),transferredBytes:s},r))}}))},T=e=>null!==e&&"object"==typeof e,q=Symbol("replaceOption"),v=e=>T(e)&&!0===e[q]?{isReplace:!0,value:e.value}:{isReplace:!1,value:e},E=(...e)=>{for(const t of e)if((!T(t)||Array.isArray(t))&&void 0!==t)throw new TypeError("The `options` argument must be an object");return L({},...e)},P=(e={},t={})=>{const o=new globalThis.Headers(e),r=t instanceof globalThis.Headers,s=new globalThis.Headers(t);for(const[n,i]of s.entries())r&&"undefined"===i||void 0===i?o.delete(n):o.set(n,i);return o},S=e=>{if(!T(e)||Array.isArray(e))return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||null===t},x=e=>{if(e instanceof URLSearchParams){const t=new URLSearchParams(e),o=e[C];return o&&(t[C]=new Set(o)),t}return e instanceof globalThis.Headers?new globalThis.Headers(e):Array.isArray(e)?[...e]:S(e)?{...e}:e},A=(e,t)=>{return S(e)&&S(t)?(o={...e,...t},Object.fromEntries(Object.entries(o).filter(e=>void 0!==e[1]))):P(e,t);var o};function j(e,t,o){return Object.hasOwn(t,o)&&void 0===t[o]?[]:L(e[o]??[],t[o]??[])}var k=(e={},t={})=>({init:j(e,t,"init"),beforeRequest:j(e,t,"beforeRequest"),beforeRetry:j(e,t,"beforeRetry"),beforeError:j(e,t,"beforeError"),afterResponse:j(e,t,"afterResponse")}),C=Symbol("deletedParameters"),O=(e,t)=>{const o=new URLSearchParams,r=/* @__PURE__ */new Set;for(const s of[e,t])if(void 0!==s)if(s instanceof URLSearchParams){for(const[t,n]of s.entries())o.append(t,n),r.delete(t);const e=s[C];if(e)for(const t of e)o.delete(t),r.add(t)}else if(Array.isArray(s))for(const e of s){if(!Array.isArray(e)||2!==e.length)throw new TypeError("Array search parameters must be provided in [[key, value], ...] format");o.append(String(e[0]),String(e[1])),r.delete(String(e[0]))}else if(T(s))for(const[e,t]of Object.entries(s))void 0===t?(o.delete(e),r.add(e)):(o.append(e,String(t)),r.delete(e));else{const e=new URLSearchParams(s);for(const[t,s]of e.entries())o.append(t,s),r.delete(t)}return r.size>0&&(o[C]=r),o},L=(...e)=>{let t,o={},r={},s={};const n=[];for(const i of e)if(Array.isArray(i))Array.isArray(o)||(o=[]),o=[...o,...i];else if(T(i)){for(let[e,r]of Object.entries(i)){if("signal"===e&&r instanceof globalThis.AbortSignal){n.push(r);continue}const s=v(r),{isReplace:i}=s;if(r=s.value,"context"!==e)"searchParams"!==e?(T(r)&&!i&&e in o&&(r=L(o[e],r)),o={...o,[e]:r}):t=null==r?void 0:i||void 0===t?r:O(t,r);else{if(null!=r&&(!T(r)||Array.isArray(r)))throw new TypeError("The `context` option must be an object");o={...o,context:null==r?{}:i?{...r}:{...o.context,...r}}}}if(T(i.hooks)){const{value:e,isReplace:t}=v(i.hooks);s=k(t?{}:s,e),o.hooks=s}if(T(i.headers)){const{value:e,isReplace:t}=v(i.headers);r=t?x(e):A(r,e),o.headers=r}}return void 0!==t&&(o.searchParams=t),n.length>0&&(1===n.length?o.signal=n[0]:o.signal=c?AbortSignal.any(n):n.at(-1)),o},N=e=>p.includes(e)?e.toUpperCase():e,D={limit:2,methods:["get","put","head","delete","options","trace"],statusCodes:[408,413,429,500,502,503,504],afterStatusCodes:[413,429,503],maxRetryAfter:Number.POSITIVE_INFINITY,backoffLimit:Number.POSITIVE_INFINITY,delay:e=>.3*2**(e-1)*1e3,jitter:void 0,retryOnTimeout:!1},B=(e={})=>{if("number"==typeof e)return{...D,limit:e};if(e.methods&&!Array.isArray(e.methods))throw new Error("retry.methods must be an array");if(e.statusCodes&&!Array.isArray(e.statusCodes))throw new Error("retry.statusCodes must be an array");const t=Object.fromEntries(Object.entries({...e,methods:e.methods?.map(e=>e.toLowerCase())}).filter(([,e])=>void 0!==e));return{...D,...t}};async function U(e,{signal:t}){return new Promise((o,r)=>{function s(){clearTimeout(n),r(t.reason)}t&&(t.throwIfAborted(),t.addEventListener("abort",s,{once:!0}));const n=setTimeout(()=>{t?.removeEventListener("abort",s),o()},e)})}var H=Object.prototype.toString,F=/* @__PURE__ */new Set(["network error","NetworkError when attempting to fetch resource.","The Internet connection appears to be offline.","Network request failed","fetch failed","terminated"," A network error occurred.","Network connection lost"]);var J=(e,t)=>e instanceof t||e?.name===t.name,z=Symbol("timedOutResponseData"),I="The `schema` argument must follow the Standard Schema specification",$=Object.prototype.toString,M=e=>e instanceof globalThis.Request||"[object Request]"===$.call(e),W=e=>e instanceof globalThis.Response||"[object Response]"===$.call(e),_=async(e,t)=>{if("object"!=typeof t&&"function"!=typeof t||null===t)throw new TypeError(I);const o=t["~standard"];if("object"!=typeof o||null===o||"function"!=typeof o.validate)throw new TypeError(I);const r=await o.validate(e);if(r.issues)throw new n(r.issues);return r.value},V=class e{static create(o,r){const n=r.hooks?.init??[],i=n.length>0?function(e){const t={...e,json:x(e.json),context:x(e.context),headers:x(e.headers),searchParams:(o=e.searchParams,Array.isArray(o)?o.map(e=>[...e]):x(o))};var o;return void 0!==e.retry&&(t.retry=(e=>"object"!=typeof e?e:{...e,...e.methods&&{methods:[...e.methods]},...e.statusCodes&&{statusCodes:[...e.statusCodes]},...e.afterStatusCodes&&{afterStatusCodes:[...e.afterStatusCodes]}})(e.retry)),t}(r):r;for(const e of n)e(i);const a=new e(o,i),h=(async()=>{try{return await(async()=>{if("number"==typeof a.#e.timeout&&a.#e.timeout>2147483647)throw new RangeError("The `timeout` option cannot be greater than 2147483647");if("number"==typeof a.#e.totalTimeout&&a.#e.totalTimeout>2147483647)throw new RangeError("The `totalTimeout` option cannot be greater than 2147483647");await Promise.resolve();const e=await a.#t();let o=e??await a.#o(async()=>a.#r()),r=void 0!==e||a.#s();for(;;){if(void 0===o)return o;if(W(o))try{o=await a.#n(o)}catch(n){if(!(n instanceof s))throw n;const e=await a.#i(n,async()=>a.#r());if(void 0===e)return e;o=e,r=a.#s();continue}const e=o;if(!e.ok&&"opaque"!==e.type&&("function"==typeof a.#e.throwHttpErrors?a.#e.throwHttpErrors(e.status):a.#e.throwHttpErrors)){const s=new t(e,a.#a(e),a.#h()),n=s;if(s.data=await a.#c(e),r)throw n;const i=await a.#i(s,async()=>a.#r());if(void 0===i)return i;o=i,r=a.#s();continue}break}if(!W(o))return o;if(a.#u(o),a.#e.onDownloadProgress){if("function"!=typeof a.#e.onDownloadProgress)throw new TypeError("The `onDownloadProgress` option must be a function");if(!u)throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");const e=o.clone();return a.#l(o),((e,t)=>{if(!e.body)return e;const o={status:e.status,statusText:e.statusText,headers:e.headers};if(204===e.status)return new Response(null,o);const r=Math.max(0,Number(e.headers.get("content-length"))||0);return new Response(R(e.body,r,t),o)})(e,a.#e.onDownloadProgress)}return o})()}catch(e){if(!(e instanceof Error))throw e;if(a.#p.has(e))throw e;let t=e;for(const o of a.#e.hooks.beforeError){const e=await o({request:a.request,options:a.#h(),error:t,retryCount:a.#f});e instanceof Error&&(t=e)}throw t}finally{const e=a.#d;a.#y(e?.body??void 0),a.request!==e&&a.#y(a.request.body??void 0)}})();for(const[e,t]of Object.entries(f))"bytes"===e&&"function"!=typeof globalThis.Response?.prototype?.bytes||(h[e]=async o=>{a.request.headers.set("accept",a.request.headers.get("accept")||t);const r=await h;if("json"!==e)return r[e]();const s=await r.text();if(""===s)return void 0!==o?_(void 0,o):JSON.parse(s);const n=i.parseJson?await i.parseJson(s,{request:a.#a(r),response:r}):JSON.parse(s);return void 0===o?n:_(n,o)});return h}static#m(e){return!e||"object"!=typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.fromEntries(Object.entries(e).filter(([,e])=>void 0!==e))}request;#g;#f=0;#b;#e;#d;#w;#p=/* @__PURE__ */new WeakSet;#R;#T;#q=!1;#v=/* @__PURE__ */new WeakMap;constructor(t,o={}){if(this.#b=t,Object.hasOwn(o,"prefixUrl"))throw new Error("The `prefixUrl` option has been renamed `prefix` in v2 and enhanced to allow slashes in input. See also the new `baseUrl` option for improved flexibility with standard URL resolution: https://github.com/sindresorhus/ky#baseurl");if(this.#e={...o,headers:P(this.#b.headers,o.headers),hooks:k({},o.hooks),method:N(o.method??this.#b.method??"GET"),prefix:String(o.prefix||""),retry:B(o.retry),throwHttpErrors:o.throwHttpErrors??!0,timeout:o.timeout??1e4,totalTimeout:o.totalTimeout??!1,fetch:o.fetch??globalThis.fetch.bind(globalThis),context:o.context??{}},"string"!=typeof this.#b&&!(this.#b instanceof URL||this.#b instanceof globalThis.Request))throw new TypeError("`input` must be a string, URL, or Request");if("string"==typeof this.#b){if(this.#e.prefix){const e=this.#e.prefix.replace(/\/+$/,""),t=this.#b.replace(/^\/+/,"");this.#b=`${e}/${t}`}if(this.#e.baseUrl){let e;try{e=new URL(this.#b)}catch{}e||(this.#b=new URL(this.#b,new Request(this.#e.baseUrl).url))}}h&&c&&(this.#w=this.#e.signal??this.#b.signal,this.#g=new globalThis.AbortController,this.#e.signal=this.#E()),a&&(this.#e.duplex="half"),void 0!==this.#e.json&&(this.#e.body=this.#e.stringifyJson?.(this.#e.json)??JSON.stringify(this.#e.json),this.#e.headers.set("content-type",this.#e.headers.get("content-type")??"application/json"));const r=o.headers&&new globalThis.Headers(o.headers).has("content-type");if(this.#b instanceof globalThis.Request&&(l&&this.#e.body instanceof globalThis.FormData||this.#e.body instanceof URLSearchParams)&&!r&&this.#e.headers.delete("content-type"),this.request=new globalThis.Request(this.#b,this.#e),void 0!==(s=this.#e.searchParams)&&(Array.isArray(s)?s.length>0:s instanceof URLSearchParams?s.size>0||Boolean(s[C]?.size):"object"==typeof s?Object.keys(s).length>0:"string"==typeof s?s.trim().length>0:Boolean(s))){const t=new URL(this.request.url),o=this.#e.searchParams?.[C];if(o)for(const e of o)t.searchParams.delete(e);if("string"==typeof this.#e.searchParams){const e=this.#e.searchParams.replace(/^\?/,"");""!==e&&(t.search=t.search?`${t.search}&${e}`:`?${e}`)}else{const o=new URLSearchParams(e.#m(this.#e.searchParams));for(const[e,r]of o.entries())t.searchParams.append(e,r)}if(this.#e.searchParams&&"object"==typeof this.#e.searchParams&&!Array.isArray(this.#e.searchParams)&&!(this.#e.searchParams instanceof URLSearchParams))for(const[e,r]of Object.entries(this.#e.searchParams))void 0===r&&t.searchParams.delete(e);this.request=new globalThis.Request(t,this.#e)}var s;if(this.#e.onUploadProgress&&"function"!=typeof this.#e.onUploadProgress)throw new TypeError("The `onUploadProgress` option must be a function");this.#T="number"==typeof this.#e.totalTimeout?this.#P():void 0}#S(){const e=this.#e.retry.delay(this.#f+1);let t=e;return!0===this.#e.retry.jitter?t=Math.random()*e:"function"==typeof this.#e.retry.jitter&&(t=this.#e.retry.jitter(e),(!Number.isFinite(t)||t<0)&&(t=e)),Math.min(this.#e.retry.backoffLimit,t)}async#x(e){if(this.#f>=this.#e.retry.limit)throw e;const n=e instanceof Error?e:new r(e);if(n instanceof s)return n.customDelay??this.#S();if(!this.#e.retry.methods.includes(this.request.method.toLowerCase()))throw e;if(void 0!==this.#e.retry.shouldRetry){const t=await this.#e.retry.shouldRetry({error:n,retryCount:this.#f+1});if(!1===t)throw e;if(!0===t)return this.#S()}if(function(e){return J(e,i)}(e)){if(!this.#e.retry.retryOnTimeout)throw e;return this.#S()}if(function(e){return J(e,t)}(e)){if(!this.#e.retry.statusCodes.includes(e.response.status))throw e;const t=e.response.headers.get("Retry-After")??e.response.headers.get("RateLimit-Reset")??e.response.headers.get("X-RateLimit-Retry-After")??e.response.headers.get("X-RateLimit-Reset")??e.response.headers.get("X-Rate-Limit-Reset");if(t&&this.#e.retry.afterStatusCodes.includes(e.response.status)){let e=1e3*Number(t);return Number.isNaN(e)?e=Date.parse(t)-Date.now():e>=Date.parse("2024-01-01")&&(e-=Date.now()),Number.isFinite(e)?(e=Math.max(0,e),Math.min(this.#e.retry.maxRetryAfter,e)):Math.min(this.#e.retry.maxRetryAfter,this.#S())}if(413===e.response.status)throw e;return this.#S()}if(!function(e){return J(e,o)}(e))throw e;return this.#S()}#u(e){const t=this.#a(e);return this.#e.parseJson&&(e.json=async()=>{const o=await e.text();return""===o?JSON.parse(o):this.#e.parseJson(o,{request:t,response:e})}),e}async#c(e){const t=await this.#A(e,this.#j());if(t===z)return void this.#k();if(!t)return;if(!this.#C(e.headers.get("content-type")??""))return t;const o=await this.#O(t,e,this.#j(),this.#a(e));if(o!==z)return o;this.#k()}#j(){const e=!1===this.#e.timeout?1e4:this.#e.timeout,t=this.#L();if(void 0===t)return e;if(t<=0)throw new i(this.request);return Math.min(e,t)}#C(e){const t=(e.split(";",1)[0]??"").trim().toLowerCase();return/\/(?:.*[.+-])?json$/.test(t)}async#A(e,t){const{body:o}=e;if(!o)try{return await e.text()}catch{return}let r;try{r=o.getReader()}catch{return}const s=(e=>{const t=/;\s*charset\s*=\s*(?:"([^"]+)"|([^;,\s]+))/i.exec(e),o=t?.[1]??t?.[2];if(o)try{return new TextDecoder(o)}catch{}return new TextDecoder})(e.headers.get("content-type")??""),n=[];let i=0;const a=(async()=>{try{for(;;){const{done:e,value:t}=await r.read();if(e)break;if(i+=t.byteLength,i>10485760)return void r.cancel().catch(()=>{});n.push(s.decode(t,{stream:!0}))}}catch{return}return n.push(s.decode()),n.join("")})(),h=new Promise(e=>{const o=setTimeout(()=>{e(z)},t);a.finally(()=>{clearTimeout(o)})}),c=await Promise.race([a,h]);return c===z&&r.cancel().catch(()=>{}),c}async#O(e,t,o,r){let s;try{return await Promise.race([Promise.resolve().then(()=>this.#e.parseJson?this.#e.parseJson(e,{request:r,response:t}):JSON.parse(e)),new Promise(e=>{s=setTimeout(()=>{e(z)},o)})])}catch{return}finally{clearTimeout(s)}}#y(e){e&&e.cancel().catch(()=>{})}#l(e){this.#y(e.body??void 0)}#E(){return this.#w?AbortSignal.any([this.#w,this.#g.signal]):this.#g.signal}#k(){const e=this.#L();if(void 0!==e&&e<=0)throw new i(this.request)}async#t(){for(const e of this.#e.hooks.beforeRequest){const t=await e({request:this.request,options:this.#h(),retryCount:0});if(M(t))this.#N(t);else if(W(t))return t}}async#n(e){const t=this.#a(e);for(const r of this.#e.hooks.afterResponse){const n=this.#D(e.clone(),t);let i;this.#u(n);try{i=await r({request:this.request,options:this.#h(),response:n,retryCount:this.#f})}catch(o){throw n!==e&&this.#l(n),this.#l(e),o}if(i instanceof y)throw n!==e&&this.#l(n),this.#l(e),new s(i.options);const a=W(i)?this.#D(i,t):e;n!==e&&n!==a&&n.body!==a.body&&this.#l(n),e!==a&&e.body!==a.body&&this.#l(e),e=a}return e}async#o(e){try{return await e()}catch(t){return this.#i(t,e)}}async#i(e,t){this.#q=!1;const o=Math.min(await this.#x(e),2147483647),r={signal:this.#w},n=this.#L();if(void 0!==n){if(n<=0)throw new i(this.request);if(o>=n)throw await U(n,r),new i(this.request)}if(await U(o,r),this.#k(),e instanceof s&&e.customRequest){const t=new globalThis.Request(e.customRequest,this.#e.signal?{signal:this.#e.signal}:void 0);this.#N(t)}for(const s of this.#e.hooks.beforeRetry){let t;try{t=await s({request:this.request,options:this.#h(),error:e,retryCount:this.#f+1})}catch(a){throw a instanceof Error&&a!==e&&this.#p.add(a),a}if(M(t)){this.#N(t);break}if(W(t))return this.#q=!0,this.#f++,t;if(t===d)return}return this.#k(),this.#f++,this.#o(t)}#s(){const e=this.#q;return this.#q=!1,e}async#r(){this.#g?.signal.aborted&&(this.#g=new globalThis.AbortController,this.#e.signal=this.#E(),this.request=new globalThis.Request(this.request,{signal:this.#e.signal}));const e=(e=>{const t={};for(const o in e)Object.hasOwn(e,o)&&(o in b||o in g||(t[o]=e[o]));return t})(this.#e),t=this.#e.retry.limit>0?this.request.clone():void 0,r=this.#B(this.request,this.#e.body??void 0);this.#d=r,t&&(this.request=t);try{const t=this.#L();if(void 0!==t&&t<=0)throw new i(this.request);const o=!1===this.#e.timeout?t:void 0===t?this.#e.timeout:Math.min(this.#e.timeout,t),s=void 0===o?await this.#e.fetch(r,e):await async function(e,t,o,r){return new Promise((s,n)=>{const a=setTimeout(()=>{o&&o.abort(),n(new i(e))},r.timeout);r.fetch(e,t).then(s).catch(n).then(()=>{clearTimeout(a)})})}(r,e,this.#g,{timeout:o,fetch:this.#e.fetch});return this.#D(s,r)}catch(s){if(function(e){if(!e||(t=e,"[object Error]"!==H.call(t))||"TypeError"!==e.name||"string"!=typeof e.message)return!1;var t;const{message:o,stack:r}=e;return"Load failed"===o?void 0===r||"__sentry_captured__"in e:!!o.startsWith("error sending request for url")||!!("Failed to fetch"===o||o.startsWith("Failed to fetch (")&&o.endsWith(")"))||F.has(o)}(s))throw new o(this.request,{cause:s});throw s}}#L(){if(void 0===this.#T)return;const e=this.#P()-this.#T;return Math.max(0,this.#e.totalTimeout-e)}#P(){return globalThis.performance?.now()??Date.now()}#h(){if(!this.#R){const{hooks:e,json:t,parseJson:o,stringifyJson:r,searchParams:s,timeout:n,totalTimeout:i,throwHttpErrors:a,fetch:h,...c}=this.#e;this.#R=Object.freeze(c)}return this.#R}#N(e){this.#R=void 0,this.request=e}#a(e){return this.#v.get(e)??this.request}#D(e,t){return this.#v.set(e,t),e}#B(e,t){return this.#e.onUploadProgress&&e.body&&a?((e,t,o)=>{if(!e.body)return e;const r=(e=>{if(!e)return 0;if(e instanceof FormData){let t=0;for(const[o,r]of e)t+=40,t+=w.encode(`Content-Disposition: form-data; name="${o}"`).byteLength,t+="string"==typeof r?w.encode(r).byteLength:r.size;return t}return e instanceof Blob?e.size:e instanceof ArrayBuffer||ArrayBuffer.isView(e)?e.byteLength:"string"==typeof e?w.encode(e).byteLength:e instanceof URLSearchParams?w.encode(e.toString()).byteLength:0})(o??e.body);return new Request(e,{duplex:"half",body:R(e.body,r,t)})})(e,this.#e.onUploadProgress,t??this.#e.body??void 0):e}},X=e=>{const t=(t,o)=>V.create(t,E(e,o));for(const o of p)t[o]=(t,r)=>V.create(t,E(e,r,{method:o}));return t.create=e=>X(E(e)),t.extend=t=>("function"==typeof t&&(t=t(e??{})),X(E(e,t))),t.stop=d,t.retry=m,t},K=X();export{t as n,K as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as t,t as l,w as r}from"./DrrpB4Om.js";import{c as a}from"./BLeZg2Bz.js";import{t as s}from"./DdYePHxG.js";import{t as e}from"./DZGp2V2-.js";import{t as o}from"./Bki5T_lb.js";var p=({url:p,alt:h="",thumbnailUrl:i,blurhash:c,pswpData:n={},curateLink:u,onClick:m})=>{const w=t(()=>(t=>Object.keys(t).reduce((l,r)=>{const a=t[r];return null==a||""===a||(l[`data-pswp-${s=r,s.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}`]=a),l;var s},{}))(n),[n]),f=/* @__PURE__ */l(r,{children:[/* @__PURE__ */l(e,{threshold:.1,src:i||p,blurhash:c,alt:h}),n.type===a.VIDEO&&/* @__PURE__ */l("div",{className:"absolute inset-0 top-0 left-0 flex items-center justify-center opacity-75",children:/* @__PURE__ */l("svg",{xmlns:"http://www.w3.org/2000/svg",className:"w-16 text-white lg:w-24",viewBox:"0 0 24 24",children:/* @__PURE__ */l("path",{fill:"currentColor",d:"M8 17.175V6.825q0-.425.3-.713t.7-.287q.125 0 .263.037t.262.113l8.15 5.175q.225.15.338.375t.112.475t-.112.475t-.338.375l-8.15 5.175q-.125.075-.262.113T9 18.175q-.4 0-.7-.288t-.3-.712"})})})]});if(m)/* @__PURE__ */return l("button",{className:"h-full w-full",onClick:m,children:f});if(u)/* @__PURE__ */return l(s,{to:u,className:"h-full w-full",children:f});const d=p&&o(p,["http:","https:"])?p:void 0;return d?/* @__PURE__ */l("a",{href:d,className:"pswp-item block h-full w-full",...w,...i?{"data-pswp-thumbnail-url":i}:{},...c?{"data-pswp-blurhash":c}:{},target:"_blank",rel:"noreferrer",children:f}):/* @__PURE__ */l("span",{className:"pswp-item block h-full w-full",...w,...i?{"data-pswp-thumbnail-url":i}:{},...c?{"data-pswp-blurhash":c}:{},children:f})};export{p as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{T as r,t as e}from"./DrrpB4Om.js";import{i as t}from"./
|
|
1
|
+
import{T as r,t as e}from"./DrrpB4Om.js";import{i as t}from"./CKQOToSD.js";import{r as a}from"./DmIYOIw1.js";function i({className:r}){/* @__PURE__ */
|
|
2
2
|
return e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:r,"aria-hidden":"true",focusable:"false",children:[
|
|
3
3
|
/* @__PURE__ */e("circle",{cx:"18",cy:"12",r:"0",fill:"currentColor",children:/* @__PURE__ */e("animate",{attributeName:"r",begin:".67",calcMode:"spline",dur:"1.5s",keySplines:"0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8",repeatCount:"indefinite",values:"0;2;0;0"})}),
|
|
4
4
|
/* @__PURE__ */e("circle",{cx:"12",cy:"12",r:"0",fill:"currentColor",children:/* @__PURE__ */e("animate",{attributeName:"r",begin:".33",calcMode:"spline",dur:"1.5s",keySplines:"0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8",repeatCount:"indefinite",values:"0;2;0;0"})}),
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function t(t,e,i){const s=document.createElement(e);return t&&(s.className=t),i&&i.appendChild(s),s}function e(t,e){return t.x=e.x,t.y=e.y,void 0!==e.id&&(t.id=e.id),t}function i(t){t.x=Math.round(t.x),t.y=Math.round(t.y)}function s(t,e){const i=Math.abs(t.x-e.x),s=Math.abs(t.y-e.y);return Math.sqrt(i*i+s*s)}function n(t,e){return t.x===e.x&&t.y===e.y}function a(t,e,i){return Math.min(Math.max(t,e),i)}function h(t,e,i){let s=`translate3d(${t}px,${e||0}px,0)`;return void 0!==i&&(s+=` scale3d(${i},${i},1)`),s}function r(t,e,i,s){t.style.transform=h(e,i,s)}function o(t,e,i,s){t.style.transition=e?`${e} ${i}ms ${s||"cubic-bezier(.4,0,.22,1)"}`:"none"}function d(t,e,i){t.style.width="number"==typeof e?`${e}px`:e,t.style.height="number"==typeof i?`${i}px`:i}function l(t){o(t)}function c(t){return"decode"in t?t.decode().catch(()=>{}):t.complete?Promise.resolve(t):new Promise((e,i)=>{t.onload=()=>e(t),t.onerror=i})}var p="loading",m="loaded",u="error";function y(t){return"button"in t&&1===t.button||t.ctrlKey||t.metaKey||t.altKey||t.shiftKey}function f(t,e,i=document){let s=[];if(t instanceof Element)s=[t];else if(t instanceof NodeList||Array.isArray(t))s=Array.from(t);else{const n="string"==typeof t?t:e;n&&(s=Array.from(i.querySelectorAll(n)))}return s}function g(t){return"function"==typeof t&&t.prototype&&t.prototype.goTo}function v(){return!(!navigator.vendor||!navigator.vendor.match(/apple/i))}var I=class{constructor(e,i){if(this.element=t("pswp__img pswp__img--placeholder",e?"img":"div",i),e){const t=this.element;t.decoding="async",t.alt="",t.src=e,t.setAttribute("role","presentation")}this.element.setAttribute("aria-hidden","true")}setDisplayedSize(t,e){this.element&&("IMG"===this.element.tagName?(d(this.element,250,"auto"),this.element.style.transformOrigin="0 0",this.element.style.transform=h(0,0,t/250)):d(this.element,t,e))}destroy(){this.element?.parentNode&&this.element.remove(),this.element=null}},w=class{constructor(t,e,i){this.instance=e,this.data=t,this.index=i,this.element=void 0,this.placeholder=void 0,this.slide=void 0,this.displayedImageWidth=0,this.displayedImageHeight=0,this.width=Number(this.data.w)||Number(this.data.width)||0,this.height=Number(this.data.h)||Number(this.data.height)||0,this.isAttached=!1,this.hasSlide=!1,this.isDecoding=!1,this.state="idle",this.data.type?this.type=this.data.type:this.data.src?this.type="image":this.type="html",this.hash=this.data.hash,this.instance.dispatch("contentInit",{content:this})}removePlaceholder(){this.placeholder&&!this.keepPlaceholder()&&setTimeout(()=>{this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0)},1e3)}load(e,i){if(this.slide&&this.usePlaceholder())if(this.placeholder){const t=this.placeholder.element;t&&!t.parentElement&&this.slide.container.prepend(t)}else{const t=this.instance.applyFilters("placeholderSrc",!(!this.data.msrc||!this.slide.isFirstSlide)&&this.data.msrc,this);this.placeholder=new I(t,this.slide.container)}this.element&&!i||this.instance.dispatch("contentLoad",{content:this,isLazy:e}).defaultPrevented||(this.isImageContent()?(this.element=t("pswp__img","img"),this.displayedImageWidth&&this.loadImage(e)):(this.element=t("pswp__content","div"),this.element.innerHTML=this.data.html||""),i&&this.slide&&this.slide.updateContentSize(!0))}loadImage(t){if(!this.isImageContent()||!this.element||this.instance.dispatch("contentLoadImage",{content:this,isLazy:t}).defaultPrevented)return;const e=this.element;this.updateSrcsetSizes(),this.data.srcset&&(e.srcset=this.data.srcset),e.src=this.data.src??"",e.alt=this.data.alt??"",this.state=p,e.complete?this.onLoaded():(e.onload=()=>{this.onLoaded()},e.onerror=()=>{this.onError()})}setSlide(t){this.slide=t,this.hasSlide=!0,this.instance=t.pswp}onLoaded(){this.state=m,this.slide&&this.element&&(this.instance.dispatch("loadComplete",{slide:this.slide,content:this}),this.slide.isActive&&this.slide.heavyAppended&&!this.element.parentNode&&(this.append(),this.slide.updateContentSize(!0)),this.state!==m&&this.state!==u||this.removePlaceholder())}onError(){this.state=u,this.slide&&(this.displayError(),this.instance.dispatch("loadComplete",{slide:this.slide,isError:!0,content:this}),this.instance.dispatch("loadError",{slide:this.slide,content:this}))}isLoading(){return this.instance.applyFilters("isContentLoading",this.state===p,this)}isError(){return this.state===u}isImageContent(){return"image"===this.type||"ad"===this.type}setDisplayedSize(t,e){if(this.element&&(this.placeholder&&this.placeholder.setDisplayedSize(t,e),!this.instance.dispatch("contentResize",{content:this,width:t,height:e}).defaultPrevented&&(d(this.element,t,e),this.isImageContent()&&!this.isError()))){const i=!this.displayedImageWidth&&t;this.displayedImageWidth=t,this.displayedImageHeight=e,i?this.loadImage(!1):this.updateSrcsetSizes(),this.slide&&this.instance.dispatch("imageSizeChange",{slide:this.slide,width:t,height:e,content:this})}}isZoomable(){return this.instance.applyFilters("isContentZoomable",this.isImageContent()&&this.state!==u,this)}updateSrcsetSizes(){if(!this.isImageContent()||!this.element||!this.data.srcset)return;const t=this.element,e=this.instance.applyFilters("srcsetSizesWidth",this.displayedImageWidth,this);(!t.dataset.largestUsedSize||e>parseInt(t.dataset.largestUsedSize,10))&&(t.sizes=`${e}px`,t.dataset.largestUsedSize=String(e))}usePlaceholder(){return this.instance.applyFilters("useContentPlaceholder",this.isImageContent(),this)}lazyLoad(){this.instance.dispatch("contentLazyLoad",{content:this}).defaultPrevented||this.load(!0)}keepPlaceholder(){return this.instance.applyFilters("isKeepingPlaceholder",this.isLoading(),this)}destroy(){this.hasSlide=!1,this.slide=void 0,this.instance.dispatch("contentDestroy",{content:this}).defaultPrevented||(this.remove(),this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0),this.isImageContent()&&this.element&&(this.element.onload=null,this.element.onerror=null,this.element=void 0))}displayError(){if(this.slide){let e=t("pswp__error-msg","div");e.innerText=this.instance.options?.errorMsg??"",e=this.instance.applyFilters("contentErrorElement",e,this),this.element=t("pswp__content pswp__error-msg-container","div"),this.element.appendChild(e),this.slide.container.innerText="",this.slide.container.appendChild(this.element),this.slide.updateContentSize(!0),this.removePlaceholder()}}append(){if(this.isAttached||!this.element)return;if(this.isAttached=!0,this.state===u)return void this.displayError();if(this.instance.dispatch("contentAppend",{content:this}).defaultPrevented)return;const t="decode"in this.element;this.isImageContent()?t&&this.slide&&(!this.slide.isActive||v())?(this.isDecoding=!0,this.element.decode().catch(()=>{}).finally(()=>{this.isDecoding=!1,this.appendImage()})):this.appendImage():this.slide&&!this.element.parentNode&&this.slide.container.appendChild(this.element)}activate(){!this.instance.dispatch("contentActivate",{content:this}).defaultPrevented&&this.slide&&(this.isImageContent()&&this.isDecoding&&!v()?this.appendImage():this.isError()&&this.load(!1,!0),this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","false"))}deactivate(){this.instance.dispatch("contentDeactivate",{content:this}),this.slide&&this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","true")}remove(){this.isAttached=!1,this.instance.dispatch("contentRemove",{content:this}).defaultPrevented||(this.element&&this.element.parentNode&&this.element.remove(),this.placeholder&&this.placeholder.element&&this.placeholder.element.remove())}appendImage(){this.isAttached&&(this.instance.dispatch("contentAppendImage",{content:this}).defaultPrevented||(this.slide&&this.element&&!this.element.parentNode&&this.slide.container.appendChild(this.element),this.state!==m&&this.state!==u||this.removePlaceholder()))}};function _(t,e){if(t.getViewportSizeFn){const i=t.getViewportSizeFn(t,e);if(i)return i}return{x:document.documentElement.clientWidth,y:window.innerHeight}}function x(t,e,i,s,n){let a=0;if(e.paddingFn)a=e.paddingFn(i,s,n)[t];else if(e.padding)a=e.padding[t];else{const i=`padding${t[0].toUpperCase()}${t.slice(1)}`;e[i]&&(a=e[i])}return Number(a)||0}function S(t,e,i,s){return{x:e.x-x("left",t,e,i,s)-x("right",t,e,i,s),y:e.y-x("top",t,e,i,s)-x("bottom",t,e,i,s)}}var C=class{constructor(t,e,i,s){this.pswp=s,this.options=t,this.itemData=e,this.index=i,this.panAreaSize=null,this.elementSize=null,this.fit=1,this.fill=1,this.vFill=1,this.initial=1,this.secondary=1,this.max=1,this.min=1}update(t,e,i){const s={x:t,y:e};this.elementSize=s,this.panAreaSize=i;const n=i.x/s.x,a=i.y/s.y;this.fit=Math.min(1,n<a?n:a),this.fill=Math.min(1,n>a?n:a),this.vFill=Math.min(1,a),this.initial=this._getInitial(),this.secondary=this._getSecondary(),this.max=Math.max(this.initial,this.secondary,this._getMax()),this.min=Math.min(this.fit,this.initial,this.secondary),this.pswp&&this.pswp.dispatch("zoomLevelsUpdate",{zoomLevels:this,slideData:this.itemData})}_parseZoomLevelOption(t){const e=`${t}ZoomLevel`,i=this.options[e];if(i)return"function"==typeof i?i(this):"fill"===i?this.fill:"fit"===i?this.fit:Number(i)}_getSecondary(){let t=this._parseZoomLevelOption("secondary");return t||(t=Math.min(1,3*this.fit),this.elementSize&&t*this.elementSize.x>4e3&&(t=4e3/this.elementSize.x),t)}_getInitial(){return this._parseZoomLevelOption("initial")||this.fit}_getMax(){return this._parseZoomLevelOption("max")||Math.max(1,4*this.fit)}};function z(t,e,i){const s=e.createContentFromData(t,i);let n;const{options:a}=e;if(a){let h;n=new C(a,t,-1),h=e.pswp?e.pswp.viewportSize:_(a,e);const r=S(a,h,t,i);n.update(s.width,s.height,r)}return s.lazyLoad(),n&&s.setDisplayedSize(Math.ceil(s.width*n.initial),Math.ceil(s.height*n.initial)),s}function L(t,e){const i=e.getItemData(t);if(!e.dispatch("lazyLoadSlide",{index:t,itemData:i}).defaultPrevented)return z(i,e,t)}var D=class{constructor(t){this.pswp=t,this.limit=Math.max(t.options.preload[0]+t.options.preload[1]+1,5),this._cachedItems=[]}updateLazy(t){const{pswp:e}=this;if(e.dispatch("lazyLoad").defaultPrevented)return;const{preload:i}=e.options,s=void 0===t||t>=0;let n;for(n=0;n<=i[1];n++)this.loadSlideByIndex(e.currIndex+(s?n:-n));for(n=1;n<=i[0];n++)this.loadSlideByIndex(e.currIndex+(s?-n:n))}loadSlideByIndex(t){const e=this.pswp.getLoopedIndex(t);let i=this.getContentByIndex(e);i||(i=L(e,this.pswp),i&&this.addToCache(i))}getContentBySlide(t){let e=this.getContentByIndex(t.index);return e||(e=this.pswp.createContentFromData(t.data,t.index),this.addToCache(e)),e.setSlide(t),e}addToCache(t){if(this.removeByIndex(t.index),this._cachedItems.push(t),this._cachedItems.length>this.limit){const t=this._cachedItems.findIndex(t=>!t.isAttached&&!t.hasSlide);-1!==t&&this._cachedItems.splice(t,1)[0].destroy()}}removeByIndex(t){const e=this._cachedItems.findIndex(e=>e.index===t);-1!==e&&this._cachedItems.splice(e,1)}getContentByIndex(t){return this._cachedItems.find(e=>e.index===t)}destroy(){this._cachedItems.forEach(t=>t.destroy()),this._cachedItems=[]}},E=class{constructor(t,e){this.type=t,this.defaultPrevented=!1,e&&Object.assign(this,e)}preventDefault(){this.defaultPrevented=!0}},A=class{constructor(){this._listeners={},this._filters={},this.pswp=void 0,this.options=void 0}addFilter(t,e,i=100){this._filters[t]||(this._filters[t]=[]),this._filters[t]?.push({fn:e,priority:i}),this._filters[t]?.sort((t,e)=>t.priority-e.priority),this.pswp?.addFilter(t,e,i)}removeFilter(t,e){this._filters[t]&&(this._filters[t]=this._filters[t].filter(t=>t.fn!==e)),this.pswp&&this.pswp.removeFilter(t,e)}applyFilters(t,...e){return this._filters[t]?.forEach(t=>{e[0]=t.fn.apply(this,e)}),e[0]}on(t,e){this._listeners[t]||(this._listeners[t]=[]),this._listeners[t]?.push(e),this.pswp?.on(t,e)}off(t,e){this._listeners[t]&&(this._listeners[t]=this._listeners[t].filter(t=>e!==t)),this.pswp?.off(t,e)}dispatch(t,e){if(this.pswp)return this.pswp.dispatch(t,e);const i=new E(t,e);return this._listeners[t]?.forEach(t=>{t.call(this,i)}),i}},F=class extends A{getNumItems(){let t=0;const e=this.options?.dataSource;e&&"length"in e?t=e.length:e&&"gallery"in e&&(e.items||(e.items=this._getGalleryDOMElements(e.gallery)),e.items&&(t=e.items.length));const i=this.dispatch("numItems",{dataSource:e,numItems:t});return this.applyFilters("numItems",i.numItems,e)}createContentFromData(t,e){return new w(t,this,e)}getItemData(t){const e=this.options?.dataSource;let i={};Array.isArray(e)?i=e[t]:e&&"gallery"in e&&(e.items||(e.items=this._getGalleryDOMElements(e.gallery)),i=e.items[t]);let s=i;s instanceof Element&&(s=this._domElementToItemData(s));const n=this.dispatch("itemData",{itemData:s||{},index:t});return this.applyFilters("itemData",n.itemData,t)}_getGalleryDOMElements(t){return this.options?.children||this.options?.childSelector?f(this.options.children,this.options.childSelector,t)||[]:[t]}_toLowerCaseFirstLetter(t){return t?t.charAt(0).toLowerCase()+t.slice(1):t}_domElementToItemData(t){const e={element:t},i="A"===t.tagName?t:t.querySelector("a");if(i){e.src=i.dataset.pswpSrc||i.href,i.dataset.pswpSrcset&&(e.srcset=i.dataset.pswpSrcset),e.width=i.dataset.pswpWidth?parseInt(i.dataset.pswpWidth,10):0,e.height=i.dataset.pswpHeight?parseInt(i.dataset.pswpHeight,10):0,i.dataset.pswpType&&(e.type=i.dataset.pswpType.toLowerCase());const s=t.querySelector("img");s&&(e.msrc=s.currentSrc||s.src,e.alt=s.getAttribute("alt")??""),(i.dataset.pswpCropped||i.dataset.cropped)&&(e.thumbCropped=!0);const n=["element","src","srcset","width","height","type","msrc","alt","thumbCropped"];Object.keys(i.dataset).filter(t=>t.startsWith("pswp")&&!n.includes(this._toLowerCaseFirstLetter(t.slice(4)))).forEach(t=>{e[this._toLowerCaseFirstLetter(t.slice(4))]=i.dataset[t]})}return this.applyFilters("domItemData",e,t,i)}lazyLoadData(t,e){return z(t,this,e)}};export{i as _,S as a,y as b,a as c,e as d,s as f,l as g,n as h,C as i,t as l,g as m,D as n,_ as o,f as p,L as r,x as s,F as t,c as u,r as v,h as x,o as y};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{t as a}from"./DrrpB4Om.js";import{i as t,n as e}from"./CKQOToSD.js";import{t as i}from"./DmIYOIw1.js";var r=({title:r,description:s,iconSvg:o,className:l})=>{const{props:n,organization:c}=e(),m=n?.emptyStateImage;/* @__PURE__ */
|
|
2
|
+
return a("div",{className:t("mx-auto flex w-full max-w-md flex-col items-center justify-center gap-8",l),children:[c?.integrationSettings?.showLogo?/* @__PURE__ */a("img",{className:"h-44 w-auto",src:c?.logoUrl||"/images/qrati-logo.svg",alt:r}):m?/* @__PURE__ */a("img",{className:"h-44 w-auto",src:m,alt:r}):o?/* @__PURE__ */a("div",{className:"text-primary h-44 w-auto",children:o}):null,/* @__PURE__ */a("div",{className:"space-y-2",children:[
|
|
3
|
+
/* @__PURE__ */a(i,{variant:"h4",align:"center",children:r}),"string"==typeof s&&/* @__PURE__ */a(i,{variant:"body2",color:"muted",align:"center",children:s}),"string"!=typeof s&&s]})]})};export{r as t};
|