PageSourceSearch

https://thenewcomerspod.com/assets/StaticPage-Babiqn2v.js

js thenewcomerspod.com collected 2026-09-25 02:53:18 UTC 225,547 bytes, 13 lines download raw bytes

1
2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="584157ea-e52f-5027-9518-cb524801874a")}catch(e){}}();
3const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/CoachingBookingModal-BLn5ij6t.js","assets/jsx-runtime-D4ePz0Hl.js","assets/components-CDo3yjgw.js","assets/react-dom-D0cDl6Cl.js","assets/react-BXH-GOAS.js","assets/utils-CjUr88hv.js","assets/PricingSkeleton-ZQmrMkfu.js","assets/ActionForm-ubtCpxTm.js","assets/ComponentErrorBoundary-uV-4msg_.js","assets/Text-BXQCamjY.js","assets/classnames-B9Sa-P4w.js","assets/PageContext-Wgvoj3Ta.js","assets/cn-Cz4MqTg-.js","assets/clsx-CjueKrWZ.js","assets/constants-D1RUU1Rv.js","assets/Tooltip-IxbCCOij.js","assets/floating-ui.react-SnMdqaDc.js","assets/CommunityMemberActionsProvider-RbKU5frW.js","assets/ConfirmDialog-qJ2hzKOi.js","assets/BottomSheetDialog-DcPGSOIu.js","assets/transition-B4qu-R77.js","assets/keyboard-WQ8K8_a3.js","assets/Dialog-CMOTIGCZ.js","assets/useTranslation-xRzBcOIb.js","assets/context-BmvuYzDi.js","assets/FieldStatus-BWwBjk7F.js","assets/MemberProfileLink-DTH-ashB.js","assets/community-Dn-kSyk_.js","assets/useCommunityMembership-DRaMPU7W.js","assets/useGlobalModals-CJ1k8aJl.js","assets/nectarTrackingFields-BN5KBl15.js","assets/QueryClientProvider-Cdu2unP4.js","assets/query-wBbGv6-D.js","assets/useCommunityActionBase-hxxvQypu.js","assets/CsrfContext-ByWWfcRz.js","assets/useMutation-sej49wS6.js","assets/dist-DaRpaGs2.js","assets/infiniteQueryBehavior-BHvue0HT.js","assets/useBlockMemberMutation-DDCpl7S2.js","assets/useFollowMemberMutation-BdfyDxXq.js","assets/LockClosedIcon-EgqD9Np-.js","assets/dist-DEFr8jR8.js","assets/Trans-tHiUt0Wm.js","assets/linkify-Br8zjfYj.js","assets/SignupAction-DE5eomti.js","assets/StatusInputs-D5MCvfKS.js","assets/useSignupRedirects-BSkdT_4N.js","assets/useNonRevalidatingFetcher-CaohiMMR.js","assets/useToast-CorSxc9g.js","assets/pickBy-BtAf_ExY.js","assets/nectarPageBlock-Dhr05eLZ.js","assets/exports-mk284NM-.js","assets/lib-V61EcWBh.js","assets/client-only-_T1ty6Rk.js","assets/SignupAction-KcXJoWn6.css","assets/stytch-CmmoOQzG.js","assets/pushSubscription-vzO9AQ6U.js","assets/pwaPromptConfig-AUACWOQD.js","assets/Avatar-BIBwmBTY.js","assets/rewriteSrc-CE-UieqK.js","assets/PillButton-DKmaS7V0.js","assets/useCommunityLogoUrl-aJXeAVzG.js","assets/getFullCommunityName-D1FaVagz.js","assets/XMarkIcon-DmEhIDFO.js","assets/index-d93whXsZ-BdV21a5s.js","assets/Pricing-IA63YF10.js","assets/Button-Bxwxr4Gl.js","assets/useComponentFetcher-Blqq76Zc.js","assets/useIsLoggedIn-B87EngYs.js","assets/subscriptions-V9sGVK1o.js","assets/useShortRelativeDate-Cpl-GDDn.js","assets/dayjs.min-Co_qGSIM.js","assets/relativeTime-C9cy_A9S.js","assets/safeJsonParse-CEvYE7_v.js","assets/react-stripe.esm-BTPVjSBv.js","assets/prop-types-CoWeUPqt.js","assets/debounce-MjWJAxiu.js"])))=>i.map(i=>d[i]);
4import{i as e,s as t,t as n}from"./jsx-runtime-D4ePz0Hl.js";import{t as r}from"./react-BXH-GOAS.js";import{t as i}from"./react-dom-D0cDl6Cl.js";import{B as a,D as o,I as s,L as c,M as l,N as u,R as d,f,l as p,n as m,u as h,x as g}from"./components-CDo3yjgw.js";import{n as _}from"./exports-mk284NM-.js";import{t as v}from"./useTranslation-xRzBcOIb.js";import{t as y}from"./utils-CjUr88hv.js";import{t as b}from"./classnames-B9Sa-P4w.js";import{i as x,n as S,t as C}from"./useSignupRedirects-BSkdT_4N.js";import{i as w,r as T}from"./stytch-CmmoOQzG.js";import{r as E,t as D}from"./ComponentErrorBoundary-uV-4msg_.js";import{t as O}from"./Text-BXQCamjY.js";import{n as k,r as A}from"./dist-DaRpaGs2.js";import{t as j}from"./client-only-_T1ty6Rk.js";import{I as M,L as N,V as P,n as F,x as I}from"./QueryClientProvider-Cdu2unP4.js";import{a as L}from"./nectarTrackingFields-BN5KBl15.js";import{t as R}from"./useNonRevalidatingFetcher-CaohiMMR.js";import{t as ee}from"./LockClosedIcon-EgqD9Np-.js";import{t as z}from"./Button-Bxwxr4Gl.js";import{t as B}from"./useGlobalModals-CJ1k8aJl.js";import{t as V}from"./useCommunityMembership-DRaMPU7W.js";import{n as H}from"./useShortRelativeDate-Cpl-GDDn.js";import{t as te}from"./debounce-MjWJAxiu.js";import{t as U}from"./pickBy-BtAf_ExY.js";import{t as W}from"./useTypedLoaderData-Ds8C8hPk.js";import{t as ne}from"./SlideUpModal-BlSpdyWo.js";import{d as re,f as ie,g as ae,h as oe,l as se,n as ce,p as le,r as ue,t as de,u as fe}from"./PricingSkeleton-ZQmrMkfu.js";import{U as pe}from"./constants-D1RUU1Rv.js";import{D as me,_ as he,b as ge,f as _e,g as ve,m as ye,n as be,o as xe,r as Se,s as Ce,t as we,v as Te,w as Ee,
vendor: 5,850 bytes, line 4
4y as De}from"./SignupAction-DE5eomti.js";import{$ as Oe,B as ke,Bt as Ae,C as je,D as Me,Dt as Ne,E as Pe,Et as Fe,F as Ie,Ft as Le,G as Re,H as ze,Ht as Be,I as Ve,It as He,Jt as Ue,K as We,Kt as Ge,L as Ke,Lt as qe,M as Je,Mt as Ye,N as Xe,Nt as Ze,Ot as Qe,P as $e,Pt as et,Q as tt,Qt as nt,R as rt,Rt as it,S as at,T as ot,U as st,Ut as ct,V as lt,Vt as ut,Wt as dt,X as ft,Xt as pt,Y as mt,Yt as ht,Z as gt,Zt as _t,_ as vt,_t as yt,an as bt,at as xt,b as St,cn as Ct,ct as wt,dn as Tt,dt as Et,en as Dt,et as Ot,f as kt,fn as At,ft as jt,g as Mt,gt as Nt,h as Pt,ht as Ft,in as It,it as Lt,jt as Rt,kt as zt,ln as Bt,lt as Vt,m as Ht,mn as Ut,mt as Wt,nn as Gt,nt as Kt,on as qt,ot as Jt,pn as G,pt as Yt,q as Xt,qt as Zt,rn as Qt,rt as $t,sn as en,st as tn,t as nn,tn as rn,tt as an,u as on,un as sn,ut as cn,v as ln,vt as un,w as dn,x as fn,yt as pn,z as mn}from"./PostContent-CX47dnLK.js";import{t as K}from"./cn-Cz4MqTg-.js";import{E as hn,J as gn,Q as _n,V as vn,X as yn,l as bn,t as xn}from"./CommentSection-Bz1tx8cx.js";import{_ as Sn,b as Cn,g as wn,r as Tn,s as En}from"./floating-ui.react-SnMdqaDc.js";import{a as Dn,d as On,f as kn,i as An,o as jn,r as Mn,t as Nn,u as Pn}from"./ActionForm-ubtCpxTm.js";import{t as Fn}from"./FooterReferralLink-C-fLmkVJ.js";import{a as In,i as Ln,n as Rn,r as zn,t as Bn}from"./translations-BSW24LjB.js";import{t as Vn}from"./rewriteSrc-CE-UieqK.js";import{t as Hn}from"./StatusInputs-D5MCvfKS.js";import{n as Un}from"./useToast-CorSxc9g.js";import{t as Wn}from"./useIsLoggedIn-B87EngYs.js";import{n as Gn,r as Kn,t as qn}from"./isWebinarJoinable-D2ievFFU.js";import{t as Jn}from"./useComponentFetcher-Blqq76Zc.js";import{n as Yn}from"./BottomSheetDialog-DcPGSOIu.js";import{n as Xn,t as Zn}from"./Input-Dp9wVoLB.js";import{t as Qn}from"./PillButton-DKmaS7V0.js";import{t as $n}from"./getFullCommunityName-D1FaVagz.js";import{t as er}from"./Avatar-BIBwmBTY.js";import{t as tr}from"./PillLink-BBFBbnTp.js";import{n as nr}from"./communityTheme-Dh8U7vsl.js";var q=t(r()),J=t(n(),1),Y=t(b(),1);function rr(){}function ir(e){return e==null||typeof e!=`object`&&typeof e!=`function`}function ar(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function or(e){if(ir(e))return e;if(Array.isArray(e)||ar(e)||e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer)return e.slice(0);let t=Object.getPrototypeOf(e);if(t==null)return Object.assign(Object.create(t),e);let n=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new n(e);if(e instanceof RegExp){let t=new n(e);return t.lastIndex=e.lastIndex,t}if(e instanceof DataView)return new n(e.buffer.slice(0));if(e instanceof Error){let t;return t=e instanceof AggregateError?new n(e.errors,e.message,{cause:e.cause}):new n(e.message,{cause:e.cause}),t.stack=e.stack,Object.assign(t,e),t}return typeof File<`u`&&e instanceof File?new n([e],e.name,{type:e.type,lastModified:e.lastModified}):typeof e==`object`?Object.assign(Object.create(t),e):e}function sr(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function cr(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var lr=`[object RegExp]`,ur=`[object String]`,dr=`[object Number]`,fr=`[object Boolean]`,pr=`[object Arguments]`,mr=`[object Symbol]`,hr=`[object Date]`,gr=`[object Map]`,_r=`[object Set]`,vr=`[object Array]`,yr=`[object ArrayBuffer]`,br=`[object Object]`,xr=`[object DataView]`,Sr=`[object Uint8Array]`,Cr=`[object Uint8ClampedArray]`,wr=`[object Uint16Array]`,Tr=`[object Uint32Array]`,Er=`[object Int8Array]`,Dr=`[object Int16Array]`,Or=`[object Int32Array]`,kr=`[object Float32Array]`,Ar=`[object Float64Array]`;function jr(e,t){return Mr(e,void 0,e,new Map,t)}function Mr(e,t,n,r=new Map,i=void 0){let a=i?.(e,t,n,r);if(a!==void 0)return a;if(ir(e))return e;if(r.has(e))return r.get(e);if(Array.isArray(e)){let t=Array(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=Mr(e[a],a,n,r,i);return Object.hasOwn(e,`index`)&&(t.index=e.index),Object.hasOwn(e,`input`)&&(t.input=e.input),t}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){let t=new RegExp(e.source,e.flags);return t.lastIndex=e.lastIndex,t}if(e instanceof Map){let t=new Map;r.set(e,t);for(let[a,o]of e)t.set(a,Mr(o,a,n,r,i));return t}if(e instanceof Set){let t=new Set;r.set(e,t);for(let a of e)t.add(Mr(a,void 0,n,r,i));return t}if(typeof Buffer<`u`&&Buffer.isBuffer(e))return e.subarray();if(ar(e)){let t=new(Object.getPrototypeOf(e)).constructor(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=Mr(e[a],a,n,r,i);return t}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){let t=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return r.set(e,t),Nr(t,e,n,r,i),t}if(typeof File<`u`&&e instanceof File){let t=new File([e],e.name,{type:e.type});return r.set(e,t),Nr(t,e,n,r,i),t}if(typeof Blob<`u`&&e instanceof Blob){let t=new Blob([e],{type:e.type});return r.set(e,t),Nr(t,e,n,r,i),t}if(e instanceof Error){let t=structuredClone(e);return r.set(e,t),t.message=e.message,t.name=e.name,t.stack=e.stack,t.cause=e.cause,t.constructor=e.constructor,Nr(t,e,n,r,i),t}if(e instanceof Boolean){let t=new Boolean(e.valueOf());return r.set(e,t),Nr(t,e,n,r,i),t}if(e instanceof Number){let t=new Number(e.valueOf());return r.set(e,t),Nr(t,e,n,r,i),t}if(e instanceof String){let t=new String(e.valueOf());return r.set(e,t),Nr(t,e,n,r,i),t}if(typeof e==`object`&&Pr(e)){let t=Object.create(Object.getPrototypeOf(e));return r.set(e,t),Nr(t,e,n,r,i),t}return e}function Nr(e,t,n=e,r,i){let a=[...Object.keys(t),...sr(t)];for(let o=0;o<a.length;o++){let s=a[o],c=Object.getOwnPropertyDescriptor(e,s);(c==null||c.writable)&&(e[s]=Mr(t[s],s,n,r,i))}}
4function Pr(e){switch(cr(e)){case pr:case vr:case yr:case xr:case fr:case hr:case kr:case Ar:case Er:case Dr:case Or:case gr:case dr:case br:case lr:case _r:case ur:case mr:case Sr:case Cr:case wr:case Tr:return!0;default:return!1}}function Fr(e){return e===`__proto__`}function Ir(e){if(typeof e!=`object`||!e)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(Object.prototype.toString.call(e)!==`[object Object]`){let t=e[Symbol.toStringTag];return t==null||!Object.getOwnPropertyDescriptor(e,Symbol.toStringTag)?.writable?!1:e.toString()===`[object ${t}]`}let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function Lr(e){return Number.isSafeInteger(e)&&e>=0}function Rr({title:e,titleId:t,...n},r){return q.createElement(`svg`,Object.assign({xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,strokeWidth:1.5,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`,ref:r,"aria-labelledby":t},n),e?q.createElement(`title`,{id:t},e):null,q.createElement(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M12 6v6h4.5m4.5 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z`}))}var zr=q.forwardRef(Rr);function Br(e){return typeof structuredClone==`function`?structuredClone(e):JSON.parse(JSON.stringify(e))}var Vr=new Map([[`bold`,(0,J.jsx)(`path`,{d:`M228,128a12,12,0,0,1-12,12H40a12,12,0,0,1,0-24H216A12,12,0,0,1,228,128ZM40,76H216a12,12,0,0,0,0-24H40a12,12,0,0,0,0,24ZM216,180H40a12,12,0,0,0,0,24H216a12,12,0,0,0,0-24Z`})],[`duotone`,(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`path`,{d:`M216,64V192H40V64Z`,opacity:`0.2`}),(0,J.jsx)(`path`,{d:`M224,128a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,128ZM40,72H216a8,8,0,0,0,0-16H40a8,8,0,0,0,0,16ZM216,184H40a8,8,0,0,0,0,16H216a8,8,0,0,0,0-16Z`})]})],[`fill`,(0,J.jsx)(`path`,{d:`M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM192,184H64a8,8,0,0,1,0-16H192a8,8,0,0,1,0,16Zm0-48H64a8,8,0,0,1,0-16H192a8,8,0,0,1,0,16Zm0-48H64a8,8,0,0,1,0-16H192a8,8,0,0,1,0,16Z`})],[`light`,(0,J.jsx)(`path`,{d:`M222,128a6,6,0,0,1-6,6H40a6,6,0,0,1,0-12H216A6,6,0,0,1,222,128ZM40,70H216a6,6,0,0,0,0-12H40a6,6,0,0,0,0,12ZM216,186H40a6,6,0,0,0,0,12H216a6,6,0,0,0,0-12Z`})],[`regular`,(0,J.jsx)(`path`,{d:`M224,128a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,128ZM40,72H216a8,8,0,0,0,0-16H40a8,8,0,0,0,0,16ZM216,184H40a8,8,0,0,0,0,16H216a8,8,0,0,0,0-16Z`})],[`thin`,(0,J.jsx)(`path`,{d:`M220,128a4,4,0,0,1-4,4H40a4,4,0,0,1,0-8H216A4,4,0,0,1,220,128ZM40,68H216a4,4,0,0,0,0-8H40a4,4,0,0,0,0,8ZM216,188H40a4,4,0,0,0,0,8H216a4,4,0,0,0,0-8Z`})]]);function Hr({className:e,size:t,weight:n=`regular`}){return(0,J.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 256 256`,className:e,width:t,height:t,fill:`currentColor`,children:Vr.get(n)})}var Ur=new Map([[`bold`,(0,J.jsx)(`path`,{d:`M208.49,191.51a12,12,0,0,1-17,17L128,145,64.49,208.49a12,12,0,0,1-17-17L111,128,47.51,64.49a12,12,0,0,1,17-17L128,111l63.51-63.52a12,12,0,0,1,17,17L145,128Z`})],[`duotone`,(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`path`,{d:`M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z`,opacity:`0.2`}),(0,J.jsx)(`path`,{d:`M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z`})]})],[`fill`,(0,J.jsx)(`path`,{d:`M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM181.66,170.34a8,8,0,0,1-11.32,11.32L128,139.31,85.66,181.66a8,8,0,0,1-11.32-11.32L116.69,128,74.34,85.66A8,8,0,0,1,85.66,74.34L128,116.69l42.34-42.35a8,8,0,0,1,11.32,11.32L139.31,128Z`})],[`light`,(0,J.jsx)(`path`,{d:`M204.24,195.76a6,6,0,1,1-8.48,8.48L128,136.49,60.24,204.24a6,6,0,0,1-8.48-8.48L119.51,128,51.76,60.24a6,6,0,0,1,8.48-8.48L128,119.51l67.76-67.75a6,6,0,0,1,8.48,8.48L136.49,128Z`})],[`regular`,(0,J.jsx)(`path`,{d:`M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z`})],[`thin`,(0,J.jsx)(`path`,{d:`M202.83,197.17a4,4,0,0,1-5.66,5.66L128,133.66,58.83,202.83a4,4,0,0,1-5.66-5.66L122.34,128,53.17,58.83a4,4,0,0,1,5.66-5.66L128,122.34l69.17-69.17a4,4,0,1,1,5.66,5.66L133.66,128Z`})]]);function Wr({className:e,size:t,weight:n=`regular`}){return(0,J.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 256 256`,className:e,width:t,height:t,fill:`currentColor`,children:Ur.get(n)})}var Gr=new Map([[`bold`,q.createElement(q.Fragment,null,q.createElement(`path`,{d:`M232.49,215.51,185,168a92.12,92.12,0,1,0-17,17l47.53,47.54a12,12,0,0,0,17-17ZM44,112a68,68,0,1,1,68,68A68.07,68.07,0,0,1,44,112Z`}))],[`duotone`,q.createElement(q.Fragment,null,q.createElement(`path`,{d:`M192,112a80,80,0,1,1-80-80A80,80,0,0,1,192,112Z`,opacity:`0.2`}),q.createElement(`path`,{d:`M229.66,218.34,179.6,168.28a88.21,88.21,0,1,0-11.32,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z`}))],[`fill`,q.createElement(q.Fragment,null,q.createElement(`path`,{d:`M168,112a56,56,0,1,1-56-56A56,56,0,0,1,168,112Zm61.66,117.66a8,8,0,0,1-11.32,0l-50.06-50.07a88,88,0,1,1,11.32-11.31l50.06,50.06A8,8,0,0,1,229.66,229.66ZM112,184a72,72,0,1,0-72-72A72.08,72.08,0,0,0,112,184Z`}))],[`light`,q.createElement(q.Fragment,null,q.createElement(`path`,{d:`M228.24,219.76l-51.38-51.38a86.15,86.15,0,1,0-8.48,8.48l51.38,51.38a6,6,0,0,0,8.48-8.48ZM38,112a74,74,0,1,1,74,74A74.09,74.09,0,0,1,38,112Z`}))],[`regular`,q.createElement(q.Fragment,null,q.createElement(`path`,{d:`M229.66,218.34l-50.07-50.06a88.11,88.11,0,1,0-11.31,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z`}))],[`thin`,q.createElement(q.Fragment,null,q.createElement(`path`,{d:`M226.83,221.17l-52.7-52.7a84.1,84.1,0,1,0-5.66,5.66l52.7,52.7a4,4,0,0,0,5.66-5.66ZM36,112a76,76,0,1,1,76,76A76.08,76.08,0,0,1,36,112Z`}))]]),Kr=new Map([[`bold`,q.createElement(q.Fragment,null,q.createElement(`path`,{d:`M232.49,112.49l-48,48a12,12,0,0,1-17-17L195,116H165a84,84,0,0,0-81.36,63,12,12,0,1,1-23.24-6A107.94,107.94,0,0,1,165,92H195L167.51,64.48a12,12,0,0,1,17-17l48,48A12,12,0,0,1,232.49,112.49ZM192,204H44V88a12,12,0,0,0-24,0V216a12,12,0,0,0,12,12H192a12,12,0,0,0,0-24Z`}))],[`duotone`,q.createElement(q.Fragment,null,q.createElement(`path`,{d:`M224,104l-48,48V56Z`,opacity:`0.2`}),q.createElement(`path`,{d:`M229.66,98.34l-48-48A8,8,0,0,0,168,56V96h-3A103.94,103.94,0,0,0,64.25,174a8,8,0,0,0,15.5,4A88,88,0,0,1,165,112h3v40a8,8,0,0,0,13.66,5.66l48-48A8,8,0,0,0,229.66,98.34ZM184,132.69V75.31L212.69,104ZM200,216a8,8,0,0,1-8,8H32a8,8,0,0,1-8-8V88a8,8,0,0,1,16,0V208H192A8,8,0,0,1,200,216Z`}))],[`fill`,q.createElement(q.Fragment,null,q.createElement(`path`,{d:`M229.66,109.66l-48,48A8,8,0,0,1,168,152V112h-3a88,88,0,0,0-85.23,66,8,8,0,0,1-15.5-4A103.94,103.94,0,0,1,165,9
46h3V56a8,8,0,0,1,13.66-5.66l48,48A8,8,0,0,1,229.66,109.66ZM192,208H40V88a8,8,0,0,0-16,0V216a8,8,0,0,0,8,8H192a8,8,0,0,0,0-16Z`}))],[`light`,q.createElement(q.Fragment,null,q.createElement(`path`,{d:`M228.24,108.24l-48,48a6,6,0,0,1-8.48-8.48L209.51,110H165a89.94,89.94,0,0,0-87.17,67.5,6,6,0,0,1-11.62-3A101.94,101.94,0,0,1,165,98h44.53L171.76,60.24a6,6,0,0,1,8.48-8.48l48,48A6,6,0,0,1,228.24,108.24ZM192,210H38V88a6,6,0,0,0-12,0V216a6,6,0,0,0,6,6H192a6,6,0,0,0,0-12Z`}))],[`regular`,q.createElement(q.Fragment,null,q.createElement(`path`,{d:`M229.66,109.66l-48,48a8,8,0,0,1-11.32-11.32L204.69,112H165a88,88,0,0,0-85.23,66,8,8,0,0,1-15.5-4A103.94,103.94,0,0,1,165,96h39.71L170.34,61.66a8,8,0,0,1,11.32-11.32l48,48A8,8,0,0,1,229.66,109.66ZM192,208H40V88a8,8,0,0,0-16,0V216a8,8,0,0,0,8,8H192a8,8,0,0,0,0-16Z`}))],[`thin`,q.createElement(q.Fragment,null,q.createElement(`path`,{d:`M226.83,106.83l-48,48a4,4,0,0,1-5.66-5.66L214.34,108H165a92,92,0,0,0-89.11,69A4,4,0,0,1,72,180a3.87,3.87,0,0,1-1-.13A4,4,0,0,1,68.13,175,99.93,99.93,0,0,1,165,100h49.36L173.17,58.83a4,4,0,0,1,5.66-5.66l48,48A4,4,0,0,1,226.83,106.83ZM192,212H36V88a4,4,0,0,0-8,0V216a4,4,0,0,0,4,4H192a4,4,0,0,0,0-8Z`}))]]),qr=q.forwardRef((e,t)=>q.createElement(gn,{ref:t,...e,weights:Kr}));qr.displayName=`ShareIcon`;var Jr=qr,Yr=q.forwardRef((e,t)=>q.createElement(gn,{ref:t,...e,weights:kn}));Yr.displayName=`XIcon`;var Xr=Yr,Zr=q.forwardRef((e,t)=>q.createElement(On,{ref:t,...e,weights:_t}));Zr.displayName=`HeartIcon`;var Qr=Zr,$r=q.forwardRef((e,t)=>q.createElement(On,{ref:t,...e,weights:Gr}));$r.displayName=`MagnifyingGlassIcon`;var ei=$r;function ti({icon:e}){if(!e)return null;switch(e.type){case`icon`:return(0,J.jsx)(ht,{type:e.iconType,name:e.iconName,weight:`fill`,size:24});case`emoji`:return(0,J.jsx)(`span`,{children:e.content});default:return null}}var ni=new Map([[`bold`,(0,J.jsx)(`path`,{d:`M144,96a16,16,0,1,1,16,16A16,16,0,0,1,144,96Zm92-40V200a20,20,0,0,1-20,20H40a20,20,0,0,1-20-20V56A20,20,0,0,1,40,36H216A20,20,0,0,1,236,56ZM44,60v79.72l33.86-33.86a20,20,0,0,1,28.28,0L147.31,147l17.18-17.17a20,20,0,0,1,28.28,0L212,149.09V60Zm0,136H162.34L92,125.66l-48,48Zm168,0V183l-33.37-33.37L164.28,164l32,32Z`})],[`duotone`,(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`path`,{d:`M224,56V178.06l-39.72-39.72a8,8,0,0,0-11.31,0L147.31,164,97.66,114.34a8,8,0,0,0-11.32,0L32,168.69V56a8,8,0,0,1,8-8H216A8,8,0,0,1,224,56Z`,opacity:`0.2`}),(0,J.jsx)(`path`,{d:`M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40Zm0,16V158.75l-26.07-26.06a16,16,0,0,0-22.63,0l-20,20-44-44a16,16,0,0,0-22.62,0L40,149.37V56ZM40,172l52-52,80,80H40Zm176,28H194.63l-36-36,20-20L216,181.38V200ZM144,100a12,12,0,1,1,12,12A12,12,0,0,1,144,100Z`})]})],[`fill`,(0,J.jsx)(`path`,{d:`M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM156,88a12,12,0,1,1-12,12A12,12,0,0,1,156,88Zm60,112H40V160.69l46.34-46.35a8,8,0,0,1,11.32,0h0L165,181.66a8,8,0,0,0,11.32-11.32l-17.66-17.65L173,138.34a8,8,0,0,1,11.31,0L216,170.07V200Z`})],[`light`,(0,J.jsx)(`path`,{d:`M216,42H40A14,14,0,0,0,26,56V200a14,14,0,0,0,14,14H216a14,14,0,0,0,14-14V56A14,14,0,0,0,216,42ZM40,54H216a2,2,0,0,1,2,2V163.57L188.53,134.1a14,14,0,0,0-19.8,0l-21.42,21.42L101.9,110.1a14,14,0,0,0-19.8,0L38,154.2V56A2,2,0,0,1,40,54ZM38,200V171.17l52.58-52.58a2,2,0,0,1,2.84,0L176.83,202H40A2,2,0,0,1,38,200Zm178,2H193.8l-38-38,21.41-21.42a2,2,0,0,1,2.83,0l38,38V200A2,2,0,0,1,216,202ZM146,100a10,10,0,1,1,10,10A10,10,0,0,1,146,100Z`})],[`regular`,(0,J.jsx)(`path`,{d:`M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40Zm0,16V158.75l-26.07-26.06a16,16,0,0,0-22.63,0l-20,20-44-44a16,16,0,0,0-22.62,0L40,149.37V56ZM40,172l52-52,80,80H40Zm176,28H194.63l-36-36,20-20L216,181.38V200ZM144,100a12,12,0,1,1,12,12A12,12,0,0,1,144,100Z`})],[`thin`,(0,J.jsx)(`path`,{d:`M216,44H40A12,12,0,0,0,28,56V200a12,12,0,0,0,12,12H216a12,12,0,0,0,12-12V56A12,12,0,0,0,216,44ZM40,52H216a4,4,0,0,1,4,4V168.4l-32.89-32.89a12,12,0,0,0-17,0l-22.83,22.83-46.82-46.83a12,12,0,0,0-17,0L36,159V56A4,4,0,0,1,40,52ZM36,200V170.34l53.17-53.17a4,4,0,0,1,5.66,0L181.66,204H40A4,4,0,0,1,36,200Zm180,4H193l-40-40,22.83-22.83a4,4,0,0,1,5.66,0L220,179.71V200A4,4,0,0,1,216,204ZM148,100a8,8,0,1,1,8,8A8,8,0,0,1,148,100Z`})]]);function ri({className:e,size:t,weight:n=`regular`,fill:r=`currentColor`}){return(0,J.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 256 256`,className:e,width:t,height:t,fill:r,children:ni.get(n)})}var ii=()=>({type:`navbar_dropdown`,attrs:{id:In(),label:`User Options`,style:`card`,padding:`24px`},content:[{type:`navbar_dropdown_column`,attrs:{id:In()},content:[{type:`navbar_dropdown_item`,attrs:{id:In(),title:`Manage Profile`,style:`icon`,action:`profile`,showWhen:`all_logged_in`,icon:{type:`icon`,iconType:`phosphor`,iconName:`user`}}},{type:`navbar_dropdown_item`,attrs:{id:In(),title:`Logout`,style:`icon`,action:`logout`,showWhen:`all_logged_in`,icon:{type:`icon`,iconType:`phosphor`,iconName:`sign-out`}}}]}]}),ai=(e,t)=>({type:t,content:[{type:`text`,text:e}]}),oi=e=>{if(e.type!==`navbar_menu`)return e;let t=Br(e),{content:n,...r}=t,i=n?.flatMap(e=>
4e.content).filter(Boolean),a=i?.flatMap(e=>e.content).filter(Boolean);for(let e of a)if((e.attrs?.type===`dropdown`||e.attrs?.type===`user_button`&&e.attrs?.style===`dropdown`)&&e.content)for(let t of e.content)t?.attrs&&(t.attrs.parentInMobile=e.attrs?.showOnMobile===!0);let o=a.filter(e=>e.attrs?.showOnMobile&&e.attrs?.mobileJustify===`start`),s=a.filter(e=>e.attrs?.showOnMobile&&(e.attrs?.mobileJustify===`end`||!e.attrs?.mobileJustify)),c=a.filter(e=>e.attrs?.showOnMobile&&e.attrs?.mobileJustify===`center`),l=a.filter(e=>!e.attrs?.showOnMobile).sort((e,t)=>{if(e.attrs?.type===`search`)return-1;if(t.attrs?.type===`search`)return 1;let n=e.attrs?.action,r=t.attrs?.action;return n===`sign_up`?1:r===`sign_up`?-1:n===`login`?1:r===`login`?-1:n===`profile`?1:r===`profile`?-1:0}),u={type:`navbar_menu_burger_content`,attrs:{id:In()},content:l},d=t.attrs?.burgerJustify||`end`,f={type:`navbar_menu_burger`,attrs:{id:In(),mobileJustify:d,color:t.attrs?.burgerColor,contentBackgroundColor:t.attrs?.burgerDropdownBackground},content:[u]},p={type:`navbar_menu_list_group`,attrs:{...i?.[0]?.attrs,id:i?.[0]?.attrs?.id||In(),type:`left`},content:d===`start`?[f,...o]:o},m={type:`navbar_menu_list_group`,attrs:{...i?.[1]?.attrs,id:i?.[1]?.attrs?.id||In(),type:`middle`},content:c},h={type:`navbar_menu_list_group`,attrs:{...i?.[2]?.attrs,id:i?.[2]?.attrs?.id||In(),type:`right`},content:d===`end`?[...s,f]:s},g={type:`navbar_menu_list`,attrs:{...n?.[0]?.attrs,id:n?.[0]?.attrs?.id||In(),justify:`center`,height:68},content:[p,m,h]};return{...r,content:[g]}},si=e=>{let t=e=>{if(!(`text`in e||e.type===`hardBreak`))switch(e.content?.forEach(t),e.type){case`navbar_menu`:if(e.content&&e.attrs?.rows===1){let t=e.content.filter(e=>e.type===`navbar_menu_list`);t.length===2&&(e.content=[...e.content.filter(e=>e.type!==`navbar_menu_list`),t[0]])}break;case`navbar_item`:switch(e.attrs?.type){case`search`:case`logo`:break;case`user_button`:if(e.attrs.showWhen===`all_logged_in`||!e.attrs.showWhen&&e.attrs.action===`profile`){if(!e.content||Array.isArray(e?.content)&&e.content.length===0){let n=ii();t(n),e.content=[n]}e.attrs.showWhen=`all_logged_in`,e.attrs.style=`dropdown`}else e.content=[ai(e.attrs.label||``,`navbar_item_text_container`)],e.attrs.style=`button`;break;default:{if(!e.attrs?.label)break;let t=e.attrs?.label||``;if(e.content?.some(e=>e.type===`navbar_item_text_container`))break;e.attrs?.type===`button`||e.attrs?.type===`link`?e.content=[ai(t,`navbar_item_text_container`)]:e.content?e.content.unshift(ai(t,`navbar_item_text_container`)):e.content=[ai(t,`navbar_item_text_container`)],e.attrs={...e.attrs,showOnMobile:e.attrs?.showOnMobile===!1?void 0:e.attrs?.showOnMobile};break}}break;case`navbar_menu_list`:{let t={lineDividerStyle:e.attrs?.lineDividerStyle,lineDividerWidth:e.attrs?.lineDividerWidth,lineDividerColor:e.attrs?.lineDividerColor,lineDividerHeight:e.attrs?.lineDividerHeight||`18px`};e.content?.forEach(e=>{e.type===`navbar_menu_list_group`&&e.attrs&&(e.attrs={...e.attrs,...t})});let n=e.attrs?.justify;if(n){let t=e.content?.find(e=>e.type===`navbar_menu_list_group`&&e.attrs?.type===`middle`);t?.attrs&&(t.attrs.justify=n)}if(e.attrs){let{lineDividerStyle:t,lineDividerWidth:n,lineDividerColor:r,lineDividerHeight:i,justify:a,...o}=e.attrs;e.attrs=o}break}case`navbar_dropdown_item`:{e.content||=[];let t=e.attrs;t?.description&&!e.content.some(e=>e.type===`navbar_dropdown_item_description`)&&e.content.unshift(ai(t.description,`navbar_dropdown_item_description`)),t?.title&&!e.content.some(e=>e.type===`navbar_dropdown_item_title`)&&e.content.unshift(ai(t.title,`navbar_dropdown_item_title`));break}default:break}},n=Br(e);return t(n),n};function ci(e,t){if(t(e),typeof e==`object`&&e&&`content`in e&&Array.isArray(e.content))for(let n of e.content)ci(n,t)}function li(e,t){let n;return ci(e,e=>{typeof e==`object`&&e&&`attrs`in e&&typeof e.attrs==`object`&&e.attrs!==null&&`lp_name`in e.attrs&&e.attrs.lp_name===t&&(n=e)}),n}function ui(e,t){let n;return ci(e,e=>{typeof e==`object`&&e&&`attrs`in e&&typeof e.attrs==`object`&&e.attrs!==null&&`mergeTag`in e.attrs&&e.attrs.mergeTag===t&&(n=e)}),n}function di(e){let t=typeof e==`object`&&e&&`content`in e&&Array.isArray(e.content)?e.content[0]:void 0;if(t&&!(!t.marks||t.marks.length===0))return t.marks[0].attrs}function fi(e){let t=e.trim();return t.includes(` `)?t:`${t} ${t} ${t} ${t}`}var pi=/^(\d+(\.\d+)?)px$/;function mi(e){return typeof e==`string`&&pi.test(e)?e:`${e}px`}function hi(e,t){let n=e.source===`youtube`?1.7777777777777777:1,r=Br(t??dt({imageAspectRatio:n})),i=li(r,`Podcast Card`);i?.attrs&&(e.backgroundColor!==void 0&&(i.attrs.backgroundColor=e.backgroundColor),e.borderRadius!==void 0&&(i.attrs.borderRadius=e.borderRadius),e.borderWidth!==void 0&&(i.attrs.borderWidth=e.borderWidth),e.borderColor!==void 0&&(i.attrs.borderColor=e.borderColor),e.borderStyle!==void 0&&(i.attrs.borderStyle=e.borderStyle),e.itemPadding!==void 0&&(i.attrs.padding=e.itemPadding),e.itemGap!==void 0&&(i.attrs.gap=e.itemGap));let a=ui(r,`podcast.episode.image`);a?.attrs&&(e.imageBorderRadius!==void 0&&(a.attrs.borderRadius=fi(e.imageBorderRadius)),e.imageAspectRatio!==void 0&&(a.attrs.aspectRatio=e.imageAspectRatio),e.imageFit!==void 0&&(a.attrs.objectFit=e.imageFit));let o=ui(r,`podcast.episode.title`);
4if(o){o.attrs||={},e.titleAlignment!==void 0&&(o.attrs.textAlign=e.titleAlignment),e.titleLineClamp!==void 0&&(o.attrs.lineClampClass=e.titleLineClamp);let t=di(o);t&&(e.titleFontSize!==void 0&&(t.fontSize=mi(e.titleFontSize)),e.titleFontFamily!==void 0&&(t.fontFamily=e.titleFontFamily),e.titleTextColor!==void 0&&(t.color=e.titleTextColor),e.titleFontWeight!==void 0&&(t.fontWeight=e.titleFontWeight))}let s=ui(r,`podcast.episode.publish_date`);if(e.hideDate){let e=li(r,`Content`);e?.content&&s&&(e.content=e.content.filter(e=>e!==s))}else if(s){s.attrs||={},e.subtitleAlignment!==void 0&&(s.attrs.textAlign=e.subtitleAlignment);let t=di(s);t&&(e.subtitleFontSize!==void 0&&(t.fontSize=mi(e.subtitleFontSize)),e.subtitleFontFamily!==void 0&&(t.fontFamily=e.subtitleFontFamily),e.subtitleTextColor!==void 0&&(t.color=e.subtitleTextColor),e.subtitleFontWeight!==void 0&&(t.fontWeight=e.subtitleFontWeight))}let c=li(r,`Content`);return c?.attrs&&e.textGap!==void 0&&(c.attrs.gap=e.textGap),r}var gi=/(\d{1,2}:\d{2}(?::\d{2})?)/,_i=e=>{let t=e.split(`:`).map(Number);return t.length===3?t[0]*3600+t[1]*60+t[2]:t.length===2?t[0]*60+t[1]:0},vi=(e,t)=>{let n=e.split(gi);if(n.length===1)return[{type:`text`,text:e,marks:t}];let r=[];for(let e of n)if(e)if(gi.test(e)){let n=_i(e);r.push({type:`text`,text:e,marks:[...t||[],{type:`bold`},{type:`underline`},{type:`timestampLink`,attrs:{seconds:n}}]})}else r.push({type:`text`,text:e,marks:t});return r},yi=e=>{if(!e||typeof e!=`object`)return e;let t=e=>{if(!e||typeof e!=`object`)return e;if(e.type===`text`&&typeof e.text==`string`){let t=vi(e.text,e.marks);return t.length===1&&t[0].text===e.text?e:t}if(Array.isArray(e.content)){let n=[];for(let r of e.content){let e=t(r);Array.isArray(e)?n.push(...e):n.push(e)}return{...e,content:n}}return e};return t(e)},bi=(e,t)=>_e(e,e=>{let n=e.content;if(!n){e.content=[{type:`text`,text:t,marks:[]}];return}let r=n.filter(e=>e?.type===`text`).reduce((e,t)=>(t.marks&&e.push(...t.marks),e),[]).reduce((e,t)=>{let n=e[t.type];return n?.attrs&&t.attrs?e[t.type]={type:t.type,attrs:{...n.attrs,...t.attrs}}:e[t.type]=t,e},{});e.content=[{type:`text`,text:t,marks:Object.values(r)}]}),xi=({children:e,context:t})=>{let n=(0,q.useRef)(0),r=(0,q.useCallback)(()=>++n.current,[]),i=(0,q.useMemo)(()=>({...Te,...t}),[t]),a=(0,q.useMemo)(()=>t.imagePriorityThreshold?r:null,[t.imagePriorityThreshold,r]);return(0,J.jsx)(De.Provider,{value:i,children:(0,J.jsx)(ge.Provider,{value:a,children:e})})},Si=`iwsoi00`,Ci=`_12wlu071`,wi=`_12wlu072`;function Ti(e){let{children:t,element:n,isOpen:r=!1,isPreviewing:i=!1,onOpenChange:a,attributes:o,previewViewport:s}=e,{width:c,maxWidth:l,gap:u,backgroundColor:d,borderRadius:f,borderWidth:p,borderColor:m,borderStyle:h,modalOverlayBackgroundColor:g,position:_,hasGradientBackground:v=!1}=n.attrs||{},y={"--overlay-background-color":g},b=(0,q.useMemo)(()=>{switch(_){case`bottom`:return`items-end`;case`top`:return`items-start`;case`center`:return`items-center`;default:return``}},[_]),x=(0,J.jsx)(`div`,{className:(0,Y.default)(wi,`flex flex-col h-auto relative`,v&&`bg-gradient-to-t from-[var(--content-background-color)] from-80%`),style:{"--width":c,"--max-width":l,"--content-background-color":d,backgroundColor:v?void 0:`var(--content-background-color)`,borderStyle:h,borderWidth:p,borderRadius:f,borderColor:m,gap:u},children:t});return i?(0,J.jsxs)(`div`,{className:(0,Y.default)(`w-full h-full flex justify-center relative`,s===`mobile`?`items-end`:b),style:y,...o,children:[(0,J.jsx)(`div`,{className:`absolute top-0 left-0 w-full h-full bg-[--overlay-background-color]`,children:`\xA0`}),(0,J.jsx)(`div`,{className:(0,Y.default)(`z-10 relative`,Si),style:{width:c,maxWidth:l},children:x})]}):(0,J.jsx)(jn,{isOpen:r,onClose:a,style:y,showCloseButton:!1,showRoundedBorders:!1,placement:_,shouldCloseOnOutsideClick:!1,shouldDisableScroll:!0,springAnimation:!0,overlayClassName:`z-[49]`,children:(0,J.jsx)(`div`,{className:(0,Y.default)(Ci,`relative`),...o,children:x})})}function Ei(e){let{children:t,attributes:n}=e;return(0,J.jsx)(`div`,{...n,className:`flex flex-col h-auto relative`,children:t})}var Di=`od2yju1`,Oi=`od2yju2`,ki=e=>{if(typeof e==`number`)return e;if(typeof e==`string`&&e.endsWith(`px`)){let t=Number.parseFloat(e);
4if(!Number.isNaN(t))return t}return null},Ai=({width:e,maxWidth:t})=>{if(e===`100%`)return t||e||`100%`;let n=ki(e),r=ki(t);return n!=null&&r!=null?n>r?t:e:e||t||`100%`};function ji(e){let{children:t,element:n,isOpen:r=!1,isPreviewing:i=!1,onOpenChange:a,attributes:o,previewViewport:s,placement:c}=e,{width:l,maxWidth:u,gap:d,padding:f,backgroundColor:p,borderRadius:m,borderWidth:h,borderColor:g,borderStyle:_,modalOverlayBackgroundColor:v,modalCloseButtonColor:y=`inherit`,modalCloseButtonPlacementTop:b,modalCloseButtonPlacementRight:x}=n.attrs||{},S={"--overlay-background-color":v,"--modal-close-button-color":y,"--modal-close-button-placement-top":b||`24px`,"--modal-close-button-placement-right":x||`24px`},C={width:Ai({width:l,maxWidth:u}),maxWidth:`100%`},w=(0,J.jsx)(`div`,{className:(0,Y.default)(Oi,`flex flex-col h-auto`),style:{"--width":l,"--max-width":u,backgroundColor:p,padding:f,borderStyle:_,borderWidth:h,borderRadius:m,borderColor:g,gap:d,"--padding":f},children:t});return i?(0,J.jsxs)(`div`,{className:(0,Y.default)(`w-full h-full flex justify-center relative`,s===`mobile`?`items-end`:`items-center`),style:S,...o,children:[(0,J.jsx)(`div`,{className:`absolute top-0 left-0 w-full h-full bg-[--overlay-background-color]`,children:`\xA0`}),(0,J.jsxs)(`div`,{className:(0,Y.default)(`z-10 relative`,Si),style:C,children:[w,(0,J.jsx)(`button`,{type:`button`,className:(0,Y.default)(`absolute right-[--modal-close-button-placement-right] top-[--modal-close-button-placement-top] rounded-sm opacity-70`,`hover:opacity-100 transition-opacity`,`focus:outline-none focus:ring-2 focus:ring-offset-2`,`text-[--modal-close-button-color]`),"aria-label":`Close`,children:(0,J.jsx)(Xr,{className:`h-4 w-4`})})]})]}):r?(0,J.jsx)(jn,{isOpen:r,onClose:a,style:S,placement:c,mobilePlacement:c,children:(0,J.jsx)(`div`,{className:(0,Y.default)(Di),...o,children:(0,J.jsx)(`div`,{style:C,children:w})})}):null}function Mi({isOpen:e,onOpenChange:t,isLoading:n,children:r,showCloseButton:i,hideOverflow:a}){let o={"--overlay-background-color":`#00000030`,"--modal-close-button-color":void 0,"--modal-close-button-placement-top":`24px`,"--modal-close-button-placement-right":`24px`},s=q.useRef(null);return e?(0,J.jsx)(`div`,{"aria-hidden":!e,className:K(`transition-opacity duration-200`,`fixed`,a?`overflow-hidden`:`overflow-scroll`,`inset-0 z-50 bg-black/80`,`bg-[--overlay-background-color]`),style:o,children:(0,J.jsxs)(`div`,{ref:s,className:K(`w-full bottom-0 left-0`,`bg-background`),children:[i&&(0,J.jsx)(`button`,{type:`button`,onClick:()=>{n||t?.(!1)},className:K(`z-50 absolute right-[--modal-close-button-placement-right] top-[--modal-close-button-placement-top] rounded-sm opacity-70`,`hover:opacity-100 transition-opacity`,`focus:outline-none focus:ring-2 focus:ring-offset-2`,`text-[--modal-close-button-color]`),"aria-label":`Close`,children:(0,J.jsx)(Pn,{className:`h-4 w-4`})}),r]})}):null}var Ni=`_1ma1r0q0`,Pi=`_1ma1r0q4`,Fi=`_1ma1r0q5`,Ii=`_1ma1r0q6`,Li=`_1ma1r0qa`,Ri=`_1ma1r0qb`,zi=`_1ma1r0qc`,Bi=`_1ma1r0qg`,Vi=`_1ma1r0qh`,Hi=`_1ma1r0qo`,Ui=`_1ma1r0qp`,Wi=`_1ma1r0qr`,Gi=`_1ma1r0qs`,Ki=`_1ma1r0qt _1ma1r0qo`,qi=`_1ma1r0qu _1ma1r0qo`,Ji=`_1ma1r0qv`,Yi=`_1ma1r0qw _1ma1r0qo`,Xi=`_1ma1r0qx`,Zi=`_1ma1r0qy _1ma1r0qo`,Qi=`_1ma1r0q11 _1ma1r0qo`,$i=`_1ma1r0q12`,ea=`_1ma1r0q13`,ta=`_1ma1r0q14`,na=`_1ma1r0q15`,ra=`_1ma1r0q17`,ia=`_1ma1r0q18`,aa=`_1ma1r0q19`,oa=`_1ma1r0q1a`,sa=`_1ma1r0q1c`,ca=`_1ma1r0q1d`,la=`_1ma1r0q1e`,ua=`_1ma1r0q1f`,da=`_1ma1r0q1h`,fa=`_1ma1r0q1i`,pa=`_1ma1r0q1j`,ma=`_1ma1r0q1l`,ha={navbarDropdownItemDescriptionV2:na,navbarDropdownItemTitleV2:ta,navbarDesktopView:Pi,navbarMobileView:Fi},ga={padding:`0px`,borderRadius:`0px`,gap:`8px`,background:`transparent`,borderWidth:`0px`,borderStyle:`solid`,borderColor:`transparent`};function _a(e){let{element:t,className:n,children:r,attributes:i}=e,{customAttributes:a,label:o,padding:s,borderRadius:c,gap:l,background:u,borderWidth:d,borderStyle:f,borderColor:p,mobilePadding:m,mobileBorderRadius:h,mobileBorderWidth:g,mobileBorderStyle:_,mobileBorderColor:v,mobileGap:y}=t.attrs||{};return(0,J.jsxs)(`div`,{...e,...a,...i,className:K(ea,n),style:{"--padding":s??ga.padding,"--gap":l??ga.gap,"--column-border-radius":c??ga.borderRadius,"--column-border-width":d??ga.borderWidth,"--column-border-style":f??ga.borderStyle,"--column-border-color":p??ga.borderColor,...It(u??ga.background),"--mobile-padding":m??s,"--mobile-border-radius":h??c,"--mobile-border-width":g??d,"--mobile-border-style":_??f,"--mobile-border-color":v??p,"--mobile-gap":y??l},children:[o&&(0,J.jsx)(`div`,{className:`_1ma1r0q16`,children:o}),r]})}var va={padding:`24px`,width:`fit-content`,overflow:`hidden`,borderRadius:`16px`,background:`#ffffff`,gap:`16px`},ya={padding:`48px`,width:`100vw`,overflow:`hidden`,borderRadius:`0px`,background:`#ffffff`,gap:`16px`},ba={background:`#ffffff`,padding:`8px 0px`,gap:`4px`},X={borderColor:`transparent`,borderWidth:`0px`,borderStyle:`solid`,borderRadius:`8px`},Z={padding:`2px 4px 2px 4px`,margin:`0px`,overflow:`hidden`,background:`none`,color:`#000`,fontSize:`16px`,fontWeight:`500`,fontFamily:`Inter`,letterSpacing:`0px`},xa={padding:`8px`,margin:`0px`,overflow:`hidden`,background:`none`,color:`#a3a3a3`,fontFamily:`Inter`,letterSpacing:`0px`},Sa={width:`auto`,height:`36px`,padding:`0px`,background:`transparent`,gap:`4px`},Q={padding:`4px 8px 4px 8px`,margin:`0px`,overflow:`hidden`,background:Ut.purple,color:`#fff`,fontFamily:`Inter`,fontSize:`16px`,letterSpacing:`0px`,fontWeight:`500`,iconColor:`#FFFFFF`,iconPlacement:`left`,iconSize:`24px`};function Ca(e){return e!=null&&typeof e!=`function`&&Lr(e.length)}function wa(e,t){return jr(e,(n,r,i,a)=>{let o=t?.(n,r,i,a);if(o!==void 0)return o;if(typeof e==`object`){if(cr(e)===`[object Object]`&&typeof e.constructor!=`function`){let t={};return a.set(e,t),Nr(t,e,i,a),t}switch(Object.prototype.toString.call(e)){case dr:case ur:case fr:{let t=new e.constructor(e?.valueOf());return Nr(t,e),t}case pr:{let t={};return Nr(t,e),t.length=e.length,t[Symbol.iterator]=e[Symbol.iterator],t}default:return}}})}function Ta(e){return wa(e)}function Ea(e){return typeof e==`object`&&!!e&&cr(e)===`[object Arguments]`}function Da(e){return typeof e==`object`&&!!e}function Oa(e){return Da(e)&&Ca(e)}function ka(e,t=0,n={}){let{leading:r=!0,trailing:i=!0}=n;return te(e,t,{leading:r,maxWait:t,trailing:i})}function Aa(e){return ar(e)}function ja(e,...t){let n=t.slice(0,-1),r=t[t.length-1],i=e;for(let e=0;e<n.length;e++){let t=n[e];i=Ma(i,t,r,new Map)}return i}function Ma(e,t,n,r){if(ir(e)&&(e=Object(e)),typeof t!=`object`||!t)return e;if(r.has(t))return or(r.get(t));if(r.set(t,e),Array.isArray(t)){t=t.slice();for(let e=0;e<t.length;e++)t[e]=t[e]??void 0}let i=[...Object.keys(t),...sr(t)];for(let a=0;a<i.length;a++){let o=i[a];if(Fr(o))continue;let s=t[o],c=e[o];if(Ea(s)&&(s={...s}),Ea(c)&&(c={...c}),typeof Buffer<`u`&&Buffer.isBuffer(s)&&(s=Ta(s)),Array.isArray(s))if(Array.isArray(c)){let e=[],t=Reflect.ownKeys(c);for(let n=0;n<t.length;n++){let r=t[n];e[r]=c[r]}c=e}else if(Oa(c)){let e=[];for(let t=0;t<c.length;t++)e[t]=c[t];c=e}else c=[];let l=n(c,s,o,e,t,r);l===void 0?Array.isArray(s)||Da(c)&&Da(s)&&(Ir(c)||Ir(s)||Aa(c)||Aa(s))?e[o]=Ma(c,s,n,r):c==null&&Ir(s)?e[o]=Ma({},s,n,r):c==null&&Aa(s)?e[o]=Ta(s):(c===void 0||s!==void 0)&&(e[o]=s):e[o]=l}return e}function Na(e,...t){return ja(e,...t,rr)}function Pa(e,t){return e==null||Number.isNaN(e)?t:e}var Fa=(e,t,n,r)=>{switch(t){case`debounce`:return te(e,n,r);case`throttle`:return ka(e,n,r);default:return e}},Ia=e=>{let t=q.useRef(e);return q.useEffect(()=>{t.current=e}),q.useMemo(()=>((...e)=>t.current?.call(t,...e)),[])},La=e=>{let[t,n]=q.useState(e?.current||null);return e&&setTimeout(()=>{e.current!==t&&n(e.current)},0),{refProxy:q.useMemo(()=>new Proxy(e=>
4{e!==t&&n(e)},{get(e,n){return n===`current`?t:e[n]},set(e,t,r){return t===`current`?n(r):e[t]=r,!0}}),[t]),refElement:t,setRefElement:n}},Ra=(e,t)=>{let n=e.borderBoxSize?.[0],r=e.contentBoxSize?.[0];return t===`border-box`&&n?{width:n.inlineSize,height:n.blockSize}:t===`content-box`&&r?{width:r.inlineSize,height:r.blockSize}:{width:e.contentRect.width,height:e.contentRect.height}};function za({skipOnMount:e=!1,refreshMode:t,refreshRate:n=1e3,refreshOptions:r,handleWidth:i=!0,handleHeight:a=!0,targetRef:o,observerOptions:s,onResize:c,disableRerender:l=!1}={}){let u=(0,q.useRef)(e),d=Ia(c),[f,p]=(0,q.useState)({width:void 0,height:void 0}),m=(0,q.useRef)({width:void 0,height:void 0}),{refProxy:h,refElement:g}=La(o),{box:_}=s||{},v=(0,q.useCallback)(e=>{if(!i&&!a)return;if(u.current){u.current=!1;return}let t=(e,t)=>i&&e.width!==t.width||a&&e.height!==t.height;e.forEach(e=>{let n=Ra(e,_);l?t(m.current,n)&&(m.current.width=n.width,m.current.height=n.height,d?.({width:n.width,height:n.height,entry:e})):p(r=>t(r,n)?(d?.({width:n.width,height:n.height,entry:e}),n):r)})},[i,a,u,_,l]),y=(0,q.useCallback)(Fa(v,t,n,r),[v,t,n,r]);return(0,q.useEffect)(()=>{let e;if(g)try{e=new window.ResizeObserver(y),e.observe(g,s)}catch(e){console.warn(`ResizeObserver not supported or failed to initialize:`,e)}else (f.width||f.height)&&(d?.({width:null,height:null,entry:null}),m.current.width=void 0,m.current.height=void 0,l||p({width:void 0,height:void 0}));return()=>{var t,n,r;(t=e?.disconnect)==null||t.call(e),(r=(n=y).cancel)==null||r.call(n)}},[y,g]),Object.assign({ref:h},l?m.current:f)}function Ba({children:e,open:t}){let{height:n,ref:r}=za({refreshMode:`debounce`,refreshRate:100});return(0,J.jsx)(`div`,{className:pa,style:{maxHeight:t?n:`0px`,height:t?n:`0px`,opacity:+!!t,overflow:t?`unset`:`hidden`},children:(0,J.jsx)(`div`,{ref:r,children:e})})}function Va({element:e,className:t,children:n,customAttributes:r,labelComponent:i,showCaret:a=!0,isOpen:o,setIsOpen:s,screen:c,isInEditor:l,shouldForceOpen:u=!1,evaluatedHoverBorderRadius:d,...f}){let{label:p,padding:m,background:h,borderRadius:g,color:_,borderColor:v,borderWidth:y,borderStyle:b,hoverBorderColor:x,hoverBorderStyle:S,hoverBorderWidth:C,hoverTextColor:w,hoverBackgroundColor:T,mobileColor:E,mobilePadding:D,mobileFontSize:O,mobileJustify:k}=e.attrs||{},A,j,M,N;e.attrs?.type!==`logo`&&(A=e.attrs?.fontFamily,j=e.attrs?.fontSize,M=e.attrs?.fontWeight,N=e.attrs?.letterSpacing);let[P,F]=(0,q.useMemo)(()=>{if(!Array.isArray(n))return[n,null];if(n.length===1)return[n[0],null];if(Array.isArray(n)){let e=n.slice(1).filter(Boolean);return e.length===0?[n[0],null]:[n[0],e]}return[null,null]},[n]),I=(0,q.useMemo)(()=>n?(0,J.jsx)(Ba,{open:o||u,children:F||P}):null,[F,u,n,o,P]);return(0,J.jsxs)(`div`,{className:(0,Y.default)(fa,da),"data-mobile-dropdown":`true`,style:{"--mobile-item-alignment":Gt(k)},children:[(0,J.jsxs)(`div`,{...f,role:`presentation`,...r,className:(0,Y.default)(Qi,t,r?.className),onClick:()=>s(!o),style:{"--padding":m??Z.padding,"--border-radius":g??X.borderRadius,...It(h??Z.background),"--text-color":G(_??Z.color),"--font-family":ye(A)||Z.fontFamily,"--letter-spacing":N??Z.letterSpacing,...Dt(j??Z.fontSize,O),"--font-weight":M??Z.fontWeight,"--hover-text-color":w||_||Z.color,"--hover-background-color":T||h||Z.background,"--hover-border-radius":d,"--hover-border-color":x||v||X.borderColor,"--hover-border-style":S||b||X.borderStyle,"--hover-border-width":C||y||X.borderWidth,"--mobile-text-color":G(E||_||Z.color),"--mobile-padding":D||m||Z.padding},children:[i||P||p,a&&(0,J.jsx)(en,{size:16,weight:`bold`,className:`text-wb-secondary`})]}),I]})}function Ha({element:e,className:t,children:n,customAttributes:r,labelComponent:i,showCaret:a=!0,isOpen:o,setIsOpen:s,shouldForceOpen:c,isInEditor:l,attributes:u,middlewares:d=[],evaluatedHoverBorderRadius:f,excludeSeparator:p,screen:m,showOnClick:h,virtualElementRef:g,forceShowAccordion:_,...v}){let{label:y,padding:b,background:x,color:S,borderColor:C,borderWidth:w,borderStyle:T,borderRadius:E,hoverBorderColor:D,hoverBorderStyle:O,hoverBorderWidth:k,hoverTextColor:A,hoverBackgroun
4dColor:j,mobileColor:M,mobilePadding:N,mobileFontSize:P,mobileJustify:F}=e.attrs||{},I,L,R,ee;e.attrs?.type!==`logo`&&(I=e.attrs?.fontFamily,L=e.attrs?.fontSize,R=e.attrs?.fontWeight,ee=e.attrs?.letterSpacing);let z=_n(),B=(0,q.useRef)(null),V=!!B?.current?.closest(`.navbar-menu-burger-content`),H=()=>{s(!0)},te=()=>{s(!1)},U=()=>{s(!o)},W=m===`mobile`,ne=(0,q.useCallback)((e,t,n,r)=>{let i=Cn(e,t,n,r);return()=>{try{i()}catch{}}},[]),{x:re,y:ie,refs:ae,strategy:oe}=En({open:o,strategy:`fixed`,placement:W?`bottom-start`:`bottom`,middleware:[Sn(),...d],...l||!W?{whileElementsMounted:ne}:{whileElementsMounted:(e,t,n)=>ne(e,t,n,{ancestorResize:!0,ancestorScroll:!0,animationFrame:!0})}});(0,q.useEffect)(()=>{if(!l)return;let e=()=>{g?.current&&ae.setPositionReference(g.current)};e();let t=setInterval(e,100);return()=>{clearInterval(t)}},[l,g,ae.setPositionReference]);let[se,ce]=(0,q.useMemo)(()=>Array.isArray(n)?[n[0],n.slice(1)]:[null,null],[n]),le=(0,q.useMemo)(()=>{if(!n)return null;if(!z&&!l)return(0,J.jsx)(`div`,{"aria-hidden":`true`,style:{position:`absolute`,width:`1px`,height:`1px`,overflow:`hidden`,clip:`rect(0 0 0 0)`,clipPath:`inset(50%)`,whiteSpace:`nowrap`,pointerEvents:`none`},children:n});let t=o?9999:-9999;if(l)return(0,J.jsx)(`div`,{ref:ae.setFloating,style:{position:oe,top:ie,left:re??0,paddingTop:ie?4:0,zIndex:t},children:(0,J.jsx)(Ba,{open:c,children:n})});let r={position:oe,top:ie??0,left:re??0,zIndex:t,paddingTop:ie?4:0};return e?.content?.length===1&&e.content[0].type===`navbar_dropdown`?(0,J.jsx)(Tn,{children:(0,J.jsx)(`div`,{ref:ae.setFloating,style:{...r,opacity:+!!o,pointerEvents:o?`auto`:`none`,transition:`opacity 120ms ease`},children:(0,J.jsx)(Ba,{open:o,children:se})})}):!ce||Array.isArray(ce)&&ce.length===0?null:(0,J.jsx)(Tn,{children:(0,J.jsx)(`div`,{ref:ae.setFloating,style:r,children:(0,J.jsx)(Ba,{open:o,children:ce})})})},[re,ie,ce,l,ae.setFloating,c,oe,n,o,e?.content,se,z]),ue=i||se||(l?null:y);return(0,J.jsxs)(`div`,{ref:B,className:K(Wi,l&&V&&`w-full`),...u,style:{"--mobile-item-alignment":Gt(F)},onMouseEnter:h?void 0:H,onMouseOver:h?void 0:H,onFocus:h?void 0:H,onMouseLeave:h?void 0:te,onClick:h?U:void 0,onKeyDown:h?e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),U())}:void 0,children:[(0,J.jsx)(`div`,{className:`flex h-fit w-fit`,...ue&&{ref:ae.setReference},children:(ue||a)&&(0,J.jsxs)(`div`,{...v,role:`presentation`,...r,className:(0,Y.default)(`_1ma1r0q11 _1ma1r0qo`,t,r?.className,l&&`flex items-center`),style:{"--padding":b??Z.padding,"--border-radius":E??X.borderRadius,"--border-color":C||X.borderColor,"--border-style":T||X.borderStyle,"--border-width":w||X.borderWidth,...It(x??Z.background),"--text-color":G(S??Z.color),"--font-family":ye(I)||Z.fontFamily,"--letter-spacing":ee??Z.letterSpacing,...Dt(L??Z.fontSize,P),"--font-weight":R??Z.fontWeight,"--hover-text-color":A||S||Z.color,"--hover-background-color":j||x||Z.background,"--hover-border-radius":f,"--hover-border-color":D||C||X.borderColor,"--hover-border-style":O||T||X.borderStyle,"--hover-border-width":k||w||X.borderWidth,"--mobile-text-color":G(M||S||Z.color),"--mobile-padding":N||b||Z.padding},children:[ue,a&&(0,J.jsx)(en,{size:16,weight:`bold`,className:`text-wb-secondary`})]})}),!p&&(0,J.jsx)(`div`,{className:`_1ma1r0qs`}),le]})}function Ua(e){let[t,n]=(0,q.useState)(!1),{element:r,screen:i,attributes:a,children:o,forceShowAccordion:s,virtualElementRef:c,isInEditor:l=!1}=e,{attrs:u}=r,d=u?.type===`user_button`,f=u?.type===`dropdown`,p=d&&u?.style===`button`,m=e.evaluatedHoverBorderRadius??f?u?.hoverBorderRadius??u?.borderRadius??X.borderRadius:void 0,h=(0,q.useMemo)(()=>l?[]:d&&i===`desktop`?[wn({crossAxis:-8})]:[],[l,d,i]);if(!f&&!d||d&&p)return null;let g=l&&a?.[`data-is-open`]===`true`;return i===`mobile`&&s?(0,J.jsx)(Va,{...e,isOpen:t,setIsOpen:n,isInEditor:l,shouldForceOpen:g,evaluatedHoverBorderRadius:m,children:o}):(0,J.jsx)(Ha,{...e,isOpen:t,setIsOpen:n,shouldForceOpen:g,isInEditor:l,middlewares:h,showOnClick:i===`mobile`,evaluatedHoverBorderRadius:m,virtualElementRef:c,children:o})}function Wa(e){let{element:t,screen:n,className:r,children:i,controlbyselected:a,attributes:o,navbarItemElementProps:s,shouldRenderWithNavbarMenuItemDropdown:c,isInEditor:l=!1,isInsideBurgerMenu:u}=e,d=a;typeof d==`string`&&(d=d===`true`);let{style:f,mobileStyle:p,padding:m,background:h,border_radius:g,gap:_,fontFamily:v,customAttributes:y,mobileBackgroun
4d:b,mobilePadding:x,mobileGap:S}=t.attrs||{},C=!!p&&n===`mobile`,w=f===`card`?va:ya;C&&(w=p===`card`?va:ya);let T=(0,q.useCallback)(({children:e})=>c&&s?(0,J.jsx)(Ua,{...s,children:e}):(0,J.jsx)(J.Fragment,{children:e}),[s,c]);if(n===`mobile`&&!t.attrs?.parentInMobile&&(!l||u)){let t=[o?.[`data-is-open`],s?.attributes?.[`data-is-open`]].includes(`true`);return(0,J.jsx)(`div`,{...e,role:`none`,...y,className:(0,Y.default)(ua,r,y?.className,!C&&`_1ma1r0q1g`),style:{"--padding":x||(m??ba.padding),"--border-radius":g??w.borderRadius,"--gap":S||(_??ba.gap),"--width":w.width,"--font-family":ye(v),...It(b||(h??ba.background)),display:c&&!t?`none`:void 0},children:i})}return(0,J.jsx)(T,{children:(0,J.jsx)(`div`,{...e,...o,role:`none`,...y,className:(0,Y.default)($i,r,y?.className),style:{"--padding":m??w.padding,"--border-radius":g??w.borderRadius,"--width":w.width,"--gap":_??w.gap,"--font-family":ye(v),...It(h??w.background)},children:i})})}var $={padding:`8px`,width:`100%`,overflow:`hidden`,borderRadius:`8px`,titleFontSize:`14px`,titleFontWeight:`500`,titleLetterSpacing:`0px`,descriptionFontSize:`13px`,descriptionFontWeight:`400`,descriptionLetterSpacing:`0px`,background:`#ffffff`,hoverBackgroundColor:`#F2F4F7`,textColor:`#000000`,fontFamily:`Inter`,descriptionTextColor:`#667085`,iconColor:`#98A2B3`,iconBackgroundColor:`#F2F4F7`,borderColor:`transparent`,borderWidth:`0px`,borderStyle:`solid`};function Ga(e){let{element:t,className:n,onClick:r,attributes:i,children:a,isActive:o}=e,{style:s,padding:c,background:l,borderRadius:u,customAttributes:d,titleFontSize:f,titleFontWeight:p,titleLetterSpacing:m,descriptionFontSize:h,descriptionFontWeight:g,descriptionLetterSpacing:_,icon:v,iconColor:y,iconBackgroundColor:b,href:x,new_tab:S,color:C,fontFamily:w,descriptionFontFamily:T,descriptionColor:E,hoverBorderColor:D,hoverBorderStyle:O,hoverBorderWidth:k,hoverBorderRadius:A,hoverTextColor:j,hoverDescriptionTextColor:M,hoverIconColor:N,hoverIconBackgroundColor:P,hoverBackgroundColor:F,hoverUnderline:I,activeTextColor:L,activeUnderline:R,activeFontWeight:ee,mobileBackground:z,mobilePadding:B,mobileBorderRadius:V,mobileBorderColor:H,mobileBorderStyle:te,mobileBorderWidth:U,mobileTitleFontSize:W,mobileTitleColor:ne,mobileDescriptionFontSize:re,mobileDescriptionColor:ie}=t.attrs||{};if(!(t.attrs?.visible??!0))return null;let ae=i?.[`data-is-in-editor`]===`true`;return(0,J.jsxs)(`a`,{...e,...i,...d,className:(0,Y.default)(ia,s===`featured`?oa:aa,n,d?.className),onClick:e=>{r&&(e?.preventDefault(),r())},style:{"--padding":c??$.padding,"--border-radius":u??$.borderRadius,"--background-color":It(l??$.background).background,"--text-color":G(C??$.textColor),"--icon-color":G(y??$.iconColor),"--icon-background-color":G(b??$.iconBackgroundColor),...w?{"--font-family":ye(w)}:{},...Dt(f??$.titleFontSize,W,`title`),"--title-font-weight":p??$.titleFontWeight,...Dt(h??$.descriptionFontSize,re,`description`),"--title-letter-spacing":m??$.titleLetterSpacing,"--description-letter-spacing":_??$.descriptionLetterSpacing,"--description-font-weight":g??$.descriptionFontWeight,"--description-text-color":G(E??$.descriptionTextColor),...T?{"--description-font-family":ye(T)}:{},"--hover-border-radius":A||u||$.borderRadius,"--hover-text-color":j||C||$.textColor,"--hover-description-text-color":M||E||$.descriptionTextColor,"--hover-background-color":F||l||$.hoverBackgroundColor,"--hover-icon-color":N||y||$.iconColor,"--hover-icon-background-color":P||b||$.iconBackgroundColor,"--hover-border-color":D||$.borderColor,"--hover-border-style":O||$.borderStyle,"--hover-border-width":k||$.borderWidth,"--hover-underline":I?`underline`:`none`,"--active-text-color":L?G(L):void 0,"--active-underline":R?`underline`:void 0,"--active-font-weight":ee,"--mobile-background-color":It(z||l||$.background).background,"--mobile-padding":B||c||$.padding,"--mobile-border-radius":V||u||$.borderRadius,"--mobile-border-color":H||$.borderColor,"--mobile-border-style":te||$.borderStyle,"--mobile-border-width":U||$.borderWidth,"--mobile-title-color":G(ne||C||$.textColor),"--mobile-description-color":G(ie||E||$.descriptionTextColor)},href:x,target:S?`_blank`:`_self`,"data-active":o||void 0,"aria-current":o?`page`:void 0,children:[[`icon`,`featured`].includes(s||``)&&(0,J.jsx)(`div`,{className:`_1ma1r0q1b`,children:v?ti({icon:v,color:y}):(0,J.jsx)(Qr,{size:24,weight:`fill`,className:`text-wb-secondary`})}),(0,J.jsx)(`div`,{className:ra,children:ae||!Array.isArray(a)?a:(0,J.jsxs)(J.Fragment,{children:[a[0]&&(0,J.jsx)(`p`,{className:`_1ma1r0q14`,children:a[0]}),a[1]&&[`description`,`icon`,`featured`].includes(s||``)&&(0,J.jsx)(`p`,{className:`_1ma1r0q15`,children:a[1]})]})})]})}var Ka={mobileJustify:`end`,color:`#171717`,size:16,background:`#ffffff`,padding:`16px`,gap:`4px`,border:`none`,borderColor:`transparent`,borderWidth:`0px`,borderStyle:`none`,borderRadius:`0px`,itemsAlignment:`left`},qa=`_1cumm5n0`,Ja=`_1cumm5n1`;function Ya(e){let{element:t,className:n,attributes:r={},children:i,onClick:a,isInEditor:o,isLive:s,isFixed:c}=e,{color:l,size:u,customAttributes:d,gap:f,contentPadding:p,contentBackgroun
4dColor:m,contentBorder:h,contentBorderColor:g,contentBorderWidth:_,contentBorderStyle:v,contentBorderRadius:y,itemsAlignment:b}=t.attrs||{},{refs:x,floatingStyles:S,y:C}=En({strategy:s===!1||c?`fixed`:`absolute`,placement:`bottom-end`,transform:!1}),{navbarBurger:w}=ve(),T=r[`data-is-open`],E=T===void 0?!!w?.isOpen:T===!0,D=w&&(()=>w.setIsOpen(!E)),[O,k]=(0,q.useState)(null),A=(0,q.useCallback)(e=>{k(e?.ownerDocument.body??null),requestAnimationFrame(()=>{if(x.setReference(e),e){let t=e.closest(`.navbar-list`);t&&(getComputedStyle(t).position===`static`&&(t.style.position=`relative`),x.setPositionReference(t))}})},[x]),j=(0,J.jsx)(`div`,{ref:x.setFloating,style:{...S,top:`${C}px`,left:`0px`,zIndex:9999,"--content-max-height":`calc(100dvh - ${C}px)`,"--content-gap":f||Ka.gap,"--content-padding":p||Ka.padding,"--content-background":m,"--content-border":h,"--content-border-color":g,"--content-border-width":_,"--content-border-style":v,"--content-border-radius":y,"--content-items-alignment":rn(b)},children:i});return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(`button`,{ref:A,type:`button`,"aria-label":`Menu`,onClick:a??D,...d,...r,"data-is-open":E,className:(0,Y.default)(sa,n,d?.className),style:{"--text-color":G(l??Ka.color)},children:[(0,J.jsx)(Hr,{size:u||Ka.size,weight:`bold`,className:qa}),(0,J.jsx)(Wr,{size:u||Ka.size,weight:`bold`,className:Ja})]}),o?j:(0,J.jsx)(Tn,{root:O,children:j})]})}function Xa(e){let{element:t,children:n,className:r,attributes:i}=e,{customAttributes:a}=t.attrs||{},{navbarBurger:o}=ve(),s=i?.[`data-is-open`],c=s===void 0?!!o?.isOpen:s===!0;return(0,J.jsx)(`div`,{...e,role:`none`,...a,...i,className:(0,Y.default)(ca),style:{maxHeight:c?`var(--content-max-height, 100dvh)`:`0px`,height:c?`fit-content`:`0px`,overflow:c?`auto`:`hidden`,overscrollBehavior:`contain`,opacity:+!!c,display:`flex`,flexDirection:`column`,alignItems:`stretch`,justifyContent:`start`},children:(0,J.jsx)(`div`,{role:`none`,className:(0,Y.default)(la,r,a?.className,`navbar-menu-burger-content`),style:{width:`100%`},children:n})})}var Za={padding:`0px`,margin:`0px`,overflow:`hidden`,borderRadius:`0px`,borderBorderWidth:`1px`,borderBorderStyle:`solid`,borderBorderColor:`#E4E7EC`,defaultBoxShadow:`none`,borderBoxShadow:`none`,shadowBoxShadow:`0px 4px 12px -2px rgba(0, 0, 0, 0.05), 0px 4px 12px -2px rgba(0, 0, 0, 0.07)`,background:`white`,width:`100%`,stickToTop:!1,blurBackground:0,stickyIsland:!1,stickyBlurBackground:`0px`,stickyBlurOpacity:`30`,stickyPadding:`16px`,stickyMaxWidth:`100%`,stickyBorderRadius:`0px`,hideOnScrollDown:!1,scrollStyle:`none`,scrollTriggerOffset:100},Qa=`12px`,$a={scrollY:0,direction:`none`},eo=()=>typeof window>`u`?0:Math.max(window.scrollY,document.documentElement.scrollTop),to={isScrolledPastOffset:!1,scrollStyle:`none`},no=$a,ro=null,io=0,ao=new Set,oo=()=>no,so=()=>{for(let e of ao)e()},co=()=>{ro===null&&(ro=requestAnimationFrame(()=>{ro=null;let e=eo(),t=e>io?`down`:e<io?`up`:`none`;io=e,!(no.scrollY===e&&no.direction===t)&&(no={scrollY:e,direction:t},so())}))},lo=()=>{typeof window>`u`||(io=eo(),no={scrollY:io,direction:`none`},window.addEventListener(`scroll`,co,{passive:!0}),so())},uo=()=>{typeof window>`u`||(window.removeEventListener(`scroll`,co),ro!==null&&(cancelAnimationFrame(ro),ro=null),no=$a,io=0)},fo=e=>{let t=ao.size>0;return ao.add(e),t||lo(),()=>{ao.delete(e),ao.size===0&&uo()}},po=e=>(0,q.useSyncExternalStore)((0,q.useCallback)(t=>e?fo(t):()=>{},[e]),(0,q.useCallback)(()=>e?oo():$a,[e]),()=>$a),mo=(0,q.createContext)(to),ho=e=>{let t=Qt(e??Za.background);if(!t||t===`transparent`)return Za.background;let n=/^#([0-9A-Fa-f]{6})[0-9A-Fa-f]{2}$/.exec(t);return n?`#${n[1]}FF`:t},go=(e,t,n)=>!t||e.scrollY<60?(n.current=!1,!1):(e.direction===`down`?n.current=!0:e.direction===`up`&&(n.current=!1),n.current),_o=(e,t)=>{if(e===`solid`){let e=ho(t.background??Za.background);return{background:e,backdropFilter:`none`,WebkitBackdropFilter:`none`,"--background":e,"--box-shadow":`none`,...t.style===`border`?{borderColor:t.borderColor??Za.borderBorderColor,borderWidth:t.borderWidth??Za.borderBorderWidth,borderStyle:t.borderStyle??Za.borderBorderStyle}:{},"--blur-background":`0px`,"--blur-opacity":`0`}}return e===`glass`?{background:`rgba(255,255,255,0.65)`,backdropFilter:`blur(${Qa})`,WebkitBackdropFilter:`blur(${Qa})`,"--background":`#FFFFFF00`,"--blur-background":Qa,"--blur-opacity":`0.65`,"--box-sha
4dow":`none`}:{}},vo=`0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)`,yo=`68px`,bo={display:`flex`,justifyContent:`center`,left:0,right:0};function xo(e){let{element:t,children:n,className:r,attributes:i,isInEditor:a}=e,{background:o,shadow:s,style:c,customAttributes:l,borderWidth:u,borderStyle:d,borderColor:f,stickToTop:p,stickyIsland:m,borderRadius:h,stickyBlurBackground:g,stickyBlurOpacity:_,stickyPadding:v,stickyMaxWidth:y,stickyBorderRadius:b,firstSectionBackgroundColor:x,hideOnScrollDown:S,scrollStyle:C,scrollTriggerOffset:w}=t.attrs||{},T=C===`solid`||C===`glass`?C:`none`,E=w??Za.scrollTriggerOffset,D=(0,q.useRef)(null),O=(0,q.useRef)(null),[k,A]=(0,q.useState)(yo),j=t?.content?.length||0,M=!!p,N=M&&m,P=M&&!m&&!a,F=!a&&M&&(!!S||T!==`none`),I=po(F),L=(0,q.useRef)(!1),R=I.scrollY>E,ee=go(I,F&&!!S,L),z=(0,q.useMemo)(()=>({isScrolledPastOffset:R,scrollStyle:T}),[R,T]),B=(0,q.useMemo)(()=>{let e=p?b??Za.stickyBorderRadius:h??Za.borderRadius,t=Qt(o??Za.background),n=g??Za.stickyBlurBackground,r=!!p&&Number.parseFloat(n)>0,i=_?Number(_)/100:.3;return{width:`100%`,...c===`border`?{borderColor:f??Za.borderBorderColor,borderWidth:u??Za.borderBorderWidth,borderStyle:d??Za.borderBorderStyle}:{},"--box-shadow":c===`shadow`?s||vo:`none`,"--background":t,...r?{background:`rgba(255,255,255,${i})`}:{},"--border-radius":e,...j===2?{"--list-1-border-radius":`${e} ${e} 0 0`,"--list-2-border-radius":`0 0 ${e} ${e}`}:{"--list-1-border-radius":e},flexDirection:`column`,...p&&{maxWidth:m?y??Za.stickyMaxWidth:`100%`,"--blur-background":g?`${g}`:`${Za.stickyBlurBackground}px`,"--blur-opacity":`${i}`}}},[o,f,h,d,u,s,c,p,g,_,b,m,y,j]),V=(0,q.useMemo)(()=>{if(!(!F||T===`none`||!R))return _o(T,{background:o,borderWidth:u==null?void 0:String(u),borderStyle:d,borderColor:f,style:c})},[F,T,R,o,u,d,f,c]),H=V?{...B,...V}:B,te=(0,q.useMemo)(()=>{if(N)return{...bo,position:a?`relative`:`fixed`,...a&&{width:`100%`},padding:v??`0px`,zIndex:Ee.stickyNavbarIslandWrapper}},[N,a,v]),U=(0,q.useMemo)(()=>({...bo,top:0,position:`absolute`,backgroundColor:x,height:k}),[x,k]),W=(0,q.useCallback)(()=>{D.current&&=(D.current.disconnect(),null)},[]),ne=(0,q.useCallback)(e=>{if(W(),!e||!P)return;O.current&&e.clientHeight&&A(`${e.clientHeight}px`);let t=new ResizeObserver(e=>{for(let t of e)A(`${t.borderBoxSize?.[0]?.blockSize??t.target.clientHeight}px`)});t.observe(e),D.current=t},[P,W]);(0,q.useEffect)(()=>W,[W]);let re=K(F&&`_1ma1r0q9`,ee&&`_1ma1r0q8`),ie=(0,J.jsx)(`nav`,{ref:ne,...e,role:`presentation`,...l,className:K(r,l?.className,Ni,M&&!a&&`_1ma1r0q7`,M&&`_1ma1r0qd`,!M&&[`_1ma1r0qe`,!a&&`_1ma1r0qf`],!N&&re),style:H,...i,children:n}),ae=F&&T!==`none`?(0,J.jsx)(mo.Provider,{value:z,children:ie}):ie;return N?(0,J.jsx)(`div`,{style:te,className:re,children:ae}):P?(0,J.jsxs)(J.Fragment,{children:[ae,(0,J.jsx)(`div`,{ref:O,style:U})]}):ae}function So(e){let{element:t,className:n,children:r,onClick:i,attributes:a}=e;if(t.attrs?.type!==`search`)return null;let{customAttributes:o,padding:s,background:c,borderRadius:l,color:u,fontFamily:d,letterSpacing:f,borderColor:p,borderWidth:m,borderStyle:h,hoverBorderColor:g,hoverBorderStyle:_,hoverBorderWidth:v,hoverBorderRadius:y,hoverTextColor:b,hoverBackgroundColor:x,mobileColor:S,mobilePadding:C,mobileFontSize:w,fontSize:T,mobileBackground:E}=t.attrs||{};return(0,J.jsxs)(`div`,{className:Wi,...a,children:[(0,J.jsxs)(`div`,{...e,onClick:e=>{i?.(e)},role:`presentation`,...o,className:(0,Y.default)(qi,n,o?.className),style:{"--padding":s??xa.padding,"--border-radius":l??X.borderRadius,"--background-color":It(c??xa.background).background,"--text-color":G(u??xa.color),"--font-family":d??xa.fontFamily,"--letter-spacing":f??xa.letterSpacing,"--hover-border-radius":y||l||X.borderRadius,"--hover-text-color":b||u||xa.color,"--hover-background-color":x||c||xa.background,"--hover-border-color":g||p||X.borderColor,"--hover-border-style":_||h||X.borderStyle,"--hover-border-width":v||m||X.borderWidth,"--mobile-text-color":G(S||u||xa.color),"--mobile-padding":C||s||xa.padding,...Dt(T,w),"--mobile-background-color":E||c||xa.background,gap:`4px`},children:[(0,J.jsx)(Zt,{size:16,weight:`bold`}),(0,J.jsx)(`span`,{className:Ji,children:`Search`})]}),r]})}function Co(e){let{element:t,className:n,children:r,onClick:i,attributes:a,excludeSeparator:o,isActive:s,...c}=e,{type:l,href:u,isCustomLink:d,label:f,new_tab:p,customAttributes:m,padding:h,background:g,borderRadius:_,color:v,borderColor:y,borderWidth:b,borderStyle:x,hoverBorderColor:S,hoverBorderStyle:C,hoverBorderWidth:w,hoverBorderRadius:T,hoverTextColor:E,hoverBackgroun
4dColor:D,hoverUnderline:O,activeTextColor:k,activeUnderline:A,activeFontWeight:j,mobileColor:M,mobileFontSize:N,mobileBackground:P,mobilePadding:F,mobileBorderRadius:I,mobileBorderColor:L,mobileBorderWidth:R,mobileBorderStyle:ee,mobileWidth:z,mobileJustify:B}=t.attrs||{},{icon:V=void 0,iconPlacement:H=Q.iconPlacement,iconColor:te=Q.iconColor,iconSize:U=Q.iconSize,hoverIconColor:W=te}=t.attrs?.type===`button`&&t.attrs||{},{fontFamily:ne,fontSize:re,fontWeight:ie}=t.attrs||{},{letterSpacing:ae}=t.attrs||{},oe=(0,q.useRef)(null),se=oe?.current?.closest(`.navbar-menu-burger-content`)?.contains(oe.current)&&!z?`100%`:z,ce=t.attrs?.visible??!0,le=(0,q.useMemo)(()=>{try{let e=u?new URL(u):void 0;if(u&&e&&!d)return u.replace(e.origin,``)}catch{}return u},[u,d]),ue=(0,q.useCallback)(e=>{i&&(e.preventDefault(),i())},[i]);if(t.attrs?.type!==`link`&&t.attrs?.type!==`button`||!ce)return null;let de=l===`button`?Q:Z,fe=l===`button`?Hi:Ki,pe=l===`button`?Q.padding:Z.padding,me={"--border-color":y??X.borderColor,"--border-width":b??X.borderWidth,"--border-style":x??X.borderStyle,"--background-color":It(g??de.background).background,"--mobile-background-color":It(P||g||de.background).background,"--mobile-border-color":L||y||S||X.borderColor,"--mobile-border-width":R||b||w||X.borderWidth,"--mobile-border-style":ee||x||C||X.borderStyle,"--mobile-border-radius":I||_||T||X.borderRadius},he={display:`flex`,justifyContent:`space-between`},ge=t?.content?.find(e=>e.type===`navbar_item_text_container`),_e=ge?!!ge.content?.some(e=>e.type===`text`&&typeof e.text==`string`&&e.text.length>0):null,ve=_e===null?!f||f?.length===0:!_e;return(0,J.jsxs)(`div`,{className:(0,Y.default)(Wi),...a,ref:oe,style:{"--mobile-width":se,"--mobile-item-alignment":Gt(B)},children:[(0,J.jsxs)(`a`,{...c,...m,onClick:ue,className:(0,Y.default)(fe,n,m?.className,l===`button`&&`_1ma1r0qq`),style:{...l===`button`?me:{},"--border-radius":_??X.borderRadius,"--padding":h??pe,"--text-color":G(v??de.color),"--font-family":ye(ne)||de.fontFamily,...Dt(re??de.fontSize,N),"--font-weight":ie??de.fontWeight,"--letter-spacing":ae??de.letterSpacing,"--border-width":w,"--hover-border-radius":T||_||X.borderRadius,"--hover-text-color":E||v||de.color,"--hover-background-color":D||g||de.background,"--hover-border-color":S||y||X.borderColor,"--hover-border-style":C||x||X.borderStyle,"--hover-border-width":w||b||X.borderWidth,"--hover-underline":O?`underline`:`none`,"--active-text-color":k?G(k):void 0,"--active-underline":A?`underline`:void 0,"--active-font-weight":j,"--mobile-text-color":G(M||v||de.color),"--mobile-padding":F||h||de.padding,...l===`button`&&V&&H===`right`&&he},href:le,target:p?`_blank`:`_self`,"data-active":s||void 0,"aria-current":s?`page`:void 0,children:[V&&H===`left`?(0,J.jsx)(Wt,{icon:V,color:te,hoverColor:W,"data-placement":H,"data-no-text":ve,className:K(`p-0`,ma),size:U}):null,r,V&&H===`right`?(0,J.jsx)(Wt,{color:te,hoverColor:W,icon:V,"data-placement":H,"data-no-text":ve,className:K(`p-0`,ma),size:U}):null]}),(0,J.jsx)(`div`,{className:Gi})]})}function wo(e){let{element:t,className:n,children:r,onClick:i,attributes:a}=e;if(t.attrs?.type!==`logo`)return null;let{customAttributes:o,href:s,new_tab:c,isCustomLink:l,src:u,width:d,height:f,padding:p,borderRadius:m,background:h,borderColor:g,borderWidth:_,borderStyle:v,hoverBorderColor:y,hoverBorderStyle:b,hoverBorderWidth:x,hoverBorderRadius:S,hoverBackgroundColor:C}=t.attrs||{},{color:w,fontFamily:T,fontSize:E,fontWeight:D,mobileFontSize:O,mobileColor:k,mobilePadding:A}=t.attrs||{},j=s?`a`:`div`,M=(0,q.useMemo)(()=>{try{let e=s?new URL(s):void 0;if(s&&e&&!l)return s.replace(e.origin,``)}catch{}return s},[s,l]),N=d?At(d).width:Sa.width,P=d?At(d).maxWidth:Sa.width,F=f?Tt(f).height:Sa.height,I=Ue(u,{format:`auto`,onerror:`redirect`}),{fetchPriority:L,loading:R}=he(!!u),ee=u?(0,J.jsx)(`img`,{src:I,alt:`Logo`,className:Xi,fetchPriority:L,loading:R}):(0,J.jsx)(ri,{size:typeof f==`number`?f:36,fill:`#a3a3a3`});return(0,J.jsxs)(`div`,{...o,className:(0,Y.default)(Wi),...a,style:{"--text-color":G(w??Z.color),"--font-family":ye(T)||Z.fontFamily,"--font-weight":D??Z.fontWeight,...Dt(E??Z.fontSize,O),"--mobile-text-color":G(k||w||Z.color),"--mobile-padding":A||p||Z.padding,gap:`8px`},children:[(0,J.jsx)(j,{...e,onClick:e=>{i&&(e?.preventDefault(),i())},"aria-label":`Logo`,className:(0,Y.default)(Yi,n,o?.className),style:{"--width":N===`fit-content`?`auto`:N,"--height":F===`fit-content`?`auto`:F,"--max-width":P===`fit-content`?`auto`:P,"--min-width":`min(36px, var(--height))`,"--padding":p??Sa.padding,"--border-radius":m??X.borderRadius,"--hover-border-radius":S||m||X.borderRadius,"--hover-background-color":C||h||Sa.background,"--hover-border-color":y||g||X.borderColor,"--hover-border-style":b||v||X.borderStyle,"--hover-border-width":x||_||X.borderWidth},href:j===`a`?M:void 0,target:j===`a`?c?`_blank`:`_self`:void 0,children:ee}),(0,J.jsx)(`span`,{className:(0,Y.default)(Ui),children:r})]})}var To=new Map([[`bold`,(0,J.jsx)(`path`,{d:`M234.38,210a123.36,123.36,0,0,0-60.78-53.23,76,76,0,1,0-91.2,0A123.3
46,123.36,0,0,0,21.62,210a12,12,0,1,0,20.77,12c18.12-31.32,50.12-50,85.61-50s67.49,18.69,85.61,50a12,12,0,0,0,20.77-12ZM76,96a52,52,0,1,1,52,52A52.06,52.06,0,0,1,76,96Z`})],[`duotone`,(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`path`,{d:`M192,96a64,64,0,1,1-64-64A64,64,0,0,1,192,96Z`,opacity:`0.2`}),(0,J.jsx)(`path`,{d:`M230.92,212c-15.23-26.33-38.7-45.21-66.09-54.16a72,72,0,1,0-73.66,0C63.78,166.78,40.31,185.66,25.08,212a8,8,0,1,0,13.85,8c18.84-32.56,52.14-52,89.07-52s70.23,19.44,89.07,52a8,8,0,1,0,13.85-8ZM72,96a56,56,0,1,1,56,56A56.06,56.06,0,0,1,72,96Z`})]})],[`fill`,(0,J.jsx)(`path`,{d:`M230.93,220a8,8,0,0,1-6.93,4H32a8,8,0,0,1-6.92-12c15.23-26.33,38.7-45.21,66.09-54.16a72,72,0,1,1,73.66,0c27.39,8.95,50.86,27.83,66.09,54.16A8,8,0,0,1,230.93,220Z`})],[`light`,(0,J.jsx)(`path`,{d:`M229.19,213c-15.81-27.32-40.63-46.49-69.47-54.62a70,70,0,1,0-63.44,0C67.44,166.5,42.62,185.67,26.81,213a6,6,0,1,0,10.38,6C56.4,185.81,90.34,166,128,166s71.6,19.81,90.81,53a6,6,0,1,0,10.38-6ZM70,96a58,58,0,1,1,58,58A58.07,58.07,0,0,1,70,96Z`})],[`regular`,(0,J.jsx)(`path`,{d:`M230.92,212c-15.23-26.33-38.7-45.21-66.09-54.16a72,72,0,1,0-73.66,0C63.78,166.78,40.31,185.66,25.08,212a8,8,0,1,0,13.85,8c18.84-32.56,52.14-52,89.07-52s70.23,19.44,89.07,52a8,8,0,1,0,13.85-8ZM72,96a56,56,0,1,1,56,56A56.06,56.06,0,0,1,72,96Z`})],[`thin`,(0,J.jsx)(`path`,{d:`M227.46,214c-16.52-28.56-43-48.06-73.68-55.09a68,68,0,1,0-51.56,0c-30.64,7-57.16,26.53-73.68,55.09a4,4,0,0,0,6.92,4C55,184.19,89.62,164,128,164s73,20.19,92.54,54a4,4,0,0,0,3.46,2,3.93,3.93,0,0,0,2-.54A4,4,0,0,0,227.46,214ZM68,96a60,60,0,1,1,60,60A60.07,60.07,0,0,1,68,96Z`})]]);function Eo({className:e,size:t,weight:n=`regular`}){return(0,J.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 256 256`,className:e,width:t,fill:`currentColor`,height:t,children:[(0,J.jsx)(`rect`,{width:`256`,height:`256`,fill:`none`}),(0,J.jsx)(`circle`,{cx:`128`,cy:`96`,r:`64`,fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`16`}),(0,J.jsx)(`path`,{d:`M32,216c19.37-33.47,54.55-56,96-56s76.63,22.53,96,56`,fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`16`}),To.get(n)]})}function Do(e){let{element:t,className:n,onClick:r,attributes:i,children:a}=e,o=(0,q.useRef)(null),s=!!o?.current?.closest(`.navbar-menu-burger-content`)?.contains(o.current),c=(0,q.useMemo)(()=>{let e=t?.attrs?.href,n=t?.attrs?.isCustomLink;if(!e)return e;try{let t=new URL(e);return n?e:e.replace(t.origin,``)}catch{return e}},[t?.attrs?.href,t?.attrs?.isCustomLink]),l=(0,q.useCallback)(e=>{r&&(e.preventDefault(),r())},[r]);if(t.attrs?.type!==`user_button`||!(t.attrs?.visible??!0))return null;let{label:u,new_tab:d,firstName:f,lastName:p,email:m,customAttributes:h,padding:g,background:_,borderRadius:v,color:y,fontFamily:b,style:x,fontSize:S,fontWeight:C,width:w,height:T,letterSpacing:E,borderColor:D,borderWidth:O,borderStyle:k,hoverBorderColor:A,hoverBorderStyle:j,hoverBorderWidth:M,hoverBorderRadius:N,hoverTextColor:P,hoverBackgroundColor:F,mobileColor:I,mobileBorderColor:L,mobileBorderWidth:R,mobileBorderStyle:ee,mobileBorderRadius:z,mobileBackground:B,mobilePadding:V}=t.attrs||{},H=t.attrs?.action,te=x||`dropdown`,U=![`none`,void 0].includes(j)&&N||v||X.borderRadius,W=(0,J.jsx)(Eo,{size:16,weight:`bold`});return H===`profile`?te===`button`?(0,J.jsx)(`a`,{...e,...h,onClick:l,className:(0,Y.default)(Zi,n,h?.className),style:{"--padding":g??`0px`,"--border-radius":v??X.borderRadius,"--border-color":D||X.borderColor,"--border-style":k||X.borderStyle,"--border-width":O||X.borderWidth,"--background-color":It(_??Z.background).background,"--text-color":G(y??Z.color),"--font-family":ye(b)||Z.fontFamily,"--letter-spacing":E??Z.letterSpacing,"--width":w?At(w).width:`32px`,"--height":T?Tt(T).height:`32px`,"--mobile-text-color":G(I||y||Z.color),"--max-width":w?At(w).maxWidth:`32px`,width:`fit-content`,"--hover-text-color":P||y||Z.color,"--hover-background-color":F||_||Z.background,"--hover-border-radius":U,"--hover-border-color":A||D||X.borderColor,"--hover-border-style":j||k||X.borderStyle,"--hover-border-width":M||O||X.borderWidth,"--mobile-background-color":It(B||_||Z.background).background,"--mobile-padding":V||g||Z.padding,"--mobile-border-color":L||D||X.borderColor,"--mobile-border-width":R||O||X.borderWidth,"--mobile-border-style":ee||k||X.borderStyle,"--mobile-border-radius":z||v||X.borderRadius},href:c,target:d?`_blank`:`_self`,title:f?`${f}${p?` ${p}`:``}`:m,children:W}):(0,J.jsx)(Ua,{...e,evaluatedHoverBorderRadius:U,showCaret:!1,forceShowAccordion:s,labelComponent:(0,J.jsx)(`div`,{ref:o,style:{"--width":w?At(w).width:`32px`,"--height":T?Tt(T).height:`32px`,"--max-width":w?At(w).maxWidth:`32px`,width:`fit-content`,"--padding":g??Q.padding,"--border-radius":v??X.borderRadius,"--text-color":G(y??Q.color),"--font-family":ye(b)||Q.fontFamily,...Dt(S??Q.fontSize),"--font-weight":C??Q.fontWeight,"--letter-spacing":E??Q.letterSpacing,"--border-color":D??X.borderColor,"--border-width":O??X.borderWidth,"--border-style":k??X.borderStyle,"--background-color":It(_??Q.background).background,"--mobile-text-color":G(I||y||Q.color),"--hover-border-radius":U,"--hover-text-color":P||y||Q.color,"--hover-background-color":F||_||Q.background,"--hover-border-color":A||D||X.borderColor,"--hover-border-style":j||k||X.borderStyle,"--hover-border-width":M||O||X.borderWidth,"--mobile-background-color":It(B||_||Q.background).background,"--mobile-padding":V||g||Q.padding,"--mobile-border-color":L||D||X.borderColor,"--mobile-border-width":R||O||X.borderWidth,"--mobile-border-style":ee||k||X.borderStyle,"--mobile-border-radius":z||v||X.borderRadius},children:W}),children:a}):(0,J.jsx)(`a`,{...i,...e,...h,className:(0,Y.default)(Zi,n,h?.className),style:{"--padding":g??Q.padding,"--border-radius":v??X.borderRadius,...It(_??Q.background),"--text-color":G(y??Q.color),"--font-family":ye(b)||Q.fontFamily,...Dt(S??Q.fontSize),"--font-weight":C??Q.fontWeight,"--letter-spacing":E??Q.letterSpacing,"--border-color":D??X.borderColor,"--border-width":O??X.borderWidth,"--border-style":k??X.borderStyle,"--background-color":It(_??Q.background).background,"--mobile-text-color":G(I||y||Q.color),"--hover-border-radius":U,"--hover-text-color":P||y||Q.color,"--hover-background-color":F||_||Q.background,"--hover-border-color":A||D||X.borderColor,"--hover-border-style":j||k||X.borderStyle,"--hover-border-width":M||O||X.borderWidth,"--mobile-background-color":It(B||_||Q.background).background,"--mobile-padding":V||g||Q.padding,"--mobile-border-color":L||D||X.borderColor,"--mobile-border-width":R||O||X.borderWidth,"--mobile-border-style":ee||k||X.borderStyle,"--mobile-border-radius":z||v||X.borderRadius},href:c,target:d?`_blank`:`_self`,children:te===`button`?a:u})}function Oo(e){let{element:t,children:n,attributes:r,excludeSeparator:i,isActive:a,isInEditor:o}=e,{type:s,showOnMobile:c,showAfterScroll:l,scrollAppearOffset:u}=t.attrs||{},[d,f]=(0,q.useState)(!1),p=r?.[`data-should-render-dropdown-separately-for-editor`]!==void 0,m=r?.[`data-viewport`]===`desktop`,h=!o&&!!l,g=po(h),_=Number(u)||200,v=!h||g.scrollY>=_,y=h?(0,Y.default)(Li,v?zi:Ri):void 0,b=e=>h?(0,J.jsx)(`div`,{className:y,children:e}):e,x=(0,Y.default)((0,Y.default)({"hidden md:flex":c===!1&&s!==`user_button`,"flex items-center":p&&m}),e.className);return b(s===`link`||s===`button`?(0,J.jsx)(Co,{...e,excludeSeparator:i,className:x,isActive:a,children:n}):s===`user_button`?(0,J.jsxs)(Do,{...e,className:x,children:[n,t?.attrs?.type===`user_button`&&t?.attrs?.style===`button`&&(0,J.jsx)(`div`,{className:`_1ma1r0qs`})]}):s===`search`?(0,J.jsx)(So,{...e,className:x,children:(0,J.jsx)(`div`,{className:Gi})}):s===`logo`?(0,J.jsxs)(wo,{...e,className:x,children:[n,(0,J.jsx)(`div`,{className:Gi})]}):p?(0,J.jsx)(`div`,{className:x||`contents`,children:n}):(0,J.jsx)(Ua,{ref:e=>f(!!e?.closest(`.navbar-menu-burger-content`)?.contains(e)),forceShowAccordion:d,...e,className:x,children:n}))}var ko={padding:`16px`,margin:`0px`,gap:`16px`,background:`transparent`,justify:`start`,height:`fit-content`,width:`100%`,contentWidth:`100%`},Ao=(0,q.createContext)({justify:ko.justify});function jo({children:e,justify:t}){return(0,J.jsx)(Ao.Provider,{value:{justify:t},children:e})}function Mo(e){let{element:t,children:n,className:r,attributes:i,editorStyle:a,isInEditor:o}=e,{justify:s=ko.justify,background:c,padding:l,margin:u,customAttributes:d,gap:f,height:p,contentWidth:m,lineDividerStyleX:h,lineDividerWidthX:g,lineDividerColorX:_}=t.attrs||{},{isScrolledPastOffset:v,scrollStyle:y}=(0,q.useContext)(mo),b=G(y===`glass`&&v?`transparent`:c??ko.background);return(0,J.jsx)(jo,{justify:s,children:(0,J.jsx)(`div`,{...e,role:`n
4one`,...i,...d,className:(0,Y.default)(Ii,r,d?.className,`navbar-list`),"data-justify":s??ko.justify,style:{"--width":ko.width,"--max-width":ko.width,"--justify":s??ko.justify,"--margin":u??ko.margin,"--navbar-list-background-color":b,backgroundColor:b,"--height":p?Tt(p).height:ko.height,borderBottom:h&&h!==`none`?`${g} ${h} ${_}`:`none`,"--padding":l??ko.padding,...a},children:(0,J.jsx)(`div`,{className:Bi,style:{"--content-width":m?At(m,void 0).width:ko.contentWidth,"--max-content-width":m?At(m,void 0).maxWidth:ko.contentWidth,"--gap":f??ko.gap,...o?{overflow:`visible`}:{overflow:`hidden`,overflowX:`auto`}},children:n})})})}var No={start:`justify-start`,center:`justify-center`,end:`justify-end`};function Po({element:e,parent:t,className:n,children:r,style:i,attributes:a}){let{type:o,justify:s,customAttributes:c,lineDividerStyle:l,lineDividerWidth:u,lineDividerHeight:d,lineDividerColor:f,gap:p,mobileGap:m}=e.attrs||{},h=l&&l!==`none`,g=h?{"--line-divider-width":u||`0.5px`,"--line-divider-height":d||`18px`,"--line-divider-style":l||`solid`,"--line-divider-color":f||`#000000`,"--line-divider-gap":`8px`}:{},_=o===`middle`&&s?No[s]:``,v={"--min-height":`var(--height)`,...typeof p==`string`&&p!==``&&{"--gap":p},...typeof m==`string`&&m!==``&&{"--mobile-gap":m},...g,...i},y=t?.content?.[1]?.attrs?.type===`middle`&&t.content[1].attrs?.justify===`center`&&t.content.length===3,[b,x]=(0,q.useState)(!1),S=(0,q.useRef)(null);(0,q.useEffect)(()=>()=>{S.current?.forEach(e=>{e.disconnect()})},[]);let C=e=>{if(!e)return;let t=()=>{e.scrollWidth>e.clientWidth?x(!0):x(!1)};requestAnimationFrame(t);let n=new MutationObserver(()=>{requestAnimationFrame(t)});n.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[`class`,`style`]});let r=new ResizeObserver(()=>{requestAnimationFrame(t)});r.observe(e),S.current=[n,r]},w=K(`!overflow-hidden !overflow-x-auto`,(b||!S.current&&(e.content?.length||0)>13)&&`!justify-start`),T=K(y?K(o===`middle`&&K(w,`flex-grow`),o===`left`&&`shrink-0 flex-1`,o===`right`&&`shrink-0 flex-1`):K(o===`middle`&&`flex-1`,o===`left`&&`shrink-0`,o===`right`&&`shrink-0`),Vi,o===`left`&&`_1ma1r0qj`,o===`middle`&&K(s===`center`&&`_1ma1r0qk`,s===`start`&&`_1ma1r0qj`,s===`end`&&`_1ma1r0qn`),o===`right`&&`_1ma1r0qn`,h&&`navbar-divider-group`,n);return(0,J.jsx)(`div`,{...a,...c,style:v,className:K(T,_),...h&&{"data-line-divider":`true`},ref:C,children:r})}var Fo=e({button:()=>Io,socialShareButton:()=>Lo}),Io=`_4jn0q80`,Lo=`_4jn0q81`,Ro=(0,q.forwardRef)(({onClick:e,className:t,...n},r)=>(0,J.jsx)(`button`,{ref:r,type:`button`,className:(0,Y.default)(`flex justify-center`,Io,t),onClick:e,...n,children:(0,J.jsx)(pt,{size:20})}));Ro.displayName=`BackActionButton`;var zo=({onClick:e,translations:t,...n})=>{let r=t?.[`search.pagination.back`];return r?(0,J.jsx)(yn,{portalId:`post-actions-container`,tooltipText:r,children:(0,J.jsx)(Ro,{onClick:e,...n})}):(0,J.jsx)(Ro,{onClick:e,...n})},Bo=({onClick:e,translations:t,...n})=>t?.[`search.pagination.comment`]?(0,J.jsx)(yn,{portalId:`post-actions-container`,tooltipText:t[`search.pagination.comment`],children:(0,J.jsx)(rt,{onClick:e,styles:Fo,data:n.data})}):(0,J.jsx)(rt,{onClick:e,data:n.data,styles:Fo}),Vo=({data:e,translations:t,...n})=>t?.[`search.pagination.like`]?(0,J.jsx)(yn,{portalId:`post-actions-container`,tooltipText:t[`search.pagination.like`],children:(0,J.jsx)(Ke,{data:e,styles:Fo,buttonType:`submit`,...n})}):(0,J.jsx)(Ke,{data:e,styles:Fo,buttonType:`submit`,onClick:void 0}),Ho=[`email`,`x`,`linkedIn`,`meta`,`reddit`,`whatsApp`],Uo=(0,q.forwardRef)(({title:e,description:t,url:n,...r},i)=>vn()?(0,J.jsxs)(Re,{children:[(0,J.jsx)(gt,{ref:i,className:(0,Y.default)(`flex justify-center`,Io),...r,children:(0,J.jsx)(Jr,{size:`20`})}),(0,J.jsx)(ft,{style:{minWidth:`initial`},side:`top`,className:`grid grid-cols-2 gap-0 overflow-hidden shadow-md rounded-md`,children:Ho.map(t=>(0,J.jsx)($e,{className:(0,Y.default)(Lo),title:e,url:n,platform:t},t))})]}):(0,J.jsx)(`button`,{type:`button`,className:(0,Y.default)(`flex justify-center`,Io),children:(0,J.jsx)(Jr,{size:`20`})})),Wo=({data:e,translations:t,...n})=>t?.[`search.pagination.share`]?(0,J.jsx)(yn,{portalId:`post-actions-container`,tooltipText:t[`search.pagination.share`],children:(0,J.jsx)(Uo,{title:e.title,de
4scription:e.description,url:e.url,...n})}):(0,J.jsx)(Uo,{title:e.title,description:e.description,url:e.url,...n});function Go(e){let{element:t,children:n,attributes:r,onBackClick:i,onCommentClick:a,translations:o,showCommentsButton:s}=e,{margin:c,padding:l,shadow:u,borderRadius:d,borderWidth:f,borderBottomWidth:p,borderColor:m,borderStyle:h,background:g,buttonColor:_,buttonBackgroundColor:v,hoverButtonColor:y,hoverButtonBackgroundColor:b}=t.attrs||{},{data:x}=t.attrs;return(0,J.jsxs)(`div`,{className:(0,Y.default)(`flex flex-row justify-center relative w-screen`),style:{margin:c,padding:l,boxShadow:u,borderWidth:f,borderBottomWidth:p,borderColor:m,borderStyle:h,borderRadius:d,background:g,"--button-color":_,"--button-background-color":v,"--hover-button-color":y,"--hover-button-background-color":b},...r,children:[(0,J.jsxs)(`div`,{id:`post-actions-container`,className:(0,Y.default)(`flex flex-row justify-between items-center`),style:{width:`100%`,maxWidth:468},children:[(0,J.jsx)(zo,{onClick:i,translations:o}),(0,J.jsx)(Vo,{data:x,translations:o}),s&&(0,J.jsx)(Bo,{onClick:a,translations:o,data:x}),(0,J.jsx)(Wo,{data:x.share,translations:o})]}),n]})}var Ko={split:`space-between`,left:`flex-start`,center:`center`,right:`flex-end`},qo=({direction:e})=>(0,J.jsx)(`svg`,{"aria-hidden":`true`,width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,style:{flexShrink:0},children:e===`left`?(0,J.jsx)(`polyline`,{points:`15 18 9 12 15 6`}):(0,J.jsx)(`polyline`,{points:`9 18 15 12 9 6`})}),Jo=(e,t,n)=>e===`solid`?{padding:`12px 20px`,borderRadius:n,backgroundColor:t}:e===`outline`?{padding:`12px 20px`,borderRadius:n,borderWidth:`1px`,borderStyle:`solid`,borderColor:t}:{},Yo=({post:e,label:t,align:n,layout:r,variant:i,showLabel:a,showTitle:o,labelColor:s,titleColor:c,buttonColor:l,buttonTextColor:u,buttonRadius:d})=>{let f=n===`end`,p=!e,m=i===`solid`?u:i===`outline`?l:s,h=i===`solid`?u:i===`outline`?l:c,g={display:`flex`,flex:r===`split`&&i===`link`?1:void 0,flexDirection:`column`,gap:`4px`,textDecoration:`none`,alignItems:f?`flex-end`:`flex-start`,textAlign:f?`right`:`left`,...Jo(i,l,d),...p?{opacity:.4,cursor:`not-allowed`,pointerEvents:`none`}:{}},_=(0,J.jsxs)(J.Fragment,{children:[a&&(0,J.jsxs)(`span`,{style:{display:`flex`,alignItems:`center`,gap:`4px`,fontSize:`13px`,color:m,flexDirection:f?`row-reverse`:`row`},children:[(0,J.jsx)(qo,{direction:f?`right`:`left`}),t]}),o&&e&&(0,J.jsx)(`span`,{style:{fontSize:`16px`,fontWeight:600,color:h},children:e.web_title})]});return p?(0,J.jsx)(`div`,{"aria-disabled":`true`,style:g,children:_}):(0,J.jsx)(mn,{to:`/p/${e.slug}`,"aria-label":`${t}: ${e.web_title}`,style:g,children:_})};function Xo(e){let{element:t,attributes:n}=e,{variant:r=`link`,layout:i=`split`,previousLabel:a,nextLabel:o,showLabels:s,showTitles:c,width:l,gap:u,padding:d,backgroundColor:f,borderRadius:p,borderWidth:m,borderColor:h,borderStyle:g,labelColor:_,titleColor:v,buttonColor:y,buttonTextColor:b,buttonRadius:x,data:S}=t.attrs||{},C=S?.previous??null,w=S?.next??null;if(!C&&!w)return null;let T={layout:i,variant:r,showLabel:s,showTitle:c,labelColor:_,titleColor:v,buttonColor:y,buttonTextColor:b,buttonRadius:x};return(0,J.jsxs)(`nav`,{style:{display:`flex`,flexDirection:`row`,alignItems:`center`,width:`100%`,maxWidth:l,justifyContent:Ko[i]??`space-between`,gap:u,padding:d,backgroundColor:f,borderRadius:p,borderWidth:m,borderColor:h,borderStyle:g},...n,children:[(0,J.jsx)(Yo,{post:C,label:a,align:`start`,...T}),(0,J.jsx)(Yo,{post:w,label:o,align:`end`,...T})]})}function Zo(e){let{element:t,currentProgress:n,attributes:r}=e,{foregroundColor:i}=t.attrs||{};return(0,J.jsx)(`div`,{className:`relative overflow-hidden h-1 w-full bg-transparent`,...r,children:(0,J.jsx)(`div`,{className:`h-2 w-full`,style:{backgroundColor:i,width:`${n}%`}})})}var Qo=({className:e})=>(0,J.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,className:e,viewBox:`0 0 30 30`,"aria-label":`beehiiv`,children:[(0,J.jsx)(`title`,{children:`beehiiv`}),(0,J.jsx)(`path`,{fill:`currentColor`,d:`M25.692 13.168H3.866c-.556 0-1.01-.458-1.01-1.017V10.6c0-1.755 1.414-3.178 3.157-3.178H23.52c1.743 0 3.157 1.423 3.157 3.177v1.55a.98.98 0 0 1-.985 1.018ZM21.092 5.745H8.462a1.044 1.044 0 0 1-1.036-1.042C7.426 2.11 9.523 0 12.099 0h5.356c2.576 0 4.673 2.11 4.673 4.703 0 .584-.455 1.042-1.036 1.042ZM26.702 14.845H2.855C1.288 14.845 0 16.142 0 17.718c0 1.576 1.288 2.872 2.855 2.872h8.462c.303
4-1.627 1.718-2.872 3.436-2.872a3.532 3.532 0 0 1 3.46 2.872h8.463c1.567 0 2.855-1.296 2.855-2.872 0-1.576-1.263-2.873-2.83-2.873ZM25.663 22.268h-7.401v5.745h5.557c1.567 0 2.855-1.297 2.855-2.873v-1.83a1.006 1.006 0 0 0-1.01-1.042ZM3.864 22.268c-.556 0-1.036.457-1.036 1.042v1.83c0 1.576 1.288 2.873 2.855 2.873h5.557v-5.745H3.864Z`})]}),$o=`_1te91d10`,es=`_1te91d11`,ts=`_1te91d12`,ns=`_1te91d13`,rs=`_1te91d14`,is=`_1te91d15`,as=`_1te91d16`,os=({publicationName:e,publicationLogoUrl:t,publicationUtmSource:n,text:r,color:i})=>(0,J.jsxs)(Fn,{publicationName:e,publicationLogoUrl:t,utmSource:n,className:rs,style:{borderColor:i,color:i},children:[(0,J.jsx)(Qo,{className:is}),(0,J.jsx)(`span`,{children:r})]}),ss=({backgroundColor:e,textColor:t,data:n,showPoweredByBeehiiv:r,shouldRenderOverContent:i})=>{let a=t&&Ce(t,e)?t:xe(e),{translations:o,publicationName:s,publicationLogoUrl:c,publicationUtmSource:l}=n,u=(0,J.jsxs)(`div`,{className:$o,style:{backgroundColor:i?`transparent`:e},children:[(0,J.jsx)(`div`,{className:es,children:(0,J.jsx)(`span`,{className:ts,style:{color:a},children:o.copyrightText})}),(0,J.jsx)(`div`,{className:ns,children:r&&(0,J.jsx)(os,{publicationName:s,publicationLogoUrl:c,publicationUtmSource:l,text:o.poweredByBeehiiv,color:a})})]});return i?(0,J.jsx)(`div`,{className:as,children:u}):u},cs=({backgroundColor:e,textColor:t,data:n,showPoweredByBeehiiv:r=!0,shouldRenderOverContent:i=!1})=>n?.showBeehiivBranding?(0,J.jsx)(ss,{backgroundColor:e,textColor:t,data:n,showPoweredByBeehiiv:r,shouldRenderOverContent:i}):null,ls={alignment:`center`,maxWidth:`600px`,maxHeight:`60px`,marginBottom:`16px`,borderWidth:`1px`,borderColor:`#e5e7eb`,borderStyle:`solid`,borderRadius:`8px`,borderFocus:`#3b82f6`,backgroundColor:`#ffffff`,textColor:`#111827`,placeholderColor:`#6b7280`,iconFill:`#3b82f6`,placeholder:`Search`},us=`_2kb6241`,ds=`_2kb6242`,fs=`_2kb6243`,ps={center:`justify-center`,left:`justify-start`,right:`justify-end`},ms=e=>{let{element:t,attributes:n,children:r,className:i,onClick:a}=e,{alignment:o=ls.alignment,maxWidth:s=ls.maxWidth,maxHeight:c=ls.maxHeight,marginBottom:l=ls.marginBottom,borderWidth:u=ls.borderWidth,borderColor:d=ls.borderColor,borderStyle:f=ls.borderStyle,borderRadius:p=ls.borderRadius,backgroundColor:m=ls.backgroundColor,placeholderColor:h=ls.placeholderColor,iconFill:g=ls.iconFill,placeholder:_=ls.placeholder}=t.attrs;return(0,J.jsxs)(`div`,{className:K(`relative flex flex-col w-full`,i),style:{"--input-background-color":m,"--input-placeholder-color":h,"--input-border-radius":p,"--input-border-width":u,"--input-border-color":d,"--input-border-style":f,"--input-icon-fill":g,"--input-max-width":s,"--input-max-height":c,"--input-margin-bottom":l},...n,children:[(0,J.jsx)(`div`,{className:K(`flex items-center w-full`,ps[o]),children:(0,J.jsxs)(`button`,{type:`button`,onClick:a,className:K(`relative flex items-center w-full cursor-pointer`,us),children:[(0,J.jsx)(ei,{className:K(`absolute left-3 h-4 w-4`,ds)}),(0,J.jsx)(`div`,{className:K(`w-full border p-4 pl-9 text-left`,fs),style:{borderRadius:p,borderWidth:u,borderColor:d,borderStyle:f},children:(0,J.jsx)(`span`,{style:{color:h},children:_})})]})}),r]})}
4,hs=`r3c6ox0`,gs=`r3c6ox1`,_s=`r3c6ox2`,vs=`r3c6ox3`,ys=`r3c6ox5`,bs=`r3c6ox6`,xs=`r3c6ox7`,Ss=`r3c6oxa`,Cs=`r3c6oxb`;function ws({result:e,isSelected:t,onMouseEnter:n}){let r=(0,q.useRef)(null);return(0,q.useEffect)(()=>{t&&r.current&&r.current.scrollIntoView({block:`nearest`})},[t]),(0,J.jsx)(`a`,{ref:r,href:e.url,target:`_blank`,rel:`noopener noreferrer`,className:bs,onMouseEnter:n,"data-selected":t,role:`option`,"aria-selected":t,children:(0,J.jsxs)(`div`,{className:K(xs,t&&`r3c6ox8`),children:[e.imageUrl&&(0,J.jsx)(`img`,{src:e.imageUrl,alt:e.title,className:`r3c6ox9`,loading:`lazy`}),(0,J.jsxs)(`div`,{className:Ss,children:[(0,J.jsx)(`div`,{className:Cs,children:e.title}),e.description&&(0,J.jsx)(`div`,{className:`r3c6oxc`,children:e.description}),e.date&&(0,J.jsx)(`div`,{className:`r3c6oxd`,children:e.date})]})]})})}function Ts({open:e,setOpen:t,search:n,setSearch:r,results:i,isLoading:a,placeholder:o=`Search episodes...`}){let[s,c]=(0,q.useState)(0),l=(0,q.useRef)(null);(0,q.useEffect)(()=>{c(0)},[n]),(0,q.useEffect)(()=>{e&&c(0)},[e]);let u=(0,q.useCallback)(e=>{if(i.length!==0)switch(e.key){case`ArrowDown`:e.preventDefault(),c(e=>e<i.length-1?e+1:e);break;case`ArrowUp`:e.preventDefault(),c(e=>e>0?e-1:e);break;case`Enter`:e.preventDefault(),i[s]&&window.open(i[s].url,`_blank`,`noopener,noreferrer`);break;case`Escape`:e.preventDefault(),t(!1);break}},[i,s,t]);return(0,J.jsx)(pn,{open:e,onOpenChange:t,children:(0,J.jsxs)(un,{children:[(0,J.jsx)(yt,{}),(0,J.jsx)(Nt,{className:K(hs,`top-[10%] sm:top-[10%] translate-y-0 sm:translate-y-0`),children:(0,J.jsxs)(`div`,{className:gs,children:[(0,J.jsxs)(`div`,{className:_s,children:[(0,J.jsx)(ei,{className:`w-4 h-4 flex-shrink-0`}),(0,J.jsx)(`input`,{ref:l,type:`text`,placeholder:o,className:K(vs,`focus:outline-none focus:ring-0`),value:n,onChange:e=>r(e.target.value),onKeyDown:u,autoFocus:!0})]}),(i.length>0||a)&&(0,J.jsx)(`hr`,{className:`r3c6ox4`}),(0,J.jsxs)(`div`,{className:ys,role:`listbox`,children:[a&&(0,J.jsx)(`div`,{className:`r3c6oxe`,children:(0,J.jsx)(`span`,{children:`Loading...`})}),!a&&i.length===0&&(0,J.jsx)(`div`,{className:`r3c6oxf`,children:(0,J.jsx)(`span`,{children:n?`No episodes found`:`No episodes available`})}),!a&&i.map((e,t)=>(0,J.jsx)(ws,{result:e,isSelected:t===s,onMouseEnter:()=>c(t)},e.id))]})]})})]})})}var Es=`_1o7geka0`,Ds=`_1o7geka1`,Os=`_1o7geka2`,ks=`_1o7geka3`,As=`_1o7geka6`,js=`_1o7geka7`;function Ms({result:e}){return(0,J.jsx)(`a`,{href:e.pathname,children:(0,J.jsxs)(`div`,{className:As,children:[(0,J.jsx)(`div`,{className:js,children:e.title}),e.description&&(0,J.jsx)(`div`,{className:`_1o7geka8`,children:e.description})]})})}function Ns({open:e,setOpen:t,results:n,search:r,setSearch:i,hasMore:a,onLoadMore:o}){return(0,J.jsx)(pn,{open:e,onOpenChange:t,children:(0,J.jsxs)(un,{children:[(0,J.jsx)(yt,{}),(0,J.jsx)(Nt,{className:K(Es,`top-[64px] sm:top-[64px] translate-y-0 sm:translate-y-0`),children:(0,J.jsxs)(`div`,{className:Ds,children:[(0,J.jsxs)(`div`,{className:Os,children:[(0,J.jsx)(ei,{className:`w-4 h-4`}),(0,J.jsx)(`input`,{type:`text`,placeholder:`Search...`,className:K(ks,`focus:outline-none focus:ring-0`),value:r,onChange:e=>i?.(e.target.value)})]}),n&&n.length>0&&(0,J.jsx)(`hr`,{className:`_1o7geka5`}),n&&n.length>0&&(0,J.jsx)(`div`,{className:`_1o7geka4`,children:n?.map(e=>(0,J.jsx)(Ms,{result:e},e.id))}),a&&o&&(0,J.jsx)(`div`,{className:`flex justify-center px-2 pb-2`,children:(0,J.jsx)(`button`,{type:`button`,className:`px-4 py-2 text-sm font-medium cursor-pointer bg-[var(--wt-primary-color,#030712)] text-[var(--wt-text-on-primary-color,#F9FAFB)] rounded-[var(--wt-border-radius,8px)]`,onClick:o,children:`Load more`})})]})})]})})}var Ps=`_12kfyb21`,Fs=`_12kfyb22`;function Is(e){let{children:t,element:n,isOpen:r=!1,isPreviewing:i=!1,onOpenChange:a}=e,{gap:o,width:s,maxWidth:c,padding:l,backgroundColor:u,borderRadius:d,borderWidth:f,borderColor:p,borderStyle:m,modalOverlayBackgroundColor:h,modalCloseButtonColor:g=`inherit`,modalCloseButtonPlacementTop:_,modalCloseButtonPlacementRight:v}=n.attrs||{},y={"--overlay-background-color":h,"--modal-close-button-color":g,"--modal-close-button-placement-top":_,"--modal-close-button-placement-right":v},b=(0,J.jsx)(`div`,{className:(0,Y.default)(Fs,`flex flex-col h-auto`),style:{"--width":s,"--max-width":c,backgroundColor:u,padding:l,borderStyle:m,borderWidth:f,borderRadius:d,borderColor:p,gap:o,"--padding":l},children:t});return i?(0,J.jsxs)(`div`,{className:`w-full h-auto min-h-[600px] flex items-end justify-center relative`,style:y,children:[(0,J.jsx)(`div`,{className:`absolute top-0 left-0 w-full h-full bg-[--overlay-background-color]`,children:`\xA0`}),(0,J.jsx)(`div`,{className:`z-10 relative w-full`,children:b})]}):r?(0,J.jsx)(jn,{placement:`bottom`,isOpen:r,onClose:a,style:y,showCloseButton:!1,children:(0,J.jsx)(`div`,{className:(0,Y.default)(Ps),children:b})}):null}var Ls={warning:`bg-yellow-100 text-yellow-800 border-yellow-200`,alert:`bg-red-100 text-red-800 border-red-200`,success:`bg-green-100 text-green-800 border-green-200`,information:`bg-gray-100 text-gray-800 border-gray-200`,info_blue:`bg-blue-100 text-blue-800 border-blue-200`,tertiary:`bg-action-tertiary-50 text-action-tertiary-900 border-action-tertiary-200`},Rs=({type:e=`information`,size:t=`md`,children:n,className:r=``})=>n?(0,J.jsx)(`span`,{className:(0,Y.default)(`shadow-xs inline-flex items-center gap-x-1 rounded-md border border-gray-300 text-xs font-medium`,r,Ls[e]??`bg-gray-100 text-gray-800`,{"h-4.5 px-1.5 text-xs":t===`sm`},{"h-5.5 px-2.5 py-0.5":t===`md`}),children:n}):null;function zs({count:e=4,heightClassName:t=`h-8`,className:n=``}){return(0,J.jsx)(`div`,{className:(0,Y.default)(`flex flex-col gap-y-2`,n),children:Array.from({length:e}).map((e,n)=>(0,J.jsx)(`div`,{className:(0,Y.default)(`w-full rounded bg-gray-100/80`,t)},n))})}var Bs=`y2s2tu0`;function Vs({children:e,className:t=`bg-white rounded-md`,title:n,subTitle:r,rightChildren:i,badgeElement:a}){return(0,J.jsx)(`section`,{className:(0,Y.default)(Bs,t,`h-auto p-4`),children:(0,J.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[a,(0,J.jsxs)(`div`,{className:`flex items-start justify-between`,children:[(0,J.jsxs)(`div`,{className:`flex flex-col`,children:[(0,J.jsx)(`h2`,{className:`text-lg font-bold text-gray-900 leading-7`,children:n}),typeof r==`string`?(0,J.jsx)(`p`,{className:`text-sm text-gray-500 leading-5`,children:r}):r]}),i]}),e]})})}function Hs(e){let t=vn(),{translations:n,children:r,canResetPassword:i,element:a,onClickEditProfile:o,onClickResetPassword:s,onClickLogout:c,onClickConnections:l,showActions:u,socialLoginProviders:d,isLoading:f}=e,{data:p}=a.attrs||{},m=(0,q.useMemo)(()=>p?.firstName&&p?.lastName?`${p.firstName} ${p.lastName}`:p?.firstName?p?.firstName:p?.lastName?p?.lastName:`-`,[p?.firstName,p?.lastName]);if(f)return(0,J.jsx)(Vs,{title:n?.[`manage.account_profile.title`],children:(0,J.jsx)(zs,{count:4})});let h=p?.emailChangeStatusBadge?(0,J.jsx)(yn,{portalId:`email-verification-pending-tooltip`,tooltipText:n?.[`manage.update_profile_modal.form.email_change_helper_text`]||``,children:(0,J.jsx)(Rs,{className:`w-fit h-fit`,type:p.emailChangeStatusBadge.type,children:p.emailChangeStatusBadge.text})}):null;return(0,J.jsxs)(Vs,{title:n?.[`manage.account_profile.title`],subTitle:n?.[`manage.account_profile.description`],badgeElement:p?.emailChangeStatusBadge&&(0,J.jsx)(`div`,{className:`w-full flex justify-end sm:hidden`,children:h}),rightChildren:(0,J.jsxs)(`div`,{className:`flex flex-row items-center gap-2`,children:[(0,J.jsx)(`div`,{className:`hidden sm:block`,children:h}),u&&t&&(0,J.jsxs)(Re,{children:[(0,J.jsx)(mt,{className:`flex items-center justify-center w-8 h-8 bg-white border border-gray-200 rounded-md shadow-sm grow-1 shrink-0`,children:(0,J.jsx)(nt,{width:16,height:16,className:`color-gray-900`,weight:`bold`})}),(0,J.jsxs)(We,{align:`end`,children:[(0,J.jsx)(Xt,{onClick:o,children:n?.[`manage.account_profile.dropdown_options.edit_profile_label`]}),d&&d.length>0&&(0,J.jsx)(Xt,{onClick:l,children:n?.[`manage.account_profile.dropdown_options.connections_label`]}),i&&(0,J.jsx)(Xt,{onClick:s,children:n?.[`manage.account_profile.dropdown_options.reset_password_label`]}),(0,J.jsx)(Xt,{onClick:c,children:n?.[`manage.account_profile.dropdown_options.logout`]}
4)]})]})]}),children:[(0,J.jsxs)(`div`,{className:`bg-[#F9FAFB] rounded-md p-4 flex items-center gap-6 border border-gray-200`,children:[(0,J.jsx)(`div`,{className:`w-[45px] h-[45px] grow-1 shrink-0 rounded-full bg-gradient-to-br from-gray-200 to-gray-400 flex items-center justify-center overflow-hidden`,children:(0,J.jsx)(Oe,{avatarUrl:p?.avatarUrl})}),(0,J.jsxs)(`div`,{className:`grid grid-cols-1 grid-rows-2 sm:grid-cols-[minmax(50px,_auto)_1fr] gap-1 sm:gap-x-2 sm:gap-y-1 w-full items-center`,children:[(0,J.jsx)(`span`,{className:`text-gray-500 text-xs leading-4`,children:n?.[`manage.account_profile.form.email_label`]}),(0,J.jsx)(`span`,{className:`text-gray-500 text-sm leading-5 font-medium truncate max-w-[180px] block sm:max-w-full`,title:p?.email,children:p?.email||`-`}),(0,J.jsx)(`span`,{className:`text-gray-500 text-xs leading-4`,children:n?.[`manage.account_profile.form.name_label`]}),(0,J.jsx)(`span`,{className:`text-gray-500 text-sm leading-5 font-medium break-words whitespace-normal`,children:m})]})]}),r]})}var Us={default:`_1f5dpml0`,flush:`_1f5dpml1`,primary:`_1f5dpml2`,danger:`_1f5dpml3`,"danger-light":`_1f5dpml4`};function Ws({children:e,type:t=`button`,disabled:n=!1,isSubmitting:r=!1,onClick:i,variant:a=`default`,className:o}){return(0,J.jsx)(`button`,{type:t,disabled:n||r,className:(0,Y.default)(Us[a],`rounded-md text-sm py-2 px-3 leading-5 font-medium`,a!==`flush`&&`shadow-sm`,o),onClick:i,children:r?(0,J.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,J.jsxs)(`svg`,{className:`animate-spin h-3.5 w-3.5`,xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"aria-hidden":`true`,children:[(0,J.jsx)(`circle`,{className:`opacity-25`,cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,strokeWidth:`4`}),(0,J.jsx)(`path`,{className:`opacity-75`,fill:`currentColor`,d:`M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z`})]}),e]}):e})}var Gs=`lblnhw0`;function Ks({isOpen:e,onOpenChange:t,onCancel:n,onSubmit:r,isSubmitting:i,title:a,message:o,cancelLabel:s,submitLabel:c,submitVariant:l=`primary`,isLoading:u}){return(0,J.jsx)(jn,{isOpen:e,onClose:t,className:`overflow-hidden shadow-lg sm:rounded-md`,style:{"--overlay-background-color":`#00000030`,"--modal-close-button-color":void 0,"--modal-close-button-placement-top":`24px`,"--modal-close-button-placement-right":`24px`},showCloseButton:!1,showRoundedBorders:!1,shouldCloseOnOutsideClick:!1,shouldDisableScroll:!1,children:(0,J.jsxs)(`div`,{className:(0,Y.default)(Gs,`w-full sm:w-[460px]`),children:[(0,J.jsxs)(`div`,{className:`flex flex-col w-full gap-1`,children:[(0,J.jsx)(`h1`,{className:`w-full text-lg font-bold leading-7 text-gray-900`,children:a}),u?(0,J.jsx)(zs,{count:2,heightClassName:`h-4`}):o&&(0,J.jsx)(`p`,{className:`w-full text-sm font-normal leading-5 text-gray-500`,children:o})]}),(0,J.jsxs)(`div`,{className:`flex justify-end gap-2 mt-4`,children:[(0,J.jsx)(Ws,{variant:`default`,disabled:i,type:`button`,onClick:n,children:s}),(0,J.jsx)(Ws,{disabled:!!u,variant:l,isSubmitting:i,type:`button`,onClick:r,children:c})]})]})})}var qs=t(i(),1),Js=({paywall:e,subscription:t,primaryTheme:n})=>{let{t:r}=v(),i=(0,q.useMemo)(()=>{try{let t=new URL(`${window.location.origin}/upgrade${window.location.search}`);return e.offer_id&&t.searchParams.set(`offer_id`,e.offer_id),t.toString()}catch{return`${window.location.origin}/upgrade${window.location.search}`}},[e.offer_id]),a=(0,q.useMemo)(()=>ie(),[]),o=(0,q.useMemo)(()=>{if(n)return{paragraph_font_family:n.body_font,paragraph_font_size:`16`,paragraph_line_height_size:`Normal`,h2_font_family:n.header_font,h2_font_size:`3
40`,h2_line_height_size:`Normal`,h4_font_family:n.header_font,h4_font_size:`20`,h4_line_height_size:`Normal`,button_font_family:n.button_font,button_border_radius:n.border_radius,button_padding_top:`12`,button_padding_bottom:`24`,quote_3_mark_color:``,quote_3_mark_alignment:``,quote_3_mark_spacing:``,quote_3_mark_font_size:``,quote_3_mark_font_family:``}},[n]);return(0,J.jsx)(at,{element:{type:`section`,attrs:{id:`premium-page-gate`,backgroundColor:n?.background_color,isViewportHeight:!0,horizontalAlign:`center`,innerVerticalAlign:`align_center`,padding:`24px`},content:[]},children:(0,J.jsxs)(`div`,{className:`mx-auto max-w-xl space-y-4`,children:[(0,J.jsx)(ze,{theme:o,upgradeUrl:i,upgradePath:`/upgrade`,shouldUseUrl:!0,isLive:!0,element:{type:`paywall_break`,attrs:{id:e.id,data:{title:e.title,description:e.description,cta_text:e.cta_text,benefits:e.benefits,subheader:e.subheader,image_url:e.image_url,style:e.style}},content:[{id:`text`,text:``}]},children:null}),!t&&(0,J.jsxs)(O,{as:`span`,type:`body`,theme:`content`,size:`xs`,className:`flex items-center justify-center text-center text-xs tracking-wide opacity-75 sm:text-lg`,children:[r(`login.already_a_subscriber`),(0,J.jsxs)(m,{to:a,className:`ml-1`,children:[(0,J.jsx)(`span`,{className:`text-wt-primary underline underline-offset-1`,children:r(`shared.cta.sign_in`)}),`.`]})]})]})})},Ys=(e,t)=>{let n=f(`root`),r=e?.premium===!0&&t?.publication?.premium_enabled===!0,i=n?.subscription,a=n?.isFetchingSubscription??!1;return{isPremiumGated:r,hasPremiumAccess:!r||i?.tier===`premium`&&i?.status===`active`,isFetchingSubscription:a,subscription:i}},Xs=({publication:e,children:t,onSuccess:n,showSubmitButton:r=!0})=>{let{t:i}=v(),[a]=o(),l=p(),{subscriberId:d}=c(),f=l.data,m=l.state===`submitting`,h=(0,q.useRef)(null),{removeCookie:g,cookies:_}=s(),y=f?.toast?.status,b=u();return(0,q.useEffect)(()=>{f?.postUnsubscribeFormId&&b(`/forms/${f?.postUnsubscribeFormId}`)},[f?.postUnsubscribeFormId,b]),Un(f?.toast),(0,q.useEffect)(()=>{y===`success`&&(g(w),n?.())},[y]),(0,J.jsxs)(l.Form,{ref:h,method:`post`,action:`/unsubscribe`,children:[(0,J.jsx)(`input`,{hidden:!0,name:`subscriber_id`,defaultValue:d}),(0,J.jsx)(`input`,{hidden:!0,name:`unsubscribe_form_id`,defaultValue:e.post_unsubscribe_form_id||``}),a.has(`post_id`)&&(0,J.jsx)(`input`,{hidden:!0,name:`post_id`,defaultValue:a.get(`post_id`)||``}),a.has(`newsletter_list_id`)&&(0,J.jsx)(`input`,{hidden:!0,name:`newsletter_list_id`,defaultValue:a.get(`newsletter_list_id`)||``}),(0,J.jsx)(`input`,{hidden:!0,name:`last_resource_guid`,defaultValue:_.last_resource_guid??``}),(0,J.jsx)(Hn,{name:`unsubscribe`,errorMessage:i(`account_actions.downgrade.toast.error`),successMessage:i(`account_actions.downgrade.toast.unsubscribed`)}),r&&(0,J.jsx)(z,{type:`submit`,variant:`danger`,isLoading:m,btnSize:`md`,children:m?`${i(`shared.actions.unsubscribing`)}…`:i(`shared.cta.unsubscribe`)}),t?.({isLoading:m,submitForm:()=>{h.current&&l.submit(h.current)}})]})},Zs=({site:e})=>{let{t}=v(),{handleOpenModal:n,handleCloseModal:r,currentModal:i}=B({useLocalState:!0}),{subscription:o}=a(`root`),{email:s,first_name:c,last_name:l,avatar_url:u}=o||{},d=o?.status===`inactive`,f=e.primary_theme.primary_color;return(0,J.jsxs)(`div`,{className:`bg-gray-100`,style:{"--pt-background-color":f,"--pt-text-on-background-color":re(e.primary_theme.background_color,e.primary_theme.primary_color)?e.primary_theme.background_color:fe(e.primary_theme.primary_color)},children:[(0,J.jsx)(Xs,{publication:e?.publication,showSubmitButton:!1,onSuccess:r,children:({isLoading:e,submitForm:n})=>(0,J.jsx)(Ks,{element:{type:`confirmActionModal`},title:t(`manage.downgrade.title`),cancelLabel:t(`shared.cta.cancel`),submitLabel:t(`shared.cta.unsubscribe`),message:t(`errors.website_suspended.description`),isSubmitting:e,isOpen:i===`unsubscribe`,onCancel:r,onOpenChange:()=>r(),onSubmit:()=>{n(),r()},children:null})}),(0,J.jsxs)(`div`,{className:`flex flex-col gap-6 w-full px-6 py-4 mx-auto min-h-dvh h-auto sm:py-8 sm:px-0 sm:w-2/3`,children:[(0,J.jsxs)(`div`,{className:`bg-white p-6 rounded-lg shadow-sm text-center mb-4`,children:[(0,J.jsx)(`h1`,{className:`text-2xl font-bold text-gray-900 mb-2`,children:t(`errors.website_suspended.title`)}),(0,J.jsx)(`p`,{className:`text-gray-600`,children:t(`errors.website_suspended.description`)})]}),o&&(0,J.jsx)(Hs,{element:{type:`accountProfile`,attrs:{data:{email:s||``,firstName:c||``,lastName:l||``,avatarUrl:u||``,emailChangeStatusBadge:d?{type:`information`,text:t(`shared.cta.unsubscribed`,{defaultValue:`Unsubscribed`})}:void 0}}},showActions:!1,canResetPassword:!1,isLoading:!1,translations:{"manage.account_profile.title":t(`manage.account_profile.title`),"manage.account_profile.description":t(`manage.account_profile.description`),"manage.account_profile.form.email_label":t(`manage.account_profile.form.email_label`),"manage.account_profile.form.name_label":t(`manage.account_profile.form.name_label`)},children:null}),!d&&o&&(0,J.jsx)(`button`,{type:`button`,onClick:()=>n(`unsubscribe`),className:`w-full py-3 px-4 bg-red-600 hover:bg-red-700 text-white font-medium rounded-lg transition-colors`,children:t(`shared.cta.unsubscribe`)})]})]})};function Qs(e){if(e?.content?.length){let t=e.content[0]?.marks;if(t&&t.length>0)return t[0].attrs?.color}}function $s(e,t,n=()=>!0){let r;return`type`in e&&e.type===t&&n?.(e)?r=e:`content`in e&&Array.isArray(e.content)&&e.content.forEach(e
4=>{r||=$s(e,t,n)}),r}function ec(e,t,n=()=>!0){let r=[];return`type`in e&&e.type===t&&n?.(e)?r.push(e):`content`in e&&Array.isArray(e.content)&&e.content.forEach(e=>{r.push(...ec(e,t,n))}),r}function tc(e,t,n=()=>!0){let r=Object.fromEntries(t.map(e=>[e,null]));function i(e){if(`type`in e&&t.includes(e.type)&&n(e)&&(r[e.type]||(r[e.type]=e)),`content`in e&&Array.isArray(e.content)){for(let t of e.content)if(i(t),Object.values(r).every(e=>e!==null))return}}return i(e),r}function nc(e,t){let n;try{let r=$s(e,`heading`,e=>!!e?.content&&e.content.length>0);if(r&&(n=Qs(r)),!n){let t=$s(e,`paragraph`,e=>!!e?.content&&e.content.length>0);t&&(n=Qs(t))}n||(e.attrs.backgroundColor===t.primary_color?n=t.text_on_primary_color:e.attrs.backgroundColor===t.background_color&&(n=t.text_on_background_color))}catch{}return{textColor:n}}var rc=()=>document.body.scrollHeight>window.innerHeight,ic=(e,t)=>{let[n,r]=(0,q.useState)(!1);if((0,q.useEffect)(()=>{let e=()=>r(rc()),t=new ResizeObserver(e);t.observe(document.body);let n=null,i=()=>{n===null&&(n=requestAnimationFrame(()=>{n=null,e()}))};return window.addEventListener(`resize`,i),()=>{t.disconnect(),window.removeEventListener(`resize`,i),n!==null&&cancelAnimationFrame(n)}},[]),!e||!e.content)return{lastSection:void 0,isPageContentOverflowing:n,pageHasOneSection:!1};let i=e.content,a=i.length===1&&i[0].type===`section`&&i[0].attrs.isViewportHeight===!0,o=a?i[0]:i[i.length-1],{textColor:s}=nc(o,t);return{isPageContentOverflowing:n,pageHasOneSection:a,backgroundColor:o?.attrs?.backgroundColor,textColor:s}},ac=(e,t)=>{if(typeof e!=`string`)return!1;try{let{protocol:n,hostname:r}=new URL(e);return(n===`http:`||n===`https:`)&&r!==new URL(t).hostname}catch{return!1}},oc=[`_self`,`_blank`,`_top`,`_parent`],sc=(e,t)=>e.type===`link`&&!oc.includes(String(e.attrs?.target??``))&&ac(e.attrs?.href,t),cc=(e,t)=>{let n=e.content?.map(e=>cc(e,t)),r=n?.some((t,n)=>t!==e.content?.[n]),i=e.marks?.some(e=>sc(e,t));if(!r&&!i)return e;let a=i?e.marks?.map(e=>sc(e,t)?{...e,attrs:{...e.attrs,target:`_blank`,rel:`noopener noreferrer`}}:e):e.marks;return{...e,content:n,marks:a}},lc=(e,t)=>t?cc(e,t):e,uc=e=>({button_background_color:e.primary_color,button_text_color:e.text_on_primary_color,button_font_family:e.button_font,button_border_radius:e.border_radius,paragraph_font_family:e.body_font,paragraph_color:e.text_on_background_color,h1_font_family:e.header_font,h1_font_color:e.text_on_background_color,h2_font_family:e.header_font,h2_font_color:e.text_on_background_color,h3_font_family:e.header_font,h3_font_color:e.text_on_background_color,h4_font_family:e.header_font,h4_font_color:e.text_on_background_color,h5_font_family:e.header_font,h5_font_color:e.text_on_background_color,h6_font_family:e.header_font,h6_font_color:e.text_on_background_color,inline_link_color:e.primary_color,list_font_family:e.body_font,list_font_color:e.text_on_background_color,background_color:e.background_color}),dc=({content:e})=>{let{site:t,page:n}=h(),{t:r}=v(),i=(0,q.useMemo)(()=>n.post_theme??uc(t.publication.web_theme),[n.post_theme,t.publication.web_theme]),a={type:`postContent`,attrs:{id:`page-post-content`,data:e},content:[{id:`empty`,text:``}]};return(0,J.jsx)(ke,{id:`content-blocks`,webTheme:t.publication.web_theme,postTheme:i,element:a,isLive:!0,isWeb:!0,translations:{"login.already_a_subscriber":r(`login.already_a_subscriber`),"shared.cta.sign_in":r(`shared.cta.sign_in`),"login.not_now":r(`login.not_now`),"shared.actions.submitting":r(`shared.actions.submitting`),"subscribe.email_placeholder":r(`subscribe.email_placeholder`),"shared.cta.subscribe":r(`shared.cta.subscribe`),"shared.cta.login":r(`shared.cta.login`),"shared.cta.or":r(`shared.cta.or`),"shared.cta.to_participate":r(`shared.cta.to_participate`),"shared.poll.subscribe_text":r(`shared.poll.subscribe_text`),"shared.image.missing_image":r(`shared.image.missing_image`),"shared.cta.gdpr_signup_consent":r(`shared.cta.gdpr_signup_consent`),"footer.terms_of_use":r(`footer.terms_of_use`),"footer.privacy_policy":r(`footer.privacy_policy`),"shared.cta.and":r(`shared.cta.and`),"shared.cta.sign_up":r(`shared.cta.sign_up`),"meta.titles.tos":r(`meta.titles.tos`)},rewriteImageSrc:Vn,loginPath:`/login`,subscribePath:`/subscribe`,homePath:`/`,upgradePath:`/upgrade`,showSubscriberBreak:!1,showPaywallBreak:!1,ChildDecoratorComponent:kt,isIndexingDisabled:t?.viewable_site_version?.metadata?.noindex_enabled===!0,isSubscriberAuthenticated:!1,children:null})},fc=({node:e,showPoweredByBeehiiv:t=!0,shouldRenderOverContent:n=!1})=>{let{site:r}=f(`root`),{publicationName:i,publicationCopyrightText:a,publicationLogoUrl:o,publicationUtmSource:c}=s(),{t:l}=v();if(!r.publication.beehiiv_branding)return null;let u=new Date().getFullYear(),d=a||i||``;return(0,J.jsx)(cs,{backgroundColor:e?.attrs?.backgroundColor,textColor:e?.attrs?.color,data:{publicationName:i||``,publicationLogoUrl:o||r.publication.logo?.url,publicationUtmSource:c||r.publication.footer_referral_utm_source,showBeehiivBranding:r.publication.beehiiv_branding,translations:{copyrightText:l(`footer.copyright_simple`,{year:u,name:d}),poweredByBeehiiv:l(`shared.cta.powered_by_beehiiv`)||`Powered by beehiiv`}},showPoweredByBeehiiv:t,shouldRenderOverContent:n})},pc=({node:e,children:t})=>(0,J.jsx)(sn,{element:e,isLive:!0,children:t}),mc=({node:e,children:t})=>(0,J.jsx)(Bt,{element:e,children:t}),hc=({node:e,children:t})=>(0,J.jsx)(qt,{element:e,children:t}),gc=({node:e,children:t})=>(0,J.jsx)(Ct,{element:e,children:t}),_c=({node:e})=>(0,J.jsx)(bt,{element:e}),vc=[`podcast.episode.image`,`podcast.episode.publish_date`,`podcast.episode.title`,`podcast.episode.description`,`podcast.episode.number`,`podcast.episode.duration`,`podcast.episode.details`,`podcast.episode.audio_player`,`podcast.episode.tiptap_content`,`podcast.episode.content`,`podcast.show.name`],yc=({node:e,children:t})=>{let n=h()?.podcastEpisode;return(0,q.useMemo)(()=>{let r=e.attrs?.mergeTag;if(!r||!vc.includes(r)||!n)return{node:e,children:t};let i=e;switch(r){case`podcast.show.name`:i=bi(e,n.show.title||``);break;case`podcast.episode.image`:{let t=n.thumbnail_url;t&&(i={...e,attrs:{...e.attrs,alt:n.title,src:t}}
4);break}case`podcast.episode.publish_date`:i=bi(e,Fe(n.publish_date));break;case`podcast.episode.title`:i=bi(e,n.title||``);break;case`podcast.episode.description`:i=bi(e,n.description||``);break;case`podcast.episode.number`:i=bi(e,n.season_and_episode_number_display||``);break;case`podcast.episode.duration`:i=bi(e,n.duration.toString());break;case`podcast.episode.content`:{let t=n.tiptap_content===null&&n.description_html,r=n.tiptap_content?yi(n.tiptap_content):n.tiptap_content;i={...e,attrs:{...e.attrs,renderAsHTML:t,html:n?.description_html??null,tiptapState:r}};break}case`podcast.episode.audio_player`:{let t=n.audio_url||``,r=n.audio_preview_url||``,a=t||r,o=n.is_premium&&!t&&!!r,s=n.platform_links?.youtube,c=s?pe(s):void 0,l=n.youtube_video_id??c??void 0,u=e;i={...u,attrs:{...u.attrs,data:{...u.attrs?.data,title:n.title,audioType:n.audio_type??(a?`audio/mpeg`:void 0),audioUrl:a,thumbnailUrl:n.thumbnail_url,waveform:n.waveform,duration:o?void 0:n.duration,youtubeVideoId:l,isPreview:o}}};break}default:i=e}let a=`content`in i&&i.content?uf(i.content):t;return{node:i,children:a}},[e,t,n])};function bc(e){if(e)return`${S.PODCAST_PLAYBACK}:${e}`}var xc=({node:e,children:t})=>{let{podcastEpisode:n}=W(),{children:r,node:i}=yc({node:e,children:t}),{t:a}=v(),o=Wn(),{handleOpenModal:s}=B(),c=(n?.audio_url||n?.audio_preview_url||``).length>0,l=!!(n?.is_premium&&!n.audio_url&&n.audio_preview_url),u=!o&&!c?()=>s(`login`,{preventScrollReset:!0}):void 0,d=o&&!c,f=d?a(`podcasts.episode.audio_player.locked_tooltip`):void 0,p=bc(n?.id);return(0,J.jsx)(hn,{element:i,className:n?.is_premium?`podcast-episode-paywall-anchor`:void 0,onPlayAttempt:u,isPlaybackLocked:d,isPreview:l,tooltipText:f,playbackStorageKey:p,children:r})},Sc=({children:e})=>{let[t]=(0,q.useState)(!1);return e({isLoading:t})},Cc=({node:e,children:t})=>(0,J.jsx)(Sc,{children:({isLoading:n})=>(0,J.jsx)(Ht,{element:e,isLive:!0,children:t})}),wc=({redirectUrl:e,eventStartsAt:t,eventEndsAt:n,status:r,className:i})=>{let{t:a}=v(),o=(0,Y.default)(`text-center text-sm w-full`,i);if(Gn({eventEndsAt:n,status:r}))return(0,J.jsx)(`p`,{className:o,children:a(`products.webinar.event_complete`)});let s=Kn({eventStartsAt:t,eventEndsAt:n,status:r}),c=qn({eventStartsAt:t,status:r});return(0,J.jsxs)(`p`,{className:o,children:[a(`products.webinar.already_registered`),s?(0,J.jsxs)(J.Fragment,{children:[` `,(0,J.jsx)(`a`,{href:e,className:`underline hover:no-underline`,children:a(`products.webinar.join_webinar`)})]}):c&&(0,J.jsxs)(J.Fragment,{children:[` `,a(`products.webinar.join_available_soon`,{minutes:10})]})]})},Tc=5,Ec=.9,Dc=10,Oc=.8;function kc(e,t){if(t<=0)return`normal`;let n=(t-e)/t;return n>=Ec||n>0&&e<=Tc?`urgent`:n>=Oc||n>0&&e<=Dc?`warning`:`normal`}var Ac=({remainingSeats:e,maxSeats:t,className:n})=>{let{t:r}=v();if(typeof e!=`number`||typeof t!=`number`||e<=0)return null;let i=kc(e,t),a=r(i===`urgent`?`products.webinar.capacity_urgent`:i===`warning`?`products.webinar.capacity_warning`:`products.webinar.seats_left`,{count:e});return(0,J.jsx)(`p`,{className:(0,Y.default)(`text-sm`,n),children:a})},jc={all:[`product-webinar-reservation`],bySlug:e=>[`product-webinar-reservation`,e]},Mc=async e=>{let t=await fetch(`/product_webinar_reservation?slug=${encodeURIComponent(e)}`);
4if(!t.ok)throw Error(`Failed to fetch product webinar reservation`);return t.json()},Nc=({slug:e,enabled:t=!0})=>H({queryKey:jc.bySlug(e),queryFn:()=>Mc(e),enabled:t&&!!e,staleTime:6e4}),Pc={all:[`webinar-details`],bySlug:e=>[`webinar-details`,e]},Fc=async e=>{let t=await fetch(`/product_webinar_details?slug=${encodeURIComponent(e)}`);if(!t.ok)throw Error(`Failed to fetch webinar details`);return t.json()},Ic=({slug:e,enabled:t=!0})=>H({queryKey:Pc.bySlug(e),queryFn:()=>Fc(e),enabled:t&&!!e,staleTime:3e4}),Lc={PENDING:`pending`,LIVE:`live`,ENDED:`ended`,CANCELLED:`cancelled`},Rc=function(e){return e.FILE_DOWNLOAD=`file`,e.LINK_MEDIA=`link`,e.COACHING_SESSION=`coaching_session`,e.WEBINAR=`webinar`,e}({}),zc=e=>{let t=e?.default_product_variant?.redeemable?.type===`ProductRedeemables::Webinar`,n=e?.default_product_variant?.redeemable?.provider;return{isWebinar:t,webinarProvider:n,hasCalComScheduling:t&&n===`daily_co`,canInstantlyRedeem:t&&n===null}},Bc=e=>e===Lc.PENDING||e===Lc.LIVE,Vc=(e,t)=>{if(e.status===`archived`||e.sold_out)return!0;let{isWebinar:n}=zc(e);return!!(n&&!Bc(t))},Hc=(0,q.createContext)(null),Uc=({children:e,onClose:t})=>(0,J.jsx)(Hc.Provider,{value:{onClose:t},children:e}),Wc=()=>(0,q.useContext)(Hc),Gc={[Rc.FILE_DOWNLOAD]:`File / Download`,[Rc.LINK_MEDIA]:`Link / Media`,[Rc.COACHING_SESSION]:`Coaching / 1:1`,[Rc.WEBINAR]:`Webinar`},Kc=e=>e?e in Gc?Gc[e]:e.split(`_`).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `):``,qc=e=>e||`color-mix(in srgb, var(--wt-primary-color, #6B7280) 50%, transparent)`,Jc=e=>{if(!e)return`12px`;let t=String(e).match(/^([\d.]+)([a-z%]+)?$/i);if(!t)return`12px`;let n=Number.parseFloat(t[1]),r=t[2]||`px`;return`${n*.75}${r}`},Yc=(e,t)=>{let n=e.default_product_variant?.redeemable,r=n?.type===`ProductRedeemables::Webinar`;return e.status===`archived`||e.sold_out?t(`products.cta.sold_out`):r&&n?.status===Lc.CANCELLED?t(`products.cta.cancelled`):r&&n?.status===Lc.ENDED?t(`products.cta.ended`):e.cta_text||``},Xc=[`product.name`,`product.description`,`product.details`,`product.price`,`product.product_type`,`product.image`,`product.buy_action`],Zc=({node:e,children:t})=>{let{t:n}=v(),{product:r}=W();return(0,q.useMemo)(()=>{let i=e.attrs?.mergeTag;if(!i||!Xc.includes(i)||!r)return{node:e,children:t};let a=e;switch(i){case`product.name`:a=bi(e,r.name||``);break;case`product.description`:a=bi(e,r.description||``);break;case`product.price`:{if(r.free){a=bi(e,n(`products.free_label`));break}let t=r.default_product_variant,i=t?.price||``,o=t?.original_price;if(o&&t?.original_unit_amount&&t?.unit_amount&&t.original_unit_amount>t.unit_amount){let t=e.content?.[0],n;if(t&&typeof t==`object`&&`marks`in t){let e=t.marks;Array.isArray(e)&&(n=e.find(e=>e.type===`textStyle`)?.attrs?.fontSize)}a=_e(bi(e,`${i} ${o}`),t=>{if(t.content?.[0]?.type===`text`&&t.content[0].text){let r=t.content[0].text,a=i.length,o=r.substring(0,a),s=r.substring(a+1),c=(t.content?.[0]?.marks||[]).filter(e=>e.type!==`strike`),l={};(e.type===`paragraph`||e.type===`heading`)&&e.attrs?(l.strikethroughColor=e.attrs.strikethroughColor?.trim()||qc(),l.strikethroughFontSize=Jc(n),l.strikethroughFontWeight=`normal`):(l.strikethroughColor=qc(),l.strikethroughFontSize=Jc(n),l.strikethroughFontWeight=`normal`),t.content=[{type:`text`,text:`${o} `,marks:c},{type:`text`,text:s,marks:[...c,{type:`strike`,attrs:l}]}]}})}else a=bi(e,i);break}case`product.product_type`:a=bi(e,Kc(r.product_type));break;case`product.details`:a={...e,attrs:{...e.attrs,tiptapState:r.tiptap_state}};break;case`product.image`:{let t=r.default_product_variant?.assets||[],n=t[0],i=n?.url||r.default_product_variant?.default_image_url||``,o=e.attrs;if(t.length>1){let s=t.slice(1).map(e=>({url:e.url,alt:e.alt_text||``}));a={...e,attrs:{...e.attrs,alt:n?.alt_text||r.name||``,src:i,secondaryImages:s,carouselVariant:o.carouselVariant||`thumbnails-bottom`,galleryLayout:o.galleryLayout||`carousel`}}}else a={...e,attrs:{...e.attrs,alt:n?.alt_text||r.name||``,src:i}};break}case`product.buy_action`:a=bi(e,Yc(r,n));break;default:a=e}let o=a.content?uf(a.content):t;return{node:a,children:o}},[e,t,r,n])},Qc={no_available_users_found_error:`products.error.host_unavailable`},$c=e=>e?Qc[e]??null:null;function el(){let e=new Uint8Array(24);crypto.getRandomValues(e);let t=Array.from(e,e=>String.fromCharCode(e)).join(``);return btoa(t).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=+$/,``)}function tl(e=`UTC`){if(typeof Intl>`u`||!Intl.DateTimeFormat)return e;try{return Intl.DateTimeFormat().resolvedOptions().timeZone||e}catch{return e}}function nl(e,t){let n=new Date(e);return new Intl.DateTimeFormat(`en-US`,{weekday:`long`,year:`numeric`,month:`long`,day:`numeric`,timeZone:t}).format(n)}function rl(e,t,n){let r=new Date(e),i=new Intl.DateTimeFormat(`en-US`,{hour:`numeric`,minute:`2-digit`,timeZoneName:`short`,timeZone:n}).format(r);if(t){let e=new Date(t);return`${i} - ${new Intl.DateTimeFormat(`en-US`,{hour:`numeric`,minute:`2-digit`,timeZone:n}).format(e)}`}return i}function il(e,t){if(!t)return null;let n=Math.round((new Date(t).getTime()-new Date(e).getTime())/6e4);if(n<60)return`${n} min`;let r=Math.floor(n/60),i=n%60;return i>0?`${r}h ${i}m`:`${r}h`}var al=({isOpen:e,onClose:t,onBookingSuccess:n,shouldDisableConfirmButton:r=!1,productSlug:i,eventName:a,eventStartsAt:o,eventEndsAt:s,eventTimeZone:c,remainingSeats:l,maxSeats:u,currentSubscriberEmail:d,currentSubscriberName:p,fulfillmentMetadata:m,onBookingAlreadyExists:h})=>{let{t:g}=v(),y=Yn(),b=F(),x=!!m?.cal_booking_uid,S=f(`root`)?.publication,{data:C}=Ic({slug:i,enabled:e}),w=C?.remaining_seats??l,T=C?.max_seats??u,E=C?.event_starts_at??o,D=C?.event_ends_at??s,O=tl(C?.iana_time_zone??C?.time_zone??c),k=m?.cal_booking_fields_responses?.email??d??``,j=m?.cal_booking_fields_responses?.name??p??``,[M,N]=(0,q.useState)(k),[P,I]=(0,q.useState)(j),[L,R]=(0,q.useState)(!1);(0,q.useEffect)(()=>{e&&(N(k),I(j),R(!1))},[e,k,j]);let ee=!!d,B=(0,q.useCallback)(async e=>{if(e.preventDefault(),!M.trim()||!P.trim())return;R(!0);let t=el(),r=Intl.DateTimeFormat().resolvedOptions().timeZone;try{let e=new FormData;e.set(`product_slug`,i),e.set(`name`,P.trim()),e.set(`email`,M.trim()),e.set(`time_zone`,r),m?.cal_booking_uid&&e.set(`reschedule_uid`,m.cal_booking_uid);let a=await fetch(`/webinars/booking`,{method:`POST`,body:e}),o=await a.json();if(!a.ok){if(a.status===409){if(h)h();else{let e=o?.message;A.error(e||g(`products.error.booking_conflict`))}return}let e=o?.message,t=$c(e),n=t?g(t):e;_(Error(`Booking failed (${a.status}): ${e||JSON.stringify(o)}`)),A.error(n||g(`products.error.booking_failed`,{defaultValue:`Something went wrong, please try again`}));return}if(o?.status===`success`&&o?.data?.uid){let e={uid:o.data.uid,seatUid:o.data.seatUid,attendees:o.data.attendees??[{email:M.trim(),name:P.trim()}],bookingFieldsResponses:o.data.bookingFieldsResponses??{email:M.trim(),guests:[],location:{value:``,optionValue:``},name:P.trim(),notes:``}};b.invalidateQueries({queryKey:Pc.bySlug(i)}),n(e,t)}else _(Error(`Unexpected booking response: ${JSON.stringify(o)}
4`)),A.error(g(`products.error.booking_failed`,{defaultValue:`Something went wrong, please try again`}))}catch(e){_(e instanceof Error?e:Error(String(e))),A.error(g(`products.error.booking_failed`,{defaultValue:`Something went wrong, please try again`}))}finally{R(!1)}},[M,P,m,h,n,i,b,g]);if(!e)return null;let V=nl(E,O),H=rl(E,D,O),te=il(E,D),U=L||r,W=(0,J.jsxs)(`div`,{className:`flex flex-col gap-6 p-6 md:p-8 md:w-[280px] md:min-w-[280px] bg-gray-50 border-b md:border-b-0 md:border-r border-gray-200`,children:[S&&(0,J.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[S.logo?.thumb?.url&&(0,J.jsx)(`img`,{src:S.logo.thumb.url,alt:S.name,className:`w-8 h-8 rounded-full object-cover ring-1 ring-gray-200`}),(0,J.jsx)(`span`,{className:`text-sm text-gray-500 font-medium truncate`,children:S.name})]}),(0,J.jsxs)(`div`,{children:[(0,J.jsx)(`h2`,{className:`text-lg font-semibold text-gray-900 leading-snug`,children:x?g(`products.webinar.reschedule_title`,{defaultValue:`Reschedule webinar`}):a}),te&&(0,J.jsx)(`p`,{className:`text-sm text-gray-400 mt-1`,children:te})]}),(0,J.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,J.jsxs)(`div`,{className:`flex items-start gap-2.5`,children:[(0,J.jsx)(ae,{className:`w-[18px] h-[18px] text-gray-400 mt-0.5 shrink-0`}),(0,J.jsx)(`span`,{className:`text-sm text-gray-600`,children:V})]}),(0,J.jsxs)(`div`,{className:`flex items-start gap-2.5`,children:[(0,J.jsx)(zr,{className:`w-[18px] h-[18px] text-gray-400 mt-0.5 shrink-0`}),(0,J.jsx)(`span`,{className:`text-sm text-gray-600`,children:H})]})]}),(0,J.jsx)(Ac,{remainingSeats:w,maxSeats:T})]}),ne=`block w-full rounded-md border border-gray-300 bg-white px-3 py-2.5 text-sm text-gray-900 shadow-sm placeholder:text-gray-400 focus:border-gray-900 focus:outline-none focus:ring-1 focus:ring-gray-900 disabled:cursor-not-allowed disabled:bg-gray-50 disabled:text-gray-500`,re=(0,J.jsxs)(`div`,{className:`flex flex-col md:flex-row bg-white overflow-hidden`,children:[W,(0,J.jsxs)(`form`,{onSubmit:B,className:`flex flex-col gap-5 p-6 md:p-8 md:w-[320px] bg-white`,children:[(0,J.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,J.jsxs)(`label`,{htmlFor:`booking-name`,className:`block text-sm font-medium text-gray-700`,children:[g(`products.webinar.name_label`,{defaultValue:`Name`}),(0,J.jsx)(`span`,{className:`ml-1`,"aria-hidden":`true`,children:`*`})]}),(0,J.jsx)(`input`,{id:`booking-name`,name:`name`,type:`text`,value:P,onChange:e=>I(e.target.value),required:!0,className:ne})]}),(0,J.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,J.jsxs)(`label`,{htmlFor:`booking-email`,className:`block text-sm font-medium text-gray-700`,children:[g(`products.webinar.email_label`,{defaultValue:`Email`}),(0,J.jsx)(`span`,{className:`ml-1`,"aria-hidden":`true`,children:`*`})]}),(0,J.jsx)(`input`,{id:`booking-email`,name:`email`,type:`email`,value:M,onChange:e=>N(e.target.value),disabled:ee,required:!0,className:ne})]}),(0,J.jsx)(`div`,{className:`[&_button]:!rounded-md`,children:(0,J.jsx)(z,{type:`submit`,variant:`primary`,block:!0,disabled:U,isLoading:L,children:x?g(`products.webinar.reschedule_button`,{defaultValue:`Reschedule`}):g(`products.webinar.register_button`,{defaultValue:`Register`})})})]})]});return y?(0,qs.createPortal)((0,J.jsx)(Mi,{isOpen:e,onOpenChange:t,isLoading:U,showCloseButton:!U,hideOverflow:!1,element:{type:`mobileModal`,content:[]},children:re}),document.body):(0,qs.createPortal)((0,J.jsx)(oe,{isOpen:e,onOpenChange:t,isLoading:U,showCloseButton:!0,hideOverflow:!1,element:{type:`modal`,content:[]},children:re}),document.body)},ol=(0,q.createContext)(void 0),sl={clientSecret:null,setClientSecret:()=>{},redemptionToken:null,setRedemptionToken:()=>{},showThankYou:!1,setShowThankYou:()=>{},showRedemptionModal:!1,setShowRedemptionModal:()=>{},redemptionState:`loading`,setRedemptionState:()=>{},orderStatusData:null,setOrderStatusData:()=>{},redemptionErrorMessage:null,setRedemptionErrorMessage:()=>{},shouldInstantlyRedeem:!1,showFreeProductCheckoutModal:!1,setShowFreeProductCheckoutModal:()=>{}};function cl(){let e=(0,q.useContext)(ol);return e===void 0?sl:e}var ll=e=>{let t=e?.default_product_variant?.redeemable?.type===`ProductRedeemables::CoachingSession`,n=e?.default_product_variant?.redeemable?.provider;return{isCoachingSession:t,coachingSessionProvider:n,canInstantlyRedeem:n===null}},ul=`webinar_checkout_`;function dl(e){return`${ul}${e}`}function fl(e,t){try{localStorage.setItem(dl(e),t)}catch{}}function pl(e){try{return localStorage.getItem(dl(e))}catch{return null}}function ml(e){try{localStorage.removeItem(dl(e))}catch{}}var hl=(0,q.lazy)(()=>g(()=>import(`./CoachingBookingModal-BLn5ij6t.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64]))),gl=({product:e,reservationRedirectUrl:t,children:n})=>{let r=F(),{t:i}=v(),{subscription:o,site:s}=a(`root`),{openPageModalType:c,setOpenPageModalType:l,visitToken:u,referralId:d,cookies:f}=Dn(),p=x(f.bhba||void 0),m=Jn(),h=(0,q.useRef)(null),{setClientSecret:_,setRedemptionToken:y,setShowThankYou:b,setShowFreeProductCheckoutModal:S,shouldInstantlyRedeem:C,setOrderStatusData:w,setRedemptionState:T,setRedemptionErrorMessage:E,setShowRedemptionModal:D}=cl(),O=Wn(),k=e.default_product_variant?.id??``,j=()=>
4{if(!k)return;let e=pl(k);e?(l(null),_(e)):A.error(i(`products.error.booking_conflict`))},P=e.status===`archived`,I=e.sold_out,R=e.default_product_variant?.redeemable,ee=R?.type===`ProductRedeemables::Webinar`&&!Bc(R.status),{isCoachingSession:z,coachingSessionProvider:B}=ll(e),{hasCalComScheduling:V}=zc(e),H=e.default_product_variant?.redeemable?.metadata,te=z&&B===`cal_com`||V,U=z&&B===`cal_com`&&!!H?.slug&&!!H?.users?.[0]?.username,[W,ne]=(0,q.useState)(!1);(0,q.useEffect)(()=>{U&&c===`booking_modal`&&ne(!0)},[U,c]),(0,q.useEffect)(()=>{if(!U)return;let e=()=>void g(()=>import(`./CoachingBookingModal-BLn5ij6t.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64]));if(typeof window.requestIdleCallback==`function`){let t=window.requestIdleCallback(e);return()=>window.cancelIdleCallback(t)}let t=window.setTimeout(e,2e3);return()=>window.clearTimeout(t)},[U]);let re=e.free,ie=!!e.default_product_variant?.required_form_id&&e.default_product_variant?.required_form!==null,ae=n=>{if(t)return n.preventDefault(),window.location.href=t,!1;if(ee)return n.preventDefault(),A.error(i(`products.registration_closed_toast_message`)),!1;if(I)return n.preventDefault(),A.error(i(`products.sold_out_toast_message`)),!1;if(P)return n.preventDefault(),A.error(i(`products.archived_toast_message`)),!1;if(te)return n.preventDefault(),!H?.slug||!H?.users?.[0]?.username?(A.error(`Something went wrong, please try again`),!1):re&&!O?(S(!0),!1):(l(`booking_modal`),!1);if(re&&(O&&ie||!O))return n.preventDefault(),S(!0),!1;if(!h.current)return;let r=new FormData(h.current);typeof window<`u`&&(r.set(`purchase_url`,window.location.href),r.set(`anonymous_user_id`,N()),r.set(`nectar_visit_token`,M()),s.id&&r.set(L,s.id)),m.submit(r,{method:`post`,action:`/products/${e.slug}`})},oe=(t,n)=>{if(!h.current)return;let i=new FormData(h.current);i.append(`booking_data`,JSON.stringify(t)),i.append(`booking_provider`,`cal_com`),n&&i.append(`webinar_access_token`,n),i.append(`booking_attendee_email`,t.attendees[0]?.email??``),i.append(`booking_attendee_name`,t.attendees[0]?.name??``),m.submit(i,{method:`post`,action:`/products/${e.slug}`}),r.invalidateQueries({queryKey:Pc.bySlug(e.slug)})};return(0,J.jsxs)(J.Fragment,{children:[V&&H?.id&&(0,J.jsx)(al,{isOpen:c===`booking_modal`,onClose:()=>l(null),onBookingSuccess:oe,shouldDisableConfirmButton:m.state===`submitting`,productSlug:e.slug,eventName:e.name,eventStartsAt:R?.event_starts_at??``,eventEndsAt:R?.event_ends_at,eventTimeZone:R?.iana_time_zone??R?.time_zone??`UTC`,remainingSeats:R?.remaining_seats,maxSeats:R?.max_seats,currentSubscriberEmail:o?.email,onBookingAlreadyExists:j}),U&&W&&(0,J.jsx)(q.Suspense,{fallback:null,children:(0,J.jsx)(hl,{onBookingSuccess:e=>{oe(e)},shouldDisableConfirmButton:m.state===`submitting`,eventSlug:H.slug,calComUserName:H.users[0].username,currentSubscriberEmail:o?.email,onClose:()=>l(null),isOpen:c===`booking_modal`})}),(0,J.jsxs)(Nn,{fetcher:m,formRef:h,method:`post`,action:`/products/${e.slug}`,onSuccess:e=>{if(e?.already_registered&&e.redirect_url){A.success(i(`products.webinar.already_registered`)),window.location.href=e.redirect_url;return}if(e?.redemptionToken&&y(e.redemptionToken),S(!1),l(null),e.clientSecret&&_){k&&fl(k,e.clientSecret),_(e.clientSecret);return}if(e.order?.id){if(C&&e.redemptionToken){w(e.order),T(`ready`),E(null),D(!0);return}b(!0)}},onSubmit:ae,onError:e=>{A.error(e?.toast?.message||`Something went wrong, please try again`)},children:[(0,J.jsx)(`input`,{type:`hidden`,name:`product_variant_id`,value:e.default_product_variant?.id||``}),(0,J.jsx)(`input`,{hidden:!0,name:`sent_from_orchid`,value:`true`}),d&&(0,J.jsx)(`input`,{hidden:!0,name:`ref`,value:d,onChange:()=>null}),p&&(0,J.jsx)(`input`,{hidden:!0,name:`bhba`,value:p,onChange:()=>null}),u&&(0,J.jsx)(`input`,{hidden:!0,name:`visit_token`,value:u,onChange:()=>null}),(0,J.jsx)(`input`,{hidden:!0,name:`is_js_enabled`,defaultValue:`true`}),n({isLoading:m.state===`submitting`})]})]})},_l=({node:e,children:t})=>{let n=u(),{handleOpenModal:r,handleCloseModal:i}=B(),{subscription:a,setCloseModalActionDispatched:o,openPageModalType:s}=Dn(),{product:c}=W(),l=Wc(),d=Wn(),{children:f}=Zc({node:e,children:t}),p=e?.attrs?.mergeTag,m=e?.attrs&&`onClick`in e.attrs?e.attrs.onClick:void 0,h=e?.attrs&&`action`in e.attrs&&e.attrs.action,g=e.attrs?.url||``,_=m===`action`||m===void 0&&!!h,v,y,b=!1,x=g.startsWith(`tel:`);try{x||(v=new URL(g))}catch{}_&&(typeof window<`u`&&(v=new URL(window.location.href)),h===`login`&&v?v.searchParams.set(`modal`,`login`):h===`sign_up`&&v?v.searchParams.set(`modal`,`signup`):h===`profile`&&v?v.pathname=`subscribe/${a?.subscriber_id||``}/manage`:h===`search`&&v?v.searchParams.set(`modal`,`search`):h===`close_modal`&&v&&v.searchParams.delete(`modal`));let S=(0,q.useMemo)(()=>_e(e,e=>{e.attrs&&_&&v&&(e.attrs.open_in_new_tab=!1)}),[e,_,v]);!S.attrs?.open_in_new_tab&&v&&!S.attrs?.isCustomLink&&!x&&(y=()=>
4{if(typeof h==`string`&&[`sign_up`,`search`,`login`,`close_modal`].includes(h)){switch(h){case`search`:case`login`:r(h,{preventScrollReset:!0});break;case`sign_up`:r(`signup`,{preventScrollReset:!0});break;case`close_modal`:l?.onClose?l.onClose():(i({preventScrollReset:!0}),s&&o(!0));break;default:n(`${v.pathname}${v.search}${v.hash}`)}return}n(`${v.pathname}${v.search}${v.hash}`)},b=!0);let C=p===`product.buy_action`&&!!c,w=c?.default_product_variant?.redeemable,T=w?.type===`ProductRedeemables::Webinar`,{data:E}=Ic({slug:c?.slug??``,enabled:C&&T}),{data:D}=Nc({slug:c?.slug??``,enabled:C&&T&&d});if(C){let e=D?.redirect_url??null,t=!!e,n=Vc(c,w?.status)||t,r=E?.remaining_seats??w?.remaining_seats,i=E?.max_seats??w?.max_seats;return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(gl,{product:c,reservationRedirectUrl:e,children:({isLoading:e})=>(0,J.jsx)(Yt,{type:`submit`,isClientSideNavigation:!0,element:S,disabled:e||n,children:f})}),t&&e&&(0,J.jsx)(wc,{redirectUrl:e,eventStartsAt:E?.event_starts_at??w?.event_starts_at,eventEndsAt:E?.event_ends_at??w?.event_ends_at,status:w?.status,className:`-mt-3.5`}),!n&&(0,J.jsx)(Ac,{remainingSeats:r,maxSeats:i,className:`-mt-3.5 text-center w-full`})]})}return(0,J.jsx)(Yt,{element:S,onClick:y,isClientSideNavigation:b,children:t})},vl=({node:e,children:t})=>(0,J.jsx)(jt,{element:e,children:t}),yl=({node:e,children:t})=>(0,J.jsx)(Et,{element:e,children:t}),bl=({name:e,visitToken:t,redirectUrl:n,fallbackPath:r,webhookUrl:i})=>(0,J.jsx)(j,{fallback:null,children:()=>(0,J.jsxs)(J.Fragment,{children:[e&&(0,J.jsx)(`input`,{hidden:!0,name:`form_name`,defaultValue:e}),(0,J.jsx)(`input`,{hidden:!0,name:`nickname`}),t&&(0,J.jsx)(`input`,{hidden:!0,name:`visit_token`,value:t||``,onChange:()=>null}),r&&(0,J.jsx)(`input`,{hidden:!0,name:`fallback_path`,defaultValue:r}),n&&(0,J.jsx)(`input`,{hidden:!0,name:`redirect_path`,defaultValue:n}),i&&(0,J.jsx)(`input`,{hidden:!0,name:`webhook_url`,defaultValue:i}),(0,J.jsx)(`input`,{hidden:!0,name:`is_js_enabled`,defaultValue:`true`})]})}),xl=()=>(0,J.jsx)(`input`,{name:`sent_from_orchid`,type:`hidden`,value:`true`}),Sl=({name:e,id:t,pageId:n,redirectUrl:r,children:i,onSuccess:a,fieldLabels:o,webhookUrl:s})=>{let c=(0,q.useId)(),l=Jn(),u=l.state===`submitting`,{t:d}=v(),{visitToken:f,currentPath:p}=Dn(),m=(0,q.useRef)(null),h=t||c;return Un(l?.data?.toast),(0,J.jsxs)(Nn,{id:h,fetcher:l,formRef:m,method:`post`,action:`/contact_form_response`,onSuccess:e=>{if(window._pxFormId=void 0,m.current?.reset(),e?.dataLayerEvent&&be.pushEvent(e.dataLayerEvent),e?.redirectTo){window.location.href=e.redirectTo;return}a?.(e)},onError:e=>{window._pxFormId=void 0},children:[(0,J.jsx)(Hn,{name:`contact_form_response`,successMessage:d(`forms.toast.success`),errorMessage:d(`errors.default`)}),(0,J.jsx)(bl,{name:e,visitToken:f,redirectUrl:r,fallbackPath:p,webhookUrl:s}),(0,J.jsx)(xl,{}),n&&(0,J.jsx)(`input`,{hidden:!0,name:`page_id`,defaultValue:n}),t&&(0,J.jsx)(`input`,{hidden:!0,name:`contact_form_node_id`,defaultValue:t}),o&&Object.keys(o).length>0&&(0,J.jsx)(`input`,{hidden:!0,name:`field_labels`,defaultValue:JSON.stringify(o)}),i({isLoading:u})]})},Cl=({node:e,children:t})=>{let{page:n}=W(),r=e.attrs?.data?.additional_fields?.reduce((e,t)=>(e[t.name_override||t.id]=t.name,e),{});return(0,J.jsx)(Sl,{id:e.attrs.id||``,pageId:n.id,name:e.attrs?.formName,webhookUrl:e.attrs?.webhookUrl,fieldLabels:r,children:({isLoading:n})=>(0,J.jsx)(cn,{element:e,isLive:!0,isLoading:n,children:t})})},wl=({node:e,children:t})=>{let{subscription:n,isLoggedIn:r}=f(`root`),i=!!n&&n.tier===`premium`&&n.status!==`paused`,a=e.attrs?.showWhen;return a&&!(a===`all`||a===`all_logged_out`&&!r||a===`all_logged_in`&&r||a===`paid`&&r&&i||a===`free`&&r&&!i)?null:(0,J.jsx)(ut,{element:e,children:t})},Tl=e=>e.getBoundingClientRect().y<window?.innerHeight,El=()=>window.innerHeight+window.scrollY>=document.documentElement.scrollHeight-1,Dl=({isEnabled:e,useIntersectionLogic:t,contentGateElementRef:n})=>{let{setOpenPageModalType:r}=Dn(),[i,a]=(0,q.useState)(!1),[o,s]=(0,q.useState)(!1),c=(0,q.useCallback)(()=>{if(!t){El()?s(!0):s(!1);return}n?.current&&(Tl(n.current)?s(!0):s(!1))},[n,t]);return(0,q.useEffect)(()=>
4{if(e){if(t&&n?.current&&Tl(n.current)){s(!0);return}return window.addEventListener(`scroll`,c),()=>{window.removeEventListener(`scroll`,c)}}},[n?.current,c,t,e]),(0,q.useEffect)(()=>{e&&o&&!i&&(r(`content_gate`),a(!0))},[i,o,e]),(0,q.useEffect)(()=>{!o&&i&&(r(null),a(!1))},[i,o]),{isOpen:i,onClose:()=>a(!1)}},Ol=({contentGateNode:e,cookiesHeader:t,tierIds:n,subscription:r})=>{if(!e||!(`attrs`in e))return!1;let i=e.attrs,a=!!r,o=r?.tier===`premium`&&r.status!==`paused`,s=n.includes(`none`),c=P(`email_capture_disabled`,t||``)===`true`;switch(i.showWhen){case`paid`:{if(!r||!a||a&&!o)return!0;let e=i.showWhenWithoutTierIds||[],t=r?.premium_tiers?.filter(e=>!e.paused)?.map(e=>e.id)||[];return e.length===0||!t.includes(e[0])}case`free`:return!a||a&&!o;case`unsubscribed`:return c||a?!1:n.length>0?s:!0;default:return!1}},kl=(e,t)=>{if(!t?.publicationUrl||!Array.isArray(e.content)||e.content.length===0)return e;let n=[`http://the-way-of-all-flesh.localhiiv.com:3002/`];return e.content=_e(e.content,e=>{try{let r=JSON.stringify(e);return n.forEach(e=>{r=r.replaceAll(e,t?.publicationUrl)}),JSON.parse(r)}catch{return e}}),e},Al=e=>{if(!e||!e.attrs)return e;try{return Object.keys(e.attrs.structureTiptapState??{}).length>0?e:_e(e,t=>{let n=hi(e.attrs,dt({imageAspectRatio:e.attrs.source===`youtube`?1.7777777777777777:1}));return t.attrs.hasMigratedToCardStructure=!0,t.attrs.structureTiptapState=n,t})}catch(e){_(e)}return e},jl=({node:e,children:t})=>{let[n,r]=(0,q.useState)(!1),i=(0,q.useRef)(null),{subscription:a,publication:s}=f(`root`),c=h().isContentClipped||!1,[l]=o(),u=Ol({contentGateNode:e,subscription:a,tierIds:l.getAll(`tier_ids[]`),cookiesHeader:typeof document<`u`?document.cookie:``}),p=d(),m=(e?.attrs?.popupContent)?.content?.[0],g=e.attrs.showPopup===!0,{isOpen:_}=Dl({useIntersectionLogic:!0,isEnabled:c&&g,contentGateElementRef:i});if((0,q.useEffect)(()=>{!u&&c&&!n&&(p.revalidate(),r(!0))},[u,c,p.revalidate,n]),!c)return null;let v=m&&kl(m,{publicationUrl:s?.url});return(0,J.jsxs)(`div`,{ref:i,children:[(0,J.jsx)(Vt,{element:e,children:t}),g&&(0,J.jsx)(Ti,{element:v,isLive:!0,isOpen:_,children:uf(v.content)})]})},Ml=({enabled:e,scrollHeight:t=100,navigationKey:n})=>{(0,q.useEffect)(()=>{if(!e)return;let n=document.body,r=document.documentElement,i=()=>{let e=document.querySelector(`.rendered-post`)?.getBoundingClientRect(),i=window.innerHeight,a=`calc(100vh + ${t}px)`;e&&e.bottom+window.scrollY<i&&(a=`100vh`),window.scrollTo(0,0),n.style.height=a,n.style.overflow=`hidden`,n.style.userSelect=`none`,r.style.overflow=`auto`},a=requestAnimationFrame(()=>{i()});return()=>{cancelAnimationFrame(a),n.style.height=``,n.style.overflow=``,n.style.userSelect=``,r.style.overflow=``}},[e,t,n])},Nl=50,Pl=600,Fl=({enabled:e,clipHeight:t,navigationKey:n})=>{let[r,i]=(0,q.useState)(!1),a=(0,q.useCallback)(()=>{window.scrollY>=Nl&&i(!0)},[]);return(0,q.useEffect)(()=>{i(!1)},[n]),(0,q.useEffect)(()=>{if(!e){i(!1);return}if(window.scrollY>=Nl){i(!0);return}let n=document.querySelector(`.rendered-post`)?.getBoundingClientRect();if(n){let e=window.innerHeight+t;if(n.top+n.height<=e){let e=setTimeout(()=>i(!0),Pl);return()=>clearTimeout(e)}}return window.addEventListener(`scroll`,a,{passive:!0}),()=>window.removeEventListener(`scroll`,a)},[e,t,a,n]),r},Il=e=>{(0,q.useEffect)(()=>{let t=document.querySelector(`.rendered-post`);if(t)return e?(t.style.transition=`filter 0.6s ease-out`,t.style.filter=`blur(4px)`):t.style.filter=``,()=>{t.style.filter=``,t.style.transition=``}},[e])},Ll=200,Rl=({node:e,children:t})=>{let{publication:n}=a(`root`),{isSubscriberGateEnabled:r}=Se()||{isSubscriberGateEnabled:!1},{pathname:i}=l();Ml({enabled:r,scrollHeight:Ll,navigationKey:i});let o=Fl({enabled:r,clipHeight:Ll,navigationKey:i});if(Il(o),!r)return null;let s=e&&kl(e,{publicationUrl:n?.url});return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`div`,{style:{position:`fixed`,bottom:0,left:0,right:0,height:`180px`,background:`linear-gradient(to bottom, transparent 0%, ${s?.attrs?.modalOverlayBackgroundColor||`rgba(255, 255, 255, 0.9)`} 85%)`,pointerEvents:`none`,zIndex:39,opacity:+!!o,transition:`opacity 0.8s cubic-bezier(0.32, 0.72, 0, 1)`}}),(0,J.jsx)(Ti,{element:s,isLive:!0,isOpen:o,children:t})]})},zl=({node:e,children:t})=>(0,J.jsx)(wt,{element:e,children:t}),Bl=({node:e,children:t,className:n})=>(0,J.jsx)(je,{element:e,className:n,children:t}),Vl=({node:e,children:t})=>(0,J.jsx)(Ei,{element:e,isLive:!0,children:t}),Hl=()=>{let[e,t]=(0,q.useState)(0),[n,r]=(0,q.useState)(0),i=()=>{t(window.scrollY/(document.body.scrollHeight-window.innerHeight)),r(window.scrollY)};return(0,q.useEffect)(()=>(i(),window.addEventListener(`scroll`,i),()=>window.removeEventListener(`scroll`,i)),[]),{percentageScrolled:e,windowScrollY:n}},Ul=40,Wl=e=>`email_capture_modal_closed_${e}`,Gl=({showAfterPercentageScrolled:e=Ul,cookieExpiryDays:t,pageId:n,enabled:r,isOnPostPage:i})=>{let[a,o]=(0,q.useState)(!1),{setOpenPageModalType:c,closeModalActionDispatched:l,setCloseModalActionDispatched:u}=Dn(),{setCookie:d}=s(),p=Wn(),{isFetchingSubscription:m}=f(`root`),{cookies:h}=s(),g=m||!!h[Wl(n)]||p,{percentageScrolled:_}=Hl()||{percentageScrolled:0,windowScrollY:0},v=Number((_*100).toFixed(1)),y=(0,q.useMemo)(()=>g?!1:v>=e,[v,g,e]);return(0,q.useEffect)(()=>{!r||a||y&&(t&&d({name:Wl(n),value:`true`,days:t}),i&&c(`email_capture`),o(!0))},[r,a,y,t,n,i]),(0,q.useEffect)(()=>{a&&l&&(o(!1),u(!1),c(null))},[a,l]),{isOpen:a,onClose:()=>{o(!1),d({name:Wl(n),value:`true`,days:t||4}),i&&c(null)}}},Kl=({node:e,children:t})=>{let{page:n}=W(),{isEmailCapturePopupEnabled:r}=Se()||{isEmailCapturePopupEnabled:!1},i=typeof e.attrs?.cookieExpiryDays==`string`?Number.parseInt(e.attrs?.cookieExpiryDays):e.attrs?.cookieExpiryDays,a=n.name===`Post`,o=a&&!r,{isOpen:s,onClose:c}=Gl({showAfterPercentageScrolled:e.attrs?.showAfterPercentageScrolled,cookieExpiryDays:Number.isNaN(i)?void 0:i,pageId:n.id,enabled:!o,isOnPostPage:a});return(0,J.jsx)(Uc,{onClose:c,children:(0,J.jsx)(ji,{element:e,isLive:!0,isOpen:s&&!o,onOpenChange:c,placement:a?`center`:void 0,children:t})})},ql=({node:e,children:t})=>{let n=(0,q.useId)(),{htmlOriginal:r,id:i,timestamp:a}=e.attrs,o=i&&a?i:n,s=r?.match(/<!--\s*beehiiv:no-iframe\s*-->/),c=(0,q.useMemo)(()=>(0,J.jsx)(tn,{id:o,element:e,children:t}),[o,e,t]);return s?(0,J.jsx)(j,{children:()=>c}):c},Jl=({node:e,children:t})=>{let{children:n}=yc({node:e,children:t}),{children:r}=Zc({node:e,children:n}),i={1:Ye,2:Ze,3:et,4:Le,5:He,6:qe}[e.attrs.level];return(0,J.jsx)(i,{element:e,children:r})},Yl=({node:e,children:t})=>(0,J.jsx)(Jt,{element:e,children:t}),Xl=({node:e,children:t})=>{let{node:n}=yc({node:e,children:t}),{node:r}=Zc({node:n,children:t});return(0,J.jsx)(Rt,{element:r,children:t})},Zl=({node:e,children:t})=>(0,J.jsx)(Lt,{element:e,children:t}),Ql=({node:e,children:t})=>(0,J.jsx)($t,{element:e,children:t}),$l=({node:e,children:t})=>(0,J.jsx)(xt,{element:e,children:t}),eu=({children:e,onSuccess:t})=>{let n=Jn(),{t:r}=v(),[i,a]=o(),s=(0,q.useRef)(null),{site:c}=f(`root`),{publication:l}=c,{currentStep:u,nextPage:d,nextStep:p}=C(),{currentModal:m}=B(),[h,g]=(0,q.useState)(!1),[_,y]=(0,q.useState)(!1),b=!!l?.has_subscription_password,x=e=>{e?.dataLayerEvent&&be.pushEvent(e.dataLayerEvent),e?.toast?.message&&A.success(e.toast.message),s.current?.reset(),g(!1),i.get(`modal`)===`login`&&(i.delete(`modal`),a(i)),t?.(),p&&d()},S=n.state===`submitting`;(0,q.useEffect)(()=>
4{if(s.current){let e=s.current.dataset,t={login_with_password_label:r(`login.login_with_password_label`),set_new_password:r(`login.set_new_password`),login_with_email_label:r(`login.login_with_email_label`),login_with_otp_label:r(`login.login_with_otp_label`),resend_otp_button_label:r(`login.resend_otp_button_label`),otp_label:r(`login.otp_label`)};Object.entries(t).forEach(([t,n])=>{e[t]=n})}},[r]);let w=le(u,p),T=(0,q.useMemo)(()=>{if(typeof document>`u`)return;let e=new URLSearchParams(document.location.search);return e.set(`otp`,`true`),m===`login`&&e.set(`modal`,`login`),`${document.location.pathname}?${e.toString()}`},[m]),E=i.get(`after_login_action`),D=i.get(`after_login_action_post_id`),O=`/create_login`,k=`/authenticate/sso_redirect`,j=e=>{let t=e.get(`login_email`);if(!t||!t.trim()){A.error(r(`errors.email_required`));return}if(!An(t.trim())){A.error(r(`errors.email_invalid`));return}e.append(`publication_id`,l.id),e.get(`request_magic_link`)===`true`&&e.set(`login_success_message`,r(`toast.login_link.message`)),e.get(`login_email`)&&e.set(`email`,e.get(`login_email`)),_?n.submit(e,{method:`post`,action:O}):n.submit(e,{method:`post`,action:k})};return(0,J.jsxs)(Nn,{fetcher:n,formRef:s,method:`post`,action:_?O:k,onSubmit:e=>{j(new FormData(e.currentTarget))},onSuccess:e=>{x(e)},onError:e=>{g(!1),A.error(e?.toast?.message||`Something went wrong, please try again`)},children:[(0,J.jsx)(Xn,{value:w}),(0,J.jsx)(`input`,{type:`hidden`,name:`otp_path`,value:T}),(0,J.jsx)(`input`,{type:`hidden`,name:`has_subscription_password`,value:l?.has_subscription_password?`true`:`false`}),E===`like`&&D&&(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`input`,{type:`hidden`,name:`after_login_action`,value:E}),(0,J.jsx)(`input`,{type:`hidden`,name:`after_login_action_post_id`,value:D})]}),(0,J.jsx)(Hn,{name:`login`,errorMessage:`${r(`errors.default`)} ${r(`errors.try_later`)}`,successMessage:r(`login.success.message`)}),e({isLoading:S,canLogInWithPassword:b,isAutoSubmitting:h,setIsAutoSubmitting:g,handleFormSubmit:j,showPasswordField:_,setShowPasswordField:y})]})},tu=({node:e,children:t})=>{let{t:n}=v(),[r]=o(),{handleCloseModal:i,currentModal:a}=B();return(0,J.jsx)(eu,{onSuccess:(0,q.useCallback)(()=>{a===`login`&&i({preventScrollReset:!0})},[a,i]),children:({isLoading:i,canLogInWithPassword:a,isAutoSubmitting:o,setIsAutoSubmitting:s,handleFormSubmit:c,showPasswordField:l,setShowPasswordField:u})=>(0,J.jsx)(Kt,{element:e,isSubmitting:i||o,canLogInWithPassword:a,isAutoSubmitting:o,setIsAutoSubmitting:s,showPasswordField:l,setShowPasswordField:u,onSubmit:c,labels:{login_with_otp_label:n(`login.login_with_otp_label`),login_with_email_label:n(`login.login_with_email_label`),set_new_password:n(`login.set_new_password`),login_with_password_label:n(`login.login_with_password_label`),login_button_label:n(`login.login_button_label`),otp_label:n(`login.otp_label`),resend_otp_button_label:n(`login.resend_otp_button_label`)},searchParams:r,children:t})})},nu=({node:e,children:t})=>{let{handleCloseModal:n,currentModal:r}=B();return(0,J.jsx)(j,{fallback:null,children:()=>(0,J.jsx)(ct,{element:e,isOpen:r===`login`,onOpenChange:e=>{e||n({preventScrollReset:!0})},children:t})})},ru=({node:e,children:t})=>{let{children:n,node:r}=Zc({node:e,children:t}),{children:i}=yc({node:r,children:n});return(0,J.jsx)(it,{element:e,children:i})},iu={all:[`identities`],bySubscriber:e=>[`identities`,e]},au=async e=>{let t=await fetch(`/subscribe/${e}/identities`);if(!t.ok)throw Error(`Failed to fetch identities`);return t.json()},ou=(e,t)=>{let{data:n,isLoading:r}=H({queryKey:iu.bySubscriber(e),queryFn:()=>au(e),enabled:t&&!!e,staleTime:1/0,refetchOnWindowFocus:!1});return{isLoading:r,identities:n??[]}};function su(e,t){let n=new URLSearchParams({subscriber_id:e});return t&&n.set(`redirect_path`,t),`/oauth/spotify/authorize?${n.toString()}`}function cu({showId:e,subscriberId:t}){return`/subscribe/${t}/podcasts/${e}`}function lu({spotifyUrl:e,isPremium:t,spotifyConnected:n,subscriberId:r,redirectPath:i}){return!e?.trim()||!t||!r||n?e:su(r,i)}var uu=({node:e,children:t})=>{let{podcastEpisode:n}=W(),{subscription:r}=f(`root`),i=r?.subscriber_id,{identities:a,isLoading:o}=ou(i??``,!!i),s=a.some(e=>e.provider===`spotify`),c=(0,q.useMemo)(()=>{let e=Na({},Pa(n?.show?.platform_links,{}),U(Pa(n?.platform_links,{}),e=>!!e));if(o)return e;let t=e.spotify,r=lu({spotifyUrl:t,isPremium:n?.show?.is_premium??!1,spotifyConnected:s,subscriberId:i});return!r||r===t?e:{...e,spotify:r}},[n,s,i,o]);return n?.is_premium||!c||Object.values(c).every(e=>!e)?null:(0,J.jsx)(an,{element:{...e,attrs:{...e.attrs,data:{platform_links:c}}},isLive:!0,children:t})},du=({node:e,children:t})=>{let{podcastEpisode:n}=W(),r=n?.transcript;return!Array.isArray(r)||r.length===0?null:(0,J.jsx)(`div`,{className:`max-h-[800px] overflow-y-auto`,children:(0,J.jsx)(Ot,{element:{...e,attrs:{...e.attrs,data:{transcript:r}}},isLive:!0,autoScroll:!1,children:t})})},fu={all:[`post-insights`],byPost:e=>[`post-insights`,e]},pu=e=>e?e.filter(e=>!!(e?.subscription_id||e?.user_id)):[],mu=async e=>
4{let t=await fetch(`/post_insights?post_id=${e}`);if(!t.ok)throw Error(`Failed to fetch post insights`);return t.json()},hu=e=>{let{data:t,isLoading:n}=H({queryKey:fu.byPost(e),queryFn:()=>mu(e),enabled:!!e,staleTime:3e4,placeholderData:I}),r=t?.[0];return{isLoading:n,likes:pu(r?.likes??[]),comment_count:r?.comment_count??0}},gu={all:[`liked-ids`],byPost:e=>[`liked-ids`,e]},_u=async e=>{let t=e?`/liked_ids?post_id=${e}`:`/liked_ids`,n=await fetch(t);if(!n.ok)throw Error(`Failed to fetch liked IDs`);return n.json()},vu=({postId:e,enabled:t=!0}={})=>{let{admin:n}=s(),{subscription:r}=f(`root`),i=!!n||!!r,{data:a,isLoading:o}=H({queryKey:e?gu.byPost(e):gu.all,queryFn:()=>_u(e),enabled:t&&i,staleTime:300*1e3}),c=a?.post_ids??[],l=a?.comment_ids??[];return{isLoading:o,likedPostIds:c,likedCommentIds:l,isPostLiked:(0,q.useCallback)(e=>c.includes(e),[c]),isCommentLiked:(0,q.useCallback)(e=>l.includes(e),[l])}},yu=(e,t,n)=>e.length===0||!t&&!n?!1:e.filter(e=>e.liked).some(e=>e.user_id===t?.id||e.subscription_id===n?.id),bu=({postId:e,likes:t,areLikesFetched:n,admin:r,subscription:i})=>{let{isPostLiked:a}=vu({postId:e}),o=a(e)||n&&yu(t,r,i),s=(0,q.useMemo)(()=>t.filter(e=>e.liked).length,[t]),[c,l]=(0,q.useState)(null);return(0,q.useEffect)(()=>{c!==null&&c.liked===o&&l(null)},[o,c]),{isLiked:c?.liked??o,likesCount:Math.max(0,s+(c?.delta??0)),toggle:()=>{let e=!(c?.liked??o);l({liked:e,delta:e?1:-1})}}},xu=({children:e,likes:t,areLikesFetched:n,postId:r,onSuccess:i})=>{let a=Jn(),o=F(),c=(0,q.useRef)(null),{handleOpenModal:l}=B(),{admin:u}=s(),{subscription:d}=f(`root`),p=!!u,m=!p&&!d,{isLiked:h,likesCount:g,toggle:_}=bu({postId:r,likes:t,areLikesFetched:n,admin:u,subscription:d});return(0,J.jsxs)(Nn,{fetcher:a,formRef:c,method:`post`,action:p?`/admins/post_like`:`/post_like`,onSubmit:e=>{if(e.preventDefault(),m){l(`login`);return}_();let t=new FormData(e.currentTarget);p?a.submit(t,{method:`post`,action:`/admins/post_like`}):a.submit(t,{method:`post`,action:`/post_like`})},onSuccess:()=>{o.invalidateQueries({queryKey:fu.byPost(r)}),i?.()},onError:e=>{A.error(e?.toast?.message||`Something went wrong, please try again`)},children:[(0,J.jsx)(`input`,{type:`hidden`,name:`post_id`,value:r}),(0,J.jsx)(`input`,{type:`hidden`,name:`subscription_id`,value:d?.id}),(0,J.jsx)(`input`,{type:`hidden`,name:`user_id`,value:u?.id}),e({isLoading:a.state===`submitting`,isLiked:h,likesCount:g})]})},Su=({delay:e=200,enabled:t=!0})=>{let[n,r]=(0,q.useState)(!1);if((0,q.useEffect)(()=>{if(!t)return;let n,i=()=>{r(!0),clearTimeout(n),n=setTimeout(()=>{r(!1)},e)};if(typeof window<`u`)return window.addEventListener(`scroll`,i),()=>{window.removeEventListener(`scroll`,i),clearTimeout(n)}},[t,e]),typeof window<`u`){let e=window.document.body.scrollHeight>window.innerHeight;return{isScrolling:n,hasVerticalScrolling:e,canScrollVertically:e&&window.scrollY+window.innerHeight+10<window.document.body.scrollHeight}}return{isScrolling:n,hasVerticalScrolling:!1,canScrollVertically:!1}},Cu=({node:e,children:t})=>{let{t:n}=v(),{post:r}=on(),i=hu(r.id),{canShowCommentsNode:a,showMeteredUsageBanner:o,showPaywallAndHidePostContent:s}=Se()||{canShowCommentsNode:!1,showMeteredUsageBanner:!1,showPaywallAndHidePostContent:!1},c=u(),d=l(),{canScrollVertically:f,hasVerticalScrolling:p}=Su({delay:500}),[m,h]=(0,q.useState)(0);(0,q.useEffect)(()=>{if(!o){h(0);return}let e=document.getElementById(`metered-paywall-usage-banner`);if(!e){h(0);return}let t=new ResizeObserver(t=>{let n=t[0];n&&h(Math.ceil(n.borderBoxSize[0]?.blockSize??n.contentRect.height)-(Number.parseFloat(getComputedStyle(e).borderTopWidth)||0))});return t.observe(e),()=>t.disconnect()},[o]);let g=()=>{try{if(typeof document<`u`){let e=document.querySelector(`#comments`);if(e){e.scrollIntoView({behavior:`smooth`});return}}}catch{}c(`${d.pathname}#comments`)},_=()=>{c(`/`)},y=typeof document<`u`?document.location.href:`#`;return e?.attrs?.isEnabled===!1||s?null:(0,J.jsx)(`div`,{className:(0,Y.default)(`fixed z-30 w-full transition-transform`,p&&!f?`translate-y-full`:`translate-y-0`),style:{bottom:m},children:(0,J.jsx)(xu,{areLikesFetched:!i.isLoading,likes:i.likes,postId:r.id,children:({isLiked:o,likesCount:s})=>(0,J.jsx)(Go,{element:{...e,attrs:{...e.attrs,borderBottomWidth:`0`,data:{commentsCount:i.comment_count,likesCount:s,isLiked:o,share:{url:y,title:r.web_title,de
4scription:r.web_subtitle||``}}}},onCommentClick:g,onBackClick:_,showCommentsButton:a,isLive:!0,translations:{"search.pagination.back":n(`search.pagination.back`),"search.pagination.like":n(`search.pagination.like`),"search.pagination.comment":n(`search.pagination.comment`),"search.pagination.share":n(`search.pagination.share`)},children:t})})})},wu=({firstName:e,lastName:t,avatarUrl:n,onSuccess:r})=>{let i=p(),a=i.data,o=i.state===`submitting`,s=a?.toast?.status===`success`,{t:c}=v(),{site:l}=f(`root`),u=(0,q.useRef)(null),[d,m]=(0,q.useState)(null);return(0,q.useEffect)(()=>()=>{d&&URL.revokeObjectURL(d)},[d]),(0,q.useEffect)(()=>{s&&r&&r()},[s,r]),Un(a?.toast),(0,J.jsx)(i.Form,{method:`patch`,action:`/profile`,onSubmit:e=>{if(!u.current)return;e.preventDefault();let t=new FormData(e.currentTarget);t.append(`avatar`,u.current),i.submit(t,{method:`PATCH`,action:`/profile`,encType:`multipart/form-data`})},className:`relative`,children:(0,J.jsxs)(`div`,{className:`space-y-6`,children:[(0,J.jsxs)(`div`,{className:`space-y-3`,children:[(0,J.jsx)(`div`,{className:`flex justify-center`,children:(0,J.jsx)(tt,{currentImageUrl:d||n,onFileSelect:e=>{u.current=e,d&&URL.revokeObjectURL(d),m(URL.createObjectURL(e))},shape:`circle`,size:80,isLoading:o})}),(0,J.jsx)(Zn,{name:`first_name`,autoComplete:`given-name`,label:`${c(`manage.personal_details_form.first_name`)}`,placeholder:`${c(`manage.personal_details_form.first_name`)}`,defaultValue:e,textColor:l.primary_theme.text_on_background_color}),(0,J.jsx)(Zn,{name:`last_name`,autoComplete:`family-name`,label:`${c(`manage.personal_details_form.last_name`)}`,placeholder:`${c(`manage.personal_details_form.last_name`)}`,defaultValue:t,textColor:l.primary_theme.text_on_background_color}),(0,J.jsx)(Hn,{name:`profile`,errorMessage:c(`errors.default`),successMessage:c(`toast.success`)})]}),(0,J.jsx)(`div`,{className:`flex justify-end`,children:(0,J.jsx)(z,{type:`submit`,variant:`primary`,style:{color:l.primary_theme.text_on_primary_color,backgroundColor:l.primary_theme.primary_color},children:o?`${c(`shared.actions.submitting`)}...`:c(`shared.cta.submit`)})})]})})},Tu=({children:e,onCommentCreated:t,isNotLoggedIn:n,isPremiumCommentsOnly:r=!1})=>{let{subscription:i,site:a}=f(`root`),{post:o}=on(),{t:c}=v(),d=u(),m=l(),{admin:h}=s(),{handleOpenModal:g}=B(),[_,y]=(0,q.useState)(!1),[b,x]=(0,q.useState)(null),S=(0,q.useRef)(null),[C,w]=(0,q.useState)(``),[T,E]=(0,q.useState)(null),D=p(),O=D.state===`submitting`,k=D.data,A=k?.toast?.status===`error`;Un(k?.toast);let j=!!h,M=i?.tier!==`premium`&&r&&!j,N=!i?.comment_details_set&&!j;(0,q.useEffect)(()=>{if(k&&!A&&t){let e=(S.current?new FormData(S.current):null)?.get(`comment_id`);typeof e==`string`?t(k,e):t(k),S.current?.reset(),w(``),E(null)}},[k,A]);let P=j?`/admins/comments`:`/comments`,F=e=>{let t=new FormData(e.currentTarget);return n?(e.preventDefault(),g(`login`,{preventScrollReset:!0}),!1):N||M?(e.preventDefault(),y(!0),x(t),!1):!0},I=async()=>{b&&D.submit(b,{method:`POST`,action:P}),x(null),y(!1)},L=()=>{x(null),y(!1)};return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(ne,{title:c(`comments.commenting.profile_title`)||``,description:(0,J.jsx)(`div`,{children:(0,J.jsx)(`p`,{children:c(`comments.commenting.profile_description`)})}),isOpen:N&&_,onClose:L,backgroundColor:a.primary_theme.background_color,textColor:a.primary_theme.text_on_background_color,closeButtonBackgroundColor:a.primary_theme.background_color,closeButtonTextColor:a.primary_theme.text_on_background_color,children:(0,J.jsx)(wu,{firstName:i?.first_name,lastName:i?.last_name,avatarUrl:i?.avatar_url,onSuccess:I})}),(0,J.jsx)(ne,{title:`${c(`comments.upgrade.title`)}`,description:(0,J.jsx)(`div`,{children:(0,J.jsx)(`p`,{children:c(`comments.upgrade.description`)})}),isOpen:M&&_,onClose:L,backgroundColor:a.primary_theme.background_color,textColor:a.primary_theme.text_on_background_color,closeButtonBackgroundColor:a.primary_theme.background_color,closeButtonTextColor:a.primary_theme.text_on_background_color,children:(0,J.jsx)(z,{type:`button`,variant:`primary`,className:`flex w-full justify-center`,isLoading:O,onClick:()=>d(`/upgrade?post_url=${m.pathname}`),style:{color:a.primary_theme.text_on_primary_color,backgroundColor:a.primary_theme.primary_color},children:c(`comments.upgrade.cta`)})}),(0,J.jsxs)(D.Form,{ref:S,method:`post`,action:P,className:`contents`,onSubmit:F,children:[o&&(0,J.jsx)(`input`,{type:`hidden`,name:`post_id`,value:o.id}),i?.id&&(0,J.jsx)(`input`,{type:`hidden`,name:`subscription_id`,value:i.id}),h?.id&&(0,J.jsx)(`input`,{type:`hidden`,name:`user_id`,value:h.id}),(0,J.jsx)(`input`,{value:C,name:`content`,type:`hidden`}),(0,J.jsx)(Hn,{name:`characters`,errorMessage:c(`comments.commenting.characters_error`),successMessage:``}),(0,J.jsx)(Hn,{name:`comment`,errorMessage:c(`errors.default`),successMessage:``}),e(O,w,T,E)]})]})},Eu=({to:e,avatarUrls:t})=>{let{t:n}=v();return(0,J.jsxs)(m,{to:e,className:`mx-auto mt-6 flex w-fit items-center gap-3 rounded-full bg-community-primary px-6 py-3.5 text-community-text-on-primary shadow-community-button transition-opacity hover:opacity-90`,children:[t.length>
40&&(0,J.jsx)(`span`,{"aria-hidden":`true`,className:`flex -space-x-2`,children:t.map(e=>(0,J.jsx)(er,{src:e,alt:``,className:`size-6 border-2 border-white/70 bg-white/20`},e))}),(0,J.jsxs)(`span`,{className:`text-sm font-semibold leading-5`,children:[n(`community.post_page_comments.continue_cta`),(0,J.jsx)(`span`,{"aria-hidden":`true`,children:` →`})]})]})},Du=({data:e})=>{let{t}=v(),{currentModal:n,handleOpenModal:r,handleCloseModal:i}=B(),a=f(`root`),o=e.member!=null,s={name:e.community_name,description:null},c=$n(s),l={currentMember:e.member},u=()=>r(`community_join`,{preventScrollReset:!0}),d=a?.publication?.web_theme,p=(0,q.useMemo)(()=>`:root {
5  --community-primary: var(--wt-primary-color);
6  --community-primary-rgb: ${nr(d?.primary_color??`#030712`)};
7  --community-text-on-primary: var(--wt-text-on-primary-color);
8  --community-bg: var(--wt-background-color);
9  --community-text-on-bg: var(--wt-text-on-background-color);
10  --community-text-on-bg-rgb: ${nr(d?.text_on_background_color??`#030712`)};
11}`,[d]),m={isLoggedIn:!!a?.isLoggedIn,publicationName:a?.publication?.name??`Community`,community:s,publicationId:a?.publication?.id,publicationLogoUrl:a?.publication?.logo?.url,redirectTo:a?.currentPath??`/`};return(0,J.jsxs)(V.Provider,{value:l,children:[(0,J.jsx)(`style`,{dangerouslySetInnerHTML:{__html:p}}),(0,J.jsxs)(`section`,{id:`comments`,className:`mx-auto w-full max-w-2xl px-4 py-8 text-left`,children:[(0,J.jsx)(`h2`,{className:`mb-4 text-xl font-semibold`,children:t(`comments.header`)}),e.viewer_can_access?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(ce,{children:(0,J.jsx)(xn,{postId:e.community_post_id,commentsState:e.comments_state,onRequireMembership:u})}),(0,J.jsx)(Eu,{to:`/community/posts/${e.community_post_id}`,avatarUrls:e.preview_member_avatar_urls})]}):(0,J.jsxs)(`div`,{className:`flex flex-col items-center rounded-3xl border border-black/10 bg-black/5 px-6 py-10 text-center`,children:[(0,J.jsx)(`div`,{className:`flex size-12 items-center justify-center rounded-full bg-black/5`,children:(0,J.jsx)(ee,{"aria-hidden":`true`,className:`size-5 text-black/60`})}),(0,J.jsx)(`h3`,{className:`mt-4 text-lg font-semibold`,children:t(`community.post_page_comments.locked_title`)}),(0,J.jsx)(`p`,{className:`mt-2 max-w-md text-sm text-black/60`,children:o?t(`community.post_page_comments.locked_member_description`):t(`community.post_page_comments.locked_guest_description`,{communityName:c})}),o?(0,J.jsx)(tr,{to:bn(e.first_premium_offer_id),variant:`primary`,className:`mt-6`,children:t(`community.paid_gate.cta`)}):(0,J.jsx)(Qn,{variant:`primary`,className:`mt-6`,onClick:u,children:t(`community.join.cta`)})]})]}),(0,J.jsx)(ue,{mode:`join`,isOpen:n===`community_join`,onClose:()=>i({preventScrollReset:!0}),onSwitchMode:()=>r(`community_login`,{preventScrollReset:!0}),...m}),(0,J.jsx)(ue,{mode:`login`,isOpen:n===`community_login`,onClose:()=>i({preventScrollReset:!0}),onSwitchMode:()=>r(`community_join`,{preventScrollReset:!0}),...m})]})},Ou=({onSuccess:e}={})=>{let{t}=v(),n=p(),[r,i]=(0,q.useState)(null),a=(0,q.useRef)(e);a.current=e;let o=n.state===`submitting`;Un(n.data?.toast),(0,q.useEffect)(()=>{n.state===`idle`&&n.data?.toast?.status===`success`&&a.current?.(),n.state===`idle`&&n.data?.toast?.status===`error`&&r&&(URL.revokeObjectURL(r),i(null))},[n.state,n.data,r]);let s=(0,q.useCallback)(e=>{r&&URL.revokeObjectURL(r),i(URL.createObjectURL(e));let a=new FormData;a.append(`avatar`,e),a.append(`profile_success_message`,t(`toast.success`)),a.append(`profile_error_message`,t(`errors.default`)),n.submit(a,{method:`PATCH`,action:`/profile`,encType:`multipart/form-data`})},[n,r,t]);return(0,q.useEffect)(()=>()=>{r&&URL.revokeObjectURL(r)},[r]),{uploadAvatar:s,isUploading:o,optimisticAvatarUrl:r||null}},ku=(e,t,n)=>e.map(e=>e.id===n?{...e,sub_comments:Array.isArray(e.sub_comments)?[{...t},...e.sub_comments]:[{...t}]}:(e.sub_comments=ku(e.sub_comments||[],t,n),e)),Au=(e,t)=>e.map(e=>e.id===t?{...e,deleted_by_commenter_at:new Date().toISOString()}:(e.sub_comments=Au(e.sub_comments||[],t),e)),ju=(e,t,n)=>e.map(e=>e.id===t?{...e,content:n,updated_at:new Date().toISOString()}:(e.sub_comments=ju(e.sub_comments||[],t,n),e)),Mu=({postId:e,commentId:t,order:n,enabled:r=!0})=>{let[i,a]=(0,q.useState)(n),o=l(),s=R(),[c,u]=(0,q.useState)(!1),[d,f]=(0,q.useState)([]),[p,m]=(0,q.useState)({page:1,added:!1}),h=s.data?.pagination?.page||1,g=s.data?.pagination.total||0,_=h*(s.data?.pagination.per_page||10),v=h+1,y=_<g,b=()=>{f([]),u(!1),m({page:1,added:!1})};return(0,q.useEffect)(()=>{f([])},[o.pathname]),(0,q.useEffect)(()=>
11{if(r&&p.page===1&&!p.added){let n=new URLSearchParams;n.append(`post_id`,e),t&&n.append(`comment_id`,t),i&&n.append(`order`,i),s.load(`/paginated_comments?${n.toString()}`)}},[o,p,r]),(0,q.useEffect)(()=>{s.data&&(p.page===s.data.pagination.page&&!p.added&&(f([...d,...s.data.comments]),m({page:p.page,added:!0})),c||u(!0))},[s.data]),{initialFetched:c,comments:d,optimisticallyRenderNewComment:(e,t)=>{f(t?ku(d,e,t):[e,...d])},optimisticallyDeleteTopLevelComment:e=>{let t=d.find(t=>t.id===e);if(!t)return;let n={...t,deleted_by_commenter_at:new Date().toISOString()};f(d.map(t=>t.id===e?n:t))},optimisticallyDeleteSubComment:e=>{f(Au(d,e))},optimisticallyUpdateComment:(e,t)=>{f(ju(d,e,t))},reorderComments:e=>{a(e),b()},commentOrder:i,itemsRemaining:s.data?.items_remaining??0,isLoadingMore:c&&s.state===`loading`,remainingCount:g-_,hasNextPage:y,loadMore:()=>{let r=new URLSearchParams;r.append(`post_id`,e),r.append(`page`,v.toString()),t&&r.append(`comment_id`,t),n&&r.append(`order`,n),m({page:v,added:!1}),s.load(`/paginated_comments?${r.toString()}`)}}},Nu=function(e){return e.DEFAULT=`default`,e.PREMIUM=`premium`,e.DISABLED=`disabled`,e.LOCKED=`locked`,e}({}),Pu=({postId:e,commentId:t,commenterId:n,subscriptionId:r,onDelete:i,userId:a,isLoggedInAsAdmin:o=!1,buttonBackgroundColor:s,buttonTextColor:c})=>{let{t:l}=v(),u=(0,q.useRef)(null),d=p(),f=d.state===`submitting`,m=d.data;Un(m?.toast),(0,q.useEffect)(()=>{m?.toast&&i()},[m?.toast,i]);let h=o&&n!==a,g=l(h?`comments.removing.remove`:`comments.deleting.delete`),_=l(h?`comments.removing.removing`:`comments.deleting.deleting`);return(0,J.jsx)(`div`,{className:`flex items-start space-x-4`,children:(0,J.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,J.jsxs)(d.Form,{ref:u,method:`post`,action:o?`/admins/delete_comment`:`/delete_comment`,className:`relative`,children:[(0,J.jsx)(`label`,{htmlFor:`comment`,className:`sr-only`,children:l(`comments.deleting.delete_comment`)}),(0,J.jsx)(`input`,{type:`hidden`,name:`post_id`,value:e}),(0,J.jsx)(`input`,{type:`hidden`,name:`comment_id`,value:t}),(0,J.jsx)(`input`,{type:`hidden`,name:`subscription_id`,value:r}),(0,J.jsx)(`input`,{type:`hidden`,name:`user_id`,value:a}),(0,J.jsx)(Hn,{name:`delete_comment`,errorMessage:l(`errors.default`),successMessage:l(`comments.deleting.deleted`)}),(0,J.jsx)(`div`,{className:`flex justify-end pr-1`,children:(0,J.jsx)(z,{type:`submit`,btnSize:`md`,disabled:f,style:{backgroundColor:s,color:c},children:f?_:g})})]})})})},Fu=({postId:e,commentId:t,subscriptionId:n,onReport:r,textareaTextColor:i,buttonBackgroundColor:a,buttonTextColor:o})=>{let{t:s}=v(),c=p(),l=c.state===`submitting`,u=c.data;Un(u?.toast),(0,q.useEffect)(()=>{u?.toast&&r()},[u?.toast,r]);let d=s(`comments.reporting.report`),f=`${s(`comments.reporting.reporting`)}...`;return(0,J.jsx)(`div`,{className:`flex items-start space-x-4`,children:(0,J.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,J.jsxs)(c.Form,{method:`post`,action:`/comment_report`,className:`relative`,children:[(0,J.jsxs)(`div`,{className:`overflow-hidden rounded-wt border border-gray-300 shadow-sm focus-within:border-wt-primary focus-within:ring-1 focus-within:ring-wt-primary`,children:[(0,J.jsx)(`label`,{htmlFor:`comment`,className:`sr-only`,children:s(`comments.reporting.file_report`)}),(0,J.jsx)(`textarea`,{rows:2,name:`reason`,id:`reason`,required:!0,className:`block w-full resize-none border-0 bg-transparent py-3 text-sm focus:ring-0`,placeholder:s(`comments.reporting.report_action_placeholder`)||``,defaultValue:``,style:{color:i}}),(0,J.jsx)(`input`,{type:`hidden`,name:`post_id`,value:e}),(0,J.jsx)(`input`,{type:`hidden`,name:`comment_id`,value:t}),(0,J.jsx)(`input`,{type:`hidden`,name:`subscription_id`,value:n}),(0,J.jsx)(Hn,{name:`comment_report`,errorMessage:s(`errors.default`),successMessage:s(`comments.reporting.reported`)}),(0,J.jsx)(`div`,{className:`py-2`,"aria-hidden":`true`,children:(0,J.jsx)(`div`,{className:`py-px`,children:(0,J.jsx)(`div`,{className:`h-9`})})})]}),(0,J.jsxs)(`div`,{className:`absolute inset-x-0 bottom-0 flex justify-between py-2 pl-3 pr-2`,children:[(0,J.jsx)(`div`,{className:`flex items-center space-x-5`}),(0,J.jsx)(`div`,{className:`flex-shrink-0 pr-1`,children:(0,J.jsx)(z,{type:`submit`,btnSize:`md`,disabled:l,style:{backgroundColor:a,color:o},children:l?f:d})})]})]})})})},Iu=[{label:`Newest first`,value:`desc`},{label:`Oldest first`,value:`asc`},{label:`Most popular`,value:`popular`}],Lu=e=>e===null?null:e===0?0:(e??60)*60*1e3,Ru=(e,t)=>t===null?!0:t===0?!1:Date.now()-new Date(e).getTime()<t,zu=(e,t,n,r=3600*1e3,i=()=>!1)=>{let a=String(t?.id??n?.id??``);return e.map(e=>{let o=String(e.commenter_id)===a&&(e.is_moderator_comment||Ru(e.created_at,r));return{...e,sub_comments:zu(e.sub_comments||[],t,n,r,i),is_liked:i(e.id),can_delete:e.commenter_id===n?.id,can_edit:o}})},Bu=e=>e.filter(e=>e.deleted_by_commenter_at?!1:(e.sub_comments=Bu(e.sub_comments||[]),!0)),Vu=({message:e})=>(0,J.jsx)(`div`,{className:`flex max-w-2xl flex-col space-y-2 py-8`,children:(0,J.jsx)(O,{as:`p`,type:`body`,size:`md`,className:`text-center leading-tight tracking-normal`,children:e})}),Hu=({node:e,children:t})=>{let{showNativeComments:n,showCommunityComments:r,communityComments:i}=Se()||{showNativeComments:!1,showCommunityComments:!1,communityComments:null},{t:a}=v(),{handleOpenModal:c}=B(),[l,u]=(0,q.useState)(null),[d,m]=(0,q.useState)(null),[h,g]=(0,q.useState)(null),_=p(),y=(0,q.useRef)(null),b=_.state===`submitting`,x=_.data;Un(x?.toast);let{admin:S}=s(),{subscription:C,site:w}=f(`root`),{post:T,onlyRenderComments:D}=on(),O=T?.id,{isCommentLiked:k}
11=vu({postId:O,enabled:n});(0,q.useEffect)(()=>{g(null)},[O]);let[,A]=o(),j=w?.viewable_site_version?.settings?.comments_ordering,{initialFetched:M,comments:N,optimisticallyRenderNewComment:P,optimisticallyDeleteTopLevelComment:F,optimisticallyDeleteSubComment:I,optimisticallyUpdateComment:L,commentOrder:R,reorderComments:ee,loadMore:z,isLoadingMore:V,remainingCount:H,hasNextPage:te}=Mu({postId:T?.id||``,enabled:n,order:j}),U=!!C,W=!!S,re=!W&&!U,ie=C?.avatar_url,{uploadAvatar:ae,isUploading:oe,optimisticAvatarUrl:se}=Ou(),ce=se||ie,le=!N?.length,ue=!!C?.comment_post_bans?.includes(T?.id),de=!!C?.comment_publication_ban||ue,fe=T?.comments_state===Nu.LOCKED||de,pe=T?.comments_state===Nu.PREMIUM,me=!C?.comment_details_set&&!W,he=!fe&&!me,ge=!fe||W,_e=w?.viewable_site_version?.settings?.comment_edit_window,ve=Lu(_e),ye=(0,q.useMemo)(()=>M?zu(Bu(N),S,C,ve,k):[],[S,N,C,M,ve,k]),be=(e,t)=>{P(e,t)},xe=async e=>re?(c(`login`,{preventScrollReset:!0}),!1):!T||!C?(toast.error(`Something went wrong, please try again!`),!1):(e.append(`post_id`,T.id),e.append(`subscription_id`,String(C.id)),S&&e.append(`user_id`,String(S.id)),W?await fetch(`/admins/comment_like`,{method:`POST`,body:e}):await fetch(`/comment_like`,{method:`POST`,body:e}),!0),Ce=(e,t)=>{if(e===`edit`){g(t.id);return}u(e),m(t)},we=x&&x.toast?.status!==`error`;(0,q.useEffect)(()=>{if(!we||!y.current)return;let{commentId:e,newContent:t}=y.current;L(e,t),g(null),y.current=null},[we,L]);let Te=(e,t)=>{let n=new FormData;n.append(`comment_id`,e),n.append(`content`,t),n.append(`post_id`,T.id),n.append(`edit_comment_success_message`,a(`comments.editing.edit_comment_success`)),n.append(`edit_comment_error_message`,a(`comments.editing.edit_comment_error`)),n.append(`characters_error_message`,a(`comments.commenting.characters_error`)),y.current={commentId:e,newContent:t};let r=W?`/admins/edit_comment`:`/edit_comment`;W&&S?n.append(`user_id`,S.id):C&&n.append(`subscription_id`,String(C.id)),_.submit(n,{method:`post`,action:r})},Ee=()=>{g(null)},De=()=>{c(`login`,{preventScrollReset:!0})},Oe=()=>{c(`signup`,{preventScrollReset:!0})};return r&&i?(0,J.jsx)(Du,{data:i}):n?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(ne,{title:l===`delete`?`Delete Comment`:`Report a comment`,description:l===`delete`?`Are you sure you want to delete the comment?`:`Share with a moderator your concerns about the comment you are reporting`,isOpen:!!d,onClose:()=>{m(null),u(null)},backgroundColor:w.publication.web_theme.background_color,textColor:w.publication.web_theme.text_on_background_color,closeButtonBackgroundColor:w.publication.web_theme.secondary_color,closeButtonTextColor:w.publication.web_theme.text_on_secondary_color,children:(0,J.jsxs)(J.Fragment,{children:[l===`delete`&&(0,J.jsx)(Pu,{postId:T.id,commentId:d?.id,commenterId:d?.commenter_id,subscriptionId:C?.id,userId:S?.id,isLoggedInAsAdmin:W,buttonBackgroundColor:w.publication.web_theme.primary_color,buttonTextColor:w.publication.web_theme.text_on_primary_color,onDelete:()=>{d&&(d.depth_level===1?F(d.id):I(d.id),m(null),u(null))}}),l===`report`&&(0,J.jsx)(Fu,{postId:T.id,commentId:d?.id,subscriptionId:C?.id,onReport:()=>{m(null),u(null)},textareaTextColor:w.publication.web_theme.primary_color,buttonBackgroundColor:w.publication.web_theme.primary_color,buttonTextColor:w.publication.web_theme.text_on_primary_color})]})}),(0,J.jsx)(E,{fallbackRender:e=>(0,J.jsx)(Vu,{message:e.error.message}),children:(0,J.jsx)(Tu,{isPremiumCommentsOnly:pe,onCommentCreated:be,isNotLoggedIn:re,children:(n,r,i,o)=>(0,J.jsx)(st,{id:`comments`,isLive:!0,isSubmitting:n,element:{...e,attrs:{...e.attrs,data:{comments:ye}}},onReorderComments:e=>ee(e),commentsOrderOptions:Iu,commentOrder:R||j,showBackToPost:D,onBackToPost:()=>A({}),postTitle:T.web_title,onLoadMoreComments:z,isLoadingMoreComments:V,showLoadMore:M&&te&&!le,remainingCommentsCount:H,canComment:ge,areCommentsLoading:!M,showActions:he||W,onClickAction:Ce,onClickLike:xe,onClickLogin:De,onClickSubscribe:Oe,setCurrentComment:r,replyingToCommentId:i,setReplyingToCommentId:o,isVisitorLoggedIn:!re,isLoggedInAsAdmin:W,commenterId:C?.id,editingCommentId:h,onEditComment:Te,onCancelEdit:Ee,isEditSubmitting:b,translations:{"comments.count.singular":a(`comments.count.singular`,{count:1}
11),"comments.count.plural":a(`comments.count.plural`,{count:ye.length||0}),"shared.cta.cancel":a(`shared.cta.cancel`),"shared.cta.login":a(`shared.cta.login`),"shared.cta.subscribe":a(`shared.cta.subscribe`),"shared.cta.or":a(`shared.cta.or`),"shared.cta.to_participate":a(`shared.cta.to_participate`),"comments.like":a(`comments.like`),"comments.replying.reply":a(`comments.replying.reply`),"comments.editing.edit":a(`comments.editing.edit`),"comments.editing.save":a(`comments.editing.save`),"comments.editing.saving":a(`comments.editing.saving`),"comments.editing.edited":a(`comments.editing.edited`),"author.author":a(`author.author`)},avatarUrl:ce,onAvatarUpload:ae,isAvatarUploading:oe,canUploadAvatar:U&&!W,children:t})})})]}):null},Uu=({onSuccess:e})=>{let t=R(),n=t.state===`submitting`,{handleOpenModal:r}=B(),{admin:i}=s(),{subscription:a,isLoggedIn:o}=f(`root`),{hasLikedPostsDataFetched:c,hasPostInsightsDataFetched:l}=h(),u=!!i,d=!u&&!o,p=async(e,n,r)=>{let i=new FormData;i.set(`post_id`,e),r?(i.set(`user_id`,r),await t.submit(i,{method:`post`,action:`/admins/post_like`})):n&&(i.set(`subscription_id`,n),await t.submit(i,{method:`post`,action:`/post_like`}))},m=e=>{if(!(!e||!c||!l)){if(d){r(`login`,{preventScrollReset:!0},{after_login_action_post_id:e,after_login_action:`like`});return}p(e,String(a?.id),u?i?.id:void 0)}},g=t.data,_=g?.ok===!0;return(0,q.useEffect)(()=>{_&&g.post_id&&e?.(g.post_id)},[_,g]),{isLoading:n,mutateLikes:m,submitLike:p}},Wu=async e=>fetch(`/post_insights_v2`,{method:`POST`,body:JSON.stringify({post_ids:e.join(`,`)}),headers:{"Sec-Fetch-Dest":`empty`}}),Gu=()=>{let{postsInsights:e,likedPosts:t,hasLikedPostsDataFetched:n,hasPostInsightsDataFetched:r}=h(),{postsInsights:i,setPostsInsights:a}=Dn(),[o,s]=(0,q.useState)(!1);return(0,q.useEffect)(()=>{if(r&&n){let n={...i,...e};t.forEach(e=>{n[e]&&(n[e].isLiked=!0)}),a(n)}},[r,n,t,e]),{getPostInsights:async e=>{let n=e.filter(e=>!i[e]);if(n.length>0&&!o){s(!0);try{let e=await Wu(n);if(e.ok){let n=await e.json();if(`posts`in n){let e={...n.posts};t.forEach(t=>{e[t]&&(e[t].isLiked=!0)}),a({...i,...e})}}}catch{}finally{s(!1)}}},postsInsights:i,likedPosts:t,updatePostLikeCount:e=>{if(!i[e])return;let t={...i[e]};t.likes=t.isLiked?t.likes-1:t.likes+1,t.isLiked=!t.isLiked,a({...i,[e]:{...i[e],...t}})}}},Ku=(e,t=!0)=>{let n=R();return(0,q.useEffect)(()=>{e&&t&&n.load(`/recommended_posts?post_id=${e}`)},[e]),n?.data?.recommendedPosts||[]},qu=({query:e,page:t,perPage:n,selectedTagFilters:r,categoryTags:i,contentTagsMatch:a,audience:o,authorIds:s})=>{let c=new URLSearchParams;e?.trim()&&c.append(`q`,e),c.append(`page`,t.toString()),c.append(`per_page`,(typeof n==`number`&&n>0?n:5).toString());let l=r.length>0?r:i;if(l.length>0)for(let e of l)c.append(`content_tags`,e);if(a===`all`&&c.append(`content_tags_match`,`all`),o&&o!==`all`&&c.append(`audience`,o),s&&s.length>0)for(let e of s)c.append(`author_ids[]`,e);return c},Ju=(e,t)=>{if(!e||e<=0)return 1;if(!t||t<=0)return e;let n=e+t;return Number.isNaN(n)?e:n},Yu=e=>e.map(e=>({id:e.id,web_title:e.web_title,web_subtitle:e.web_subtitle,comments_state:e.comments_state,override_scheduled_at:e.override_scheduled_at,audience:e.audience,slug:e.slug,content_tags:e.content_tags,image_url:e.image_url,authors:e.authors,hide_from_feed:e?.hide_from_feed,scheduled_at:e?.scheduled_at,is_premium:e?.is_premium,estimated_reading_time:e?.estimated_reading_time,estimated_reading_time_display:e?.estimated_reading_time_display})),Xu=({defaultPosts:e=[],pagination:t,shouldSendPaginationParams:n=!0,enabled:r=!0,postGroupType:i,hasFakeData:a,tags:o=[],onPageFetchSuccess:s,pagesSkippedByOffset:c,audience:l,blockId:u,authorIds:d})=>{let f=p({key:u?`posts-${u}`:void 0}),m=f?.data,h=m?.pagination,[g,_]=(0,q.useState)(!1),[v,y]=(0,q.useState)(null),[b,x]=(0,q.useState)(null),[S,C]=(0,q.useState)([]),[w,T]=(0,q.useState)(`any`),[E,D]=(0,q.useState)(e),[O,k]=(0,q.useState)((h?h.page:t?.page)||0),[A,j]=(0,q.useState)((h?h.total_pages:t?.total_pages)||0),[M,N]=(0,q.useState)(h?h.per_page:t?.per_page),P=(0,q.useRef)(t?.per_page),F=(0,q.useCallback)(e=>{C(e);let t=e.length<2?`any`:w;T(t),k(0),x(`go_to_page`);let n=qu({query:v,page:1,perPage:M,selectedTagFilters:e,categoryTags:o,contentTagsMatch:t,audie
11nce:l,authorIds:d});f.load(`/posts?${n.toString()}`)},[f,M,v,o,w,l,d]),I=(0,q.useCallback)(e=>{T(e),k(0),x(`go_to_page`);let t=qu({query:v,page:1,perPage:M,selectedTagFilters:S,categoryTags:o,contentTagsMatch:e,audience:l,authorIds:d});f.load(`/posts?${t.toString()}`)},[f,M,v,o,S,l,d]),L=(0,q.useCallback)((e,t)=>{if(!r)return;let i=t?.page??O,a=t?.perPage??M??P.current,s=`/posts?${qu({query:e,page:n&&i>0?i:0,perPage:n?a:void 0,selectedTagFilters:S,categoryTags:o,contentTagsMatch:w,audience:l,authorIds:d}).toString()}`;f.load(s)},[f,O,M,n,r,S,o,w,l,d]),R=(0,q.useCallback)(e=>{if(!r)return;x(`load_more`);let t=qu({query:e,page:O+1,perPage:M,selectedTagFilters:S,categoryTags:o,contentTagsMatch:w,audience:l,authorIds:d});f.load(`/posts?${t.toString()}`)},[O,f,M,r,S,o,w,l,d]),ee=(0,q.useCallback)((e,t)=>{if(!r)return;x(`go_to_page`);let n=qu({query:t,page:Ju(e,c||0),perPage:M,selectedTagFilters:S,categoryTags:o,contentTagsMatch:w,audience:l,authorIds:d});f.load(`/posts?${n.toString()}`)},[f,M,r,S,o,c,w,l,d]),z=(0,q.useCallback)(()=>{_(!1),k(t?.page||0),j(t?.total_pages||0),N(t?.per_page||0),D(e),C([]),T(`any`)},[t,e]),B=(0,q.useCallback)(e=>{setTimeout(()=>{y(e)},100)},[y]),V=(0,q.useCallback)(e=>{_(!0),k(0),j(0),D([])},[_,k,j,D]);return(0,q.useEffect)(()=>{a||i!==`tag_page`&&i!==`author_page`&&i!==`archive`||(typeof v==`string`&&v.trim()&&L(v),typeof v==`string`&&!v.trim()&&z())},[a,v]),(0,q.useEffect)(()=>{if(!m)return;let e=m?.pagination?.page,t=Yu(m?.posts||[]);b===`go_to_page`?(D(t),k(e||1),N(m?.pagination?.per_page),j(m?.pagination?.total_pages),_(!1),x(null),s?.((m?.posts||[]).map(e=>e.id))):(b===`load_more`||O===0)&&(D(E.concat(t)),k(e||O+1),N(m?.pagination?.per_page),j(m?.pagination?.total_pages),_(!1),x(null),s?.((m?.posts||[]).map(e=>e.id)))},[m]),{posts:E,showLoadMore:O+1<=A,isLoading:f?.state!==`idle`,postsFetcher:f,fetchPosts:L,loadMorePosts:R,goToPage:ee,currentPage:O,setCurrentPage:k,setTotalPages:j,setPerPage:N,setPosts:D,isSearching:g,setIsSearching:_,resetSearchState:z,handleDebouncedSearchQuery:B,handleNonDebouncedSearchQuery:V,searchQuery:v,setSearchQuery:y,selectedTagFilters:S,handleTagFilterChange:F,contentTagsMatch:w,handleContentTagsMatchChange:I}},Zu=e=>{let t=Number.parseInt(new URLSearchParams(e).get(`page`)||`1`,10);return Number.isNaN(t)||t<1?1:t},Qu=({isArchive:e,isArchiveRoute:t,paginateWithNumbers:n,search:r})=>{let i=Zu(r),a=e&&t,o=a&&n,s=a&&!n;return{urlPage:i,useUrlPagination:o,isCrawlableLoadMore:s,shouldOffsetArchivePosts:e&&!o&&!(s&&i>1)}},$u=({shouldRenderClientSide:e,children:t})=>e?(0,J.jsx)(j,{fallback:null,children:()=>t}):(0,J.jsx)(J.Fragment,{children:t}),ed=(e,t)=>[...e].slice(t,t+e.length),td=(e,t)=>{if(!e||!t||e<=0||t<=0)return 0;let n=Math.floor(e/t);return Number.isNaN(n)?0:n},nd=(e,t)=>{if(!e||e<=0)return 0;if(!t||t<=0)return e;let n=Math.max(e-t,0);return Number.isNaN(n)?0:n},rd=({node:e,children:t})=>{let n=Yn(),r=u(),i=l(),{t:a}=v(),{hasFakeData:o,data:{posts:s=[],pagination:d},shouldScrollHorizontally:p,postGroupType:m,postsOffset:h=0,postsCategory:g,postsAudience:_,structureTiptapState:y,paginateWithNumbers:b}=e.attrs,x=m===`tag_page`,S=m===`author_page`,C=m===`recommendations`,w=m===`archive`,{tag:T}=c(),E=typeof e.attrs.data?.author_id==`string`?e.attrs.data.author_id:void 0,D=d?.per_page||3,O=w?td(h,D):0,k=nd(d?.total_pages||0,O),A=(0,q.useMemo)(()=>!!(y&&$s(y,`postCardActions`)),[e.attrs.id]),j=(0,q.useMemo)(()=>x&&T?[T]:Ge(g),[x,T,g]),M=W(),{post:N}=M,{urlPage:P,useUrlPagination:F,isCrawlableLoadMore:I,shouldOffsetArchivePosts:L}
11=Qu({isArchive:w,isArchiveRoute:M?.pageRequestParams?.pathname===`archive`,paginateWithNumbers:!!b,search:i.search}),{publication:R,site:ee}=f(`root`)||{},{postsInsights:z,getPostInsights:B,updatePostLikeCount:V}=Gu(),{posts:H,showLoadMore:te,loadMorePosts:U,isLoading:ne,resetSearchState:re,searchQuery:ie,isSearching:ae,setIsSearching:oe,handleDebouncedSearchQuery:se,handleNonDebouncedSearchQuery:ce,goToPage:le,currentPage:ue,selectedTagFilters:de,handleTagFilterChange:fe,contentTagsMatch:pe,handleContentTagsMatchChange:me}=Xu({defaultPosts:L?ed(s,h):s,pagination:d||null,enabled:o===!1||x||S||!C,postGroupType:m,hasFakeData:o||!1,tags:j,onPageFetchSuccess:A?B:void 0,pagesSkippedByOffset:O,audience:_,blockId:e.attrs.id,authorIds:E?[E]:void 0}),he=Ku(N?.id,C),ge=(0,q.useMemo)(()=>he?.map(e=>({id:e.id,web_title:e.web_title,web_subtitle:e.web_subtitle,comments_state:``,override_scheduled_at:e.override_scheduled_at,scheduled_at:``,audience:e.audience,is_premium:e.audience===`premium`,slug:e.slug,content_tags:e.content_tags,image_url:e.image_url,authors:e.authors,estimated_reading_time:e.estimated_reading_time,estimated_reading_time_display:e.estimated_reading_time_display})),[he]),_e=F&&!ie?s:d||ie?H:s,ve=N?_e.filter(({id:e})=>N.id!==e):_e,ye=(0,q.useMemo)(()=>{if(!R?.content_tags)return[];if(!g||g===`all`||j.length===0)return R.content_tags;let e=new Set(j.map(e=>e.toLowerCase()));return R.content_tags.filter(t=>e.has(t.display.toLowerCase()))},[R,g,j]),{mutateLikes:be}=Uu({onSuccess:V}),xe=e=>{be(e)},Se=e=>{r(`p/${e}#comments`)},Ce=(0,q.useCallback)(e=>{let t=new URLSearchParams(i.search);return t.set(`page`,String(e)),`${i.pathname}?${t.toString()}`},[i.pathname,i.search]),we=(0,q.useCallback)(e=>{if(F){r(Ce(e));return}le(e,ie||``)},[F,r,Ce,le,ie]),Te=I?Ce(P+1):void 0;return C&&(!ge||ge.length===0)?null:(0,J.jsx)($u,{shouldRenderClientSide:!!p,children:(0,J.jsx)(Ve,{element:{...e,attrs:{...e.attrs,isViewportMobile:n,data:C?{posts:ge,postsInsights:z}:{...e.attrs.data,posts:ve,postsInsights:z}}},isLivePost:!0,isViewportMobile:n,paginateHasMorePosts:te,paginateFetchMorePosts:()=>U(ie||``),paginateCurrentPage:F?P:ue,paginateTotalPages:F?d?.total_pages||0:k,paginateOnPageChange:we,paginateGetPageHref:F?Ce:void 0,paginateNextPageHref:Te,isLoading:ne,isSearching:ae,setIsSearching:oe,handleNonDebouncedSearchQuery:ce,handleResetSearchState:re,onSearchQueryChange:e=>se(e||``),onLikeClick:xe,onCommentClick:Se,publicationContentTags:ye,selectedTagFilters:de,onTagFilterChange:fe,contentTagsMatch:pe,onContentTagsMatchChange:me,translations:{"search.posts.clear_filters":a(`search.posts.clear_filters`),"search.posts.match_label":a(`search.posts.match_label`),"search.posts.match_any":a(`search.posts.match_any`),"search.posts.match_all":a(`search.posts.match_all`),"search.posts.match_tooltip_any":a(`search.posts.match_tooltip_any`),"search.posts.match_tooltip_all":a(`search.posts.match_tooltip_all`),"search.posts.match_aria_label":a(`search.posts.match_aria_label`),"search.posts.read_post":a(`search.posts.read_post`)},showCommentsButton:ee?.viewable_site_version?.settings?.comments_enabled,children:t})})},id=({node:e,children:t})=>{let{id:n,postGroupType:r,postsCategory:i}=e.attrs,a=r===`tag_page`,o=r===`recommendations`,{tag:s,slug:l}=c(),u=(0,q.useMemo)(()=>o?`${n}-recommendations-${l}`:a&&s?`${n}-tag-${s}`:`${n}-${i??`default`}`,[n,o,a,l,s,i]);return(0,J.jsx)(rd,{node:e,children:t},u)},ad=({node:e,children:t})=>Se()?(0,J.jsx)(od,{node:e,children:t}):null,od=({node:e,children:t})=>{let{site:n}=a(`root`),{post:r,onlyRenderComments:i,isDraft:o}=on(),{utmParams:s}=Se()||{},c=r?.post_theme,l=(0,q.useMemo)(()=>!Array.isArray(r?.authors)||r.authors.length===0?[]:r.authors.map(e=>({...e,profile_picture:{...e.profile_picture,url:Vn(e.profile_picture.url),thumb:{url:Vn(e.profile_picture.thumb.url)},landscape:{url:Vn(e.profile_picture.landscape.url)}}})),[r?.authors]),u={id:r?.id,web_title:r?.web_title,web_subtitle:r?.web_subtitle||``,comments_state:r?.comments_state,override_scheduled_at:o?new Date().toISOString():r?.override_scheduled_at,scheduled_at:r?.scheduled_at,audie
11nce:r?.audience,is_premium:r?.is_premium,slug:r?.slug,content_tags:r?.content_tags,image_url:Vn(r?.image_url),image_width:r?.image_width,image_height:r?.image_height,authors:l,estimated_reading_time:r?.estimated_reading_time,estimated_reading_time_display:r?.estimated_reading_time_display,display_thumbnail_on_web:r?.display_thumbnail_on_web,display_title_on_web:r?.display_title_on_web,display_subtitle_on_web:r?.display_subtitle_on_web,author_urls:r?.author_urls},d=[{text:`Home`,href:`/`},{text:`Posts`,href:`/archive`},{text:r?.web_title,href:r?.slug}],f=typeof document<`u`?document.location.href:`#`;return!r||i?null:(0,J.jsx)(Ie,{postTheme:c,webTheme:n.publication.web_theme,utmParams:s,element:{...e,attrs:{...e.attrs,data:{post:u,breadcrumbs:d,shareUrl:f}}},isLive:!0,children:t})},sd={previous:null,next:null},cd=(e,t=!0)=>{let n=R();return(0,q.useEffect)(()=>{e&&t&&n.load(`/adjacent_posts?post_id=${e}`)},[e]),n?.data??sd},ld=e=>e?{id:e.id,web_title:e.web_title,slug:e.slug}:null,ud=({node:e})=>{let{postId:t,showRecommendedPostsNode:n}=Se()||{},{previous:r,next:i}=cd(t||``,!!n),a=(0,q.useMemo)(()=>({previous:ld(r),next:ld(i)}),[r,i]);return n?(0,J.jsx)(Xo,{element:{...e,attrs:{...e.attrs,data:a}},children:null}):null},dd=({defaultReviews:e=[],pagination:t,productSlug:n,perPage:r,enabled:i=!0})=>{let a=p(),o=a?.data,s=o?.pagination,[c,l]=(0,q.useState)(e),[u,d]=(0,q.useState)((s?s.page:t?.page)||0),[f,m]=(0,q.useState)((s?s.total_pages:t?.total_pages)||0),[h]=(0,q.useState)((s?s.total:t?.total)||0),g=(0,q.useRef)(!1),_=(0,q.useRef)(!1);(0,q.useEffect)(()=>{!_.current&&e.length>0&&t&&(l(e),d(t.page),m(t.total_pages),_.current=!0)},[e,t]);let v=(0,q.useCallback)(()=>{if(!i)return;g.current=!0;let e=new URLSearchParams;e.append(`slug`,n),e.append(`page`,String(u+1)),r&&e.append(`per_page`,String(r)),a.load(`/product_reviews?${e.toString()}`)},[u,a,r,i,n]);return(0,q.useEffect)(()=>{if(!o||!g.current)return;let e=o?.pagination?.page,t=o?.reviews||[];l(e=>e.concat(t)),d(e||u+1),m(o?.pagination?.total_pages||f),g.current=!1},[o]),{reviews:c,showLoadMore:u+1<=f,isLoading:a?.state!==`idle`,loadMoreReviews:v,currentPage:u,totalPages:f,totalReviews:h}},fd=({productSlug:e,reviewId:t,enabled:n=!0})=>{let r=R(),i=r?.data,a=(0,q.useCallback)(()=>{r.load(`/product_reviews?slug=${e}&review_id=${t}`)},[r,t,e]);return(0,q.useEffect)(()=>{n&&a()},[n]),{refetch:a,isLoading:(r.state===`loading`||!r?.data&&n)&&n,data:i||null}},pd=({node:e,children:t})=>{let{t:n}=v(),{productReviews:r,product:i}=W(),[a]=o(),s=a.get(`review_id`),{reviews:c,showLoadMore:l,isLoading:u,loadMoreReviews:d,currentPage:f,totalPages:p,totalReviews:m}=dd({defaultReviews:r?.reviews||[],pagination:r?.pagination||null,productSlug:i.slug,perPage:e.attrs.reviewsPerPage,enabled:!s}),{data:h}=fd({productSlug:i.slug,reviewId:s,enabled:!!s}),g=(0,q.useMemo)(()=>s?{reviews:h?.review?[h.review]:[],summary:h?.metrics}:{reviews:c,summary:r?.metrics,pagination:{page:f,total:m,total_pages:p,per_page:e.attrs.reviewsPerPage||4}},[c,r,f,m,p,e.attrs.reviewsPerPage,h,s]);return!s&&(!r||r?.metrics?.total_reviews_count===0)?null:(0,J.jsx)(Xe,{isLive:!0,showLoadMore:!s&&l,onLoadMoreReviews:d,isLoadingMoreReviews:u,element:{...e,attrs:{...e.attrs,data:g}},translations:{"product_reviews.review":n(`product_reviews.review`),"product_reviews.reviews":n(`product_reviews.reviews`),"product_reviews.title":n(`product_reviews.title`),"product_reviews.load_more":n(`product_reviews.load_more`),"product_reviews.loading":n(`product_reviews.loading`)},children:t})},md={all:[`products`],list:e=>[`products`,`list`,e],page:(e,t,n,r)=>[`products`,`list`,e,t,n,r]},hd=async(e,t,n)=>{let r=new URLSearchParams;if(r.set(`page`,String(e)),r.set(`per_page`,String(t)),n?.length)for(let e of n)r.append(`product_tag_ids[]`,e);let i=await fetch(`/products_list?${r.toString()}`);if(!i.ok)throw Error(`Failed to fetch products`);return i.json()},gd=(e,t)=>{if(!e||e<=0)return 1;if(!t||t<=0)return e;let n=e+t;return Number.isNaN(n)?e:n},_d=e=>({id:e.id,name:e.name??``,stripe_price_id:e.stripe_price_id??``,unit_amount_cents:e.unit_amount,original_unit_amount_cents:e.original_unit_amount,currency:e.currency,default_asset_url:e.default_image_url??void 0,assets:e.assets?.map(e=>({id:e.id,url:e.url,alt_text:e.alt_text??void 0,position:e.position,is_default:e.is_default}))}),vd=e=>e.map(e=>({id:e.id,name:e.name,description:e.description??``,slug:e.slug,url:`/products/${e.slug}`,tiptap_state:e.tiptap_state,product_type:e.product_type??void 0,free:e.free,cta_text:e.cta_text??``,default_variant:e.default_product_variant?_d(e.default_product_variant):void 0,product_variants:e.product_variants.map(_d),created_at:e.created_at})),yd=({defaultProducts:e=[],pagination:t,enabled:n=!0,pagesSkippedByOffset:r,blockId:i,displayPerPage:a,fetchPerPage:o,productTagIds:s})=>{let[c,l]=(0,q.useState)(1),[u,d]=(0,q.useState)(e),f=(0,q.useRef)(null),[p,m]=(0,q.useState)(null),h=(0,q.useRef)([]),[g,_]=(0,q.useState)(0),v=o||t?.per_page,y=!!(a&&v&&a<v),{data:b,isFetching:x}=H({queryKey:md.page(i,p||0,v||0,s),queryFn:()=>hd(p??0,v||0,s),enabled:n&&p!==null&&p>0,staleTime:6e4});(0,q.useEffect)(()=>
11{if(!b)return;let e=vd(b.products);f.current===`go_to_page`?(d(e),h.current=[],_(0),l(b.pagination?.page||1)):(d(t=>{let n=new Set(t.map(e=>e.id)),r=[...h.current,...e].filter(e=>!n.has(e.id));if(y&&a){let e=r.slice(0,a);return h.current=r.slice(a),_(h.current.length),[...t,...e]}return h.current=[],_(0),[...t,...r]}),l(e=>b.pagination?.page||e+1)),f.current=null},[b,y,a]);let S=(0,q.useCallback)(()=>{if(n){if(y&&a&&h.current.length>=a){let e=h.current.slice(0,a);h.current=h.current.slice(a),_(h.current.length),d(t=>[...t,...e]);return}f.current=`load_more`,m(c+1)}},[c,n,y,a]),C=(0,q.useCallback)(e=>{n&&(f.current=`go_to_page`,m(gd(e,r||0)))},[n,r]),w=b?.pagination?.total_pages??t?.total_pages??0;return{products:u,showLoadMore:c+1<=w||g>0,isLoading:x,loadMoreProducts:S,goToPage:C,currentPage:c}},bd=({productIds:e,enabled:t=!0})=>{let{productReviewSummaries:n,hasProductReviewSummariesDataFetched:r}=h(),i=p(),[a,o]=(0,q.useState)({}),s=(0,q.useRef)(``),c=(0,q.useRef)(!1);(0,q.useEffect)(()=>{r&&n&&!c.current&&(c.current=!0,o(e=>({...e,...n})))},[r,n]);let l=(0,q.useCallback)(()=>{if(!t||!e.length)return;let n=e.filter(e=>!(e in a));if(n.length===0)return;let r=new URLSearchParams;for(let e of n)r.append(`product_ids[]`,e);i.load(`/product_review_summaries?${r.toString()}`)},[t,e,a,i]);return(0,q.useEffect)(()=>{let n=[...e].sort().join(`,`);n!==s.current&&t&&e.length>0&&(s.current=n,e.filter(e=>!(e in a)).length>0&&l())},[e,t,a,l]),(0,q.useEffect)(()=>{i.data?.summaries&&o(e=>({...e,...i.data?.summaries}))},[i.data]),{summaries:a,isLoading:i.state!==`idle`,refetch:l}},xd=({message:e})=>(0,J.jsx)(`div`,{className:`flex max-w-2xl flex-col space-y-2 py-8`,children:(0,J.jsx)(O,{as:`p`,type:`body`,size:`md`,className:`text-center leading-tight tracking-normal`,children:e})}),Sd=(e,t)=>e.slice(t),Cd=(e,t)=>{if(!e||!t||e<=0||t<=0)return 0;let n=Math.floor(e/t);return Number.isNaN(n)?0:n},wd=(e,t)=>{if(!e||e<=0)return 0;if(!t||t<=0)return e;let n=Math.max(e-t,0);return Number.isNaN(n)?0:n},Td=({node:e,children:t})=>{let n=Yn(),{t:r}=v(),{hasFakeData:i,data:{products:a=[],pagination:o},productGroupType:s,productsOffset:c=0,productsCount:l,productsTagIds:u}=e.attrs,d=(0,q.useMemo)(()=>{if(u)try{let e=JSON.parse(u);if(Array.isArray(e)&&e.length>0)return e}catch{}},[u]),f=s===`archive`,p=s===`free_selection`||!s,m=o?.per_page||3,h=f?Cd(c,m):0,g=wd(o?.total_pages||0,h),{products:_,loadMoreProducts:y,goToPage:b,currentPage:x}=yd({defaultProducts:f?Sd(a,c):a,pagination:o||null,enabled:i===!1&&!p,productGroupType:s||`free_selection`,hasFakeData:i||!1,pagesSkippedByOffset:h,blockId:e.attrs.id,displayPerPage:l,fetchPerPage:f?(l||3)+c:void 0,productTagIds:d}),S=o&&!p?_:a,C=(0,q.useMemo)(()=>S.map(e=>e.id).filter(Boolean),[S]),{summaries:w}=bd({productIds:C,enabled:C.length>0}),T=(0,q.useMemo)(()=>S.map(e=>({...e,reviews_summary:w[e.id]||e.reviews_summary||null})),[S,w]);return(0,J.jsx)(Je,{isLive:!0,element:{...e,attrs:{...e.attrs,data:{...e.attrs.data,products:T}}},viewport:n?`mobile`:`desktop`,translations:{"product.free":r(`products.free_label`),"product_reviews.review":r(`product_reviews.review`),"product_reviews.reviews":r(`product_reviews.reviews`)},paginateCurrentPage:x,paginateTotalPages:g,paginateOnPageChange:b,paginateOnLoadMore:y,children:t})},Ed=({node:e,children:t})=>(0,J.jsx)(E,{fallbackRender:e=>(0,J.jsx)(xd,{message:e.error.message}),children:(0,J.jsx)(Td,{node:e,children:t})}),Dd=({node:e,children:t})=>{let{isSubscriberGateEnabled:n,isEmailCapturePopupEnabled:r}=Se()||{isSubscriberGateEnabled:!1},{percentageScrolled:i}=Hl()||{percentageScrolled:0,windowScrollY:0},a=Number((i*100).toFixed(1));return n||r?null:(0,J.jsx)(`div`,{className:`fixed top-0 z-50 w-full`,children:(0,J.jsx)(Zo,{element:e,currentProgress:a,children:t})})},Od=({recommendations:e,fetcher:t,nextPage:n})=>{let[,r]=Mn();return{handleSubmit:(i,a)=>{if(e.length===0)return n(),!1;let o=(a||i.get(`email`)||``)?.toString().trim();return i.set(`is_js_enabled`,`true`),i.set(`email`,o),o?(r(o),t.submit(i,{method:`post`,action:`/recommendations_subscribe_form`}),!0):(A.error(`Please enter a valid email address`),!1)}}},kd=({node:e,children:t,onSuccess:n})=>{let{t:r}=v(),[i]=Mn(),[a,s]=o(),c=Jn(),{publication:l}=f(`root`),{visitToken:d,referralId:p,setCookie:m}=Dn(),[h,g]=(0,q.useState)([]),_=u(),{nextPage:y,nextStep:b}=C(),x=(0,q.useRef)(null),{handleSubmit:S}=Od({recommendations:h,fetcher:c,nextPage:y}),w=()=>l.require_subscriber_approval?r(`notifications.subscribe.require_approval`):l.double_opt_required?r(`n
11otifications.subscribe.confirm`):r(`notifications.subscribe.subscribed`),T=e=>{if(m({name:`email_capture_disabled`,value:`true`,days:30}),e?.dataLayerEvent&&be.pushEvent(e.dataLayerEvent),A.success(w()),x.current?.reset(),g([]),b){y();return}a.get(`modal`)===`recommendations`&&(a.delete(`modal`),s(a))},E=e=>{A.success(w())},D=e=>{let t=[...h],n=t.findIndex(t=>t.id===e.id);n>-1?t.splice(n,1):t.push(e),g(t)},O=e=>{g(e)},k=()=>{g([])},j=c.state===`submitting`;return(0,J.jsxs)(Nn,{fetcher:c,formRef:x,method:`post`,action:`/recommendations_subscribe_form`,onSubmit:e=>{S(new FormData(e.currentTarget))},onSuccess:e=>{T(e),g([])},onError:e=>{E(e)},children:[(0,J.jsx)(Hn,{name:`recommendations`,errorMessage:r(`errors.default`),successMessage:``}),p&&(0,J.jsx)(`input`,{hidden:!0,name:`ref`,defaultValue:p}),d&&(0,J.jsx)(`input`,{hidden:!0,name:`visit_token`,defaultValue:d}),(0,J.jsx)(`input`,{hidden:!0,name:`publication_id`,defaultValue:l.id}),(0,J.jsx)(`input`,{name:`sent_from_orchid`,type:`hidden`,defaultValue:`true`}),(0,J.jsx)(`input`,{name:`include_current_publication`,type:`hidden`,defaultValue:`false`}),t({isLoading:j,email:i,recommendations:h,handleChangeInRecommendations:D,onClickSubmit:e=>x.current?S(new FormData(x.current),e):!1,onClickCancel:()=>{if(b){y();return}_(`/`)},handleSelectAllRecommendations:O,handleDeselectAllRecommendations:k})]})},Ad=({node:e,children:t})=>(0,J.jsx)(j,{fallback:null,children:()=>(0,J.jsx)(kd,{node:e,children:({email:n,recommendations:r,handleChangeInRecommendations:i,handleSelectAllRecommendations:a,handleDeselectAllRecommendations:o,onClickSubmit:s,onClickCancel:c})=>(0,J.jsx)(Me,{element:e,onChange:i,email:n,showForm:r.length>0,selectedRecommendations:r,portalElement:typeof window<`u`?window?.document?.body:void 0,onClickSubmit:s,onClickCancel:c,onSelectAll:a,onDeselectAll:o,isLive:!0,children:t})})}),jd=({node:e,children:t})=>{let{t:n}=v(),{handleCloseModal:r,currentModal:i}=B(),{site:o}=a(`root`),{nextStep:s,nextPage:c}=C(),l=e=>{e||(s?c():r({preventScrollReset:!0}))};return(0,J.jsx)(j,{fallback:null,children:()=>o.use_custom_recommendations_modal?(0,J.jsx)(Be,{element:e,isOpen:i===`recommendations`,onOpenChange:l,children:t}):(0,J.jsx)(zn,{onOpenChange:l,networkUiEnabled:o.recommendations_network_ui_enabled,children:({email:e,isOpen:t,isLoading:r,recommendations:i,submittedIds:a,onSubmitSuccess:s})=>(0,J.jsx)(Ln,{email:e,isLoading:r,v3Layout:o.recommendations_network_ui_enabled,recommendations:i,submittedIds:a,onSubmitSuccess:s,isOpen:t,onOpenChange:l,theme:o.primary_theme,translations:Bn(n),SubscribeForm:Rn})})})},Md=({node:e,children:t})=>{let{showRecommendedPostsNode:n}=Se()||{};return n?(0,J.jsx)(Pe,{element:e,children:t}):null},Nd=({children:e,onSuccess:t})=>{let n=Jn(),{t:r}=v(),i=(0,q.useRef)(null),a=e=>{e?.dataLayerEvent&&be.pushEvent(e.dataLayerEvent),k.success(e?.toast?.message),i.current?.reset(),t?.()},o=n.state===`submitting`;return(0,J.jsxs)(Nn,{fetcher:n,formRef:i,method:`post`,action:`/request_reset_password`,onSubmit:e=>{let t=new FormData(e.currentTarget);n.submit(t,{method:`post`,action:`/request_reset_password`})},onSuccess:e=>{a(e)},onError:e=>{k.error(e?.toast?.message||`Something went wrong, please try again`)},children:[(0,J.jsx)(Xn,{}),(0,J.jsx)(Hn,{name:`reset_password`,errorMessage:`${r(`errors.default`)} ${r(`errors.try_later`)}`,successMessage:r(`toast.reset_password.message`)}),e({isLoading:o})]})},Pd=({node:e,children:t})=>(0,J.jsx)(Nd,{children:({isLoading:n})=>(0,J.jsx)(ot,{element:e,isSubmitting:n,children:t})}),Fd=({node:e,children:t})=>{let{children:n,node:r}=yc({node:e,children:t}),{node:i,children:a}=Zc({node:r,children:n});return(0,J.jsx)(dn,{element:i,children:a})},Id=({url:e})=>H({queryKey:[`rssFeed`,e],enabled:!!e,retry:!1,queryFn:async({signal:t})=>{let n=await(await fetch(`/rss_feed`,{method:`POST`,headers:{"Sec-Fetch-Dest":`empty`,"Content-Type":`application/json`},body:JSON.stringify({url:e}),signal:t})).json();if(!Array.isArray(n))return n}}),Ld=(e,t)=>{let n=l(),r=W(),i=n.pathname.startsWith(`/podcast/`);return e.attrs.hasMigratedToCardStructure&&e.attrs.source===`beehiiv_podcast_show`?i?{episodes:r?.podcastEpisode?.show?.recent_episodes}:{episodes:e.attrs.selectedPodcastShowEpisodes??[]}:t||e.attrs.data},Rd=({message:e})=>(0,J.jsx)(`div`,{className:`flex max-w-2xl flex-col space-y-2 py-8`,children:(0,J.jsx)(O,{as:`p`,type:`body`,size:`md`,className:`text-center leading-tight tracking-normal`,children:e})}),zd=({node:e,children:t})=>{let n=Yn(),{site:r}=f(`root`),{data:i,isLoading:a,isError:o}=Id({url:e.attrs.url||``}),s=Ld(e,i),c=Al(e);return(0,J.jsx)(Ft,{element:{...c,type:`rss_feed`,attrs:{...c.attrs,data:s,isLoading:a,isError:o},content:[{id:`empty-children`,text:``}]},isLive:!0,rssFeedMap:r?.viewable_site_version?.customization?.rss_feed_map,viewport:n?`mobile`:`desktop`,children:t})},Bd=({node:e,children:t})=>(0,J.jsx)(E,{fallbackRender:e=>(0,J.jsx)(Rd,{message:e.error.message}),children:(0,J.jsx)(zd,{node:e,children:t})});function Vd(e){return`https://www.youtube.com/watch?v=${e}`}var Hd=({node:e,children:t})=>{let{site:n}=f(`root`),[r,i]=(0,q.useState)(!1),[a,o]=(0,q.useState)(``),s=e.attrs.url||``,c=e.attrs.source||`podcast`,{data:l,isLoading:u}=Id({url:s}),d=l||e.attrs.data,p=(n?.viewable_site_version?.customization?.rss_feed_map)?.[
11s]?.uuid,m=(0,q.useCallback)(()=>{i(!0)},[]),h=(0,q.useCallback)(e=>{i(e),e||o(``)},[]),g=(0,q.useMemo)(()=>{if(!d)return[];let e=a.toLowerCase().trim();if(c===`youtube`)return Qe(d?.feed?.entry).filter(t=>{if(!e)return!0;let n=t.title?.toLowerCase()||``,r=t[`media:group`]?.[`media:description`]?.toLowerCase()||``;return n.includes(e)||r.includes(e)}).map(e=>({id:e[`yt:videoId`]||e.id||``,title:e.title||``,description:e[`media:group`]?.[`media:description`]||``,imageUrl:e[`media:group`]?.[`media:thumbnail`]?.[`@url`],url:Vd(e[`yt:videoId`]||``),date:e.published?Fe(e.published):``}));let t=d;return Qe(t?.rss?.channel?.item).filter(t=>{if(!e)return!0;let n=t.title?.toLowerCase()||``,r=zt(t.description||``).toLowerCase();return n.includes(e)||r.includes(e)}).map(e=>({id:e.guid||`${e.title}-${e.pubDate}`||``,title:e.title||``,description:e.description||``,imageUrl:e[`itunes:image`]?.[`@href`]||t?.rss?.channel?.image?.url||t?.rss?.channel?.[`itunes:image`]?.[`@href`],url:Ne(e.title||``,p||``),date:e.pubDate?Fe(e.pubDate):``}))},[d,a,c,p]);return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(ms,{element:{type:`rss_feed_search`,attrs:e.attrs,content:[{id:`empty-children`,text:``}]},onClick:m,children:t}),(0,J.jsx)(j,{fallback:null,children:()=>(0,J.jsx)(Ts,{open:r,setOpen:h,search:a,setSearch:o,results:g,isLoading:u&&r,placeholder:e.attrs.placeholder||`Search episodes...`})})]})},Ud=({node:e,children:t})=>(0,J.jsx)(`div`,{className:(0,Y.default)({"hidden md:block":e.attrs?.hideOnMobile===void 0?e.attrs?.isHiddenInProduction:e.attrs.hideOnMobile,"block md:hidden":e.attrs?.hideOnDesktop===void 0?e.attrs?.isHiddenInProduction:e.attrs.hideOnDesktop}),children:(0,J.jsx)(at,{element:e,children:t})}),Wd=({node:e,children:t,premiumOfferId:n})=>{let{site:r}=f(`root`),[i]=o(),a=se(),s=i.get(`premium_offer_id`)||void 0,c=i.get(`modal`)===`signup`,l=s&&c,u=Wn();return!e?.attrs?.showWhenLoggedIn&&u&&!l?null:(0,J.jsx)(we,{id:e.attrs.id,signupFlowId:e?.attrs.signupFlowId,automationIds:e?.attrs.automationIds,premiumOfferId:n||s,redirectUrl:e?.attrs.redirectUrl,customFormType:e?.attrs.customFormType,children:({isLoading:n,setEmail:i})=>(0,J.jsx)(lt,{element:e,isSubmitting:n,isLive:!0,hasTermsOfService:!!r.viewable_site_version.settings.terms_of_service_enabled,hasCustomTermsOfService:r.viewable_site_version.settings.terms_of_service,customTermsOfServiceText:r.viewable_site_version.settings.terms_of_service_text||void 0,onEmailChange:i,gdprTranslations:a,children:t})})},Gd=({node:e,children:t})=>{let{currentModal:n}=B(),[r,i]=o();return(0,J.jsx)(j,{fallback:null,children:()=>(0,J.jsx)(fn,{element:e,isOpen:n===`signup`,onOpenChange:e=>{e||(r.delete(`premium_offer_id`),r.delete(`signup_flow_id`),r.delete(`modal`),i(r,{preventScrollReset:!0}))},children:t})})},Kd=({node:e,children:t})=>{let{site:n}=f(`root`);return(0,J.jsx)(St,{isLive:!0,element:(0,q.useMemo)(()=>{let t=Object.keys(e?.attrs?.data||{}).reduce((t,r)=>{let i=n.publication[r],a=e?.attrs?.data?.[r];return t[r]=i||a,t},{});return{...e,attrs:{...e.attrs,data:t}}},[e,n.publication]),children:t})},qd=50,Jd=40,Yd=({showAfterPercentageScrolled:e=Jd}={})=>{let{isModalOpen:t}=B(),{post:n}=on(),{isGatedContentDisabled:r,isPopupDisabled:i}=Se()||{},{percentageScrolled:a,windowScrollY:o}=Hl()||{percentageScrolled:0,windowScrollY:0},c=Number((a*100).toFixed(1)),l=Wn(),{isFetchingSubscription:u}=f(`root`),{setCookie:d}=s(),[p,m]=(0,q.useState)(!1),[h,g]=(0,q.useState)(!1),[_,v]=(0,q.useState)(!1),y=(0,q.useMemo)(()=>u?!1:n.enforce_gated_content&&!n.contains_subscriber_break&&!r&&!i&&!l,[n,r,i,l,u]),b=()=>{let e,t;return typeof document<`u`&&(e=document.querySelector(`.rendered-post`)?.getBoundingClientRect(),t=window?.innerHeight),{contentBounds:e,windowHeight:t}},x=(0,q.useMemo)(()=>u?!1:n.enable_popup_on_scroll&&c>=e&&!r&&!i&&!l,[c,r,l,i,n.enable_popup_on_scroll,e,u]),S=_&&y&&o>=qd;return(0,q.useEffect)(()=>{v(!0)},[]),(0,q.useEffect)(()=>{i&&p&&m(!1)},[i,p]),(0,q.useEffect)(()=>{r&&h&&g(!1)},[r,h]),(0,q.useEffect)(()=>{x&&m(!0)},[x]),(0,q.useEffect)(()=>{g(S)},[o,S]),(0,q.useEffect)(()=>{if(!_||!y)return;let{contentBounds:e,windowHeight:t}=b();(e&&t&&e.height+o<t-qd||S)&&g(!0)},[_,y,S,o]),Ml({enabled:_&&y&&!t}),{mounted:_,isGated:y,isOpen:p,isGateOpen:h,showPopup:x,handleCloseModal:()=>{d({name:`popup_closed`,value:`true`,days:4}),m(!1)},currentProgress:c}},Xd=({node:e,children:t})=>{let{isGateOpen:n}=Yd({showAfterPercentageScrolled:e.attrs?.showAfterPercentageScrolled});return(0,J.jsx)(Is,{element:e,isLive:!0,isOpen:n,children:t})},Zd=({hasEmail:e,email:t,id:n,publicationId:r,successMessage:i,children:a})=>{let s=u(),{t:c}=v(),l=Jn(),d=l.data,[f,p]=(0,q.useState)(!1),[m,h]=(0,q.useState)(!1),{nextPage:g}=C(),_=(0,q.useRef)(null),y=`${c(`shared.actions.submitting`)}...`,b=e=>{e.preventDefault(),p(!0);let t=new FormData(e.currentTarget);l.submit(t,{method:`post`,action:`/post_subscribe_form`})},x=e=>{if(e?.redirect){s(`/`);return}_.current?.reset(),p(!1),h(!0),g()},S=e=>{if(e?.redirect){s(`/`);return}p(!1)},[,w]=o(),[T]=Mn();return(0,q.useEffect)(()=>{!t&&T&&w({email:T})},[T,w,t]),Un(d?.toast),(0,J.jsxs)(Nn,{fetcher:l,formRef:_,method:`post`,action:`/post_subscribe_form`,onSubmit:e=>{p(!0),b(e)},onSuccess:e=>{x(e)},onError:e=>{S(e)},children:[e&&(0,J.jsx)(`input`,{name:`email`,type:`hidden`,value:t}),(0,J.jsx)(`input`,{name:`form_id`,type:`hidden`,value:n}),(0,J.jsx)(`input`,{name:`publication_id`,type:`hidden`,value:r}),(0,J.jsx)(Hn,{name:`no_subscription`,errorMessage:c(`forms.toast.no_subscription`),successMessage:``}),(0,J.jsx)(Hn,{name:`form_response`,errorMessage:c(`errors.default`),successMessage:i||c(`forms.toast.success`)}),a({isLoading:f,isSuccess:m,submittingText:y})]})},Qd=e=>({...e,attrs:{...e.attrs,isSurveyPageForm:!0}}),$d=({node:e,children:t})=>{let n=h()?.publication?.id,r=Qd(e),[i]=Mn(),{subscription:a}=f(`root`)||{},{nextPage:o}=C(),s=()=>{o()},c=a?.email||i;return(0,J.jsx)(Zd,{hasEmail:!!c,email:c,id:r?.attrs?.data?.id,publicationId:n,successMessage:r?.attrs?.data?.thank_you_message,children:({isLoading:e,isSuccess:n,submittingText:i})=>(0,J.jsx)(ln,{element:r,isSubmitting:e,isSuccess:n,isLive:!0,hasLocalStorageEmail:!!c,onContinue:s,submittingText:i,children:t})})},ef=({children:e})=>{let[t]=(0,q.useState)(!1);return e({isLoading:t})},tf=({node:e,children:t})=>{let n=l(),{tag:r}=c(),i=n.pathname===`/t/${r}`,a=e?.attrs?.isTagPageHeader,o=!(i&&a);return(0,J.jsx)(ef,{children:({isLoading:n})=>(0,J.jsx)(vt,{element:e,isLive:o,children:t})})},nf=({node:e,children:t})=>(0,J.jsx)(Mt,{isLive:!0,element:e,viewport:Yn()?`mobile`:`desktop`,children:t}),rf=(e,t)=>{if(!e)return!1;if(e.startsWith(`/`)||e.startsWith(`#`))return!0;try{return new URL(e).hostname===new URL(t??``).hostname}catch{return!1}},af=({node:e})=>{let t=l(),n=u(),{handleOpenModal:r,handleCloseModal:i}=B(),{subscription:a,setCloseModalActionDispatched:o,openPageModalType:s}=Dn(),{currentUrl:c}=f(`root`)||{};if(e?.marks&&e?.marks?.length>
110){let l=e?.marks?.find(e=>e.type===`link`);if(l){let u=l?.attrs&&`onClick`in l.attrs?l.attrs.onClick:void 0,d=l?.attrs&&`action`in l.attrs&&l.attrs.action,f=l.attrs?.href||``,p=u===`action`||u===void 0&&!!d,m=l.attrs?.target===`_self`&&(p||rf(f,c)),h,g,_=!1,v=f.startsWith(`tel:`);try{v||(h=new URL(f))}catch{}if(p&&(typeof window<`u`&&(h=new URL(window.location.href)),d===`login`&&h?h.searchParams.set(`modal`,`login`):d===`sign_up`&&h?h.searchParams.set(`modal`,`signup`):d===`profile`&&h?h.pathname=`subscribe/${a?.subscriber_id||``}/manage`:d===`search`&&h?h.searchParams.set(`modal`,`search`):d===`close_modal`&&h&&h.searchParams.delete(`modal`)),l.attrs&&p&&h)try{l.attrs.target=`_self`}catch{}if(l.attrs?.target===`_self`&&h&&m&&!v&&(g=()=>{if(typeof d==`string`&&[`sign_up`,`search`,`login`,`close_modal`].includes(d)){switch(d){case`search`:case`login`:r(d,{preventScrollReset:!0});break;case`sign_up`:r(`signup`,{preventScrollReset:!0});break;case`close_modal`:i({preventScrollReset:!0}),s&&o(!0);break;default:n(`${h.pathname}${h.search}${h.hash}`)}return}n(`${h.pathname}${h.search}${h.hash}`)}
11,_=!0),m&&f&&!p)try{let r=new URL(f),i=new URLSearchParams(r.search),a=`${r.pathname}${r.hash}`;return a.includes(`/login`)&&t.pathname.startsWith(`/p/`)&&(i.set(`postSlug`,t.pathname),a=`${r.pathname}?${i.toString()}${r.hash}`,_=!0),(0,J.jsx)(Ae,{leaf:e,isClientSideNavigation:_,onClick:()=>{n(a)}})}catch{return(0,J.jsx)(Ae,{leaf:e})}return(0,J.jsx)(Ae,{leaf:e,isClientSideNavigation:_,onClick:g})}}return(0,J.jsx)(Ae,{leaf:e})},of=({children:e,onSuccess:t})=>{let n=Jn(),{t:r}=v(),[i,a]=(0,q.useState)(!1),o=(0,q.useRef)(null),s=e=>{a(!1),e?.dataLayerEvent&&be.pushEvent(e.dataLayerEvent),A.success(e?.toast?.message),o.current?.reset(),t?.()};return(0,J.jsxs)(Nn,{fetcher:n,formRef:o,method:`post`,action:`/request_update_password`,onSubmit:e=>{a(!0);let t=new FormData(e.currentTarget);n.submit(t,{method:`post`,action:`/request_update_password`})},onSuccess:e=>{s(e)},onError:e=>{a(!1),A.error(e?.toast?.message||`Something went wrong, please try again`)},children:[(0,J.jsx)(Xn,{redirectToHome:!0}),(0,J.jsx)(Hn,{name:`reset_password`,errorMessage:`${r(`errors.default`)} ${r(`errors.try_later`)}`,successMessage:r(`toast.success`)}),e({isLoading:i})]})},sf=({node:e,children:t})=>(0,J.jsx)(of,{children:({isLoading:n})=>(0,J.jsx)(Pt,{element:e,isSubmitting:n,children:t})}),cf=(0,q.lazy)(()=>g(()=>import(`./Pricing-IA63YF10.js`).then(e=>e.n),__vite__mapDeps([65,1,2,3,4,7,8,9,10,11,12,13,5,66,67,6,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,68,69,70,71,72,73,74,75,76]))),lf=({node:e,children:t,rootClassName:n})=>{switch(e.type){case`accordion`:return(0,J.jsx)(pc,{node:e,children:t});case`accordionTitle`:return(0,J.jsx)(hc,{node:e,children:t});case`accordionContent`:return(0,J.jsx)(gc,{node:e,children:t});case`accordionContainer`:return(0,J.jsx)(mc,{node:e,children:t});case`adSlot`:return(0,J.jsx)(_c,{node:e});case`audioPlayer`:return(0,J.jsx)(xc,{node:e});case`section`:return(0,J.jsx)(Ud,{node:e,children:t});case`doc`:return(0,J.jsx)(Bl,{node:e,className:n,children:t});case`paragraph`:return(0,J.jsx)(ru,{node:e,children:t});case`text`:return(0,J.jsx)(af,{node:e,children:t});case`heading`:return(0,J.jsx)(Jl,{node:e,children:t});case`button`:return(0,J.jsx)(_l,{node:e,children:t});case`container`:return(0,J.jsx)(wl,{node:e,children:t});case`signup`:return(0,J.jsx)(Wd,{node:e,children:t});case`testimonials`:return(0,J.jsx)(nf,{node:e,children:t});case`productReviews`:return(0,J.jsx)(pd,{node:e,children:t});case`columns`:return(0,J.jsx)(yl,{node:e,children:t});case`column`:return(0,J.jsx)(vl,{node:e,children:t});case`image`:return(0,J.jsx)(Xl,{node:e,children:t});case`post`:return(0,J.jsx)(id,{node:e,children:t});case`recommendedPosts`:return(0,J.jsx)(Md,{node:e,children:t});case`postNavigation`:return(0,J.jsx)(ud,{node:e});case`postComments`:return(0,J.jsx)(Hu,{node:e,children:t});case`socials`:return(0,J.jsx)(Kd,{node:e,children:t});case`divider`:return(0,J.jsx)(zl,{node:e,children:t});case`embed`:return(0,J.jsx)(ql,{node:e,children:t});case`authors`:return(0,J.jsx)(Cc,{node:e,children:t});case`pricing`:return(0,J.jsx)(D,{fallbackRender:()=>(0,J.jsx)(de,{node:e}),children:(0,J.jsx)(q.Suspense,{fallback:(0,J.jsx)(de,{node:e}),children:(0,J.jsx)(cf,{node:e,children:t})})});case`contactForm`:return(0,J.jsx)(Cl,{node:e,children:t});case`survey`:return(0,J.jsx)($d,{node:e,children:t});case`signupModal`:return(0,J.jsx)(Gd,{node:e,children:t});case`recommendations`:return(0,J.jsx)(Ad,{node:e,children:t});case`icon`:return(0,J.jsx)(Yl,{node:e,children:t});case`recommendationsModal`:return(0,J.jsx)(jd,{node:e,children:t});case`login`:return(0,J.jsx)(tu,{node:e,children:t});case`resetPassword`:return(0,J.jsx)(Pd,{node:e,children:t});case`updatePassword`:return(0,J.jsx)(sf,{node:e,children:t});case`loginModal`:return(0,J.jsx)(nu,{node:e,children:t});case`tags`:return(0,J.jsx)(tf,{node:e,children:t});case`hardBreak`:return(0,J.jsx)(`br`,{});case`proprietaryFooter`:return(0,J.jsx)(fc,{node:e});case`progressIndicator`:return(0,J.jsx)(Dd,{node:e,children:t});case`postContent`:return(0,J.jsx)(nn,{node:e,children:t});case`postHeader`:return(0,J.jsx)(ad,{node:e,children:t});case`postActions`:return(0,J.jsx)(Cu,{node:e,children:t});case`emailCapturePopup`:return(0,J.jsx)(Kl,{node:e,children:t});case`contentGate`:return(0,J.jsx)(jl,{node:e,children:t});case`contentGatePopup`:return(0,J.jsx)(Rl,{node:e,children:t});case`emailCapture`:return(0,J.jsx)(Vl,{node:e,children:t});case`subscriberGate`:return(0,J.jsx)(Xd,{node:e,children:t});case`listItem`:return(0,J.jsx)(Ql,{node:e,children:t});case`bulletList`:return(0,J.jsx)(Zl,{node:e,children:t});case`orderedList`:return(0,J.jsx)($l,{node:e,children:t});case`rss_feed`:return(0,J.jsx)(Bd,{node:e,children:t});case`rss_feed_search`:return(0,J.jsx)(Hd,{node:e,children:t});case`products`:return(0,J.jsx)(Ed,{node:e,children:t});case`richText`:return(0,J.jsx)(Fd,{node:e,children:t});case`podcastPlatforms`:return(0,J.jsx)(uu,{node:e,children:t});case`podcastTranscript`:return(0,J.jsx)(du,{node:e,children:t});default:return null}},uf=(e,t)=>e?Array.isArray(e)?e.map((e,n)=>(0,J.jsx)(lf,{node:e,rootClassName:t,children:e.content?uf(e.content):null},n)):(0,J.jsx)(lf,{node:e,rootClassName:t,children:e.content?uf(e.content):null}):null,df=({page:e,site:t,isFooterVisible:n})=>{let r=h(),i=r.isContentClipped||!1,a=`clippedPageContent`in r?r.clippedPageContent:null,o=lc(i?a:e.viewable_page_version.content,t.publication.url),s=e?.name===`Post`,[c,l]=(0,q.useState)(!1);(0,q.useEffect)(()=>(c||l(!0),()=>{l(!1)}),[]);let{isPageContentOverflowing:u,textColor:d,backgroundColor:f}=ic(o,t.publication.web_theme);if(!o)return null;let p=f??`transparent`;try{if(o?.content?.length){let e=o.content.at(-1);e?.attrs?.backgroundColor&&(p=e.attrs.backgroundColor)}}catch{p=f??`transparent`}let m=e.uses_post_editor||!1,g=e.viewable_page_version?.uses_raw_html||!1;return(0,J.jsxs)(J.Fragment,{children:[m?(0,J.jsx)(dc,{content:o}):uf(o,s?`rendered-post`:``),!n&&c&&!g?(0,J.jsx)(fc,{node:{type:`proprietaryFooter`,attrs:{id:`proprietaryFooter`,backgroundColor:p,color:d}},showPoweredByBeehiiv:!1,shouldRenderOverContent:!u}):null]})},ff=(e,t)=>{if(e&&`type`in e&&e.type!==`doc`||!e?.content||e.content.length===0)return e;let n=e.content[e.content.length-1],r=!!n?.attrs?.backgroundImage,{textColor:i}=nc(n,t),a={type:`proprietaryFooter`,attrs:{id:`proprietaryFooterContainer`,backgroundColor:r?`transparent`:n.attrs.backgroundColor,color:i}},o=[...e.content];
11return o.pop(),{...e,content:[...o,{...n,content:Array.isArray(n.content)?[...n.content,a]:[]}]}},pf=({site:e})=>{let t=e.viewable_site_version.footer,n=e.publication.web_theme;return uf(ff(t,n),`footer`)},mf=[`signup_modal`,`recommendations_modal`,`login_modal`],hf={signup_modal:`signup`,login_modal:`login`,recommendations_modal:`recommendations`},gf=new Set([`recommendations_modal`,`signup_modal`]),_f=({page:e,site:t})=>{let[n]=o(),r=n.get(`modal`),i=n.get(`draft`)===`true`,a=(0,q.useMemo)(()=>[...mf.map(e=>r!==hf[e]||i&&gf.has(e)?null:t.viewable_site_version[e]).filter(Boolean),...me.map(t=>{if(e?.viewable_page_version?.content){let n=e.viewable_page_version.content?.attrs?.data?.[t];if(n&&`type`in n&&n.type===`doc`&&n.content.length>0)return n.content[0]}return null}).filter(Boolean)],[t,e,r,i]);return a.length>0?uf(a,`!min-h-0`):null},vf=(0,q.createContext)({isOpen:!1,setIsOpen:()=>{},isFixed:!1}),yf=({node:e,children:t,screen:n})=>{let[r,i]=(0,q.useState)(!1);return(0,J.jsx)(vf.Provider,{value:{isOpen:r,setIsOpen:i,isFixed:e.attrs?.stickToTop??!1},children:(0,J.jsx)(xo,{element:e,screen:n,children:t})})},bf=({node:e,children:t,screen:n})=>{let{isOpen:r,setIsOpen:i,isFixed:a}=(0,q.useContext)(vf);return(0,q.useEffect)(()=>{r&&i(!1)},[l()]),(0,J.jsx)(Ya,{element:e,screen:n,onClick:()=>i(!r),attributes:{"data-is-open":r},controlbyselected:`false`,isFixed:a,children:t})},xf=({node:e,children:t,screen:n})=>{let{isOpen:r}=(0,q.useContext)(vf);return(0,J.jsx)(q.Suspense,{fallback:null,children:(0,J.jsx)(Xa,{element:e,screen:n,attributes:{"data-is-open":r},controlbyselected:`false`,children:t})})},Sf=({node:e,children:t,screen:n})=>(0,J.jsx)(Wa,{element:e,controlbyselected:`false`,screen:n,children:t}),Cf=({node:e,children:t,screen:n})=>(0,J.jsx)(_a,{element:e,screen:n,children:t}),wf=(e,t,n,r)=>!e||!e.attrs?e:_e(e,i=>{if(!i.attrs)return i;let a=e.attrs?.showWhen;a?a===`all`?i.attrs.visible=!0:a===`all_logged_out`?i.attrs.visible=!t:a===`all_logged_in`?i.attrs.visible=t:a===`paid`?i.attrs.visible=n&&t:a===`free`&&(i.attrs.visible=!n&&t):(i.attrs.visible=!0,(i.attrs.action===`login`||i.attrs.action===`sign_in`||i.attrs.action===`sign_up`)&&(i.attrs.visible=!t),i.attrs.action===`profile`&&(i.attrs.visible=t),i.attrs.action===`logout`&&(i.attrs.visible=t));let o=i.attrs.onClick===`action`||i.attrs.onClick===void 0&&!!i.attrs.action;return o&&`new_tab`in i.attrs&&(i.attrs.new_tab=!1),i.type===`navbar_item`&&i.attrs&&o&&t&&i.attrs.action===`profile`&&i.attrs.type===`user_button`&&(i.attrs.avatar=r?.avatar_url,i.attrs.firstName=r?.first_name,i.attrs.lastName=r?.last_name,i.attrs.email=r?.email,i.attrs.style===`button`?i.attrs.href=void 0:i.attrs.href=`/subscribe/${r?.subscriber_id}/manage`),i}),Tf=(e,t)=>{let n=e?.attrs&&`onClick`in e.attrs?e.attrs.onClick:void 0,r=e?.attrs&&`action`in e.attrs&&e.attrs.action,i=e.attrs?.href||``,a=n===`action`||n===void 0&&!!r,o,s,c=e.attrs?.isCustomLink;try{if(o=new URL(i),typeof window<`u`&&!c){let e=new URL(window.location.href);o.search=e.search,o.hash||=e.hash}}catch{}return a&&(typeof window<`u`&&(o=new URL(window.location.href)),r===`login`&&o?o.searchParams.set(`modal`,`login`):r===`sign_up`&&o?o.searchParams.set(`modal`,`signup`):r===`profile`&&o?o.pathname=`subscribe/${t?.subscriber_id||``}/manage`:r===`search`&&o?o.searchParams.set(`modal`,`search`):r===`logout`&&(o=void 0,s=()=>{T(`token`)})),!(e.attrs&&`new_tab`in e.attrs&&e.attrs?.new_tab)&&o&&!c&&(s=()=>{let e=o.pathname+o.search+o.hash;if(window?.history){let t={key:Math.random().toString(32).slice(2)};window.history.pushState(t,``,e)}window?.dispatchEvent&&window.dispatchEvent(new PopStateEvent(`popstate`))}),e.attrs&&`type`in e.attrs&&e.attrs?.type===`user_button`&&e.attrs?.action===`profile`&&e.attrs?.style===`dropdown`&&(s=void 0),s},Ef=e=>{let t=e.trim();if(!t)return`/`;try{return new URL(t).pathname}catch{return t.split(`?`)[0].split(`#`)[0]||`/`}},Df=e=>e===``||e===`/`?`/`:e.replace(/\/$/,``),Of=e=>{let t=l();return(0,q.useMemo)(()=>!e||/^(mailto|tel|javascript|data|file):/i.test(e)?!1:Df(Ef(e))===Df(t.pathname),[e,t.pathname])},kf=({node:e,children:t,screen:n})=>{let{subscription:r}=Dn(),i=r?.tier===`premium`,{isLoggedIn:a,site:o}=f(`root`)||{},s=Of(e.attrs?.href),c=wf(e,!!a,i,r),l=Tf(c,r),u=o?.theme_rules?.navbar_dropdown_item||{},d={};
11return Object.keys(u).forEach(e=>{u[e]?.forEach(t=>{c?.attrs&&!c.attrs[t]&&(d[t]=o?.primary_theme[e])})}),(0,J.jsx)(Ga,{element:{...c,attrs:{...c.attrs,...d}},screen:n,onClick:l,isActive:s,children:t})},Af=({node:e,children:t,screen:n})=>{let{subscription:r}=Dn(),i=r?.tier===`premium`,{isLoggedIn:a}=f(`root`)||{},o=Of(e.attrs?.type===`link`||e.attrs?.type===`button`?e.attrs?.href:void 0),s=wf(e,!!a,i,r);return(0,J.jsx)(Oo,{element:s,controlbyselected:`false`,screen:n,onClick:Tf(s,r),isActive:o,children:t})},jf=({node:e,children:t,screen:n})=>(0,J.jsx)(Af,{node:e,screen:n,children:t}),Mf=({node:e,children:t,screen:n})=>(0,J.jsx)(Mo,{element:e,screen:n,children:t}),Nf=({node:e,children:t,screen:n,parent:r})=>(0,J.jsx)(Po,{element:e,screen:n,parent:r,children:t}),Pf=({node:e,children:t,screen:n,parent:r})=>{switch(e.type){case`navbar_menu`:return(0,J.jsx)(yf,{node:e,screen:n,children:t});case`navbar_menu_list`:return(0,J.jsx)(Mf,{node:e,screen:n,children:t});case`navbar_menu_list_group`:return(0,J.jsx)(Nf,{node:e,screen:n,parent:r,children:t});case`navbar_item`:return(0,J.jsx)(jf,{node:e,screen:n,children:t});case`navbar_dropdown`:return(0,J.jsx)(Sf,{node:e,screen:n,children:t});case`navbar_dropdown_column`:return(0,J.jsx)(Cf,{node:e,screen:n,children:t});case`navbar_dropdown_item`:return(0,J.jsx)(kf,{node:e,screen:n,children:t});case`navbar_menu_burger`:return(0,J.jsx)(bf,{node:e,screen:n,children:t});case`navbar_menu_burger_content`:return(0,J.jsx)(xf,{node:e,screen:n,children:t});case`socials`:{let n=e;return(0,J.jsx)(Kd,{node:{...n,attrs:{...n.attrs,width:`auto`,maxWidth:`100%`,flexShrink:0}},children:t})}case`navbar_item_text_container`:case`navbar_dropdown_item_title`:case`navbar_dropdown_item_description`:return t;case`text`:return(0,J.jsx)(af,{node:e,children:t});default:return null}},Ff=(e,t,n)=>e?Array.isArray(e)?e.filter(Boolean).map((e,r)=>(0,J.jsx)(Pf,{node:e,screen:t,parent:n,children:`content`in e&&Array.isArray(e.content)?Ff(e.content,t,e):null},`${r}-${e?.attrs?.id}`)):(0,J.jsx)(Pf,{node:e,screen:t,parent:n,children:`content`in e&&Array.isArray(e.content)?Ff(e.content,t,e):null}):null,If=(e,t)=>{if(Array.isArray(e)){e.forEach(e=>{If(e,t)});return}e.attrs&&`type`in e.attrs&&e.attrs?.type===`user_button`&&e.attrs?.action===`profile`&&e.attrs?.style!==`button`&&(t?.theme_rules&&t?.primary_theme?(e.attrs.style=`dropdown`,e.attrs.href=void 0,e.attrs.showWhen=`all_logged_in`):e.attrs?.style===void 0&&(e.attrs.style=`button`,e.attrs.href=void 0,e.attrs.showWhen=`all_logged_in`)),`content`in e&&e.content&&Array.isArray(e.content)&&e.content.forEach(e=>{If(e,t)})},Lf=({site:e,page:t})=>{let{navbar:n,navbar_uses_html:r}=e.viewable_site_version;if(r&&n)return uf(n,`navbar`);if(!n)return null;let i=((t?.viewable_page_version?.content)?.content?.[0])?.attrs?.backgroundColor;if(n.type===`doc`){let t=n,r=t?.attrs?.data?.desktop,a=t?.attrs?.data?.mobile;return!r&&!a?null:(r&&(r.attrs.firstSectionBackgroundColor=i,If(r,e)),a&&(a.attrs.firstSectionBackgroundColor=i,If(a,e)),(0,J.jsxs)(J.Fragment,{children:[r&&(0,J.jsx)(`div`,{className:ha.navbarDesktopView,children:Ff(r,`desktop`)}),a&&(0,J.jsx)(`div`,{className:ha.navbarMobileView,children:Ff(a,`mobile`)})]}))}let a=si(n),o=oi(a);return If(a,e),If(o,e),(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`div`,{className:ha.navbarDesktopView,children:Ff(a,`desktop`)}),(0,J.jsx)(`div`,{className:ha.navbarMobileView,children:Ff(o,`mobile`)})]})},Rf=20,zf=()=>{let{handleCloseModal:e,handleOpenModal:t,currentModal:n}=B(),[r,i]=(0,q.useState)(``),a=n=>{n?t(`search`):e({preventScrollReset:!0})},o=n===`search`,{fetchPosts:s,posts:c,setPosts:l,setCurrentPage:u,showLoadMore:d,loadMorePosts:f}=Xu({defaultPosts:[],enabled:o,pagination:{per_page:Rf}}),p=c.map(e=>({id:e.id,title:e.web_title,description:e.web_subtitle,pathname:`/p/${e.slug}`})),m=e=>{u(0),i(e),l([]),s(e,{page:0})},h=()=>{f(r||void 0)};return(0,q.useEffect)(()=>{o&&(u(0),i(``),l([]),s(``,{page:0}))},[o]),(0,J.jsx)(j,{fallback:null,children:()=>(0,J.jsx)(Ns,{results:p,open:o,setOpen:a,search:r,setSearch:m,hasMore:d,onLoadMore:h})})},Bf=({page:e,site:t,children:n,forceShowNavbar:r,forceShowFooter:i,isSearchModalEnabled:a=!0})=>{let{isInProgress:o,showNavigation:s}=C(),{isPremiumGated:c,hasPremiumAccess:l,isFetchingSubscription:u,subscription:d}=Ys(e,t),{i18n:f}=v();if(!t)throw Error(`RefreshPageError`);if(t.publication.website_suspended)return(0,J.jsx)(Zs,{site:t});let p=o&&!s,m=r===!0||e?.viewable_page_version?.customization?.show_navbar!==!1&&!p,h=i===!0||e?.viewable_page_version?.customization?.show_footer!==!1&&!p,g=y().VITE_EXTERNAL_EMBED_DOMAIN||``;if(g===``)throw Error(`VITE_EXTERNAL_EMBED_DOMAIN should have a valid domain`);let _=(()=>
11{if(!g)return``;let e=new URL(t.publication.url).hostname.toLowerCase();e.startsWith(`www.`)&&(e=e.slice(4));let n=5381;for(let t=0;t<e.length;t++)n=n*33^e.charCodeAt(t);return`https://${Math.abs(n).toString(36)}.${g}`})();return(0,J.jsxs)(xi,{context:{responsiveImagesEnabled:!0,imagePriorityThreshold:5,publicationTimeZone:t.publication.time_zone,externalEmbedEnabled:t.publication.has_external_embed,externalEmbedUrl:_,language:f.language,adsensePublisherId:t.publication.has_adsense?t.adsense_publisher_id??void 0:void 0,rawHtmlPage:e?.viewable_page_version?.uses_raw_html??!1},children:[m&&(0,J.jsx)(Lf,{site:t,page:e}),c&&u?null:c&&!l&&e?.paywall?(0,J.jsx)(Js,{paywall:e.paywall,subscription:d,primaryTheme:t.primary_theme}):e?n?(0,J.jsxs)(`div`,{className:`relative`,children:[(0,J.jsx)(df,{site:t,page:e,isFooterVisible:h}),n]}):(0,J.jsx)(df,{site:t,page:e,isFooterVisible:h}):n,h&&(0,J.jsx)(pf,{site:t}),(0,J.jsx)(_f,{page:e,site:t}),a&&(0,J.jsx)(zf,{})]})};export{Xs as A,ol as C,tc as D,Rc as E,zs as F,Rs as I,Mi as L,Ws as M,Hs as N,$s as O,Vs as P,cl as S,zc as T,Hl as _,Fu as a,ml as b,Mu as c,hu as d,lu as f,ou as g,iu as h,Wu as i,Ks as j,ec as k,wu as l,su as m,uf as n,Pu as o,cu as p,Ku as r,Nu as s,Bf as t,Su as u,Ml as v,al as w,ll as x,Ol as y};
12//# sourceMappingURL=StaticPage-Babiqn2v.js.map
13//# debugId=584157ea-e52f-5027-9518-cb524801874a

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.