"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1233],{20675:function(e,t,n){n.d(t,{R:function(){return s}});var a=n(2265);function s(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.9,[t,n]=(0,a.useState)(!1),[s,i]=(0,a.useState)(null);return(0,a.useEffect)(()=>{if(void 0===globalThis.IntersectionObserver||!s)return;let t=new IntersectionObserver(e=>{let[t]=e;n(!!(null==t?void 0:t.isIntersecting))},{threshold:e});return null==t||t.observe(s),()=>null==t?void 0:t.disconnect()},[s]),{ref:s,setRef:i,isVisible:t}}},62210:function(e,t,n){n.d(t,{x1:function(){return P}});var a=n(69353),s=n(9578),i=n(9593);class o{toResponse(){return i.YC.fromJson({message:this.message},{status:this.status})}constructor(e){this.message=e.message,this.status=e.status}}class r extends o{constructor(){super({status:401,message:"Unauthenticated"})}}class c extends o{constructor(){super({status:404,message:"Not Found"})}}class d extends o{constructor(e){super({status:422,message:e})}}n(83079);var l=n(12119),u=(0,l.$)("cb0b55524ab6413b7b386edba9c330ae4a2d7bcd"),C=(0,l.$)("4b70b6ab55d73b1954eec9058a198be61eecd2ad");(0,l.$)("90459c8df89674fb2e8948eabd145c5d90a7030d");var p=(0,l.$)("aec5d06e6f841174792c7d00c766ef39f903b144");(0,l.$)("4868f8b09f9c47cf6344bbbe004d912f9c49631d");var f=n(97435);let m=n.n(f)()();async function h(e){let t=await p();return{user:null==t?void 0:t.user}}async function v(e){let{user:t}=await h(e);if(!t)throw new r;return t.id||m.warn("User does not have an ID: ".concat(JSON.stringify(t))),{user:t}}function b(e){return async t=>{let n=await h(t);return e({...t,ctx:n})}}function g(e){return async t=>{let n=await v(t);return e({...t,ctx:n})}}let y=(0,a.vR)(),I=y.router({getStatus:{method:"GET",path:"/status",responses:{200:y.type()}},claim:{method:"PUT",path:"/claim",body:null,responses:{201:null}}},{strictStatusCodes:!0,pathPrefix:"/daily-reward"}),w=s.t.router(I,{getStatus:g(async e=>{let{state:t}=await C();return{status:200,body:{state:t}}}),claim:g(async e=>(await u(),{status:201,body:null}))});var x=n(31229),E=n(84844);let L=(0,a.vR)(),M=L.router({getMany:{method:"GET",path:"",query:x.z.object({offset:x.z.number().optional(),limit:x.z.number().optional()}),responses:{200:L.type()}},getUnseenCount:{method:"GET",path:"/unseen-count",responses:{200:L.type()}},updateMany:{method:"PUT",path:"",body:x.z.object({state:x.z.enum(["read","seen"]),ids:x.z.array(x.z.string())}),responses:{201:null}}},{strictStatusCodes:!0,pathPrefix:"/notifications"}),S=s.t.router(M,{getMany:g(async e=>{let t={limit:e.query.limit,offset:e.query.offset,userId:e.ctx.user.id};return{status:200,body:{items:await (0,E.nZ)(t)}}}),getUnseenCount:g(async e=>({status:200,body:{count:await (0,E.X3)(e.ctx.user.id)}})),updateMany:g(async e=>(await (0,E.BX)(e.ctx.user.id,e.body.ids,e.body.state),{status:201,body:null}))});var _=(0,l.$)("7a01d5b2400f19448652b0dbd7da1ce4f322c379");(0,l.$)("fee4f37057c117f71f86cd057ed492b4f130c751");var T=(0,l.$)("0909f1ecc3be33fd120905512b2b68a93b3c3cdf");let k=(0,a.vR)(),A=k.router({getMany:{method:"GET",path:"",query:x.z.object({offset:x.z.number().optional(),limit:x.z.number().optional(),filter:x.z.string().optional(),searchQuery:x.z.string().optional()}),responses:{200:k.type()}},getSimilar:{method:"GET",path:"/:id/similar",query:x.z.object({offset:x.z.number().optional(),limit:x.z.number().optional()}),responses:{200:k.type()}}},{strictStatusCodes:!0,pathPrefix:"/templates"}),N=s.t.router(A,{getMany:b(async e=>({status:200,body:{items:await T(e.query)}})),getSimilar:b(async e=>({status:200,body:{items:await _(e.params.id,e.query.limit,e.query.offset)}}))}),O=(0,a.vR)().router({notifications:M,templates:A,dailyReward:I},{strictStatusCodes:!0}),j=s.t.router(O,{notifications:S,templates:N,dailyReward:w});(0,s.zG)(O,j,{basePath:"/api",jsonQuery:!0,responseValidation:!0,handlerType:"app-router",errorHandler:function(e,t){return e instanceof r||e instanceof c?e.toResponse():e instanceof d?e.toResponse():void(e instanceof i.tR||e instanceof i.$h&&404===e.statusCode||console.error(e))}});let P=(0,a.Ef)(O,{baseUrl:"/api",baseHeaders:{}})},96793:function(e,t,n){function a(e){let t=e=parseInt(new Intl.NumberFormat(void 0,{useGrouping:!1}).format(e),10),n=0;for(;t>=1e3;)t/=1e3,n++;return(t.toString().length>2?t.toPrecision(3):t.toPrecision())+["","K","M","B","T"][n]}function s(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],n=Math.round(10*e)/10;if(n<60&&t)return"".concat(n,"s");let a=new Date(1e3*n).toISOString().substring(11,19);return a.startsWith("00:")?a.substring(3):a}n.d(t,{m:function(){return s},u:function(){return a}})},84844:function(e,t,n){n.d(t,{BX:function(){return o},SF:function(){return r},X3:function(){return i},nZ:function(){return s}}),n(83079);var a=n(12119),s=(0,a.$)("7e946fcdcd51ca8c979e0e87bbd67be808f8bb7c"),i=(0,a.$)("aadc9fe78d10a3b849013d751719a7b083deb396"),o=(0,a.$)("e99f1a4995f5ba18e7c4be53917e6ca47f29f722"),r=(0,a.$)("41ed3dd378444964b8c8f497edd5ef020222d275")},89547:function(e,t,n){n.d(t,{mK:function(){return h},OD:function(){return p},E2:function(){return v},Eh:function(){return m},YY:function(){return f},oG:function(){return C}});var a=n(57437),s=n(69729),i=n(99821),o=n(28224),r=n(29272),c=n(2166),d=n(92240),l=n(61186),u=n(50102);let C={ANIMATION:{name:"Animation",description:"Create stop-motion animations",link:"/create/animation",src:"animation",Icon:r.Z,needSubscription:!1,needFramePack:!1,upsellModalName:void 0,status:"live"},VIDEO_TO_VIDEO:{name:"Video-to-Video",description:"Apply new styles to your videos",link:"/create/video-to-video",src:"video-to-video",Icon:c.Z,needSubscription:!0,needFramePack:!0,upsellModalName:"unlockVideoToVideo",status:"live"},FACE_SWAP:{name:"Face Swap Video",description:"Easily swap faces in any video",link:"/create/face-swap-video",src:"faceswap",Icon:d.Z,needSubscription:!1,needFramePack:!1,upsellModalName:void 0,status:"live"},TEXT_TO_VIDEO:{name:"Text-to-Video",description:"Create realistic videos from text",link:"/create/text-to-video",src:"text-to-video",Icon:l.Z,needSubscription:!0,needFramePack:!0,upsellModalName:"unlockTextToVideo",status:"live"},IMAGE_TO_VIDEO:{name:"Image-to-Video",description:"Turn images into videos",link:"/create/image-to-video",src:"image-to-video",Icon:e=>{let{className:t}=e;return(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"471px",height:"412px",viewBox:"0 0 471 412",version:"1.1",className:t,children:(0,a.jsx)("g",{id:"surface1",children:(0,a.jsx)("path",{className:"fill-white stroke-none group-hover:fill-indigo-400",style:{fillRule:"evenodd",fillOpacity:1},d:"M 98.316406 18.457031 C 56.902344 23.253906 30.988281 44.246094 21.769531 80.46875 C 17.589844 96.871094 16.933594 110.867188 17.4375 172.238281 C 17.882812 225.980469 18.105469 231.421875 20.269531 240.90625 C 24.804688 260.804688 30.511719 272.734375 40.84375 283.90625 C 59.46875 304.042969 85.328125 311.253906 139.027344 311.277344 L 159.730469 311.289062 L 160.40625 317.007812 C 162.238281 332.503906 168.636719 349.929688 176.59375 361.089844 C 189.484375 379.167969 209.195312 389.554688 238.320312 393.609375 C 249.628906 395.1875 363.464844 395.207031 374.398438 393.636719 C 422.0625 386.792969 446.035156 362.796875 452.632812 315.332031 C 454.203125 304.011719 454.226562 190.054688 452.660156 179.105469 C 445.820312 131.390625 421.851562 107.390625 374.4375 100.789062 C 369.609375 100.117188 352.617188 99.566406 336.671875 99.566406 L 307.6875 99.566406 L 306.976562 92.984375 C 304.621094 71.203125 300.574219 57.5 293.214844 46.398438 C 282.535156 30.289062 263.734375 21.433594 233.832031 18.421875 C 219.144531 16.941406 111.152344 16.96875 98.316406 18.457031 M 98.101562 38.960938 C 65.183594 44 49.292969 57.507812 40.953125 87.550781 C 38.5 96.386719 38.398438 98.828125 38 157.933594 C 37.667969 207.441406 37.910156 221.3125 39.265625 230.402344 C 40.183594 236.585938 41.195312 241.898438 41.511719 242.214844 C 41.824219 242.53125 55.378906 233.902344 71.628906 223.039062 C 87.878906 212.175781 103.621094 202.355469 106.617188 201.210938 C 114.179688 198.324219 127.226562 198.433594 135.289062 201.453125 C 139.042969 202.859375 144.910156 206.703125 150.191406 211.214844 L 158.90625 218.65625 L 158.90625 203.253906 C 158.90625 140.085938 183.257812 108.671875 238.359375 100.761719 C 242.757812 100.128906 255.523438 99.601562 266.722656 99.589844 L 287.082031 99.566406 L 286.292969 91.269531 C 285.320312 81.035156 282.109375 68.007812 279.125 62.179688 C 273.871094 51.914062 262.429688 44.347656 246.359375 40.5 C 239.4375 38.839844 229.347656 38.539062 171.480469 38.273438 C 134.699219 38.105469 101.675781 38.414062 98.101562 38.960938 M 111.34375 73.65625 C 84.980469 82.296875 76.914062 116.058594 96.527344 135.691406 C 115.421875 154.605469 148.363281 147.765625 157.699219 122.992188 C 164.410156 105.179688 156.414062 84.074219 139.886719 75.980469 C 132.265625 72.246094 118.953125 71.160156 111.34375 73.65625 M 113.910156 94.871094 C 108.8125 98.234375 106.332031 102.875 106.324219 109.066406 C 106.3125 119.527344 112.632812 125.894531 123.03125 125.882812 C 132.949219 125.867188 139.457031 119.300781 139.457031 109.292969 C 139.457031 99.222656 132.953125 92.714844 122.894531 92.714844 C 119.214844 92.714844 116.015625 93.484375 113.910156 94.871094 M 248.648438 121.378906 C 233.167969 122.582031 223.492188 125 212.933594 130.316406 C 197.808594 137.933594 188.1875 150.761719 183.617188 169.421875 C 180.605469 181.710938 179.519531 201.953125 179.503906 246.054688 C 179.476562 320.347656 182.386719 336.785156 198.5625 353.761719 C 205.640625 361.191406 216.703125 367.195312 228.683594 370.109375 C 241.011719 373.109375 261.269531 374.195312 305.234375 374.210938 C 379.445312 374.238281 395.867188 371.328125 412.824219 355.132812 C 420.246094 348.046875 426.242188 336.972656 429.15625 324.980469 C 432.152344 312.636719 433.238281 292.359375 433.253906 248.34375 C 433.28125 174.054688 430.371094 157.613281 414.195312 140.636719 C 403.1875 129.085938 388.167969 123.429688 362.925781 121.335938 C 347.175781 120.03125 265.636719 120.0625 248.648438 121.378906 M 281.800781 187.546875 C 269.777344 190.738281 261.699219 198.910156 257.894531 211.734375 C 255.316406 220.421875 255.25 273.746094 257.804688 282.355469 C 264.6875 305.570312 286.550781 313.910156 309.726562 302.164062 C 321.007812 296.449219 350.238281 279.160156 355.46875 275.117188 C 373.832031 260.90625 375.332031 238.691406 359.023438 222.425781 C 353.410156 216.828125 315.308594 193.988281 304.316406 189.628906 C 298.363281 187.269531 286.859375 186.207031 281.800781 187.546875 M 283.125 210.640625 C 278.210938 214.507812 277.617188 219.066406 278.007812 249.695312 C 278.347656 276.304688 278.507812 278.125 280.773438 281.164062 C 286.757812 289.203125 292.289062 287.890625 320.214844 271.808594 C 344.082031 258.0625 348.675781 254.105469 348.675781 247.304688 C 348.675781 240.597656 344.988281 237.105469 326.613281 226.421875 C 294.03125 207.472656 289.320312 205.761719 283.125 210.640625 M 114.855469 219.804688 C 110.695312 221.015625 51.242188 260.898438 50.582031 262.921875 C 49.691406 265.648438 62.472656 276.875 71.128906 280.96875 C 86.914062 288.433594 101.863281 290.636719 136.898438 290.667969 L 158.90625 290.6875 L 158.90625 239.664062 L 154.046875 238.355469 C 150.902344 237.511719 145.757812 234.1875 139.472656 228.949219 C 127.757812 219.1875 123.019531 217.425781 114.855469 219.804688 "})})})},needSubscription:!0,needFramePack:!0,upsellModalName:"unlockImageToVideo",status:"live"},LIP_SYNC:{name:"Lip Sync",description:"Sync your video with any audio",link:"/create/lip-sync",src:"lip-sync",Icon:e=>{let{className:t}=e;return(0,a.jsxs)("svg",{width:"24px",height:"24px",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[(0,a.jsx)("path",{d:"M18.3569 1.61412C18.57 1.25893 19.0307 1.14376 19.3859 1.35687L19 1.99999C19.3859 1.35687 19.3855 1.35667 19.3859 1.35687L19.3873 1.35771L19.3888 1.35866L19.3925 1.36091L19.4021 1.36683C19.4095 1.3714 19.4187 1.37724 19.4297 1.38436C19.4517 1.39859 19.4808 1.41797 19.516 1.4426C19.5863 1.49182 19.6813 1.56232 19.7926 1.65508C20.0147 1.84016 20.3052 2.11666 20.5945 2.49271C21.1773 3.25044 21.75 4.40734 21.75 5.99999C21.75 7.59265 21.1773 8.74954 20.5945 9.50727C20.3052 9.88332 20.0147 10.1598 19.7926 10.3449C19.6813 10.4377 19.5863 10.5082 19.516 10.5574C19.4808 10.582 19.4517 10.6014 19.4297 10.6156C19.4187 10.6227 19.4095 10.6286 19.4021 10.6332L19.3925 10.6391L19.3888 10.6413L19.3873 10.6423C19.3869 10.6425 19.3859 10.6431 19 9.99999L19.3859 10.6431C19.0307 10.8562 18.57 10.741 18.3569 10.3859C18.1447 10.0322 18.258 9.57386 18.6097 9.35958L18.6152 9.35604C18.6225 9.35133 18.6363 9.34219 18.6558 9.32854C18.6949 9.30119 18.7562 9.25607 18.8324 9.19258C18.9853 9.06516 19.1948 8.86666 19.4055 8.59271C19.8227 8.05044 20.25 7.20734 20.25 5.99999C20.25 4.79264 19.8227 3.94954 19.4055 3.40727C19.1948 3.13332 18.9853 2.93482 18.8324 2.80741C18.7562 2.74391 18.6949 2.69879 18.6558 2.67145C18.6363 2.6578 18.6225 2.64866 18.6152 2.64394L18.6097 2.64041C18.258 2.42613 18.1447 1.96781 18.3569 1.61412Z",fill:"white"}),(0,a.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10 1.24999C7.37665 1.24999 5.25 3.37664 5.25 5.99999C5.25 8.62334 7.37665 10.75 10 10.75C12.6234 10.75 14.75 8.62334 14.75 5.99999C14.75 3.37664 12.6234 1.24999 10 1.24999ZM6.75 5.99999C6.75 4.20507 8.20507 2.74999 10 2.74999C11.7949 2.74999 13.25 4.20507 13.25 5.99999C13.25 7.79492 11.7949 9.24999 10 9.24999C8.20507 9.24999 6.75 7.79492 6.75 5.99999Z",fill:"white"}),(0,a.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10 12.25C7.96067 12.25 6.07752 12.7207 4.67815 13.5204C3.3 14.3079 2.25 15.5101 2.25 17C2.25 18.4899 3.3 19.6921 4.67815 20.4796C6.07752 21.2792 7.96067 21.75 10 21.75C12.0393 21.75 13.9225 21.2792 15.3219 20.4796C16.7 19.6921 17.75 18.4899 17.75 17C17.75 15.5101 16.7 14.3079 15.3219 13.5204C13.9225 12.7207 12.0393 12.25 10 12.25ZM3.75 17C3.75 16.2807 4.26701 15.4829 5.42236 14.8227C6.55649 14.1747 8.17334 13.75 10 13.75C11.8267 13.75 13.4435 14.1747 14.5776 14.8227C15.733 15.4829 16.25 16.2807 16.25 17C16.25 17.7193 15.733 18.517 14.5776 19.1772C13.4435 19.8253 11.8267 20.25 10 20.25C8.17334 20.25 6.55649 19.8253 5.42236 19.1772C4.26701 18.517 3.75 17.7193 3.75 17Z",fill:"white"}),(0,a.jsx)("path",{d:"M17.3859 3.35687C17.0307 3.14376 16.57 3.25893 16.3569 3.61412L16.6051 4.63761L16.6129 4.64293C16.6246 4.65113 16.6468 4.66735 16.6761 4.69178C16.7353 4.74107 16.8198 4.82082 16.9055 4.93227C17.0727 5.14954 17.25 5.49264 17.25 5.99999C17.25 6.50734 17.0727 6.85044 16.9055 7.06771C16.8198 7.17916 16.7353 7.25891 16.6761 7.3082C16.6468 7.33263 16.6246 7.34885 16.6129 7.35705L16.6051 7.36237C16.257 7.57782 16.1456 8.0337 16.3569 8.38586C16.57 8.74105 17.0307 8.85622 17.3859 8.64311L17 7.99999C17.3859 8.64311 17.3855 8.64331 17.3859 8.64311L17.3872 8.6423L17.3887 8.64144L17.3918 8.63951L17.3993 8.63492L17.4185 8.6227C17.4332 8.61321 17.4515 8.60096 17.4731 8.5859C17.516 8.55582 17.572 8.51423 17.6364 8.46053C17.7647 8.35357 17.9302 8.19582 18.0945 7.98227C18.4273 7.54954 18.75 6.89264 18.75 5.99999C18.75 5.10734 18.4273 4.45044 18.0945 4.01771C17.9302 3.80416 17.7647 3.64641 17.6364 3.53945C17.572 3.48576 17.516 3.44416 17.4731 3.41408C17.4515 3.39902 17.4332 3.38678 17.4185 3.37728L17.3993 3.36507L17.3918 3.36047L17.3887 3.35855L17.3872 3.35768C17.3869 3.35748 17.3859 3.35687 17 3.99999L17.3859 3.35687Z",fill:"white"})]})},needSubscription:!1,needFramePack:!1,upsellModalName:void 0,status:"live"}},p=["FACE_SWAP","LIP_SYNC","ANIMATION","TEXT_TO_VIDEO","IMAGE_TO_VIDEO","VIDEO_TO_VIDEO"],f=["TEXT_TO_VIDEO","IMAGE_TO_VIDEO","VIDEO_TO_VIDEO","FACE_SWAP","LIP_SYNC","ANIMATION"],m=["AI_IMAGE","QR_CODE","FACE_SWAP","IMAGE_UPSCALER","AI_HEADSHOT"],h=100,v={AI_HEADSHOT:{name:"AI Headshot Generator",description:"Generate professional headshots",link:"/create/ai-headshot-generator",src:"ai-headshot-generator",Icon:s.Z,needSubscription:!1,needFramePack:!1,upsellModalName:void 0,status:"live"},AI_IMAGE:{name:"AI Image Generator",description:"Generate images from text",link:"/create/ai-image-generator",src:"ai-image-generator",Icon:u.Z,needSubscription:!1,needFramePack:!1,upsellModalName:void 0,status:"live"},IMAGE_UPSCALER:{name:"AI Image Upscaler",description:"Enhance details in your image",link:"/create/ai-image-upscaler",src:"ai-image-upscaler",Icon:i.Z,status:"live",needSubscription:!1,needFramePack:!1,upsellModalName:void 0},QR_CODE:{name:"AI QR Code Generator",description:"Generate unique QR Codes",link:"/create/ai-qr-code-generator",src:"ai-qr-code-generator",Icon:o.Z,status:"live",needSubscription:!1,needFramePack:!1,upsellModalName:void 0},FACE_SWAP:{name:"Face Swap Photo",description:"Easily swap faces in any photo",link:"/create/face-swap-photo",src:"face-swap-photo",Icon:function(e){return(0,a.jsxs)("svg",{width:"35",height:"35",viewBox:"0 0 35 35",...e,children:[(0,a.jsx)("path",{d:"M11.2495 14.5016V15.9366L15.6245 12.8129L11.2495 9.99829V11.2772C9.48882 11.4399 7.85845 12.2747 6.6971 13.608C5.53576 14.9414 4.93272 16.6709 5.01324 18.4373C5.09377 20.2037 5.85168 21.8711 7.12953 23.0933C8.40739 24.3155 10.1069 24.9984 11.8752 25.0002C13.4502 25.0002 15.6245 24.446 16.8758 23.1248C18.4377 21.3208 20.3 16.7781 20.3 16.7781L14.7204 20.3947C14.3443 20.8192 13.8731 21.1486 13.3454 21.3561C12.8176 21.5637 12.2483 21.6434 11.6838 21.5888C11.1194 21.5342 10.5759 21.3469 10.0977 21.0421C9.61946 20.7373 9.22016 20.3236 8.93237 19.835C8.64459 19.3464 8.47648 18.7966 8.4418 18.2306C8.40711 17.6646 8.50683 17.0984 8.7328 16.5782C8.95877 16.0581 9.30458 15.5989 9.74199 15.2379C10.1794 14.877 10.696 14.6247 11.2495 14.5016Z",fill:"white"}),(0,a.jsx)("path",{d:"M23.7504 21.1224V19.6874L19.3754 22.8127L23.7504 25.6243V24.3468C25.5111 24.1841 27.1415 23.3494 28.3028 22.016C29.4641 20.6827 30.0672 18.9532 29.9867 17.1868C29.9061 15.4204 29.1482 13.7529 27.8704 12.5308C26.5925 11.3086 24.893 10.6257 23.1247 10.6239C21.5497 10.6239 19.3754 11.1781 18.1256 12.4993C16.5622 14.3033 14.7 18.846 14.7 18.846L20.2795 15.2293C20.6557 14.8058 21.1268 14.4773 21.6541 14.2705C22.1815 14.0637 22.7503 13.9845 23.3141 14.0393C23.8779 14.0942 24.4207 14.2816 24.8983 14.5862C25.3759 14.8909 25.7747 15.3041 26.0622 15.7922C26.3497 16.2803 26.5177 16.8295 26.5525 17.3949C26.5873 17.9603 26.488 18.5259 26.2626 19.0456C26.0372 19.5653 25.6921 20.0243 25.2555 20.3852C24.8189 20.7462 24.3032 20.9988 23.7504 21.1224Z",fill:"white"})]})},status:"live",needSubscription:!1,needFramePack:!1,upsellModalName:void 0}}},67481:function(e,t,n){n.d(t,{k:function(){return d}});var a=n(57437),s=n(11039),i=n(17756),o=n(47505),r=n(96793),c=n(89547);function d(e){let t=c.oG[e.type].Icon;return(0,a.jsxs)("div",{className:"w-full cursor-pointer space-y-2 rounded-lg",style:e.ignoreVideoAspectRatio?{}:{aspectRatio:"".concat(e.width,"/").concat(e.height)},onClick:()=>{var t;(0,o.trackEvent)({eventName:"templateModal",action:"click",category:e.id}),null===(t=e.onClick)||void 0===t||t.call(e)},children:[(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)(i.F,{showCompressed:!0,videoId:"".concat(e.id),preload:"none",playsInline:!0,muted:!0,style:e.videoHeight?{height:e.videoHeight}:{},className:"h-full w-full rounded-lg object-cover transition duration-300 ease-in-out",onMouseOver:e=>{let t=e.currentTarget;(null==t?void 0:t.paused)&&t.play()},onMouseLeave:e=>{let t=e.currentTarget;if(t){try{t.pause()}catch(e){}t.currentTime=0}}}),(0,a.jsxs)("div",{className:"absolute bottom-1 right-1 flex items-center gap-1 rounded-lg bg-black/80 p-1 text-xs",children:[(0,a.jsx)(s.Z,{className:"h-4 w-4 text-white"})," ",(0,r.u)(e.usedCount)]}),(0,a.jsx)("div",{className:"absolute bottom-1 left-1 flex items-center gap-1 rounded-lg bg-black/80 p-1 text-xs",children:(0,a.jsx)(t,{className:"h-4 w-4 text-white"})})]}),(0,a.jsx)("div",{className:"text-sm",children:e.name})]})}},17756:function(e,t,n){n.d(t,{F:function(){return r}});var a=n(57437),s=n(2265),i=n(29626),o=n(20675);function r(e){let{videoId:t,showCompressed:n,lazyLoadPoster:r=!0,...c}=e,{ref:d,setRef:l,isVisible:u}=(0,o.R)(.1),C="".concat(i.X_,"/").concat(t,"/preview.png");return(0,s.useEffect)(()=>{d&&e.muted&&(d.defaultMuted=!0)},[l]),(0,s.useEffect)(()=>{d&&r&&u&&(d.poster=C)},[u]),(0,s.useEffect)(()=>{d&&d.load()},[t]),(0,a.jsxs)(a.Fragment,{children:[!r&&(0,a.jsx)("link",{rel:"preload",fetchPriority:"high",as:"image",href:C,type:"image/png"}),(0,a.jsx)("video",{...c,ref:l,poster:r?void 0:C,children:u&&(0,a.jsxs)(a.Fragment,{children:[n&&(0,a.jsx)("source",{src:"".concat(i.X_,"/").concat(e.videoId,"/video-compressed.mp4"),type:"video/mp4"}),(0,a.jsx)("source",{src:"".concat(i.X_,"/").concat(e.videoId,"/video.mp4"),type:"video/mp4"})]})})]})}}}]);
//# sourceMappingURL=1233-c5ae4184593c3cf3.js.map