1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9558],{2564:(e,t,r)=>{"use strict";r.d(t,{b:()=>i,s:()=>s});var n=r(12115),o=r(63540),a=r(95155),s=n.forwardRef((e,t)=>(0,a.jsx)(o.sG.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));s.displayName="VisuallyHidden";var i=s},9156:(e,t,r)=>{"use strict";r.d(t,{Toaster:()=>es});var n=r(95155),o=r(87481),a=r(12115),s=r(47650),i=r(85185),l=r(6101),u=r(76589),d=r(46081),c=r(19178),f=r(34378),p=r(28905),m=r(63540),v=r(39033),w=r(5845),y=r(52712),g=r(2564),h="ToastProvider",[x,E,b]=(0,u.N)("Toast"),[T,N]=(0,d.A)("Toast",[b]),[R,C]=T(h),A=e=>{let{__scopeToast:t,label:r="Notification",duration:o=5e3,swipeDirection:s="right",swipeThreshold:i=50,children:l}=e,[u,d]=a.useState(null),[c,f]=a.useState(0),p=a.useRef(!1),m=a.useRef(!1);return r.trim()||console.error("Invalid prop `label` supplied to `".concat(h,"`. Expected non-empty `string`.")),(0,n.jsx)(x.Provider,{scope:t,children:(0,n.jsx)(R,{scope:t,label:r,duration:o,swipeDirection:s,swipeThreshold:i,toastCount:c,viewport:u,onViewportChange:d,onToastAdd:a.useCallback(()=>f(e=>e+1),[]),onToastRemove:a.useCallback(()=>f(e=>e-1),[]),isFocusedToastEscapeKeyDownRef:p,isClosePausedRef:m,children:l})})};A.displayName=h;var S="ToastViewport",j=["F8"],P="toast.viewportPause",I="toast.viewportResume",M=a.forwardRef((e,t)=>{let{__scopeToast:r,hotkey:o=j,label:s="Notifications ({hotkey})",...i}=e,u=C(S,r),d=E(r),f=a.useRef(null),p=a.useRef(null),v=a.useRef(null),w=a.useRef(null),y=(0,l.s)(t,w,u.onViewportChange),g=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),h=u.toastCount>0;a.useEffect(()=>{let e=e=>{var t;0!==o.length&&o.every(t=>e[t]||e.code===t)&&(null==(t=w.current)||t.focus())};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[o]),a.useEffect(()=>{let e=f.current,t=w.current;if(h&&e&&t){let r=()=>{if(!u.isClosePausedRef.current){let e=new CustomEvent(P);t.dispatchEvent(e),u.isClosePausedRef.current=!0}},n=()=>
1{if(u.isClosePausedRef.current){let e=new CustomEvent(I);t.dispatchEvent(e),u.isClosePausedRef.current=!1}},o=t=>{e.contains(t.relatedTarget)||n()},a=()=>{e.contains(document.activeElement)||n()};return e.addEventListener("focusin",r),e.addEventListener("focusout",o),e.addEventListener("pointermove",r),e.addEventListener("pointerleave",a),window.addEventListener("blur",r),window.addEventListener("focus",n),()=>{e.removeEventListener("focusin",r),e.removeEventListener("focusout",o),e.removeEventListener("pointermove",r),e.removeEventListener("pointerleave",a),window.removeEventListener("blur",r),window.removeEventListener("focus",n)}}},[h,u.isClosePausedRef]);let b=a.useCallback(e=>{let{tabbingDirection:t}=e,r=d().map(e=>{let r=e.ref.current,n=[r,...function(e){let t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}(r)];return"forwards"===t?n:n.reverse()});return("forwards"===t?r.reverse():r).flat()},[d]);return a.useEffect(()=>{let e=w.current;if(e){let t=t=>{let r=t.altKey||t.ctrlKey||t.metaKey;if("Tab"===t.key&&!r){var n,o,a;let r=document.activeElement,s=t.shiftKey;if(t.target===e&&s){null==(n=p.current)||n.focus();return}let i=b({tabbingDirection:s?"backwards":"forwards"}),l=i.findIndex(e=>e===r);Q(i.slice(l+1))?t.preventDefault():s?null==(o=p.current)||o.focus():null==(a=v.current)||a.focus()}};return e.addEventListener("keydown",t),()=>e.removeEventListener("keydown",t)}},[d,b]),(0,n.jsxs)(c.lg,{ref:f,role:"region","aria-label":s.replace("{hotkey}",g),tabIndex:-1,style:{pointerEvents:h?void 0:"none"},children:[h&&(0,n.jsx)(D,{ref:p,onFocusFromOutsideViewport:()=>{Q(b({tabbingDirection:"forwards"}))}}),(0,n.jsx)(x.Slot,{scope:r,children:(0,n.jsx)(m.sG.ol,{tabIndex:-1,...i,ref:y})}),h&&(0,n.jsx)(D,{ref:v,onFocusFromOutsideViewport:()=>{Q(b({tabbingDirection:"backwards"}))}})]})});M.displayName=S;var O="ToastFocusProxy",D=a.forwardRef((e,t)=>{let{__scopeToast:r,onFocusFromOutsideViewport:o,...a}=e,s=C(O,r);return(0,n.jsx)(g.s,{"aria-hidden":!0,tabIndex:0,...a,ref:t,style:{position:"fixed"},onFocus:e=>{var t;let r=e.relatedTarget;(null==(t=s.viewport)?void 0:t.contains(r))||o()}})});D.displayName=O;var k="Toast",L=a.forwardRef((e,t)=>{let{forceMount:r,open:o,defaultOpen:a,onOpenChange:s,...l}=e,[u=!0,d]=(0,w.i)({prop:o,defaultProp:a,onChange:s});return(0,n.jsx)(p.C,{present:r||u,children:(0,n.jsx)(U,{open:u,...l,ref:t,onClose:()=>d(!1),onPause:(0,v.c)(e.onPause),onResume:(0,v.c)(e.onResume),onSwipeStart:(0,i.m)(e.onSwipeStart,e=>{e.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:(0,i.m)(e.onSwipeMove,e=>{let{x:t,y:r}=e.detail.delta;e.currentTarget.setAttribute("data-swipe","move"),e.currentTarget.style.setProperty("--radix-toast-swipe-move-x","".concat(t,"px")),e.currentTarget.style.setProperty("--radix-toast-swipe-move-y","".concat(r,"px"))}),onSwipeCancel:(0,i.m)(e.onSwipeCancel,e=>{e.currentTarget.setAttribute("data-swipe","cancel"),e.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),e.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),e.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),e.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:(0,i.m)(e.onSwipeEnd,e=>{let{x:t,y:r}=e.detail.delta;e.currentTarget.setAttribute("data-swipe","end"),e.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),e.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),e.currentTarget.style.setProperty("--radix-toast-swipe-end-x","".concat(t,"px")),e.currentTarget.style.setProperty("--radix-toast-swipe-end-y","".concat(r,"px")),d(!1)})})})});L.displayName=k;var[F,_]=T(k,{onClose(){}}),U=a.forwardRef((e,t)=>{let{__scopeToast:r,type:o="foreground",duration:u,open:d,onClose:f,onEscapeKeyDown:p,onPause:w,onResume:y,onSwipeStart:g,onSwipeMove:h,onSwipeCancel:E,onSwipeEnd:b,...T}=e,N=C(k,r),[R,A]=a.useState(null),S=(0,l.s)(t,e=>A(e)),j=a.useRef(null),M=a.useRef(null),O=u||N.duration,D=a.useRef(0),L=a.useRef(O),_=a.useRef(0),{onToastAdd:U,onToastRemove:V}=N,W=(0,v.c)(()=>{var e;(null==R?void 0:R.contains(document.activeElement))&&(null==(e=N.viewport)||e.focus()),f()}),G=a.useCallback(e=>
1{e&&e!==1/0&&(window.clearTimeout(_.current),D.current=new Date().getTime(),_.current=window.setTimeout(W,e))},[W]);a.useEffect(()=>{let e=N.viewport;if(e){let t=()=>{G(L.current),null==y||y()},r=()=>{let e=new Date().getTime()-D.current;L.current=L.current-e,window.clearTimeout(_.current),null==w||w()};return e.addEventListener(P,r),e.addEventListener(I,t),()=>{e.removeEventListener(P,r),e.removeEventListener(I,t)}}},[N.viewport,O,w,y,G]),a.useEffect(()=>{d&&!N.isClosePausedRef.current&&G(O)},[d,O,N.isClosePausedRef,G]),a.useEffect(()=>(U(),()=>V()),[U,V]);let q=a.useMemo(()=>R?function e(t){let r=[];return Array.from(t.childNodes).forEach(t=>{var n;if(t.nodeType===t.TEXT_NODE&&t.textContent&&r.push(t.textContent),(n=t).nodeType===n.ELEMENT_NODE){let n=t.ariaHidden||t.hidden||"none"===t.style.display,o=""===t.dataset.radixToastAnnounceExclude;if(!n)if(o){let e=t.dataset.radixToastAnnounceAlt;e&&r.push(e)}else r.push(...e(t))}}),r}(R):null,[R]);return N.viewport?(0,n.jsxs)(n.Fragment,{children:[q&&(0,n.jsx)(K,{__scopeToast:r,role:"status","aria-live":"foreground"===o?"assertive":"polite","aria-atomic":!0,children:q}),(0,n.jsx)(F,{scope:r,onClose:W,children:s.createPortal((0,n.jsx)(x.ItemSlot,{scope:r,children:(0,n.jsx)(c.bL,{asChild:!0,onEscapeKeyDown:(0,i.m)(p,()=>{N.isFocusedToastEscapeKeyDownRef.current||W(),N.isFocusedToastEscapeKeyDownRef.current=!1}),children:(0,n.jsx)(m.sG.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":d?"open":"closed","data-swipe-direction":N.swipeDirection,...T,ref:S,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:(0,i.m)(e.onKeyDown,e=>{"Escape"===e.key&&(null==p||p(e.nativeEvent),e.nativeEvent.defaultPrevented||(N.isFocusedToastEscapeKeyDownRef.current=!0,W()))}),onPointerDown:(0,i.m)(e.onPointerDown,e=>{0===e.button&&(j.current={x:e.clientX,y:e.clientY})}),onPointerMove:(0,i.m)(e.onPointerMove,e=>{if(!j.current)return;let t=e.clientX-j.current.x,r=e.clientY-j.current.y,n=!!M.current,o=["left","right"].includes(N.swipeDirection),a=["left","up"].includes(N.swipeDirection)?Math.min:Math.max,s=o?a(0,t):0,i=o?0:a(0,r),l="touch"===e.pointerType?10:2,u={x:s,y:i},d={originalEvent:e,delta:u};n?(M.current=u,B("toast.swipeMove",h,d,{discrete:!1})):$(u,N.swipeDirection,l)?(M.current=u,B("toast.swipeStart",g,d,{discrete:!1}),e.target.setPointerCapture(e.pointerId)):(Math.abs(t)>l||Math.abs(r)>l)&&(j.current=null)}),onPointerUp:(0,i.m)(e.onPointerUp,e=>{let t=M.current,r=e.target;if(r.hasPointerCapture(e.pointerId)&&r.releasePointerCapture(e.pointerId),M.current=null,j.current=null,t){let r=e.currentTarget,n={originalEvent:e,delta:t};$(t,N.swipeDirection,N.swipeThreshold)?B("toast.swipeEnd",b,n,{discrete:!0}):B("toast.swipeCancel",E,n,{discrete:!0}),r.addEventListener("click",e=>e.preventDefault(),{once:!0})}})})})}),N.viewport)})]}):null}),K=e=>{let{__scopeToast:t,children:r,...o}=e,s=C(k,t),[i,l]=a.useState(!1),[u,d]=a.useState(!1);return function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:()=>{},t=(0,v.c)(e);(0,y.N)(()=>{let e=0,r=0;return e=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(e),window.cancelAnimationFrame(r)}},[t])}(()=>l(!0)),a.useEffect(()=>{let e=window.setTimeout(()=>d(!0),1e3);return()=>window.clearTimeout(e)},[]),u?null:(0,n.jsx)(f.Z,{asChild:!0,children:(0,n.jsx)(g.s,{...o,children:i&&(0,n.jsxs)(n.Fragment,{children:[s.label," ",r]})})})},V=a.forwardRef((e,t)=>{let{__scopeToast:r,...o}=e;return(0,n.jsx)(m.sG.div,{...o,ref:t})});V.displayName="ToastTitle";var W=a.forwardRef((e,t)=>{let{__scopeToast:r,...o}=e;return(0,n.jsx)(m.sG.div,{...o,ref:t})});W.displayName="ToastDescription";var G="ToastAction",q=a.forwardRef((e,t)=>{let{altText:r,...o}=e;return r.trim()?(0,n.jsx)(H,{altText:r,asChild:!0,children:(0,n.jsx)(z,{...o,ref:t})}):(console.error("Invalid prop `altText` supplied to `".concat(G,"`. Expected non-empty `string`.")),null)});q.displayName=G;var X="ToastClose",z=a.forwardRef((e,t)=>{let{__scopeToast:r,...o}=e,a=_(X,r);return(0,n.jsx)(H,{asChild:!0,children:(0,n.jsx)(m.sG.button,{type:"button",...o,ref:t,onClick:(0,i.m)(e.onClick,a.onClose)})})});z.displayName=X;var H=a.forwardRef((e,t)=>
1{let{__scopeToast:r,altText:o,...a}=e;return(0,n.jsx)(m.sG.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":o||void 0,...a,ref:t})});function B(e,t,r,n){let{discrete:o}=n,a=r.originalEvent.currentTarget,s=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t&&a.addEventListener(e,t,{once:!0}),o?(0,m.hO)(a,s):a.dispatchEvent(s)}var $=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=Math.abs(e.x),o=Math.abs(e.y),a=n>o;return"left"===t||"right"===t?a&&n>r:!a&&o>r};function Q(e){let t=document.activeElement;return e.some(e=>e===t||(e.focus(),document.activeElement!==t))}var Y=r(74466),Z=r(25318),J=r(59434);let ee=a.forwardRef((e,t)=>{let{className:r,...o}=e;return(0,n.jsx)(M,{ref:t,className:(0,J.cn)("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",r),...o})});ee.displayName=M.displayName;let et=(0,Y.F)("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),er=a.forwardRef((e,t)=>{let{className:r,variant:o,...a}=e;return(0,n.jsx)(L,{ref:t,className:(0,J.cn)(et({variant:o}),r),...a})});er.displayName=L.displayName,a.forwardRef((e,t)=>{let{className:r,...o}=e;return(0,n.jsx)(q,{ref:t,className:(0,J.cn)("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",r),...o})}).displayName=q.displayName;let en=a.forwardRef((e,t)=>{let{className:r,...o}=e;return(0,n.jsx)(z,{ref:t,className:(0,J.cn)("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",r),"toast-close":"",...o,children:(0,n.jsx)(Z.A,{className:"h-4 w-4"})})});en.displayName=z.displayName;let eo=a.forwardRef((e,t)=>{let{className:r,...o}=e;return(0,n.jsx)(V,{ref:t,className:(0,J.cn)("text-sm font-semibold",r),...o})});eo.displayName=V.displayName;let ea=a.forwardRef((e,t)=>{let{className:r,...o}=e;return(0,n.jsx)(W,{ref:t,className:(0,J.cn)("text-sm opacity-90",r),...o})});function es(){let{toasts:e}=(0,o.dj)();return(0,n.jsxs)(A,{children:[e.map(function(e){let{id:t,title:r,description:o,action:a,...s}=e;return(0,n.jsxs)(er,{...s,children:[(0,n.jsxs)("div",{className:"grid gap-1",children:[r&&(0,n.jsx)(eo,{children:r}),o&&(0,n.jsx)(ea,{children:o})]}),a,(0,n.jsx)(en,{})]},t)}),(0,n.jsx)(ee,{})]})}ea.displayName=W.displayName},25318:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(40157).A)("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},28905:(e,t,r)=>{"use strict";r.d(t,{C:()=>s});var n=r(12115),o=r(6101),a=r(52712),s=e=>{let{present:t,children:r}=e,s=function(e){var t,r;let[o,s]=n.useState(),l=n.useRef({}),u=n.useRef(e),d=n.useRef("none"),[c,f]=(t=e?"mounted":"unmounted",r={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}},n.useReducer((e,t)=>
1{let n=r[e][t];return null!=n?n:e},t));return n.useEffect(()=>{let e=i(l.current);d.current="mounted"===c?e:"none"},[c]),(0,a.N)(()=>{let t=l.current,r=u.current;if(r!==e){let n=d.current,o=i(t);e?f("MOUNT"):"none"===o||(null==t?void 0:t.display)==="none"?f("UNMOUNT"):r&&n!==o?f("ANIMATION_OUT"):f("UNMOUNT"),u.current=e}},[e,f]),(0,a.N)(()=>{if(o){var e;let t,r=null!=(e=o.ownerDocument.defaultView)?e:window,n=e=>{let n=i(l.current).includes(e.animationName);if(e.target===o&&n&&(f("ANIMATION_END"),!u.current)){let e=o.style.animationFillMode;o.style.animationFillMode="forwards",t=r.setTimeout(()=>{"forwards"===o.style.animationFillMode&&(o.style.animationFillMode=e)})}},a=e=>{e.target===o&&(d.current=i(l.current))};return o.addEventListener("animationstart",a),o.addEventListener("animationcancel",n),o.addEventListener("animationend",n),()=>{r.clearTimeout(t),o.removeEventListener("animationstart",a),o.removeEventListener("animationcancel",n),o.removeEventListener("animationend",n)}}f("ANIMATION_END")},[o,f]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:n.useCallback(e=>{e&&(l.current=getComputedStyle(e)),s(e)},[])}}(t),l="function"==typeof r?r({present:s.isPresent}):n.Children.only(r),u=(0,o.s)(s.ref,function(e){var t,r;let n=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,o=n&&"isReactWarning"in n&&n.isReactWarning;return o?e.ref:(o=(n=null==(r=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:r.get)&&"isReactWarning"in n&&n.isReactWarning)?e.props.ref:e.props.ref||e.ref}(l));return"function"==typeof r||s.isPresent?n.cloneElement(l,{ref:u}):null};function i(e){return(null==e?void 0:e.animationName)||"none"}s.displayName="Presence"},30347:()=>{},34370:(e,t,r)=>{Promise.resolve().then(r.t.bind(r,30347,23)),Promise.resolve().then(r.bind(r,9156)),Promise.resolve().then(r.bind(r,68437))},56104:(e,t,r)=>{"use strict";let n;r.r(t),r.d(t,{app:()=>n,auth:()=>l,db:()=>d,storage:()=>u});var o=r(23915),a=r(90858),s=r(93004),i=r(35317);n=0===(0,o.Dk)().length?(0,o.Wp)({apiKey:"AIzaSyCOJ-gKRkiPIPbbSRTxNDMqowxUr4cqKMQ",authDomain:"podscribe-ofpql.firebaseapp.com",projectId:"podscribe-ofpql",storageBucket:"podscribe-ofpql.firebasestorage.app",messagingSenderId:"874605385055",appId:"1:874605385055:web:decf7dcebf455355e392ea"}):(0,o.Sx)();let l=(0,s.xI)(n),u=(0,a.c7)(n),d=(0,i.getFirestore)(n)},59434:(e,t,r)=>{"use strict";r.d(t,{cn:()=>a});var n=r(52596),o=r(39688);function a(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,o.QP)((0,n.$)(t))}},68437:(e,t,r)=>{"use strict";r.d(t,{A:()=>f,AuthProvider:()=>c});var n=r(95155),o=r(12115),a=r(93004),s=r(56104),i=r(35317);let l=["[email protected]","[email protected]"],u=["[email protected]"],d=(0,o.createContext)({user:null,authLoaded:!1,isAdmin:!1,isPayingUser:!1,signInWithGoogle:async()=>{},signInWithEmail:async()=>{},signInAnonymously:async()=>{},signOut:async()=>{},adminMode:!1,setAdminMode:()=>{}}),c=e=>{let{children:t}=e,[r,c]=(0,o.useState)(null),[f,p]=(0,o.useState)(!1),[m,v]=(0,o.useState)(!1),[w,y]=(0,o.useState)(!1),[g,h]=(0,o.useState)(!1),x=(0,o.useCallback)(async e=>{if(p(!1),!e||!e.email){v(!1),y((null==e?void 0:e.isAnonymous)||!1),c(e),p(!0);return}let t=e.email.toLowerCase(),r=l.includes(t);if(v(r),r||u.includes(t)){y(!0),c(e),p(!0);return}try{let r=(0,i.doc)(s.db,"whitelist",t);if((await (0,i.getDoc)(r)).exists()){y(!0),c(e),p(!0);return}}catch(e){console.warn("Whitelist check failed",e)}try{let t=await e.getIdToken(!0),r=await fetch("/api/check-subscription",{headers:{Authorization:"Bearer ".concat(t)}});if(r.ok&&(await r.json()).isPaying){y(!0),c(e),p(!0);return}}catch(e){console.error("Stripe check failed",e)}y(!1),c(e),p(!0)},[]);(0,o.useEffect)(()=>{let e=(0,a.hg)(s.auth,x);return()=>e()},[x]);let E=(0,o.useCallback)(async()=>{let e=new a.HF;e.setCustomParameters({prompt:"select_account"});try{await (0,a.df)(s.auth,e)}catch(e){throw console.error("[AuthContext] Google sign-in failed:",e),e}},[]),b=(0,o.useCallback)(async(e,t)=>{try{await (0,a.x9)(s.auth,e,t)}catch(e){throw e}},[]),T=(0,o.useCallback)(async()=>{try{await (0,a.zK)(s.auth)}catch(e){throw console.error("Anonymous sign-in failed:",e),e}},[]),N=(0,o.useCallback)(async()=>{try{await (0,a.CI)(s.auth)}catch(e){console.error("[AuthContext] Sign out failed:",e)}},[]);return(0,n.jsx)(d.Provider,{value:{user:r,authLoaded:f,isAdmin:m,isPayingUser:w,signInWithGoogle:E,signInWithEmail:b,signOut:N,adminMode:g,setAdminMode:e=>{m&&h(e)},signInAnonymously:T}
1,children:t})},f=()=>(0,o.useContext)(d)},74466:(e,t,r)=>{"use strict";r.d(t,{F:()=>s});var n=r(52596);let o=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,a=n.$,s=(e,t)=>r=>{var n;if((null==t?void 0:t.variants)==null)return a(e,null==r?void 0:r.class,null==r?void 0:r.className);let{variants:s,defaultVariants:i}=t,l=Object.keys(s).map(e=>{let t=null==r?void 0:r[e],n=null==i?void 0:i[e];if(null===t)return null;let a=o(t)||o(n);return s[e][a]}),u=r&&Object.entries(r).reduce((e,t)=>{let[r,n]=t;return void 0===n||(e[r]=n),e},{});return a(e,l,null==t||null==(n=t.compoundVariants)?void 0:n.reduce((e,t)=>{let{class:r,className:n,...o}=t;return Object.entries(o).every(e=>{let[t,r]=e;return Array.isArray(r)?r.includes({...i,...u}[t]):({...i,...u})[t]===r})?[...e,r,n]:e},[]),null==r?void 0:r.class,null==r?void 0:r.className)}},76589:(e,t,r)=>{"use strict";r.d(t,{N:()=>c});var n=r(12115),o=r(46081),a=r(6101),s=r(95155),i=n.forwardRef((e,t)=>{let{children:r,...o}=e,a=n.Children.toArray(r),i=a.find(d);if(i){let e=i.props.children,r=a.map(t=>t!==i?t:n.Children.count(e)>1?n.Children.only(null):n.isValidElement(e)?e.props.children:null);return(0,s.jsx)(l,{...o,ref:t,children:n.isValidElement(e)?n.cloneElement(e,void 0,r):null})}return(0,s.jsx)(l,{...o,ref:t,children:r})});i.displayName="Slot";var l=n.forwardRef((e,t)=>{let{children:r,...o}=e;if(n.isValidElement(r)){let e=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(r=(t=Object.getOwnPropertyDescriptor(e,"ref")?.get)&&"isReactWarning"in t&&t.isReactWarning)?e.props.ref:e.props.ref||e.ref}(r),s=function(e,t){let r={...t};for(let n in t){let o=e[n],a=t[n];/^on[A-Z]/.test(n)?o&&a?r[n]=(...e)=>{a(...e),o(...e)}:o&&(r[n]=o):"style"===n?r[n]={...o,...a}:"className"===n&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}(o,r.props);return r.type!==n.Fragment&&(s.ref=t?(0,a.t)(t,e):e),n.cloneElement(r,s)}return n.Children.count(r)>1?n.Children.only(null):null});l.displayName="SlotClone";var u=({children:e})=>(0,s.jsx)(s.Fragment,{children:e});function d(e){return n.isValidElement(e)&&e.type===u}function c(e){let t=e+"CollectionProvider",[r,l]=(0,o.A)(t),[u,d]=r(t,{collectionRef:{current:null},itemMap:new Map}),c=e=>{let{scope:t,children:r}=e,o=n.useRef(null),a=n.useRef(new Map).current;return(0,s.jsx)(u,{scope:t,itemMap:a,collectionRef:o,children:r})};c.displayName=t;let f=e+"CollectionSlot",p=n.forwardRef((e,t)=>{let{scope:r,children:n}=e,o=d(f,r),l=(0,a.s)(t,o.collectionRef);return(0,s.jsx)(i,{ref:l,children:n})});p.displayName=f;let m=e+"CollectionItemSlot",v="data-radix-collection-item",w=n.forwardRef((e,t)=>{let{scope:r,children:o,...l}=e,u=n.useRef(null),c=(0,a.s)(t,u),f=d(m,r);return n.useEffect(()=>(f.itemMap.set(u,{ref:u,...l}),()=>void f.itemMap.delete(u))),(0,s.jsx)(i,{...{[v]:""},ref:c,children:o})});return w.displayName=m,[{Provider:c,Slot:p,ItemSlot:w},function(t){let r=d(e+"CollectionConsumer",t);return n.useCallback(()=>{let e=r.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll("[".concat(v,"]")));return Array.from(r.itemMap.values()).sort((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current))},[r.collectionRef,r.itemMap])},l]}},87481:(e,t,r)=>{"use strict";r.d(t,{dj:()=>f});var n=r(12115);let o=0,a=new Map,s=e=>{if(a.has(e))return;let t=setTimeout(()=>{a.delete(e),d({type:"REMOVE_TOAST",toastId:e})},1e6);a.set(e,t)},i=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,1)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(e=>e.id===t.toast.id?{...e,...t.toast}:e)};case"DISMISS_TOAST":{let{toastId:r}=t;return r?s(r):e.toasts.forEach(e=>{s(e.id)}),{...e,toasts:e.toasts.map(e=>e.id===r||void 0===r?{...e,open:!1}:e)}}case"REMOVE_TOAST":if(void 0===t.toastId)return{...e,toasts:[]};return{...e,toasts:e.toasts.filter(e=>e.id!==t.toastId)}}},l=[],u={toasts:[]};function d(e){u=i(u,e),l.forEach(e=>{e(u)})}function c(e){let{...t}=e,r=(o=(o+1)%Number.MAX_SAFE_INTEGER).toString(),n=()=>d({type:"DISMISS_TOAST",toastId:r});return d({type:"ADD_TOAST",toast:{...t,id:r,open:!0,onOpenChange:e=>{e||n()}}}),{id:r,dismiss:n,update:e=>d({type:"UPDATE_TOAST",toast:{...e,id:r}})}}function f(){let[e,t]=n.useState(u);return n.useEffect(()=>(l.push(t),()=>{let e=l.indexOf(t);e>-1&&l.splice(e,1)}),[e]),{...e,toast:c,dismiss:e=>d({type:"DISMISS_TOAST",toastId:e})}}}},e=>{var t=t=>e(e.s=t);e.O(0,[7690,2992,3644,5769,3340,167,8441,1684,7358],()=>t(34370)),_N_E=e.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.