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]="bcedfc77-5ed4-5d17-babc-cb7ada5491f3")}catch(e){}}(); 3import{a as e,n as t,t as n}from"./jsx-runtime-CMgEUHpv.js";import{V as r,g as i,m as a,v as o}from"./dist-CAHjj65Z.js";import{t as s}from"./useTranslation-BymTnaHx.js";import{O as c,l,p as u}from"./components-B8bHjdou.js";import{n as d,r as f}from"./types-BpAlB3Az.js";import{t as p}from"./classnames-PxzWHlFm.js";import{t as m}from"./Text-B4PqLHDw.js";import{t as h}from"./Typography-DJfjxaJy.js";import{t as g}from"./useWebThemeContext-BJu9VsBR.js";import{t as _}from"./ChevronRightIcon-CBCJUmns.js";import{n as v,t as y}from"./HeroChatIcon-DcqIDk36.js";import{t as b}from"./XMarkIcon-CtiWC60Y.js";import{n as x,r as S,t as C}from"./BackButton-vJJKbu5V.js";import{t as w}from"./MarkDownRender-D4I8PP9R.js";import{n as T}from"./LockClosedIcon-nbfIsPgW.js";import{a as E,i as D,r as O,s as k,t as A}from"./SlideUpModal-CBCD62fe.js";import{t as j}from"./StatusInputs-Bo_bMqPM.js";import{t as M}from"./useNonRevalidatingFetcher-DstApf5k.js";import{t as N}from"./useToast-aQCYBESc.js";import{t as ee}from"./useIsLoggedIn-hXilkn2W.js";import{t as te}from"./Image-B1Otrzxn.js";import{t as P}from"./Button-DG1GtAKw.js";import{t as F}from"./menu-BwR_gk66.js";import{t as ne}from"./dialog-DQRLOcH9.js";import{t as I}from"./transition-zOPc9j2i.js";import{t as re}from"./Input-C6IbD1Sk.js";import{t as ie}from"./ProgressIndicator-tdz9wH2C.js";import{t as ae}from"./useIsMobile-BU77Oiqq.js";import{t as oe}from"./FreeGatedContent-BUY3IKki.js";import{t as se}from"./Breadcrumbs-J9XnVb3K.js";import{t as ce}from"./PostCard-DDx38Cni.js";var L=e(r());function le({title:e,titleId:t,...n},r){return L.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?L.createElement(`title`,{id:t},e):null,L.createElement(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M2.25 12.76c0 1.6 1.123 2.994 2.707 3.227 1.087.16 2.185.283 3.293.369V21l4.076-4.076a1.526 1.526 0 0 1 1.037-.443 48.282 48.282 0 0 0 5.68-.494c1.584-.233 2.707-1.626 2.707-3.228V6.741c0-1.602-1.
3123-2.995-2.707-3.228A48.394 48.394 0 0 0 12 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018Z`}))}var ue=L.forwardRef(le);function de({title:e,titleId:t,...n},r){return L.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?L.createElement(`title`,{id:t},e):null,L.createElement(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M15.75 19.5 8.25 12l7.5-7.5`}))}var fe=L.forwardRef(de);function pe({title:e,titleId:t,...n},r){return L.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?L.createElement(`title`,{id:t},e):null,L.createElement(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M6.75 12a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0ZM12.75 12a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0ZM18.75 12a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0Z`}))}var me=L.forwardRef(pe);function he({title:e,titleId:t,...n},r){return L.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?L.createElement(`title`,{id:t},e):null,L.createElement(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126ZM12 15.75h.007v.008H12v-.008Z`}))}var ge=L.forwardRef(he);function _e({title:e,titleId:t,...n},r){return L.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?L.createElement(`title`,{id:t},e):null,L.createElement(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0`}))}var ve=L.forwardRef(_e),ye=t(((e,t)=>{var n=1e3,r=n*60,i=r*60,a=i*24,o=a*365.25;t.exports=function(e,t){t||={};var n=typeof e;if(n===`string`&&e.length>0)return s(e);if(n===`number`&&isNaN(e)===!1)return t.long?l(e):c(e);throw Error(`val is not a non-empty string or a valid number. val=`+JSON.stringify(e))};function s(e){if(e=String(e),!(e.length>100)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var s=parseFloat(t[1]);switch((t[2]||`ms`).toLowerCase()){case`years`:case`year`:case`yrs`:case`yr`:case`y`:return s*o;case`days`:case`day`:case`d`:return s*a;case`hours`:case`hour`:case`hrs`:case`hr`:case`h`:return s*i;case`minutes`:case`minute`:case`mins`:case`min`:case`m`:return s*r;case`seconds`:case`second`:case`secs`:case`sec`:case`s`:return s*n;case`milliseconds`:case`millisecond`:case`msecs`:case`msec`:case`ms`:return s;default:return}}}}function c(e){return e>=a?Math.round(e/a)+`d`:e>=i?Math.round(e/i)+`h`:e>=r?Math.round(e/r)+`m`:e>=n?Math.round(e/n)+`s`:e+`ms`}function l(e){return u(e,a,`day`)||u(e,i,`hour`)||u(e,r,`minute`)||u(e,n,`second`)||e+` ms`}function u(e,t,n){if(!(e<t))return e<t*1.5?Math.floor(e/t)+` `+n:Math.ceil(e/t)+` `+n+`s`}})),be=t(((e,t)=>{e=t.exports=i.debug=i.default=i,e.coerce=c,e.disable=o,e.enable=a,e.enabled=s,e.humanize=ye(),e.names=[],e.skips=[],e.formatters={};var n;function r(t){var n=0,r;for(r in t)n=(n<<5)-n+t.charCodeAt(r),n|=0;return e.colors[Math.abs(n)%e.colors.length]}function i(t){function i(){if(i.enabled){var t=i,r=+new Date;t.diff=r-(n||r),t.prev=n,t.curr=r,n=r;for(var a=Array(arguments.length),o=0;o<a.length;o++)a[o]=arguments[o];a[0]=e.coerce(a[0]),typeof a[0]!=`string`&&a.unshift(`%O`);var s=0;a[0]=a[0].replace(/%([a-zA-Z%])/g,function(n,r){if(n===`%%`)return n;s++;var i=e.formatters[r];if(typeof i==`function`){var o=a[s];n=i.call(t,o),a.splice(s,1),s--}return n}),e.formatArgs.call(t,a),(i.log||e.log||console.log.bind(console)).apply(t,a)}}return i.namespace=t,i.enabled=e.enabled(t),i.useColors=e.useColors(),i.color=r(t),typeof e.init==`function`&&e.init(i),i}function a(t){e.save(t),e.names=[],e.skips=[];for(var n=(typeof t==`string`?t:``).split(/[\s,]+/),r=n.length,i=0;i<r;i++)n[i]&&(t=n[i].replace(/\*/g,`.*?`),t[0]===`-`?e.skips.push(RegExp(`^`+t.substr(1)+`$`)):e.names.push(RegExp(`^`+t+`$`)))}function o(){e.enable(``)}
3function s(t){var n,r;for(n=0,r=e.skips.length;n<r;n++)if(e.skips[n].test(t))return!1;for(n=0,r=e.names.length;n<r;n++)if(e.names[n].test(t))return!0;return!1}function c(e){return e instanceof Error?e.stack||e.message:e}})),xe=t(((e,t)=>{e=t.exports=be(),e.log=i,e.formatArgs=r,e.save=a,e.load=o,e.useColors=n,e.storage=typeof chrome<`u`&&chrome.storage!==void 0?chrome.storage.local:s(),e.colors=[`lightseagreen`,`forestgreen`,`goldenrod`,`dodgerblue`,`darkorchid`,`crimson`];function n(){return typeof window<`u`&&window.process&&window.process.type===`renderer`?!0:typeof document<`u`&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<`u`&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}e.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return`[UnexpectedJSONParseError]: `+e.message}};function r(t){var n=this.useColors;if(t[0]=(n?`%c`:``)+this.namespace+(n?` %c`:` `)+t[0]+(n?`%c `:` `)+`+`+e.humanize(this.diff),n){var r=`color: `+this.color;t.splice(1,0,r,`color: inherit`);var i=0,a=0;t[0].replace(/%[a-zA-Z%]/g,function(e){e!==`%%`&&(i++,e===`%c`&&(a=i))}),t.splice(a,0,r)}}function i(){return typeof console==`object`&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function a(t){try{t==null?e.storage.removeItem(`debug`):e.storage.debug=t}catch{}}function o(){var t;try{t=e.storage.debug}catch{}return!t&&typeof process<`u`&&`env`in process&&(t={}.DEBUG),t}e.enable(o());function s(){try{return window.localStorage}catch{}}})),Se=t(((e,t)=>{var n=xe()(`jsonp`);t.exports=a;var r=0;function i(){}function a(e,t,a){typeof t==`function`&&(a=t,t={}),t||={};var o=t.prefix||`__jp`,s=t.name||o+ r++,c=t.param||`callback`,l=t.timeout==null?6e4:t.timeout,u=encodeURIComponent,d=document.getElementsByTagName(`script`)[0]||document.head,f,p;l&&(p=setTimeout(function(){m(),a&&a(Error(`Timeout`))},l));function m(){f.parentNode&&f.parentNode.removeChild(f),window[s]=i,p&&clearTimeout(p)}function h(){window[s]&&m()}return window[s]=function(e){n(`jsonp got`,e),m(),a&&a(null,e)},e+=(~e.indexOf(`?`)?`&`:`?`)+c+`=`+u(s),e=e.replace(`?&`,`?`),n(`jsonp req "%s"`,e),f=document.createElement(`script`),f.src=e,d.parentNode.insertBefore(f,d),h}})),R=n(),z=e(p(),1),B=e(Se(),1),Ce=Object.defineProperty,we=Object.defineProperties,Te=Object.getOwnPropertyDescriptors,V=Object.getOwnPropertySymbols,Ee=Object.prototype.hasOwnProperty,De=Object.prototype.propertyIsEnumerable,Oe=(e,t,n)=>t in e?Ce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,H=(e,t)=>{for(var n in t||={})Ee.call(t,n)&&Oe(e,n,t[n]);if(V)for(var n of V(t))De.call(t,n)&&Oe(e,n,t[n]);return e},U=(e,t)=>we(e,Te(t)),W=(e,t)=>{var n={};for(var r in e)Ee.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&V)for(var r of V(e))t.indexOf(r)<0&&De.call(e,r)&&(n[r]=e[r]);return n};function ke(e,t){return L.Children.map(e,e=>!(0,L.isValidElement)(e)||e.props.fill!==void 0?e:(0,L.cloneElement)(e,{fill:t}))}function G(e){var t=e,{bgStyle:n={},borderRadius:r=0,children:i,color:a,iconFillColor:o=`white`,round:s=!1,size:c=64}=t,l=W(t,[`bgStyle`,`borderRadius`,`children`,`color`,`iconFillColor`,`round`,`size`]);let u=ke(i,o);return(0,R.jsxs)(`svg`,U(H({viewBox:`0 0 64 64`,width:c,height:c},l),{children:[s?(0,R.jsx)(`circle`,{cx:`32`,cy:`32`,r:`32`,fill:a,style:n}):(0,R.jsx)(`rect`,{width:`64`,height:`64`,rx:r,ry:r,fill:a,style:n}),u]}))}var Ae=class extends Error{constructor(e){super(e),this.name=`AssertionError`}};function K(e,t){if(!e)throw new Ae(t)}function q(e){let t=Object.entries(e).filter(([,e])=>e!=null).map(([e,t])=>`${encodeURIComponent(e)}=${encodeURIComponent(String(t))}`);return t.length>0?`?${t.join(`&`)}`:``}var je={bluesky:`Share on Bluesky`,email:`Share by email`,facebook:`Share on Facebook`,facebookmessenger:`Share in Messenger`,gab:`Share on Gab`,hatena:`Share on Hatena`,instapaper:`Save to Instapaper`,line:`Share on Line`,linkedin:`Share on LinkedIn`,livejournal:`Share on LiveJournal`,mailru:`Share on Mail.ru`,ok:`Share on OK`,pinterest:`Pin on Pinterest`,pocket:`Save to Pocket`,reddit:`Share on Reddit`,telegram:`Share on Telegram`,threads:`Share on Threads`,tumblr:`Share on Tumblr`,twitter:`Share on X`,viber:`Share on Viber`,vk:`Share on VK`,weibo:`Share on Weibo`,whatsapp:`Share on WhatsApp`,workplace:`Share on Workplace`},Me=e=>!!e&&(typeof e==`object`||typeof e==`function`)&&`then`in e&&typeof e.then==`function`,Ne=(e,t)=>({left:window.outerWidth/2+(window.screenX||window.screenLeft||0)-e/2,top:window.outerHeight/2+(window.screenY||window.screenTop||0)-t/2}),Pe=(e,t)=>
3({top:(window.screen.height-t)/2,left:(window.screen.width-e)/2});function Fe(e){let t=L.Children.toArray(e);if(t.length!==1)return;let[n]=t;if((0,L.isValidElement)(n))return n.props.round?`50%`:n.props.borderRadius??0}function Ie(e){return L.Children.toArray(e).some(e=>typeof e==`string`?e.trim().length>0:typeof e==`number`?!0:(0,L.isValidElement)(e)?Ie(e.props.children):!1)}function Le(e,t,n){var r=t,{height:i,width:a}=r,o=W(r,[`height`,`width`]);let s=H({height:i,width:a,location:`no`,toolbar:`no`,status:`no`,directories:`no`,menubar:`no`,scrollbars:`yes`,resizable:`no`,centerscreen:`yes`,chrome:`yes`},o),c=window.open(e,``,Object.keys(s).map(e=>`${e}=${s[e]}`).join(`, `));if(n){let e=window.setInterval(()=>{try{(c===null||c.closed)&&(window.clearInterval(e),n(c))}catch(e){console.error(e)}},1e3)}return c}function J(e){var t=e,{"aria-label":n,"aria-labelledby":r,beforeOnClick:i,children:a,className:o,disabled:s,disabledStyle:c={opacity:.6},forwardedRef:l,htmlTitle:u,networkLink:d,networkName:f,onClick:p,onShareWindowClose:m,openShareDialogOnClick:h=!0,opts:g,resetButtonStyle:_=!0,style:v,title:y,type:b=`button`,url:x,windowHeight:S=400,windowPosition:C=`windowCenter`,windowWidth:w=550}=t,T=W(t,[`aria-label`,`aria-labelledby`,`beforeOnClick`,`children`,`className`,`disabled`,`disabledStyle`,`forwardedRef`,`htmlTitle`,`networkLink`,`networkName`,`onClick`,`onShareWindowClose`,`openShareDialogOnClick`,`opts`,`resetButtonStyle`,`style`,`title`,`type`,`url`,`windowHeight`,`windowPosition`,`windowWidth`]);let E=Fe(a),D=!n&&!r&&!Ie(a)?je[f]:void 0,O=async e=>{if(s)return;let t=d(x,g);if(e.preventDefault(),i){let e=i();Me(e)&&await e}h&&Le(t,H({height:S,width:w},C===`windowCenter`?Ne(w,S):Pe(w,S)),m),p&&p(e,t)},k=(0,z.default)(`react-share__ShareButton`,{"react-share__ShareButton--disabled":!!s,disabled:!!s},o),A=H(H(_?{backgroundColor:`transparent`,border:`none`,padding:0,display:`inline-flex`,borderRadius:E,outlineOffset:2,font:`inherit`,color:`inherit`,cursor:`pointer`}:{},v),s&&c);return(0,R.jsx)(`button`,U(H({},T),{"aria-label":n||D,"aria-labelledby":r,className:k,disabled:s,onClick:O,ref:l,style:A,title:u,type:b,children:a}))}function Re(e,{title:t,separator:n}){return K(e,`bluesky.url`),`https://bsky.app/intent/compose`+q({text:t?t+n+e:e})}var ze=(0,L.forwardRef)((e,t)=>{var n=e,{separator:r,title:i}=n;return(0,R.jsx)(J,U(H({},W(n,[`separator`,`title`])),{forwardedRef:t,networkName:`bluesky`,networkLink:Re,opts:{title:i,separator:r||` `},windowHeight:460,windowPosition:`windowCenter`,windowWidth:660}))});ze.displayName=`BlueskyShareButton`;function Be(e){return(0,R.jsx)(G,U(H({color:`#7f7f7f`},e),{children:(0,R.jsx)(`path`,{d:`M17,22v20h30V22H17z M41.1,25L32,32.1L22.9,25H41.1z M20,39V26.6l12,9.3l12-9.3V39H20z`})}))}function Ve(e,{subject:t,body:n,separator:r}){return`mailto:`+q({subject:t,body:n?n+r+e:e})}var He=(0,L.forwardRef)((e,t)=>{var n=e,{body:r,separator:i,subject:a}=n;return(0,R.jsx)(J,U(H({},W(n,[`body`,`separator`,`subject`])),{forwardedRef:t,networkName:`email`,networkLink:Ve,onClick:(e,t)=>{window.location.href=t},openShareDialogOnClick:!1,opts:{subject:a,body:r,separator:i||` `}}))});He.displayName=`EmailShareButton`;function Ue(e){return(0,R.jsx)(G,U(H({color:`#0866FF`},e),{children:(0,R.jsx)(`path`,{d:`M34.1,47V33.3h4.6l0.7-5.3h-5.3v-3.4c0-1.5,0.4-2.6,2.6-2.6l2.8,0v-4.8c-0.5-0.1-2.2-0.2-4.1-0.2 c-4.1,0-6.9,2.5-6.9,7V28H24v5.3h4.6V47H34.1z`})}))}function We(e,{appId:t,redirectUri:n,to:r}){return`https://www.facebook.com/dialog/send`+q({link:e,redirect_uri:n||e,app_id:t,to:r})}var Ge=(0,L.forwardRef)((e,t)=>{var n=e,{appId:r,redirectUri:i,to:a}=n;return(0,R.jsx)(J,U(H({},W(n,[`appId`,`redirectUri`,`to`])),{forwardedRef:t,networkName:`facebookmessenger`,networkLink:We,opts:{appId:r,redirectUri:i,to:a},windowHeight:820,windowWidth:1e3}))});Ge.displayName=`FacebookMessengerShareButton`;function Ke(e,{hashtag:t}){return K(e,`facebook.url`),`https://www.facebook.com/sharer/sharer.php`+q({u:e,hashtag:t})}var qe=(0,L.forwardRef)((e,t)=>{var n=e,{hashtag:r}=n;return(0,R.jsx)(J,U(H({},W(n,[`hashtag`])),{forwardedRef:t,networkName:`facebook`,networkLink:Ke,opts:{hashtag:r},windowHeight:400,windowWidth:550}))});qe.displayName=`FacebookShareButton`;function Je(){let e=(0,L.useRef)(!1);return(0,L.useEffect)(()=>(e.current=!0,()=>{e.current=!1}),[]),(0,L.useCallback)(()=>e.current,[])}function Ye(e){var t=e,{children:n=e=>e,className:r,getCount:i,url:a}=t,o=W(t,[`children`,`className`,`getCount`,`url`]);
3let s=Je(),[c,l]=(0,L.useState)(void 0),[u,d]=(0,L.useState)(!1);return(0,L.useEffect)(()=>{d(!0),i(a,e=>{s()&&(l(e),d(!1))})},[a]),(0,R.jsx)(`span`,U(H({className:(0,z.default)(`react-share__ShareCount`,r)},o),{children:!u&&c!==void 0&&n(c)}))}function Y(e){let t=t=>(0,R.jsx)(Ye,H({getCount:e},t));return t.displayName=`ShareCount(${e.name})`,t}function Xe(e,t){(0,B.default)(`https://graph.facebook.com/?id=${e}&fields=og_object{engagement}`,(e,n)=>{t(!e&&n&&n.og_object&&n.og_object.engagement?n.og_object.engagement.count:void 0)})}Y(Xe);function Ze(e,{title:t}){return K(e,`hatena.url`),`http://b.hatena.ne.jp/add?mode=confirm&url=${e}&title=${t}`}var Qe=(0,L.forwardRef)((e,t)=>{var n=e,{title:r}=n;return(0,R.jsx)(J,U(H({},W(n,[`title`])),{forwardedRef:t,networkName:`hatena`,networkLink:Ze,opts:{title:r},windowHeight:460,windowPosition:`windowCenter`,windowWidth:660}))});Qe.displayName=`HatenaShareButton`;function $e(e,t){(0,B.default)(`https://bookmark.hatenaapis.com/count/entry`+q({url:e}),(e,n)=>{t(n??void 0)})}Y($e);function et(e,{title:t,description:n}){return K(e,`instapaper.url`),`http://www.instapaper.com/hello2`+q({url:e,title:t,description:n})}var tt=(0,L.forwardRef)((e,t)=>{var n=e,{description:r,title:i}=n;return(0,R.jsx)(J,U(H({},W(n,[`description`,`title`])),{forwardedRef:t,networkName:`instapaper`,networkLink:et,opts:{title:i,description:r},windowHeight:500,windowPosition:`windowCenter`,windowWidth:500}))});tt.displayName=`InstapaperShareButton`;function nt(e,{title:t}){return K(e,`line.url`),`https://social-plugins.line.me/lineit/share`+q({url:e,text:t})}var rt=(0,L.forwardRef)((e,t)=>{var n=e,{title:r}=n;return(0,R.jsx)(J,U(H({},W(n,[`title`])),{forwardedRef:t,networkName:`line`,networkLink:nt,opts:{title:r},windowHeight:500,windowWidth:500}))});rt.displayName=`LineShareButton`;function it(e){return(0,R.jsx)(G,U(H({color:`#0077B5`},e),{children:(0,R.jsx)(`path`,{d:`M20.4,44h5.4V26.6h-5.4V44z M23.1,18c-1.7,0-3.1,1.4-3.1,3.1c0,1.7,1.4,3.1,3.1,3.1 c1.7,0,3.1-1.4,3.1-3.1C26.2,19.4,24.8,18,23.1,18z M39.5,26.2c-2.6,0-4.4,1.4-5.1,2.8h-0.1v-2.4h-5.2V44h5.4v-8.6 c0-2.3,0.4-4.5,3.2-4.5c2.8,0,2.8,2.6,2.8,4.6V44H46v-9.5C46,29.8,45,26.2,39.5,26.2z`})}))}function at(e,{title:t,summary:n,source:r}){return K(e,`linkedin.url`),`https://linkedin.com/shareArticle`+q({url:e,mini:`true`,title:t,summary:n,source:r})}var ot=(0,L.forwardRef)((e,t)=>{var n=e,{source:r,summary:i,title:a}=n;return(0,R.jsx)(J,U(H({},W(n,[`source`,`summary`,`title`])),{forwardedRef:t,networkName:`linkedin`,networkLink:at,opts:{title:a,summary:i,source:r},windowHeight:600,windowWidth:750}))});ot.displayName=`LinkedinShareButton`;function st(e,{title:t,description:n}){return K(e,`livejournal.url`),`https://www.livejournal.com/update.bml`+q({subject:t,event:n})}var ct=(0,L.forwardRef)((e,t)=>{var n=e,{description:r,title:i}=n;return(0,R.jsx)(J,U(H({},W(n,[`description`,`title`])),{forwardedRef:t,networkName:`livejournal`,networkLink:st,opts:{title:i,description:r},windowHeight:460,windowWidth:660}))});ct.displayName=`LivejournalShareButton`;function lt(e,{title:t,description:n,imageUrl:r}){return K(e,`mailru.url`),`https://connect.mail.ru/share`+q({url:e,title:t,description:n,image_url:r})}var ut=(0,L.forwardRef)((e,t)=>{var n=e,{description:r,imageUrl:i,title:a}=n;return(0,R.jsx)(J,U(H({},W(n,[`description`,`imageUrl`,`title`])),{forwardedRef:t,networkName:`mailru`,networkLink:lt,opts:{title:a,description:r,imageUrl:i},windowHeight:460,windowWidth:660}))});ut.displayName=`MailruShareButton`;function dt(e,{title:t,description:n,image:r}){return K(e,`ok.url`),`https://connect.ok.ru/offer`+q({url:e,title:t,description:n,imageUrl:r})}var ft=(0,L.forwardRef)((e,t)=>{var n=e,{description:r,image:i,title:a}=n;return(0,R.jsx)(J,U(H({},W(n,[`description`,`image`,`title`])),{forwardedRef:t,networkName:`ok`,networkLink:dt,opts:{title:a,description:r,image:i},windowHeight:480,windowPosition:`screenCenter`,windowWidth:588}))});ft.displayName=`OKShareButton`;function pt(e,t){window.OK||(window.OK={Share:{count:function(e,t){var n,r;(r=(n=window.OK.callbacks)[e])==null||r.call(n,t)}},callbacks:[]});let n=window.OK.callbacks.length;return window.ODKL={updateCount(e,t){var n,r;let i=e===``?0:parseInt(e.replace(`react-share-`,``),10);(r=(n=window.OK.callbacks)[i])==null||r.call(n,t===``?void 0:parseInt(t,10))}},window.OK.callbacks.push(t),(0,B.default)(`https://connect.ok.ru/dk`+q({"st.cmd":`extLike`,uid:`react-share-${n}`,ref:e}))}Y(pt);function mt(e,{media:t,description:n,pinId:r}){return r?`https://pinterest.com/pin/${r}/repin/x/`:(K(e,`pinterest.url`),K(t,`pinterest.media`),`https://pinterest.com/pin/create/button/`+q({url:e,media:t,description:n}))}var ht=(0,L.forwardRef)((e,t)=>{var n=e,{description:r,media:i,pinId:a}=n;return(0,R.jsx)(J,U(H({},W(n,[`description`,`media`,`pinId`])),{forwardedRef:t,networkName:`pinterest`,networkLink:mt,opts:{media:i,description:r,pinId:a},windowHeight:730,windowWidth:1e3}))});ht.displayName=`PinterestShareButton`;function gt(e,t){(0,B.default)(`https://api.pinterest.com/v1/urls/count.json`+q({url:e}),(e,n)=>{t(n?n.count:void 0)})}Y(gt);function _t(e,{title:t}){return K(e,`pocket.url`),`https://getpocket.com/save`+q({url:e,title:t})}var vt=(0,L.forwardRef)((e,t)=>{var n=e,{title:r}=n;return(0,R.jsx)(J,U(H({},W(n,[`title`])),{forwardedRef:t,networkName:`pocket`,networkLink:_t,opts:{title:r},windowHeight:500,windowWidth:500}))});vt.displayName=`PocketShareButton`;function yt(e){return(0,R.jsx)(G,U(H({color:`#FF4500`},e),{children:(0,R.jsx)(`path`,{d:`M 53.34375 32 C 53.277344 30.160156 52.136719 28.53125 50.429688 27.839844 C 48.722656 27.148438 46.769531 27.523438 45.441406 28.8
300781 C 41.800781 26.324219 37.519531 24.957031 33.121094 24.863281 L 35.199219 14.878906 L 42.046875 16.320312 C 42.214844 17.882812 43.496094 19.09375 45.066406 19.171875 C 46.636719 19.253906 48.03125 18.183594 48.359375 16.644531 C 48.6875 15.105469 47.847656 13.558594 46.382812 12.992188 C 44.914062 12.425781 43.253906 13.007812 42.464844 14.367188 L 34.625 12.800781 C 34.363281 12.742188 34.09375 12.792969 33.871094 12.9375 C 33.648438 13.082031 33.492188 13.308594 33.441406 13.566406 L 31.070312 24.671875 C 26.617188 24.738281 22.277344 26.105469 18.59375 28.609375 C 17.242188 27.339844 15.273438 26.988281 13.570312 27.707031 C 11.863281 28.429688 10.746094 30.089844 10.71875 31.941406 C 10.691406 33.789062 11.757812 35.484375 13.441406 36.257812 C 13.402344 36.726562 13.402344 37.195312 13.441406 37.664062 C 13.441406 44.832031 21.792969 50.65625 32.097656 50.65625 C 42.398438 50.65625 50.753906 44.832031 50.753906 37.664062 C 50.789062 37.195312 50.789062 36.726562 50.753906 36.257812 C 52.363281 35.453125 53.371094 33.800781 53.34375 32 Z M 21.34375 35.199219 C 21.34375 33.433594 22.777344 32 24.542969 32 C 26.3125 32 27.742188 33.433594 27.742188 35.199219 C 27.742188 36.96875 26.3125 38.398438 24.542969 38.398438 C 22.777344 38.398438 21.34375 36.96875 21.34375 35.199219 Z M 39.9375 44 C 37.664062 45.710938 34.871094 46.582031 32.03125 46.464844 C 29.191406 46.582031 26.398438 45.710938 24.128906 44 C 23.847656 43.65625 23.871094 43.15625 24.183594 42.839844 C 24.5 42.527344 25 42.503906 25.34375 42.785156 C 27.269531 44.195312 29.617188 44.90625 32 44.800781 C 34.386719 44.929688 36.746094 44.242188 38.6875 42.847656 C 39.042969 42.503906 39.605469 42.511719 39.953125 42.863281 C 40.296875 43.21875 40.289062 43.785156 39.9375 44.128906 Z M 39.359375 38.527344 C 37.59375 38.527344 36.160156 37.09375 36.160156 35.328125 C 36.160156 33.5625 37.59375 32.128906 39.359375 32.128906 C 41.128906 32.128906 42.558594 33.5625 42.558594 35.328125 C 42.59375 36.203125 42.269531 37.054688 41.65625 37.6875 C 41.046875 38.316406 40.203125 38.664062 39.328125 38.65625 Z M 39.359375 38.527344`})}))}function bt(e,{title:t}){return K(e,`reddit.url`),`https://www.reddit.com/submit`+q({url:e,title:t})}var xt=(0,L.forwardRef)((e,t)=>{var n=e,{title:r}=n;return(0,R.jsx)(J,U(H({},W(n,[`title`])),{forwardedRef:t,networkName:`reddit`,networkLink:bt,opts:{title:r},windowHeight:460,windowPosition:`windowCenter`,windowWidth:660}))});xt.displayName=`RedditShareButton`;function St(e,{title:t}){return K(e,`gab.url`),`https://gab.com/compose`+q({url:e,text:t})}var Ct=(0,L.forwardRef)((e,t)=>{var n=e,{title:r}=n;return(0,R.jsx)(J,U(H({},W(n,[`title`])),{forwardedRef:t,networkName:`gab`,networkLink:St,opts:{title:r},windowHeight:640,windowPosition:`windowCenter`,windowWidth:660}))});Ct.displayName=`GabShareButton`;function wt(e,t){(0,B.default)(`https://www.reddit.com/api/info.json?limit=1&url=${e}`,{param:`jsonp`},(e,n)=>{t(!e&&n&&n.data&&n.data.children.length>0&&n.data.children[0].data.score?n.data.children[0].data.score:void 0)})}Y(wt);function Tt(e,{title:t}){return K(e,`telegram.url`),`https://telegram.me/share/url`+q({url:e,text:t})}var Et=(0,L.forwardRef)((e,t)=>{var n=e,{title:r}=n;return(0,R.jsx)(J,U(H({},W(n,[`title`])),{forwardedRef:t,networkName:`telegram`,networkLink:Tt,opts:{title:r},windowHeight:400,windowWidth:550}))});Et.displayName=`TelegramShareButton`;function Dt(e,{title:t}){return K(e,`threads.url`),`https://threads.net/intent/post`+q({url:e,text:t})}var Ot=(0,L.forwardRef)((e,t)=>{var n=e,{hashtags:r,related:i,title:a,via:o}=n;return(0,R.jsx)(J,U(H({},W(n,[`hashtags`,`related`,`title`,`via`])),{forwardedRef:t,networkName:`threads`,networkLink:Dt,opts:{title:a},windowHeight:600,windowWidth:550}))});Ot.displayName=`ThreadsShareButton`;function kt(e,{title:t,caption:n,tags:r,posttype:i}){return K(e,`tumblr.url`),`https://www.tumblr.com/widgets/share/tool`+q({canonicalUrl:e,title:t,caption:n,tags:r,posttype:i})}var At=(0,L.forwardRef)((e,t)=>{var n=e,{caption:r,posttype:i,tags:a,title:o}=n;return(0,R.jsx)(J,U(H({},W(n,[`caption`,`posttype`,`tags`,`title`])),{forwardedRef:t,networkName:`tumblr`,networkLink:kt,opts:{title:o,tags:(a||[]).join(`,`),caption:r,posttype:i||`link`},windowHeight:460,windowWidth:660}))});At.displayName=`TumblrShareButton`;function jt(e,t){return(0,B.default)(`https://api.tumblr.com/v2/share/stats`+q({url:e}),(e,n)=>{t(!e&&n&&n.response?n.response.note_count:void 0)})}Y(jt);function Mt(e,{title:t,via:n,hashtags:r=[],related:i=[]}){return K(e,`x.url`),K(Array.isArray(r),`x.hashtags is not an array`),K(Array.isArray(i),`x.related is not an array`),`https://twitter.com/intent/tweet`+q({url:e,text:t,via:n,hashtags:r.length>0?r.join(`,`):void 0,related:i.length>0?i.join(`,`):void 0})}var Nt=(0,L.forwardRef)((e,t)=>{var n=e,{hashtags:r,related:i,title:a,via:o}=n;return(0,R.jsx)(J,U(H({},W(n,[`hashtags`,`related`,`title`,`via`])),{forwardedRef:t,networkName:`twitter`,networkLink:Mt,opts:{hashtags:r,title:a,via:o,related:i},windowHeight:400,windowWidth:550}))});Nt.displayName=`XShareButton`;var Pt=(0,L.forwardRef)((e,t)=>(0,R.jsx)(Nt,U(H({},e),{ref:t})));Pt.displayName=`TwitterShareButton`;function Ft(e,{title:t,separator:n}
3){return K(e,`viber.url`),`viber://forward`+q({text:t?t+n+e:e})}var It=(0,L.forwardRef)((e,t)=>{var n=e,{separator:r,title:i}=n;return(0,R.jsx)(J,U(H({},W(n,[`separator`,`title`])),{forwardedRef:t,networkName:`viber`,networkLink:Ft,opts:{title:i,separator:r||` `},windowHeight:460,windowWidth:660}))});It.displayName=`ViberShareButton`;function Lt(e,{title:t,image:n,noParse:r,noVkLinks:i}){return K(e,`vk.url`),`https://vk.com/share.php`+q({url:e,title:t,image:n,noparse:+!!r,no_vk_links:+!!i})}var Rt=(0,L.forwardRef)((e,t)=>{var n=e,{image:r,noParse:i,noVkLinks:a,title:o}=n;return(0,R.jsx)(J,U(H({},W(n,[`image`,`noParse`,`noVkLinks`,`title`])),{forwardedRef:t,networkName:`vk`,networkLink:Lt,opts:{title:o,image:r,noParse:i,noVkLinks:a},windowHeight:460,windowWidth:660}))});Rt.displayName=`VKShareButton`;function zt(e,t){window.VK||(window.VK={}),window.VK.Share={count:(e,t)=>{var n;return((n=window.VK.callbacks)?.[e])?.call(n,t)}},window.VK.callbacks=[];let n=window.VK.callbacks.length;return window.VK.callbacks.push(t),(0,B.default)(`https://vk.com/share.php`+q({act:`count`,index:n,url:e}))}Y(zt);function Bt(e,{title:t,image:n}){return K(e,`weibo.url`),`http://service.weibo.com/share/share.php`+q({url:e,title:t,pic:n})}var Vt=(0,L.forwardRef)((e,t)=>{var n=e,{image:r,title:i}=n;return(0,R.jsx)(J,U(H({},W(n,[`image`,`title`])),{forwardedRef:t,networkName:`weibo`,networkLink:Bt,opts:{title:i,image:r},windowHeight:550,windowPosition:`screenCenter`,windowWidth:660}))});Vt.displayName=`WeiboShareButton`;function Ht(e){return(0,R.jsx)(G,U(H({color:`#25D366`},e),{children:(0,R.jsx)(`path`,{d:`m42.32286,33.93287c-0.5178,-0.2589 -3.04726,-1.49644 -3.52105,-1.66732c-0.4712,-0.17346 -0.81554,-0.2589 -1.15987,0.2589c-0.34175,0.51004 -1.33075,1.66474 -1.63108,2.00648c-0.30032,0.33658 -0.60064,0.36247 -1.11327,
30.12945c-0.5178,-0.2589 -2.17994,-0.80259 -4.14759,-2.56312c-1.53269,-1.37217 -2.56312,-3.05503 -2.86603,-3.57283c-0.30033,-0.5178 -0.03366,-0.80259 0.22524,-1.06149c0.23301,-0.23301 0.5178,-0.59547 0.7767,-0.90616c0.25372,-0.31068 0.33657,-0.5178 0.51262,-0.85437c0.17088,-0.36246 0.08544,-0.64725 -0.04402,-0.90615c-0.12945,-0.2589 -1.15987,-2.79613 -1.58964,-3.80584c-0.41424,-1.00971 -0.84142,-0.88027 -1.15987,-0.88027c-0.29773,-0.02588 -0.64208,-0.02588 -0.98382,-0.02588c-0.34693,0 -0.90616,0.12945 -1.37736,0.62136c-0.4712,0.5178 -1.80194,1.76053 -1.80194,4.27186c0,2.51134 1.84596,4.945 2.10227,5.30747c0.2589,0.33657 3.63497,5.51458 8.80262,7.74113c1.23237,0.5178 2.1903,0.82848 2.94111,1.08738c1.23237,0.38836 2.35599,0.33657 3.24402,0.20712c0.99159,-0.15534 3.04985,-1.24272 3.47963,-2.45956c0.44013,-1.21683 0.44013,-2.22654 0.31068,-2.45955c-0.12945,-0.23301 -0.46601,-0.36247 -0.98382,-0.59548m-9.40068,12.84407l-0.02589,0c-3.05503,0 -6.08417,-0.82849 -8.72495,-2.38189l-0.62136,-0.37023l-6.47252,1.68286l1.73463,-6.29129l-0.41424,-0.64725c-1.70875,-2.71846 -2.6149,-5.85116 -2.6149,-9.07706c0,-9.39809 7.68934,-17.06155 17.15993,-17.06155c4.58253,0 8.88029,1.78642 12.11655,5.02268c3.23625,3.21036 5.02267,7.50812 5.02267,12.06476c-0.0078,9.3981 -7.69712,17.06155 -17.14699,17.06155m14.58906,-31.58846c-3.93529,-3.80584 -9.1133,-5.95471 -14.62789,-5.95471c-11.36055,0 -20.60848,9.2065 -20.61625,20.52564c0,3.61684 0.94757,7.14565 2.75211,10.26282l-2.92557,10.63564l10.93337,-2.85309c3.0136,1.63108 6.4052,2.4958 9.85634,2.49839l0.01037,0c11.36574,0 20.61884,-9.2091 20.62403,-20.53082c0,-5.48093 -2.14111,-10.64081 -6.03239,-14.51915`})}))}function Ut(e,{title:t,separator:n}){return K(e,`whatsapp.url`),`https://api.whatsapp.com/send`+q({text:t?t+n+e:e})}var Wt=(0,L.forwardRef)((e,t)=>{var n=e,{separator:r,title:i}=n;return(0,R.jsx)(J,U(H({},W(n,[`separator`,`title`])),{forwardedRef:t,networkName:`whatsapp`,networkLink:Ut,opts:{title:i,separator:r||` `},windowHeight:400,windowWidth:550}))});Wt.displayName=`WhatsappShareButton`;function Gt(e,{quote:t,hashtag:n}){return K(e,`workplace.url`),`https://work.facebook.com/sharer.php`+q({u:e,quote:t,hashtag:n})}var Kt=(0,L.forwardRef)((e,t)=>{var n=e,{hashtag:r,quote:i}=n;return(0,R.jsx)(J,U(H({},W(n,[`hashtag`,`quote`])),{forwardedRef:t,networkName:`workplace`,networkLink:Gt,opts:{quote:i,hashtag:r},windowHeight:400,windowWidth:550}))});Kt.displayName=`WorkplaceShareButton`;function qt(e){return(0,R.jsx)(G,U(H({color:`#000000`},e),{children:(0,R.jsx)(`path`,{d:`M 41.116 18.375 h 4.962 l -10.8405 12.39 l 12.753 16.86 H 38.005 l -7.821 -10.2255 L 21.235 47.625 H 16.27 l 11.595 -13.2525 L 15.631 18.375 H 25.87 l 7.0695 9.3465 z m -1.7415 26.28 h 2.7495 L 24.376 21.189 H 21.4255 z`})}))}function Jt({title:e,titleId:t,...n},r){return L.createElement(`svg`,Object.assign({xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`,ref:r,"aria-labelledby":t},n),e?L.createElement(`title`,{id:t},e):null,L.createElement(`path`,{fillRule:`evenodd`,d:`M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z`,clipRule:`evenodd`}))}var Yt=L.forwardRef(Jt),X=({children:e,postPadding:t,classNames:n})=>(0,R.jsx)(`div`,{className:n,style:{paddingLeft:t,paddingRight:t},children:e}),Xt=({visitToken:e,post:t,pageViews:n,setCookie:r,cookiesSet:i})=>{let a=n?.includes(t?.id),o=i&&e&&t?.id&&!a;(0,L.useEffect)(()=>{if(o){let i=document.referrer,a=new FormData;a.append(`postId`,t.id),a.append(`webTitle`,t.web_title),a.append(`slug`,t.slug),a.append(`landingPage`,window.location.href),a.append(`referrer`,i),a.append(`visitToken`,e);let o=n?`${n},${t.id}`:t.id;fetch(`/page_view`,{method:`post`,body:a}).catch(e=>{console.error(e)}),r({name:`page_view`,value:o,days:6e5/(1440*60*1e3)})}},[o])},Zt=(e,t=!1)=>{let n=M();return(0,L.useEffect)(()=>{e&&!t&&n.load(`/recommended_posts?post_id=${e}`)},[e]),n?.data?.recommendedPosts||[]},Qt=({tierIds:e,currentSubscriberId:t,dynamicContentOverrides:n,cookies:r,isLoggedIn:i,isDraft:a})=>{let o=e.includes(`none`),s=e.length>0&&!o||t!==``||n.length>0;return{isSimulatingNonSubscriber:o,isPreviewingWithSimulation:s,isPopupDisabled:!o&&(!!r.popup_closed||i),isGatedContentDisabled:!o&&(!!r.email_capture_disabled||i||a&&s)}},Z=()=>{let{t:e}=s(),{handleOpenModal:t}=D();return(0,R.jsxs)(m,{as:`span`,size:`xs`,type:`body`,theme:`content`,className:`opacity-75`,children:[(0,R.jsx)(`button`,{type:`button`,onClick:()=>t(`login`),children:(0,R.jsx)(`span`,{className:`underline`,children:e(`shared.cta.login`)})}),` `,e(`shared.cta.or`),` `,(0,R.jsx)(`button`,{type:`button`,onClick:()=>t(`signup`),children:(0,R.jsx)(`span`,{className:`underline`,children:e(`shared.cta.subscribe`)})}),` `,e(`shared.cta.to_participate`),`.`]})},$t=({postId:e,commentId:t,order:n})=>
3{let[r,i]=(0,L.useState)(n),o=a(),s=M(),[c,l]=(0,L.useState)(!1),[u,d]=(0,L.useState)([]),[f,p]=(0,L.useState)({page:1,added:!1}),m=s.data?.pagination?.page||1,h=s.data?.pagination.total||0,g=m*(s.data?.pagination.per_page||10),_=m+1,v=g<h,y=()=>{d([]),l(!1),p({page:1,added:!1})};return(0,L.useEffect)(()=>{d([])},[o.pathname]),(0,L.useEffect)(()=>{if(f.page===1&&!f.added){let n=new URLSearchParams;n.append(`post_id`,e),t&&n.append(`comment_id`,t),r&&n.append(`order`,r),s.load(`/paginated_comments?${n.toString()}`)}},[o,f]),(0,L.useEffect)(()=>{s.data&&(f.page===s.data.pagination.page&&!f.added&&(d([...u,...s.data.comments]),p({page:f.page,added:!0})),c||l(!0))},[s.data]),{initialFetched:c,comments:u,optimisticallyRenderNewComment:e=>{d([e,...u])},optimisticallyDeleteTopLevelComment:e=>{let t=u.find(t=>t.id===e);if(!t)return;let n={...t,deleted_by_commenter_at:new Date().toISOString()};d(u.map(t=>t.id===e?n:t))},reorderComments:e=>{i(e),y()},commentOrder:r,itemsRemaining:s.data?.items_remaining??0,isLoadingMore:c&&s.state===`loading`,remainingCount:h-g,hasNextPage:v,loadMore:()=>{let r=new URLSearchParams;r.append(`post_id`,e),r.append(`page`,_.toString()),t&&r.append(`comment_id`,t),n&&r.append(`order`,n),p({page:_,added:!1}),s.load(`/paginated_comments?${r.toString()}`)}}},en=function(e){return e.DEFAULT=`default`,e.PREMIUM=`premium`,e.DISABLED=`disabled`,e.LOCKED=`locked`,e}({}),tn=({firstName:e,lastName:t,onSuccess:n})=>{let r=l(),i=r.data,a=r.state===`submitting`,o=i?.toast?.status===`success`,{t:c}=s();return(0,L.useEffect)(()=>{o&&n&&n()},[o,n]),N(i?.toast),(0,R.jsx)(r.Form,{method:`patch`,action:`/profile`,className:`relative`,children:(0,R.jsxs)(`div`,{className:`space-y-6`,children:[(0,R.jsxs)(`div`,{className:`space-y-3`,children:[(0,R.jsx)(re,{name:`first_name`,autoComplete:`given-name`,label:`${c(`manage.personal_details_form.first_name`)}`,placeholder:`${c(`manage.personal_details_form.first_name`)}`,defaultValue:e}),(0,R.jsx)(re,{name:`last_name`,autoComplete:`family-name`,label:`${c(`manage.personal_details_form.last_name`)}`,placeholder:`${c(`manage.personal_details_form.last_name`)}`,defaultValue:t}),(0,R.jsx)(j,{name:`profile`,errorMessage:c(`errors.default`),successMessage:c(`toast.success`)})]}),(0,R.jsx)(`div`,{className:`flex justify-end`,children:(0,R.jsx)(P,{type:`submit`,variant:`primary`,children:a?`${c(`shared.actions.submitting`)}...`:c(`shared.cta.submit`)})})]})})},nn=()=>(0,R.jsx)(`svg`,{width:`22`,height:`11`,viewBox:`0 0 22 11`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:(0,R.jsx)(`path`,{d:`M20.414 11H1.58597C1.37769 11 1.17146 10.9667 0.979043 10.9019C0.786625 10.8372 0.611789 10.7423 0.464519 10.6226C0.317248 10.503 0.200427 10.361 0.120724 10.2046C0.0410222 10.0483 0 9.88078 0 9.71158V1.28842C0 1.11922 0.0410222 0.951683 0.120724 0.795365C0.200427 0.639046 0.317248 0.497011 0.464519 0.37737C0.761945 0.135744 1.16534 0 1.58597 0H20.414C20.6223 0 20.8285 0.0333262 21.021 0.0980755C21.2134 0.162825 21.3882 0.257729 21.5355 0.37737C21.6828 0.497011 21.7996 0.639046 21.8793 0.795365C21.959 0.951683 22 1.11922 22 1.28842V9.71009C22.0001 9.87935 21.9592 10.047 21.8795 10.2034C21.7999 10.3598 21.6831 10.5019 21.5358 10.6216C21.3885 10.7413 21.2136 10.8363 21.0212 10.9011C20.8287 10.9659 20.6224 11 20.414 11ZM5.28777 8.42167V5.07028L7.40362 7.21889L9.51854 5.07028V8.42167H11.6344V2.57908H9.51854L7.40362 4.72769L5.28777 2.57908H3.17193V8.42316L5.28777 8.42167ZM19.4625 5.5H17.3466V2.57833H15.2317V5.5H13.1158L16.2887 8.50806L19.4625 5.5Z`,fill:`#D1D5DB`})}),rn=({children:e})=>{let[t,n]=(0,L.useState)(!1);return(0,R.jsxs)(`div`,{className:`relative inline-block`,children:[(0,R.jsx)(`div`,{onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),children:e}),(0,R.jsx)(I,{show:t,enter:`transition-opacity duration-150`,enterFrom:`opacity-0`,enterTo:`opacity-100`,leave:`transition-opacity duration-150`,leaveFrom:`opacity-100`,leaveTo:`opacity-0`,children:(0,R.jsxs)(`div`,{className:`absolute right-0 z-10 mt-2 flex flex-col space-y-2 rounded bg-gray-800 px-2 py-1 text-sm text-white`,children:[(0,R.jsx)(`p`,{className:`whitespace-nowrap`,children:`Simple markdown supp
3orted: `}),(0,R.jsxs)(`ul`,{className:`list-disc pl-4`,children:[(0,R.jsx)(`li`,{children:`*italics*`}),(0,R.jsx)(`li`,{children:`**bold**`}),(0,R.jsx)(`li`,{children:`***bold italics***`}),(0,R.jsx)(`li`,{children:`~~strike through~~`}),(0,R.jsx)(`li`,{children:`==highlight==`}),(0,R.jsx)(`li`,{children:`1. numbered list`})]})]})})]})},an=()=>(0,R.jsx)(`div`,{className:`space-y-2 text-sm`,children:(0,R.jsx)(rn,{children:(0,R.jsx)(nn,{})})}),on=1e3,Q=({postId:e,commentId:t,subscription:n,text:r,buttonType:i,onClick:a,onChange:o,defaultValue:c,userId:l=``,disabled:u=!1,rows:d=5})=>{let{t:f}=s(),[p,h]=(0,L.useState)(``),g=on-(p.length||0),_=g<0,v=`comment_${n?.id}_${t}`,y=(0,L.useRef)(null);return(0,L.useEffect)(()=>{let e=y.current,t=e=>{let t=e.target;t.style.height=`auto`,t.style.height=`${t.scrollHeight}px`};return e&&(e.style.height=`auto`,e.style.height=`${e.scrollHeight}px`,e.style.overflowY=`hidden`,e.addEventListener(`input`,t,!1)),()=>{e&&e.removeEventListener(`input`,t,!1)}},[y]),(0,L.useEffect)(()=>{let e=y.current;u&&e&&(e.style.height=`auto`)},[u]),(0,R.jsxs)(`div`,{className:`relative`,children:[(0,R.jsx)(`div`,{className:`absolute right-2 top-1 z-20`,children:(0,R.jsx)(an,{})}),(0,R.jsxs)(`div`,{className:(0,z.default)(`relative overflow-hidden rounded-wt border border-gray-200 pb-10 shadow-sm focus-within:ring-1`,_?`focus-within:border-red-500 focus-within:ring-red-500`:`focus-within:border-wt-primary focus-within:ring-wt-primary`),children:[(0,R.jsx)(`label`,{htmlFor:v,className:`sr-only`,children:f(`comments.commenting.comment_action_placeholder`)}),(0,R.jsx)(`textarea`,{rows:d,ref:y,name:`content`,id:v,className:`block w-full resize-none border-0 bg-transparent py-3 !text-sm focus:ring-0`,placeholder:`${f(`comments.commenting.comment_action_placeholder`)}...`,required:!0,onChange:e=>{h(e.target.value),o?.(e)},defaultValue:c}),(0,R.jsx)(`input`,{type:`hidden`,name:`post_id`,value:e}),(0,R.jsx)(`input`,{type:`hidden`,name:`comment_id`,value:t}),(0,R.jsx)(`input`,{type:`hidden`,name:`subscription_id`,value:n?.id}),(0,R.jsx)(`input`,{type:`hidden`,name:`user_id`,value:l}),(0,R.jsx)(j,{name:`characters`,errorMessage:f(`comments.commenting.characters_error`),successMessage:``}),(0,R.jsx)(j,{name:`comment`,errorMessage:f(`errors.default`),successMessage:``}),(0,R.jsx)(`div`,{className:`absolute bottom-2 left-2 flex items-center justify-between pt-2`,children:(0,R.jsx)(m,{as:`p`,size:`xs`,theme:`content`,weight:`medium`,className:(0,z.default)(`flex items-center !text-xs`,_?`opacity-100`:`opacity-40`),children:(0,R.jsx)(`span`,{className:(0,z.default)(_&&`text-red-500`),children:g})})}),(0,R.jsx)(`div`,{className:`absolute bottom-2 right-2`,children:(0,R.jsx)(P,{btnSize:`sm`,type:i,onClick:()=>{h(``),a?.()},disabled:u||_,children:r})})]})]})},sn=({postId:e,commentId:t,onCommentCreated:n,subscription:r,rows:c,isPremiumCommentsOnly:u=!1})=>{let{t:d}=s(),f=i(),p=a(),{admin:m}=o(),[h,g]=(0,L.useState)(!1),[_,v]=(0,L.useState)(!1),[y,b]=(0,L.useState)(``),x=(0,L.useRef)(null),S=l(),C=S.state===`submitting`,w=S.data,T=w?.toast?.status===`error`;N(w?.toast);let E=!!m,D=!!t,O=d(D?`comments.replying.reply`:`comments.commenting.post`),k=D?`${d(`comments.replying.replying`)}...`:`${d(`comments.commenting.posting`)}...`,j=r?.tier!==`premium`&&u&&!E,M=!r?.comment_details_set&&!E;return(0,L.useEffect)(()=>{x.current&&y&&_&&(x.current.getElementsByTagName(`button`)[0]?.click(),v(!1),b(``))},[x.current,_,()=>{_&&(x.current?.submit(),v(!1))}]),(0,L.useEffect)(()=>{w&&!T&&n&&(n(w),x.current?.reset(),b(``))},[w,T]),j?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(A,{title:`${d(`comments.upgrade.title`)}`,description:(0,R.jsx)(`div`,{children:(0,R.jsx)(`p`,{children:d(`comments.upgrade.description`)})}),isOpen:h,onClose:()=>g(!1),children:(0,R.jsx)(P,{type:`button`,variant:`primary`,className:`flex w-full justify-center`,isLoading:C,onClick:()=>f(`/upgrade?post_url=${p.pathname}`),children:d(`comments.upgrade.cta`)})}),(0,R.jsx)(Q,{postId:e,commentId:t,subscription:r,text:C?k:O,buttonType:`button`,onClick:()=>g(!0),onChange:e=>b(e.target.value)})]}):M?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(A,{title:d(`comments.commenting.profile_title`)||``,description:(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`p`,{children:d(`comments.commenting.profile_description`)}),(0,R.jsxs)(`p`,{className:`pt-1 text-xs font-medium text-gray-500`,children:[`(`,d(`comments.commenting.profile_gravatar`),` `,(0,R.jsx)(`a`,{className:`text-wt-primary`,target:`_blank`,rel:`noopener noreferrer`,href:`https://support.beehiiv.com/hc/en-us/articles/13111175166999`,children:`Gravatar.`}),`)`]})]}),isOpen:h,onClose:()=>g(!1),children:(0,R.jsx)(tn,{onSuccess:()=>v(!0)})}),(0,R.jsx)(Q,{postId:e,commentId:t,subscription:r,text:C?k:O,buttonType:`button`,onClick:()=>g(!0),onChange:e=>b(e.target.value)})]}):(0,R.jsx)(`div`,{className:`flex items-start`,children:(0,R.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,R.jsx)(S.Form,{ref:x,method:`post`,action:E?`/admins/comments`:`/comments`,className:`relative`,children:(0,R.jsx)(Q,{postId:e,commentId:t,subscription:r,userId:m?.id||``,text:C?k:O,defaultValue:y,rows:c,buttonType:`submit`,disabled:C})})})})},cn=({text:e,Icon:t,onClick:n})=>(0,R.jsx)(`div`,{className:`transitiona-all group`,children:(0,R.jsx)(`button`,{type:`button`,onClick:n,children:(0,R.jsxs)(`div`,{className:`flex items-center text-xs opacity-50 hover:opacity-100`,children:[(0,R.jsx)(m,{as:`span`,size:`xs`,theme:`content`,weight:`semibold`,className:`mr-1`,children:t}),(0,R.jsx)(m,{as:`span`,size:`xs`,theme:`content`,weight:`semibold`,className:`mr-1`,children:e})]})})}),ln=({imageUrl:e,name:t,content:n,time:r,isModerator:i})=>{let a=n?.replace(/\n/g,` 4`)||``;return(0,R.jsxs)(`div`,{className:`flex`,children:[(0,R.jsx)(`img`,{className:`h-7 w-7 rounded-full`,src:e,alt:`The user involved in the comment`}),(0,R.jsx)(`div`,{className:`ml-2 sm:ml-3`,children:(0,R.jsxs)(`div`,{className:``,children:[(0,R.jsxs)(`div`,{className:`flex items-center`,children:[i&&(0,R.jsx)(`div`,{children:(0,R.jsx)(k,{className:`mr-1 h-4 w-4 text-wt-primary`})}),(0,R.jsxs)(m,{as:`p`,size:`sm`,theme:`content`,weight:`semibold`,children:[t,` `,(0,R.jsxs)(`span`,{className:`font-light opacity-70`,children:[` ⢠`,O(r)]})]})]}),(0,R.jsx)(m,{as:`div`,size:`sm`,theme:`content`,weight:`regular`,children:(0,R.jsx)(w,{children:a})})]})})]})},un=({postId:e,commentId:t,commenterId:n,subscriptionId:r,onDelete:i,userId:a,isLoggedInAsAdmin:o=!1})=>{let{t:c}=s(),u=(0,L.useRef)(null),d=l(),f=d.state===`submitting`,p=d.data;N(p?.toast),(0,L.useEffect)(()=>{p?.toast&&i()},[p?.toast,i]);let m=o&&n!==a,h=c(m?`comments.removing.remove`:`comments.deleting.delete`),g=c(m?`comments.removing.removing`:`comments.deleting.deleting`);return(0,R.jsx)(`div`,{className:`flex items-start space-x-4`,children:(0,R.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,R.jsxs)(d.Form,{ref:u,method:`post`,action:o?`/admins/delete_comment`:`/delete_comment`,className:`relative`,children:[(0,R.jsx)(`label`,{htmlFor:`comment`,className:`sr-only`,children:c(`comments.deleting.delete_comment`)}),(0,R.jsx)(`input`,{type:`hidden`,name:`post_id`,value:e}),(0,R.jsx)(`input`,{type:`hidden`,name:`comment_id`,value:t}),(0,R.jsx)(`input`,{type:`hidden`,name:`subscription_id`,value:r}),(0,R.jsx)(`input`,{type:`hidden`,name:`user_id`,value:a}),(0,R.jsx)(j,{name:`delete_comment`,errorMessage:c(`errors.default`),successMessage:c(`comments.deleting.deleted`)}),(0,R.jsx)(`div`,{className:`flex justify-end pr-1`,children:(0,R.jsx)(P,{type:`submit`,btnSize:`sm`,disabled:f,children:f?g:h})})]})})})},dn=({postId:e,commentId:t,subscriptionId:n,onReport:r})=>{let{t:i}=s(),a=l(),o=a.state===`submitting`,c=a.data;N(c?.toast),(0,L.useEffect)(()=>{c?.toast&&r()},[c?.toast,r]);let u=i(`comments.reporting.report`),d=`${i(`comments.reporting.reporting`)}...`;return(0,R.jsx)(`div`,{className:`flex items-start space-x-4`,children:(0,R.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,R.jsxs)(a.Form,{method:`post`,action:`/comment_report`,className:`relative`,children:[(0,R.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,R.jsx)(`label`,{htmlFor:`comment`,className:`sr-only`,children:i(`comments.reporting.file_report`)}),(0,R.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:i(`comments.reporting.report_action_placeholder`)||``,defaultValue:``}),(0,R.jsx)(`input`,{type:`hidden`,name:`post_id`,value:e}),(0,R.jsx)(`input`,{type:`hidden`,name:`comment_id`,value:t}),(0,R.jsx)(`input`,{type:`hidden`,name:`subscription_id`,value:n}),(0,R.jsx)(j,{name:`comment_report`,errorMessage:i(`errors.default`),successMessage:i(`comments.reporting.reported`)}),(0,R.jsx)(`div`,{className:`py-2`,"aria-hidden":`true`,children:(0,R.jsx)(`div`,{className:`py-px`,children:(0,R.jsx)(`div`,{className:`h-9`})})})]}),(0,R.jsxs)(`div`,{className:`absolute inset-x-0 bottom-0 flex justify-between py-2 pl-3 pr-2`,children:[(0,R.jsx)(`div`,{className:`flex items-center space-x-5`}),(0,R.jsx)(`div`,{className:`flex-shrink-0 pr-1`,children:(0,R.jsx)(P,{type:`submit`,btnSize:`sm`,disabled:o,children:o?d:u})})]})]})})})},fn=({comment:e,postId:t,subscription:n,onDelete:r,admin:i})=>{let{t:a}
4=s(),[o,c]=(0,L.useState)(!1),[l,u]=(0,L.useState)(!1),d=!!i,f=i?.id,p=e.commenter_id,h=p===n?.id||d,g=d&&p!==f;return(0,R.jsxs)(`div`,{children:[h?(0,R.jsx)(A,{title:(0,R.jsx)(`div`,{className:`pb-3`,children:(0,R.jsxs)(m,{as:`p`,size:`xs`,theme:`content`,weight:`medium`,className:`flex items-center opacity-60`,children:[(0,R.jsx)(ve,{className:`mr-1 h-3.5 w-3.5`}),g?`${a(`comments.removing.removing_comment`)}...`:`${a(`comments.deleting.deleting_comment`)}...`]})}),description:(0,R.jsx)(ln,{imageUrl:e.avatar_url,name:e.commenter,content:e.content,time:e.created_at,isModerator:e.is_moderator_comment}),isOpen:o,onClose:()=>c(!1),children:(0,R.jsx)(un,{postId:t,commentId:e.id,commenterId:e.commenter_id,subscriptionId:n?.id,userId:f,isLoggedInAsAdmin:d,onDelete:()=>{c(!1),r()}})}):(0,R.jsx)(A,{title:(0,R.jsx)(`div`,{className:`pb-3`,children:(0,R.jsxs)(m,{as:`p`,size:`xs`,theme:`content`,weight:`medium`,className:`flex items-center opacity-60`,children:[(0,R.jsx)(ge,{className:`mr-1 h-3.5 w-3.5`}),`${a(`comments.reporting.filing_report_for`)}...`]})}),description:(0,R.jsx)(ln,{imageUrl:e.avatar_url,name:e.commenter,content:e.content,time:e.created_at,isModerator:e.is_moderator_comment}),isOpen:l,onClose:()=>u(!1),children:(0,R.jsx)(dn,{postId:t,commentId:e.id,subscriptionId:n?.id,onReport:()=>{u(!1)}})}),(0,R.jsxs)(F,{as:`div`,className:`relative inline-block text-left`,children:[(0,R.jsx)(`div`,{children:(0,R.jsx)(F.Button,{className:`pt-0.5`,children:(0,R.jsx)(m,{as:`span`,size:`xs`,theme:`content`,weight:`semibold`,className:`opacity-50 hover:opacity-100`,children:(0,R.jsx)(me,{className:`h-4 w-4`})})})}),(0,R.jsx)(I,{as:L.Fragment,enter:`transition ease-out duration-100`,enterFrom:`transform opacity-0 scale-95`,enterTo:`transform opacity-100 scale-100`,leave:`transition ease-in duration-75`,leaveFrom:`transform opacity-100 scale-100`,leaveTo:`transform opacity-0 scale-95`,children:(0,R.jsx)(F.Items,{className:`absolute right-0 z-10 w-32 origin-top-left divide-y divide-gray-100 rounded-md bg-wt-background shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none`,children:(0,R.jsx)(`div`,{className:`px-1`,children:h?(0,R.jsx)(F.Item,{children:(0,R.jsx)(`div`,{className:`p-2`,children:(0,R.jsx)(cn,{text:a(g?`comments.removing.remove`:`comments.deleting.delete`),Icon:(0,R.jsx)(ve,{className:`h-3.5 w-3.5`}),onClick:()=>{c(!0)}})})}):(0,R.jsx)(F.Item,{children:(0,R.jsx)(`div`,{className:`p-2`,children:(0,R.jsx)(cn,{text:a(`comments.reporting.report`),Icon:(0,R.jsx)(ge,{className:`h-3.5 w-3.5`}),onClick:()=>{u(!0)}})})})})})})]})]})},pn=({children:e,count:t=0,liked:n})=>{let{t:r}=s();return(0,R.jsxs)(`div`,{className:`group flex items-center space-x-1`,children:[e,(0,R.jsxs)(`div`,{className:`flex items-center space-x-0.5`,children:[(0,R.jsx)(`span`,{className:(0,z.default)(n?`opacity-100`:`text-wt-text-on-background-color opacity-60 group-hover:opacity-100`,`text-xs uppercase`),children:r(`comments.like`)}),t===0?null:(0,R.jsxs)(`span`,{className:(0,z.default)(n?`opacity-100`:`opacity-60`,`text-wt-text-on-background-color -mt-[1px] text-xs group-hover:opacity-100`),children:[`(`,t,`)`]})]})]})},mn=(e,t)=>e?e?.id:t?t?.id:``,hn=`h-4 w-4 text-wt-text-on-background-color opacity-60 group-hover:opacity-100`,gn=({postId:e,comment:t,subscription:n,admin:r})=>{let{t:i}=s(),[a]=(0,L.useState)(t?.likes||[]),[o,c]=(0,L.useState)(a.includes(mn(r,n))),[u,d]=(0,L.useState)(a?.length||0),[f,p]=(0,L.use
4State)(!1),m=l(),h=!!r,g=!h&&!n,_=()=>{c(!o),d(o?u-1:u+1)};return g?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`button`,{className:`-mt-0.5`,type:`button`,onClick:()=>p(!0),children:(0,R.jsx)(pn,{count:u,children:(0,R.jsx)(v,{className:hn})})}),f&&(0,R.jsx)(A,{title:i(`gated.login_or_subscribe`),description:``,isOpen:f,onClose:()=>p(!1),children:(0,R.jsx)(`div`,{children:(0,R.jsx)(Z,{})})})]}):(0,R.jsx)(`div`,{className:`flex items-start`,children:(0,R.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,R.jsxs)(m.Form,{method:`post`,onSubmit:e=>{e.preventDefault();let t=new FormData(e.currentTarget);h?m.submit(t,{method:`post`,action:`/admins/comment_like`}):m.submit(t,{method:`post`,action:`/comment_like`}),_()},action:h?`/admins/comment_like`:`/comment_like`,className:`relative`,children:[(0,R.jsx)(`input`,{type:`hidden`,name:`post_id`,value:e}),(0,R.jsx)(`input`,{type:`hidden`,name:`comment_id`,value:t?.id}),(0,R.jsx)(`input`,{type:`hidden`,name:`subscription_id`,value:n?.id}),(0,R.jsx)(`input`,{type:`hidden`,name:`user_id`,value:r?.id}),(0,R.jsx)(`button`,{type:`submit`,children:o?(0,R.jsx)(pn,{count:u,liked:!0,children:(0,R.jsx)(T,{className:`h-4 w-4 text-wt-primary`})}):(0,R.jsx)(pn,{count:u,children:(0,R.jsx)(v,{className:hn})})})]})})})},_n=({comment:e,postId:t,subscription:n,onSuccessfulReply:r,isPremiumCommentsOnly:i=!1})=>(0,R.jsx)(sn,{postId:t,commentId:e.id,rows:3,isPremiumCommentsOnly:i,onCommentCreated:e=>{r(e)},subscription:n}),vn=({children:e,ref:t,onClick:n,text:r,className:i})=>(0,R.jsxs)(`button`,{type:`button`,ref:t,className:(0,z.default)(i,`text-wt-text-on-background-color flex items-center gap-1 text-sm opacity-60 hover:opacity-100`),onClick:n,children:[e,(0,R.jsx)(`span`,{className:`mt-0 text-xs uppercase`,children:r})]}),yn=e=>
4{let[t]=c(),[n,r]=(0,L.useState)(!1),[i,a]=(0,L.useState)(!1),o=t.get(`comment_id`)===e&&!i;return(0,L.useEffect)(()=>{if(o&&!n){let t=document.getElementById(e);if(t){let e=t.getBoundingClientRect().top-20;window.scrollTo({top:e,behavior:`smooth`}),setTimeout(()=>{a(!0)},2e3)}r(!0)}},[o,n,r]),{isHighlighted:o}},bn=({comment:e,postId:t,subscription:n,isMaxDepthLevel:r=!1,commentsLocked:i,showReplyButton:a,isPremiumCommentsOnly:c=!1,isOptimisticallyDeleted:l,onDelete:u,onReply:d})=>{let{t:f}=s(),{admin:p}=o(),{isHighlighted:m}=yn(e.id),[h,g]=(0,L.useState)(!1),_=!n?.comment_details_set,v=!!p,y=!i&&!_&&!e.is_moderator_comment;return l?null:(0,R.jsx)(`div`,{className:(0,z.default)(`transition-all`,m&&`animate-pulse`),id:e.id,children:(0,R.jsxs)(`div`,{children:[(0,R.jsxs)(`div`,{className:`z-20 flex justify-between`,children:[(0,R.jsx)(ln,{imageUrl:e.avatar_url||``,name:e.commenter,content:e.content,time:e.created_at,isModerator:e.is_moderator_comment}),(y||v)&&(0,R.jsx)(fn,{comment:e,postId:t,subscription:n,admin:p,onDelete:()=>{u?.()}})]}),(0,R.jsxs)(`div`,{className:`ml-7 sm:ml-10`,children:[(0,R.jsxs)(`div`,{className:`flex items-center gap-3 pt-2`,children:[(0,R.jsx)(gn,{postId:t,comment:e,subscription:n,admin:p}),!r&&!i&&a&&(0,R.jsx)(vn,{className:`-mt-1`,text:h?`${f(`comments.replying.cancel_reply`)}`:`${f(`comments.replying.reply`)}`,onClick:()=>{g(!h)},children:(0,R.jsx)(ue,{className:`mt-0.5 h-4 w-4`})})]}),!i&&h&&(0,R.jsx)(`div`,{className:`mt-2`,children:(0,R.jsx)(_n,{comment:e,postId:t,subscription:n,onSuccessfulReply:e=>{d?.(e),g(!1)},isPremiumCommentsOnly:c})})]})]})},e.id)},xn=({comment:e,postId:t,subscription:n,commentsLocked:r,initialCommentsFetched:i,isPremiumCommentsOnly:a,optimisticallyDeleteComment:o})=>{let[s,c]=(0,L.useState)(!1),[l,u]=(0,L.useState)(e.sub_comments),d=l?.length>0,f=e=>{u([...l||[],e])},p=()=>{o(e.id)},m=t=>{let n={...e,deleted_by_commenter_at:new Date().toISOString()};u(l.map(e=>e.id===t?n:e)),c(!0)},h=t=>{e.depth_level===1?p():m(t)};return(0,R.jsxs)(`div`,{className:`relative space-y-1`,children:[(0,R.jsx)(`div`,{className:`absolute left-[14px] top-[38px] z-10 h-[calc(100%-45px)] border-l`}),(0,R.jsx)(bn,{comment:e,postId:t,subscription:n,isMaxDepthLevel:e.depth_level>=e.max_allowed_depth_level,commentsLocked:r,showReplyButton:!0,isOptimisticallyDeleted:s,onReply:e=>f(e),onDelete:()=>h(e.id),isPremiumCommentsOnly:a}),d&&!s&&(0,R.jsx)(`div`,{className:`pl-8`,children:(0,R.jsx)(Sn,{initialCommentsFetched:i,comments:l,postId:t,subscription:n,optimisticallyDeleteComment:h,commentsLocked:r,isSubcomments:!0,isPremiumCommentsOnly:a})})]},e.id)},Sn=({initialCommentsFetched:e,comments:t,postId:n,subscription:r,commentsLocked:i,isPremiumCommentsOnly:a=!1,isSubcomments:o=!1,optimisticallyDeleteComment:s})=>(0,R.jsx)(`div`,{className:(0,z.default)(`flex flex-col`,o?`space-y-2`:`space-y-4`),children:t.map((t,o)=>t.deleted_by_commenter_at?null:(0,R.jsx)(xn,{comment:t,postId:n,subscription:r,commentsLocked:i,initialCommentsFetched:e,isPremiumCommentsOnly:a,optimisticallyDeleteComment:s},t.id))}),$=()=>(0,R.jsx)(`div`,{className:`h-8 w-full rounded bg-gray-300/80`}),Cn=()=>(0,R.jsx)(`div`,{className:`flex w-full animate-pulse flex-col space-y-6`,children:(0,R.jsxs)(`div`,{className:`space-y-4`,children:[(0,R.jsx)($,{}),(0,R.jsx)($,{}),(0,R.jsx)($,{}),(0,R.jsx)($,{})]})}),wn=({text:e,reorderComments:t,order:n})=>(0,R.jsx)(F.Item,{children:({active:r})=>(0,R.jsx)(`button`,{onClick:()=>t(n),className:`${r?`bg-wt-text-on-background text-wt-background`:`text-wt-text-on-background`} group flex w-full items-center rounded-md px-2 py-2 text-sm`,children:e})}),Tn=({reorderComments:e,commentOrder:t})=>{let n={desc:`Newest first`,asc:`Oldest first`,popular:`Most popular`};return(0,R.jsx)(`div`,{className:``,children:(0,R.jsxs)(F,{as:`div`,className:`relative inline-block text-left`,children:[(0,R.jsx)(`div`,{children:(0,R.jsxs)(F.Button,{className:`inline-flex w-full justify-center whitespace-nowrap rounded-wt border bg-wt-background px-4 py-1 text-sm font-medium text-wt-text-on-background`,children:[n[t||`desc`],(0,R.jsx)(Yt,{className:`-mr-1 ml-2 h-5 w-5 text-wt-text-on-background`,"aria-hidden":`true`})]})}),(0,R.jsx)(I,{as:L.Fragment,enter:`transition ease-out duration-100`,enterFrom:`transform opacity-0 scale-95`,enterTo:`transform opacity-100 scale-100`,leave:`transition ease-in duration-75`,leaveFrom:`transform opacity-100 scale-100`,leaveTo:`transform opacity-0 scale-95`,children:(0,R.jsx)(F.Items,{className:`absolute right-0 z-50 mt-2 w-56 origin-top-right rounded-md border bg-wt-background shadow-lg`,children:(0,R.jsxs)(`div`,{className:`px-1 py-1`,children:[(0,R.jsx)(wn,{text:n.desc,order:`desc`,reorderComments:e}),(0,R.jsx)(wn,{text:n.asc,order:`asc`,reorderComments:e}),(0,R.jsx)(wn,{text:n.popular,order:`popular`,reorderComments:e})]})})})]})})},En=({publication:e})=>{let{t}
4=s(),[n,r]=(0,L.useState)(!1);return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(E,{isOpen:n,handleCloseModal:()=>r(!1),publication:e}),(0,R.jsxs)(`div`,{className:`relative`,children:[(0,R.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,R.jsx)(`label`,{htmlFor:`comment`,className:`sr-only`,children:t(`comments.commenting.comment_action_placeholder`)}),(0,R.jsx)(`textarea`,{rows:2,name:`content`,id:`comment`,className:`block w-full resize-none border-0 bg-transparent py-3 text-sm focus:ring-0`,placeholder:`${t(`comments.commenting.comment_action_placeholder`)}...`,required:!0}),(0,R.jsx)(`div`,{className:`py-2`,"aria-hidden":`true`,children:(0,R.jsx)(`div`,{className:`py-px`,children:(0,R.jsx)(`div`,{className:`h-6`})})})]}),(0,R.jsxs)(`div`,{className:`absolute inset-x-0 bottom-0 flex justify-between py-2 pl-3 pr-2`,children:[(0,R.jsx)(`div`,{className:`flex items-center space-x-5`,children:(0,R.jsx)(`div`,{className:`flex-shrink-0`})}),(0,R.jsx)(`div`,{className:`flex-shrink-0 pr-1`,children:(0,R.jsx)(P,{btnSize:`sm`,type:`button`,onClick:()=>r(!0),children:t(`shared.cta.login`)})})]})]})]})},Dn=({post:e,subscription:t,publication:n})=>{let{t:r}=s(),{admin:i}=o(),[a,l]=c(),u=a.get(`comments`)===`true`,{initialFetched:d,comments:f,optimisticallyRenderNewComment:p,optimisticallyDeleteTopLevelComment:h,commentOrder:g,reorderComments:_,loadMore:v,isLoadingMore:y,remainingCount:b,hasNextPage:x}=$t({postId:e.id}),S=!!i,C=e.comments_state===en.PREMIUM,w=!!t,T=!f?.length,E=!!t?.comment_post_bans?.includes(e.id),D=!!t?.comment_publication_ban||E,O=e.comments_state===en.LOCKED||!w||D,k=!O&&!!t||S,A=!w&&!S,j=n.web_template.post_padding,M=n?.web_template?.comments_ordering;return(0,R.jsx)(`div`,{className:`pb-8`,children:(0,R.jsxs)(X,{classNames:`mx-auto max-w-2xl`,postPadding:j,children:[u&&(0,R.jsxs)(`button`,{type:`button`,className:`flex items-center pt-8 pb-2 text-sm text-wt-primary`,onClick:()=>l({}),children:[(0,R.jsx)(fe,{className:`w-3 h-3 mr-1`}),(0,R.jsx)(`span`,{children:e.web_title})]}),(0,R.jsxs)(`div`,{className:`flex items-center justify-between gap-4 py-2`,children:[(0,R.jsx)(m,{as:`h4`,size:`xl`,theme:`content`,weight:`bold`,className:`leading-none`,children:r(`comments.replying.reply`)}),(0,R.jsx)(Tn,{reorderComments:_,commentOrder:g||M})]}),k&&(0,R.jsx)(`div`,{className:`pb-4`,children:(0,R.jsx)(sn,{postId:e.id,rows:4,onCommentCreated:p,subscription:t,isPremiumCommentsOnly:C})}),A&&(0,R.jsxs)(`div`,{className:`pb-4`,children:[(0,R.jsx)(En,{publication:n}),(0,R.jsx)(Z,{})]}),d&&!T&&(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(Sn,{initialCommentsFetched:d,comments:f,postId:e.id,optimisticallyDeleteComment:h,subscription:t,commentsLocked:O&&!S,isPremiumCommentsOnly:C}),d&&x&&(0,R.jsx)(`div`,{className:`flex justify-center py-8`,children:(0,R.jsx)(`button`,{type:`button`,className:`text-xs text-wt-primary`,onClick:v,children:y?(0,R.jsxs)(`span`,{children:[r(`comments.loading.loading`),`...`]}):(0,R.jsxs)(`span`,{children:[r(`comments.loading.load_more`),` (`,b,`)`]})})})]}
4),!d&&(0,R.jsx)(Cn,{})]})})},On=({post:e,publication:t,isGatedContentDisabled:n,subscription:r,paywall:i})=>e.hide_premium_post&&i?(0,R.jsx)(S,{subscription:r,publication:t,paywall:i}):e.contains_subscriber_break&&!n?(0,R.jsx)(oe,{title:e.email_capture_title,message:e.email_capture_message,cta:e.email_capture_cta,publication:t,postSlug:e.slug,theme:`subscribe-gate`}):null,kn=({children:e,show:t})=>(0,R.jsx)(I,{show:t,as:L.Fragment,children:(0,R.jsx)(I.Child,{as:L.Fragment,enter:`ease-out duration-100`,enterFrom:`transform translate-y-3/4 opacity-0`,enterTo:`transform translate-y-0 opacity-100`,leave:`ease-in duration-100`,leaveFrom:`transform translate-y-0 opacity-100`,leaveTo:`transform translate-y-3/4 opacity-0`,children:(0,R.jsx)(`div`,{className:`fixed bottom-0 left-0 z-40 flex h-3/4 min-h-[475px] w-full items-end sm:items-center`,children:(0,R.jsx)(`div`,{className:`relative mx-auto flex h-full w-full max-w-none transform items-center justify-center overflow-auto rounded-t-wt bg-gradient-to-t from-[var(--wt-background-color)] from-80% p-4 text-left align-middle transition-all md:from-70%`,children:(0,R.jsx)(`div`,{className:`relative flex h-full w-full flex-col items-center justify-end space-y-4 pt-20`,children:e})})})})}),An=({enabled:e})=>{let t=()=>{let e,t,n=`calc(100vh + 100px)`;if(typeof document<`u`){e=document.querySelector(`.rendered-post`)?.getBoundingClientRect(),t=window?.innerHeight,e&&e.bottom+window.scrollY<t&&(n=`100vh`);let r=document.querySelector(`body`),i=document.querySelector(`html`);r&&(window.scrollTo(0,0),r.style.height=n,r.style.overflow=`hidden`,r.style.userSelect=`none`),i&&(i.style.overflow=`auto`)}},n=()=>{let e=document.querySelector(`body`),t=document.querySelector(`html`);e&&(e.style.height=``,e.style.overflow=``,e.style.userSelect=``),t&&(t.style.overflow=``)};(0,L.useEffect)(()=>(e?t():n(),()=>{e&&n()}),[e])},jn=()=>{let[e,t]=(0,L.useState)(0),[n,r]=(0,L.useState)(0),i=()=>{t(window.scrollY/(document.body.scrollHeight-window.innerHeight)),r(window.scrollY)};return(0,L.useEffect)(()=>(i(),window.addEventListener(`scroll`,i),()=>window.removeEventListener(`scroll`,i)),[]),{percentageScrolled:e,windowScrollY:n}},Mn=768,Nn=({title:e,message:t,cta:n,publication:r,isOpen:i,onClose:a})=>{let{signupWidgetConfigs:o}=u(`root`),{t:c}=s(),{handleOpenModal:l}=D();return(0,R.jsx)(I,{appear:!0,show:i,as:L.Fragment,children:(0,R.jsxs)(ne,{as:`div`,className:`relative z-20`,onClose:()=>{(window?.innerWidth||document?.documentElement?.clientWidth||document?.body?.clientWidth)>=Mn&&a()},children:[(0,R.jsx)(I.Child,{as:L.Fragment,enter:`ease-out duration-50`,enterFrom:`opacity-0`,enterTo:`opacity-100`,leave:`ease-in duration-50`,leaveFrom:`opacity-100`,leaveTo:`opacity-0`,children:(0,R.jsx)(`div`,{className:`fixed inset-0 bg-black/60`})}),(0,R.jsx)(`div`,{className:`fixed inset-4 overflow-y-auto`,children:(0,R.jsx)(`div`,{className:`flex min-h-full items-center justify-center text-center`,children:(0,R.jsx)(I.Child,{as:L.Fragment,enter:`ease-out duration-50`,enterFrom:`opacity-0 scale-95`,enterTo:`opacity-100 scale-100`,leave:`ease-in duration-50`,leaveFrom:`opacity-100 scale-100`,leaveTo:`opacity-0 scale-95`,children:(0,R.jsxs)(ne.Panel,{className:`relative -mt-32 w-full max-w-lg transform overflow-hidden rounded-lg bg-white p-3 text-center align-middle shadow-xl transition-all md:p-6`,children:[(0,R.jsx)(`button`,{"aria-label":`Close`,className:`absolute right-3 top-3 sm:right-6 sm:top-6`,onClick:a,children:(0,R.jsx)(b,{className:`h-7 w-7 stroke-1 text-gray-500 transition-all hover:text-gray-700`})}),(0,R.jsx)(`div`,{className:`m-auto h-12 w-12 overflow-hidden rounded-wt`,children:(0,R.jsx)(te,{src:r.logo.thumb.url,alt:r.name,maxWidth:48,width:48,height:48,aspectRatio:`square`})}),(0,R.jsx)(h,{as:`h3`,weight:`bold`,fontFamilyv2:r.web_template.web_theme.font_header,className:`tracking-medium mt-6 pb-3 text-2xl font-bold leading-tight text-gray-900`,children:e}),(0,R.jsx)(h,{as:`h5`,fontFamilyv2:r.web_template.web_theme.font_header,className:`mb-2 pb-10 text-sm font-light leading-tight tracking-wider text-gray-700`,children:t}),(0,R.jsx)(f,{signupStyles:{...o,buttonText:n,fontSize:`sm`},type:d.POPUP}),(0,R.jsx)(`div`,{className:`-ml-6 mt-2 w-[calc(100%+3rem)] border-t border-t-gray-200 pb-1 pt-6`,children:(0,R.jsxs)(h,{as:`span`,fontFamilyv2:r.web_template.web_theme.font_header,className:`mb-4 pb-10 text-sm font-light leading-tight tracking-wider text-gray-700`,children:[c(`login.already_a_subscriber`),(0,R.jsxs)(`button`,{type:`button`,onClick:()=>{l(`login`),a()},className:`ml-1`,children:[(0,R.jsx)(`span`,{className:`text-wt-primary underline underline-offset-1`,children:c(`shared.cta.sign_in`)}),`.`]})]})})]})})})})]})})},Pn=50,Fn=40,In=({post:e,publication:t,isPopupDisabled:n,isGatedContentDisabled:r})=>{let{percentageScrolled:i,windowScrollY:a}=jn()||{percentageScrolled:0,windowScrollY:0},s=Number((i*100).toFixed(1)),c=ee(),{setCookie:l}
4=o(),[u,d]=(0,L.useState)(!1),[f,p]=(0,L.useState)(!1),[m,h]=(0,L.useState)(!1),g=(0,L.useMemo)(()=>e.enforce_gated_content&&!e.contains_subscriber_break&&!r&&!n&&!c,[e,r,n,c]);An({enabled:m&&g});let _=()=>{let e,t;return typeof document<`u`&&(e=document.querySelector(`.rendered-post`)?.getBoundingClientRect(),t=window?.innerHeight),{contentBounds:e,windowHeight:t}},v=e.enable_popup_on_scroll&&s>=Fn&&!r&&!n&&!c,y=m&&g&&a>=Pn;return(0,L.useEffect)(()=>{h(!0)},[]),(0,L.useEffect)(()=>{n&&u&&d(!1)},[n,u]),(0,L.useEffect)(()=>{r&&f&&p(!1)},[r,f]),(0,L.useEffect)(()=>{v&&d(!0)},[v]),(0,L.useEffect)(()=>{p(y)},[a,y]),(0,L.useEffect)(()=>{if(!m||!g)return;let{contentBounds:e,windowHeight:t}=_();(e&&t&&e.height+a<t-Pn||y)&&p(!0)},[m,g,y,a]),(0,R.jsxs)(R.Fragment,{children:[!u&&!f&&(0,R.jsx)(`div`,{className:`sticky top-0 z-50 w-full`,children:(0,R.jsx)(ie,{variant:`post`,currentProgress:s})}),v&&(0,R.jsx)(Nn,{isOpen:u,onClose:()=>{l({name:`popup_closed`,value:`true`,days:4}),d(!1)},publication:t,title:e.email_capture_title,message:e.email_capture_message,cta:e.email_capture_cta}
4),(0,R.jsx)(`div`,{className:`fixed bottom-0 left-0 z-50 px-4`,children:(0,R.jsx)(kn,{show:f,children:(0,R.jsx)(oe,{title:e.email_capture_title,message:e.email_capture_message,cta:e.email_capture_cta,publication:t,postSlug:e.slug,theme:`subscribe-gate-bottom`})})})]})},Ln=({className:e})=>(0,R.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,className:(0,z.default)(e),children:(0,R.jsx)(`path`,{d:`m11.645 20.91-.007-.003-.022-.012a15.247 15.247 0 0 1-.383-.218 25.18 25.18 0 0 1-4.244-3.17C4.688 15.36 2.25 12.174 2.25 8.25 2.25 5.322 4.714 3 7.688 3A5.5 5.5 0 0 1 12 5.052 5.5 5.5 0 0 1 16.313 3c2.973 0 5.437 2.322 5.437 5.25 0 3.925-2.438 7.111-4.739 9.256a25.175 25.175 0 0 1-4.244 3.17 15.247 15.247 0 0 1-.383.219l-.022.012-.007.004-.003.001a.752.752 0 0 1-.704 0l-.003-.001Z`})}),Rn=({className:e})=>(0,R.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,strokeWidth:1.5,stroke:`currentColor`,className:(0,z.default)(e),children:(0,R.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M21 8.25c0-2.485-2.099-4.5-4.688-4.5-1.935 0-3.597 1.126-4.312 2.733-.715-1.607-2.377-2.733-4.313-2.733C5.1 3.75 3 5.765 3 8.25c0 7.22 9 12 9 12s9-4.78 9-12Z`})}),zn=({children:e,count:t=0,className:n})=>(0,R.jsxs)(`div`,{className:(0,z.default)(n,`flex items-center`),children:[e,(0,R.jsx)(`span`,{className:(0,z.default)(t===0?`hidden text-transparent`:`text-[#6B7280] text-wt-text-on-background`,`text-sm font-medium group-hover:opacity-100`),children:t})]}),Bn=(e,t,n)=>e.length===0||!t&&!n?!1:e.filter(e=>e.liked===!0).some(e=>
4e.user_id===t?.id||e.subscription_id===n?.id),Vn=({post:e,subscription:t,admin:n,className:r,likes:i,fetched:a})=>{let{t:o}=s(),[c,u]=(0,L.useState)(!1),[d,f]=(0,L.useState)(0),[p,m]=(0,L.useState)(!1),[h,g]=(0,L.useState)(!1),_=l(),v=!!n,y=!v&&!t;(0,L.useEffect)(()=>{a&&!p&&(u(Bn(i,n,t)),f(i.filter(e=>e.liked===!0).length),m(!0))},[a,p]);let b=()=>{c?(u(!1),f(d-1)):(u(!0),f(d+1))};return y?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`button`,{className:`group`,type:`button`,onClick:()=>g(!0),children:(0,R.jsx)(zn,{count:d,className:`text-wt-text-on-background opacity-50 group-hover:opacity-100`,children:(0,R.jsx)(`div`,{className:`rounded-full p-1 hover:bg-[#f3f4f6]`,children:(0,R.jsx)(Rn,{className:(0,z.default)(r,`h-4 w-4 stroke-1`)})})})}),h&&(0,R.jsx)(A,{title:o(`gated.login_or_subscribe`),description:``,isOpen:h,onClose:()=>g(!1),children:(0,R.jsx)(`div`,{children:(0,R.jsx)(Z,{})})})]}):(0,R.jsxs)(_.Form,{method:`post`,onSubmit:e=>{e.preventDefault();let t=new FormData(e.currentTarget);v?_.submit(t,{method:`post`,action:`/admins/post_like`}):_.submit(t,{method:`post`,action:`/post_like`}),b()},action:v?`/admins/post_like`:`/post_like`,className:`group relative top-[3px]`,children:[(0,R.jsx)(`input`,{type:`hidden`,name:`post_id`,value:e.id}),(0,R.jsx)(`input`,{type:`hidden`,name:`subscription_id`,value:t?.id}),(0,R.jsx)(`input`,{type:`hidden`,name:`user_id`,value:n?.id}),(0,R.jsx)(`button`,{type:`submit`,children:c?(0,R.jsx)(zn,{count:d,children:(0,R.jsx)(`div`,{className:`rounded-full p-1 hover:bg-[#f3f4f6]`,children:(0,R.jsx)(Ln,{className:(0,z.default)(r,`fill-wt-primary text-wt-primary`,`h-4 w-4 stroke-1`)})})}):(0,R.jsx)(zn,{count:d,className:`text-wt-text-on-background opacity-50 group-hover:opacity-100`,children:(0,R.jsx)(`div`,{className:`rounded-full p-1 hover:bg-[#f3f4f6]`,children:(0,R.jsx)(Rn,{className:(0,z.default)(r,`h-4 w-4 stroke-1`)})})})})]})},Hn=e=>e?e.filter(e=>!!(e?.subscription_id||e?.user_id)):[],Un=e=>{let t=l();return(0,L.useEffect)(()=>{e&&t.state===`idle`&&!t.data&&t.load(`/post_insights?post_id=${e}`)},[e,t.data,t.state]),t.data?.length?{...t.data[0],likes:Hn(t.data[0].likes),fetched:!0}:{fetched:!1,likes:[],comment_count:0}},Wn=({delay:e=200,enabled:t=!0})=>{let[n,r]=(0,L.useState)(!1);return(0,L.useEffect)(()=>{if(!t)return;let n,i=()=>{r(!0),clearTimeout(n),n=setTimeout(()=>{r(!1)},e)};return window.addEventListener(`scroll`,i),()=>{window.removeEventListener(`scroll`,i),clearTimeout(n)}},[t,e]),{isScrolling:n}},Gn=({className:e,fill:t})=>(0,R.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,strokeWidth:1.5,stroke:`currentColor`,className:(0,z.default)(e),fill:t,children:(0,R.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M7.217 10.907a2.25 2.25 0 1 0 0 2.186m0-2.186c.18.324.283.696.283 1.093s-.103.77-.283 1.093m0-2.186 9.566-5.314m-9.566 7.5 9.566 5.314m0 0a2.25 2.25 0 1 0 3.935 2.186 2.25 2.25 0 0 0-3.935-2.186Zm0-12.814a2.25 2.25 0 1 0 3.933-2.185 2.25 2.25 0 0 0-3.933 2.185Z`})}),Kn=({title:e,url:t,iconClassName:n,description:r=``})=>(0,R.jsxs)(F,{as:`div`,className:`relative z-20 inline-block text-left md:z-0`,children:[(0,R.jsx)(F.Button,{className:`relative right-[2px] top-[1.5px] outline-none md:right-[0px]`,children:(0,R.jsx)(`div`,{className:`flex items-center rounded-full p-1 hover:bg-[#f3f4f6]`,children:(0,R.jsx)(Gn,{className:(0,z.default)(n,`h-7 w-7 stroke-1 text-gray-400`)})})}),(0,R.jsx)(I,{as:L.Fragment,enter:`transition ease-out duration-100`,enterFrom:`transform opacity-0 scale-95`,enterTo:`transform opacity-100 scale-100`,leave:`transition ease-in duration-75`,leaveFrom:`transform opacity-100 scale-100`,leaveTo:`transform opacity-0 scale-95`,children:(0,R.jsx)(F.Items,{className:(0,z.default)(`absolute bottom-10 left-auto right-0 z-40 origin-top-right divide-y divide-gray-100 rounded-md bg-white p-4 pb-4 pr-2 shadow-lg ring-1 ring-black/5 focus:outline-none md:bottom-auto md:left-4 md:right-auto`),children:(0,R.jsxs)(`div`,{className:`flex w-20 flex-wrap gap-2`,children:[(0,R.jsx)(He,{subject:e,body:r,url:t,children:(0,R.jsx)(Be,{round:!0,size:30,className:`rounded-full bg-[#9ca3af] hover:bg-gray-800`,bgStyle:{fill:`transparent`}})}),(0,R.jsx)(F.Item,{children:(0,R.jsx)(Pt,{title:e,url:t,children:(0,R.jsx)(qt,{roun
4d:!0,size:30,className:`rounded-full bg-[#9ca3af] hover:bg-gray-800`,bgStyle:{fill:`transparent`}})})}),(0,R.jsx)(F.Item,{children:(0,R.jsx)(ot,{title:e,url:t,children:(0,R.jsx)(it,{round:!0,size:30,className:`rounded-full bg-[#9ca3af] hover:bg-gray-800`,bgStyle:{fill:`transparent`}})})}),(0,R.jsx)(F.Item,{children:(0,R.jsx)(qe,{title:e,url:t,children:(0,R.jsx)(Ue,{round:!0,size:30,className:`rounded-full bg-[#9ca3af] hover:bg-gray-800`,bgStyle:{fill:`transparent`}})})}),(0,R.jsx)(F.Item,{children:(0,R.jsx)(xt,{title:e,url:t,children:(0,R.jsx)(yt,{round:!0,size:30,className:`rounded-full bg-[#9ca3af] hover:bg-gray-800`,bgStyle:{fill:`transparent`}})})}),(0,R.jsx)(F.Item,{children:(0,R.jsx)(Wt,{title:e,url:t,children:(0,R.jsx)(Ht,{round:!0,size:30,className:`rounded-full bg-[#9ca3af] hover:bg-gray-800`,bgStyle:{fill:`transparent`}})})})]})})})]}),qn=({count:e})=>{let t=i(),n=a();return(0,R.jsxs)(`button`,{type:`button`,onClick:()=>{t(`${n.pathname}#comments`)},className:`group relative top-[1px] flex items-center outline-none md:pt-0`,children:[(0,R.jsx)(`div`,{className:`rounded-full p-1 hover:bg-[#f3f4f6]`,children:(0,R.jsx)(y,{className:(0,z.default)(`h-7 w-7 stroke-1 text-wt-text-on-background opacity-50 group-hover:opacity-100`)})}),(0,R.jsx)(`span`,{className:(0,z.default)(e===0?`hidden`:`text-[#6B7280]`,`relative -top-[1px] text-sm font-medium group-hover:opacity-100 md:top-0`),children:e})]})},Jn=({subscription:e,post:t,admin:n,isGatedContentDisabled:r})=>{let{webTheme:i}
4=g(),[a,o]=(0,L.useState)(``),s=Un(t.id),c=ae(),{isScrolling:l}=Wn({delay:300,enabled:c}),u=l&&c,d=i.navbar_template===`template-5`||i.navbar_template===`template-6`;return(0,L.useEffect)(()=>{o(window.location.href)},[]),(0,R.jsxs)(`div`,{className:(0,z.default)(`fixed bottom-0 left-0 top-auto z-20 w-full rounded bg-wt-background shadow-xl transition-all duration-300 ease-in-out md:bottom-auto md:z-auto md:!w-fit md:border-none md:shadow-none`,u?`h-0 overflow-hidden opacity-0`:`opacity-100`,d?`md:top-36`:`md:top-20`),children:[(0,R.jsx)(`div`,{className:`absolute left-0 top-0 w-full border border-t border-wt-text-on-background bg-wt-background opacity-10 md:hidden`}),(0,R.jsx)(`div`,{className:`mx-auto w-full max-w-6xl px-0 lg:px-4`,children:(0,R.jsx)(`div`,{className:(0,z.default)(`flex flex-col gap-8 md:h-40`),children:(0,R.jsx)(`div`,{className:``,children:(0,R.jsxs)(`div`,{className:`grid grid-cols-3 p-4 px-8 sm:p-2 sm:px-2 md:grid-cols-1 md:gap-2`,children:[(0,R.jsx)(`div`,{className:(0,z.default)(`relative flex flex-col justify-center md:left-1`),children:(0,R.jsx)(C,{})}),(0,R.jsxs)(`div`,{className:`flex items-center justify-center gap-3 md:flex-col md:items-start md:gap-1`,children:[(0,R.jsx)(Vn,{className:`h-7 w-7 outline-none`,post:t,likes:s.likes,fetched:s.fetched,admin:n,subscription:e}),t.comments_enabled&&(0,R.jsx)(qn,{count:s.comment_count}),(0,R.jsx)(Kn,{title:t.web_title,description:t.web_subtitle,url:a,iconClassName:`text-wt-text-on-background opacity-50 hover:opacity-100`})]})]})})})})]})},Yn=({html:e,isGatedContentDisabled:t,subscription:n,admin:r,post:i,publication:a})=>{let o=[{text:a?.name,href:`../`},{text:`Posts`,href:void 0},{text:i.web_title,href:i.slug}],s=a.web_template.post_padding;return(0,R.jsx)(R.Fragment,{children:(0,R.jsxs)(`div`,{className:`relative mx-auto max-w-6xl px-4`,children:[(0,R.jsx)(Jn,{post:i,subscription:n,admin:r,isGatedContentDisabled:t}),(0,R.jsx)(`div`,{className:``,children:(0,R.jsxs)(`div`,{className:`mx-auto flex max-w-2xl flex-col pb-4`,children:[a.render_breadcrumbs&&(0,R.jsx)(X,{postPadding:s,classNames:`mt-8`,children:(0,R.jsx)(se,{breadcrumbs:o})}),(0,R.jsx)(x,{html:e,slug:i.slug,update:t})]})})]})})},Xn=({publication:e,recommendedPosts:t})=>{let{t:n}=s(),r=i(),a=e.web_template.post_padding;return(0,R.jsxs)(X,{postPadding:a,classNames:`mx-auto w-full max-w-2xl pb-8`,children:[(0,R.jsx)(m,{as:`h4`,size:`xl`,theme:`content`,weight:`bold`,className:`pb-6 leading-none sm:pb-2`,children:n(`posts.keep_reading`)}),(0,R.jsxs)(`div`,{className:`space-y-6`,children:[(0,R.jsx)(`div`,{className:`flex flex-col`,children:t.map(t=>(0,R.jsx)(ce,{publication:e,post:t,titleSize:`md`,descriptionSize:`sm`,showImage:!0,orientation:`horizontal`},t.id))}),(0,R.jsxs)(`button`,{type:`button`,className:`hover flex items-center text-sm text-wt-primary transition-all hover:font-medium`,onClick:()=>r(`/`),children:[(0,R.jsx)(`span`,{children:n(`shared.cta.view_more`)}),(0,R.jsx)(_,{className:`ml-0.5 h-3 w-3 pt-0.5`})]})]})]})},Zn=e=>[e.facebook_url,e.twitter_url,e.instagram_url,e.linkedin_url,e.tiktok_url,e.discord_url,e.threads_url].filter(e=>!!e);export{On as a,Zt as c,In as i,Xt as l,Xn as n,Dn as o,Yn as r,Qt as s,Zn as t,X as u}; 5//# sourceMappingURL=getSameAsArray-B5nagNMq.js.map 6//# debugId=bcedfc77-5ed4-5d17-babc-cb7ada5491f3
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.