1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9281],{79110:function(n,e,t){t.d(e,{I:function(){return s}});var r=t(85893),o=t(9008),i=t.n(o),c=t(67294),a=t(51181);let s=n=>{let{title:e="Lifelike AI Characters That Tell Your Story",description:t="Use our character engine to make your message come alive",og:o={title:"twisty",url:"https://twisty.ai",mediaUrl:"",description:"Use our character engine to make your message come alive",image:"".concat(a.y2.I,"images/defaultMetaImage/android-chrome-512x512.png"),width:512,height:512}}=n,s=(0,c.useMemo)(()=>o.mediaUrl?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("meta",{property:"og:locale",content:"en_US"}),(0,r.jsx)("meta",{property:"og:type",content:"video.other"}),(0,r.jsx)("meta",{property:"og:title",content:o.title}),(0,r.jsx)("meta",{property:"og:description",content:o.description}),(0,r.jsx)("meta",{property:"og:image",content:o.image}),(0,r.jsx)("meta",{property:"og:image:width",content:"".concat(o.width)}),(0,r.jsx)("meta",{property:"og:image:height",content:"".concat(o.height)}),(0,r.jsx)("meta",{property:"og:url",content:o.url}),(0,r.jsx)("meta",{property:"og:video",content:o.mediaUrl}),(0,r.jsx)("meta",{property:"og:video:type",content:"video/mp4"}),(0,r.jsx)("meta",{property:"og:video:width",content:"".concat(o.width)}),(0,r.jsx)("meta",{property:"og:video:height",content:"".concat(o.height)}),(0,r.jsx)("meta",{property:"og:video:tag",content:"twistyai"})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("meta",{property:"og:type",content:"website"}),(0,r.jsx)("meta",{property:"og:title",content:o.title}),(0,r.jsx)("meta",{property:"og:url",content:o.url}),(0,r.jsx)("meta",{property:"og:description",content:o.description}),(0,r.jsx)("meta",{property:"og:image",content:o.image}),(0,r.jsx)("meta",{property:"og:image:width",content:"512"}),(0,r.jsx)("meta",{property:"og:image:height",content:"512"})]}),[o]),l=(0,c.useMemo)(()=>o.mediaUrl?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("meta",{property:"twitter:card",content:"player"}),(0,r.jsx)("meta",{property:"twitter:site",content:"@twistyai"}),(0,r.jsx)("meta",{property:"twitter:title",content:o.title}),(0,r.jsx)("meta",{property:"twitter:description",content:o.description}),(0,r.jsx)("meta",{property:"twitter:player",content:o.mediaUrl}),(0,r.jsx)("meta",{property:"twitter:player:width",content:"".concat(o.width)}),(0,r.jsx)("meta",{property:"twitter:player:height",content:"".concat(o.height)}),(0,r.jsx)("meta",{property:"twitter:image",content:o.image})," "]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("meta",{property:"twitter:card",content:"summary_large_image"}),(0,r.jsx)("meta",{property:"twitter:site",content:"@twistyai"}),(0,r.jsx)("meta",{property:"twitter:title",content:o.title}),(0,r.jsx)("meta",{property:"twitter:description",content:o.description}),(0,r.jsx)("meta",{property:"twitter:image",content:o.image}),(0,r.jsx)("meta",{property:"twitter:image:width",content:"512"}),(0,r.jsx)("meta",{property:"twitter:image:height",content:"512"})]}),[o]);return(0,r.jsxs)(i(),{children:[(0,r.jsx)("title",{children:e}),(0,r.jsx)("meta",{name:"description",content:t}),(0,r.jsx)("meta",{name:"viewport",content:"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"}),s,l,(0,r.jsx)("link",{rel:"shortcut icon",href:"/images/favicon.ico"}),(0,r.jsx)("link",{rel:"apple-touch-icon",sizes:"180x180",href:"/apple-touch-icon.png"}),(0,r.jsx)("link",{rel:"icon",type:"image/png",sizes:"32x32",href:"/favicon-32x32.png"}),(0,r.jsx)("link",{rel:"icon",type:"image/png",sizes:"16x16",href:"/favicon-16x16.png"}),(0,r.jsx)("link",{rel:"manifest",href:"/manifest.json"}),(0,r.jsx)("link",{rel:"stylesheet",href:"https://use.typekit.net/qis5qme.css"})]})}},84341:function(n,e,t){t.d(e,{Z:function(){return B}});var r=t(85893);t(67294);var o=t(11163),i=t(41664),c=t.n(i),a=t(8484),s=t(10484),l=t(74255),u=t(42127);t(89197);var d=t(10298),p=t(5260),f=t(66289),g=t(36900),h=t(79434),m=t(42916);t(55054),t(88755);var x=t(7297),v=t(19521),b=t(56208);function C(){let n=(0,x.Z)(["\n background-color: ",";\n bottom: 0;\n left: 0;\n position: fixed;\n right: 0;\n width: 100%;\n border-top: ",";\n z-index: 3001; //in order for the notifications/transaction menus on top in mobile\n\n @media (display-mode: standalone) {\n padding-bottom: ",";\n }\n "]);return C=function(){return n},n}function y(){let n=(0,x.Z)(["\n display: flex;\n height: ",";\n "]);return y=function(){return n},n}function w(){let n=(0,x.Z)(["\n flex: 1;\n display: flex;
1\n align-items: center;\n justify-content: center;\n position: relative;\n "]);return w=function(){return n},n}function Z(){let n=(0,x.Z)(["\n flex: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n "]);return Z=function(){return n},n}function j(){let n=(0,x.Z)(["\n font-family: ",";\n font-weight: ",";\n font-size: ",";\n text-align: center;\n text-anchor: middle;\n stroke: ",";\n stroke-width: 6px;\n fill: none;\n "]);return j=function(){return n},n}function P(){let n=(0,x.Z)(["\n font-family: ",";\n font-weight: ",";\n font-size: ",";\n text-align: center;\n text-anchor: middle;\n stroke: ",";\n stroke-width: 2px;\n fill: none;\n "]);return P=function(){return n},n}function I(){let n=(0,x.Z)(["\n position: relative;\n "]);return I=function(){return n},n}function k(){let n=(0,x.Z)(["\n position: absolute;\n top: 0;\n transform: translateY(-50%);\n "]);return k=function(){return n},n}function S(){let n=(0,x.Z)([""]);return S=function(){return n},n}function T(){let n=(0,x.Z)(["\n ","\n ","\n color: ",";\n display: flex;\n align-items: center;\n gap: ",";\n margin: ",";\n "]);return T=function(){return n},n}let D={BottomNav:v.ZP.div.withConfig({componentId:"sc-3d9f30cc-0"})(C(),n=>{let{theme:e}=n;return e.backgroundColor.primary},n=>{let{theme:e}=n;return"".concat(e.borderWidth[1]," solid ").concat(e.borderColor.default)},n=>{let{theme:e}=n;return e.spacing.XS}),BottomNavInner:v.ZP.div.withConfig({componentId:"sc-3d9f30cc-1"})(y(),n=>{let{theme:e}=n;return e.sizing.mobile.bottomNavHeight}),BottomNavSection:v.ZP.div.withConfig({componentId:"sc-3d9f30cc-2"})(w()),BottomNavLink:v.ZP.a.withConfig({componentId:"sc-3d9f30cc-3"})(Z()),LogoTextBottom:v.ZP.text.withConfig({componentId:"sc-3d9f30cc-4"})(j(),n=>{let{theme:e}=n;return e.typeface.owners},n=>{let{theme:e}=n;return e.fontWeight.extrabold},n=>{let{theme:e}=n;return e.fontSize[500]},n=>{let{theme:e,$active:t}=n;return t?e.contentColor.default:e.contentColor.moreSubdued}),LogoTextTop:v.ZP.text.withConfig({componentId:"sc-3d9f30cc-5"})(P(),n=>{let{theme:e}=n;return e.typeface.owners},n=>{let{theme:e}=n;return e.fontWeight.extrabold},n=>{let{theme:e}=n;return e.fontSize[500]},n=>{let{theme:e}=n;return e.backgroundColor.primary}),AvatarWrapper:v.ZP.div.withConfig({componentId:"sc-3d9f30cc-6"})(I()),Add:v.ZP.div.withConfig({componentId:"sc-3d9f30cc-7"})(k()),Button:v.ZP.div.withConfig({componentId:"sc-3d9f30cc-8"})(S()),Credits:v.ZP.div.withConfig({componentId:"sc-3d9f30cc-9"})(T(),b.ZP.ParagraphMD,b.ZP.Bold,n=>{let{theme:e}=n;return e.contentColor.subdued},n=>{let{theme:e}=n;return e.spacing["2XS"]},n=>{let{theme:e}=n;return"".concat(e.spacing.MD," ").concat(e.spacing.MD," 0")})},E=()=>{var n;let{data:e}=(0,h.x)(),t=(0,o.useRouter)(),i=(0,g.TL)(),{hasAppstoreAccess:x,hasPlaystoreAccess:v}=(0,m.F)(),b=async()=>{await i((0,f.T2)("Sign up to start creating your own videos!")),await i((0,f.RZ)("signup")),t.push("/login")};return(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(D.BottomNav,{children:(0,r.jsxs)(D.BottomNavInner,{children:[(0,r.jsx)(c(),{href:(null==e?void 0:e.id)?"/explore":"/",passHref:!0,legacyBehavior:!0,children:(0,r.jsx)(D.BottomNavSection,{children:"/explore"===t.pathname||"/"===t.pathname?(0,r.jsx)(u.Z,{height:32}):(0,r.jsx)(u.Z,{height:32,contentColor:"moreSubdued"})})}),(0,r.jsx)(c(),{href:(null==e?void 0:e.id)?"/challenges":"/login",passHref:!0,legacyBehavior:!0,children:(0,r.jsx)(D.BottomNavSection,{children:t.pathname.indexOf("/challenges")>-1?(0,r.jsx)(d.Z,{size:30,contentColor:"default"}):(0,r.jsx)(p.Z,{size:30,contentColor:"moreSubdued"})})}),(0,r.jsx)(D.BottomNavSection,{children:(null==e?void 0:e.isAdmin)&&(0,r.jsx)(D.Add,{children:(0,r.jsx)(s.Z,{size:"medium",type:"primary",text:"Create",icon:"VideoAdd",href:"/create"})})}),(0,r.jsx)(D.BottomNavSection,{children:(null==e?void 0:e.username)?(0,r.jsx)(c(),{href:"/@".concat(e.username),children:(0,r.jsx)(a.Z,{username:null!==(n=null==e?void 0:e.displayName)&&void 0!==n?n:"",size:48,avatar:null==e?void 0:e.avatar})}):(0,r.jsx)("div",{onClick:b,children:(0,r.jsx)(l.Z,{size:32,contentColor:"moreSubdued"})})})]})})})};var B=E},84147:function(n,e,t){t.d(e,{Z:function(){return q}});var r=t(85893),o=t(67294),i=t(89197),c=t(88755),a=t(69726),s=t(30381),l=t.n(s);let u=n=>{var e;let{date:t}=n,o=(null==t?void 0:null===(e=t.toString)||void 0===e?void 0:e.call(t))?l()(t.toString()):l()();return(0,r.jsx)(r.Fragment,{children:o.format("LL")})};var d=o.memo(u),p=t(95600),f=t(79434),g=t(71211),h=t(42916),m=t(37131),x=t(7297),v=t(19521
1),b=t(56208),C=t(86926);function y(){let n=(0,x.Z)(["\n height: 100%;\n "]);return y=function(){return n},n}function w(){let n=(0,x.Z)(["\n ","\n margin-bottom: ",";\n\n "," {\n ","\n margin-bottom: 0;\n padding: ",";\n }\n "]);return w=function(){return n},n}function Z(){let n=(0,x.Z)(["\n padding-bottom: ",";\n "]);return Z=function(){return n},n}function j(){let n=(0,x.Z)(["\n "," {\n padding: ",";\n }\n "]);return j=function(){return n},n}function P(){let n=(0,x.Z)(["\n ",";\n color: ",";\n padding-bottom: ",";\n\n "," {\n padding-top: ",";\n }\n "]);return P=function(){return n},n}function I(){let n=(0,x.Z)(["\n display: flex;\n align-items: center;\n gap: ",";\n "]);return I=function(){return n},n}function k(){let n=(0,x.Z)(["\n ","\n "]);return k=function(){return n},n}function S(){let n=(0,x.Z)(["\n padding-top: ",";\n\n "," {\n display: none;\n }\n "]);return S=function(){return n},n}function T(){let n=(0,x.Z)(["\n display: flex;\n gap: ",";\n "]);return T=function(){return n},n}function D(){let n=(0,x.Z)(["\n "," {\n padding: ",";\n }\n "]);return D=function(){return n},n}function E(){let n=(0,x.Z)(["\n padding: ",";\n background-color: ",";\n display: flex;\n flex-direction: column;\n flex: 1;\n overflow-y: scroll;\n max-height: ","; // full height - top header - bottom nav - padding on top of page - bottom padding of list - height of top part of popup - height of tabs\n\n "," {\n background-color: ",";\n max-height: ","; // full height - nav + overflow into nav - space from bottom of page (24px) - height of top part of popup - potential banner height\n }\n "]);return E=function(){return n},n}function B(){let n=(0,x.Z)(["\n padding: ",";\n box-sizing: border-box;\n width: 100%;\n border-top: ",";\n "]);return B=function(){return n},n}function L(){let n=(0,x.Z)(["\n padding: ",";\n display: flex;\n align-items: flex-start;\n text-align: center;\n border-bottom: none;\n "]);return L=function(){return n},n}function M(){let n=(0,x.Z)(["\n padding: ",";\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n gap: ",";\n\n border-bottom: ",";\n\n &:last-child {\n border-bottom: none;\n }\n "]);return M=function(){return n},n}function F(){let n=(0,x.Z)(["\n flex: 1;\n min-width: 0;\n "]);return F=function(){return n},n}function A(){let n=(0,x.Z)(["\n ","\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n "]);return A=function(){return n},n}function z(){let n=(0,x.Z)(["\n ","\n color: ",";\n padding-top: ",";\n "]);return z=function(){return n},n}function N(){let n=(0,x.Z)(["\n display: flex;\n gap: ",";\n align-items: center;\n "]);return N=function(){return n},n}function $(){let n=(0,x.Z)(["\n ","\n ","\n color: ",";\n "]);return $=function(){return n},n}function O(){let n=(0,x.Z)(["\n ","\n ","\n color: ",";\n "]);return O=function(){return n},n}let R={Credits:v.ZP.div.withConfig({componentId:"sc-1a3ee147-0"})(y()),Title:v.ZP.div.withConfig({componentId:"sc-1a3ee147-1"})(w(),b.ZP.HeadingLG,n=>{let{theme:e}=n;return e.spacing.LG},C.BC.MD,b.dU,n=>{let{theme:e}=n;return"".concat(e.spacing.XL," ").concat(e.spacing.MD," ").concat(e.spacing.LG)}),Top:v.ZP.div.withConfig({componentId:"sc-1a3ee147-2"})(Z(),n=>{let{theme:e}=n;return e.spacing["2XL"]}),BalanceSection:v.ZP.div.withConfig({componentId:"sc-1a3ee147-3"})(j(),C.BC.MD,n=>{let{theme:e}=n;return"0 ".concat(e.spacing.MD)}),BalanceLabel:v.ZP.h4.withConfig({componentId:"sc-1a3ee147-4"})(P(),b.ZP.EyebrowSM,n=>{let{theme:e}=n;return e.contentColor.moreSubdued},n=>{let{theme:e}=n;return e.spacing.SM},C.BC.MD,n=>{let{theme:e}=n;return e.spacing.MD}),Balance:v.ZP.div.withConfig({componentId:"sc-1a3ee147-5"})(I(),n=>{let{theme:e}=n;return e.spacing.XS}),BalanceText:v.ZP.p.withConfig({componentId:"sc-1a3ee147-6"})(k(),b.ic),ShopButton:v.ZP.div.withConfig({componentId:"sc-1a3ee147-7"})(S(),n=>{let{theme:e}=n;return e.spacing.MD},C.BC.MD),ShopButtonText:v.ZP.div.withConfig({componentId:"sc-1a3ee147-8"})(T(),n=>{let{theme:e}=n;return e.spacing["2XS"]}),Tabs:v.ZP.div.withConfig({componentId:"sc-1a3ee147-9"})(D(),C.BC.MD,n=>{let{theme:e}=n;return"0 ".concat(e.spacing.MD)}),Transactions:v.ZP.div.withConfig({componentId:"sc-1a3ee147-10"})(E(),n=>{let{theme:e}=n;return"0 ".concat(e.spacing.MD)},n=>{let{theme:e}=n;return e.backgroundColor.body},n=>{let{theme:e,$topHeight:t,$tabHeaderHeight:r}=n;return"calc(100vh - ".concat(e.spacing["5XL"]," - ").concat(e.sizing.mobile.bottomNavHeight," - ").concat(e.spacing.MD," - ").concat(e.spacing.SM," - ").concat(t,"px - ").concat(r,"px)")},C.BC.MD,n=>{let{theme:e}=n;return e.backgroundColor.primary},n=>{let{theme:e,$topHeight:t,$tabHeaderHeight:r}=n;return"calc(100vh - ".concat(e.sizing.desktop.navHeight," + ").concat(e.spacing.XS," - ").concat(e.spacing.LG," - ").concat(t,"px - ").concat(r,"px - 80px)")}),Search:v.ZP.div.withConfig({componentId:"sc-1a3ee147-11"})(B(),n=>{let{theme:e}=n;return e.spacing.MD},n=>{let{theme:e}=n;return"".concat(e.borderWidth[1]," solid ").concat(e.borderColor.subdued)}),NoTransactions:v.ZP.div.withConfig({componentId:"sc-1a3ee147-12"})(L(),n=>{let{theme:e}=n;return"".concat(e.spacing.SM," 0")}),Transaction:v.ZP.div.withConfig({componentId:"sc-1a3ee147-13"})(M(),n=>{let{theme:e}=n;return"".concat(e.spacing.SM," 0")},n=>{let{theme:e}=n;return e.spacing.MD},n=>{let{theme:e}=n;return"".concat(e.borderWidth[1]," solid ").concat(e.borderColor.subdued)}),Text:v.ZP.div.withConfig({componentId:"sc-1a3ee147-14"})(F()),Label:v.ZP.p.withConfig({componentId:"sc-1a3ee147-15"})(A(),b.ZP.ParagraphSM),SubLabel:v.ZP.p.withConfig({componentId:"sc-1a3ee147-16"})(z(),b.ZP.ParagraphXS,n=>{let{theme:e}=n;return e.contentColor.moreSubdued},n=>{let{theme:e}=n;return e.spacing["2XS"]}),Amount:v.ZP.div.withConfig({componentId:"sc-1a3ee147-17"})(N(),n=>{let{theme:e}=n;return e.spacing["2XS"]}),AmountTextNegative:v.ZP.p.withConfig({componentId:"sc-1a3ee147-18"})($(),b.ZP.ParagraphSM,b.ZP.Bold,n=>{let{theme:e}=n;return e.contentColor.moreSubdued}),AmountTextPositive:v.ZP.p.withConfig({componentId:"sc-1a3ee147-19"})(O(),b.ZP.ParagraphSM,b.ZP.Bold,n=>{let{theme:e}=n;return e.contentColor.positive})};var H=t(11163);let G=n=>{switch(n){case c.LE.CORRECTION:return"Correction";case c.LE.DAILY:return"Daily gems";case c.LE.GIFT:return"Gifted gems";case c.LE.BOOSTER:return"Starter Pack";case c.LE.PACK:return"Credit pack";case c.LE.SPENT:return"Video creation";case c.LE.SUBSCRIPTION:return"Subscription gems";case c.LE.REFUND:return"Refunded gems";case c.LE.CHALLENGE:return"Challenge gems";default:return""}},X=()=>{var n,e;(0,H.useRouter)();let t=(0,o.useRef)(null),c=(0,o.useRef)(null),{isMobile:s}=(0,p.i)(),{hasAppstoreAccess:l,hasPlaystoreAccess:u}=(0,h.F)(),{setLocked:x}=(0,m.i)(),[v,b]=(0,o.useState)(0),[C,y]=(0,o.useState)(0),{data:w}=(0,f.x)(),{data:Z}=(0,g.ym)(null!==(n=null==w?void 0:w.id)&&void 0!==n?n:"",{skip:!(null==w?void 0:w.id)});(0,o.useEffect)(()=>{s?x(!0):x(!1)},[s]),(0,o.useEffect)(()=>{t.current&&b(t.current.clientHeight)},[t.current]),(0,o.useEffect)(()=>{c.current&&y(c.current.clientHeight)},[c.current]);let j=()=>(0,r.jsx)("div",{ref:c,children:(0,r.jsx)(R.Tabs,{children:(0,r.jsx)(a.Z,{text:"Transactions",selected:!0,type:"default",onClick:()=>{}})})});return(0,r.jsxs)(R.Credits,{children:[(0,r.jsxs)(R.Top,{ref:t,children:[(0,r.jsx)(R.Title,{children:"Gems"}),(0,r.jsxs)(R.BalanceSection,{children:[(0,r.jsx)(R.BalanceLabel,{children:"Current balance"}),(0,r.jsxs)(R.Balance,{children:[(0,r.jsx)(i.Z,{size:48}),(0,r.jsx)(R.BalanceText,{children:null!==(e=null==w?void 0:w.credits)&&void 0!==e?e:0})]})]}),!s&&j()]}),s&&j(),(0,r.jsxs)(R.Transactions,{$topHeight:v,$tabHeaderHeight:C,children:[null==Z?void 0:Z.map(n=>(0,r.jsxs)(R.Transaction,{children:[(0,r.jsxs)(R.Text,{children:[(0,r.jsx)(R.Label,{children:G(n.creditType)}),(0,r.jsx)(R.SubLabel,{children:(0,r.jsx)(d,{date:n.createdAt})})]}),n.credits<0?(0,r.jsxs)(R.Amount,{children:[(0,r.jsx)(i.Z,{size:16,contentColor:"moreSubdued"}),(0,r.jsx)(R.AmountTextNegative,{children:n.credits})]}):(0,r.jsxs)(R.Amount,{children:[(0,r.jsx)(i.Z,{size:16,contentColor:"positive"}),(0,r.jsx)(R.AmountTextPositive,{children:n.credits})]})]},n.id)),(!Z||0===Z.length)&&(0,r.jsx)(R.NoTransactions,{children:(0,r.jsxs)(R.Text,{children:[(0,r.jsx)(R.Label,{children:"No transactions"}),(0,r.jsx)(R.SubLabel,{})]})})]})]})};var q=X},41568:function(n,e,t){t.d(e,{Z:function(){return J}});var r=t(85893),o=t(67294),i=t(11163),c=t(30381),a=t.n(c),s=t(10484),l=t(56072),u=t(97675),d=t(19997),p=t(95600),f=t(79439);let g=f.u.injectEndpoints({endpoints:n=>({postNotificationAction:n.mutation({query:n=>({url:"notifications/".concat(n.id),method:"POST",body:n}),invalidatesTags:["CurrentUser"]})})}),{usePostNotificationActionMutation:h}=g;var m=t(88755),x=t(42916),v=t(37131),b=t(74539),C=t(62388),y=t(55054);let w=n=>{switch(n){case m.PG.DAILY:return m.Qc.AWARD;case m.PG.FIRST:case m.PG.SECOND:case m.PG.THIRD:case m.PG.TOP5:case m.PG.TOP10:case m.PG.TOP20:case m.PG.VOTE:default:return m.Qc.PRIZE}},Z=n=>n===m.PG.DAILY?m.Io.DAILY:m.Io.CHALLENGE;
1var j=t(7297),P=t(19521),I=t(56208),k=t(86926),S=t(90757);function T(){let n=(0,j.Z)(["\n padding: ",";\n display: flex;\n align-items: center;\n gap: ",";\n"]);return T=function(){return n},n}function D(){let n=(0,j.Z)(["\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n background-color: ",";\n "," {\n display: none;\n }\n "]);return D=function(){return n},n}function E(){let n=(0,j.Z)(["\n ","\n padding: ",";\n\n "," {\n padding: ",";\n }\n "]);return E=function(){return n},n}function B(){let n=(0,j.Z)(["\n padding: 0 ",";\n margin-bottom: ",";\n\n "," {\n display: none;\n }\n "]);return B=function(){return n},n}function L(){let n=(0,j.Z)(["\n display: flex;\n gap: ",";\n "]);return L=function(){return n},n}function M(){let n=(0,j.Z)(["\n padding: ",";\n display: flex;\n flex: 1;\n overflow-y: scroll;\n\n "," {\n max-height: ","; // // full height - nav + overflow into nav - space from bottom of page (24px) - height of popup title - potential banner height\n }\n "]);return M=function(){return n},n}function F(){let n=(0,j.Z)(["\n display: flex;\n flex-direction: column;\n gap: ",";\n "]);return F=function(){return n},n}function A(){let n=(0,j.Z)(["\n display: flex;\n flex-direction: column;\n gap: ",";\n "]);return A=function(){return n},n}function z(){let n=(0,j.Z)(["\n ","\n background: ",";\n border-radius: ",";\n "]);return z=function(){return n},n}function N(){let n=(0,j.Z)(["\n ","\n "]);return N=function(){return n},n}function $(){let n=(0,j.Z)(["\n margin-right: ",";\n "]);return $=function(){return n},n}function O(){let n=(0,j.Z)([""]);return O=function(){return n},n}function R(){let n=(0,j.Z)(["\n ","\n position: relative;\n cursor: ",";\n border-bottom: ",";\n ","\n &:last-child {\n border-bottom: none;\n }\n "]);return R=function(){return n},n}function H(){let n=(0,j.Z)(["\n flex: 1;\n "]);return H=function(){return n},n}function G(){let n=(0,j.Z)(["\n ","\n display: -webkit-box;\n -webkit-box-orient: vertical;\n line-clamp: 2;\n -webkit-line-clamp: 2;\n overflow: hidden;\n text-overflow: ellipsis;\n color: ",";\n "]);return G=function(){return n},n}function X(){let n=(0,j.Z)(["\n ","\n color: ",";\n padding-top: ",";\n "]);return X=function(){return n},n}function q(){let n=(0,j.Z)(["\n height: 12px;\n width: 12px;\n border-radius: 50%;\n background-color: ",";\n "]);return q=function(){return n},n}let W=(0,P.iv)(T(),n=>{let{theme:e}=n;return"".concat(e.spacing.MD," ").concat(e.spacing.XS," ").concat(e.spacing.MD," ").concat(e.spacing.SM)},n=>{let{theme:e}=n;return e.spacing.SM}),U={Header:P.ZP.div.withConfig({componentId:"sc-cbd43a40-0"})(D(),n=>{let{theme:e}=n;return e.backgroundColor.primary},k.BC.MD),Title:P.ZP.div.withConfig({componentId:"sc-cbd43a40-1"})(E(),I.ZP.HeadingSM,n=>{let{theme:e}=n;return"".concat(e.spacing.XS," ").concat(e.spacing.MD," ").concat(e.spacing.LG)},k.BC.MD,n=>{let{theme:e}=n;return"".concat(e.spacing.XL," ").concat(e.spacing.MD," ").concat(e.spacing.LG)}),ShopButton:P.ZP.div.withConfig({componentId:"sc-cbd43a40-2"})(B(),n=>{let{theme:e}=n;return e.spacing.MD},n=>{let{theme:e}=n;return e.spacing.MD},k.BC.MD),ShopButtonText:P.ZP.div.withConfig({componentId:"sc-cbd43a40-3"})(L(),n=>{let{theme:e}=n;return e.spacing["2XS"]}),NotificationsWrapper:P.ZP.div.withConfig({componentId:"sc-cbd43a40-4"})(M(),n=>{let{theme:e}=n;return"0 ".concat(e.spacing.MD)},k.BC.MD,n=>{let{theme:e}=n;return"calc(100vh - ".concat(e.sizing.desktop.navHeight," + ").concat(e.spacing.XS," - ").concat(e.spacing.LG," - 80px - 80px)")}),NotificationList:P.ZP.div.withConfig({componentId:"sc-cbd43a40-5"})(F(),n=>{let{theme:e}=n;return e.spacing.LG}),Actions:P.ZP.div.withConfig({componentId:"sc-cbd43a40-6"})(A(),n=>{let{theme:e}=n;return e.spacing.XS}),Action:P.ZP.div.withConfig({componentId:"sc-cbd43a40-7"})(z(),W,n=>{let{theme:e}=n;return e.backgroundColor.body},n=>{let{theme:e}=n;return e.borderRadius.MD}),ActionLabel:P.ZP.p.withConfig({componentId:"sc-cbd43a40-8"})(N(),I.ZP.ParagraphSM),Completed:P.ZP.div.withConfig({componentId:"sc-cbd43a40-9"})($(),n=>{let{theme:e}=n;return e.spacing.LG}),Notifications:P.ZP.div.withConfig({componentId:"sc-cbd43a40-10"})(O()),Notification:P.ZP.div.withConfig({componentId:"sc-cbd43a40-11"})(R(),W,n=>{let{$clickable:e}=n;return e?"pointer":"auto"},n=>{let{theme:e}=n;return"".concat(e.borderWidth[1]," solid ").concat(e.borderColor.subdued)},n=>{let{theme:e}=n;return(0,S.Mr)({backgroundColor:e.actionColor.hover})}),Text:P.ZP.div.withConfig({componentId:"sc-cbd43a40-12"})(H()),Label:P.ZP.p.withConfig({componentId:"sc-cbd43a40-13"})(G(),I.ZP.ParagraphSM,n=>{let{$failed:e,theme:t}=n;return e?t.contentColor.negative:t.contentColor.default}),SubLabel:P.ZP.p.withConfig({componentId:"sc-cbd43a40-14"})(X(),I.ZP.ParagraphXS,n=>{let{theme:e}=n;return e.contentColor.moreSubdued},n=>{let{theme:e}=n;return e.spacing["2XS"]}),NewIcon:P.ZP.div.withConfig({componentId:"sc-cbd43a40-15"})(q(),n=>{let{theme:e}=n;return e.actionColor.brand})};var _=t(79434),Y=t(52082);let V=n=>{let{handleBackClick:e}=n,t=(0,i.useRouter)(),{notifications:c,actions:f,rewards:g}=(0,Y.z)(),{isMobile:j}=(0,p.i)(),{hasAppstoreAccess:P,hasPlaystoreAccess:I}=(0,x.F)(),{setLocked:k}=(0,v.i)(),[S,T]=(0,o.useState)(""),[D,{isLoading:E}]=h(),{data:B}=(0,_.x)();(0,o.useEffect)(()=>{j?k(!0):k(!1)},[j]);let L=async n=>{n.isAction&&n.actionType&&(await D(n).unwrap(),(0,y.q)(m._q.RECEIVE,{credit_amount:"number"==typeof n.analyticsValue?n.analyticsValue:void 0,credit_currency:"gems",credit_name:Z(n.actionType),credit_category:w(n.actionType)}))},M=n=>{let e=(0,r.jsx)(l.Z,{symbol:"\uD83D\uDC8E",label:"Gem Stone",size:36});switch(n){case m.k$.ACTION:e=(0,r.jsx)(l.Z,{symbol:"\uD83D\uDC8E",label:"Gem Stone",size:36});break;case m.k$.BADGE:e=(0,r.jsx)(l.Z,{symbol:"\uD83C\uDFC5",label:"Medal",size:36});break;case m.k$.VIDEO:e=(0,r.jsx)(l.Z,{symbol:"\uD83C\uDFAC",label:"Clapper",size:36});break;case m.k$.STORY:e=(0,r.jsx)(l.Z,{symbol:"\uD83D\uDCD6",label:"Open book",size:36});break;
1case m.k$.MUSIC:e=(0,r.jsx)(l.Z,{symbol:"\uD83C\uDFB5",label:"Musical note",size:36});break;case m.k$.CHALLENGE:e=(0,r.jsx)(l.Z,{symbol:"âï¸",label:"Crossed Swords",size:36});break;default:e=(0,r.jsx)(l.Z,{symbol:"\uD83C\uDFAC",label:"Clapper",size:36})}return e},F=(0,o.useMemo)(()=>f&&(null==f?void 0:f.length)>0?(0,r.jsx)(U.Actions,{children:f.map(n=>{let e=!!n.actionType&&[m.PG.FIRST,m.PG.SECOND,m.PG.THIRD,m.PG.TOP10,m.PG.TOP20,m.PG.TOP5].includes(n.actionType);if(!e&&!(0,b.qP)(n))return(0,r.jsxs)(U.Action,{children:[M(n.type),(0,r.jsx)(U.Text,{children:(0,r.jsx)(U.ActionLabel,{children:n.message})}),n.completed?(0,r.jsx)(U.Completed,{children:(0,r.jsx)(d.Z,{contentColor:"positive"})}):(0,r.jsx)(s.Z,{size:"small",type:"secondary",text:"Claim",loading:E&&n.id===S,disabled:E,onClick:async()=>{var e;T(null!==(e=null==n?void 0:n.id)&&void 0!==e?e:""),await L(n),T("")}})]},"action-".concat(n.id))})}):null,[f,E,S]),A=(0,o.useMemo)(()=>g&&(null==g?void 0:g.length)>0?(0,r.jsx)(U.Actions,{children:g.map(n=>(0,r.jsxs)(U.Action,{children:[M(n.type),(0,r.jsx)(U.Text,{children:(0,r.jsx)(U.ActionLabel,{children:n.message})}),n.completed?(0,r.jsx)(U.Completed,{children:(0,r.jsx)(d.Z,{contentColor:"positive"})}):(0,r.jsx)(s.Z,{size:"small",type:"secondary",text:"Claim",loading:E&&n.id===S,disabled:E,onClick:async()=>{var e;T(null!==(e=null==n?void 0:n.id)&&void 0!==e?e:""),await L(n),T("")}})]},"reward-".concat(n.id)))}):null,[g,E,S]),z=(0,o.useMemo)(()=>{let n=n=>{n&&t.push(n)};return c&&(null==c?void 0:c.length)>0?(0,r.jsx)(U.Notifications,{children:c.map(t=>(0,r.jsxs)(U.Notification,{$clickable:!!(null==t?void 0:t.link),onClick:t.link?()=>n(t.link):e,children:[M(t.type),(0,r.jsxs)(U.Text,{children:[(0,r.jsx)(U.Label,{$failed:t.type===m.k$.MUSIC_FAIL||t.type===m.k$.STORY_FAIL||t.type===m.k$.VIDEO_FAIL,children:t.message}),(0,r.jsx)(U.SubLabel,{children:!!t.createdAt&&a()((0,C.F)(t.createdAt)).fromNow()})]}),!t.read&&(0,r.jsx)(U.NewIcon,{})]},"notification-".concat(t.id)))}):null},[c]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(U.Header,{children:(0,r.jsx)(u.Z,{onCloseClick:e,closePosition:"right"})}),(0,r.jsx)(U.Title,{children:"Notifications"}),(0,r.jsx)(U.NotificationsWrapper,{children:(0,r.jsxs)(U.NotificationList,{children:[A,F,z]})})]})};var J=o.memo(V)},59898:function(n,e,t){t.d(e,{Z:function(){return nn}});var r=t(85893),o=t(67294),i=t(41664),c=t.n(i),a=t(11163),s=t(40238),l=t(8484),u=t(41568),d=t(84147),p=t(51873),f=t(79434),g=t(7297),h=t(19521),m=t(56208);function x(){let n=(0,g.Z)([""]);return x=function(){return n},n}function v(){let n=(0,g.Z)(["\n padding: 0 ",";\n "]);return v=function(){return n},n}function b(){let n=(0,g.Z)(["\n ","\n display: block;\n padding: "," 0;\n "]);return b=function(){return n},n}function C(){let n=(0,g.Z)(["\n ","\n display: block;\n padding: "," 0;\n "]);return C=function(){return n},n}function y(){let n=(0,g.Z)(["\n padding: 0 ",";\n border-top: ",";\n "]);return y=function(){return n},n}let w={Account:h.ZP.div.withConfig({componentId:"sc-7d65ea2b-0"})(x()),Links:h.ZP.div.withConfig({componentId:"sc-7d65ea2b-1"})(v(),n=>{let{theme:e}=n;return e.spacing.MD}),LinkStyle:h.ZP.span.withConfig({componentId:"sc-7d65ea2b-2"})(b(),m.ZP.ParagraphMD,n=>{let{theme:e}=n;return e.spacing.SM}),Link:h.ZP.a.withConfig({componentId:"sc-7d65ea2b-3"})(C(),m.ZP.ParagraphMD,n=>{let{theme:e}=n;return e.spacing.SM}),Bottom:h.ZP.div.withConfig({componentId:"sc-7d65ea2b-4"})(y(),n=>{let{theme:e}=n;return e.spacing.MD},n=>{let{theme:e}=n;return"".concat(e.borderWidth[1]," solid ").concat(e.borderColor.subdued)})},Z=()=>{let{data:n}=(0,f.x)();return(0,r.jsxs)(w.Account,{children:[(0,r.jsxs)(w.Links,{children:[(0,r.jsx)(c(),{href:"/settings",passHref:!0,children:(0,r.jsx)(w.LinkStyle,{children:"Settings"})}),(null==n?void 0:n.isAdmin)&&(0,r.jsx)(c(),{href:"/admin",passHref:!0,children:(0,r.jsx)(w.LinkStyle,{children:"Admin Dashboard"})}),(0,r.jsx)(w.Link,{href:"mailto:[email protected]",children:"Feedback/Support"}),(0,r.jsx)(c(),{href:"/terms-of-service",passHref:!0,legacyBehavior:!0,children:(0,r.jsx)(w.Link,{children:"Terms"})})]}),(0,r.jsx)(w.Bottom,{children:(0,r.jsx)(w.Link,{onClick:()=>p.I.signOut(),children:"Log out"})})]})};var j=t(52082);function P(){let n=(0,g.Z)(["\n background-color: ",";\n position: absolute;\n z-index: 3000;\n top: ",";\n right: 0;\n display: flex;\n flex-direction: column;\n box-shadow: ",";\n border-radius: ",";\n"]);return P=function(){return n},n}function I(){let n=(0,g.Z)(["\n position: relative;\n cursor: pointer;\n"]);return I=function(){return n},n}function k(){let n=(0,g.Z)(["\n ","\n "]);return k=function(){return n},n}function S(){let n=(0,g.Z)(["\n ","\n "]);return S=function(){return n},n}function T(){let n=(0,g.Z)(["\n ","\n height: 24px;\n width: 24px;\n position: absolute;\n top: -",";\n right: -",";\n display: flex;\n justify-content: center;
1\n align-items: center;\n z-index: 1;\n color: ",";\n background-color: ",";\n border: "," solid\n ",";\n border-radius: 50%;\n "]);return T=function(){return n},n}function D(){let n=(0,g.Z)(["\n ","\n cursor: auto;\n width: 360px;\n "]);return D=function(){return n},n}function E(){let n=(0,g.Z)(["\n ","\n\n padding: ",";\n "]);return E=function(){return n},n}function B(){let n=(0,g.Z)(["\n ","\n width: 280px;\n "]);return B=function(){return n},n}let L=(0,h.iv)(P(),n=>{let{theme:e}=n;return e.backgroundColor.primary},n=>{let{theme:e}=n;return e.spacing["4XL"]},n=>{let{theme:e}=n;return e.elevation.level4},n=>{let{theme:e}=n;return e.borderRadius.MD}),M=(0,h.iv)(I()),F={IconWrapper:h.ZP.div.withConfig({componentId:"sc-b16579e-0"})(k(),M),IconWrapperAccount:h.ZP.div.withConfig({componentId:"sc-b16579e-1"})(S(),M),UnreadFlag:h.ZP.div.withConfig({componentId:"sc-b16579e-2"})(T(),m.ZP.ParagraphXS,n=>{let{theme:e}=n;return e.spacing.XS},n=>{let{theme:e}=n;return e.spacing.XS},n=>{let{theme:e}=n;return e.backgroundColor.primary},n=>{let{theme:e}=n;return e.actionColor.brand},n=>{let{theme:e}=n;return e.borderWidth[3]},n=>{let{theme:e}=n;return e.backgroundColor.body}),Popup:h.ZP.div.withConfig({componentId:"sc-b16579e-3"})(D(),L),PopupTitle:h.ZP.div.withConfig({componentId:"sc-b16579e-4"})(E(),m.ZP.HeadingSM,n=>{let{theme:e}=n;return"".concat(e.spacing.XL," ").concat(e.spacing.MD," ").concat(e.spacing.LG)}),AccountPopup:h.ZP.div.withConfig({componentId:"sc-b16579e-5"})(B(),L)},A=n=>{var e,t;let{isCreatePage:i}=n,{data:a,isSuccess:p}=(0,f.x)(),g=(0,o.useRef)(null),h=(0,o.useRef)(null),m=(0,o.useRef)(null),[x,v]=(0,o.useState)(!1),[b,C]=(0,o.useState)(!1),[y,w]=(0,o.useState)(!1),{unreadCount:P,markNotificationsAsRead:I}=(0,j.z)(),k=n=>{let e=n.target;if(x){let n=h.current&&h.current.contains(e);n||(I(),v(!1))}if(b){let n=g.current&&g.current.contains(e);n||C(!1)}if(y){let n=m.current&&m.current.contains(e);n||w(!1)}};return(0,o.useEffect)(()=>(document.addEventListener("mousedown",k),()=>{document.removeEventListener("mousedown",k)}),[x,b,y]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(F.IconWrapper,{ref:h,children:[(0,r.jsx)(s.Z,{type:"secondary",size:"medium",icon:"Notifications",onClick:()=>{w(!1),C(!1),x&&I(),v(!x)},topRightContent:P>0&&(0,r.jsx)(F.UnreadFlag,{children:P>99?"99+":P})}),x&&(0,r.jsx)(F.Popup,{children:(0,r.jsx)(u.Z,{handleBackClick:()=>{I(),v(!1)}})})]}),!i&&(0,r.jsxs)(F.IconWrapper,{ref:g,children:[(0,r.jsx)(s.Z,{type:"secondary",size:"medium",icon:"Credits",text:"".concat(null!==(e=null==a?void 0:a.credits)&&void 0!==e?e:0),onClick:()=>{w(!1),v(!1),C(!b)}}),b&&(0,r.jsx)(F.Popup,{children:(0,r.jsx)(d.Z,{})})]}),p&&!i&&(0,r.jsx)(c(),{href:"/@".concat(null==a?void 0:a.username),children:(0,r.jsx)(l.Z,{username:null!==(t=null==a?void 0:a.displayName)&&void 0!==t?t:"",size:48,avatar:null==a?void 0:a.avatar})}),(0,r.jsxs)(F.IconWrapperAccount,{ref:m,children:[(0,r.jsx)(s.Z,{type:"secondary",size:"medium",icon:y?"Close":"Menu",onClick:()=>{C(!1),v(!1),w(!y)}}),y&&(0,r.jsx)(F.AccountPopup,{children:(0,r.jsx)(Z,{})})]})]})};var z=t(36900),N=t(10484),$=t(66289);function O(){let n=(0,g.Z)(["\n ","\n padding: ",";\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n "]);return O=function(){return n},n}let R={Link:h.ZP.a.withConfig({componentId:"sc-fcaa09f7-0"})(O(),m.ZP.ParagraphMD,n=>{let{theme:e}=n;return e.spacing.MD})},H=()=>{let n=(0,z.TL)(),e=(0,a.useRouter)();return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(R.Link,{onClick:async()=>{await n((0,$.RZ)("login")),e.push("/login")},children:"Log in"}),(0,r.jsx)(N.Z,{text:"Get Started",type:"primary",size:"medium",onClick:async()=>{await n((0,$.RZ)("signup")),e.push("/login")}})]})};var G=t(25974),X=t(86926);function q(){let n=(0,g.Z)(["\n width: 100%;\n height: ",";\n background-color: ",";\n border-bottom: "," solid\n ",";\n\n "," {\n height: ",";\n }\n "]);return q=function(){return n},n}function W(){let n=(0,g.Z)(["\n display: flex;\n justify-content: space-between;
1\n align-items: center;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n padding: ",";\n\n "," {\n padding: ",";\n }\n "]);return W=function(){return n},n}function U(){let n=(0,g.Z)(["\n display: flex;\n align-items: center;\n height: 100%;\n "]);return U=function(){return n},n}function _(){let n=(0,g.Z)(["\n font-family: ",";\n font-weight: ",";\n font-size: ",";\n line-height: ",";\n color: ",";\n "]);return _=function(){return n},n}function Y(){let n=(0,g.Z)(["\n display: none;\n\n "," {\n display: flex;\n padding-left: ",";\n height: 100%;\n }\n "]);return Y=function(){return n},n}function V(){let n=(0,g.Z)(["\n ","\n ","\n height: 100%;\n box-sizing: border-box;\n padding: ",";\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n\n &:hover {\n background-color: ",";\n }\n\n &:pressed {\n background-color: ",";\n }\n "]);return V=function(){return n},n}function J(){let n=(0,g.Z)(["\n display: flex;\n gap: ",";\n "]);return J=function(){return n},n}let K={TopNav:h.ZP.div.withConfig({componentId:"sc-869f42d6-0"})(q(),n=>{let{theme:e}=n;return e.sizing.mobile.navHeight},n=>{let{theme:e}=n;return e.backgroundColor.primary},n=>{let{theme:e}=n;return e.borderWidth[1]},n=>{let{theme:e}=n;return e.borderColor.subdued},X.BC.MD,n=>{let{theme:e}=n;return e.sizing.desktop.navHeight}),TopNavInner:h.ZP.div.withConfig({componentId:"sc-869f42d6-1"})(W(),n=>{let{theme:e}=n;return"".concat(e.spacing.SM," ").concat(e.spacing.MD)},X.BC.MD,n=>{let{theme:e}=n;return"0 ".concat(e.spacing.LG)}),LeftNav:h.ZP.div.withConfig({componentId:"sc-869f42d6-2"})(U()),Logo:h.ZP.a.withConfig({componentId:"sc-869f42d6-3"})(_(),n=>{let{theme:e}=n;return e.typeface.owners},n=>{let{theme:e}=n;return e.fontWeight.extrabold},n=>{let{theme:e}=n;return e.fontSize[400]},n=>{let{theme:e}=n;return e.lineHeight[300]},n=>{let{theme:e}=n;return e.contentColor.default}),Links:h.ZP.div.withConfig({componentId:"sc-869f42d6-4"})(Y(),X.BC.MD,n=>{let{theme:e}=n;return e.spacing["6XL"]}),Link:h.ZP.a.withConfig({componentId:"sc-869f42d6-5"})(V(),m.ZP.ParagraphMD,n=>{let{$isActive:e}=n;return e?m.ZP.Bold:""},n=>{let{theme:e}=n;return e.spacing.MD},n=>{let{theme:e}=n;return e.actionColor.hover},n=>{let{theme:e}=n;return e.actionColor.pressed}),RightNav:h.ZP.div.withConfig({componentId:"sc-869f42d6-6"})(J(),n=>{let{theme:e}=n;return e.spacing.XS})},Q=()=>{let n=(0,z.CG)(G.c7),{data:e}=(0,f.x)(),t=(0,a.useRouter)();return(0,r.jsx)(K.TopNav,{children:(0,r.jsxs)(K.TopNavInner,{children:[(0,r.jsxs)(K.LeftNav,{children:[(0,r.jsx)(c(),{href:n?"/explore":"/",passHref:!0,legacyBehavior:!0,children:(0,r.jsx)(K.Logo,{children:"twisty"})}),(0,r.jsx)(K.Links,{children:n&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(c(),{href:"/explore",passHref:!0,legacyBehavior:!0,children:(0,r.jsx)(K.Link,{$isActive:"/explore"===t.pathname,children:"Explore"})}),(null==e?void 0:e.isAdmin)&&(0,r.jsx)(c(),{href:"/create",passHref:!0,legacyBehavior:!0,children:(0,r.jsx)(K.Link,{$isActive:"/create"===t.pathname,children:"Create"})}),(0,r.jsx)(c(),{href:"/challenges",passHref:!0,legacyBehavior:!0,children:(0,r.jsx)(K.Link,{$isActive:t.pathname.indexOf("/challenges")>-1,children:"Challenges"})})]})})]}),(0,r.jsx)(K.RightNav,{children:n?(0,r.jsx)(A,{}):(0,r.jsx)(H,{})})]})})};var nn=Q},8484:function(n,e,t){t.d(e,{Z:function(){return v}});var r=t(85893),o=t(67294),i=t(66544),c=t(7297),a=t(19521),s=t(73778);function l(){let n=(0,c.Z)(["\n ","\n"]);return l=function(){return n},n}function u(){let n=(0,c.Z)(["\n position: relative;\n width: ",";\n height: ",";\n "]);return u=function(){return n},n}function d(){let n=(0,c.Z)(["\n border-radius: 50%;\n max-width: 100%;\n max-height: 100%;\n "]);return d=function(){return n},n}function p(){let n=(0,c.Z)(["\n width: ",";\n height: ",";\n border-radius: 50%;\n max-width: 100%;\n max-height: 100%;\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n background-color: ",";\n "]);return p=function(){return n},n}function f(){let n=(0,c.Z)(["\n font-family: ",";\n font-weight: ",";\n line-height: 1;\n font-size: ",";\n color: ",";\n "]);return f=function(){return n},n}let g=(0,a.iv)(l(),n=>{let{$username:e,$position:t,theme:r}=n,o=[{background:r.color.pink["100"],foreground:r.color.pink["500"]},{background:r.color.pink["500"],foreground:r.color.pink["100"]},{background:r.color.scarlet["100"],foreground:r.color.scarlet["500"]},{background:r.color.orange["500"],foreground:r.color.orange["100"]},{background:r.color.cactus["100"],foreground:r.color.cactus["500"]},{background:r.color.cactus["500"],foreground:r.color.cactus["100"]},{background:r.color.green["100"],foreground:r.color.green["500"]},{background:r.color.indigo["100"],foreground:r.color.indigo["500"]},{background:r.color.indigo["500"],foreground:r.color.indigo["100"]}],i=0,c;for(c=0;c<(null==e?void 0:e.length);c++)i=(i<<5)-i+(null==e?void 0:e.charCodeAt(c))|0;let a=o[Math.abs(i)%o.length];return a[t]}),h={Container:a.ZP.div.withConfig({componentId:"sc-412fb864-0"})(u(),n=>{let{$size:e}=n;return"".concat(e,"px")},n=>{let{$size:e}=n;return"".concat(e,"px")}),Avatar:(0,a.ZP)(s.ZP).withConfig({componentId:"sc-412fb864-1"})(d()),AvatarCircle:a.ZP.div.withConfig({componentId:"sc-412fb864-2"})(p(),n=>{let{$size:e}=n;return"".concat(e,"px")},n=>{let{$size:e}=n;return"".concat(e,"px")},g),Initials:a.ZP.p.withConfig({componentId:"sc-412fb864-3"})(f(),n=>{let{theme:e}=n;return e.typeface.owners},n=>{let{theme:e}=n;return e.fontWeight.medium},n=>{let{$size:e}=n;switch(e){case"small":return"17.8px";case"medium":return"40px";case"large":return"53.3px";case"xlarge":return"66.7px";default:return"".concat(.55*e,"px")}},g)};var m=t(74255);let x=n=>{let{avatar:e,username:t,size:o}=n,c=(()=>{switch(o){case"small":return 32;case"medium":return 72;case"large":return 96;case"xlarge":return 120;default:return o}})();if(e)return(0,r.jsx)(h.Container,{$size:c,children:(0,r.jsx)(h.Avatar,{src:(0,i.d)(e),htmlAttributes:{alt:t},height:c,width:c,imgixParams:{fit:"crop"}})});if(!e&&!t)return(0,r.jsx)(h.Container,{$size:c,children:(0,r.jsx)(m.Z,{size:c})});let a="".concat(null==t?void 0:t.charAt(0).toUpperCase());return(0,r.jsx)(h.AvatarCircle,{$size:c,$username:t,$position:"background",children:(0,r.jsx)(h.Initials,{$size:o,$username:t,$position:"foreground",children:a})})};var v=o.memo(x)},10484:function(n,e,t){var r=t(85893),o=t(67294),i=t(41664),c=t.n(i),a=t(69898),s=t(58600),l=t(42316);let u=n=>{let{text:e,type:t,disabled:o=!1,onClick:i,width:u,loading:d=!1,icon:p,imgIcon:f,videoIcon:g,size:h,href:m,title:x,tabIndex:v,contentColor:b,selected:C=!1}=n,y=n=>(n.stopPropagation(),i)?i(n):null,w=n=>{if("Enter"===n.key&&!o&&!d&&i)return i()},Z=()=>"primary inverse"===t||"secondary inverse"===t||"tertiary inverse"===t?"inverse":"default",j=()=>{let n=p?a.Z[p]:null;return(0,r.jsx)(l.ZP.ButtonWrapper,{width:u,$type:t,disabled:o||d,$selected:C,children:(0,r.jsx)(l.ZP.Button,{disabled:o||d,$isLoading:d,$size:h,$type:t,width:u,children:(0,r.jsxs)(l.ZP.TextWrapper,{children:[n&&(0,r.jsx)(l.ZP.Icon,{children:(0,r.jsx)(n,{contentColor:o?l.bm[t]:l.Aq[t],size:"small"===h?20:24})}),f&&(0,r.jsx)(l.ZP.ImgIcon,{as:"img",src:f,$size:h}),g&&(0,r.jsx)(l.ZP.ImgIcon,{as:"video",src:g,loop:!0,autoPlay:!0,muted:!0,playsInl
1ine:!0,$size:h}),(0,r.jsx)(l.ZP.Text,{$type:t,disabled:o||d,$isLoading:d,$size:h,$contentColor:b,children:e}),d&&(0,r.jsx)(l.ZP.LoaderWrapper,{children:(0,r.jsx)(s.Z,{size:"small",type:Z()})})]})})})};return m&&!o?(0,r.jsx)(c(),{href:m,passHref:!0,legacyBehavior:!0,children:(0,r.jsx)(l.ZP.ButtonWrapperOuter,{width:u,as:"a",title:x,tabIndex:null!=v?v:0,disabled:!1,"aria-disabled":!1,children:j()})}):(0,r.jsx)(l.ZP.ButtonWrapperOuter,{width:u,tabIndex:o?-1:v||0,onKeyDown:w,title:x,onClick:o||d?void 0:y,disabled:o||d,children:j()})};e.Z=o.memo(u)},56072:function(n,e,t){t.d(e,{Z:function(){return s}});var r=t(85893),o=t(67294),i=t(19521);let c={};c.Emoji=i.ZP.span.withConfig({componentId:"sc-e63f4ab0-0"})(n=>"\n display: inline-block;\n ".concat(n.$size?"font-size: ".concat(n.$size,"px;"):"","}\n"));let a=n=>{let{label:e,symbol:t,size:o}=n;return(0,r.jsx)(c.Emoji,{role:"img","aria-label":e||"","aria-hidden":e?"false":"true",$size:o,children:t})};var s=o.memo(a)},97675:function(n,e,t){t.d(e,{Z:function(){return g}});var r=t(85893),o=t(67294),i=t(40238),c=t(7297),a=t(19521),s=t(86926);function l(){let n=(0,c.Z)(["\n width: 100%;\n padding: ",";\n box-sizing: border-box;\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: ",";\n min-height: 64px;\n position: relative;\n\n "," {\n min-height: 80px;\n padding: ",";\n }\n "]);return l=function(){return n},n}function u(){let n=(0,c.Z)(["\n flex: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n "]);return u=function(){return n},n}function d(){let n=(0,c.Z)(["\n min-width: 48px;\n min-height: 48px;\n "]);return d=function(){return n},n}let p={Header:a.ZP.div.withConfig({componentId:"sc-1efc540c-0"})(l(),n=>{let{theme:e}=n;return e.spacing.XS},n=>{let{theme:e}=n;return e.spacing.SM},s.BC.MD,n=>{let{theme:e}=n;return"".concat(e.spacing.MD," ").concat(e.spacing.LG)}),CenterContent:a.ZP.div.withConfig({componentId:"sc-1efc540c-1"})(u()),SideContent:a.ZP.div.withConfig({componentId:"sc-1efc540c-2"})(d())},f=n=>{let{onBackClick:e,onCloseClick:t,rightContent:o,centerContent:c,closePosition:a="left"}=n;return(0,r.jsxs)(p.Header,{children:[(0,r.jsxs)(p.SideContent,{children:[e&&(0,r.jsx)(i.Z,{icon:"ChevronLeft",contentColor:"subdued",type:"tertiary",size:"medium",onClick:e}),t&&"left"===a&&(0,r.jsx)(i.Z,{icon:"Close",contentColor:"subdued",type:"tertiary",size:"medium",onClick:t})]}),c&&(0,r.jsx)(p.CenterContent,{children:c}),(0,r.jsxs)(p.SideContent,{children:[o,t&&"right"===a&&(0,r.jsx)(i.Z,{icon:"Close",contentColor:"subdued",type:"tertiary",size:"medium",onClick:t})]})]})};var g=o.memo(f)},40238:function(n,e,t){t.d(e,{Z:function(){return j}});var r=t(85893);t(67294);var o=t(41664),i=t.n(o),c=t(69898),a=t(58600),s=t(7297),l=t(19521),u=t(56208),d=t(90757),p=t(42316);function f(){let n=(0,s.Z)(["\n ","\n"]);return f=function(){return n},n}function g(){let n=(0,s.Z)(["\n ","\n"]);return g=function(){return n},n}function h(){let n=(0,s.Z)(["\n display: inline-flex;\n position: relative;\n height: ",";\n min-width: ",";\n cursor: ",";\n appearance: none;\n padding: 0;\n background: none;\n border: none;\n\n ","\n\n &::selection {\n background: none;\n }\n\n ","\n\n ","\n "]);return h=function(){return n},n}function m(){let n=(0,s.Z)(["\n height: ",";\n min-width: ",";\n display: inline-flex;\n padding: ",";\n justify-content: center;
1\n align-items: center;\n box-sizing: border-box;\n border-radius: 100px;\n position: relative;\n background-color: ",";\n "]);return m=function(){return n},n}function x(){let n=(0,s.Z)(["\n ","\n color: ",";\n padding-left: ",";\n "]);return x=function(){return n},n}function v(){let n=(0,s.Z)(["\n position: absolute;\n top: 0;\n right: 0;\n "]);return v=function(){return n},n}function b(){let n=(0,s.Z)(["\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n "]);return b=function(){return n},n}let C=(0,l.iv)(f(),n=>{let{$size:e}=n;return"small"===e?"32px":"48px"}),y=(0,l.iv)(g(),n=>{let{$size:e,theme:t}=n;return"small"===e?"0 ".concat(t.spacing["2XS"]):"0 ".concat(t.spacing.SM)}),w={ButtonWrapper:l.ZP.button.withConfig({componentId:"sc-5ed4de4e-0"})(h(),C,C,n=>{let{disabled:e}=n;return e?"auto":"pointer"},n=>{let{$dropShadow:e,theme:t}=n;return e?"svg {\n filter: drop-shadow( 0px 0px 2px ".concat(t.backgroundColor.blackTransparent,");\n }"):""},n=>{let{theme:e,$type:t,disabled:r}=n;return(0,d.Mr)({backgroundColor:e.actionColor[p.BL[t]],disabled:r,borderRadius:"100px"})},n=>{let{$selected:e,theme:t,disabled:r}=n;return e?(0,d.hv)({theme:t,disabled:r,borderRadius:"100px"}):""}),Button:l.ZP.div.withConfig({componentId:"sc-5ed4de4e-1"})(m(),C,C,y,n=>{let{disabled:e}=n;return e?p.S6:p.Cz}),Text:l.ZP.p.withConfig({componentId:"sc-5ed4de4e-2"})(x(),u.ZP.ButtonLabelMD,n=>{let{theme:e}=n;return e.contentColor.default},n=>{let{theme:e}=n;return e.spacing["2XS"]}),TopRightContent:l.ZP.img.withConfig({componentId:"sc-5ed4de4e-3"})(v()),LoaderWrapper:l.ZP.div.withConfig({componentId:"sc-5ed4de4e-4"})(b())},Z=n=>{let{type:e,disabled:t=!1,loading:o=!1,onClick:s,icon:l,text:u,size:d,href:f,contentColor:g,topRightContent:h,selected:m=!1,targetBlank:x=!1,noFocus:v=!1,dropShadow:b=!1}=n,C=c.Z[l],y=n=>(n.stopPropagation(),s)?s(n):null,Z=n=>{if("Enter"===n.key&&!t&&s)return s()},j=()=>["primary inverse","secondary inverse","tertiary inverse"].includes(e)?"inverse":"default",P=()=>{if(o)return(0,r.jsx)(w.LoaderWrapper,{children:(0,r.jsx)(a.Z,{size:"small",type:j()})});let n=t?p.bm[e]:p.Aq[e];return(0,r.jsxs)(w.Button,{$type:e,disabled:t,$size:d,children:[(0,r.jsx)(C,{size:24,contentColor:(("tertiary"===e||"secondary"===e||"primary inverse"===e)&&g?g:null)||n}),u&&(0,r.jsx)(w.Text,{children:u})]})};return f&&!t?(0,r.jsx)(i(),{href:f,passHref:!0,legacyBehavior:!0,children:(0,r.jsx)(w.ButtonWrapper,{$dropShadow:b,tabIndex:0,$type:e,$selected:m,$size:d,as:"a",disabled:!1,target:x?"_blank":"_self",$noFocus:v,children:P()})}):(0,r.jsxs)(w.ButtonWrapper,{$dropShadow:b,tabIndex:t?-1:0,onKeyDown:Z,$size:d,onClick:t?void 0:y,$type:e,disabled:t,$selected:m,$noFocus:v,children:[h&&(0,r.jsx)(w.TopRightContent,{as:"div",children:h}),P()]})};var j=Z},42127:function(n,e,t){var r=t(85893),o=t(67294),i=t(19521),c=t(74539);let a=n=>{let{width:e,height:t,contentColor:i,theme:a,...s}=n,[l,u]=(0,o.useState)(0),[d,p]=(0,o.useState)(0),f=()=>{let n=267.23;e&&(n=e),t&&!e&&(n=267.23*t/349),p(n)},g=()=>{let n=349;e&&(n=349*e/267.23),t&&!e&&(n=t),u(n)};return(0,o.useEffect)(()=>{f(),g()},[e,t]),(0,r.jsxs)("svg",{id:"Layer_1","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 ".concat(267.23," ").concat(349),width:d,height:l,...s,children:[(0,r.jsxs)("defs",{children:[(0,r.jsxs)("linearGradient",{id:"linear-gradient",x1:"244.32",y1:"126.7",x2:"244.4",y2:"80.76",gradientTransform:"translate(326.47 300.47) rotate(-180)",gradientUnits:"userSpaceOnUse",children:[(0,r.jsx)("stop",{offset:".12",stopColor:"#000"}),(0,r.jsx)("stop",{offset:".85",stopColor:"#fff",stopOpacity:"0"})]}),(0,r.jsxs)("linearGradient",{id:"linear-gradient-1",x1:"133.63",y1:"8.14",x2:"133.59",y2:"343.01",gradientUnits:"userSpaceOnUse",children:[(0,r.jsx)("stop",{offset:"0",stopColor:"#ff00fd"}),(0,r.jsx)("stop",{offset:".19",stopColor:"#ff00fb"}),(0,r.jsx)("stop",{offset:".26",stopColor:"#ff02f4"}),(0,r.jsx)("stop",{offset:".31",stopColor:"#ff06e8"}),(0,r.jsx)("stop",{offset:".34",stopColor:"#ff0bd7"}),(0,r.jsx)("stop",{offset:".38",stopColor:"#ff12c1"}),(0,r.jsx)("stop",{offset:".41",stopColor:"#ff1ba6"}),(0,r.jsx)("stop",{offset:".44",stopColor:"#ff2585"}),(0,r.jsx)("stop",{offset:".46",stopColor:"#ff3160"}),(0,r.jsx)("stop",{offset:".48",stopColor:"#ff3f35"}),(0,r.jsx)("stop",{offset:".5",stopColor:"#ff4d07"}),(0,r.jsx)("stop",{offset:".51",stopColor:"#ff5001"}),(0,r.jsx)("stop",{offset:".51",stopColor:"#f75109"}),(0,r.jsx)("stop",{offset:".53",stopColor:"#cc5837"}),(0,r.jsx)("stop",{offset:".55",stopColor:"#a35e62"}),(0,r.jsx)("stop",{offset:".58",stopColor:"#806487"}),(0,r.jsx)("stop",{offset:".6",stopColor:"#6169a8"}),(0,r.jsx)("stop",{offset:".63",stopColor:"#476dc3"}),(0,r.jsx)("stop",{offset:".66",stopColor:"#3370d9"}),(0,r.jsx)("stop",{offset:".7",stopColor:"#2372ea"}),(0,r.jsx)("stop",{offset:".75",stopColor:"#1874f6"}),(0,r.jsx)("stop",{offset:".81",stopColor:"#1175fd"}),(0,r.jsx)("stop",{offset:"1",stopColor:"#1076ff"})]}),(0,r.jsx)("linearGradient",{id:"linear-gradient-2",x1:"103.66",y1:"130.68",x2:"103.75",y2:"84.59",gradientTransform:"translate(20.11 48.77)",xlinkHref:"#linear-gradient"})]}),(0,r.jsx)("path",{d:"m163.56,349c-25.8,0-51.3-8.83-69.96-24.22-10.03-8.27-17.9-18.14-23.4-29.34-5.89-11.99-8.88-25.17-8.88-39.18v-50.1c0-10.69,6.36-20.62,18.9-29.52-9.62-6.73-18.9-16.41-18.9-28.72v-23.78H26.52c-14.13,0-26.52-13.3-26.52-28.46v-54.8h61.33V0h83.26v40.88h73.94c6.65,0,13.45,2.47,18.66,6.77,6.02,4.99,9.34,11.74,9.34,19.01v57.49h-101.94v23.82c-.01,1.91-.24,3.82-.69,5.7l-.12.5-.02.03c-2.08,7.99-8.13,15.51-17.99,22.37,12.41,8.65,18.74,18.21,18.81,28.42v50.39c1.29,6.04,11.15,9.29,19.94,9.29h.39c8.79-.1,18.48-3.49,19.12-9.56l1.03-9.82h82.17v10.97c0,14.05-2.96,27.23-8.79,39.19-5.48,11.25-13.36,21.13-23.42,29.38-19.01,15.58-44.39,24.16-71.46,24.16Zm-60.63-160.41c-12.35,6.06-19.67,13.57-19.67,17.58v50.1c0,26.07,13.21,42.44,24.3,51.59,14.8,12.2,35.21,19.2,56,19.2,22.02,0,42.46-6.82,57.55-19.19,12.9-10.58,20.91-24.55,23.37-40.63h-41.54c-2.65,5.2-6.92,9.62-12.51,12.9-6.94,4.07-15.92,6.38-25.27,6.49h-.69c-9.3,0-18.31-2.16-25.37-6.09-9.32-5.19-15.13
1-13.31-16.36-22.86l-.09-.68v-51.88c-.02-1.46-2.23-5.76-10.49-11.27-3.39-2.26-6.8-4.07-9.22-5.26ZM21.94,95.69c0,3.3,2.9,6.52,4.58,6.52h56.74v45.72c0,2.02,2.73,6.2,10.44,11.33,3.42,2.28,6.87,4.1,9.29,5.27,8.62-4.17,17.65-10.53,19.4-15.43.16-.45.24-.87.25-1.24v-45.65h101.94v-35.55c0-1.14-2.35-3.84-6.05-3.84h-95.88V21.94h-39.38v40.88H21.94v32.86Z",fill:i?(0,c.vq)(i)?i:a.contentColor[i]:"url(#linear-gradient-1)"}),(0,r.jsx)("path",{opacity:.4,fill:"url(#linear-gradient)",d:"m102.94,188.58c-8.75,4.27-19.42,11.87-19.67,17.58,0,0-.02,3.45-.02,5.15s.02,5.48.02,5.48h-21.94v-8.23c-.46-12.92,5.73-21.36,15.81-29.63l3.13-2.29"}),(0,r.jsx)("path",{opacity:.4,fill:"url(#linear-gradient-2)",d:"m103,164.53c7.82-3.84,20.27-11.61,19.65-17.61v-10.62h21.94v8.24c.66,13.35-5.47,21.39-15.56,29.65l-3.25,2.39"})]})};e.Z=(0,i.Zz)(a)},69726:function(n,e,t){t.d(e,{Z:function(){return m}});var r=t(85893),o=t(67294),i=t(69898),c=t(7297),a=t(19521),s=t(56208);function l(){let n=(0,c.Z)(["\n ","\n"]);return l=function(){return n},n}function u(){let n=(0,c.Z)(["\n position: relative;\n cursor: pointer;\n display: inline-flex;\n align-items: center;\n padding: ",";\n\n ","\n\n ","\n\n ","\n "]);return u=function(){return n},n}function d(){let n=(0,c.Z)(["\n margin-right: ",";\n display: flex;\n "]);return d=function(){return n},n}function p(){let n=(0,c.Z)(["\n ","\n color: ",";\n white-space: nowrap;\n "]);return p=function(){return n},n}let f=(0,a.iv)(l(),n=>{let{$type:e,$selected:t,$pressed:r,$hovered:o,theme:i}=n;
1return t||r||o?"default"===e?i.contentColor.default:i.contentColor.inverse:i.contentColor.moreSubdued}),g={Tab:a.ZP.div.withConfig({componentId:"sc-63c7e7ab-0"})(u(),n=>{let{theme:e}=n;return"".concat(e.spacing.MD," ").concat(e.spacing.SM)},n=>{let{$hovered:e,theme:t,$type:r}=n,o="default"===r?t.actionColor.hover:t.actionColor.inverseHover;return e?"background-color: ".concat(o,";"):""},n=>{let{$pressed:e,theme:t,$type:r}=n,o="default"===r?t.actionColor.pressed:t.actionColor.inversePressed;return e?"background-color: ".concat(o,";"):""},n=>{let{$selected:e,theme:t}=n;return e?" &:after {\n content: '';\n background-color: ".concat(t.actionColor.brand,";\n height: ").concat(t.borderWidth[4],";\n position: absolute;\n left: 0;\n right: 0;\n bottom: 0;\n }"):""}),Icon:a.ZP.div.withConfig({componentId:"sc-63c7e7ab-1"})(d(),n=>{let{theme:e}=n;return e.spacing.XS}),Text:a.ZP.div.withConfig({componentId:"sc-63c7e7ab-2"})(p(),n=>{let{$size:e}=n;return"medium"===e?s.ZP.HeadingXS:s.ZP.Heading2XS},f)},h=n=>{let{text:e,type:t,onClick:c,icon:a,selected:s,size:l="medium"}=n,[u,d]=(0,o.useState)(!1),[p,f]=(0,o.useState)(!1),h=n=>(n.stopPropagation(),c)?c(n):null,m=a?i.Z[a]:null;return(0,r.jsxs)(g.Tab,{$type:t,onClick:h,$selected:s,$pressed:p,$hovered:u,tabIndex:0,onTouchStart:()=>{f(!0)},onTouchEnd:()=>{f(!1)},onMouseDown:()=>{f(!0)},onMouseUp:()=>{f(!1)},onMouseEnter:()=>{d(!0)},onMouseLeave:()=>{d(!1)},children:[m&&(0,r.jsx)(g.Icon,{children:(0,r.jsx)(m,{contentColor:s||p||u?"default"===t?"default":"inverse":"moreSubdued",size:24})}),(0,r.jsx)(g.Text,{$type:t,$selected:s,$pressed:p,$hovered:u,$size:l,children:e})]})};var m=h},62967:function(n,e,t){t.d(e,{Z:function(){return B}});var r=t(85893),o=t(67294),i=t(10484),c=t(7297),a=t(19521);let s=n=>{let e=n.split("), "),t=e.map(n=>{let e=n.split("px");return e.splice(3,1),"drop-shadow(".concat(e.join("px"),")")});return t.join(") ")};var l=t(56208);function u(){let n=(0,c.Z)(["\n ","\n"]);return u=function(){return n},n}function d(){let n=(0,c.Z)(["\n ","\n"]);return d=function(){return n},n}function p(){let n=(0,c.Z)(["\n ","\n"]);return p=function(){return n},n}function f(){let n=(0,c.Z)(["\n ","\n"]);return f=function(){return n},n}function g(){let n=(0,c.Z)(["\n ","\n"]);return g=function(){return n},n}function h(){let n=(0,c.Z)(["\n position: relative;\n "]);return h=function(){return n},n}function m(){let n=(0,c.Z)(["\n padding: ",";\n white-space: ",";\n background: ",";\n box-sizing: border-box;\n border-radius: ",";\n width: ",";\n filter: ",";\n will-change: filter;\n position: relative;\n "]);return m=function(){return n},n}function x(){let n=(0,c.Z)(["\n ","\n color: ",";\n "]);return x=function(){return n},n}function v(){let n=(0,c.Z)(["\n ","\n color: ",";\n "]);return v=function(){return n},n}function b(){let n=(0,c.Z)(["\n margin-top: ",";\n display: flex;\n justify-content: flex-end;\n "]);return b=function(){return n},n}function C(){let n=(0,c.Z)(["\n width: 0;\n height: 0;\n border-left: ",";\n border-right: ",";\n border-top: ",";\n border-bottom: ",";\n position: absolute;\n top: ",";\n bottom: ",";\n left: ",";\n right: ",";\n transform: ",";\n "]);return C=function(){return n},n}let y="10px",w="18px",Z=n=>({positionTop:["top","top-start","top-end"].includes(n),positionBottom:["bottom","bottom-start","bottom-end"].includes(n),positionLeft:["left","left-start","left-end"].includes(n),positionRight:["right","right-start","right-end"].includes(n)}),j=n=>{let{$callout:e,$inverse:t,$error:r,theme:o}=n;return r?o.backgroundColor.negative:e?o.actionColor.brand:t?o.backgroundColor.inversePrimary:o.backgroundColor.primary},P=(0,a.iv)(u(),n=>{let{$position:e,$callout:t,$inverse:r,$error:o,theme:i}=n,{positionTop:c,positionBottom:a,positionLeft:s}=Z(e),l="none";return c||a?l="".concat(6,"px solid transparent"):s&&(l="".concat(6,"px solid ").concat(j({$callout:t,$inverse:r,$error:o,theme:i}))),l}),I=(0,a.iv)(d(),n=>{let{$position:e,$callout:t,$inverse:r,$error:o,theme:i}=n,{positionTop:c,positionBottom:a,positionRight:s}=Z(e),l="none";return c||a?l="".concat(6,"px solid transparent"):s&&(l="".concat(6,"px solid ").concat(j({$callout:t,$inverse:r,$error:o,theme:i}))),l}),k=(0,a.iv)(p(),n=>{let{$position:e,$callout:t,$inverse:r,$error:o,theme:i}=n,{positionTop:c,positionRight:a,positionLeft:s}=Z(e),l="none";return c?l="".concat(6,"px solid ").concat(j({$callout:t,$inverse:r,$error:o,theme:i})):(a||s)&&(l="".concat(6,"px solid transparent")),l}),S=(0,a.iv)(f(),n=>{let{$position:e,$callout:t,$inverse:r,$error:o,theme:i}=n,{positionBottom:c,positionRight:a,positionLeft:s}=Z(e),l="none";return c?l="".concat(6,"px solid ").concat(j({$callout:t,$inverse:r,$error:o,theme:i})):(a||s)&&(l="".concat(6,"px solid transparent")),l}),T=(0,a.iv)(g(),n=>{let{$callout:e,$inverse:t,$error:r,theme:o}=n;return e||t||r?o.contentColor.inverse:o.contentColor.default}
1),D={TooltipWrapper:a.ZP.div.withConfig({componentId:"sc-1472a9ef-0"})(h()),Tooltip:a.ZP.div.withConfig({componentId:"sc-1472a9ef-1"})(m(),n=>{let{$size:e,theme:t}=n;return"large"===e?t.spacing.SM:t.spacing.XS},n=>{let{width:e,$callout:t}=n;return e||t?"normal":"nowrap"},n=>{let{$callout:e,$inverse:t,$error:r,theme:o}=n;return j({$callout:e,$inverse:t,$error:r,theme:o})},n=>{let{theme:e}=n;return e.borderRadius.SM},n=>{let{width:e,$callout:t}=n;return e||(t?"288px":"auto")},n=>{let{theme:e}=n;return s(e.elevation.level3)}),SmallText:a.ZP.div.withConfig({componentId:"sc-1472a9ef-2"})(x(),l.ZP.ParagraphXS,T),LargeText:a.ZP.div.withConfig({componentId:"sc-1472a9ef-3"})(v(),l.ZP.ParagraphSM,T),ButtonWrapper:a.ZP.div.withConfig({componentId:"sc-1472a9ef-4"})(b(),n=>{let{theme:e}=n;return e.spacing.XS}),Caret:a.ZP.div.withConfig({componentId:"sc-1472a9ef-5"})(C(),P,I,k,S,n=>{let{$position:e}=n;switch(e){case"bottom":case"bottom-start":case"bottom-end":return"-".concat(6,"px");case"right-end":case"left-end":return"".concat(6,"px");case"left":case"right":return"50%";default:return"auto"}},n=>{let{$position:e}=n;switch(e){case"top":case"top-start":case"top-end":return"-".concat(6,"px");case"right-start":case"left-start":return"".concat(6,"px");default:return"auto"}},n=>{let{$position:e,$size:t}=n;switch(e){case"top":case"bottom":return"50%";case"top-start":case"bottom-start":return"small"===t?y:w;case"left-start":case"left":default:return"auto";case"right":case"right-end":case"right-start":return"-".concat(6,"px")}},n=>{let{$position:e,$size:t}=n;switch(e){case"top":case"right":default:return"auto";case"top-end":case"bottom-end":return"small"===t?y:w;case"left":case"left-start":case"left-end":return"-".concat(6,"px")}},n=>{let{$position:e}=n;return["left","right"].includes(e)?"translateY(-50%)":["bottom","top"].includes(e)?"translateX(-50%)":"none"})},E=n=>{let{text:e,width:t,position:o,inverse:c=!0,callout:a=!1,error:s=!1,size:l="small",btnSize:u="medium",dismiss:d}=n,p="small"===l?D.SmallText:D.LargeText;return(0,r.jsx)(D.TooltipWrapper,{children:(0,r.jsxs)(D.Tooltip,{width:t,$callout:a,$error:s,$size:l,$inverse:c,children:[(0,r.jsx)(p,{$inverse:c,$callout:a,$error:s,children:e}),d&&(0,r.jsx)(D.ButtonWrapper,{children:(0,r.jsx)(i.Z,{type:"tertiary inverse",size:"small",text:"Got it",onClick:d})}),(0,r.jsx)(D.Caret,{$position:o,$inverse:c,$callout:a,$error:s,$size:u})]})})};var B=o.memo(E)},19281:function(n,e,t){t.d(e,{X:function(){return n9}});var r=t(85893),o=t(67294),i=t(2664),c=t(19521),a=t(83457),s=t.n(a),l=t(96486),u=t(59898),d=t(84341),p=t(41664),f=t.n(p),g=t(73867),h=t(7297),m=t(56208),x=t(86926);function v(){let n=(0,h.Z)(["\n padding: "," 0;\n background-color: ",";\n "]);return v=function(){return n},n}function b(){let n=(0,h.Z)([""]);return b=function(){return n},n}function C(){let n=(0,h.Z)(["\n ","\n margin-bottom: ",";\n "]);return C=function(){return n},n}function y(){let n=(0,h.Z)(["\n ","\n color: ",";\n margin-top: ",";\n\n "," {\n display: none;\n }\n "]);return y=function(){return n},n}function w(){let n=(0,h.Z)(["\n display: none;\n "," {\n ","\n line-height: ",";\n color: ",";\n display: flex;\n\n height: 100%;\n }\n "]);return w=function(){return n},n}function Z(){let n=(0,h.Z)(["\n display: flex;\n flex-direction: column;\n gap: ",";\n "]);return Z=function(){return n},n}function j(){let n=(0,h.Z)(["\n ","\n cursor: pointer;\n text-decoration: underline;\n color: ",";\n "]);return j=function(){return n},n}function P(){let n=(0,h.Z)(["\n color: ",";\n "]);return P=function(){return n},n}let I={FooterWrapper:c.ZP.div.withConfig({componentId:"sc-1fa41985-0"})(v(),n=>{let{theme:e}=n;return e.spacing.XL},n=>{let{theme:e}=n;return e.backgroundColor.secondary}),Section:c.ZP.div.withConfig({componentId:"sc-1fa41985-1"})(b()),SectionTitle:c.ZP.h5.withConfig({componentId:"sc-1fa41985-2"})(C(),m.ZP.EyebrowSM,n=>{let{theme:e}=n;return e.spacing.XS}),CopyrightMobile:c.ZP.p.withConfig({componentId:"sc-1fa41985-3"})(y(),m.ZP.ParagraphSM,n=>{let{theme:e}=n;return e.contentColor.default},n=>{let{theme:e}=n;return e.spacing.XL},x.BC.MD),CopyrightDesktop:c.ZP.p.withConfig({componentId:"sc-1fa41985-4"})(w(),x.BC.MD,m.ZP.ParagraphSM,n=>{let{theme:e}=n;return e.lineHeight.yolo},n=>{let{theme:e}=n;return e.contentColor.default}),Links:c.ZP.div.withConfig({componentId:"sc-1fa41985-5"})(Z(),n=>{let{theme:e}=n;return e.spacing.SM}),Link:c.ZP.a.withConfig({componentId:"sc-1fa41985-6"})(j(),m.ZP.ParagraphSM,n=>{let{theme:e}=n;return e.contentColor.subdued}),Dot:c.ZP.div.withConfig({componentId:"sc-1fa41985-7"})(P(),n=>{let{theme:e}=n;return e.contentColor.subdued})},k=()=>(0,r.jsx)(I.FooterWrapper,{children:(0,r.jsxs)(g.rj,{children:[(0,r.jsxs)(g.X2,{al
1ign:"center",children:[(0,r.jsx)(g.JX,{xs:4,sm:8,md:2,children:(0,r.jsx)(I.CopyrightDesktop,{children:"\xa9 2024 Twisty"})}),(0,r.jsx)(g.JX,{xs:2,sm:4,md:2,children:(0,r.jsxs)(I.Section,{children:[(0,r.jsx)(I.SectionTitle,{children:"Help"}),(0,r.jsxs)(I.Links,{children:[(0,r.jsx)(f(),{href:"/privacy-policy",passHref:!0,legacyBehavior:!0,children:(0,r.jsx)(I.Link,{children:"Privacy Policy"})}),(0,r.jsx)(f(),{href:"/terms-of-service",passHref:!0,legacyBehavior:!0,children:(0,r.jsx)(I.Link,{children:"Terms of Service"})})]})]})})]}),(0,r.jsx)(g.X2,{children:(0,r.jsx)(g.JX,{children:(0,r.jsx)(I.CopyrightMobile,{children:"\xa9 2023 Twisty"})})})]})});var S=o.memo(k),T=t(36900),D=t(66289),E=t(25675),B=t(55703),L=t(69898),M=t(95600),F=t(95221);function A(){let n=(0,h.Z)(["\n position: fixed;\n top: 100vh;\n left: 50%;\n transform: translateX(-50%);\n z-index: 20000;\n width: calc(100vw - ("," * 2));\n display: flex;\n justify-content: center;\n\n "," {\n width: auto;\n }\n "]);return A=function(){return n},n}function z(){let n=(0,h.Z)(["\n padding: ",";\n background: ",";\n box-shadow: ",";\n border-radius: ",";\n display: inline-flex;\n align-items: center;\n justify-content: center;\n max-width: calc(100vw - ("," * 2));\n\n "," {\n max-width: none;\n }\n "]);return z=function(){return n},n}function N(){let n=(0,h.Z)(["\n margin-right: ",";\n "]);return N=function(){return n},n}function $(){let n=(0,h.Z)(["\n ","\n color: ",";\n max-width: ",";\n "]);return $=function(){return n},n}let O={ToastWrapper:(0,c.ZP)(F.E.div).withConfig({componentId:"sc-891a37b1-0"})(A(),n=>{let{theme:e}=n;return e.margin.mobile.page},x.BC.MD),Toast:c.ZP.div.withConfig({componentId:"sc-891a37b1-1"})(z(),n=>{let{theme:e}=n;return"".concat(e.spacing.SM," ").concat(e.spacing.MD)},n=>{let{theme:e,$type:t}=n;return"negative"===t?e.backgroundColor.negative:e.backgroundColor.inversePrimary},n=>{let{theme:e}=n;return e.elevation.level3},n=>{let{theme:e}=n;return e.borderRadius.MD},n=>{let{theme:e}=n;return e.margin.mobile.page},x.BC.MD),Icon:c.ZP.div.withConfig({componentId:"sc-891a37b1-2"})(N(),n=>{let{theme:e}=n;return e.spacing.XS}),Text:c.ZP.div.withConfig({componentId:"sc-891a37b1-3"})($(),m.ZP.ParagraphMD,n=>{let{theme:e}=n;return e.contentColor.inverse},n=>{let{theme:e,$showIcon:t}=n;return"calc(100vw - (".concat(e.margin.mobile.page," * 2 - ").concat(t?e.spacing["3XL"]:0,"))")})},R=n=>{let{text:e,icon:t,toggled:i,type:c="default",hideToast:a,placement:s="bottom",theme:l}=n,u=(0,o.useRef)(null),d=(0,E._)(),{height:p=0}=(0,M.i)(),[f,g]=(0,o.useState)(""),[h,m]=(0,o.useState)(void 0),[x,v]=(0,o.useState)("default");return(0,o.useEffect)(()=>{p&&d.set({top:p,visibility:"hidden"})},[p]),(0,o.useEffect)(()=>{if(i)g(e),m(t),v(c);else{var n;if(!p||!(null===(n=u.current)||void 0===n?void 0:n.clientHeight))return;let e=0;e="top"===s?-u.current.clientHeight:p,d.start({top:e,transition:{duration:.15,ease:"easeInOut"},transitionEnd:{visibility:"hidden"}}),setTimeout(()=>{g("")},500)}},[i]),(0,o.useEffect)(()=>{if(f&&f===e&&(null==u?void 0:u.current)&&p){let n=0;n="top"===s?-u.current.clientHeight:p;let e=0;e="top"===s?parseInt(l.spacing.MD,10):p-u.current.clientHeight-parseInt(l.spacing.MD,10),d.set({top:n,visibility:"visible"}),d.start({top:e,transition:{duration:.15,ease:"easeInOut"}}),setTimeout(a,"negative"===c?7e3:3500)}},[f]),(0,r.jsx)(O.ToastWrapper,{animate:d,ref:u,children:(0,r.jsxs)(O.Toast,{$type:x,children:[(()=>{if(h){let n=L.Z[h];return(0,r.jsx)(O.Icon,{children:(0,r.jsx)(n,{size:24,contentColor:"inverse"})})}return"negative"===x?(0,r.jsx)(O.Icon,{children:(0,r.jsx)(B.Z,{size:24,contentColor:"inverse"})}):null})(),(0,r.jsx)(O.Text,{as:"div",$showIcon:!!h,children:f})]})})};var H=(0,c.Zz)(R);let G=()=>{let n=(0,T.TL)(),e=(0,T.CG)(D.sr),t=()=>{n((0,D.xU)({toggled:!1,text:"",icon:void 0,type:void 0,placement:e.placement}))};return(0,r.jsx)(H,{text:e.text,icon:e.icon,toggled:e.toggled,type:e.type,placement:e.placement,hideToast:t})};var X=o.memo(G),q=t(79110),W=t(78235),U=t(61193),_=t.n(U),Y=t(62967),V=t(32296),J=t(25072),K=t(32161),Q=t(21593),nn=t(97234);let ne=n=>{let{r:e,g:t,b:r}=(0,nn.Z)(n).toRgb();return{r:e,g:t,b:r}},nt=(n,e)=>{let{r:t,g:r,b:o}=ne(n);return"rgba(".concat(t,", ").concat(r,", ").concat(o,", ").concat(e,")")};var nr=t(88755);function no(){let n=(0,h.Z)(["\n width: ","px;\n height: ","px;\n position: absolute;\n top: calc(\n -","% - ","px\n );\n left: -","px;\n border-radius: 50%;\n "]);return no=function(){return n},n}function ni(){let n=(0,h.Z)(["\n height: ","px;\n width: ","px;\n border-radius: 50%;\n background-color: ",";\n position: absolute;\n top: ","px;\n left: ","px;\n display: inline-flex;
1\n align-items: center;\n justify-content: center;\n "]);return ni=function(){return n},n}let nc={BallWrapper:(0,c.ZP)(F.E.div).withConfig({componentId:"sc-dc674084-0"})(no(),136,136,35,-3.9000000000000004,3),Ball:(0,c.ZP)(F.E.span).withConfig({componentId:"sc-dc674084-1"})(ni(),18,18,n=>{let{theme:e}=n;return e.color.green["300"]},18,18)},na=n=>{let{theme:e,task:t,setTooltipText:i,setTooltipError:c,index:a,removeBall:s}=n,l=(0,o.useRef)(null),u=(0,o.useRef)(null),d=(0,o.useRef)(null),[p,f]=(0,W.H)(),[g,h]=(0,o.useState)(""),m=n=>{let e=0,t;for(t=0;t<n.length;t++)e=(e<<5)-e+n.charCodeAt(t)|0;return e},x=()=>{if(!(null==t?void 0:t.id))return;let n=t.id.slice(0,6),r=[[e.color.pink[300],e.color.orange[400],e.color.green[400],e.color.blue[400]],[e.color.keylimeGreen,e.color.lightOrange,e.color.pink[400],e.color.blue[400]]],o=m(n),i=m(t.id),c=Math.abs(i)%r[0].length,a=Math.abs(o)%r.length,s=r[a][c];h(s)},v=async()=>{(null==u?void 0:u.current)&&(null==l?void 0:l.current)&&(await f("span",{scale:1},{duration:.05}),await f("span",{opacity:1},{duration:.1,delay:.415*a}),u.current.play(),l.current.play())},b=async n=>{let{text:e}=n;(null==u?void 0:u.current)&&(null==l?void 0:l.current)&&(await u.current.pause(),await l.current.pause(),f([["span",{scale:6,opacity:0},{duration:2,ease:"easeInOut"}],["span",{boxShadow:"0 0 0 0 ".concat(nt(g,.7))},{duration:1.1,ease:"easeOut",at:"<"}],["span",{boxShadow:"0 0 0 10px ".concat(nt(g,0))},{duration:.3,ease:"easeOut"}]],{duration:1.4}).then(()=>{i(e)}),d.current=setTimeout(()=>{s(a)},4e3))};return(0,o.useEffect)(()=>{var n,e;if(!t){h("");return}return x(),"processing"===t.status?v():"done"===t.status?b({text:"Your ".concat(null!==(n=null==t?void 0:t.type)&&void 0!==n?n:"video"," has finished processing!")}):"error"===t.status&&(c(!0),b({text:"There was a problem processing your ".concat(null!==(e=null==t?void 0:t.type)&&void 0!==e?e:"video",".")})),()=>{d.current&&clearTimeout(d.current)}},[t]),(0,o.useEffect)(()=>{let n=f(p.current,{rotate:360},{repeat:1/0,duration:5,ease:"linear",delay:.415*a}),e=f("span",{rotate:-360},{repeat:1/0,duration:5,ease:"linear",delay:.415*a});u.current=e,l.current=n},[]),(0,r.jsx)(nc.BallWrapper,{initial:{scaleY:.65,rotate:0},ref:p,children:(0,r.jsxs)(nc.Ball,{style:{backgroundColor:g},initial:{rotate:0,scaleY:1.5384615384615383,scale:1,opacity:0},transformTemplate:n=>{let{rotate:e,scaleY:t,scale:r}=n;return"rotate(".concat(e,") scaleY(").concat(t,") scale(").concat(r,")")},children:[(null==t?void 0:t.type)===nr.HO.VIDEO&&(0,r.jsx)(V.Z,{size:12,contentColor:"inverse"}),(null==t?void 0:t.type)===nr.HO.MUSIC&&(0,r.jsx)(J.Z,{size:12,contentColor:"inverse"}),(null==t?void 0:t.type)===nr.HO.STORY&&(0,r.jsx)(K.Z,{size:12,contentColor:"inverse"}),(null==t?void 0:t.type)===nr.HO.IMAGE&&(0,r.jsx)(Q.Z,{size:12,contentColor:"inverse"})]})})};var ns=(0,c.Zz)(na),nl=t(45036),nu=t(36250);function nd(){let n=(0,h.Z)(["\n width: 16px;\n height: 32px;\n display: block;\n background: ",";\n border-radius: 44%;\n position: absolute;\n top: 49%;\n left: 50%;\n transform: translate(-50%, -50%);\n"]);return nd=function(){return n},n}function np(){let n=(0,h.Z)(["\n position: fixed;\n z-index: 3006;\n right: ",";\n bottom: 100px;\n transform: translateY(-50%);\n cursor: move;\n\n ","\n\n "," {\n right: ",";\n }\n "]);return np=function(){return n},n}function nf(){let n=(0,h.Z)(["\n transform: scale(0.8);\n "," {\n transform: scale(1);\n }\n "]);return nf=function(){return n},n}function ng(){let n=(0,h.Z)(["\n position: absolute;\n top: -",";\n left: 50%;\n transform: translate(-50%, -100%);\n opacity: 0;\n "]);return ng=function(){return n},n}function nh(){let n=(0,h.Z)(["\n width: ","px;\n height: ","px;\n border-radius: 50%;\n position: relative;\n "]);return nh=function(){return n},n}function nm(){let n=(0,h.Z)(["\n position: absolute;\n top: -","px;\n left: -","px;\n top: 0;\n left: 0;\n width: ","px;\n height: ","px;\n border-radius: 50%;\n border: ","px solid ",";\n background-color: ",";\n "]);return nm=function(){return n},n}function nx(){let n=(0,h.Z)(["\n ","\n left: 32%;\n "]);return nx=function(){return n},n}function nv(){let n=(0,h.Z)(["\n ","\n left: 68%;\n "]);return nv=function(){return n},n}function nb(){let n=(0,h.Z)(["\n width: ","px;\n height: ","px;\n position: absolute;\n top: calc(\n -","% - ","px\n );\n left: -","px;\n border-radius: 50%;\n "]);return nb=function(){return n},n}function nC(){let n=(0,h.Z)(["\n height: ","px;\n width: ","px;\n border-radius: 50%;\n background-color: ",";\n position: absolute;\n top: ","px;\n left: ","px;\n display: inline-flex;
1\n align-items: center;\n justify-content: center;\n "]);return nC=function(){return n},n}function ny(){let n=(0,h.Z)(["\n position: absolute;\n top: ",";\n right: 0;\n transform: translate(100%, -100%);\n border-radius: 50%;\n width: 24px;\n height: 24px;\n display: flex;\n justify-content: center;\n align-items: center;\n border: ",";\n "]);return ny=function(){return n},n}let nw=(0,c.iv)(nd(),n=>{let{theme:e}=n;return e.color.blue[400]}),nZ={Robot:c.ZP.div.withConfig({componentId:"sc-76655b77-0"})(np(),n=>{let{theme:e}=n;return e.spacing.MD},n=>{let{$hidden:e}=n;return e?"\n pointer-events: none;\n opacity: 0;\n ":""},x.BC.MD,n=>{let{theme:e}=n;return e.spacing["2XL"]}),RobotInner:c.ZP.div.withConfig({componentId:"sc-76655b77-1"})(nf(),x.BC.MD),TooltipWrapper:(0,c.ZP)(F.E.div).withConfig({componentId:"sc-76655b77-2"})(ng(),n=>{let{theme:e}=n;return e.spacing.SM}),Circle:c.ZP.div.withConfig({componentId:"sc-76655b77-3"})(nh(),130,84.5),CircleBorder:(0,c.ZP)(F.E.div).withConfig({componentId:"sc-76655b77-4"})(nm(),3.9000000000000004,6,106,60.5,12,n=>{let{theme:e}=n;return e.color.grey[400]},n=>{let{theme:e}=n;return e.color.grey[900]}),CircleEyeLeft:(0,c.ZP)(F.E.span).withConfig({componentId:"sc-76655b77-5"})(nx(),nw),CircleEyeRight:(0,c.ZP)(F.E.span).withConfig({componentId:"sc-76655b77-6"})(nv(),nw),BallWrapper:(0,c.ZP)(F.E.div).withConfig({componentId:"sc-76655b77-7"})(nb(),136,136,35,-3.9000000000000004,3),Ball:(0,c.ZP)(F.E.span).withConfig({componentId:"sc-76655b77-8"})(nC(),18,18,n=>{let{theme:e}=n;return e.color.green["300"]},18,18),Close:c.ZP.div.withConfig({componentId:"sc-76655b77-9"})(ny(),n=>{let{theme:e}=n;return e.spacing.LG},n=>{let{theme:e}=n;return"".concat(e.borderWidth[2]," solid ").concat(e.borderColor.default)})},nj=()=>{let n=(0,o.useRef)(null),e=(0,o.useRef)(0),[t,i]=(0,W.H)(),[c,a]=(0,o.useState)(""),[s,u]=(0,o.useState)(!1),{tasks:d,removeFromQueue:p}=(0,nu.Y)(),[f,g]=(0,o.useState)(Array(12).fill(void 0));(0,o.useEffect)(()=>{let n=f.filter(n=>(null==n?void 0:n.status)==="processing").length;n>e.current&&a("Processing your media!"),e.current=n},[f]),(0,o.useEffect)(()=>{c&&i([[t.current,{opacity:1},{duration:.4,ease:"easeOut"}],[t.current,{opacity:0},{duration:.3,ease:"easeOut",delay:3}]]).then(()=>{a(""),u(!1)})},[c]);let h=n=>{let e=f[n];(null==e?void 0:e.id)&&p(e.id);let t=[...f];t[n]=void 0,g(t)};return(0,o.useEffect)(()=>{if(!(null==d?void 0:d.length))return;let n=[...f];d.map(e=>{let t=(0,l.findIndex)(n,{id:e.id});if("processing"===e.status&&-1===t){let t=n.indexOf(void 0);t>-1&&(n[t]=e,g(n))}["done","error"].includes(e.status)&&t>-1&&(n[t]=e,g(n))})},[d,f]),(0,r.jsx)(_(),{nodeRef:n,children:(0,r.jsx)(nZ.Robot,{ref:n,$hidden:(0,l.every)(f,l.isEmpty),children:(0,r.jsxs)(nZ.RobotInner,{children:[(0,r.jsx)(nZ.TooltipWrapper,{ref:t,initial:{opacity:0}
1,children:(0,r.jsx)(Y.Z,{text:c,position:"top",callout:!0,width:"140px",size:"small",error:s})}),(0,r.jsxs)(nZ.Circle,{children:[(0,r.jsxs)(nZ.CircleBorder,{children:[(0,r.jsx)(nZ.CircleEyeLeft,{animate:{opacity:[1,1,0,1,1,1,0,1,1]},transition:{times:[0,.1,.15,.2,.5,.8,.85,.9,1],duration:6,ease:"linear",repeat:1/0}}),(0,r.jsx)(nZ.CircleEyeRight,{animate:{opacity:[1,1,0,1,1,1,0,1,1]},transition:{times:[0,.1,.15,.2,.5,.8,.85,.9,1],duration:6,ease:"linear",repeat:1/0}})]}),(0,r.jsx)("div",{children:f.map((n,e)=>(0,r.jsx)(ns,{setTooltipText:a,setTooltipError:u,task:n,index:e,removeBall:h},"taskBall-".concat(e)))})]}),(0,r.jsx)(nZ.Close,{children:(0,r.jsx)(nl.Z,{size:20,contentColor:"moreSubdued"})})]})})})};var nP=t(83934),nI=t(62687);function nk(){let n=(0,h.Z)(["\n ",";\n"]);return nk=function(){return n},n}function nS(){let n=(0,h.Z)(["\n z-index: 2000;\n display: flex;\n flex-direction: row;\n align-items: flex-start;\n padding: ",";\n background-color: ",";\n "]);return nS=function(){return n},n}function nT(){let n=(0,h.Z)(["\n margin-right: ",";\n "]);return nT=function(){return n},n}function nD(){let n=(0,h.Z)(["\n margin-right: ",";\n flex: auto;\n position: relative;\n "]);return nD=function(){return n},n}function nE(){let n=(0,h.Z)(["\n ","\n margin-bottom: ",";\n color: ",";\n "]);return nE=function(){return n},n}function nB(){let n=(0,h.Z)(["\n ","\n color: ",";\n "]);return nB=function(){return n},n}function nL(){let n=(0,h.Z)(["\n ","\n color: ",";\n text-decoration: underline;\n "]);return nL=function(){return n},n}function nM(){let n=(0,h.Z)(["\n cursor: pointer;\n "]);return nM=function(){return n},n}let nF=(0,c.iv)(nk(),n=>{let{$bannerType:e,theme:t}=n;switch(e){case"warning":return t.contentColor.black;case"informational":return t.contentColor.default;case"critical":return t.contentColor.inverse}}),nA={Banner:c.ZP.div.withConfig({componentId:"sc-b10c54fa-0"})(nS(),n=>{let{theme:e}=n;return e.spacing.MD},n=>{let{$bannerType:e,theme:t}=n;switch(e){case"critical":return t.backgroundColor.negative;case"warning":return t.backgroundColor.warning;case"informational":return t.backgroundColor.informational}}),Icon:c.ZP.div.withConfig({componentId:"sc-b10c54fa-1"})(nT(),n=>{let{theme:e}=n;return e.spacing.SM}),Body:c.ZP.div.withConfig({componentId:"sc-b10c54fa-2"})(nD(),n=>{let{theme:e}=n;return e.spacing.MD}),Header:c.ZP.h3.withConfig({componentId:"sc-b10c54fa-3"})(nE(),m.ZP.HeadingXS,n=>{let{theme:e}=n;return e.spacing["2XS"]},nF),Text:c.ZP.div.withConfig({componentId:"sc-b10c54fa-4"})(nB(),m.ZP.ParagraphMD,nF),Link:c.ZP.a.withConfig({componentId:"sc-b10c54fa-5"})(nL(),m.ZP.Link,nF),CloseIcon:c.ZP.div.withConfig({componentId:"sc-b10c54fa-6"})(nM())},nz=n=>{let{header:e,text:t,link:o,linkText:i,bannerType:c,dismissable:a,handleClose:s}=n;return(0,r.jsxs)(nA.Banner,{$bannerType:c,children:[(0,r.jsx)(nA.Icon,{children:"critical"===c?(0,r.jsx)(B.Z,{size:24,contentColor:"inverse"}):(0,r.jsx)(nI.Z,{size:24,contentColor:"warning"===c?"black":"default"})}),(0,r.jsxs)(nA.Body,{children:[e&&(0,r.jsx)(nA.Header,{$bannerType:c,children:e}),(0,r.jsxs)(nA.Text,{$bannerType:c,children:[t," ",o?(0,r.jsx)(f(),{href:o,passHref:!0,legacyBehavior:!0,children:(0,r.jsx)(nA.Link,{$bannerType:c,children:i})}):null]})]}),a?(0,r.jsx)(nA.CloseIcon,{onClick:n=>{n.stopPropagation(),s&&s()},children:(0,r.jsx)(nP.Z,{size:24,contentColor:"critical"===c?"inverse":"warning"===c?"black":"default"})}):null]})};var nN=t(51873),n$=t(25974),nO=t(74599),nR=t(11163),nH=t(55054),nG=t(62286),nX=t.n(nG),nq=t(64396),nW=t(42916),nU=t(80973);function n_(){let n=(0,h.Z)(["\n height: 100%;\n width: 100%;\n "]);return n_=function(){return n},n}function nY(){let n=(0,h.Z)(["\n height: 100%;\n overflow-x: hidden;\n overflow-y: auto;\n width: 100%;\n "]);return nY=function(){return n},n}function nV(){let n=(0,h.Z)(["\n min-height: 100vh;\n display: flex;\n flex-direction: column;\n background-color: ",";\n "]);return nV=function(){return n},n}function nJ(){let n=(0,h.Z)(["\n position: fixed;\n z-index: 2000;\n top: ",";\n left: 0;\n right: 0;\n "]);return nJ=function(){return n},n}function nK(){let n=(0,h.Z)(["\n position: absolute;\n right: 0;\n left: 0;\n top: 0;\n background-color: ",";\n display: flex;\n justify-content: space-between;\n padding: ",";\n "]);return nK=function(){return n},n}function nQ(){let n=(0,h.Z)(["\n position: fixed;\n z-index: 3004;\n left: 0;\n right: 0;\n "]);return nQ=function(){return n},n}function n0(){let n=(0,h.Z)(["\n flex: 1;\n display: flex;\n flex-direction: column;\n padding-bottom: ",";\n padding-top: ",";\n "," {\n padding-bottom: 0;\n padding-top: ",";\n }\n "]);return n0=function(){return n},n}function n1(){let n=(0,h.Z)(["\n height: 2000px;\n width: 100%;\n background-color: grey;\n "]);return n1=function(){return n},n}let n2={Main:c.ZP.div.withConfig({componentId:"sc-3c48ff54-0"})(n_()),MainInner:c.ZP.div.withConfig({componentId:"sc-3c48ff54-1"})(nY()),Page:c.ZP.div.withConfig({componentId:"sc-3c48ff54-2"})(nV(),n=>{let{theme:e}=n;return e.backgroundColor.primary}),Nav:c.ZP.div.withConfig({componentId:"sc-3c48ff54-3"})(nJ(),n=>{let{$bannerHeight:e}=n;return e?"".concat(e,"px"):0}),InstallNativeApp:c.ZP.div.withConfig({componentId:"sc-3c48ff54-4"})(nK(),n=>{let{theme:e}=n;return e.backgroundColor.white},n=>{let{theme:e}=n;return e.spacing.SM}),Banner:c.ZP.div.withConfig({componentId:"sc-3c48ff54-5"})(nQ()),Content:c.ZP.div.withConfig({componentId:"sc-3c48ff54-6"})(n0(),n=>{let{theme:e,$hasBottomNav:t}=n;return t?e.sizing.mobile.bottomNavHeight:0},n=>{let{theme:e,$hasTopNavMobile:t,$bannerHeight:r}=n;return t?"calc(".concat(e.sizing.mobile.navHeight," + ").concat(r,"px)"):"".concat(r,"px")},x.BC.MD,n=>{let{theme:e,$hasTopNavDesktop:t,$bannerHeight:r}=n;return t?"calc(".concat(e.sizing.desktop.navHeight," + ").concat(r,"px)"):"".concat(r,"px")}),Sample:c.ZP.div.withConfig({componentId:"sc-3c48ff54-7"})(n1())};var n5=t(90409),n4=t(5571),n6=t(4683);let n3=(0,l.assign)({color:n6.$},{actionColor:{brand:"#B7C7FB",brandAlt:"#FF5001",hover:"rgba(255, 255, 255, 0.16)",pressed:"rgba(255, 255, 255, 0.24)",inverseHover:"rgba(0, 0, 0, 0.06)",inversePressed:"rgba(0, 0, 0, 0.12)",selected:"rgba(183, 199, 251, 0.25)"}},{backgroundColor:{body:"#131313",primary:"#252526",secondary:"#3D3D3E",tertiary:"#3D3D3E",
1inversePrimary:"#F7F7F7",inverseSecondary:"#E8E7E7",scrim:"rgba(0, 0, 0, 0.75)",blackTransparent:"rgba(37, 37, 38, 0.4)",subduedNegative:"#540015",negative:"#F75862",subduedWarning:"#8A2500",warning:"#F9BE76",subduedPositive:"#003322",positive:"#6DCB99",subduedInformational:"#16217D",informational:"#4966D7",disabled:"#252526",white:"#FFFFFF",inverseDisabled:"#3D3D3E",black:"#131313",transparent:"transparent"}},{contentColor:{default:"#F7F7F7",subdued:"#D0D1CF",moreSubdued:"#9EA09E",disabled:"#555657",inverse:"#252526",inverseSubdued:"#555657",inverseMoreSubdued:"#6D6F6F",inverseDisabled:"#B6B8B6",negative:"#F75862",positive:"#A1E8BE",warning:"#F9BE76",brand:"#E0FE2A",brandAlt:"#FF5001",white:"#F7F7F7",black:"#252526",accent:"#B7C7FB"}},{borderColor:{default:"#6D6F6F",subdued:"#3D3D3E",primary:"#F7F7F7",inverse:"#B6B8B6",inverseSubdued:"#DCDCDB",inversePrimary:"#252526",negative:"#F75862",white:"#F7F7F7"}},{focusColor:{default:"rgba(255, 255, 255, 0.32)",inverse:"rgba(37, 37, 38, 0.12)"}},{elevation:n5.XC},{spacing:n5.W0},{margin:n4.e},{borderRadius:n5.E0},{borderWidth:n5.J4},{typeface:n5.YP},{fontSize:n5.JB},{lineHeight:n5.Nv},{fontWeight:n5.Ue},{letterSpacing:n5.rX},{sizing:n4.N},{opacity:n5.Oh},{tag:{neutral:{backgroundColor:"#3D3D3E",color:"#F7F7F7",iconColor:"#F7F7F7"},red:{backgroundColor:"#540015",color:"#FFDBDB",iconColor:"#FFDBDB"},green:{backgroundColor:"#003322",color:"#DCFAE6",iconColor:"#DCFAE6"},orange:{backgroundColor:"#8A2500",color:"#FFEBC4",iconColor:"#FFEBC4"},pink:{backgroundColor:"#4B0F4C",color:"#FEE0FF",iconColor:"#FEE0FF"},blue:{backgroundColor:"#16217D",color:"#E4EBFF",iconColor:"#E4EBFF"},"red bold":{backgroundColor:"#F75862",color:"#252526",iconColor:"#252526"},"green bold":{backgroundColor:"#A1E8BE",color:"#252526",iconColor:"#252526"},"orange bold":{backgroundColor:"#F9BE76",color:"#252526",iconColor:"#252526"},"pink bold":{backgroundColor:"#EEA4F0",color:"#252526",iconColor:"#252526"},"blue bold":{backgroundColor:"#B7C7FB",color:"#252526",iconColor:"#252526"},black:{backgroundColor:"rgba(37, 37, 38, 0.4)",color:"#F7F7F7",iconColor:"#F7F7F7"},removable:{backgroundColor:"#3D3D3E",color:"#F7F7F7",iconColor:"#555657"},credits:{backgroundColor:"#B7C7FB",color:"#252526",iconColor:"#252526"},specialNew:{backgroundColor:"#B7C7FB",color:"#252526",iconColor:"#252526"}}});var n7=t(1908);let n9=function(n){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{withFooter:{mobile:!0,desktop:!0},authRequired:!1,withTopNav:{mobile:!0,desktop:!0},withBottomNav:!0,withHeadSection:!0,showInfoBanner:!0,theme:"dark"},t=t=>{!function(){let n=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=(0,T.TL)(),t=(0,nR.useRouter)(),r=(0,T.CG)(n$.c7),i=async()=>{e((0,D.Bz)(t.pathname)),await e((0,D.RZ)("signup")),t.push("/login")};(0,o.useEffect)(()=>{let t=(0,nO.Aj)(nN.I,async t=>{if(t){let n=await t.getIdToken();e((0,n$.rP)({token:n,uid:t.uid})),(0,nq.O5)(t.uid),(0,nH.q)(nr._q.IDENTIFY,{uid:t.uid}),nX().set(void 0,"__session",n,{path:"/",maxAge:864e3})}else e((0,n$.mZ)()),(0,nq.O5)(null),nX().set(void 0,"__session","",{path:"/"}),n&&i()});return()=>t()},[]);let c=async()=>{let e=await (0,nq.j_)();!n||e.userId||r||i()};(0,o.useEffect)(()=>{c()},[r])}(e.authRequired);let i=(0,T.CG)(n$.c7),{isMobile:a}=(0,M.i)(),[p,f]=(0,o.useState)(!1),[g,h]=(0,o.useState)(0),{data:m}=(0,nU.Ft)(),{hasAppstoreAccess:x,hasPlaystoreAccess:v}=(0,nW.F)(),b="light"===e.theme?n7.r:n3,C=(0,o.useRef)(null);(0,o.useEffect)(()=>{if(p&&C.current){var n;h(null==C?void 0:null===(n=C.current)||void 0===n?void 0:n.clientHeight)}else p||h(0)},[C.current,p]);let y=async()=>{let n=await (0,nq.wD)(),t=null==n?void 0:n.bannerClosedId;if(t===(null==m?void 0:m.id))f(!1);else if((null==m?void 0:m.id)&&e.showInfoBanner){let n=(0,l.includes)(m.platform,nr.t4.ANDROID)&&v,e=(0,l.includes)(m.platform,nr.t4.IOS)&&x,t=(0,l.includes)(m.platform,nr.t4.WEB)&&!v&&!x;(n||t||e)&&f(!0)}};(0,o.useEffect)(()=>{y()},[m]);let w=()=>{var n;(0,nq.kt)(nr.H0.BANNER_CLOSED_ID,null!==(n=null==m?void 0:m.id)&&void 0!==n?n:""),f(!1)};return(0,r.jsxs)(r.Fragment,{children:[e.withHeadSection&&(0,r.jsx)(q.I,{}),(0,r.jsxs)(c.f6,{theme:b,children:[(0,r.jsx)(s(),{color:b.contentColor.accent,startPosition:.3,stopDelayMs:200,height:3,showOnSh
1allow:!0}),p&&m&&(0,r.jsx)(n2.Banner,{ref:C,$hasTopNavMobile:a&&e.withTopNav.mobile,$hasTopNavDesktop:e.withTopNav.desktop,children:(0,r.jsx)(nz,{bannerType:m.type,text:m.text,link:m.link,linkText:m.linkText,dismissable:!0,handleClose:w})}),(0,r.jsx)(n2.Main,{children:(0,r.jsx)(n2.MainInner,{children:(0,r.jsxs)(n2.Page,{children:[a&&e.withTopNav.mobile&&(0,r.jsx)(n2.Nav,{$bannerHeight:g,children:(0,r.jsx)(u.Z,{})}),!a&&e.withTopNav.desktop&&(0,r.jsx)(n2.Nav,{$bannerHeight:g,children:(0,r.jsx)(u.Z,{})}),(0,r.jsxs)(n2.Content,{$hasBottomNav:e.withBottomNav,$hasTopNavMobile:a&&e.withTopNav.mobile,$hasTopNavDesktop:e.withTopNav.desktop,$bannerHeight:g,children:[(0,r.jsx)(n,{...t}),i&&(0,r.jsx)(nj,{})]}),a&&e.withBottomNav&&(0,r.jsx)(d.Z,{}),a&&e.withFooter.mobile&&(0,r.jsx)(S,{}),!a&&e.withFooter.desktop&&(0,r.jsx)(S,{}),(0,r.jsx)(X,{})]})})})]})]})};return(0,i.$j)(n=>n)(t)}},55054:function(n,e,t){t.d(e,{m:function(){return i},q:function(){return o}});var r=t(88755);let o=(n,e)=>{if(window){var t;null==window||null===(t=window.dataLayer)||void 0===t||t.push({event:n,...e})}},i=(n,e)=>{o(r._q.DOWNLOAD,{nsfw:e.hidden,clip_id:e.id,owner_id:e.user,uid:n,owns_prompt:e.user===n})}},64396:function(n,e,t){t.d(e,{wD:function(){return s},j_:function(){return l},kt:function(){return c},O5:function(){return a}});var r=t(49520);class o extends r.ZP{constructor(){super("twistyDB"),this.version(1.1).stores({pageSettings:"++id, trendingLastLoadAt, trendingLastPageSeen, recentLastLoadAt, recentLastPrompt",userSettings:"++id, userId, nativeInstallPromptSeen"})}}let i=new o,c=(n,e)=>{try{i.pageSettings.update(1,{["".concat(n)]:e})}catch(n){console.log("\uD83D\uDE80 ~ error:",n)}},a=async n=>{try{let e=await i.userSettings.get(1);e?i.userSettings.update(1,{userId:n}):await i.userSettings.add({userId:n,nativeInstallPromptSeen:!1})}catch(n){console.log("\uD83D\uDE80 ~ updateUserId ~ error:",n)}},s=async()=>{let n={id:1,trendingLastPageSeen:0,trendingLastTimestamp:null,recentLastPrompt:"",recentLastTimestamp:null,bannerClosedId:"",hasSeenIntroSlides:"false"};try{let e=await i.pageSettings.get(1);if(e)return e;return await i.pageSettings.add(n),n}catch(e){return n}},l=async()=>{let n={userId:"",nativeInstallPromptSeen:!1};try{let e=await i.userSettings.get(1);if(e)return e;return await i.userSettings.add(n),n}catch(e){return n}}},19182:function(n,e,t){t.d(e,{D_:function(){return s},SC:function(){return c},rV:function(){return a},tJ:function(){return l}});var r=t(88755),o=t(85237),i=t(51181);let c=async()=>{if(!("getDigitalGoodsService"in window))return console.log("DigitalGoodsService is not available."),!1;{let n=window.getDigitalGoodsService;try{let e=await n("https://play.google.com/billing");return e}catch(n){return!1}}},a=async n=>{try{let e=await n.getDetails([r.kh.PACK_1500,r.kh.PACK_3750,r.kh.PACK_8500]),t=[];for(let n of e){let e=new Intl.NumberFormat(navigator.language,{style:"currency",currency:n.price.currency}).format(n.price.value),r=n.itemId;t.push({title:n.title,description:n.description,price:e,currency:n.price.currency,id:n.itemId,credits:i.Ch[r]})}return t.sort((n,e)=>n.credits-e.credits)}catch(n){throw o.$e(function(e){e.setExtra("message","Error while requesting item details from digital google service"),o.Tb(n)}),Error("Error in collecting items")}},s=async n=>{try{let e=await n.getDetails([r.kh.STARTER_PACK]),t=[];for(let n of e){let e=new Intl.NumberFormat(navigator.language,{style:"currency",currency:n.price.currency}).format(n.price.value);t.push({title:n.title,description:n.description,price:e,currency:n.price.currency,id:n.itemId,credits:i.Ch[r.kh.STARTER_PACK]})}return t}catch(n){throw o.$e(function(e){e.setExtra("message","Error while requesting booster details from digital google service"),o.Tb(n)}),Error("Error in collecting items")}},l=async n=>{try{let e=await n.getDetails(["professional_social_plan","business_social_plan"]),t=[];for(let n of e){let e=new Intl.NumberFormat(navigator.language,{style:"currency",currency:n.price.currency}).format(n.price.value);n.itemId===r.Xh.PROFESSIONAL?t.splice(0,0,{price:e,currency:n.price.currency,id:n.itemId}):t.splice(1,0,{price:e,currency:n.price.currency,id:n.itemId})}return t}catch(n){throw o.$e(function(e){e.setExtra("message","Error while requesting booster details from digital google service"),o.Tb(n)}),Error("Error in collecting items")}}},66544:function(n,e,t){t.d(e,{d:function(){return o}});var r=t(51181);let o=n=>"".concat(r.y2.I).concat(n||"images/bright.png")},36900:function(n,e,t){t.d(e,{TL:function(){return a},CG:function(){return s},ey:function(){return i},OK:function(){return c}});var r=t(2664);t(26677),t(51873),t(36100);let o={toFirestore:n=>(delete n.id,delete n.ref,n),fromFirestore(n,e){let t=n.data(e);return{...t,ref:n.ref,id:n.id}}};function i(n){let e=n.withConverter(o);return e}function c(n){let e=n.withConverter(o);return e}t(95600);let a=r.I0,s=r.v9},79434:function(n,e,t){t.d(e,{x:function(){return c}});var r=t(36900),o=t(745),i=t(25974);let c=()=>{let n=(0,r.CG)(i.sR),e=(0,r.CG)(i.c7),t=(0,o.XC)(null!=e?e:"",{skip:!n});return t}},42916:function(n,e,t){t.d(e,{F:function(){return i}});var r=t(19182),o=t(67294);let i=()=>{let[n,e]=(0,o.useState)(null),[t,i]=(0,o.useState)(null),[c,a]=(0,o.useState)(!1),s=async()=>{let n=await (0,r.SC)();e(!!n)};return(0,o.useEffect)(()=>{s(),navigator.userAgent?i(navigator.userAgent.includes("TwistyiOS")):i(!1)},[]),(0,o.useEffect)(()=>{(!0===t||!1===t)&&(!0===n||!1===n)&&a(!0)},[n,t]),{hasPlaystoreAccess:n,hasAppstoreAccess:t,storeLoaded:c}}},37131:function(n,e,t){t.d(e,{i:function(){return o}});var r=t(67294);let o=n=>{(0,r.useEffect)(()=>{let e=document.querySelector("body");return()=>{e&&!n&&(e.style.overflow="visible")}},[]);let e=n=>{let e=document.querySelector("body");e&&n?e.style.overflow="hidden":e&&!n&&(e.style.overflow="visible")};return{setLocked:e}}},52082:function(n,e,t){t.d(e,{z:function(){return d}});var r=t(26677),o=t(51873),i=t(88755),c=t(36900),a=t(36100),s=t(25974),l=t(67294),u=t
1(74539);function d(){let[n,e]=(0,l.useState)([]),[t,d]=(0,l.useState)(0),p=(0,c.CG)(s.c7),f=(0,c.OK)((0,a.IO)((0,a.hJ)(o.db,"users/".concat(p,"/notifications")),(0,a.ar)("isAction","==",!1),(0,a.Xo)("createdAt","desc"),(0,a.b9)(15))),[g]=(0,r.d4)(f),h=(0,c.OK)((0,a.IO)((0,a.hJ)(o.db,"users/".concat(p,"/notifications")),(0,a.ar)("isAction","==",!0),(0,a.Xo)("createdAt","desc"),(0,a.b9)(5))),[m]=(0,r.d4)(h),x=(0,c.OK)((0,a.IO)((0,a.hJ)(o.db,"users/".concat(p,"/notifications")),(0,a.ar)("isAction","==",!0),(0,a.ar)("completed","==",!1),(0,a.ar)("actionType","not-in",[i.PG.DAILY,i.PG.VOTE]))),[v]=(0,r.d4)(x);(0,l.useEffect)(()=>{let n=0,t=[];if(g&&(null==g?void 0:g.length)>0){let e=null==g?void 0:g.filter(n=>!n.read);t.push(...e),n+=e.length}if(m&&(null==m?void 0:m.length)>0){let e=null==m?void 0:m.filter(n=>!n.read&&!n.completed&&!(0,u.qP)(n)&&n.actionType&&![i.PG.FIRST,i.PG.SECOND,i.PG.THIRD,i.PG.TOP10,i.PG.TOP20,i.PG.TOP5].includes(n.actionType));t.push(...e),n+=e.length}if(v&&(null==v?void 0:v.length)>0){let e=null==v?void 0:v.filter(n=>!n.read);t.push(...e),n+=e.length}e(t),d(n)},[g,m]);let b=()=>{n.length>0&&n.forEach(n=>{if(!n.id)return;let e=(0,a.JU)(o.db,"users/".concat(p,"/notifications"),n.id);(0,a.r7)(e,{read:!0})})};return{notifications:g,actions:m,rewards:v,unreadCount:t,markNotificationsAsRead:b}}},36250:function(n,e,t){t.d(e,{Y:function(){return l}});var r=t(67294),o=t(26677),i=t(51873),c=t(36900),a=t(36100),s=t(25974);
1function l(){let[n,e]=(0,r.useState)(0),t=(0,c.CG)(s.c7),l=(0,c.OK)((0,a.IO)((0,a.hJ)(i.db,"users/".concat(t,"/processingQueue")),(0,a.Xo)("createdAt","desc"))),[u]=(0,o.d4)(l),d=n=>{if(!n)return;let e=(0,a.JU)(i.db,"users/".concat(t,"/processingQueue"),n);(0,a.oe)(e)};return(0,r.useEffect)(()=>{if(u&&u.length>0){let n=0;u.forEach(e=>{"processing"===e.status&&(n+=1)}),e(n)}},[u]),{tasks:u,count:n,removeFromQueue:d}}},95600:function(n,e,t){t.d(e,{i:function(){return i}});var r=t(67294),o=t(86926);let i=()=>{let[n,e]=(0,r.useState)({width:void 0,height:void 0,isMobile:!0,isXSOnly:!1,isSM:!0,isMD:!1,isLG:!1,isXL:!1});return(0,r.useEffect)(()=>{let n=()=>{e({width:window.innerWidth,height:window.innerHeight,isMobile:window.innerWidth<o.aA,isXSOnly:window.innerWidth<=o.yu,isSM:window.innerWidth>=o.eE,isMD:window.innerWidth>=o.aA,isLG:window.innerWidth>=o.hJ,isXL:window.innerWidth>=o.VK})};return window.addEventListener("resize",n),n(),()=>window.removeEventListener("resize",n)},[]),n}},80973:function(n,e,t){t.d(e,{Fp:function(){return p},Ft:function(){return l},I$:function(){return i},Jk:function(){return m},Lh:function(){return h},ON:function(){return a},Ps:function(){return g},Rg:function(){return f},eB:function(){return c},ex:function(){return d},j7:function(){return s}});var r=t(79439);let o=r.u.injectEndpoints({endpoints:n=>({getAdminStats:n.query({query:()=>"admin/stats",providesTags:["AdminStats"]}),getBannedWords:n.query({query:()=>"admin/banned-words",providesTags:["BannedWords"]}),updateBannedWords:n.mutation({query:n=>({url:"admin/banned-words",method:"PUT",body:n}),invalidatesTags:["BannedWords"]}),getAllBannerMessages:n.query({query:()=>"admin/banner-message",providesTags:["BannerMessage"]}),getActiveBannerMessage:n.query({query:()=>"admin/banner-message/active",providesTags:["BannerMessage"]}),getBannerMessage:n.query({query:n=>"admin/banner-message/".concat(n),providesTags:(n,e,t)=>[{type:"BannerMessage",id:t}]}),updateBannerMessage:n.mutation({query:n=>({url:"admin/banner-message/".concat(n.id),method:"PUT",body:n}),invalidatesTags:["BannerMessage"]}),addBannerMessage:n.mutation({query:n=>({url:"admin/banner-message",method:"POST",body:n}),invalidatesTags:["BannerMessage"]}),getNegativePrompts:n.query({query:()=>"admin/negative-prompts",providesTags:["NegativePrompts"]}),updateNegativePrompts:n.mutation({query:n=>({url:"admin/negative-prompts",method:"PUT",body:{words:n}}),invalidatesTags:["NegativePrompts"]}),deleteUserAdmin:n.mutation({query:n=>({url:"admin/user/".concat(n),method:"DELETE"})}),updateUserAdmin:n.mutation({query:n=>({url:"admin/user/".concat(n.id),method:"PUT",body:n})})})}),{useGetAdminStatsQuery:i,useUpdateBannedWordsMutation:c,useGetBannedWordsQuery:a,useGetAllBannerMessagesQuery:s,useGetActiveBannerMessageQuery:l,useGetBannerMessageQuery:u,useUpdateBannerMessageMutation:d,useAddBannerMessageMutation:p,useGetNegativePromptsQuery:f,useUpdateNegativePromptsMutation:g,useDeleteUserAdminMutation:h,useUpdateUserAdminMutation:m}=o},71211:function(n,e,t){t.d(e,{XN:function(){return c},XW:function(){return a},ym:function(){return i}});var r=t(79439);let o=r.u.injectEndpoints({endpoints:n=>({getTransactions:n.query({query:n=>"users/".concat(n,"/credits"),transformResponse:function(n){return n.transactions},providesTags:["Transactions"]}),addCredits:n.mutation({query:n=>{let{uid:e,credits:t}=n;return{url:"users/".concat(e,"/credits"),method:"POST",body:{credits:t}}}}),getCreditConfig:n.query({query:()=>"credits/config",providesTags:["CreditConfig"]})})}),{useGetTransactionsQuery:i,useAddCreditsMutation:c,useGetCreditConfigQuery:a}=o},745:function(n,e,t){t.d(e,{$i:function(){return v},GR:function(){return c},I1:function(){return d},Ii:function(){return m},Mk:function(){return x},Pp:function(){return a},RQ:function(){return f},Vx:function(){return l},XC:function(){return i},gL:function(){return p},io:function(){return g},kD:function(){return u},q3:function(){return h},x:function(){return s}});var r=t(79439);let o=r.u.injectEndpoints({endpoints:n=>({getCurrentUser:n.query({query:()=>
1"users",keepUnusedDataFor:30,providesTags:["CurrentUser"]}),getUser:n.query({query:n=>"users/".concat(n),providesTags:(n,e,t)=>[{type:"User",id:t}]}),getUserSubscription:n.query({query:()=>"users/subscription",keepUnusedDataFor:30,providesTags:["UserSubscription"]}),cancelSubscription:n.mutation({query:()=>({url:"users/subscription",method:"DELETE"}),invalidatesTags:["UserSubscription"]}),blockUser:n.mutation({query:n=>({url:"users/".concat(n.id,"/block"),method:"PUT",body:n}),invalidatesTags:(n,e,t)=>[{type:"User",id:t.id}]}),addUser:n.mutation({query:n=>({url:"users",method:"POST",body:n}),invalidatesTags:["CurrentUser"]}),updateUser:n.mutation({query:n=>({url:"users",method:"PUT",body:n}),invalidatesTags:["CurrentUser"]}),deleteUser:n.mutation({query:()=>({url:"users",method:"DELETE"}),invalidatesTags:["CurrentUser"]}),resetPassword:n.mutation({query:n=>({url:"users/reset-password",method:"POST",body:n}),invalidatesTags:["CurrentUser"]}),resendEmailVerification:n.mutation({query:n=>({url:"users/verify-email",method:"POST",body:n}),invalidatesTags:["CurrentUser"]}),getUserByEmail:n.mutation({query:n=>({url:"users/search",method:"POST",body:n})}),postUniqueUsernameCheck:n.mutation({query:n=>({url:"users/unique-username",method:"POST",body:n})}),followUser:n.mutation({query:n=>{let{targetUserId:e}=n;return{url:"users/".concat(e,"/follow"),method:"POST"}},invalidatesTags:["CurrentUser"]}),unfollowUser:n.mutation({query:n=>{let{targetUserId:e}=n;return{url:"users/".concat(e,"/follow"),method:"DELETE"}},invalidatesTags:["CurrentUser"]})})}),{useGetCurrentUserQuery:i,useGetUserQuery:c,useGetUserSubscriptionQuery:a,useCancelSubscriptionMutation:s,useAddUserMutation:l,useUpdateUserMutation:u,useDeleteUserMutation:d,useResetPasswordMutation:p,useResendEmailVerificationMutation:f,useGetUserByEmailMutation:g,useBlockUserMutation:h,usePostUniqueUsernameCheckMutation:m,useFollowUserMutation:x,useUnfollowUserMutation:v}=o}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.