"use strict";(self.webpackChunksubstack=self.webpackChunksubstack||[]).push([["6918"],{13791:function(e,t,i){i.d(t,{v:()=>U});var s=i(7409),n=i(16584),r=i(30396),o=i(36808),a=i(99282),c=i(92027),d=i(95441),E=i(68833),l=i(7882),_=i(15771),p=i(82402),S=i(19081),A=i(6490),y=i(69891),I=i(58175),T=i(70379),k=i(87077),C=i(48884),N=i(31742);let m=e=>{let{iString:t}=C.mb.i(e||"en");return{Necessary:t("These cookies are essential for you to browse the website and use its features."),Performance:t("These cookies collect information about how you use a website, like which pages you visited and which links you clicked on."),Functionality:t("These cookies allow us to remember choices you have made in the past, and do things like auto-login")}},u=e=>{let{iString:t}=C.mb.i(e||"en");return[{name:"_ga family",id:N.YJ.GA_TRACKING,type:N.pt.PERFORMANCE,description:t("3rd party analytics tracking."),owner:N.js.PUBLISHER},{name:"Google Tag Manager",id:N.YJ.GA_TAG_MANAGER,type:N.pt.PERFORMANCE,description:t("Used for Google tag management and 3rd party analytics tracking."),owner:N.js.PUBLISHER},{name:"Facebook Pixel",id:N.YJ.FB_PIXEL,type:N.pt.PERFORMANCE,description:t("Used for facebook ad campaign 3rd party analytics."),owner:N.js.PUBLISHER},{name:"Twitter Pixel",id:N.YJ.TWITTER_PIXEL,type:N.pt.PERFORMANCE,description:t("Used for X (formerly known as Twitter) ad campaign 3rd party analytics."),owner:N.js.PUBLISHER},{name:"Parse.ly Pixel",id:N.YJ.PARSELY_PIXEL,type:N.pt.PERFORMANCE,description:t("Used for parse.ly 3rd party analytics."),owner:N.js.PUBLISHER},{name:"intro_popup_last_hidden_at",id:N.ky.INTRO_POPUP_LAST_HIDDEN_AT,type:N.pt.FUNCTIONALITY,description:t("Prevents showing introductory information the user has already seen."),owner:N.js.SUBSTACK},{name:"muxData",id:N.ky.MUX_DATA,type:N.pt.FUNCTIONALITY,description:t("Used for anonymous video metric collection and aggregation."),owner:N.js.SUBSTACK},{name:"like_upsell_last_shown_at",id:N.ky.LIKE_UPSELL_LAST_SHOWN_AT,type:N.pt.FUNCTIONALITY,description:t("Prevents users from repeatedly being shown features."),owner:N.js.SUBSTACK},{name:"chatbot_terms_last_accepted_at",id:N.ky.CHATBOT_TERMS_LAST_ACCEPTED_AT,type:N.pt.FUNCTIONALITY,description:t("Prevents users from repeatedly having to accept chatbot terms."),owner:N.js.SUBSTACK},{name:"preferred_language",id:N.ky.PREFERRED_LANGUAGE,type:N.pt.FUNCTIONALITY,description:t("Stores the user's preferred language"),owner:N.js.SUBSTACK},{name:"visit_id",id:N.ky.VISIT_ID,type:N.pt.PERFORMANCE,description:t("First party analytics tracking."),owner:N.js.SUBSTACK},{name:"ajs_anonymous_id",id:N.ky.ANONYMOUS_ID,type:N.pt.PERFORMANCE,description:t("First party analytics tracking."),owner:N.js.SUBSTACK},{name:"ab_testing_id",id:N.ky.AB_TESTING_ID,type:N.pt.PERFORMANCE,description:t("First party analytics tracking."),owner:N.js.SUBSTACK},{name:"ab_experiment_sampled",id:N.ky.AB_EXPERIMENT_SAMPLED,type:N.pt.PERFORMANCE,description:t("First party analytics tracking."),owner:N.js.SUBSTACK},{name:"_ga family",id:N.ky.GA_TRACKING,type:N.pt.PERFORMANCE,description:t("3rd party analytics tracking."),owner:N.js.SUBSTACK},{name:"AdQuick tracking pixel",id:N.ky.AD_QUICK_TRACKING_PIXEL,type:N.pt.PERFORMANCE,description:t("3rd party analytics tracking."),owner:N.js.SUBSTACK},{name:"Meta tracking pixel",id:N.ky.META_TRACKING_PIXEL,type:N.pt.PERFORMANCE,description:t("3rd party analytics tracking."),owner:N.js.SUBSTACK},{name:"_dd_s",id:N.ky.DATADOG_S,type:N.pt.PERFORMANCE,description:t("First party cookie used to identify and diagnose technical problems on the site."),owner:N.js.SUBSTACK},{name:"fs_uid",id:N.ky.FULLSTORY_UID,type:N.pt.PERFORMANCE,description:t("Used to track user actions across the site for debugging purposes."),owner:N.js.SUBSTACK},{name:"__zlcmid",id:N.ky.ZENDESK_ID,type:N.pt.PERFORMANCE,description:t("Stores visitor’s machine-id for authentication with Zendesk chat widget."),owner:N.js.SUBSTACK},{name:"substack.sid",id:N.ky.SESSION_SID,type:N.pt.NECESSARY,description:t("Session identifier."),owner:N.js.SUBSTACK},{name:"connect.sid",id:N.ky.CUSTOM_DOMAIN_SESSION_SID,type:N.pt.NECESSARY,description:t("Session identifier."),owner:N.js.SUBSTACK},{name:"substack.lli",id:N.ky.LIKELY_LOGGED_IN,type:N.pt.NECESSARY,description:t("Communicates login state across first party domains"),owner:N.js.SUBSTACK},{name:"disable_html_pixels",id:N.ky.DISABLE_HTML_PIXELS,type:N.pt.NECESSARY,description:t("Ensures a consistent user experience across network requests."),owner:N.js.SUBSTACK},{name:"experiment_",id:N.ky.DISABLE_EXPERIMENTS,type:N.pt.NECESSARY,description:t("Ensures a consistent user experience across network requests."),owner:N.js.SUBSTACK},{name:"hideCookieBanner",id:N.ky.HIDE_COOKIE_BANNER,type:N.pt.NECESSARY,description:t("Ensures a consistent user experience across network requests."),owner:N.js.SUBSTACK},{name:"cf_clearance",id:N.ky.CF_CLEARENCE,type:N.pt.NECESSARY,description:t("Used to grant access to our servers from our Content Delivery Network."),owner:N.js.SUBSTACK},{name:"__cf_bm",id:N.ky.CF_BM,type:N.pt.NECESSARY,description:t("Used to block bot access to the site"),owner:N.js.SUBSTACK},{name:"AWSALBTG / AWSALBTGCORS",id:N.ky.AWSALB,type:N.pt.NECESSARY,description:t("Ensures a consistent user experience across network requests."),owner:N.js.SUBSTACK},{name:"cookie_storage_key",id:N.ky.COOKIE_STORAGE_KEY,type:N.pt.NECESSARY,description:t("Allows us to store your cookie preferences."),owner:N.js.SUBSTACK}]},O=u().filter(e=>e.owner===N.js.SUBSTACK&&e.type!==N.pt.NECESSARY).map(e=>e.id),R=u().filter(e=>e.owner===N.js.PUBLISHER&&e.type!==N.pt.NECESSARY).map(e=>e.id),P={[N.ky.GA_TRACKING]:"_ga",[N.ky.GA_TAG_MANAGER]:"_ga",[N.ky.MUX_DATA]:"muxData",[N.ky.ANONYMOUS_ID]:N.Ic.ANONYMOUS_ID,[N.ky.VISIT_ID]:N.Ic.VISIT_ID,[N.ky.AB_TESTING_ID]:N.Ic.AB_TESTING_ID,[N.ky.AB_EXPERIMENT_SAMPLED]:N.Ic.AB_EXPERIMENT_SAMPLED,[N.ky.LIKE_UPSELL_LAST_SHOWN_AT]:N.Ic.LIKE_UPSELL_LAST_SHOWN_AT,[N.ky.INTRO_POPUP_LAST_HIDDEN_AT]:N.Ic.INTRO_POPUP_LAST_HIDDEN_AT,[N.ky.DISABLE_HTML_PIXELS]:N.Ic.DISABLE_HTML_PIXELS,[N.ky.COOKIE_STORAGE_KEY]:N.Ic.COOKIE_STORAGE_KEY,[N.ky.EXPERIMENTS]:"experiment_",[N.ky.DATADOG_S]:"_dd_s",[N.ky.FULLSTORY_UID]:"fs_",[N.ky.ZENDESK_ID]:"__zlcmid",[N.YJ.GA_TAG_MANAGER]:"_ga",[N.YJ.GA_TRACKING]:"_ga",[N.YJ.FB_PIXEL]:"_fbp",[N.YJ.TWITTER_PIXEL]:"_twq",[N.YJ.PARSELY_PIXEL]:"_parsely_visitor"};N.ky.AB_TESTING_ID,N.ky.AB_EXPERIMENT_SAMPLED,N.ky.ANONYMOUS_ID,N.ky.VISIT_ID,N.ky.EXPERIMENTS,N.ky.DISABLE_HTML_PIXELS,N.ky.DISABLE_EXPERIMENTS,N.ky.COOKIE_STORAGE_KEY,null==P||P[N.ky.ANONYMOUS_ID];let B="cellPadding-f5tfb5",h=e=>{let{open:t,onSubdomain:i,close:a}=e,[c,p]=(0,r.eJ)(i?N.js.PUBLISHER:N.js.SUBSTACK),[I,k]=(0,r.eJ)(!1),[C,m]=(0,r.eJ)(new Set([...O,...R])),{popToast:P}=(0,T.pm)(),{iString:B}=(0,d.M1)(),{language:h}=(0,d.M1)(),L=u(h),{refetch:g}=(0,l.ib)({pathname:"/api/v1/cookie_preferences",method:"POST"});(0,r.d4)(()=>{t&&(0,E.j)(E.FP.COOKIE_MANAGEMENT_MODAL_SEEN,{})},[t]);let M=async e=>{let{substackDisabledCookies:t,pubDisabledCookies:i}=e;o.set(N.ky.HIDE_COOKIE_BANNER,new Date().toJSON(),{expires:31536e6}),await g({json:{pubDisabledCookies:i,substackDisabledCookies:t}})},U=async()=>{let e=Array.from(C),t=Object.values(N.YJ),i=Object.values(N.ky),r=[],o=[];I&&(r=e.filter(e=>i.includes(e)),o=e.filter(e=>t.includes(e))),await M({substackDisabledCookies:r,pubDisabledCookies:o}),(0,E.j)(E.FP.COOKIE_PREFERENCES_SET,{disabledCookies:e}),(0,E.j)(E.FP.COOKIE_MANAGEMENT_MODAL_SUBMITTED,{disabledCookies:e}),P(e=>(0,n.tZ)(T.FN,(0,s._)({text:B("Preferences saved")},e))),window.location.reload(),a()},D=async()=>{await M({}),(0,E.j)(E.FP.COOKIE_PREFERENCES_SET,{disabledCookies:[]}),(0,E.j)(E.FP.COOKIE_MANAGEMENT_MODAL_SUBMITTED,{disabledCookies:[]}),P(e=>(0,n.tZ)(T.FN,(0,s._)({text:B("Preferences saved")},e))),window.location.reload(),a()},f=e=>{I||k(!0),m(t=>{let i=new Set(t);return i.has(e)?i.delete(e):i.add(e),i}),(0,E.j)(E.FP.COOKIE_MANAGEMENT_MODAL_COOKIE_TOGGLED,{cookie:e})},K=[{value:N.js.PUBLISHER,label:"Publisher"},{value:N.js.SUBSTACK,label:"Substack"}];return(0,n.BX)(A.u_,{isOpen:t,onClose:U,className:"modal-bBpQD3",disableCloseOnBackdropClick:!0,children:[(0,n.tZ)(A.xB,{showClose:!0,onClose:()=>{(0,E.j)(E.FP.COOKIE_MANAGEMENT_MODAL_DISMISSED,{}),U()},title:B("Cookie Preferences")}),(0,n.tZ)(A.fe,{className:"grow-CBXF8f",children:(0,n.BX)(S.tu,{flex:"fill",gap:8,children:[i&&(0,n.tZ)(y.n,{tabs:K,value:c,onChange:p}),(0,n.BX)(S.tu,{flex:"fill",children:["publisher"===c&&(0,n.tZ)(w,{cookies:L.filter(e=>e.owner===N.js.PUBLISHER),disabledCookies:C,toggleState:f}),"substack"===c&&(0,n.tZ)(w,{cookies:L.filter(e=>e.owner===N.js.SUBSTACK),disabledCookies:C,toggleState:f})]})]})}),(0,n.tZ)(A.mz,{primaryButton:(0,n.tZ)(_.zx,{onClick:U,children:I?B("Save preferences"):B("Reject All")}),secondaryButton:(0,n.tZ)(_.zx,{onClick:D,children:B("Accept all")}),showDivider:!0})]})},w=e=>{let{cookies:t,disabledCookies:i,toggleState:r}=e;return(0,n.tZ)("table",{className:"table-m2WTld",children:(0,n.tZ)("tbody",{children:t.map(e=>(0,n.tZ)(L,(0,a._)((0,s._)({},e),{onToggle:()=>r(e.id),enabled:!i.has(e.id)})))})})},L=e=>{let{name:t,type:i,description:s,enabled:r,onToggle:o}=e;return(0,n.BX)("tr",{className:"rowBorderBottom-tHD_Mb",children:[(0,n.tZ)("td",{className:B,children:(0,n.BX)(S.tu,{gap:2,alignItems:"start",children:[(0,n.tZ)(I.xv.B4,{children:t}),(0,n.tZ)(g,{cookieType:i})]})}),(0,n.tZ)("td",{className:B,children:(0,n.tZ)(I.xv.B5,{color:"secondary",children:s})}),(0,n.tZ)("td",{className:B,children:i!==N.pt.NECESSARY&&(0,n.tZ)(p.X,{checked:r,onChange:o})})]},t)},g=e=>{let{cookieType:t}=e,{language:i}=(0,d.M1)(),s=m(i);return(0,n.tZ)(k.u,{text:s[t],children:(0,n.BX)(S.gq,{justifyContent:"start",alignItems:"center",gap:4,children:[(0,n.tZ)(I.xv.Meta,{children:t}),(0,n.tZ)(c.Z,{size:16,color:"var(--color-fg-secondary)"})]})})},M={cookieBanner:"cookieBanner-fZ6hup"},U=e=>{let{onSubdomain:t}=e,[i,a]=(0,r.eJ)(!1),[c,p]=(0,r.eJ)(!1),{popToast:A}=(0,T.pm)(),{iString:y}=(0,d.M1)(),{refetch:k}=(0,l.ib)({pathname:"/api/v1/cookie_preferences",method:"POST"});(0,r.d4)(()=>{(0,E.j)(E.FP.COOKIE_BANNER_SEEN,{})},[]);let C=async e=>{let t=e?[]:O,i=e?[]:R;o.set(N.ky.HIDE_COOKIE_BANNER,new Date().toJSON(),{expires:31536e6}),await k({json:{pubDisabledCookies:i,substackDisabledCookies:t}}),(0,E.j)(E.FP.COOKIE_BANNER_CLICKED,{acceptAll:e}),(0,E.j)(E.FP.COOKIE_PREFERENCES_SET,{disabledCookies:[...t,...i]}),p(!0),A(e=>(0,n.tZ)(T.FN,(0,s._)({text:y("Cookie preferences saved")},e))),window.location.reload()};return(0,n.BX)("div",{children:[!c&&(0,n.tZ)(S.tu,{className:M.cookieBanner,alignItems:"center",children:(0,n.BX)(S.tu,{alignItems:"center",gap:{mobile:4,desktop:8},padding:4,children:[(0,n.tZ)(I.xv.H4,{translated:!0,children:"Cookie Policy"}),(0,n.BX)(I.xv.B5,{color:"secondary",translated:!0,style:{paddingRight:"16px"},children:["We use necessary cookies to make our site work. With your consent, we also set performance and functionality cookies that help us make improvements by measuring traffic on our site and we process respective personal data. You can withdraw your consent at any time. For more detailed information about the cookies, your personal data and your rights, please see our"," ",(0,n.tZ)(I.xv.B5,{color:"secondary",decoration:"underline",as:"a",href:"https://substack.com/tos",children:"privacy policy"}),"."]}),(0,n.BX)(S.hs,{gap:{mobile:12,desktop:6},direction:{mobile:"column",desktop:"row"},children:[(0,n.tZ)(_.zx,{priority:"secondary",onClick:()=>{a(!0),p(!0)},size:"sm",children:y("Manage Cookies")}),(0,n.tZ)(_.zx,{priority:"secondary",onClick:()=>C(!1),size:"sm",children:y("Only Necessary")}),(0,n.tZ)(_.zx,{priority:"secondary",onClick:()=>C(!0),size:"sm",children:y("Accept all")})]})]})}),(0,n.tZ)(h,{onSubdomain:t,open:i,close:()=>{a(!1)}})]})}}}]);