@qratilabs/qrati-connect 2.23.5 → 2.23.7

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.
Files changed (109) hide show
  1. package/element/{DB68-h-C.js → 4VTPoA38.js} +1 -1
  2. package/element/{CJpmOICA.js → B14kCOq8.js} +1 -1
  3. package/element/{TV5seYRS.js → BItJQVdK.js} +3 -3
  4. package/element/{Hfo3iOYG2.js → BQuhYd4G2.js} +2 -2
  5. package/element/{DnW7WNo1.js → BYEF5Khs.js} +1 -1
  6. package/element/BYoa-kpQ2.js +9 -0
  7. package/element/{B7EvJYrt2.js → BdOzsWR32.js} +1 -1
  8. package/element/{DGHG5MsV.js → Be1e_ATJ.js} +1 -1
  9. package/element/{CnAKuO192.js → BfkCwRAR2.js} +3 -3
  10. package/{umd/CwE8D5S0.js → element/BglDIiFp.js} +1 -1
  11. package/{umd/WX3mhhd9.js → element/BkvtmX4K.js} +1 -1
  12. package/element/{CslFRHxJ2.js → BpVacqmD2.js} +14 -14
  13. package/{umd/E5aJy_fH.js → element/BtN9y353.js} +1 -1
  14. package/element/{CKk0UYyd.js → Byk0pccK.js} +1 -1
  15. package/{umd/CCm2-mcE2.js → element/C030L_Hu2.js} +4 -4
  16. package/element/C3uDEVBt.js +1 -0
  17. package/element/{DZ2f3-jO.js → C8_zGNAf.js} +1 -1
  18. package/element/{YJHG0sOk.js → CCLXmMXp.js} +1 -1
  19. package/element/{Boh-45fW.js → CSO2IaJ1.js} +2 -2
  20. package/{umd/DD6up6cl2.js → element/CXg838Gr2.js} +1 -1
  21. package/element/{CtYiLBXL.js → Cb1JRT_1.js} +1 -1
  22. package/{umd/DBS5eoAD.js → element/CiiNqDJq.js} +1 -1
  23. package/element/{D9JpTB2O2.js → Cj4nJyT42.js} +1 -1
  24. package/{umd/D5TvVWUK.js → element/CnoPTYOO.js} +1 -1
  25. package/element/{BrWTIUcy2.js → CxgDoGDT2.js} +1 -1
  26. package/element/{DiBNGdQS.js → D0VKfxwE.js} +10 -10
  27. package/element/{DYU4JC0C2.js → D4apO9G62.js} +4 -4
  28. package/{umd/BCyTQnZ1.js → element/D9NypPiv.js} +1 -1
  29. package/element/{CiryJz3K2.js → DB1jhaAe2.js} +85 -86
  30. package/element/{C9HFLidt.js → DIYUC8M3.js} +1 -1
  31. package/{umd/BCu0TrNB2.js → element/DNG5BSHx2.js} +1 -1
  32. package/element/{BmFX4pgV2.js → DQ6V4QOv2.js} +10 -10
  33. package/element/{DV3rTDj-2.js → DXx41__x2.js} +1 -1
  34. package/element/{DcLlwdC6.js → Do2aldFH.js} +1 -1
  35. package/element/{BbWh89xA2.js → Drl8BMLL2.js} +1 -1
  36. package/element/{BNj7xAbL.js → DsvRTvCp.js} +1 -1
  37. package/element/{DWbLshVZ.js → DvTRhlvs.js} +1 -1
  38. package/element/{3djirt_r2.js → MpvHkxaz2.js} +1 -1
  39. package/element/{u7SUQ9Kb2.js → VakK6fPh2.js} +1 -1
  40. package/element/WxZlurdK2.js +39 -0
  41. package/element/{DXrH_HhZ.js → _ty2jtjs.js} +1 -1
  42. package/element/{Crix9_9X.js → b6CwQBFC.js} +5 -5
  43. package/element/{CuRZaTn5.js → ekog7y-V.js} +1 -1
  44. package/{umd/D8Se70tP2.js → element/gjXXuILV2.js} +1 -1
  45. package/element/{DP5TIAjd2.js → lrjV8c1G2.js} +1 -1
  46. package/element/ls36Q8v0.js +9 -0
  47. package/element/{BhWrOCDI2.js → qNDy94Dr2.js} +3 -3
  48. package/element/{DmSY4t_i.js → qWp4ucdT.js} +1 -1
  49. package/element/web.es.js +42 -42
  50. package/package.json +1 -1
  51. package/react/index.d.mts +6 -117
  52. package/react/index.d.ts +6 -117
  53. package/umd/{DB68-h-C.js → 4VTPoA38.js} +1 -1
  54. package/umd/{CJpmOICA.js → B14kCOq8.js} +1 -1
  55. package/umd/{TV5seYRS.js → BItJQVdK.js} +3 -3
  56. package/umd/{Hfo3iOYG2.js → BQuhYd4G2.js} +2 -2
  57. package/umd/{DnW7WNo1.js → BYEF5Khs.js} +1 -1
  58. package/umd/BYoa-kpQ2.js +9 -0
  59. package/umd/{B7EvJYrt2.js → BdOzsWR32.js} +1 -1
  60. package/umd/{DGHG5MsV.js → Be1e_ATJ.js} +1 -1
  61. package/umd/{CnAKuO192.js → BfkCwRAR2.js} +3 -3
  62. package/{element/CwE8D5S0.js → umd/BglDIiFp.js} +1 -1
  63. package/{element/WX3mhhd9.js → umd/BkvtmX4K.js} +1 -1
  64. package/umd/{CslFRHxJ2.js → BpVacqmD2.js} +14 -14
  65. package/{element/E5aJy_fH.js → umd/BtN9y353.js} +1 -1
  66. package/umd/{CKk0UYyd.js → Byk0pccK.js} +1 -1
  67. package/{element/CCm2-mcE2.js → umd/C030L_Hu2.js} +4 -4
  68. package/umd/C3uDEVBt.js +1 -0
  69. package/umd/{DZ2f3-jO.js → C8_zGNAf.js} +1 -1
  70. package/umd/{YJHG0sOk.js → CCLXmMXp.js} +1 -1
  71. package/umd/{Boh-45fW.js → CSO2IaJ1.js} +2 -2
  72. package/{element/DD6up6cl2.js → umd/CXg838Gr2.js} +1 -1
  73. package/umd/{CtYiLBXL.js → Cb1JRT_1.js} +1 -1
  74. package/{element/DBS5eoAD.js → umd/CiiNqDJq.js} +1 -1
  75. package/umd/{D9JpTB2O2.js → Cj4nJyT42.js} +1 -1
  76. package/{element/D5TvVWUK.js → umd/CnoPTYOO.js} +1 -1
  77. package/umd/{BrWTIUcy2.js → CxgDoGDT2.js} +1 -1
  78. package/umd/{DiBNGdQS.js → D0VKfxwE.js} +10 -10
  79. package/umd/{DYU4JC0C2.js → D4apO9G62.js} +4 -4
  80. package/{element/BCyTQnZ1.js → umd/D9NypPiv.js} +1 -1
  81. package/umd/{CiryJz3K2.js → DB1jhaAe2.js} +85 -86
  82. package/umd/{C9HFLidt.js → DIYUC8M3.js} +1 -1
  83. package/{element/BCu0TrNB2.js → umd/DNG5BSHx2.js} +1 -1
  84. package/umd/{BmFX4pgV2.js → DQ6V4QOv2.js} +10 -10
  85. package/umd/{DV3rTDj-2.js → DXx41__x2.js} +1 -1
  86. package/umd/{DcLlwdC6.js → Do2aldFH.js} +1 -1
  87. package/umd/{BbWh89xA2.js → Drl8BMLL2.js} +1 -1
  88. package/umd/{BNj7xAbL.js → DsvRTvCp.js} +1 -1
  89. package/umd/{DWbLshVZ.js → DvTRhlvs.js} +1 -1
  90. package/umd/{3djirt_r2.js → MpvHkxaz2.js} +1 -1
  91. package/umd/{u7SUQ9Kb2.js → VakK6fPh2.js} +1 -1
  92. package/umd/WxZlurdK2.js +39 -0
  93. package/umd/{DXrH_HhZ.js → _ty2jtjs.js} +1 -1
  94. package/umd/{Crix9_9X.js → b6CwQBFC.js} +5 -5
  95. package/umd/{CuRZaTn5.js → ekog7y-V.js} +1 -1
  96. package/{element/D8Se70tP2.js → umd/gjXXuILV2.js} +1 -1
  97. package/umd/{DP5TIAjd2.js → lrjV8c1G2.js} +1 -1
  98. package/umd/ls36Q8v0.js +9 -0
  99. package/umd/{BhWrOCDI2.js → qNDy94Dr2.js} +3 -3
  100. package/umd/{DmSY4t_i.js → qWp4ucdT.js} +1 -1
  101. package/umd/web.es.js +42 -42
  102. package/element/CUJTm_YL2.js +0 -39
  103. package/element/CkgIN-cn2.js +0 -9
  104. package/element/DcL9Mr2r.js +0 -9
  105. package/element/qbHuxVSe.js +0 -1
  106. package/umd/CUJTm_YL2.js +0 -39
  107. package/umd/CkgIN-cn2.js +0 -9
  108. package/umd/DcL9Mr2r.js +0 -9
  109. package/umd/qbHuxVSe.js +0 -1
@@ -1,4 +1,4 @@
1
- import{b as r,t as e}from"./qbHuxVSe.js";import{D as a,i as s,n as t}from"./TV5seYRS.js";import{c as i,i as o,l as m,n as d}from"./Crix9_9X.js";import{t as l}from"./CuRZaTn5.js";import{t as c}from"./DXrH_HhZ.js";var n=()=>{const n=i(),b=m(),{initializing:f,organization:p,user:x}=t();return r(()=>{if(x){const r=n.state?.referrer;b(r||"/")}},[x]),f?/* @__PURE__ */e("div",{className:"mx-auto max-w-lg space-y-8 py-8",children:[
1
+ import{b as r,t as e}from"./C3uDEVBt.js";import{D as a,i as s,n as t}from"./BItJQVdK.js";import{c as i,i as o,l as m,n as d}from"./b6CwQBFC.js";import{t as l}from"./ekog7y-V.js";import{t as c}from"./_ty2jtjs.js";var n=()=>{const n=i(),b=m(),{initializing:f,organization:p,user:x}=t();return r(()=>{if(x){const r=n.state?.referrer;b(r||"/")}},[x]),f?/* @__PURE__ */e("div",{className:"mx-auto max-w-lg space-y-8 py-8",children:[
2
2
  /* @__PURE__ */e(l,{className:"h-8"}),
3
3
  /* @__PURE__ */e(l,{className:"h-8"}),
4
4
  /* @__PURE__ */e(l,{className:"h-8"}),
@@ -1,2 +1,2 @@
1
- import{D as r,p as n,t as o,v as a,y as s}from"./qbHuxVSe.js";var t={loading:"Loading...",error:"Error",not_found:"Translation not found"},e=r({locale:"en",translations:t,isLoading:!1,error:null}),i=()=>{const r=s(e);if(!r)throw new Error("useI18n must be used within an I18nProvider");const{translations:n,isLoading:o,error:i}=r;return{t:a((r,a)=>o?t.loading:i?t.error:n[r]||a||r,[n,o,i])}},l=i,d=({children:r,locale:a="en",translations:s})=>{const i=n(()=>({locale:a,translations:{...t,...s||{}},isLoading:!1,error:null}),[a,s]);/* @__PURE__ */
1
+ import{E as r,p as n,t as o,v as a,y as s}from"./C3uDEVBt.js";var t={loading:"Loading...",error:"Error",not_found:"Translation not found"},e=r({locale:"en",translations:t,isLoading:!1,error:null}),i=()=>{const r=s(e);if(!r)throw new Error("useI18n must be used within an I18nProvider");const{translations:n,isLoading:o,error:i}=r;return{t:a((r,a)=>o?t.loading:i?t.error:n[r]||a||r,[n,o,i])}},l=i,d=({children:r,locale:a="en",translations:s})=>{const i=n(()=>({locale:a,translations:{...t,...s||{}},isLoading:!1,error:null}),[a,s]);/* @__PURE__ */
2
2
  return o(e.Provider,{value:i,children:r})};export{i as n,l as r,d as t};
@@ -1,4 +1,4 @@
1
- import{h as e,p as a,t as r}from"./qbHuxVSe.js";import{D as s,n as i}from"./TV5seYRS.js";import{l}from"./Crix9_9X.js";import{t}from"./CtYiLBXL.js";import{n as o}from"./DWbLshVZ.js";import{t as n}from"./BCyTQnZ1.js";import{i as d,s as c,t as u}from"./DV3rTDj-2.js";var h=({count:e=1,currentStep:a=0,disabled:s,onStepClick:i})=>{const l=s||!i;/* @__PURE__ */
1
+ import{h as e,p as a,t as r}from"./C3uDEVBt.js";import{D as s,n as i}from"./BItJQVdK.js";import{l}from"./b6CwQBFC.js";import{t}from"./Cb1JRT_1.js";import{n as o}from"./DvTRhlvs.js";import{t as n}from"./D9NypPiv.js";import{i as d,s as c,t as u}from"./DXx41__x2.js";var h=({count:e=1,currentStep:a=0,disabled:s,onStepClick:i})=>{const l=s||!i;/* @__PURE__ */
2
2
  return r("ol",{className:"flex items-center space-x-6 pl-1.5",children:Array.from({length:e}).map((e,s)=>/* @__PURE__ */r("li",{children:/* @__PURE__ */r("button",s<a?{type:"button",className:"bg-primary block h-3 w-3 rounded-full",disabled:l,onClick:()=>i?.(s)}:s===a?{type:"button",className:"relative flex items-center justify-center","aria-current":"step",disabled:l,onClick:()=>i?.(s),children:[/* @__PURE__ */r("span",{className:"absolute flex size-6 p-px","aria-hidden":"true",children:/* @__PURE__ */r("span",{className:"bg-primary/40 size-full rounded-full"})}),/* @__PURE__ */r("span",{className:"bg-primary relative block size-3 rounded-full","aria-hidden":"true"})]}:{type:"button",className:"bg-muted block size-3 rounded-full",disabled:l,onClick:()=>i?.(s)})},`progress-dot-${s}`))})},m=({onCodeSent:a})=>{const{t:s}=o(),{sendPasswordResetCode:l}=i(),[c,h]=e(""),[m,f]=e(!1),[p,y]=e(null),[v,g]=e(null);/* @__PURE__ */
3
3
  return r("div",{className:"space-y-4",children:[
4
4
  /* @__PURE__ */r(t,{variant:"h4",children:s("auth.forgotPassword","Forgot Password")}),
@@ -1,4 +1,4 @@
1
- import{t as e}from"./qbHuxVSe.js";var a=a=>{switch(a){case"google":/* @__PURE__ */return e("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 48 48",className:"size-6",children:[
1
+ import{t as e}from"./C3uDEVBt.js";var a=a=>{switch(a){case"google":/* @__PURE__ */return e("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 48 48",className:"size-6",children:[
2
2
  /* @__PURE__ */e("path",{fill:"#ffc107",d:"M43.611 20.083H42V20H24v8h11.303c-1.649 4.657-6.08 8-11.303 8c-6.627 0-12-5.373-12-12s5.373-12 12-12c3.059 0 5.842 1.154 7.961 3.039l5.657-5.657C34.046 6.053 29.268 4 24 4C12.955 4 4 12.955 4 24s8.955 20 20 20s20-8.955 20-20c0-1.341-.138-2.65-.389-3.917"}),
3
3
  /* @__PURE__ */e("path",{fill:"#ff3d00",d:"m6.306 14.691l6.571 4.819C14.655 15.108 18.961 12 24 12c3.059 0 5.842 1.154 7.961 3.039l5.657-5.657C34.046 6.053 29.268 4 24 4C16.318 4 9.656 8.337 6.306 14.691"}),
4
4
  /* @__PURE__ */e("path",{fill:"#4caf50",d:"M24 44c5.166 0 9.86-1.977 13.409-5.192l-6.19-5.238A11.9 11.9 0 0 1 24 36c-5.202 0-9.619-3.317-11.283-7.946l-6.522 5.025C9.505 39.556 16.227 44 24 44"}),
@@ -0,0 +1,39 @@
1
+ import{b 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"./C3uDEVBt.js";import{C as c,D as d,L as u,M as m,N as g,O as h,P as p,S as f,_ as v,b as w,d as T,f as y,g as N,h as q,i as x,j as b,m as E,n as C,p as S,u as I,v as L,x as z,y as k}from"./BItJQVdK.js";import{n as M,r as A,t as _}from"./C8_zGNAf.js";import{t as P,u as R}from"./b6CwQBFC.js";import{t as V}from"./ekog7y-V.js";import{n as O,t as j}from"./Cb1JRT_1.js";import{a as F,c as B,i as H,l as U,n as G,o as $,r as D,s as W,t as Q,u as K}from"./D0VKfxwE.js";import{t as Z}from"./CCLXmMXp.js";import{r as Y}from"./DvTRhlvs.js";import{n as J,t as X}from"./D9NypPiv.js";import{t as ee}from"./DIYUC8M3.js";import{t as te}from"./qWp4ucdT.js";import{t as ne}from"./B14kCOq8.js";import{a as re,i as ae,n as ie,o as se,r as oe,s as le,t as ce}from"./CiiNqDJq.js";import{n as de,r as ue,t as me}from"./gjXXuILV2.js";import{n as ge,t as he}from"./DXx41__x2.js";function pe({className:e}){/* @__PURE__ */
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 fe({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 ve=({description:t,maxLines:a=2,className:i})=>{const[o,l]=r(!1),[c,d]=r(!1),u=n(null),m=n(null);return e(()=>{l(!1)},[t]),e(()=>{if(!u.current||!t)return void d(!1);const e=u.current,n=()=>{const t=window.getComputedStyle(e),r=Math.max(0,Math.floor(e.getBoundingClientRect().width));if(!r)return void(m.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),d(c>o*a+1)},r=()=>{null!==m.current&&window.cancelAnimationFrame(m.current),m.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!==m.current&&window.cancelAnimationFrame(m.current),i?.disconnect()}},[t,a]),t?/* @__PURE__ */s("div",{className:x("relative w-full",i),children:[/* @__PURE__ */s("p",{ref:u,className:x(O({variant:"body2",color:"muted",align:"center"}),"w-full",o?void 0:`line-clamp-${a}`),children:[t,c&&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"})]}),c&&!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},we=()=>{const{t:e}=Y(),{eventSlug:t}=R(),{event:n}=te({eventSlug:t}),{props:r,organization:a}=C(),{curateLabel:i,leaderboardLabel:o}=r??{},{eventViews:l,contentCount:c,curationCount:u}=(({event:e})=>{const{props:t,organization:n}=C(),r=t?.organizationId,{isLoading:a,data:i}=p({queryKey:["event-stats",r??"",e?._id??""],queryFn:async()=>{try{return(await g.get(I.GET_EVENT_STATISTICS,{searchParams:{eventSlug:e?.slug},headers:{"x-org-id":r}}).json()).data}catch(t){throw new Error(t instanceof Error?t.message:String(t)||"Failed to fetch event stats")}},enabled:!!e&&Boolean(n?.integrationSettings?.showEventStats)});return{isLoading:a,eventViews:"number"==typeof i?.eventViews?i.eventViews:i?.eventViews?.views??0,contentCount:i?.contentCount||0,curationCount:i?.curationCount||0}})({event:n});/* @__PURE__ */
4
+ return s("div",{className:"w-full space-y-3",children:[
5
+ /* @__PURE__ */s("div",{className:"space-y-2 md:-mt-8",children:[/* @__PURE__ */s(j,{variant:"h4",align:"center",immutable:!0,className:"mx-auto max-w-2xl",children:n?.name}),/* @__PURE__ */s(ve,{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(fe,{className:"text-primary"}),/* @__PURE__ */s(j,{variant:"body1",className:"font-medium",children:l??0})]}),
7
+ /* @__PURE__ */s("div",{className:"flex items-center gap-2",children:[/* @__PURE__ */s(pe,{className:"text-primary"}),/* @__PURE__ */s(j,{variant:"body1",className:"font-medium",children:c})]}),n?.engagementStyle===L.CONTEST&&/* @__PURE__ */s("div",{className:"flex items-center gap-2",children:[/* @__PURE__ */s(le,{className:"text-primary"}),/* @__PURE__ */s(j,{variant:"body1",className:"font-medium",children:u})]})]})}),(n?.status===k.OPEN&&n?.uploadLimit&&n.uploadLimit>0||n?.status===k.OPEN&&n?.engagementStyle===L.CONTEST||n?.engagementStyle===L.REACTION&&n?.showLeaderboard||n?.engagementStyle===L.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:d.UPLOAD(n?.slug??""),children:/* @__PURE__ */s(X,{icon:/* @__PURE__ */s(ue,{className:"size-5"}),children:e("content.upload","Upload")})}),n?.status===k.OPEN&&n?.engagementStyle===L.CONTEST&&/* @__PURE__ */s(P,{to:d.CURATE(n?.slug??""),children:/* @__PURE__ */s(X,{icon:/* @__PURE__ */s(le,{className:"size-5"}),children:i||e("content.curate","Curate")})}),n?.showLeaderboard&&/* @__PURE__ */s(P,{to:d.LEADERBOARD(n?.slug??""),children:/* @__PURE__ */s(X,{icon:/* @__PURE__ */s(ne,{className:"size-5"}),children:o||e("content.leaderboard","Leaderboard")})})]})]})},Te=(e,t)=>["in-review-count",e??"",t??""];function ye({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 Ne({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 qe({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 xe({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 be({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 Ee({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 Ce({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 Se({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 Ie=({event:e})=>{const t=u(),{user:n,props:a}=C(),i=a?.organizationId,[o,l]=r(!1);/* @__PURE__ */
16
+ return s(D,{children:[/* @__PURE__ */s($,{children:/* @__PURE__ */s(o?Se:Ce,{className:"size-6"})}),/* @__PURE__ */s(H,{align:"end",side:"bottom",className:"w-44",children:Object.values(f).map(r=>/* @__PURE__ */s(F,{onClick:()=>(async r=>{l(!0);try{const a=new FormData;a.append("eventId",e?._id??""),a.append("galleryLayout",r),await g.post(I.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:ge(r)},r))})]})},Le=({event:e,onAutoscrollClick:t})=>{const{t:n}=Y(),{isSuper:r,isOwner:i,isAdmin:o,isModerator:l}=U(),{inReviewCount:c}=(e=>{const t=u(),{props:n}=C(),r=n?.organizationId,{role:a,isSuper:i}=U(),{isLoading:s,data:o,isError:l,error:c}=p({queryKey:Te(r,e?.slug),queryFn:async()=>{try{const t=await g.get(I.GET_CONTENTS_COUNT,{searchParams:{eventSlug:e?.slug,filter:`status:${S.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(Te(r,e?.slug),e=>(e??0)+1)},decrement:()=>{t.setQueryData(Te(r,e?.slug),e=>Math.max(0,(e??0)-1))}}})(e),d=r||i||o||l,m=r||i||o,h=a(()=>{const t=[];return m&&t.push({title:n("event.shot_inspector","Shot Inspector"),icon:ye,href:z.EVENT_SHOT_INSPECTOR(e?.slug??"")}),e?.visibility===w.PRIVATE&&d&&t.push({title:n("event.access_requests","Access Requests"),icon:Ee,href:z.EVENT_ACCESS_REQUESTS(e?.slug??"")}),e?.engagementStyle===L.CONTEST&&m&&t.push({title:n("event.curation_details","Curation Details"),icon:be,href:z.EVENT_CURATION_DETAILS(e?.slug??"")}),m&&t.push({title:n("event.edit_event","Edit Event"),icon:W,href:z.EVENT_SETTINGS_BASIC_DETAILS(e?.slug??"")}),t},[e,m,d]);/* @__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(B,{content:n("event.kiosk_mode","Kiosk Mode"),children:/* @__PURE__ */s("button",{onClick:t,className:"hidden sm:block",children:/* @__PURE__ */s(qe,{className:"size-6"})})}),"undefined"!=typeof document&&document?.fullscreenEnabled&&m&&/* @__PURE__ */s(Ie,{event:e}),d&&/* @__PURE__ */s(B,{content:n("event.review_contents","Review Contents"),children:/* @__PURE__ */s("a",{target:"_blank",rel:"noreferrer",href:z.EVENT_REVIEW_CONTENTS(e?.slug??""),className:"relative",children:[/* @__PURE__ */s(Ne,{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})]})}),h.length>0&&/* @__PURE__ */s(D,{children:[/* @__PURE__ */s($,{children:/* @__PURE__ */s(xe,{className:"size-6"})}),/* @__PURE__ */s(H,{align:"end",side:"bottom",className:"w-48",children:h.map(e=>/* @__PURE__ */s(F,{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 ze({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 ke=({engagementStyle:e,sort:t=N,order:n=v,onSortChange:r,onSortOrderChange:i})=>{const{t:o}=Y(),l=a(()=>{const t=Object.keys(y).map(e=>({text:o(`content.sortby_${y[e].label.toLowerCase()}`,y[e].label),value:e,activeClassName:"bg-primary text-primary-foreground"}));return e===L.CONTEST?t:t.filter(e=>e.value!==T.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:x("text-foreground w-7 -scale-x-100 transition-transform",n===b.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(K,{className:"flex-1 lg:flex-none",selected:t,buttons:l,onChange:e=>r&&r(e)})]})},Me=["jpg","jpeg","png","webp","heic","tiff","bmp"],Ae=({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?J: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(!Me.includes(n))return i(null);(async e=>{if(!e)return;l(!0);let t=e;try{e.size/1024/1024>1&&(t=await de(e,{maxSizeMB:1,maxWidthOrHeight:1600,useWebWorker:!0,preserveExif:!1,maxIteration:3}))}catch(n){console.error(n)}l(!1),i(t)})(t)}})]})},_e={[q.GRID]:{icon:/* @__PURE__ */s(Ce,{className:"size-full text-inherit"})},[q.SINGLE]:{icon:/* @__PURE__ */s(ze,{className:"size-full text-inherit"})}},Pe=Object.keys(_e).map(e=>({icon:_e[e].icon,value:e})),Re=({engagementStyle:t,disabled:a,mode:i,onModeChange:l,sort:c,onSortChange:d,sortOrder:u,onSortOrderChange:m,handleChange:g,face:h,onFaceImageChange:p})=>{const{t:f}=Y(),{organization:v}=C(),[w,T]=r(""),[y,N]=r(null),q=n(null),x=o(()=>{q.current&&(URL.revokeObjectURL(q.current),q.current=null)},[]),b=o(e=>{if(N(e),x(),e){const t=URL.createObjectURL(e);q.current=t,p?.(t)}else p?.(void 0)},[p,x]),E=o(e=>{T(e.target.value)},[]),S=o(e=>{const t=e.key;"Enter"===t?g&&g(w.length>0?w:""):"Escape"===t&&(T(""),g&&g(""))},[w,g]),I=o(()=>{T(""),g&&g("")},[g]),L=o(()=>{g&&g(w)},[w,g]);return e(()=>{h||N(null)},[h]),e(()=>()=>{x()},[x]),/* @__PURE__ */s("div",{className:"mb-3 grid grid-cols-3 md:space-y-0 md:space-x-4",children:[
21
+ /* @__PURE__ */s("div",{className:"col-span-3 flex items-center gap-4 md:col-span-1",children:[v?.integrationSettings?.showGridViewToggle&&/* @__PURE__ */s(K,{buttons:Pe,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(he,{placeholder:f("content.search_placeholder","Search using text"),value:w,className:"py-2",onChange:E,onKeyUp:S}),w?.length>0&&/* @__PURE__ */s("button",{className:"absolute inset-y-0 right-10 flex items-center",onClick:I,children:/* @__PURE__ */s(ee,{className:"text-foreground w-5"})}),
23
+ /* @__PURE__ */s("button",{className:"absolute inset-y-0 right-3 flex items-center",onClick:L,children:/* @__PURE__ */s(G,{className:"text-foreground w-5"})})]})}),v?.integrationSettings?.showFacialSearch&&/* @__PURE__ */s(Ae,{value:y,onChange:b})]}),
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(ke,{engagementStyle:t,sort:c,order:u,onSortChange:d,onSortOrderChange:m})})]})},Ve=()=>/* @__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
+ /* @__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
+ /* @__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
+ /* @__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
+ /* @__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
+ /* @__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
+ /* @__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"})]})}),Oe=({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"})},Fe=t(()=>import("./DQ6V4QOv2.js")),Be=()=>{const t=R().eventSlug,{loadingUser:o,organization:c}=C(),p=u(),[f,w]=r(""),[b,S]=r(void 0),[z,P]=r(N),[O,F]=r(v),[B,H]=r("undefined"!=typeof window&&window.innerWidth<768?q.SINGLE:q.GRID),U=n(null),{event:G,ads:$,gamConfig:D}=te({eventSlug:t}),{loading:W,isError:K,error:Y,refetch:J,contentsWithAds:ne,hasNextPage:re,fetchNextPage:ae,isFetchingNextPage:se}=(({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,initialPageParam:1,getPreviousPageParam:e=>M(e),getNextPageParam:_}),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:z,order:O,keywords:f,face:b}),{incrementEventView:oe}=ie(),{start:le,initializing:ce,running:de}=(({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:re,fetchNextPage:ae,isFetchingNextPage:se,onBottomReached:()=>G?._id&&p.refetchQueries({queryKey:[h.CONTENTS_BY_EVENT(G._id)]})});e(()=>{G?.slug&&oe(G.slug)},[G?.slug,oe]);const ue=a(()=>B===q.SINGLE,[B]),ge=a(()=>/* @__PURE__ */s(Le,{event:G,onAutoscrollClick:le}),[G,le]),he=n(null),pe=n(null);e(()=>(he.current&&he.current.disconnect(),he.current=new IntersectionObserver(e=>{e[0].isIntersecting&&re&&!se&&!W&&ae()},{rootMargin:"200px"}),pe.current&&he.current.observe(pe.current),()=>{he.current&&(he.current.disconnect(),he.current=null)}),[re,se,W,ae]);const fe=D?.bannerPositions??[],ve=c?._id,Te=D&&fe.includes("right"),ye=Boolean(c?.integrationSettings?.showQuickSearch);/* @__PURE__ */
33
+ return s("div",{className:"bg-background mx-auto min-h-[80vh]",children:[
34
+ /* @__PURE__ */s("div",{className:"flex flex-row justify-end gap-4 pt-2",children:ge}),
35
+ /* @__PURE__ */s("div",{className:"pb-3",children:/* @__PURE__ */s(we,{})}),D&&fe.includes("top")&&/* @__PURE__ */s(Oe,{position:"top",gamConfig:D,eventId:G?._id,organizationId:ve}),
36
+ /* @__PURE__ */s(Re,{engagementStyle:G?.engagementStyle,disabled:o||W,mode:B,onModeChange:e=>H(e),sort:z,sortOrder:O,onSortChange:e=>P(e),onSortOrderChange:()=>F("asc"===O?"desc":"asc"),handleChange:w,face:b,onFaceImageChange:e=>S(e)}),b&&/* @__PURE__ */s("div",{className:"flex gap-4 py-2",children:[/* @__PURE__ */s("div",{className:"space-y-2",children:[/* @__PURE__ */s(j,{variant:"h4",children:"Searching using"}),/* @__PURE__ */s("img",{src:b,alt:"face",className:"h-32 rounded"})]}),/* @__PURE__ */s("div",{className:"flex flex-col justify-end gap-2",children:/* @__PURE__ */s(X,{color:"error",icon:/* @__PURE__ */s(ee,{className:"size-5"}),onClick:()=>S(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:[o||W?/* @__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(V,{className:"h-72"},t))}):K?/* @__PURE__ */s("div",{className:"my-16 flex flex-col items-center gap-4",children:/* @__PURE__ */s(Z,{title:Y?.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(j,{variant:"body2",color:"muted",align:"center",children:Y?.message?.toLowerCase().includes("timed out")?"The search took too long to respond. Please try again.":"Something went wrong while loading content."}),/* @__PURE__ */s(X,{icon:/* @__PURE__ */s(me,{className:"size-5"}),onClick:()=>{J()},children:"Retry"})]})})}):ne?.length<=0?/* @__PURE__ */s("div",{className:"my-16 flex flex-col items-center gap-4",children:/* @__PURE__ */s(Z,{title:"No Contents",description:"Check back soon for amazing contents.",iconSvg:/* @__PURE__ */s(Ve,{})})}):/* @__PURE__ */s(l,{children:[
38
+ /* @__PURE__ */s("div",{ref:U,className:x(ue?"flex w-full justify-center":"",ce?"opacity-0":"opacity-100",de?"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(V,{className:"h-72"},t))}),children:/* @__PURE__ */s(Fe,{event:G,contents:ne,gamConfig:D,singleColumnMode:ue,kioskMode:de,timestampField:z===T.CAPTURE_TIME?"capturedAt":void 0,curateLink:G?.engagementStyle===L.CONTEST&&G.status===k.OPEN&&G.slug?d.CURATE(G.slug):void 0,onChangeFaceUrl:e=>S(e),showQuickSearch:ye})})}),
39
+ /* @__PURE__ */s("div",{ref:pe,className:"h-4 w-full","aria-hidden":"true"}),se&&/* @__PURE__ */s("div",{className:"mx-auto my-6 w-fit",children:/* @__PURE__ */s(Q,{className:"text-2xl"})})]}),D&&fe.includes("bottom")&&/* @__PURE__ */s(Oe,{position:"bottom",gamConfig:D,eventId:G?._id,organizationId:ve})]}),Te&&/* @__PURE__ */s(je,{gamConfig:D,eventId:G?._id,organizationId:ve})]})]})};export{Be as default};
@@ -1,2 +1,2 @@
1
- import{t as e}from"./qbHuxVSe.js";var r=()=>/* @__PURE__ */e("div",{className:"text-muted-foreground text-center text-sm",children:["Powered by"," ",
1
+ import{t as e}from"./C3uDEVBt.js";var r=()=>/* @__PURE__ */e("div",{className:"text-muted-foreground text-center text-sm",children:["Powered by"," ",
2
2
  /* @__PURE__ */e("a",{href:"https://qrati.com",target:"_blank",rel:"noopener noreferrer",children:/* @__PURE__ */e("strong",{children:"Qrati"})})]});export{r as t};
@@ -1,5 +1,5 @@
1
- import{D as t,S as e,T as n,b as s,f as r,h as i,p as a,t as o,v as l,y as c}from"./qbHuxVSe.js";import{i as h}from"./TV5seYRS.js";var u=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(u);if(!t)throw new Error("useNavigate must be used inside a Router");const{navigate:e,go:n}=t;return l((t,s)=>{"number"!=typeof t?e(t,s):n(t)},[e,n])}function y(){const t=c(u);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 x({mode:t,initialPath:e,children:n}){const c=r("memory"===t?new d(e):new f),[h,p]=i(c.current.location),[m,w]=i(c.current.state);s(()=>c.current.listen(t=>{p(t),w(c.current.state)}),[]);const y=l((t,e)=>{const n=c.current;e&&e.replace?n.replace(t,e.state):n.push(t,e?.state)},[]),v=l(t=>{c.current.go(t)},[]),g=a(()=>({location:h,state:m,navigate:y,go:v,mode:t}),[h,m,y,v,t]);/* @__PURE__ */
2
- return o(u.Provider,{value:g,children:n})}function E(t){return null}function _(t){return e(t).filter(t=>t?.type===E).map(t=>({path:t.props.path,element:t.props.element,children:t.props.children?_(t.props.children):void 0}))}function b({children:t}){const{location:s}=c(u),i=r([]),l=e(t).filter(t=>t?.type===E).map(t=>t.props.path).join("\0"),h=r("");l!==h.current&&(h.current=l,i.current=_(t));const d=i.current,f=a(()=>k(s,d),[s,d]),m=a(()=>(f??[]).reduce((t,e)=>({...t,...e.params}),{}),[f]),w=a(()=>{if(!f)return null;let t=null;for(let e=f.length-1;e>=0;e--){const n=f[e].route.element;t=/* @__PURE__ */o(p.Provider,{value:{params:m,outlet:t},children:/* @__PURE__ */o(n,{})})}return t},[f,m]);return f?/* @__PURE__ */o(n,{children:w}):null}function C(){/* @__PURE__ */
3
- return o(n,{children:c(p)?.outlet})}function N({to:t,state:e,replace:n,children:s,className:r,onClick:i,...a}){const h=c(u);/* @__PURE__ */
4
- return o("a",{href:t,onClick:l(s=>{s.preventDefault(),i?.(s),h?.navigate(t,{state:e,replace:n})},[h,t,e,n,i]),className:r,...a,children:s})}function W({to:t,children:e,className:n,activeClassName:s,onClick:r,...i}){const p=c(u),d=a(()=>{if(!p)return!1;const e=p.location;return e===t||!("/"===t||!e.startsWith(`${t}/`))},[p?.location,t]);/* @__PURE__ */
5
- return o("a",{href:t,onClick:l(e=>{e.preventDefault(),r?.(e),p?.navigate(t)},[p,t,r]),className:"function"==typeof n?n({isActive:d}):h(n,d&&s),...i,children:e})}function q({to:t,state:e,replace:n}){const r=w();return s(()=>{queueMicrotask(()=>{r(t,{state:e,replace:n})})},[r,t,e,n]),null}export{E as a,y as c,C as i,w as l,W as n,x as o,q as r,b as s,N as t,m as u};
1
+ import{E as t,S as e,b as n,f as s,h as r,p as i,t as a,v as o,w as l,y as c}from"./C3uDEVBt.js";import{i as h}from"./BItJQVdK.js";var u=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(u);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(u);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),[h,p]=r(c.current.location),[m,w]=r(c.current.state);n(()=>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:h,state:m,navigate:y,go:v,mode:t}),[h,m,y,v,t]);/* @__PURE__ */
2
+ return a(u.Provider,{value:g,children:l})}function x(t){return null}function _(t){return e(t).filter(t=>t?.type===x).map(t=>({path:t.props.path,element:t.props.element,children:t.props.children?_(t.props.children):void 0}))}function b({children:t}){const{location:n}=c(u),r=s([]),o=e(t).filter(t=>t?.type===x).map(t=>t.props.path).join("\0"),h=s("");o!==h.current&&(h.current=o,r.current=_(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 C(){/* @__PURE__ */
3
+ return a(l,{children:c(p)?.outlet})}function N({to:t,state:e,replace:n,children:s,className:r,onClick:i,...l}){const h=c(u);/* @__PURE__ */
4
+ return a("a",{href:t,onClick:o(s=>{s.preventDefault(),i?.(s),h?.navigate(t,{state:e,replace:n})},[h,t,e,n,i]),className:r,...l,children:s})}function W({to:t,children:e,className:n,activeClassName:s,onClick:r,...l}){const p=c(u),d=i(()=>{if(!p)return!1;const e=p.location;return e===t||!("/"===t||!e.startsWith(`${t}/`))},[p?.location,t]);/* @__PURE__ */
5
+ return a("a",{href:t,onClick:o(e=>{e.preventDefault(),r?.(e),p?.navigate(t)},[p,t,r]),className:"function"==typeof n?n({isActive:d}):h(n,d&&s),...l,children:e})}function q({to:t,state:e,replace:s}){const r=w();return n(()=>{queueMicrotask(()=>{r(t,{state:e,replace:s})})},[r,t,e,s]),null}export{x as a,y as c,C as i,w as l,W as n,E as o,q as r,b as s,N as t,m as u};
@@ -1 +1 @@
1
- import{t as r}from"./qbHuxVSe.js";import{i as a}from"./TV5seYRS.js";var s=({className:s,rounded:e=!1,...o})=>/* @__PURE__ */r("div",{className:a("bg-border animate-pulse",e?"rounded-full":"rounded",s),...o});export{s as t};
1
+ import{t as r}from"./C3uDEVBt.js";import{i as a}from"./BItJQVdK.js";var s=({className:s,rounded:e=!1,...o})=>/* @__PURE__ */r("div",{className:a("bg-border animate-pulse",e?"rounded-full":"rounded",s),...o});export{s as t};
@@ -1,3 +1,3 @@
1
- import{t as e}from"./qbHuxVSe.js";function t({className:t}){/* @__PURE__ */
1
+ import{t as e}from"./C3uDEVBt.js";function t({className:t}){/* @__PURE__ */
2
2
  return e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:t,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */e("path",{fill:"currentColor",d:"M6 20q-.825 0-1.412-.587T4 18v-2q0-.425.288-.712T5 15t.713.288T6 16v2h12v-2q0-.425.288-.712T19 15t.713.288T20 16v2q0 .825-.587 1.413T18 20zm5-12.15L9.125 9.725q-.3.3-.712.288T7.7 9.7q-.275-.3-.288-.7t.288-.7l3.6-3.6q.15-.15.325-.212T12 4.425t.375.063t.325.212l3.6 3.6q.3.3.288.7t-.288.7q-.3.3-.712.313t-.713-.288L13 7.85V15q0 .425-.288.713T12 16t-.712-.288T11 15z"})})}function r(e,t){return new Promise(function(r,i){let o;return n(e).then(function(e){try{return o=e,r(new Blob([t.slice(0,2),o,t.slice(2)],{type:"image/jpeg"}))}catch(e){return i(e)}},i)})}var n=e=>new Promise((t,r)=>{const n=new FileReader;n.addEventListener("load",({target:{result:e}})=>{const n=new DataView(e);let i=0;if(65496!==n.getUint16(i))return r("not a valid JPEG");for(i+=2;;){const o=n.getUint16(i);if(65498===o)break;const a=n.getUint16(i+2);if(65505===o&&1165519206===n.getUint32(i+4)){const o=i+10;let f;switch(n.getUint16(o)){case 18761:f=!0;break;case 19789:f=!1;break;default:return r("TIFF header contains invalid endian")}if(42!==n.getUint16(o+2,f))return r("TIFF header contains invalid version");const s=n.getUint32(o+4,f),c=o+s+2+12*n.getUint16(o+s,f);for(let e=o+s+2;e<c;e+=12)if(274==n.getUint16(e,f)){if(3!==n.getUint16(e+2,f))return r("Orientation data type is invalid");if(1!==n.getUint32(e+4,f))return r("Orientation data count is invalid");n.setUint16(e+8,1,f);break}return t(e.slice(i,i+2+a))}i+=2+a}return t(new Blob)}),n.readAsArrayBuffer(e)}),i={},o={get exports(){return i},set exports(e){i=e}};!function(){var e,t,r={};o.exports=r,r.parse=function(e,t){for(var n=r.bin.readUshort,i=r.bin.readUint,o=0,a={},f=new Uint8Array(e),s=f.length-4;101010256!=i(f,s);)s--;o=s,o+=4;var c=n(f,o+=4);n(f,o+=2);var l=i(f,o+=2),u=i(f,o+=4);o+=4,o=u;for(var h=0;h<c;h++){i(f,o),o+=4,o+=4,o+=4,i(f,o+=4),l=i(f,o+=4);var d=i(f,o+=4),g=n(f,o+=4),A=n(f,o+2),w=n(f,o+4);o+=6;var p=i(f,o+=8);o+=4,o+=g+A+w,r._readLocal(f,p,a,l,d,t)}return a},r._readLocal=function(e,t,n,i,o,a){var f=r.bin.readUshort,s=r.bin.readUint;s(e,t),f(e,t+=4),f(e,t+=2);var c=f(e,t+=2);s(e,t+=2),s(e,t+=4),t+=4;var l=f(e,t+=8),u=f(e,t+=2);t+=2;var h=r.bin.readUTF8(e,t,l);if(t+=l,t+=u,a)n[h]={size:o,csize:i};else{var d=new Uint8Array(e.buffer,t);if(0==c)n[h]=new Uint8Array(d.buffer.slice(t,t+i));else{if(8!=c)throw"unknown compression method: "+c;var g=new Uint8Array(o);r.inflateRaw(d,g),n[h]=g}}},r.inflateRaw=function(e,t){return r.F.inflate(e,t)},r.inflate=function(e,t){return e[0],e[1],r.inflateRaw(new Uint8Array(e.buffer,e.byteOffset+2,e.length-6),t)},r.deflate=function(e,t){t??={level:6};var n=0,i=new Uint8Array(50+Math.floor(1.1*e.length));i[n]=120,i[n+1]=156,n+=2,n=r.F.deflateRaw(e,i,n,t.level);var o=r.adler(e,0,e.length);return i[n+0]=o>>>24&255,i[n+1]=o>>>16&255,i[n+2]=o>>>8&255,i[n+3]=o>>>0&255,new Uint8Array(i.buffer,0,n+4)},r.deflateRaw=function(e,t){t??={level:6};var n=new Uint8Array(50+Math.floor(1.1*e.length)),i=r.F.deflateRaw(e,n,i,t.level);return new Uint8Array(n.buffer,0,i)},r.encode=function(e,t){t??=!1;var n=0,i=r.bin.writeUint,o=r.bin.writeUshort,a={};for(var f in e){var s=!r._noNeed(f)&&!t,c=e[f],l=r.crc.crc(c,0,c.length);a[f]={cpr:s,usize:c.length,crc:l,file:s?r.deflateRaw(c):c}}for(var f in a)n+=a[f].file.length+30+46+2*r.bin.sizeUTF8(f);n+=22;var u=new Uint8Array(n),h=0,d=[];for(var f in a){var g=a[f];d.push(h),h=r._writeHeader(u,h,f,g,0)}var A=0,w=h;for(var f in a)g=a[f],d.push(h),h=r._writeHeader(u,h,f,g,1,d[A++]);var p=h-w;return i(u,h,101010256),h+=4,o(u,h+=4,A),o(u,h+=2,A),i(u,h+=2,p),i(u,h+=4,w),h+=4,h+=2,u.buffer},r._noNeed=function(e){var t=e.split(".").pop().toLowerCase();return-1!="png,jpg,jpeg,zip".indexOf(t)},r._writeHeader=function(e,t,n,i,o,a){var f=r.bin.writeUint,s=r.bin.writeUshort,c=i.file;return f(e,t,0==o?67324752:33639248),t+=4,1==o&&(t+=2),s(e,t,20),s(e,t+=2,0),s(e,t+=2,i.cpr?8:0),f(e,t+=2,0),f(e,t+=4,i.crc),f(e,t+=4,c.length),f(e,t+=4,i.usize),s(e,t+=4,r.bin.sizeUTF8(n)),s(e,t+=2,0),t+=2,1==o&&(t+=2,t+=2,f(e,t+=6,a),t+=4),t+=r.bin.writeUTF8(e,t,n),0==o&&(e.set(c,t),t+=c.length),t},r.crc={table:function(){for(var e=new Uint32Array(256),t=0;t<256;t++){for(var r=t,n=0;n<8;n++)1&r?r=3988292384^r>>>1:r>>>=1;e[t]=r}return e}(),update:function(e,t,n,i){for(var o=0;o<i;o++)e=r.crc.table[255&(e^t[n+o])]^e>>>8;return e},crc:function(e,t,n){return 4294967295^r.crc.update(4294967295,e,t,n)}},r.adler=function(e,t,r){for(var n=1,i=0,o=t,a=t+r;o<a;){for(var f=Math.min(o+5552,a);o<f;)i+=n+=e[o++];n%=65521,i%=65521}return i<<16|n},r.bin={readUshort:function(e,t){return e[t]|e[t+1]<<8},writeUshort:function(e,t,r){e[t]=255&r,e[t+1]=r>>8&255},readUint:function(e,t){return 16777216*e[t+3]+(e[t+2]<<16|e[t+1]<<8|e[t])},writeUint:function(e,t,r){e[t]=255&r,e[t+1]=r>>8&255,e[t+2]=r>>16&255,e[t+3]=r>>24&255},readASCII:function(e,t,r){for(var n="",i=0;i<r;i++)n+=String.fromCharCode(e[t+i]);return n},writeASCII:function(e,t,r){for(var n=0;n<r.length;n++)e[t+n]=r.charCodeAt(n)},pad:function(e){return e.length<2?"0"+e:e},readUTF8:function(e,t,n){for(var i,o="",a=0;a<n;a++)o+="%"+r.bin.pad(e[t+a].toString(16));try{i=decodeURIComponent(o)}catch(i){return r.bin.readASCII(e,t,n)}return i},writeUTF8:function(e,t,r){for(var n=r.length,i=0,o=0;o<n;o++){var a=r.charCodeAt(o);if(4294967168&a)if(4294965248&a)if(4294901760&a){if(4292870144&a)throw"e";e[t+i]=240|a>>18,e[t+i+1]=128|a>>12&63,e[t+i+2]=128|a>>6&63,e[t+i+3]=128|63&a,i+=4}else e[t+i]=224|a>>12,e[t+i+1]=128|a>>6&63,e[t+i+2]=128|63&a,i+=3;else e[t+i]=192|a>>6,e[t+i+1]=128|63&a,i+=2;else e[t+i]=a,i++}return i},sizeUTF8:function(e){for(var t=e.length,r=0,n=0;n<t;n++){var i=e.charCodeAt(n);if(4294967168&i)if(4294965248&i)if(4294901760&i){if(4292870144&i)throw"e";r+=4}else r+=3;else r+=2;else r++}return r}},r.F={},r.F.deflateRaw=function(e,t,n,i){var o=[[0,0,0,0,0],[4,4,8,4,0],[4,5,16,8,0],[4,6,16,16,0],[4,10,16,32,0],[8,16,32,32,0],[8,16,128,128,0],[8,32,128,256,0],[32,128,258,1024,1],[32,258,258,4096,1]][i],a=r.F.U,f=r.F._goodIndex;r.F._hash;var s=r.F._putsE,c=0,l=n<<3,u=0,h=e.length;if(0==i){for(;c<h;)s(t,l,c+(E=Math.min(65535,h-c))==h?1:0),l=r.F._copyExact(e,c,E,t,l+8),c+=E;return l>>>3}var d=a.lits,g=a.strt,A=a.prev,w=0,p=0,v=0,m=0,b=0,y=0;for(h>2&&(g[y=r.F._hash(e,0)]=0),c=0;c<h;c++){if(b=y,c+1<h-2){y=r.F._hash(e,c+1);var U=c+1&32767;A[U]=g[y],g[y]=U}if(u<=c){(w>14e3||p>26697)&&h-c>100&&(u<c&&(d[w]=c-u,w+=2,u=c),l=r.F._writeBlock(c==h-1||u==h?1:0,d,w,m,e,v,c-v,t,l),w=p=m=0,v=c);var F=0;c<h-2&&(F=r.F._bestMatch(e,c,A,b,Math.min(o[2],h-c),o[3]));var E=F>>>16,_=65535&F;if(0!=F){_=65535&F;var C=f(E=F>>>16,a.of0);a.lhst[257+C]++;var T=f(_,a.df0);a.dhst[T]++,m+=a.exb[C]+a.dxb[T],d[w]=E<<23|c-u,d[w+1]=_<<16|C<<8|T,w+=2,u=c+E}else a.lhst[e[c]]++;p++}}for(v==c&&0!=e.length||(u<c&&(d[w]=c-u,w+=2,u=c),l=r.F._writeBlock(1,d,w,m,e,v,c-v,t,l),w=0,p=0,w=p=m=0,v=c);7&l;)l++;return l>>>3},r.F._bestMatch=function(e,t,n,i,o,a){var f=32767&t,s=n[f],c=f-s+32768&32767;if(s==f||i!=r.F._hash(e,t-c))return 0;for(var l=0,u=0,h=Math.min(32767,t);c<=h&&0!=--a&&s!=f;){if(0==l||e[t+l]==e[t+l-c]){var d=r.F._howLong(e,t,c);if(d>l){if(u=c,(l=d)>=o)break;c+2<d&&(d=c+2);for(var g=0,A=0;A<d-2;A++){var w=t-c+A+32768&32767,p=w-n[w]+32768&32767;p>g&&(g=p,s=w)}}}c+=(f=s)-(s=n[f])+32768&32767}return l<<16|u},r.F._howLong=function(e,t,r){if(e[t]!=e[t-r]||e[t+1]!=e[t+1-r]||e[t+2]!=e[t+2-r])return 0;var n=t,i=Math.min(e.length,t+258);for(t+=3;t<i&&e[t]==e[t-r];)t++;return t-n},r.F._hash=function(e,t){return(e[t]<<8|e[t+1])+(e[t+2]<<4)&65535},r.saved=0,r.F._writeBlock=function(e,t,n,i,o,a,f,s,c){var l,u,h,d,g,A,w,p,v,m=r.F.U,b=r.F._putsF,y=r.F._putsE;m.lhst[256]++,u=(l=r.F.getTrees())[0],h=l[1],d=l[2],g=l[3],A=l[4],w=l[5],p=l[6],v=l[7];var U=32+(c+3&7?8-(c+3&7):0)+(f<<3),F=i+r.F.contSize(m.fltree,m.lhst)+r.F.contSize(m.fdtree,m.dhst),E=i+r.F.contSize(m.ltree,m.lhst)+r.F.contSize(m.dtree,m.dhst);E+=14+3*w+r.F.contSize(m.itree,m.ihst)+(2*m.ihst[16]+3*m.ihst[17]+7*m.ihst[18]);for(var _=0;_<286;_++)m.lhst[_]=0;for(_=0;_<30;_++)m.dhst[_]=0;for(_=0;_<19;_++)m.ihst[_]=0;var C=U<F&&U<E?0:F<E?1:2;if(b(s,c,e),b(s,c+1,C),c+=3,0==C){for(;7&c;)c++;c=r.F._copyExact(o,a,f,s,c)}else{var T,B;if(1==C&&(T=m.fltree,B=m.fdtree),2==C){r.F.makeCodes(m.ltree,u),r.F.revCodes(m.ltree,u),r.F.makeCodes(m.dtree,h),r.F.revCodes(m.dtree,h),r.F.makeCodes(m.itree,d),r.F.revCodes(m.itree,d),T=m.ltree,B=m.dtree,y(s,c,g-257),y(s,c+=5,A-1),y(s,c+=5,w-4),c+=4;for(var I=0;I<w;I++)y(s,c+3*I,m.itree[1+(m.ordr[I]<<1)]);c+=3*w,c=r.F._codeTiny(p,m.itree,s,c),c=r.F._codeTiny(v,m.itree,s,c)}for(var M=a,x=0;x<n;x+=2){for(var R=t[x],S=R>>>23,Q=M+(8388607&R);M<Q;)c=r.F._writeLit(o[M++],T,s,c);if(0!=S){var H=t[x+1],k=H>>16,O=H>>8&255,L=255&H;y(s,c=r.F._writeLit(257+O,T,s,c),S-m.of0[O]),c+=m.exb[O],b(s,c=r.F._writeLit(L,B,s,c),k-m.df0[L]),c+=m.dxb[L],M+=S}}c=r.F._writeLit(256,T,s,c)}return c},r.F._copyExact=function(e,t,r,n,i){var o=i>>>3;return n[o]=r,n[o+1]=r>>>8,n[o+2]=255-n[o],n[o+3]=255-n[o+1],o+=4,n.set(new Uint8Array(e.buffer,t,r),o),i+(r+4<<3)},r.F.getTrees=function(){for(var e=r.F.U,t=r.F._hufTree(e.lhst,e.ltree,15),n=r.F._hufTree(e.dhst,e.dtree,15),i=[],o=r.F._lenCodes(e.ltree,i),a=[],f=r.F._lenCodes(e.dtree,a),s=0;s<i.length;s+=2)e.ihst[i[s]]++;for(s=0;s<a.length;s+=2)e.ihst[a[s]]++;for(var c=r.F._hufTree(e.ihst,e.itree,7),l=19;l>4&&0==e.itree[1+(e.ordr[l-1]<<1)];)l--;return[t,n,c,o,f,l,i,a]},r.F.getSecond=function(e){for(var t=[],r=0;r<e.length;r+=2)t.push(e[r+1]);return t},r.F.nonZero=function(e){for(var t="",r=0;r<e.length;r+=2)0!=e[r+1]&&(t+=(r>>1)+",");return t},r.F.contSize=function(e,t){for(var r=0,n=0;n<t.length;n++)r+=t[n]*e[1+(n<<1)];return r},r.F._codeTiny=function(e,t,n,i){for(var o=0;o<e.length;o+=2){var a=e[o],f=e[o+1];i=r.F._writeLit(a,t,n,i);var s=16==a?2:17==a?3:7;a>15&&(r.F._putsE(n,i,f,s),i+=s)}return i},r.F._lenCodes=function(e,t){for(var r=e.length;2!=r&&0==e[r-1];)r-=2;for(var n=0;n<r;n+=2){var i=e[n+1],o=n+3<r?e[n+3]:-1,a=n+5<r?e[n+5]:-1,f=0==n?-1:e[n-1];if(0==i&&o==i&&a==i){for(var s=n+5;s+2<r&&e[s+2]==i;)s+=2;(c=Math.min(s+1-n>>>1,138))<11?t.push(17,c-3):t.push(18,c-11),n+=2*c-2}else if(i==f&&o==i&&a==i){for(s=n+5;s+2<r&&e[s+2]==i;)s+=2;var c=Math.min(s+1-n>>>1,6);t.push(16,c-3),n+=2*c-2}else t.push(i,0)}return r>>>1},r.F._hufTree=function(e,t,n){var i=[],o=e.length,a=t.length,f=0;for(f=0;f<a;f+=2)t[f]=0,t[f+1]=0;for(f=0;f<o;f++)0!=e[f]&&i.push({lit:f,f:e[f]});var s=i.length,c=i.slice(0);if(0==s)return 0;if(1==s){var l=i[0].lit;return c=0==l?1:0,t[1+(l<<1)]=1,t[1+(c<<1)]=1,1}i.sort(function(e,t){return e.f-t.f});var u=i[0],h=i[1],d=0,g=1,A=2;for(i[0]={lit:-1,f:u.f+h.f,l:u,r:h,d:0};g!=s-1;)u=d!=g&&(A==s||i[d].f<i[A].f)?i[d++]:i[A++],h=d!=g&&(A==s||i[d].f<i[A].f)?i[d++]:i[A++],i[g++]={lit:-1,f:u.f+h.f,l:u,r:h};var w=r.F.setDepth(i[g-1],0);for(w>n&&(r.F.restrictDepth(c,n,w),w=n),f=0;f<s;f++)t[1+(c[f].lit<<1)]=c[f].d;return w},r.F.setDepth=function(e,t){return-1!=e.lit?(e.d=t,t):Math.max(r.F.setDepth(e.l,t+1),r.F.setDepth(e.r,t+1))},r.F.restrictDepth=function(e,t,r){var n=0,i=1<<r-t,o=0;for(e.sort(function(e,t){return t.d==e.d?e.f-t.f:t.d-e.d}),n=0;n<e.length&&e[n].d>t;n++){var a=e[n].d;e[n].d=t,o+=i-(1<<r-a)}for(o>>>=r-t;o>0;)(a=e[n].d)<t?(e[n].d++,o-=1<<t-a-1):n++;for(;n>=0;n--)e[n].d==t&&o<0&&(e[n].d--,o++);0!=o&&console.log("debt left")},r.F._goodIndex=function(e,t){var r=0;return t[16|r]<=e&&(r|=16),t[8|r]<=e&&(r|=8),t[4|r]<=e&&(r|=4),t[2|r]<=e&&(r|=2),t[1|r]<=e&&(r|=1),r},r.F._writeLit=function(e,t,n,i){return r.F._putsF(n,i,t[e<<1]),i+t[1+(e<<1)]},r.F.inflate=function(e,t){var n=Uint8Array;if(3==e[0]&&0==e[1])return t||new n(0);var i=r.F,o=i._bitsF,a=i._bitsE,f=i._decodeTiny,s=i.makeCodes,c=i.codes2map,l=i._get17,u=i.U,h=null==t;h&&(t=new n(e.length>>>2<<3));for(var d,g,A=0,w=0,p=0,v=0,m=0,b=0,y=0,U=0,F=0;0==A;)if(A=o(e,F,1),w=o(e,F+1,2),F+=3,0!=w){if(h&&(t=r.F._check(t,U+(1<<17))),1==w&&(d=u.flmap,g=u.fdmap,b=511,y=31),2==w){p=a(e,F,5)+257,v=a(e,F+5,5)+1,m=a(e,F+10,4)+4,F+=14;for(var E=0;E<38;E+=2)u.itree[E]=0,u.itree[E+1]=0;var _=1;for(E=0;E<m;E++){var C=a(e,F+3*E,3);u.itree[1+(u.ordr[E]<<1)]=C,C>_&&(_=C)}F+=3*m,s(u.itree,_),c(u.itree,_,u.imap),d=u.lmap,g=u.dmap,F=f(u.imap,(1<<_)-1,p+v,e,F,u.ttree);var T=i._copyOut(u.ttree,0,p,u.ltree);b=(1<<T)-1;var B=i._copyOut(u.ttree,p,v,u.dtree);y=(1<<B)-1,s(u.ltree,T),c(u.ltree,T,d),s(u.dtree,B),c(u.dtree,B,g)}for(;;){var I=d[l(e,F)&b];F+=15&I;var M=I>>>4;if(M>>>8==0)t[U++]=M;else{if(256==M)break;var x=U+M-254;if(M>264){var R=u.ldef[M-257];x=U+(R>>>3)+a(e,F,7&R),F+=7&R}var S=g[l(e,F)&y];F+=15&S;var Q=S>>>4,H=u.ddef[Q],k=(H>>>4)+o(e,F,15&H);for(F+=15&H,h&&(t=r.F._check(t,U+(1<<17)));U<x;)t[U]=t[U++-k],t[U]=t[U++-k],t[U]=t[U++-k],t[U]=t[U++-k];U=x}}}else{7&F&&(F+=8-(7&F));var O=4+(F>>>3),L=e[O-4]|e[O-3]<<8;h&&(t=r.F._check(t,U+L)),t.set(new n(e.buffer,e.byteOffset+O,L),U),F=O+L<<3,U+=L}return t.length==U?t:t.slice(0,U)},r.F._check=function(e,t){var r=e.length;if(t<=r)return e;var n=new Uint8Array(Math.max(r<<1,t));return n.set(e,0),n},r.F._decodeTiny=function(e,t,n,i,o,a){for(var f=r.F._bitsE,s=r.F._get17,c=0;c<n;){var l=e[s(i,o)&t];o+=15&l;var u=l>>>4;if(u<=15)a[c]=u,c++;else{var h=0,d=0;16==u?(d=3+f(i,o,2),o+=2,h=a[c-1]):17==u?(d=3+f(i,o,3),o+=3):18==u&&(d=11+f(i,o,7),o+=7);for(var g=c+d;c<g;)a[c]=h,c++}}return o},r.F._copyOut=function(e,t,r,n){for(var i=0,o=0,a=n.length>>>1;o<r;){var f=e[o+t];n[o<<1]=0,n[1+(o<<1)]=f,f>i&&(i=f),o++}for(;o<a;)n[o<<1]=0,n[1+(o<<1)]=0,o++;return i},r.F.makeCodes=function(e,t){for(var n,i,o,a,f=r.F.U,s=e.length,c=f.bl_count,l=0;l<=t;l++)c[l]=0;for(l=1;l<s;l+=2)c[e[l]]++;var u=f.next_code;for(n=0,c[0]=0,i=1;i<=t;i++)n=n+c[i-1]<<1,u[i]=n;for(o=0;o<s;o+=2)0!=(a=e[o+1])&&(e[o]=u[a],u[a]++)},r.F.codes2map=function(e,t,n){for(var i=e.length,o=r.F.U.rev15,a=0;a<i;a+=2)if(0!=e[a+1])for(var f=a>>1,s=e[a+1],c=f<<4|s,l=t-s,u=e[a]<<l,h=u+(1<<l);u!=h;)n[o[u]>>>15-t]=c,u++},r.F.revCodes=function(e,t){for(var n=r.F.U.rev15,i=15-t,o=0;o<e.length;o+=2)e[o]=n[e[o]<<t-e[o+1]]>>>i},r.F._putsE=function(e,t,r){r<<=7&t;var n=t>>>3;e[n]|=r,e[n+1]|=r>>>8},r.F._putsF=function(e,t,r){r<<=7&t;var n=t>>>3;e[n]|=r,e[n+1]|=r>>>8,e[n+2]|=r>>>16},r.F._bitsE=function(e,t,r){return(e[t>>>3]|e[1+(t>>>3)]<<8)>>>(7&t)&(1<<r)-1},r.F._bitsF=function(e,t,r){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16)>>>(7&t)&(1<<r)-1},r.F._get17=function(e,t){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16)>>>(7&t)},r.F._get25=function(e,t){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16|e[3+(t>>>3)]<<24)>>>(7&t)},r.F.U=(e=Uint16Array,t=Uint32Array,{next_code:new e(16),bl_count:new e(16),ordr:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],of0:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],exb:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],ldef:new e(32),df0:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],dxb:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],ddef:new t(32),flmap:new e(512),fltree:[],fdmap:new e(32),fdtree:[],lmap:new e(32768),ltree:[],ttree:[],dmap:new e(32768),dtree:[],imap:new e(512),itree:[],rev15:new e(32768),lhst:new t(286),dhst:new t(30),ihst:new t(19),lits:new t(15e3),strt:new e(65536),prev:new e(32768)}),function(){for(var e=r.F.U,t=0;t<32768;t++){var n=t;n=(4278255360&(n=(4042322160&(n=(3435973836&(n=(2863311530&n)>>>1|(1431655765&n)<<1))>>>2|(858993459&n)<<2))>>>4|(252645135&n)<<4))>>>8|(16711935&n)<<8,e.rev15[t]=(n>>>16|n<<16)>>>17}function i(e,t,r){for(;0!=t--;)e.push(0,r)}for(t=0;t<32;t++)e.ldef[t]=e.of0[t]<<3|e.exb[t],e.ddef[t]=e.df0[t]<<4|e.dxb[t];i(e.fltree,144,8),i(e.fltree,112,9),i(e.fltree,24,7),i(e.fltree,8,8),r.F.makeCodes(e.fltree,9),r.F.codes2map(e.fltree,9,e.flmap),r.F.revCodes(e.fltree,9),i(e.fdtree,32,5),r.F.makeCodes(e.fdtree,5),r.F.codes2map(e.fdtree,5,e.fdmap),r.F.revCodes(e.fdtree,5),i(e.itree,19,0),i(e.ltree,286,0),i(e.dtree,30,0),i(e.ttree,320,0)}()}();var a=function(e,t){return t.forEach(function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach(function(r){if("default"!==r&&!(r in e)){var n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:function(){return t[r]}})}})}),Object.freeze(e)}({__proto__:null,default:i},[i]),f=function(){var e={nextZero(e,t){for(;0!=e[t];)t++;return t},readUshort:(e,t)=>e[t]<<8|e[t+1],writeUshort(e,t,r){e[t]=r>>8&255,e[t+1]=255&r},readUint:(e,t)=>16777216*e[t]+(e[t+1]<<16|e[t+2]<<8|e[t+3]),writeUint(e,t,r){e[t]=r>>24&255,e[t+1]=r>>16&255,e[t+2]=r>>8&255,e[t+3]=255&r},readASCII(e,t,r){let n="";for(let i=0;i<r;i++)n+=String.fromCharCode(e[t+i]);return n},writeASCII(e,t,r){for(let n=0;n<r.length;n++)e[t+n]=r.charCodeAt(n)},readBytes(e,t,r){const n=[];for(let i=0;i<r;i++)n.push(e[t+i]);return n},pad:e=>e.length<2?`0${e}`:e,readUTF8(t,r,n){let i,o="";for(let a=0;a<n;a++)o+=`%${e.pad(t[r+a].toString(16))}`;try{i=decodeURIComponent(o)}catch(i){return e.readASCII(t,r,n)}return i}};function t(t,r,n,i){const a=r*n,f=o(i),s=Math.ceil(r*f/8),c=new Uint8Array(4*a),l=new Uint32Array(c.buffer),{ctype:u}=i,{depth:h}=i,d=e.readUshort;if(6==u){const e=a<<2;if(8==h)for(var g=0;g<e;g+=4)c[g]=t[g],c[g+1]=t[g+1],c[g+2]=t[g+2],c[g+3]=t[g+3];if(16==h)for(g=0;g<e;g++)c[g]=t[g<<1]}else if(2==u){const e=i.tabs.tRNS;if(null==e){if(8==h)for(g=0;g<a;g++){var A=3*g;l[g]=255<<24|t[A+2]<<16|t[A+1]<<8|t[A]}if(16==h)for(g=0;g<a;g++)A=6*g,l[g]=255<<24|t[A+4]<<16|t[A+2]<<8|t[A]}else{var w=e[0];const r=e[1],n=e[2];if(8==h)for(g=0;g<a;g++){var p=g<<2;A=3*g,l[g]=255<<24|t[A+2]<<16|t[A+1]<<8|t[A],t[A]==w&&t[A+1]==r&&t[A+2]==n&&(c[p+3]=0)}if(16==h)for(g=0;g<a;g++)p=g<<2,A=6*g,l[g]=255<<24|t[A+4]<<16|t[A+2]<<8|t[A],d(t,A)==w&&d(t,A+2)==r&&d(t,A+4)==n&&(c[p+3]=0)}}else if(3==u){const e=i.tabs.PLTE,o=i.tabs.tRNS,f=o?o.length:0;if(1==h)for(var v=0;v<n;v++){var m=v*s,b=v*r;for(g=0;g<r;g++){p=b+g<<2;var y=3*(U=t[m+(g>>3)]>>7-(7&g)&1);c[p]=e[y],c[p+1]=e[y+1],c[p+2]=e[y+2],c[p+3]=U<f?o[U]:255}}if(2==h)for(v=0;v<n;v++)for(m=v*s,b=v*r,g=0;g<r;g++)p=b+g<<2,y=3*(U=t[m+(g>>2)]>>6-((3&g)<<1)&3),c[p]=e[y],c[p+1]=e[y+1],c[p+2]=e[y+2],c[p+3]=U<f?o[U]:255;if(4==h)for(v=0;v<n;v++)for(m=v*s,b=v*r,g=0;g<r;g++)p=b+g<<2,y=3*(U=t[m+(g>>1)]>>4-((1&g)<<2)&15),c[p]=e[y],c[p+1]=e[y+1],c[p+2]=e[y+2],c[p+3]=U<f?o[U]:255;if(8==h)for(g=0;g<a;g++){var U;p=g<<2,y=3*(U=t[g]),c[p]=e[y],c[p+1]=e[y+1],c[p+2]=e[y+2],c[p+3]=U<f?o[U]:255}}else if(4==u){if(8==h)for(g=0;g<a;g++){p=g<<2;var F=t[E=g<<1];c[p]=F,c[p+1]=F,c[p+2]=F,c[p+3]=t[E+1]}if(16==h)for(g=0;g<a;g++){var E;p=g<<2,F=t[E=g<<2],c[p]=F,c[p+1]=F,c[p+2]=F,c[p+3]=t[E+2]}}else if(0==u)for(w=i.tabs.tRNS?i.tabs.tRNS:-1,v=0;v<n;v++){const e=v*s,n=v*r;if(1==h)for(var _=0;_<r;_++){var C=(F=255*(t[e+(_>>>3)]>>>7-(7&_)&1))==255*w?0:255;l[n+_]=C<<24|F<<16|F<<8|F}else if(2==h)for(_=0;_<r;_++)C=(F=85*(t[e+(_>>>2)]>>>6-((3&_)<<1)&3))==85*w?0:255,l[n+_]=C<<24|F<<16|F<<8|F;else if(4==h)for(_=0;_<r;_++)C=(F=17*(t[e+(_>>>1)]>>>4-((1&_)<<2)&15))==17*w?0:255,l[n+_]=C<<24|F<<16|F<<8|F;else if(8==h)for(_=0;_<r;_++)C=(F=t[e+_])==w?0:255,l[n+_]=C<<24|F<<16|F<<8|F;else if(16==h)for(_=0;_<r;_++)F=t[e+(_<<1)],C=d(t,e+(_<<1))==w?0:255,l[n+_]=C<<24|F<<16|F<<8|F}return c}function r(e,t,r,f){const s=o(e),c=Math.ceil(r*s/8),l=new Uint8Array((c+1+e.interlace)*f);return t=e.tabs.CgBI?i(t,l):n(t,l),0==e.interlace?t=a(t,e,0,r,f):1==e.interlace&&(t=function(e,t){const r=t.width,n=t.height,i=o(t),f=i>>3,s=Math.ceil(r*i/8),c=new Uint8Array(n*s);let l=0;const u=[0,0,4,0,2,0,1],h=[0,4,0,2,0,1,0],d=[8,8,8,4,4,2,2],g=[8,8,4,4,2,2,1];let A=0;for(;A<7;){const o=d[A],p=g[A];let v=0,m=0,b=u[A];for(;b<n;)b+=o,m++;let y=h[A];for(;y<r;)y+=p,v++;const U=Math.ceil(v*i/8);a(e,t,l,v,m);let F=0,E=u[A];for(;E<n;){let t=h[A],n=l+F*U<<3;for(;t<r;){var w;if(1==i&&(w=(w=e[n>>3])>>7-(7&n)&1,c[E*s+(t>>3)]|=w<<7-(7&t)),2==i&&(w=(w=e[n>>3])>>6-(7&n)&3,c[E*s+(t>>2)]|=w<<6-((3&t)<<1)),4==i&&(w=(w=e[n>>3])>>4-(7&n)&15,c[E*s+(t>>1)]|=w<<4-((1&t)<<2)),i>=8){const r=E*s+t*f;for(let t=0;t<f;t++)c[r+t]=e[(n>>3)+t]}n+=i,t+=p}F++,E+=o}v*m!=0&&(l+=m*(1+U)),A+=1}return c}(t,e)),t}function n(e,t){return i(new Uint8Array(e.buffer,2,e.length-6),t)}var i=function(){const e={H:{}};return e.H.N=function(t,r){const n=Uint8Array;let i,o,a=0,f=0,s=0,c=0,l=0,u=0,h=0,d=0,g=0;if(3==t[0]&&0==t[1])return r||new n(0);const A=e.H,w=A.b,p=A.e,v=A.R,m=A.n,b=A.A,y=A.Z,U=A.m,F=null==r;for(F&&(r=new n(t.length>>>2<<5));0==a;)if(a=w(t,g,1),f=w(t,g+1,2),g+=3,0!=f){if(F&&(r=e.H.W(r,d+(1<<17))),1==f&&(i=U.J,o=U.h,u=511,h=31),2==f){s=p(t,g,5)+257,c=p(t,g+5,5)+1,l=p(t,g+10,4)+4,g+=14;let e=1;for(var E=0;E<38;E+=2)U.Q[E]=0,U.Q[E+1]=0;for(E=0;E<l;E++){const r=p(t,g+3*E,3);U.Q[1+(U.X[E]<<1)]=r,r>e&&(e=r)}g+=3*l,m(U.Q,e),b(U.Q,e,U.u),i=U.w,o=U.d,g=v(U.u,(1<<e)-1,s+c,t,g,U.v);const r=A.V(U.v,0,s,U.C);u=(1<<r)-1;const n=A.V(U.v,s,c,U.D);h=(1<<n)-1,m(U.C,r),b(U.C,r,i),m(U.D,n),b(U.D,n,o)}for(;;){const e=i[y(t,g)&u];g+=15&e;const n=e>>>4;if(n>>>8==0)r[d++]=n;else{if(256==n)break;{let e=d+n-254;if(n>264){const r=U.q[n-257];e=d+(r>>>3)+p(t,g,7&r),g+=7&r}const i=o[y(t,g)&h];g+=15&i;const a=i>>>4,f=U.c[a],s=(f>>>4)+w(t,g,15&f);for(g+=15&f;d<e;)r[d]=r[d++-s],r[d]=r[d++-s],r[d]=r[d++-s],r[d]=r[d++-s];d=e}}}}else{7&g&&(g+=8-(7&g));const i=4+(g>>>3),o=t[i-4]|t[i-3]<<8;F&&(r=e.H.W(r,d+o)),r.set(new n(t.buffer,t.byteOffset+i,o),d),g=i+o<<3,d+=o}return r.length==d?r:r.slice(0,d)},e.H.W=function(e,t){const r=e.length;if(t<=r)return e;const n=new Uint8Array(r<<1);return n.set(e,0),n},e.H.R=function(t,r,n,i,o,a){const f=e.H.e,s=e.H.Z;let c=0;for(;c<n;){const e=t[s(i,o)&r];o+=15&e;const n=e>>>4;if(n<=15)a[c]=n,c++;else{let e=0,t=0;16==n?(t=3+f(i,o,2),o+=2,e=a[c-1]):17==n?(t=3+f(i,o,3),o+=3):18==n&&(t=11+f(i,o,7),o+=7);const r=c+t;for(;c<r;)a[c]=e,c++}}return o},e.H.V=function(e,t,r,n){let i=0,o=0;const a=n.length>>>1;for(;o<r;){const r=e[o+t];n[o<<1]=0,n[1+(o<<1)]=r,r>i&&(i=r),o++}for(;o<a;)n[o<<1]=0,n[1+(o<<1)]=0,o++;return i},e.H.n=function(t,r){const n=e.H.m,i=t.length;let o,a,f,s;const c=n.j;for(var l=0;l<=r;l++)c[l]=0;for(l=1;l<i;l+=2)c[t[l]]++;const u=n.K;for(o=0,c[0]=0,a=1;a<=r;a++)o=o+c[a-1]<<1,u[a]=o;for(f=0;f<i;f+=2)s=t[f+1],0!=s&&(t[f]=u[s],u[s]++)},e.H.A=function(t,r,n){const i=t.length,o=e.H.m.r;for(let e=0;e<i;e+=2)if(0!=t[e+1]){const i=e>>1,a=t[e+1],f=i<<4|a,s=r-a;let c=t[e]<<s;const l=c+(1<<s);for(;c!=l;)n[o[c]>>>15-r]=f,c++}},e.H.l=function(t,r){const n=e.H.m.r,i=15-r;for(let e=0;e<t.length;e+=2)t[e]=n[t[e]<<r-t[e+1]]>>>i},e.H.M=function(e,t,r){r<<=7&t;const n=t>>>3;e[n]|=r,e[n+1]|=r>>>8},e.H.I=function(e,t,r){r<<=7&t;const n=t>>>3;e[n]|=r,e[n+1]|=r>>>8,e[n+2]|=r>>>16},e.H.e=function(e,t,r){return(e[t>>>3]|e[1+(t>>>3)]<<8)>>>(7&t)&(1<<r)-1},e.H.b=function(e,t,r){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16)>>>(7&t)&(1<<r)-1},e.H.Z=function(e,t){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16)>>>(7&t)},e.H.i=function(e,t){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16|e[3+(t>>>3)]<<24)>>>(7&t)},e.H.m=function(){const e=Uint16Array,t=Uint32Array;return{K:new e(16),j:new e(16),X:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],S:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],T:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],q:new e(32),p:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],z:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],c:new t(32),J:new e(512),_:[],h:new e(32),$:[],w:new e(32768),C:[],v:[],d:new e(32768),D:[],u:new e(512),Q:[],r:new e(32768),s:new t(286),Y:new t(30),a:new t(19),t:new t(15e3),k:new e(65536),g:new e(32768)}}(),function(){const t=e.H.m;for(var r=0;r<32768;r++){let e=r;e=(2863311530&e)>>>1|(1431655765&e)<<1,e=(3435973836&e)>>>2|(858993459&e)<<2,e=(4042322160&e)>>>4|(252645135&e)<<4,e=(4278255360&e)>>>8|(16711935&e)<<8,t.r[r]=(e>>>16|e<<16)>>>17}function n(e,t,r){for(;0!=t--;)e.push(0,r)}for(r=0;r<32;r++)t.q[r]=t.S[r]<<3|t.T[r],t.c[r]=t.p[r]<<4|t.z[r];n(t._,144,8),n(t._,112,9),n(t._,24,7),n(t._,8,8),e.H.n(t._,9),e.H.A(t._,9,t.J),e.H.l(t._,9),n(t.$,32,5),e.H.n(t.$,5),e.H.A(t.$,5,t.h),e.H.l(t.$,5),n(t.Q,19,0),n(t.C,286,0),n(t.D,30,0),n(t.v,320,0)}(),e.H.N}();function o(e){return[1,null,3,1,2,null,4][e.ctype]*e.depth}function a(e,t,r,n,i){let a=o(t);const s=Math.ceil(n*a/8);let c,l;a=Math.ceil(a/8);let u=e[r],h=0;if(u>1&&(e[r]=[0,0,1][u-2]),3==u)for(h=a;h<s;h++)e[h+1]=e[h+1]+(e[h+1-a]>>>1)&255;for(let o=0;o<i;o++)if(c=r+o*s,l=c+o+1,u=e[l-1],h=0,0==u)for(;h<s;h++)e[c+h]=e[l+h];else if(1==u){for(;h<a;h++)e[c+h]=e[l+h];for(;h<s;h++)e[c+h]=e[l+h]+e[c+h-a]}else if(2==u)for(;h<s;h++)e[c+h]=e[l+h]+e[c+h-s];else if(3==u){for(;h<a;h++)e[c+h]=e[l+h]+(e[c+h-s]>>>1);for(;h<s;h++)e[c+h]=e[l+h]+(e[c+h-s]+e[c+h-a]>>>1)}else{for(;h<a;h++)e[c+h]=e[l+h]+f(0,e[c+h-s],0);for(;h<s;h++)e[c+h]=e[l+h]+f(e[c+h-a],e[c+h-s],e[c+h-a-s])}return e}function f(e,t,r){const n=e+t-r,i=n-e,o=n-t,a=n-r;return i*i<=o*o&&i*i<=a*a?e:o*o<=a*a?t:r}function s(t,r,n){n.width=e.readUint(t,r),r+=4,n.height=e.readUint(t,r),r+=4,n.depth=t[r],r++,n.ctype=t[r],r++,n.compress=t[r],r++,n.filter=t[r],r++,n.interlace=t[r],r++}function c(e,t,r,n,i,o,a,f,s){const c=Math.min(t,i),l=Math.min(r,o);let u=0,h=0;for(let y=0;y<l;y++)for(let r=0;r<c;r++)if(a>=0&&f>=0?(u=y*t+r<<2,h=(f+y)*i+a+r<<2):(u=(-f+y)*t-a+r<<2,h=y*i+r<<2),0==s)n[h]=e[u],n[h+1]=e[u+1],n[h+2]=e[u+2],n[h+3]=e[u+3];else if(1==s){var d=e[u+3]*(1/255),g=e[u]*d,A=e[u+1]*d,w=e[u+2]*d,p=n[h+3]*(1/255),v=n[h]*p,m=n[h+1]*p,b=n[h+2]*p;const t=1-d,r=d+p*t,i=0==r?0:1/r;n[h+3]=255*r,n[h+0]=(g+v*t)*i,n[h+1]=(A+m*t)*i,n[h+2]=(w+b*t)*i}else if(2==s)d=e[u+3],g=e[u],A=e[u+1],w=e[u+2],p=n[h+3],v=n[h],m=n[h+1],b=n[h+2],d==p&&g==v&&A==m&&w==b?(n[h]=0,n[h+1]=0,n[h+2]=0,n[h+3]=0):(n[h]=g,n[h+1]=A,n[h+2]=w,n[h+3]=d);else if(3==s){if(d=e[u+3],g=e[u],A=e[u+1],w=e[u+2],p=n[h+3],v=n[h],m=n[h+1],b=n[h+2],d==p&&g==v&&A==m&&w==b)continue;if(d<220&&p>20)return!1}return!0}return{decode:function(t){const o=new Uint8Array(t);let a=8;const f=e,c=f.readUshort,l=f.readUint,u={tabs:{},frames:[]},h=new Uint8Array(o.length);let d,g=0,A=0;const w=[137,80,78,71,13,10,26,10];for(var p=0;p<8;p++)if(o[p]!=w[p])throw"The input is not a PNG file!";for(;a<o.length;){const t=f.readUint(o,a);a+=4;const w=f.readASCII(o,a,4);if(a+=4,"IHDR"==w)s(o,a,u);else if("iCCP"==w){for(var v=a;0!=o[v];)v++;f.readASCII(o,a,v-a),o[v+1];const r=o.slice(v+2,a+t);let s=null;try{s=n(r)}catch(e){s=i(r)}u.tabs[w]=s}else if("CgBI"==w)u.tabs[w]=o.slice(a,a+4);else if("IDAT"==w){for(p=0;p<t;p++)h[g+p]=o[a+p];g+=t}else if("acTL"==w)u.tabs[w]={num_frames:l(o,a),num_plays:l(o,a+4)},d=new Uint8Array(o.length);else if("fcTL"==w){0!=A&&((E=u.frames[u.frames.length-1]).data=r(u,d.slice(0,A),E.rect.width,E.rect.height),A=0);const e={x:l(o,a+12),y:l(o,a+16),width:l(o,a+4),height:l(o,a+8)};let t=c(o,a+22);t=c(o,a+20)/(0==t?100:t);const n={rect:e,delay:Math.round(1e3*t),dispose:o[a+24],blend:o[a+25]};u.frames.push(n)}else if("fdAT"==w){for(p=0;p<t-4;p++)d[A+p]=o[a+p+4];A+=t-4}else if("pHYs"==w)u.tabs[w]=[f.readUint(o,a),f.readUint(o,a+4),o[a+8]];else if("cHRM"==w)for(u.tabs[w]=[],p=0;p<8;p++)u.tabs[w].push(f.readUint(o,a+4*p));else if("tEXt"==w||"zTXt"==w){u.tabs[w]??(u.tabs[w]={});var m=f.nextZero(o,a),b=f.readASCII(o,a,m-a),y=a+t-m-1;if("tEXt"==w)F=f.readASCII(o,m+1,y);else{var U=n(o.slice(m+2,m+2+y));F=f.readUTF8(U,0,U.length)}u.tabs[w][b]=F}else if("iTXt"==w){u.tabs[w]??(u.tabs[w]={}),m=0,v=a,m=f.nextZero(o,v),b=f.readASCII(o,v,m-v);const e=o[v=m+1];var F;o[v+1],v+=2,m=f.nextZero(o,v),f.readASCII(o,v,m-v),v=m+1,m=f.nextZero(o,v),f.readUTF8(o,v,m-v),y=t-((v=m+1)-a),0==e?F=f.readUTF8(o,v,y):(U=n(o.slice(v,v+y)),F=f.readUTF8(U,0,U.length)),u.tabs[w][b]=F}else if("PLTE"==w)u.tabs[w]=f.readBytes(o,a,t);else if("hIST"==w){const e=u.tabs.PLTE.length/3;for(u.tabs[w]=[],p=0;p<e;p++)u.tabs[w].push(c(o,a+2*p))}else if("tRNS"==w)3==u.ctype?u.tabs[w]=f.readBytes(o,a,t):0==u.ctype?u.tabs[w]=c(o,a):2==u.ctype&&(u.tabs[w]=[c(o,a),c(o,a+2),c(o,a+4)]);else if("gAMA"==w)u.tabs[w]=f.readUint(o,a)/1e5;else if("sRGB"==w)u.tabs[w]=o[a];else if("bKGD"==w)0==u.ctype||4==u.ctype?u.tabs[w]=[c(o,a)]:2==u.ctype||6==u.ctype?u.tabs[w]=[c(o,a),c(o,a+2),c(o,a+4)]:3==u.ctype&&(u.tabs[w]=o[a]);else if("IEND"==w)break;a+=t,f.readUint(o,a),a+=4}var E;return 0!=A&&((E=u.frames[u.frames.length-1]).data=r(u,d.slice(0,A),E.rect.width,E.rect.height)),u.data=r(u,h,u.width,u.height),delete u.compress,delete u.interlace,delete u.filter,u},toRGBA8:function(e){const r=e.width,n=e.height;if(null==e.tabs.acTL)return[t(e.data,r,n,e).buffer];const i=[];e.frames[0].data??(e.frames[0].data=e.data);const o=r*n*4,a=new Uint8Array(o),f=new Uint8Array(o),s=new Uint8Array(o);for(let u=0;u<e.frames.length;u++){const h=e.frames[u],d=h.rect.x,g=h.rect.y,A=h.rect.width,w=h.rect.height,p=t(h.data,A,w,e);if(0!=u)for(var l=0;l<o;l++)s[l]=a[l];if(0==h.blend?c(p,A,w,a,r,n,d,g,0):1==h.blend&&c(p,A,w,a,r,n,d,g,1),i.push(a.buffer.slice(0)),0==h.dispose);else if(1==h.dispose)c(f,A,w,a,r,n,d,g,0);else if(2==h.dispose)for(l=0;l<o;l++)a[l]=s[l]}return i},_paeth:f,_copyTile:c,_bin:e}}();!function(){const{_copyTile:e}=f,{_bin:t}=f,r=f._paeth;var n={table:function(){const e=new Uint32Array(256);for(let t=0;t<256;t++){let r=t;for(let e=0;e<8;e++)1&r?r=3988292384^r>>>1:r>>>=1;e[t]=r}return e}(),update(e,t,r,i){for(let o=0;o<i;o++)e=n.table[255&(e^t[r+o])]^e>>>8;return e},crc:(e,t,r)=>4294967295^n.update(4294967295,e,t,r)};function i(e,t,r,n){t[r]+=e[0]*n>>4,t[r+1]+=e[1]*n>>4,t[r+2]+=e[2]*n>>4,t[r+3]+=e[3]*n>>4}function o(e){return Math.max(0,Math.min(255,e))}function s(e,t){const r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2],o=e[3]-t[3];return r*r+n*n+i*i+o*o}function c(e,t,r,n,a,f,c){c??=1;const l=n.length,u=[];for(var h=0;h<l;h++){const e=n[h];u.push([e>>>0&255,e>>>8&255,e>>>16&255,e>>>24&255])}for(h=0;h<l;h++){let e=4294967295;for(var d=0,g=0;g<l;g++){var A=s(u[h],u[g]);g!=h&&A<e&&(e=A,d=g)}}const w=new Uint32Array(a.buffer),p=new Int16Array(t*r*4),v=[0,8,2,10,12,4,14,6,3,11,1,9,15,7,13,5];for(h=0;h<v.length;h++)v[h]=255*((v[h]+.5)/16-.5);for(let b=0;b<r;b++)for(let a=0;a<t;a++){var m;h=4*(b*t+a),2!=c?m=[o(e[h]+p[h]),o(e[h+1]+p[h+1]),o(e[h+2]+p[h+2]),o(e[h+3]+p[h+3])]:(A=v[4*(3&b)+(3&a)],m=[o(e[h]+A),o(e[h+1]+A),o(e[h+2]+A),o(e[h+3]+A)]),d=0;let y=16777215;for(g=0;g<l;g++){const e=s(m,u[g]);e<y&&(y=e,d=g)}const U=u[d],F=[m[0]-U[0],m[1]-U[1],m[2]-U[2],m[3]-U[3]];1==c&&(a!=t-1&&i(F,p,h+4,7),b!=r-1&&(0!=a&&i(F,p,h+4*t-4,3),i(F,p,h+4*t,5),a!=t-1&&i(F,p,h+4*t+4,1))),f[h>>2]=d,w[h>>2]=n[d]}}function l(e,r,i,o,a){a??={};const{crc:f}=n,s=t.writeUint,c=t.writeUshort,l=t.writeASCII;let u=8;const h=e.frames.length>1;let d,g=!1,A=33+(h?20:0);if(null!=a.sRGB&&(A+=13),null!=a.pHYs&&(A+=21),null!=a.iCCP&&(d=pako.deflate(a.iCCP),A+=21+d.length+4),3==e.ctype){for(var w=e.plte.length,p=0;p<w;p++)e.plte[p]>>>24!=255&&(g=!0);A+=8+3*w+4+(g?8+1*w+4:0)}for(var v=0;v<e.frames.length;v++)h&&(A+=38),A+=(U=e.frames[v]).cimg.length+12,0!=v&&(A+=4);A+=12;const m=new Uint8Array(A),b=[137,80,78,71,13,10,26,10];for(p=0;p<8;p++)m[p]=b[p];if(s(m,u,13),u+=4,l(m,u,"IHDR"),u+=4,s(m,u,r),u+=4,s(m,u,i),u+=4,m[u]=e.depth,u++,m[u]=e.ctype,u++,m[u]=0,u++,m[u]=0,u++,m[u]=0,u++,s(m,u,f(m,u-17,17)),u+=4,null!=a.sRGB&&(s(m,u,1),u+=4,l(m,u,"sRGB"),u+=4,m[u]=a.sRGB,u++,s(m,u,f(m,u-5,5)),u+=4),null!=a.iCCP){const e=13+d.length;s(m,u,e),u+=4,l(m,u,"iCCP"),u+=4,l(m,u,"ICC profile"),u+=11,u+=2,m.set(d,u),u+=d.length,s(m,u,f(m,u-(e+4),e+4)),u+=4}if(null!=a.pHYs&&(s(m,u,9),u+=4,l(m,u,"pHYs"),u+=4,s(m,u,a.pHYs[0]),u+=4,s(m,u,a.pHYs[1]),u+=4,m[u]=a.pHYs[2],u++,s(m,u,f(m,u-13,13)),u+=4),h&&(s(m,u,8),u+=4,l(m,u,"acTL"),u+=4,s(m,u,e.frames.length),u+=4,s(m,u,null!=a.loop?a.loop:0),u+=4,s(m,u,f(m,u-12,12)),u+=4),3==e.ctype){for(s(m,u,3*(w=e.plte.length)),u+=4,l(m,u,"PLTE"),u+=4,p=0;p<w;p++){const t=3*p,r=e.plte[p],n=255&r,i=r>>>8&255,o=r>>>16&255;m[u+t+0]=n,m[u+t+1]=i,m[u+t+2]=o}if(u+=3*w,s(m,u,f(m,u-3*w-4,3*w+4)),u+=4,g){for(s(m,u,w),u+=4,l(m,u,"tRNS"),u+=4,p=0;p<w;p++)m[u+p]=e.plte[p]>>>24&255;u+=w,s(m,u,f(m,u-w-4,w+4)),u+=4}}let y=0;for(v=0;v<e.frames.length;v++){var U=e.frames[v];h&&(s(m,u,26),u+=4,l(m,u,"fcTL"),u+=4,s(m,u,y++),u+=4,s(m,u,U.rect.width),u+=4,s(m,u,U.rect.height),u+=4,s(m,u,U.rect.x),u+=4,s(m,u,U.rect.y),u+=4,c(m,u,o[v]),u+=2,c(m,u,1e3),u+=2,m[u]=U.dispose,u++,m[u]=U.blend,u++,s(m,u,f(m,u-30,30)),u+=4);const t=U.cimg;s(m,u,(w=t.length)+(0==v?0:4)),u+=4;const r=u;l(m,u,0==v?"IDAT":"fdAT"),u+=4,0!=v&&(s(m,u,y++),u+=4),m.set(t,u),u+=w,s(m,u,f(m,r,u-r)),u+=4}return s(m,u,0),u+=4,l(m,u,"IEND"),u+=4,s(m,u,f(m,u-4,4)),u+=4,m.buffer}function u(e,t,r){for(let n=0;n<e.frames.length;n++){const i=e.frames[n];i.rect.width;const o=i.rect.height,a=new Uint8Array(o*i.bpl+o);i.cimg=A(i.img,o,i.bpp,i.bpl,a,t,r)}}function h(t,r,n,i,o){const a=o[0],f=o[1],s=o[2],l=o[3],u=o[4],h=o[5];let A=6,w=8,v=255;for(var m=0;m<t.length;m++){const e=new Uint8Array(t[m]);for(var b=e.length,y=0;y<b;y+=4)v&=e[y+3]}const U=255!=v,F=function(t,r,n,i,o,a){const f=[];for(var s=0;s<t.length;s++){const u=new Uint8Array(t[s]),d=new Uint32Array(u.buffer);var c;let A=0,w=0,p=r,v=n,m=i?1:0;if(0!=s){const b=a||i||1==s||0!=f[s-2].dispose?1:2;let y=0,U=1e9;for(let e=0;e<b;e++){var l=new Uint8Array(t[s-1-e]);const i=new Uint32Array(t[s-1-e]);let a=r,f=n,c=-1,u=-1;for(let e=0;e<n;e++)for(let t=0;t<r;t++)d[h=e*r+t]!=i[h]&&(t<a&&(a=t),t>c&&(c=t),e<f&&(f=e),e>u&&(u=e));-1==c&&(a=f=c=u=0),o&&(!(1&~a)&&a--,!(1&~f)&&f--);const g=(c-a+1)*(u-f+1);g<U&&(U=g,y=e,A=a,w=f,p=c-a+1,v=u-f+1)}l=new Uint8Array(t[s-1-y]),1==y&&(f[s-1].dispose=2),c=new Uint8Array(p*v*4),e(l,r,n,c,p,v,-A,-w,0),m=e(u,r,n,c,p,v,-A,-w,3)?1:0,1==m?g(u,r,n,c,{x:A,y:w,width:p,height:v}):e(u,r,n,c,p,v,-A,-w,0)}else c=u.slice(0);f.push({rect:{x:A,y:w,width:p,height:v},img:c,blend:m,dispose:0})}if(i)for(s=0;s<f.length;s++){if(1==(A=f[s]).blend)continue;const e=A.rect,i=f[s-1].rect,a=Math.min(e.x,i.x),c=Math.min(e.y,i.y),l={x:a,y:c,width:Math.max(e.x+e.width,i.x+i.width)-a,height:Math.max(e.y+e.height,i.y+i.height)-c};f[s-1].dispose=1,s-1!=0&&d(t,r,n,f,s-1,l,o),d(t,r,n,f,s,l,o)}let u=0;if(1!=t.length)for(var h=0;h<f.length;h++){var A;u+=(A=f[h]).rect.width*A.rect.height}return f}(t,r,n,a,f,s),E={},_=[],C=[];if(0!=i){const e=[];for(y=0;y<F.length;y++)e.push(F[y].img.buffer);const t=p(function(e){let t=0;for(var r=0;r<e.length;r++)t+=e[r].byteLength;const n=new Uint8Array(t);let i=0;for(r=0;r<e.length;r++){const t=new Uint8Array(e[r]),o=t.length;for(let e=0;e<o;e+=4){let r=t[e],o=t[e+1],a=t[e+2];const f=t[e+3];0==f&&(r=o=a=0),n[i+e]=r,n[i+e+1]=o,n[i+e+2]=a,n[i+e+3]=f}i+=o}return n.buffer}(e),i);for(y=0;y<t.plte.length;y++)_.push(t.plte[y].est.rgba);let r=0;for(y=0;y<F.length;y++){const e=(B=F[y]).img.length;var T=new Uint8Array(t.inds.buffer,r>>2,e>>2);C.push(T);const n=new Uint8Array(t.abuf,r,e);h&&c(B.img,B.rect.width,B.rect.height,_,n,T),B.img.set(n),r+=e}}else for(m=0;m<F.length;m++){var B=F[m];const e=new Uint32Array(B.img.buffer);var I=B.rect.width;for(b=e.length,T=new Uint8Array(b),C.push(T),y=0;y<b;y++){const t=e[y];if(0!=y&&t==e[y-1])T[y]=T[y-1];else if(y>I&&t==e[y-I])T[y]=T[y-I];else{let e=E[t];if(null==e&&(E[t]=e=_.length,_.push(t),_.length>=300))break;T[y]=e}}}const M=_.length;for(M<=256&&0==u&&(w=M<=2?1:M<=4?2:M<=16?4:8,w=Math.max(w,l)),m=0;m<F.length;m++){(B=F[m]).rect.x,B.rect.y,I=B.rect.width;const e=B.rect.height;let t=B.img;new Uint32Array(t.buffer);let r=4*I,n=4;if(M<=256&&0==u){r=Math.ceil(w*I/8);var x=new Uint8Array(r*e);const i=C[m];for(let t=0;t<e;t++){y=t*r;const e=t*I;if(8==w)for(var R=0;R<I;R++)x[y+R]=i[e+R];else if(4==w)for(R=0;R<I;R++)x[y+(R>>1)]|=i[e+R]<<4-4*(1&R);else if(2==w)for(R=0;R<I;R++)x[y+(R>>2)]|=i[e+R]<<6-2*(3&R);else if(1==w)for(R=0;R<I;R++)x[y+(R>>3)]|=i[e+R]<<7-1*(7&R)}t=x,A=3,n=1}else if(0==U&&1==F.length){x=new Uint8Array(I*e*3);const i=I*e;for(y=0;y<i;y++){const e=3*y,r=4*y;x[e]=t[r],x[e+1]=t[r+1],x[e+2]=t[r+2]}t=x,A=2,n=3,r=3*I}B.img=t,B.bpl=r,B.bpp=n}return{ctype:A,depth:w,plte:_,frames:F}}function d(t,r,n,i,o,a,f){const s=Uint8Array,c=Uint32Array,l=new s(t[o-1]),u=new c(t[o-1]),h=o+1<t.length?new s(t[o+1]):null,d=new s(t[o]),A=new c(d.buffer);let w=r,p=n,v=-1,m=-1;for(let e=0;e<a.height;e++)for(let t=0;t<a.width;t++){const n=a.x+t,f=a.y+e,s=f*r+n,c=A[s];0==c||0==i[o-1].dispose&&u[s]==c&&(null==h||0!=h[4*s+3])||(n<w&&(w=n),n>v&&(v=n),f<p&&(p=f),f>m&&(m=f))}-1==v&&(w=p=v=m=0),f&&(!(1&~w)&&w--,!(1&~p)&&p--),a={x:w,y:p,width:v-w+1,height:m-p+1};const b=i[o];b.rect=a,b.blend=1,b.img=new Uint8Array(a.width*a.height*4),0==i[o-1].dispose?(e(l,r,n,b.img,a.width,a.height,-a.x,-a.y,0),g(d,r,n,b.img,a)):e(d,r,n,b.img,a.width,a.height,-a.x,-a.y,0)}function g(t,r,n,i,o){e(t,r,n,i,o.width,o.height,-o.x,-o.y,2)}function A(e,t,r,n,i,o,f){const s=[];let c,l=[0,1,2,3,4];-1!=o?l=[o]:(t*n>5e5||1==r)&&(l=[0]),f&&(c={level:0});const u=a;for(var h=0;h<l.length;h++){for(let o=0;o<t;o++)w(i,e,o,n,r,l[h]);s.push(u.deflate(i,c))}let d,g=1e9;for(h=0;h<s.length;h++)s[h].length<g&&(d=h,g=s[h].length);return s[d]}function w(e,t,n,i,o,a){const f=n*i;let s=f+n;if(e[s]=a,s++,0==a)if(i<500)for(var c=0;c<i;c++)e[s+c]=t[f+c];else e.set(new Uint8Array(t.buffer,f,i),s);else if(1==a){for(c=0;c<o;c++)e[s+c]=t[f+c];for(c=o;c<i;c++)e[s+c]=t[f+c]-t[f+c-o]+256&255}else if(0==n){for(c=0;c<o;c++)e[s+c]=t[f+c];if(2==a)for(c=o;c<i;c++)e[s+c]=t[f+c];if(3==a)for(c=o;c<i;c++)e[s+c]=t[f+c]-(t[f+c-o]>>1)+256&255;if(4==a)for(c=o;c<i;c++)e[s+c]=t[f+c]-r(t[f+c-o],0,0)+256&255}else{if(2==a)for(c=0;c<i;c++)e[s+c]=t[f+c]+256-t[f+c-i]&255;if(3==a){for(c=0;c<o;c++)e[s+c]=t[f+c]+256-(t[f+c-i]>>1)&255;for(c=o;c<i;c++)e[s+c]=t[f+c]+256-(t[f+c-i]+t[f+c-o]>>1)&255}if(4==a){for(c=0;c<o;c++)e[s+c]=t[f+c]+256-r(0,t[f+c-i],0)&255;for(c=o;c<i;c++)e[s+c]=t[f+c]+256-r(t[f+c-o],t[f+c-i],t[f+c-o-i])&255}}}function p(e,t){const r=new Uint8Array(e),n=r.slice(0),i=new Uint32Array(n.buffer),o=v(n,t),a=o[0],f=o[1],s=r.length,c=new Uint8Array(s>>2);let l;if(r.length<2e7)for(var u=0;u<s;u+=4)l=m(a,h=r[u]*(1/255),d=r[u+1]*(1/255),g=r[u+2]*(1/255),A=r[u+3]*(1/255)),c[u>>2]=l.ind,i[u>>2]=l.est.rgba;else for(u=0;u<s;u+=4){var h=r[u]*(1/255),d=r[u+1]*(1/255),g=r[u+2]*(1/255),A=r[u+3]*(1/255);for(l=a;l.left;)l=b(l.est,h,d,g,A)<=0?l.left:l.right;c[u>>2]=l.ind,i[u>>2]=l.est.rgba}return{abuf:n.buffer,inds:c,plte:f}}function v(e,t,r){r??=1e-4;const n=new Uint32Array(e.buffer),i={i0:0,i1:e.length,bst:null,est:null,tdst:0,left:null,right:null};i.bst=F(e,i.i0,i.i1),i.est=E(i.bst);const o=[i];for(;o.length<t;){let t=0,i=0;for(var a=0;a<o.length;a++)o[a].est.L>t&&(t=o[a].est.L,i=a);if(t<r)break;const f=o[i],s=y(e,n,f.i0,f.i1,f.est.e,f.est.eMq255);if(f.i0>=s||f.i1<=s){f.est.L=0;continue}const c={i0:f.i0,i1:s,bst:null,est:null,tdst:0,left:null,right:null};c.bst=F(e,c.i0,c.i1),c.est=E(c.bst);const l={i0:s,i1:f.i1,bst:null,est:null,tdst:0,left:null,right:null};for(l.bst={R:[],m:[],N:f.bst.N-c.bst.N},a=0;a<16;a++)l.bst.R[a]=f.bst.R[a]-c.bst.R[a];for(a=0;a<4;a++)l.bst.m[a]=f.bst.m[a]-c.bst.m[a];l.est=E(l.bst),f.left=c,f.right=l,o[i]=c,o.push(l)}for(o.sort((e,t)=>t.bst.N-e.bst.N),a=0;a<o.length;a++)o[a].ind=a;return[i,o]}function m(e,t,r,n,i){if(null==e.left)return e.tdst=function(e,t,r,n,i){const o=t-e[0],a=r-e[1],f=n-e[2],s=i-e[3];return o*o+a*a+f*f+s*s}(e.est.q,t,r,n,i),e;const o=b(e.est,t,r,n,i);let a=e.left,f=e.right;o>0&&(a=e.right,f=e.left);const s=m(a,t,r,n,i);if(s.tdst<=o*o)return s;const c=m(f,t,r,n,i);return c.tdst<s.tdst?c:s}function b(e,t,r,n,i){const{e:o}=e;return o[0]*t+o[1]*r+o[2]*n+o[3]*i-e.eMq}function y(e,t,r,n,i,o){for(n-=4;r<n;){for(;U(e,r,i)<=o;)r+=4;for(;U(e,n,i)>o;)n-=4;if(r>=n)break;const a=t[r>>2];t[r>>2]=t[n>>2],t[n>>2]=a,r+=4,n-=4}for(;U(e,r,i)>o;)r-=4;return r+4}function U(e,t,r){return e[t]*r[0]+e[t+1]*r[1]+e[t+2]*r[2]+e[t+3]*r[3]}function F(e,t,r){const n=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],i=[0,0,0,0],o=r-t>>2;for(let a=t;a<r;a+=4){const t=e[a]*(1/255),r=e[a+1]*(1/255),o=e[a+2]*(1/255),f=e[a+3]*(1/255);i[0]+=t,i[1]+=r,i[2]+=o,i[3]+=f,n[0]+=t*t,n[1]+=t*r,n[2]+=t*o,n[3]+=t*f,n[5]+=r*r,n[6]+=r*o,n[7]+=r*f,n[10]+=o*o,n[11]+=o*f,n[15]+=f*f}return n[4]=n[1],n[8]=n[2],n[9]=n[6],n[12]=n[3],n[13]=n[7],n[14]=n[11],{R:n,m:i,N:o}}function E(e){const{R:t}=e,{m:r}=e,{N:n}=e,i=r[0],o=r[1],a=r[2],f=r[3],s=0==n?0:1/n,c=[t[0]-i*i*s,t[1]-i*o*s,t[2]-i*a*s,t[3]-i*f*s,t[4]-o*i*s,t[5]-o*o*s,t[6]-o*a*s,t[7]-o*f*s,t[8]-a*i*s,t[9]-a*o*s,t[10]-a*a*s,t[11]-a*f*s,t[12]-f*i*s,t[13]-f*o*s,t[14]-f*a*s,t[15]-f*f*s],l=c,u=_;let h=[Math.random(),Math.random(),Math.random(),Math.random()],d=0,g=0;if(0!=n)for(let w=0;w<16&&(h=u.multVec(l,h),g=Math.sqrt(u.dot(h,h)),h=u.sml(1/g,h),!(0!=w&&Math.abs(g-d)<1e-9));w++)d=g;const A=[i*s,o*s,a*s,f*s];return{Cov:c,q:A,e:h,L:d,eMq255:u.dot(u.sml(255,A),h),eMq:u.dot(h,A),rgba:(Math.round(255*A[3])<<24|Math.round(255*A[2])<<16|Math.round(255*A[1])<<8|Math.round(255*A[0]))>>>0}}var _={multVec:(e,t)=>[e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3],e[4]*t[0]+e[5]*t[1]+e[6]*t[2]+e[7]*t[3],e[8]*t[0]+e[9]*t[1]+e[10]*t[2]+e[11]*t[3],e[12]*t[0]+e[13]*t[1]+e[14]*t[2]+e[15]*t[3]],dot:(e,t)=>e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3],sml:(e,t)=>[e*t[0],e*t[1],e*t[2],e*t[3]]};f.encode=function(e,t,r,n,i,o,a){n??=0,a??=!1;const f=h(e,t,r,n,[!1,!1,!1,0,a,!1]);return u(f,-1),l(f,t,r,i,o)},f.encodeLL=function(e,t,r,n,i,o,a,f){const s={ctype:0+(1==n?0:2)+(0==i?0:4),depth:o,frames:[]},c=(n+i)*o,h=c*t;for(let l=0;l<e.length;l++)s.frames.push({rect:{x:0,y:0,width:t,height:r},img:new Uint8Array(e[l]),blend:0,dispose:1,bpp:Math.ceil(c/8),bpl:Math.ceil(h/8)});return u(s,0,!0),l(s,t,r,a,f)},f.encode.compress=h,f.encode.dither=c,f.quantize=p,f.quantize.getKDtree=v,f.quantize.getNearest=m}();var s,c={toArrayBuffer(e,t){const r=e.width,n=e.height,i=r<<2,o=e.getContext("2d").getImageData(0,0,r,n),a=new Uint32Array(o.data.buffer),f=(32*r+31)/32<<2,s=f*n,l=122+s,u=new ArrayBuffer(l),h=new DataView(u),d=1<<20;let g,A,w,p,v=d,m=0,b=0,y=0;function U(e){h.setUint16(b,e,!0),b+=2}function F(e){h.setUint32(b,e,!0),b+=4}function E(e){b+=e}U(19778),F(l),E(4),F(122),F(108),F(r),F(-n>>>0),U(1),U(32),F(3),F(s),F(2835),F(2835),E(8),F(16711680),F(65280),F(255),F(4278190080),F(1466527264),function e(){for(;m<n&&v>0;){for(p=122+m*f,g=0;g<i;)v--,A=a[y++],w=A>>>24,h.setUint32(p+g,A<<8|w),g+=4;m++}y<a.length?(v=d,setTimeout(e,c._dly)):t(u)}()},toBlob(e,t){this.toArrayBuffer(e,e=>{t(new Blob([e],{type:"image/bmp"}))})},_dly:9},l={CHROME:"CHROME",FIREFOX:"FIREFOX",DESKTOP_SAFARI:"DESKTOP_SAFARI",IE:"IE",IOS:"IOS",ETC:"ETC"},u={[l.CHROME]:16384,[l.FIREFOX]:11180,[l.DESKTOP_SAFARI]:16384,[l.IE]:8192,[l.IOS]:4096,[l.ETC]:8192},h="undefined"!=typeof window,d="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,g=h&&window.cordova&&window.cordova.require&&window.cordova.require("cordova/modulemapper"),A=(h||d)&&(g&&g.getOriginalSymbol(window,"File")||"undefined"!=typeof File&&File),w=(h||d)&&(g&&g.getOriginalSymbol(window,"FileReader")||"undefined"!=typeof FileReader&&FileReader);function p(e,t,r=Date.now()){return new Promise(n=>{const i=e.split(","),o=i[0].match(/:(.*?);/)[1],a=globalThis.atob(i[1]);let f=a.length;const s=new Uint8Array(f);for(;f--;)s[f]=a.charCodeAt(f);const c=new Blob([s],{type:o});c.name=t,c.lastModified=r,n(c)})}function v(e){return new Promise((t,r)=>{const n=new w;n.onload=()=>t(n.result),n.onerror=e=>r(e),n.readAsDataURL(e)})}function m(e){return new Promise((t,r)=>{const n=new Image;n.onload=()=>t(n),n.onerror=e=>r(e),n.src=e})}function b(){if(void 0!==b.cachedResult)return b.cachedResult;let e=l.ETC;const{userAgent:t}=navigator;return/Chrom(e|ium)/i.test(t)?e=l.CHROME:/iP(ad|od|hone)/i.test(t)&&/WebKit/i.test(t)?e=l.IOS:/Safari/i.test(t)?e=l.DESKTOP_SAFARI:/Firefox/i.test(t)?e=l.FIREFOX:(/MSIE/i.test(t)||1==!!document.documentMode)&&(e=l.IE),b.cachedResult=e,b.cachedResult}function y(e,t){const r=u[b()];let n=e,i=t,o=n*i;const a=n>i?i/n:n/i;for(;o>r*r;){const e=(r+n)/2,t=(r+i)/2;e<t?(i=t,n=t*a):(i=e*a,n=e),o=n*i}return{width:n,height:i}}function U(e,t){let r,n;try{if(r=new OffscreenCanvas(e,t),n=r.getContext("2d"),null===n)throw new Error("getContext of OffscreenCanvas returns null")}catch(e){r=document.createElement("canvas"),n=r.getContext("2d")}return r.width=e,r.height=t,[r,n]}function F(e,t){const{width:r,height:n}=y(e.width,e.height),[i,o]=U(r,n);return t&&/jpe?g/.test(t)&&(o.fillStyle="white",o.fillRect(0,0,i.width,i.height)),o.drawImage(e,0,0,i.width,i.height),i}function E(){return void 0!==E.cachedResult||(E.cachedResult=["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"undefined"!=typeof document&&"ontouchend"in document),E.cachedResult}function _(e,t={}){return new Promise(function(r,n){let i,o;var a=function(){try{return o=F(i,t.fileType||e.type),r([i,o])}catch(e){return n(e)}},f=function(t){try{var r=function(e){try{throw e}catch(e){return n(e)}};try{let t;return v(e).then(function(e){try{return t=e,m(t).then(function(e){try{return i=e,function(){try{return a()}catch(e){return n(e)}}()}catch(e){return r(e)}},r)}catch(e){return r(e)}},r)}catch(e){r(e)}}catch(e){return n(e)}};try{if(E()||[l.DESKTOP_SAFARI,l.MOBILE_SAFARI].includes(b()))throw new Error("Skip createImageBitmap on IOS and Safari");return createImageBitmap(e).then(function(e){try{return i=e,a()}catch(e){return f()}},f)}catch(e){f()}})}function C(e,t,r,n,i=1){return new Promise(function(o,a){let s;if("image/png"===t){let u,h,d;return u=e.getContext("2d"),({data:h}=u.getImageData(0,0,e.width,e.height)),d=f.encode([h.buffer],e.width,e.height,4096*i),s=new Blob([d],{type:t}),s.name=r,s.lastModified=n,l.call(this)}{if("image/bmp"===t)return new Promise(t=>c.toBlob(e,t)).then(function(e){try{return s=e,s.name=r,s.lastModified=n,g.call(this)}catch(e){return a(e)}}.bind(this),a);{if("function"==typeof OffscreenCanvas&&e instanceof OffscreenCanvas)return e.convertToBlob({type:t,quality:i}).then(function(e){try{return s=e,s.name=r,s.lastModified=n,A.call(this)}catch(e){return a(e)}}.bind(this),a);{let w;return w=e.toDataURL(t,i),p(w,r,n).then(function(e){try{return s=e,A.call(this)}catch(e){return a(e)}}.bind(this),a)}function A(){return g.call(this)}}function g(){return l.call(this)}}function l(){return o(s)}})}function T(e){e.width=0,e.height=0}function B(){return new Promise(function(e,t){let r,n,i,o;return void 0!==B.cachedResult?e(B.cachedResult):p("data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAEAAgMBEQACEQEDEQH/xABKAAEAAAAAAAAAAAAAAAAAAAALEAEAAAAAAAAAAAAAAAAAAAAAAQEAAAAAAAAAAAAAAAAAAAAAEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwA/8H//2Q==","test.jpg",Date.now()).then(function(a){try{return r=a,_(r).then(function(a){try{return n=a[1],C(n,r.type,r.name,r.lastModified).then(function(r){try{return i=r,T(n),_(i).then(function(r){try{return o=r[0],B.cachedResult=1===o.width&&2===o.height,e(B.cachedResult)}catch(e){return t(e)}},t)}catch(e){return t(e)}},t)}catch(e){return t(e)}},t)}catch(e){return t(e)}},t)})}function I(e){return new Promise((t,r)=>{const n=new w;n.onload=e=>{const r=new DataView(e.target.result);if(65496!=r.getUint16(0,!1))return t(-2);const n=r.byteLength;let i=2;for(;i<n;){if(r.getUint16(i+2,!1)<=8)return t(-1);const e=r.getUint16(i,!1);if(i+=2,65505==e){if(1165519206!=r.getUint32(i+=2,!1))return t(-1);const e=18761==r.getUint16(i+=6,!1);i+=r.getUint32(i+4,e);const n=r.getUint16(i,e);i+=2;for(let o=0;o<n;o++)if(274==r.getUint16(i+12*o,e))return t(r.getUint16(i+12*o+8,e))}else{if(65280&~e)break;i+=r.getUint16(i,!1)}}return t(-1)},n.onerror=e=>r(e),n.readAsArrayBuffer(e)})}function M(e,t){const{width:r}=e,{height:n}=e,{maxWidthOrHeight:i}=t;let o,a=e;return isFinite(i)&&(r>i||n>i)&&([a,o]=U(r,n),r>n?(a.width=i,a.height=n/r*i):(a.width=r/n*i,a.height=i),o.drawImage(e,0,0,a.width,a.height),T(e)),a}function x(e,t){const{width:r}=e,{height:n}=e,[i,o]=U(r,n);switch(t>4&&t<9?(i.width=n,i.height=r):(i.width=r,i.height=n),t){case 2:o.transform(-1,0,0,1,r,0);break;case 3:o.transform(-1,0,0,-1,r,n);break;case 4:o.transform(1,0,0,-1,0,n);break;case 5:o.transform(0,1,1,0,0,0);break;case 6:o.transform(0,1,-1,0,n,0);break;case 7:o.transform(0,-1,-1,0,n,r);break;case 8:o.transform(0,-1,1,0,0,r)}return o.drawImage(e,0,0,r,n),T(e),i}function R(e,t,r=0){return new Promise(function(n,i){let o,a,f,s,c,l,u,h,d,g,A,w,p,v,m,b,y,F,E,R;function S(e=5){if(t.signal&&t.signal.aborted)throw t.signal.reason;o+=e,t.onProgress(Math.min(o,100))}function Q(e){if(t.signal&&t.signal.aborted)throw t.signal.reason;o=Math.min(Math.max(e,o),100),t.onProgress(o)}return o=r,a=t.maxIteration||10,f=1024*t.maxSizeMB*1024,S(),_(e,t).then(function(r){try{return[,s]=r,S(),c=M(s,t),S(),new Promise(function(r,n){var i;if(!(i=t.exifOrientation))return I(e).then(function(e){try{return i=e,o.call(this)}catch(e){return n(e)}}.bind(this),n);function o(){return r(i)}return o.call(this)}).then(function(r){try{return l=r,S(),B().then(function(r){try{return u=r?c:x(c,l),S(),h=t.initialQuality||1,d=t.fileType||e.type,C(u,d,e.name,e.lastModified,h).then(function(r){try{{if(g=r,S(),A=g.size>f,w=g.size>e.size,!A&&!w)return Q(100),n(g);var o;function _(){if(a--&&(m>f||m>p)){let t,r;return t=R?.95*E.width:E.width,r=R?.95*E.height:E.height,[y,F]=U(t,r),F.drawImage(E,0,0,t,r),h*="image/png"===d?.85:.95,C(y,d,e.name,e.lastModified,h).then(function(e){try{return b=e,T(E),E=y,m=b.size,Q(Math.min(99,Math.floor((v-m)/(v-f)*100))),_}catch(e){return i(e)}},i)}return[1]}return p=e.size,v=g.size,m=v,E=u,R=!t.alwaysKeepResolution&&A,(o=function(e){for(;e;){if(e.then)return void e.then(o,i);try{if(e.pop){if(e.length)return e.pop()?B.call(this):e;e=_}else e=e.call(this)}catch(e){return i(e)}}}.bind(this))(_);function B(){return T(E),T(y),T(c),T(u),T(s),Q(100),n(b)}}}catch(l){return i(l)}}.bind(this),i)}catch(e){return i(e)}}.bind(this),i)}catch(e){return i(e)}}.bind(this),i)}catch(e){return i(e)}}.bind(this),i)})}function S(e,t){return new Promise((r,n)=>{s||(s=function(e){const t=[];return t.push(e),URL.createObjectURL(new Blob(t))}("\nlet scriptImported = false\nself.addEventListener('message', async (e) => {\n const { file, id, imageCompressionLibUrl, options } = e.data\n options.onProgress = (progress) => self.postMessage({ progress, id })\n try {\n if (!scriptImported) {\n // console.log('[worker] importScripts', imageCompressionLibUrl)\n self.importScripts(imageCompressionLibUrl)\n scriptImported = true\n }\n // console.log('[worker] self', self)\n const compressedFile = await imageCompression(file, options)\n self.postMessage({ file: compressedFile, id })\n } catch (e) {\n // console.error('[worker] error', e)\n self.postMessage({ error: e.message + '\\n' + e.stack, id })\n }\n})\n"));const i=new Worker(s);i.addEventListener("message",function(e){if(t.signal&&t.signal.aborted)i.terminate();else if(void 0===e.data.progress){if(e.data.error)return n(new Error(e.data.error)),void i.terminate();r(e.data.file),i.terminate()}else t.onProgress(e.data.progress)}),i.addEventListener("error",n),t.signal&&t.signal.addEventListener("abort",()=>{n(t.signal.reason),i.terminate()}),i.postMessage({file:e,imageCompressionLibUrl:t.libURL,options:{...t,onProgress:void 0,signal:void 0}})})}function Q(e,t){return new Promise(function(n,i){let o,a,f,s,c,l;if(o={...t},f=0,({onProgress:s}=o),o.maxSizeMB=o.maxSizeMB||Number.POSITIVE_INFINITY,c="boolean"!=typeof o.useWebWorker||o.useWebWorker,delete o.useWebWorker,o.onProgress=e=>{f=e,"function"==typeof s&&s(f)},!(e instanceof Blob||e instanceof A))return i(/* @__PURE__ */new Error("The file given is not an instance of Blob or File"));if(!/^image/.test(e.type))return i(/* @__PURE__ */new Error("The file given is not an image"));if(l="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,!c||"function"!=typeof Worker||l)return R(e,o).then(function(e){try{return a=e,d.call(this)}catch(e){return i(e)}}.bind(this),i);var u=function(){try{return d.call(this)}catch(e){return i(e)}}.bind(this),h=function(t){try{return R(e,o).then(function(e){try{return a=e,u()}catch(e){return i(e)}},i)}catch(e){return i(e)}};try{return o.libURL=o.libURL||"https://cdn.jsdelivr.net/npm/browser-image-compression@2.0.2/dist/browser-image-compression.js",S(e,o).then(function(e){try{return a=e,u()}catch(e){return h()}},h)}catch(e){h()}function d(){try{a.name=e.name,a.lastModified=e.lastModified}catch(e){}try{o.preserveExif&&"image/jpeg"===e.type&&(!o.fileType||o.fileType&&o.fileType===e.type)&&(a=r(e,a))}catch(e){}return n(a)}})}function H({className:t}){/* @__PURE__ */
3
3
  return e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:t,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */e("path",{fill:"currentColor",d:"M12 20q-3.35 0-5.675-2.325T4 12t2.325-5.675T12 4q1.725 0 3.3.712T18 6.75V5q0-.425.288-.712T19 4t.713.288T20 5v5q0 .425-.288.713T19 11h-5q-.425 0-.712-.288T13 10t.288-.712T14 9h3.2q-.8-1.4-2.187-2.2T12 6Q9.5 6 7.75 7.75T6 12t1.75 4.25T12 18q1.7 0 3.113-.862t2.187-2.313q.2-.35.563-.487t.737-.013q.4.125.575.525t-.025.75q-1.025 2-2.925 3.2T12 20"})})}Q.getDataUrlFromFile=v,Q.getFilefromDataUrl=p,Q.loadImage=m,Q.drawImageInCanvas=F,Q.drawFileInCanvas=_,Q.canvasToFile=C,Q.getExifOrientation=I,Q.handleMaxWidthOrHeight=M,Q.followExifOrientation=x,Q.cleanupCanvasMemory=T,Q.isAutoOrientationInBrowser=B,Q.approximateBelowMaximumCanvasSizeOfBrowser=y,Q.copyExifWithoutOrientation=r,Q.getBrowserName=b,Q.version="2.0.2";export{Q as n,t as r,H as t};
@@ -1,4 +1,4 @@
1
- import{d as e,s as r,t,v as o}from"./qbHuxVSe.js";import{D as l,n as s}from"./TV5seYRS.js";import{l as i}from"./Crix9_9X.js";var n=e(()=>import("./BhWrOCDI2.js")),a=e(()=>import("./CCm2-mcE2.js")),c=e(()=>import("./CnAKuO192.js")),d=e(()=>import("./DYU4JC0C2.js")),p=()=>/* @__PURE__ */t("div",{class:"flex h-full items-center justify-center",children:/* @__PURE__ */t("div",{class:"text-center",children:[
1
+ import{d as e,s as r,t,v as o}from"./C3uDEVBt.js";import{D as l,n as s}from"./BItJQVdK.js";import{l as i}from"./b6CwQBFC.js";var n=e(()=>import("./qNDy94Dr2.js")),a=e(()=>import("./C030L_Hu2.js")),c=e(()=>import("./BfkCwRAR2.js")),d=e(()=>import("./D4apO9G62.js")),p=()=>/* @__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
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??"",w=h.mapboxApiKey??"",j=e.filter(e=>"number"==typeof e.location?.x&&"number"==typeof e.location?.y);/* @__PURE__ */
@@ -0,0 +1,9 @@
1
+ import{t as e,w as t}from"./C3uDEVBt.js";import{D as n,n as a}from"./BItJQVdK.js";import{c as r,l as i,t as s}from"./b6CwQBFC.js";import{t as o}from"./ekog7y-V.js";import{t as l}from"./Cb1JRT_1.js";import{n as c}from"./DvTRhlvs.js";import{t as m}from"./D9NypPiv.js";import{t as d}from"./_ty2jtjs.js";function h({className:t}){/* @__PURE__ */
2
+ return e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:t,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */e("path",{fill:"currentColor",d:"M5 21q-.825 0-1.412-.587T3 19v-3q0-.425.288-.712T4 15t.713.288T5 16v3h14V5H5v3q0 .425-.288.713T4 9t-.712-.288T3 8V5q0-.825.588-1.412T5 3h14q.825 0 1.413.588T21 5v14q0 .825-.587 1.413T19 21zm6.65-8H4q-.425 0-.712-.288T3 12t.288-.712T4 11h7.65L9.8 9.15q-.3-.3-.288-.7t.288-.7q.3-.3.713-.312t.712.287L14.8 11.3q.15.15.213.325t.062.375t-.062.375t-.213.325l-3.575 3.575q-.3.3-.712.288T9.8 16.25q-.275-.3-.288-.7t.288-.7z"})})}var u=()=>{const{t:t}=c(),d=r(),u=i(),{initializing:p,organization:g,loadingUser:v,user:f,signout:N}=a();/* @__PURE__ */
3
+ return e("div",p||v?{className:"my-2 flex justify-end",children:/* @__PURE__ */e(o,{className:"h-9 w-64"})}:{className:"mx-auto mb-4",children:[!f&&/* @__PURE__ */e("div",{className:"flex justify-end gap-4",children:/* @__PURE__ */e(s,{to:`${n.LOGIN}?ref=${encodeURIComponent(d.pathname)}`,children:/* @__PURE__ */e(m,{children:t("button.login","Login")})})}),f&&/* @__PURE__ */e("div",{className:"mt-2 flex items-center justify-end gap-4",children:[/* @__PURE__ */e(l,{variant:"h5",children:f.name}),!g?.customAuth&&/* @__PURE__ */e("button",{onClick:async()=>{await N(),u(n.PUBLIC_EVENTS)},children:/* @__PURE__ */e(h,{className:"text-destructive"})})]})]})},p=()=>{const{user:r,organization:o,signout:c}=a(),m=i(),h=o?.integrationSettings?.hideQratiBranding;/* @__PURE__ */
4
+ return e("div",{className:"pt-16 sm:pt-24",children:[o&&/* @__PURE__ */e("div",{className:"mx-auto py-2",children:o.customAuth?r&&/* @__PURE__ */e(l,{variant:"h6",align:"center",children:[r.name,"•"," ",
5
+ /* @__PURE__ */e(s,{className:"hover:underline",to:n.MY_UPLOADS,children:"My Uploads"})]}):/* @__PURE__ */e(t,{children:[!r&&/* @__PURE__ */e(l,{variant:"h6",align:"center",children:[
6
+ /* @__PURE__ */e(s,{className:"text-primary hover:underline",to:n.LOGIN,children:"Login"})," ","•"," ",
7
+ /* @__PURE__ */e(s,{className:"text-primary hover:underline",to:n.REGISTER,children:"Register"})]}),r&&/* @__PURE__ */e(l,{variant:"h6",align:"center",children:[r.name," •"," ",
8
+ /* @__PURE__ */e(s,{className:"hover:underline",to:n.MY_UPLOADS,children:"My Uploads"})," ","•"," ",
9
+ /* @__PURE__ */e("button",{type:"button",className:"text-destructive cursor-pointer border-none bg-transparent p-0 hover:underline",onClick:async()=>{await c(),m(n.PUBLIC_EVENTS)},children:"Logout"})]})]})}),!h&&/* @__PURE__ */e(d,{})]})};export{u as n,p as t};
@@ -1,3 +1,3 @@
1
- import{n as e}from"./Cko4QHwX.js";import{b as t,f as o,h as l,p as r,t as a,w as n}from"./qbHuxVSe.js";import{I as i,a as f,n as c,w as p}from"./TV5seYRS.js";import{t as s}from"./DGHG5MsV.js";import{a as d,i as u,n as m,o as g,r as b,t as h}from"./CkgIN-cn2.js";import{t as x}from"./CfMNBPpx2.js";var k=[[90,-180],[-90,180]],v=[20,0],y="#fb8500",w={topLeft:[276,60],bottomRight:[60,60]},z=new s,A=e=>e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;"),E=({onExplore:s,logoUrl:E})=>{const L=o(null),R=o(null),C=o(null),T=o(null),M=o(null),O=o(null),I=o(null),W=o(!1),S=o(!1),Z=r(()=>(()=>{try{const e=sessionStorage.getItem(p);if(!e)return null;const t=JSON.parse(e);if("number"==typeof t?.center?.lat&&"number"==typeof t?.center?.lng&&"number"==typeof t?.zoom)return t}catch{}return null})(),[]),[j,q]=l(!0),[D,B]=l(!1),{folderTree:H,activeFolderId:N,activeFolder:P,visibleEvents:U,setActiveFolderId:F,isLoadingEvents:Y}=g(),{organization:J}=c();return t(()=>{if(!L.current||R.current)return;x("leaflet",'.leaflet-pane,.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile-container,.leaflet-pane>svg,.leaflet-pane>canvas,.leaflet-zoom-box,.leaflet-image-layer,.leaflet-layer{position:absolute;top:0;left:0}.leaflet-container{overflow:hidden}.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow{-webkit-user-select:none;user-select:none;-webkit-user-drag:none}.leaflet-tile::selection{background:0 0}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container{-webkit-transform-origin:0 0;width:1600px;height:1600px}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container .leaflet-overlay-pane svg{max-width:none!important;max-height:none!important}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer,.leaflet-container .leaflet-tile{width:auto;padding:0;max-width:none!important;max-height:none!important}.leaflet-container img.leaflet-tile{mix-blend-mode:plus-lighter}.leaflet-container.leaflet-touch-zoom{-ms-touch-action:pan-x pan-y;touch-action:pan-x pan-y}.leaflet-container.leaflet-touch-drag{-ms-touch-action:pinch-zoom;touch-action:none;touch-action:pinch-zoom}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{-ms-touch-action:none;touch-action:none}.leaflet-container{-webkit-tap-highlight-color:transparent}.leaflet-container a{-webkit-tap-highlight-color:#33b5e566}.leaflet-tile{filter:inherit;visibility:hidden}.leaflet-tile-loaded{visibility:inherit}.leaflet-zoom-box{box-sizing:border-box;z-index:800;width:0;height:0}.leaflet-overlay-pane svg{-moz-user-select:none}.leaflet-pane{z-index:400}.leaflet-tile-pane{z-index:200}.leaflet-overlay-pane{z-index:400}.leaflet-shadow-pane{z-index:500}.leaflet-marker-pane{z-index:600}.leaflet-tooltip-pane{z-index:650}.leaflet-popup-pane{z-index:700}.leaflet-map-pane canvas{z-index:100}.leaflet-map-pane svg{z-index:200}.leaflet-vml-shape{width:1px;height:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{z-index:800;pointer-events:visiblePainted;pointer-events:auto;position:relative}.leaflet-top,.leaflet-bottom{z-index:1000;pointer-events:none;position:absolute}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{float:left;clear:both}.leaflet-right .leaflet-control{float:right}.leaflet-top .leaflet-control{margin-top:10px}.leaflet-bottom .leaflet-control{margin-bottom:10px}.leaflet-left .leaflet-control{margin-left:10px}.leaflet-right .leaflet-control{margin-right:10px}.leaflet-fade-anim .leaflet-popup{opacity:0;transition:opacity .2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup{opacity:1}.leaflet-zoom-animated{transform-origin:0 0}svg.leaflet-zoom-animated{will-change:transform}.leaflet-zoom-anim .leaflet-zoom-animated{-webkit-transition:-webkit-transform .25s cubic-bezier(0,0,.25,1);-moz-transition:-moz-transform .25s cubic-bezier(0,0,.25,1);transition:transform .25s cubic-bezier(0,0,.25,1)}.leaflet-zoom-anim .leaflet-tile,.leaflet-pan-anim .leaflet-tile{transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-interactive{cursor:pointer}.leaflet-grab{cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.leaflet-crosshair,.leaflet-crosshair .leaflet-interactive{cursor:crosshair}.leaflet-popup-pane,.leaflet-control{cursor:auto}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-image-layer,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none}.leaflet-marker-icon.leaflet-interactive,.leaflet-image-layer.leaflet-interactive,.leaflet-pane>svg path.leaflet-interactive,svg.leaflet-image-layer.leaflet-interactive path{pointer-events:visiblePainted;pointer-events:auto}.leaflet-container{outline-offset:1px;background:#ddd}.leaflet-container a{color:#0078a8}.leaflet-zoom-box{background:#ffffff80;border:2px dotted #38f}.leaflet-container{font-family:Helvetica Neue,Arial,Helvetica,sans-serif;font-size:.75rem;line-height:1.5}.leaflet-bar{border-radius:4px;box-shadow:0 1px 5px #000000a6}.leaflet-bar a{text-align:center;color:#000;background-color:#fff;border-bottom:1px solid #ccc;width:26px;height:26px;line-height:26px;text-decoration:none;display:block}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50%;background-repeat:no-repeat;display:block}.leaflet-bar a:hover,.leaflet-bar a:focus{background-color:#f4f4f4}.leaflet-bar a:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.leaflet-bar a:last-child{border-bottom:none;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.leaflet-bar a.leaflet-disabled{cursor:default;color:#bbb;background-color:#f4f4f4}.leaflet-touch .leaflet-bar a{width:30px;height:30px;line-height:30px}.leaflet-touch .leaflet-bar a:first-child{border-top-left-radius:2px;border-top-right-radius:2px}.leaflet-touch .leaflet-bar a:last-child{border-bottom-right-radius:2px;border-bottom-left-radius:2px}.leaflet-control-zoom-in,.leaflet-control-zoom-out{text-indent:1px;font:700 18px Lucida Console,Monaco,monospace}.leaflet-touch .leaflet-control-zoom-in,.leaflet-touch .leaflet-control-zoom-out{font-size:22px}.leaflet-control-layers{background:#fff;border-radius:5px;box-shadow:0 1px 5px #0006}.leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAQAAAADQ4RFAAACf0lEQVR4AY1UM3gkARTePdvdoTxXKc+qTl3aU5U6b2Kbkz3Gtq3Zw6ziLGNPzrYx7946Tr6/ee/XeCQ4D3ykPtL5tHno4n0d/h3+xfuWHGLX81cn7r0iTNzjr7LrlxCqPtkbTQEHeqOrTy4Yyt3VCi/IOB0v7rVC7q45Q3Gr5K6jt+3Gl5nCoDD4MtO+j96Wu8atmhGqcNGHObuf8OM/x3AMx38+4Z2sPqzCxRFK2aF2e5Jol56XTLyggAMTL56XOMoS1W4pOyjUcGGQdZxU6qRh7B9Zp+PfpOFlqt0zyDZckPi1ttmIp03jX8gyJ8a/PG2yutpS/Vol7peZIbZcKBAEEheEIAgFbDkz5H6Zrkm2hVWGiXKiF4Ycw0RWKdtC16Q7qe3X4iOMxruonzegJzWaXFrU9utOSsLUmrc0YjeWYjCW4PDMADElpJSSQ0vQvA1Tm6/JlKnqFs1EGyZiFCqnRZTEJJJiKRYzVYzJck2Rm6P4iH+cmSY0YzimYa8l0EtTODFWhcMIMVqdsI2uiTvKmTisIDHJ3od5GILVhBCarCfVRmo4uTjkhrhzkiBV7SsaqS+TzrzM1qpGGUFt28pIySQHR6h7F6KSwGWm97ay+Z+ZqMcEjEWebE7wxCSQwpkhJqoZA5ivCdZDjJepuJ9IQjGGUmuXJdBFUygxVqVsxFsLMbDe8ZbDYVCGKxs+W080max1hFCarCfV+C1KATwcnvE9gRRuMP2prdbWGowm1KB1y+zwMMENkM755cJ2yPDtqhTI6ED1M/82yIDtC/4j4BijjeObflpO9I9MwXTCsSX8jWAFeHr05WoLTJ5G8IQVS/7vwR6ohirYM7f6HzYpogfS3R2OAAAAAElFTkSuQmCC);width:36px;height:36px}.leaflet-retina .leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAQAAABvcdNgAAAEsklEQVR4AWL4TydIhpZK1kpWOlg0w3ZXP6D2soBtG42jeI6ZmQTHzAxiTbSJsYLjO9HhP+WOmcuhciVnmHVQcJnp7DFvScowZorad/+V/fVzMdMT2g9Cv9guXGv/7pYOrXh2U+RRR3dSd9JRx6bIFc/ekqHI29JC6pJ5ZEh1yWkhkbcFeSjxgx3L2m1cb1C7bceyxA+CNjT/Ifff+/kDk2u/w/33/IeCMOSaWZ4glosqT3DNnNZQ7Cs58/3Ce5HL78iZH/vKVIaYlqzfdLu8Vi7dnvUbEza5Idt36tquZFldl6N5Z/POLof0XLK61mZCmJSWjVF9tEjUluu74IUXvgttuVIHE7YxSkaYhJZam7yiM9Pv82JYfl9nptxZaxMJE4YSPty+vF0+Y2up9d3wwijfjZbabqm/3bZ9ecKHsiGmRflnn1MW4pjHf9oLufyn2z3y1D6n8g8TZhxyzipLNPnAUpsOiuWimg52psrTZYnOWYNDTMuWBWa0tJb4rgq1UvmutpaYEbZlwU3CLJm/ayYjHW5/h7xWLn9Hh1vepDkyf7dE7MtT5LR4e7yYpHrkhOUpEfssBLq2pPhAqoSWKUkk7EDqkmK6RrCEzqDjhNDWNE+XSMvkJRDWlZTmCW0l0PHQGRZY5t1L83kT0Y3l2SItk5JAWHl2dCOBm+fPu3fo5/3v61RMCO9Jx2EEYYhb0rmNQMX/vm7gqOEJLcXTGw3CAuRNeyaPWwjR8PRqKQ1PDA/dpv+on9Shox52WFnx0KY8onHayrJzm87i5h9xGw/tfkev0jGsQizqezUKjk12hBMKJ4kbCqGPVNXudyyrShovGw5CgxsRICxF6aRmSjlBnHRzg7Gx8fKqEubI2rahQYdR1YgDIRQO7JvQyD52hoIQx0mxa0ODtW2Iozn1le2iIRdzwWewedyZzewidueOGqlsn1MvcnQpuVwLGG3/IR1hIKxCjelIDZ8ldqWz25jWAsnldEnK0Zxro19TGVb2ffIZEsIO89EIEDvKMPrzmBOQcKQ+rroye6NgRRxqR4U8EAkz0CL6uSGOm6KQCdWjvjRiSP1BPalCRS5iQYiEIvxuBMJEWgzSoHADcVMuN7IuqqTeyUPq22qFimFtxDyBBJEwNyt6TM88blFHao/6tWWhuuOM4SAK4EI4QmFHA+SEyWlp4EQoJ13cYGzMu7yszEIBOm2rVmHUNqwAIQabISNMRstmdhNWcFLsSm+0tjJH1MdRxO5Nx0WDMhCtgD6OKgZeljJqJKc9po8juskR9XN0Y1lZ3mWjLR9JCO1jRDMd0fpYC2VnvjBSEFg7wBENc0R9HFlb0xvF1+TBEpF68d+DHR6IOWVv2BECtxo46hOFUBd/APU57WIoEwJhIi2CdpyZX0m93BZicktMj1AS9dClteUFAUNUIEygRZCtik5zSxI9MubTBH1GOiHsiLJ3OCoSZkILa9PxiN0EbvhsAo8tdAf9Seepd36lGWHmtNANTv5Jd0z4QYyeo/UEJqxKRpg5LZx6btLPsOaEmdMyxYdlc8LMaJnikDlhclqmPiQnTEpLUIZEwkRagjYkEibQErwhkTAKCLQEbUgkzJQWc/0PstHHcfEdQ+UAAAAASUVORK5CYII=);background-size:26px 26px}.leaflet-touch .leaflet-control-layers-toggle{width:44px;height:44px}.leaflet-control-layers .leaflet-control-layers-list,.leaflet-control-layers-expanded .leaflet-control-layers-toggle{display:none}.leaflet-control-layers-expanded .leaflet-control-layers-list{display:block;position:relative}.leaflet-control-layers-expanded{color:#333;background:#fff;padding:6px 10px 6px 6px}.leaflet-control-layers-scrollbar{padding-right:5px;overflow:hidden scroll}.leaflet-control-layers-selector{margin-top:2px;position:relative;top:1px}.leaflet-control-layers label{font-size:1.08333em;display:block}.leaflet-control-layers-separator{border-top:1px solid #ddd;height:0;margin:5px -10px 5px -6px}.leaflet-default-icon-path{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII=)}.leaflet-container .leaflet-control-attribution{background:#fffc;margin:0}.leaflet-control-attribution,.leaflet-control-scale-line{color:#333;padding:0 5px;line-height:1.4}.leaflet-control-attribution a{text-decoration:none}.leaflet-control-attribution a:hover,.leaflet-control-attribution a:focus{text-decoration:underline}.leaflet-attribution-flag{width:1em;height:.6669em;vertical-align:baseline!important;display:inline!important}.leaflet-left .leaflet-control-scale{margin-left:5px}.leaflet-bottom .leaflet-control-scale{margin-bottom:5px}.leaflet-control-scale-line{white-space:nowrap;box-sizing:border-box;text-shadow:1px 1px #fff;background:#fffc;border:2px solid #777;border-top:none;padding:2px 5px 1px;line-height:1.1}.leaflet-control-scale-line:not(:first-child){border-top:2px solid #777;border-bottom:none;margin-top:-2px}.leaflet-control-scale-line:not(:first-child):not(:last-child){border-bottom:2px solid #777}.leaflet-touch .leaflet-control-attribution,.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{box-shadow:none}.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{background-clip:padding-box;border:2px solid #0003}.leaflet-popup{text-align:center;margin-bottom:20px;position:absolute}.leaflet-popup-content-wrapper{text-align:left;border-radius:12px;padding:1px}.leaflet-popup-content{min-height:1px;margin:13px 24px 13px 20px;font-size:1.08333em;line-height:1.3}.leaflet-popup-content p{margin:1.3em 0}.leaflet-popup-tip-container{pointer-events:none;width:40px;height:20px;margin-top:-1px;margin-left:-20px;position:absolute;left:50%;overflow:hidden}.leaflet-popup-tip{pointer-events:auto;width:17px;height:17px;margin:-10px auto 0;padding:1px;transform:rotate(45deg)}.leaflet-popup-content-wrapper,.leaflet-popup-tip{color:#333;background:#fff;box-shadow:0 3px 14px #0006}.leaflet-container a.leaflet-popup-close-button{text-align:center;color:#757575;background:0 0;border:none;width:24px;height:24px;font:16px/24px Tahoma,Verdana,sans-serif;text-decoration:none;position:absolute;top:0;right:0}.leaflet-container a.leaflet-popup-close-button:hover,.leaflet-container a.leaflet-popup-close-button:focus{color:#585858}.leaflet-popup-scrolled{overflow:auto}.leaflet-oldie .leaflet-popup-content-wrapper{-ms-zoom:1}.leaflet-oldie .leaflet-popup-tip{-ms-filter:"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";width:24px;filter:progid:DXImageTransform.Microsoft.Matrix(M11=.707107, M12=.707107, M21=-.707107, M22=.707107);margin:0 auto}.leaflet-oldie .leaflet-control-zoom,.leaflet-oldie .leaflet-control-layers,.leaflet-oldie .leaflet-popup-content-wrapper,.leaflet-oldie .leaflet-popup-tip{border:1px solid #999}.leaflet-div-icon{background:#fff;border:1px solid #666}.leaflet-tooltip{color:#222;white-space:nowrap;-webkit-user-select:none;user-select:none;pointer-events:none;background-color:#fff;border:1px solid #fff;border-radius:3px;padding:6px;position:absolute;box-shadow:0 1px 3px #0006}.leaflet-tooltip.leaflet-interactive{cursor:pointer;pointer-events:auto}.leaflet-tooltip-top:before,.leaflet-tooltip-bottom:before,.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{pointer-events:none;content:"";background:0 0;border:6px solid #0000;position:absolute}.leaflet-tooltip-bottom{margin-top:6px}.leaflet-tooltip-top{margin-top:-6px}.leaflet-tooltip-bottom:before,.leaflet-tooltip-top:before{margin-left:-6px;left:50%}.leaflet-tooltip-top:before{border-top-color:#fff;margin-bottom:-12px;bottom:0}.leaflet-tooltip-bottom:before{border-bottom-color:#fff;margin-top:-12px;margin-left:-6px;top:0}.leaflet-tooltip-left{margin-left:-6px}.leaflet-tooltip-right{margin-left:6px}.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{margin-top:-6px;top:50%}.leaflet-tooltip-left:before{border-left-color:#fff;margin-right:-12px;right:0}.leaflet-tooltip-right:before{border-right-color:#fff;margin-left:-12px;left:0}@media print{.leaflet-control{-webkit-print-color-adjust:exact;print-color-adjust:exact}}'),x("marker-cluster",".leaflet-cluster-anim .leaflet-marker-icon,.leaflet-cluster-anim .leaflet-marker-shadow{transition:transform .3s ease-out,opacity .3s ease-in}.leaflet-cluster-spider-leg{transition:stroke-dashoffset .3s ease-out,stroke-opacity .3s ease-in}.marker-cluster-small{background-color:#b5e28c99}.marker-cluster-small div{background-color:#6ecc3999}.marker-cluster-medium{background-color:#f1d35799}.marker-cluster-medium div{background-color:#f0c20c99}.marker-cluster-large{background-color:#fd9c7399}.marker-cluster-large div{background-color:#f1801799}.leaflet-oldie .marker-cluster-small{background-color:#b5e28c}.leaflet-oldie .marker-cluster-small div{background-color:#6ecc39}.leaflet-oldie .marker-cluster-medium{background-color:#f1d357}.leaflet-oldie .marker-cluster-medium div{background-color:#f0c20c}.leaflet-oldie .marker-cluster-large{background-color:#fd9c73}.leaflet-oldie .marker-cluster-large div{background-color:#f18017}.marker-cluster{background-clip:padding-box;border-radius:20px}.marker-cluster div{text-align:center;border-radius:15px;width:30px;height:30px;margin-top:5px;margin-left:5px}.marker-cluster span{line-height:30px}");let t,o=!1;return(async()=>{try{const l=await import("./BCTYvPrD.js").then(t=>/* @__PURE__ */e(t.default,1));if(o)return;if("undefined"!=typeof window&&(window.L=l),await Promise.all([import("./CgUphJWo.js").then(t=>/* @__PURE__ */e(t.default,1)),import("./rtH8O6Hc.js")]),o)return;const r=window.L??l;if(!L.current)return;const a=l.map(L.current,{center:Z?.center?[Z.center.lat??v[0],Z.center.lng??v[1]]:v,zoom:Z?.zoom??3,minZoom:3,zoomControl:!0,worldCopyJump:!1,maxBounds:l.latLngBounds(k),maxBoundsViscosity:1});l.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:"&copy; OpenStreetMap contributors",maxZoom:19,noWrap:!0}).addTo(a);const n=l.layerGroup().addTo(a),i="function"==typeof r.heatLayer?r.heatLayer([],{radius:30,blur:30,maxZoom:10,minOpacity:.35}):null;i?.addTo(a);const f="function"==typeof r.markerClusterGroup?r.markerClusterGroup({chunkedLoading:!0,showCoverageOnHover:!1,spiderfyOnMaxZoom:!0,zoomToBoundsOnClick:!0,maxClusterRadius:48}):l.layerGroup();f.addTo(a);const c=()=>{I.current&&clearTimeout(I.current),I.current=setTimeout(()=>{try{sessionStorage.setItem(p,JSON.stringify({center:a.getCenter(),zoom:a.getZoom()}))}catch{}},250)};let s;a.on("zoomend",c),a.on("moveend",c),R.current=a,C.current=r,T.current=n,O.current=i,M.current=f,"undefined"!=typeof ResizeObserver&&L.current&&(s=new ResizeObserver(()=>a.invalidateSize(!1)),s.observe(L.current)),requestAnimationFrame(()=>a.invalidateSize(!1)),B(!0),q(!1),t=()=>{s?.disconnect(),I.current&&clearTimeout(I.current),a.off("zoomend",c),a.off("moveend",c),a.remove(),C.current=null,R.current=null,T.current=null,O.current=null,M.current=null}}finally{o||q(!1)}})(),()=>{o=!0,t?.()}},[Z]),t(()=>{if(!D)return;const e=C.current;if(!e)return;const t=R.current;if(T.current?.clearLayers(),M.current?.clearLayers(),null===N&&H.length>0){t&&O.current&&(O.current.setLatLngs?.([]),t.hasLayer(O.current)&&t.removeLayer(O.current));const o=t=>{for(const l of t)if(l.centroid){const[t,o]=l.centroid,r=e.divIcon({className:"",html:`<div style="transform:translate(-50%,-50%);background:${b(l.color,y)};color:#fff;border-radius:20px;padding:5px 10px;font-size:12px;font-weight:600;white-space:nowrap;box-shadow:0 2px 8px rgba(0,0,0,0.25);border:2px solid rgba(255,255,255,0.4);cursor:pointer;display:inline-flex;align-items:center;gap:6px;"><span>${A(l.folder.name)}</span><span style="background:rgba(0,0,0,0.18);border-radius:10px;padding:1px 5px;font-size:10px;">${l.eventCount}</span></div>`,iconSize:[0,0],iconAnchor:[0,0]});e.marker([o,t],{icon:r}).on("click",()=>F(l.folder._id)).addTo(T.current)}else l.children.length>0&&o(l.children)};o(H)}else{if(0===U.length)return;const o=0===H.length&&null===N,l=b(P?.color,y);if(t&&O.current&&(o&&!t.hasLayer(O.current)?O.current.addTo(t):o||(O.current.setLatLngs?.([]),t.hasLayer(O.current)&&t.removeLayer(O.current))),U.forEach(t=>{const o=t.location.x,r=t.location.y,f=e.divIcon({className:"qrati-leaflet-marker-wrapper",html:`<div style="width:36px;height:36px;cursor:pointer;background:${l};border-radius:50% 50% 50% 0;transform:rotate(-45deg);border:2px solid white;box-shadow:0 2px 8px rgba(0,0,0,0.3);display:flex;align-items:center;justify-content:center;overflow:hidden;">${u(E)?`<img src="${u(E)}" style="width:24px;height:24px;border-radius:50%;object-fit:cover;transform:rotate(45deg);" />`:""}</div>`,iconSize:[36,36],iconAnchor:[18,36],popupAnchor:[0,-36]}),c=e.marker([r,o],{icon:f}),p=document.createElement("div");p.style.width="fit-content",((e,t,o)=>{n(/* @__PURE__ */a(i,{client:z,children:/* @__PURE__ */a(d,{event:e,onExplore:o})}),t)})(t,p,s),c.bindPopup(p,{closeButton:!0,maxWidth:256}),M.current?.addLayer(c)}),o&&O.current){const e=U.reduce((e,t)=>Math.max(e,t.views??0),1),t=U.map(e=>[e.location.y,e.location.x,e.views??1]);O.current.setOptions?.({radius:30,blur:30,maxZoom:10,minOpacity:.35,max:e}),O.current.setLatLngs?.(t)}if(o&&!S.current&&t&&(S.current=!0,!Z)){const o=e.latLngBounds([]);U.forEach(e=>o.extend([e.location.y,e.location.x])),o.isValid()&&t.fitBounds(o,{paddingTopLeft:w.topLeft,paddingBottomRight:w.bottomRight,maxZoom:8})}}},[N,H,U,D,s,E,F,P,Z]),t(()=>{if(!D)return;const e=R.current,t=C.current;if(!e||!t)return;if(!W.current&&Z)return void(W.current=!0);W.current=!0;const o={paddingTopLeft:w.topLeft,paddingBottomRight:w.bottomRight,duration:3,easeLinearity:1};if(N){const l=m(H,N);if(!l?.folder.boundary?.length)return;const r=t.latLngBounds([]);for(const e of l.folder.boundary)r.extend([e.y,e.x]);r.isValid()&&e.flyToBounds(r,{...o,maxZoom:14})}else{const l=t.latLngBounds([]),r=e=>{for(const t of e)t.centroid?l.extend([t.centroid[1],t.centroid[0]]):r(t.children)};r(H),l.isValid()&&e.flyToBounds(l,{...o,maxZoom:8})}},[N,H,D,Z]),/* @__PURE__ */a("div",{class:"relative h-screen w-full sm:h-[calc(100vh-4rem)]",style:f(J),children:[
2
- /* @__PURE__ */a(h,{positionClass:"absolute top-3 left-16 z-[1000]",folderTree:H,activeFolderId:N,setActiveFolderId:F}),Y&&/* @__PURE__ */a("div",{class:"absolute inset-0 z-10 flex items-center justify-center bg-white/60",children:/* @__PURE__ */a("div",{class:"border-primary size-10 animate-spin rounded-full border-4 border-t-transparent"})}),j&&/* @__PURE__ */a("div",{class:"absolute inset-0 z-20 flex items-center justify-center bg-white/85",children:/* @__PURE__ */a("div",{class:"flex flex-col items-center gap-3",children:[/* @__PURE__ */a("div",{class:"border-primary size-10 animate-spin rounded-full border-4 border-t-transparent"}),/* @__PURE__ */a("p",{class:"text-sm font-medium text-slate-700",children:"Loading map…"})]})}),
3
- /* @__PURE__ */a("div",{ref:L,class:"h-full w-full rounded-xl border border-slate-200"})]})};export{E as default};
1
+ import{n as e}from"./Cko4QHwX.js";import{C as t,b as o,f as l,h as r,p as a,t as n}from"./C3uDEVBt.js";import{I as i,a as f,n as c,w as p}from"./BItJQVdK.js";import{t as s}from"./Be1e_ATJ.js";import{a as d,i as u,n as m,o as g,r as b,t as h}from"./BYoa-kpQ2.js";import{t as x}from"./CfMNBPpx2.js";var k=[[90,-180],[-90,180]],v=[20,0],y="#fb8500",w={topLeft:[276,60],bottomRight:[60,60]},z=new s,A=e=>e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;"),E=({onExplore:s,logoUrl:E})=>{const L=l(null),R=l(null),C=l(null),T=l(null),M=l(null),O=l(null),I=l(null),W=l(!1),S=l(!1),Z=a(()=>(()=>{try{const e=sessionStorage.getItem(p);if(!e)return null;const t=JSON.parse(e);if("number"==typeof t?.center?.lat&&"number"==typeof t?.center?.lng&&"number"==typeof t?.zoom)return t}catch{}return null})(),[]),[j,q]=r(!0),[D,B]=r(!1),{folderTree:H,activeFolderId:N,activeFolder:P,visibleEvents:U,setActiveFolderId:F,isLoadingEvents:Y}=g(),{organization:J}=c();return o(()=>{if(!L.current||R.current)return;x("leaflet",'.leaflet-pane,.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile-container,.leaflet-pane>svg,.leaflet-pane>canvas,.leaflet-zoom-box,.leaflet-image-layer,.leaflet-layer{position:absolute;top:0;left:0}.leaflet-container{overflow:hidden}.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow{-webkit-user-select:none;user-select:none;-webkit-user-drag:none}.leaflet-tile::selection{background:0 0}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container{-webkit-transform-origin:0 0;width:1600px;height:1600px}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container .leaflet-overlay-pane svg{max-width:none!important;max-height:none!important}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer,.leaflet-container .leaflet-tile{width:auto;padding:0;max-width:none!important;max-height:none!important}.leaflet-container img.leaflet-tile{mix-blend-mode:plus-lighter}.leaflet-container.leaflet-touch-zoom{-ms-touch-action:pan-x pan-y;touch-action:pan-x pan-y}.leaflet-container.leaflet-touch-drag{-ms-touch-action:pinch-zoom;touch-action:none;touch-action:pinch-zoom}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{-ms-touch-action:none;touch-action:none}.leaflet-container{-webkit-tap-highlight-color:transparent}.leaflet-container a{-webkit-tap-highlight-color:#33b5e566}.leaflet-tile{filter:inherit;visibility:hidden}.leaflet-tile-loaded{visibility:inherit}.leaflet-zoom-box{box-sizing:border-box;z-index:800;width:0;height:0}.leaflet-overlay-pane svg{-moz-user-select:none}.leaflet-pane{z-index:400}.leaflet-tile-pane{z-index:200}.leaflet-overlay-pane{z-index:400}.leaflet-shadow-pane{z-index:500}.leaflet-marker-pane{z-index:600}.leaflet-tooltip-pane{z-index:650}.leaflet-popup-pane{z-index:700}.leaflet-map-pane canvas{z-index:100}.leaflet-map-pane svg{z-index:200}.leaflet-vml-shape{width:1px;height:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{z-index:800;pointer-events:visiblePainted;pointer-events:auto;position:relative}.leaflet-top,.leaflet-bottom{z-index:1000;pointer-events:none;position:absolute}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{float:left;clear:both}.leaflet-right .leaflet-control{float:right}.leaflet-top .leaflet-control{margin-top:10px}.leaflet-bottom .leaflet-control{margin-bottom:10px}.leaflet-left .leaflet-control{margin-left:10px}.leaflet-right .leaflet-control{margin-right:10px}.leaflet-fade-anim .leaflet-popup{opacity:0;transition:opacity .2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup{opacity:1}.leaflet-zoom-animated{transform-origin:0 0}svg.leaflet-zoom-animated{will-change:transform}.leaflet-zoom-anim .leaflet-zoom-animated{-webkit-transition:-webkit-transform .25s cubic-bezier(0,0,.25,1);-moz-transition:-moz-transform .25s cubic-bezier(0,0,.25,1);transition:transform .25s cubic-bezier(0,0,.25,1)}.leaflet-zoom-anim .leaflet-tile,.leaflet-pan-anim .leaflet-tile{transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-interactive{cursor:pointer}.leaflet-grab{cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.leaflet-crosshair,.leaflet-crosshair .leaflet-interactive{cursor:crosshair}.leaflet-popup-pane,.leaflet-control{cursor:auto}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-image-layer,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none}.leaflet-marker-icon.leaflet-interactive,.leaflet-image-layer.leaflet-interactive,.leaflet-pane>svg path.leaflet-interactive,svg.leaflet-image-layer.leaflet-interactive path{pointer-events:visiblePainted;pointer-events:auto}.leaflet-container{outline-offset:1px;background:#ddd}.leaflet-container a{color:#0078a8}.leaflet-zoom-box{background:#ffffff80;border:2px dotted #38f}.leaflet-container{font-family:Helvetica Neue,Arial,Helvetica,sans-serif;font-size:.75rem;line-height:1.5}.leaflet-bar{border-radius:4px;box-shadow:0 1px 5px #000000a6}.leaflet-bar a{text-align:center;color:#000;background-color:#fff;border-bottom:1px solid #ccc;width:26px;height:26px;line-height:26px;text-decoration:none;display:block}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50%;background-repeat:no-repeat;display:block}.leaflet-bar a:hover,.leaflet-bar a:focus{background-color:#f4f4f4}.leaflet-bar a:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.leaflet-bar a:last-child{border-bottom:none;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.leaflet-bar a.leaflet-disabled{cursor:default;color:#bbb;background-color:#f4f4f4}.leaflet-touch .leaflet-bar a{width:30px;height:30px;line-height:30px}.leaflet-touch .leaflet-bar a:first-child{border-top-left-radius:2px;border-top-right-radius:2px}.leaflet-touch .leaflet-bar a:last-child{border-bottom-right-radius:2px;border-bottom-left-radius:2px}.leaflet-control-zoom-in,.leaflet-control-zoom-out{text-indent:1px;font:700 18px Lucida Console,Monaco,monospace}.leaflet-touch .leaflet-control-zoom-in,.leaflet-touch .leaflet-control-zoom-out{font-size:22px}.leaflet-control-layers{background:#fff;border-radius:5px;box-shadow:0 1px 5px #0006}.leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAQAAAADQ4RFAAACf0lEQVR4AY1UM3gkARTePdvdoTxXKc+qTl3aU5U6b2Kbkz3Gtq3Zw6ziLGNPzrYx7946Tr6/ee/XeCQ4D3ykPtL5tHno4n0d/h3+xfuWHGLX81cn7r0iTNzjr7LrlxCqPtkbTQEHeqOrTy4Yyt3VCi/IOB0v7rVC7q45Q3Gr5K6jt+3Gl5nCoDD4MtO+j96Wu8atmhGqcNGHObuf8OM/x3AMx38+4Z2sPqzCxRFK2aF2e5Jol56XTLyggAMTL56XOMoS1W4pOyjUcGGQdZxU6qRh7B9Zp+PfpOFlqt0zyDZckPi1ttmIp03jX8gyJ8a/PG2yutpS/Vol7peZIbZcKBAEEheEIAgFbDkz5H6Zrkm2hVWGiXKiF4Ycw0RWKdtC16Q7qe3X4iOMxruonzegJzWaXFrU9utOSsLUmrc0YjeWYjCW4PDMADElpJSSQ0vQvA1Tm6/JlKnqFs1EGyZiFCqnRZTEJJJiKRYzVYzJck2Rm6P4iH+cmSY0YzimYa8l0EtTODFWhcMIMVqdsI2uiTvKmTisIDHJ3od5GILVhBCarCfVRmo4uTjkhrhzkiBV7SsaqS+TzrzM1qpGGUFt28pIySQHR6h7F6KSwGWm97ay+Z+ZqMcEjEWebE7wxCSQwpkhJqoZA5ivCdZDjJepuJ9IQjGGUmuXJdBFUygxVqVsxFsLMbDe8ZbDYVCGKxs+W080max1hFCarCfV+C1KATwcnvE9gRRuMP2prdbWGowm1KB1y+zwMMENkM755cJ2yPDtqhTI6ED1M/82yIDtC/4j4BijjeObflpO9I9MwXTCsSX8jWAFeHr05WoLTJ5G8IQVS/7vwR6ohirYM7f6HzYpogfS3R2OAAAAAElFTkSuQmCC);width:36px;height:36px}.leaflet-retina .leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAQAAABvcdNgAAAEsklEQVR4AWL4TydIhpZK1kpWOlg0w3ZXP6D2soBtG42jeI6ZmQTHzAxiTbSJsYLjO9HhP+WOmcuhciVnmHVQcJnp7DFvScowZorad/+V/fVzMdMT2g9Cv9guXGv/7pYOrXh2U+RRR3dSd9JRx6bIFc/ekqHI29JC6pJ5ZEh1yWkhkbcFeSjxgx3L2m1cb1C7bceyxA+CNjT/Ifff+/kDk2u/w/33/IeCMOSaWZ4glosqT3DNnNZQ7Cs58/3Ce5HL78iZH/vKVIaYlqzfdLu8Vi7dnvUbEza5Idt36tquZFldl6N5Z/POLof0XLK61mZCmJSWjVF9tEjUluu74IUXvgttuVIHE7YxSkaYhJZam7yiM9Pv82JYfl9nptxZaxMJE4YSPty+vF0+Y2up9d3wwijfjZbabqm/3bZ9ecKHsiGmRflnn1MW4pjHf9oLufyn2z3y1D6n8g8TZhxyzipLNPnAUpsOiuWimg52psrTZYnOWYNDTMuWBWa0tJb4rgq1UvmutpaYEbZlwU3CLJm/ayYjHW5/h7xWLn9Hh1vepDkyf7dE7MtT5LR4e7yYpHrkhOUpEfssBLq2pPhAqoSWKUkk7EDqkmK6RrCEzqDjhNDWNE+XSMvkJRDWlZTmCW0l0PHQGRZY5t1L83kT0Y3l2SItk5JAWHl2dCOBm+fPu3fo5/3v61RMCO9Jx2EEYYhb0rmNQMX/vm7gqOEJLcXTGw3CAuRNeyaPWwjR8PRqKQ1PDA/dpv+on9Shox52WFnx0KY8onHayrJzm87i5h9xGw/tfkev0jGsQizqezUKjk12hBMKJ4kbCqGPVNXudyyrShovGw5CgxsRICxF6aRmSjlBnHRzg7Gx8fKqEubI2rahQYdR1YgDIRQO7JvQyD52hoIQx0mxa0ODtW2Iozn1le2iIRdzwWewedyZzewidueOGqlsn1MvcnQpuVwLGG3/IR1hIKxCjelIDZ8ldqWz25jWAsnldEnK0Zxro19TGVb2ffIZEsIO89EIEDvKMPrzmBOQcKQ+rroye6NgRRxqR4U8EAkz0CL6uSGOm6KQCdWjvjRiSP1BPalCRS5iQYiEIvxuBMJEWgzSoHADcVMuN7IuqqTeyUPq22qFimFtxDyBBJEwNyt6TM88blFHao/6tWWhuuOM4SAK4EI4QmFHA+SEyWlp4EQoJ13cYGzMu7yszEIBOm2rVmHUNqwAIQabISNMRstmdhNWcFLsSm+0tjJH1MdRxO5Nx0WDMhCtgD6OKgZeljJqJKc9po8juskR9XN0Y1lZ3mWjLR9JCO1jRDMd0fpYC2VnvjBSEFg7wBENc0R9HFlb0xvF1+TBEpF68d+DHR6IOWVv2BECtxo46hOFUBd/APU57WIoEwJhIi2CdpyZX0m93BZicktMj1AS9dClteUFAUNUIEygRZCtik5zSxI9MubTBH1GOiHsiLJ3OCoSZkILa9PxiN0EbvhsAo8tdAf9Seepd36lGWHmtNANTv5Jd0z4QYyeo/UEJqxKRpg5LZx6btLPsOaEmdMyxYdlc8LMaJnikDlhclqmPiQnTEpLUIZEwkRagjYkEibQErwhkTAKCLQEbUgkzJQWc/0PstHHcfEdQ+UAAAAASUVORK5CYII=);background-size:26px 26px}.leaflet-touch .leaflet-control-layers-toggle{width:44px;height:44px}.leaflet-control-layers .leaflet-control-layers-list,.leaflet-control-layers-expanded .leaflet-control-layers-toggle{display:none}.leaflet-control-layers-expanded .leaflet-control-layers-list{display:block;position:relative}.leaflet-control-layers-expanded{color:#333;background:#fff;padding:6px 10px 6px 6px}.leaflet-control-layers-scrollbar{padding-right:5px;overflow:hidden scroll}.leaflet-control-layers-selector{margin-top:2px;position:relative;top:1px}.leaflet-control-layers label{font-size:1.08333em;display:block}.leaflet-control-layers-separator{border-top:1px solid #ddd;height:0;margin:5px -10px 5px -6px}.leaflet-default-icon-path{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII=)}.leaflet-container .leaflet-control-attribution{background:#fffc;margin:0}.leaflet-control-attribution,.leaflet-control-scale-line{color:#333;padding:0 5px;line-height:1.4}.leaflet-control-attribution a{text-decoration:none}.leaflet-control-attribution a:hover,.leaflet-control-attribution a:focus{text-decoration:underline}.leaflet-attribution-flag{width:1em;height:.6669em;vertical-align:baseline!important;display:inline!important}.leaflet-left .leaflet-control-scale{margin-left:5px}.leaflet-bottom .leaflet-control-scale{margin-bottom:5px}.leaflet-control-scale-line{white-space:nowrap;box-sizing:border-box;text-shadow:1px 1px #fff;background:#fffc;border:2px solid #777;border-top:none;padding:2px 5px 1px;line-height:1.1}.leaflet-control-scale-line:not(:first-child){border-top:2px solid #777;border-bottom:none;margin-top:-2px}.leaflet-control-scale-line:not(:first-child):not(:last-child){border-bottom:2px solid #777}.leaflet-touch .leaflet-control-attribution,.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{box-shadow:none}.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{background-clip:padding-box;border:2px solid #0003}.leaflet-popup{text-align:center;margin-bottom:20px;position:absolute}.leaflet-popup-content-wrapper{text-align:left;border-radius:12px;padding:1px}.leaflet-popup-content{min-height:1px;margin:13px 24px 13px 20px;font-size:1.08333em;line-height:1.3}.leaflet-popup-content p{margin:1.3em 0}.leaflet-popup-tip-container{pointer-events:none;width:40px;height:20px;margin-top:-1px;margin-left:-20px;position:absolute;left:50%;overflow:hidden}.leaflet-popup-tip{pointer-events:auto;width:17px;height:17px;margin:-10px auto 0;padding:1px;transform:rotate(45deg)}.leaflet-popup-content-wrapper,.leaflet-popup-tip{color:#333;background:#fff;box-shadow:0 3px 14px #0006}.leaflet-container a.leaflet-popup-close-button{text-align:center;color:#757575;background:0 0;border:none;width:24px;height:24px;font:16px/24px Tahoma,Verdana,sans-serif;text-decoration:none;position:absolute;top:0;right:0}.leaflet-container a.leaflet-popup-close-button:hover,.leaflet-container a.leaflet-popup-close-button:focus{color:#585858}.leaflet-popup-scrolled{overflow:auto}.leaflet-oldie .leaflet-popup-content-wrapper{-ms-zoom:1}.leaflet-oldie .leaflet-popup-tip{-ms-filter:"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";width:24px;filter:progid:DXImageTransform.Microsoft.Matrix(M11=.707107, M12=.707107, M21=-.707107, M22=.707107);margin:0 auto}.leaflet-oldie .leaflet-control-zoom,.leaflet-oldie .leaflet-control-layers,.leaflet-oldie .leaflet-popup-content-wrapper,.leaflet-oldie .leaflet-popup-tip{border:1px solid #999}.leaflet-div-icon{background:#fff;border:1px solid #666}.leaflet-tooltip{color:#222;white-space:nowrap;-webkit-user-select:none;user-select:none;pointer-events:none;background-color:#fff;border:1px solid #fff;border-radius:3px;padding:6px;position:absolute;box-shadow:0 1px 3px #0006}.leaflet-tooltip.leaflet-interactive{cursor:pointer;pointer-events:auto}.leaflet-tooltip-top:before,.leaflet-tooltip-bottom:before,.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{pointer-events:none;content:"";background:0 0;border:6px solid #0000;position:absolute}.leaflet-tooltip-bottom{margin-top:6px}.leaflet-tooltip-top{margin-top:-6px}.leaflet-tooltip-bottom:before,.leaflet-tooltip-top:before{margin-left:-6px;left:50%}.leaflet-tooltip-top:before{border-top-color:#fff;margin-bottom:-12px;bottom:0}.leaflet-tooltip-bottom:before{border-bottom-color:#fff;margin-top:-12px;margin-left:-6px;top:0}.leaflet-tooltip-left{margin-left:-6px}.leaflet-tooltip-right{margin-left:6px}.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{margin-top:-6px;top:50%}.leaflet-tooltip-left:before{border-left-color:#fff;margin-right:-12px;right:0}.leaflet-tooltip-right:before{border-right-color:#fff;margin-left:-12px;left:0}@media print{.leaflet-control{-webkit-print-color-adjust:exact;print-color-adjust:exact}}'),x("marker-cluster",".leaflet-cluster-anim .leaflet-marker-icon,.leaflet-cluster-anim .leaflet-marker-shadow{transition:transform .3s ease-out,opacity .3s ease-in}.leaflet-cluster-spider-leg{transition:stroke-dashoffset .3s ease-out,stroke-opacity .3s ease-in}.marker-cluster-small{background-color:#b5e28c99}.marker-cluster-small div{background-color:#6ecc3999}.marker-cluster-medium{background-color:#f1d35799}.marker-cluster-medium div{background-color:#f0c20c99}.marker-cluster-large{background-color:#fd9c7399}.marker-cluster-large div{background-color:#f1801799}.leaflet-oldie .marker-cluster-small{background-color:#b5e28c}.leaflet-oldie .marker-cluster-small div{background-color:#6ecc39}.leaflet-oldie .marker-cluster-medium{background-color:#f1d357}.leaflet-oldie .marker-cluster-medium div{background-color:#f0c20c}.leaflet-oldie .marker-cluster-large{background-color:#fd9c73}.leaflet-oldie .marker-cluster-large div{background-color:#f18017}.marker-cluster{background-clip:padding-box;border-radius:20px}.marker-cluster div{text-align:center;border-radius:15px;width:30px;height:30px;margin-top:5px;margin-left:5px}.marker-cluster span{line-height:30px}");let t,o=!1;return(async()=>{try{const l=await import("./BCTYvPrD.js").then(t=>/* @__PURE__ */e(t.default,1));if(o)return;if("undefined"!=typeof window&&(window.L=l),await Promise.all([import("./CgUphJWo.js").then(t=>/* @__PURE__ */e(t.default,1)),import("./rtH8O6Hc.js")]),o)return;const r=window.L??l;if(!L.current)return;const a=l.map(L.current,{center:Z?.center?[Z.center.lat??v[0],Z.center.lng??v[1]]:v,zoom:Z?.zoom??3,minZoom:3,zoomControl:!0,worldCopyJump:!1,maxBounds:l.latLngBounds(k),maxBoundsViscosity:1});l.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:"&copy; OpenStreetMap contributors",maxZoom:19,noWrap:!0}).addTo(a);const n=l.layerGroup().addTo(a),i="function"==typeof r.heatLayer?r.heatLayer([],{radius:30,blur:30,maxZoom:10,minOpacity:.35}):null;i?.addTo(a);const f="function"==typeof r.markerClusterGroup?r.markerClusterGroup({chunkedLoading:!0,showCoverageOnHover:!1,spiderfyOnMaxZoom:!0,zoomToBoundsOnClick:!0,maxClusterRadius:48}):l.layerGroup();f.addTo(a);const c=()=>{I.current&&clearTimeout(I.current),I.current=setTimeout(()=>{try{sessionStorage.setItem(p,JSON.stringify({center:a.getCenter(),zoom:a.getZoom()}))}catch{}},250)};let s;a.on("zoomend",c),a.on("moveend",c),R.current=a,C.current=r,T.current=n,O.current=i,M.current=f,"undefined"!=typeof ResizeObserver&&L.current&&(s=new ResizeObserver(()=>a.invalidateSize(!1)),s.observe(L.current)),requestAnimationFrame(()=>a.invalidateSize(!1)),B(!0),q(!1),t=()=>{s?.disconnect(),I.current&&clearTimeout(I.current),a.off("zoomend",c),a.off("moveend",c),a.remove(),C.current=null,R.current=null,T.current=null,O.current=null,M.current=null}}finally{o||q(!1)}})(),()=>{o=!0,t?.()}},[Z]),o(()=>{if(!D)return;const e=C.current;if(!e)return;const o=R.current;if(T.current?.clearLayers(),M.current?.clearLayers(),null===N&&H.length>0){o&&O.current&&(O.current.setLatLngs?.([]),o.hasLayer(O.current)&&o.removeLayer(O.current));const t=o=>{for(const l of o)if(l.centroid){const[t,o]=l.centroid,r=e.divIcon({className:"",html:`<div style="transform:translate(-50%,-50%);background:${b(l.color,y)};color:#fff;border-radius:20px;padding:5px 10px;font-size:12px;font-weight:600;white-space:nowrap;box-shadow:0 2px 8px rgba(0,0,0,0.25);border:2px solid rgba(255,255,255,0.4);cursor:pointer;display:inline-flex;align-items:center;gap:6px;"><span>${A(l.folder.name)}</span><span style="background:rgba(0,0,0,0.18);border-radius:10px;padding:1px 5px;font-size:10px;">${l.eventCount}</span></div>`,iconSize:[0,0],iconAnchor:[0,0]});e.marker([o,t],{icon:r}).on("click",()=>F(l.folder._id)).addTo(T.current)}else l.children.length>0&&t(l.children)};t(H)}else{if(0===U.length)return;const l=0===H.length&&null===N,r=b(P?.color,y);if(o&&O.current&&(l&&!o.hasLayer(O.current)?O.current.addTo(o):l||(O.current.setLatLngs?.([]),o.hasLayer(O.current)&&o.removeLayer(O.current))),U.forEach(o=>{const l=o.location.x,a=o.location.y,f=e.divIcon({className:"qrati-leaflet-marker-wrapper",html:`<div style="width:36px;height:36px;cursor:pointer;background:${r};border-radius:50% 50% 50% 0;transform:rotate(-45deg);border:2px solid white;box-shadow:0 2px 8px rgba(0,0,0,0.3);display:flex;align-items:center;justify-content:center;overflow:hidden;">${u(E)?`<img src="${u(E)}" style="width:24px;height:24px;border-radius:50%;object-fit:cover;transform:rotate(45deg);" />`:""}</div>`,iconSize:[36,36],iconAnchor:[18,36],popupAnchor:[0,-36]}),c=e.marker([a,l],{icon:f}),p=document.createElement("div");p.style.width="fit-content",((e,o,l)=>{t(/* @__PURE__ */n(i,{client:z,children:/* @__PURE__ */n(d,{event:e,onExplore:l})}),o)})(o,p,s),c.bindPopup(p,{closeButton:!0,maxWidth:256}),M.current?.addLayer(c)}),l&&O.current){const e=U.reduce((e,t)=>Math.max(e,t.views??0),1),t=U.map(e=>[e.location.y,e.location.x,e.views??1]);O.current.setOptions?.({radius:30,blur:30,maxZoom:10,minOpacity:.35,max:e}),O.current.setLatLngs?.(t)}if(l&&!S.current&&o&&(S.current=!0,!Z)){const t=e.latLngBounds([]);U.forEach(e=>t.extend([e.location.y,e.location.x])),t.isValid()&&o.fitBounds(t,{paddingTopLeft:w.topLeft,paddingBottomRight:w.bottomRight,maxZoom:8})}}},[N,H,U,D,s,E,F,P,Z]),o(()=>{if(!D)return;const e=R.current,t=C.current;if(!e||!t)return;if(!W.current&&Z)return void(W.current=!0);W.current=!0;const o={paddingTopLeft:w.topLeft,paddingBottomRight:w.bottomRight,duration:3,easeLinearity:1};if(N){const l=m(H,N);if(!l?.folder.boundary?.length)return;const r=t.latLngBounds([]);for(const e of l.folder.boundary)r.extend([e.y,e.x]);r.isValid()&&e.flyToBounds(r,{...o,maxZoom:14})}else{const l=t.latLngBounds([]),r=e=>{for(const t of e)t.centroid?l.extend([t.centroid[1],t.centroid[0]]):r(t.children)};r(H),l.isValid()&&e.flyToBounds(l,{...o,maxZoom:8})}},[N,H,D,Z]),/* @__PURE__ */n("div",{class:"relative h-screen w-full sm:h-[calc(100vh-4rem)]",style:f(J),children:[
2
+ /* @__PURE__ */n(h,{positionClass:"absolute top-3 left-16 z-[1000]",folderTree:H,activeFolderId:N,setActiveFolderId:F}),Y&&/* @__PURE__ */n("div",{class:"absolute inset-0 z-10 flex items-center justify-center bg-white/60",children:/* @__PURE__ */n("div",{class:"border-primary size-10 animate-spin rounded-full border-4 border-t-transparent"})}),j&&/* @__PURE__ */n("div",{class:"absolute inset-0 z-20 flex items-center justify-center bg-white/85",children:/* @__PURE__ */n("div",{class:"flex flex-col items-center gap-3",children:[/* @__PURE__ */n("div",{class:"border-primary size-10 animate-spin rounded-full border-4 border-t-transparent"}),/* @__PURE__ */n("p",{class:"text-sm font-medium text-slate-700",children:"Loading map…"})]})}),
3
+ /* @__PURE__ */n("div",{ref:L,class:"h-full w-full rounded-xl border border-slate-200"})]})};export{E as default};
@@ -1 +1 @@
1
- import{N as r,P as e,n as a,u as t}from"./TV5seYRS.js";var o=({eventSlug:o})=>{const{props:n}=a(),s=n?.organizationId,{isLoading:i,data:d,isError:g,error:m}=e({queryKey:[`event-data-${s??""}-${o??""}`],queryFn:async()=>{try{const e=await r.get(t.EVENT_DATA,{searchParams:o?{eventSlug:o}:void 0,headers:{"x-org-id":s}}).json();if(e.error)throw new Error(e.error);return e.data}catch(e){throw new Error(e instanceof Error?e.message:String(e)||"Failed to fetch event data")}},enabled:!!s&&!!o,staleTime:3e5,gcTime:6e5});return{loading:i,event:d?.event,ads:d?.ads,gamConfig:d?.gamConfig,parameters:d?.parameters,isError:g,error:m}};export{o as t};
1
+ import{N as r,P as e,n as a,u as t}from"./BItJQVdK.js";var o=({eventSlug:o})=>{const{props:n}=a(),s=n?.organizationId,{isLoading:i,data:d,isError:g,error:m}=e({queryKey:[`event-data-${s??""}-${o??""}`],queryFn:async()=>{try{const e=await r.get(t.EVENT_DATA,{searchParams:o?{eventSlug:o}:void 0,headers:{"x-org-id":s}}).json();if(e.error)throw new Error(e.error);return e.data}catch(e){throw new Error(e instanceof Error?e.message:String(e)||"Failed to fetch event data")}},enabled:!!s&&!!o,staleTime:3e5,gcTime:6e5});return{loading:i,event:d?.event,ads:d?.ads,gamConfig:d?.gamConfig,parameters:d?.parameters,isError:g,error:m}};export{o as t};