티스토리 수익 글 보기
“use strict”;(self.webpackChunksubstack=self.webpackChunksubstack||[]).push([[“8780″],{78862:function(e,n,t){t.d(n,{A:()=>a});let a={button:”button-geLdIK”,priority_primary:”priority_primary-AEf55U”,priorityPrimary:”priority_primary-AEf55U”}},55913:function(e,n,t){t.d(n,{A:()=>l});var a=t(69277),i=t(70408),r=t(32641),o=t(4006),s=t(97731);let l=e=>{var{size:n=20,stroke:t=”var(–color-fg-primary)”,strokeWidth:l=1.5}=e,u=(0,r._)(e,[“size”,”stroke”,”strokeWidth”]);return(0,o.Y)(s.A,(0,i._)((0,a._)({},u),{name:”NoteShareIcon”,svgParams:{viewBox:”0 0 20 20″},width:n,height:n,stroke:t,strokeWidth:l,strokeLinecap:”round”,strokeLinejoin:”round”,children:(0,o.Y)(“path”,{d:”M10.2171 2.2793L10.2171 12.9745M10.2171 2.2793L13.333 4.99984M10.2171 2.2793L7.08301 4.99984M2.49967 10.9925L2.49967 14.1592C2.49967 16.011 4.00084 17.5121 5.85261 17.5121L14.9801 17.5121C16.8318 17.5121 18.333 16.011 18.333 14.1592L18.333 10.9925″})}))}},41935:function(e,n,t){t.d(n,{E0:()=>B,hy:()=>G,ib:()=>F,if:()=>x,wR:()=>j});var a=t(69277),i=t(70408),r=t(4006),o=t(32485),s=t.n(o),l=t(36119),u=t.n(l);t(7350);var c=t(57157),d=t(47796),p=t(72170),m=t(17402);t(15734),t(36066),t(89333),t(27437),t(4013),t(20297),t(89839);var h=t(18325),b=t(43427);t(14394),t(78330),t(15074),t(58299),t(26184),t(97683),t(33460),t(30653);var f=t(55136);t(50883);var v=t(58398),_=t(94794),k=t(84605);t(53989);var g=t(85478);t(98747);var y=t(46271);t(6049);var S=t(86500),C=t(94729),w=t(12501);t(68349);var L=t(98920),T=t(35369);t(76977),t(88774),t(16993),t(57820),t(63136);var P=t(36372);t(25758),t(5180),t(83629),t(28916);var D=t(11510);t(16291);var N=t(98111);t(56262),t(19601);var O=t(39318),M=t(49807),E=t(82776),A=t(57324);function Y(e,n){if(“button”===e&&”verbose”===n)return 16;if(“button”===e)return 20;if(“tabs”===e)return 24;if(“compressed”===e)return 14;if(“large-on-dark”===e)return 20;return 0}function I(e){let{post:n,pub:t,user:a,style:i,labelStyle:o,onChange:s,isStatic:l,isDisabled:c,postReactionToken:d,onOpenUpsellModal:p}=e,{iString:m}=(0,k.GO)(),h=u()(Object.values((null==n?void 0:n.reactions)||{})),f=”count”===o?(0,E.numberToString)(h||0):”cta”===o?”Like”:null;return(0,r.Y)(U,{post:n,pub:t,user:a,onChange:s,isStatic:l,style:i,postReactionToken:d,onOpenUpsellModal:p,children:e=>{let{isLiked:n,handleLike:t}=e;return(0,r.Y)(z,{style:i,state:n?”liked”:void 0,icon:(0,r.Y)(b.A,{className:”icon”,height:Y(i),strokeWidth:2}),onClick:c?()=>{}:t,noLabel:”none”===o,isDisabled:c,ariaLabel:m(“Like”)+(“count”===o?” (“.concat((0,E.numberToString)(h||0),”)”):””),ariaPressed:n,children:f})}})}function V(e){var n;let t=u()(Object.values((null==(n=e.post)?void 0:n.reactions)||{}));return(0,r.Y)(I,(0,i._)((0,a._)({},e),{labelStyle:t>0?”count”:”none”}))}function U(e){let{post:n,pub:t,user:a,onChange:i,isStatic:o,children:l,style:u,postReactionToken:c,onOpenUpsellModal:d}=e,[p,h]=(0,m.useState)(!1),{isLiked:b,toggle:k}=function(e){let{post:n,user:t,surface:a,onChange:i,postReactionToken:r}=e,o=!!(null==n?void 0:n.reaction),s=(0,_.aZ)(),l=(0,w.st)({pathname:(0,M.yRP)(s?”/api/v1/cross-post/”.concat(null==n?void 0:n.id,”/reaction”):”/api/v1/post/”.concat(null==n?void 0:n.id,”/reaction”),{token:r}),method:”POST”,deps:[null==n?void 0:n.id]});return{isLiked:o,toggle:async()=>{var e;if(l.isLoading)return”error”;if(!t)return”unauthorized”;let{reaction:r,reactions:o,reactor_names:s}=(0,f.Qw)(t,n);n.reaction=null!=r&&r,n.reactions=o,n.reactor_names=null!=s?s:[],null==i||i({post:n});let u=await l.refetch(r?{method:”POST”,json:{reaction:”❤”,surface:a}}:{method:”DELETE”}),c=null==u||null==(e=u.response)?void 0:e.status;if(c){let{reaction:e,reactions:a,reactor_names:r}=(0,f.Qw)(t,n);n.reaction=null!=e&&e,n.reactions=a,n.reactor_names=null!=r?r:[],null==i||i({post:n})}return 401===c?”unauthorized”:c?”error”:r?”liked”:”unliked”}}}({post:n,user:a,onChange:i,postReactionToken:c}),[g,y]=(0,m.useState)(!1),C=(0,m.useCallback)(async e=>{var t;if(null==e||null==(t=e.stopPropagation)||t.call(e),(0,S.u4)(S.qY.POST_UFI_BUTTON_CLICKED,{type:”like”,post_id:n.id}),void 0!==d){d(),null==e||e.preventDefault();return}”unauthorized”===await k()&&y(!0)},[k,d,n.id]);return(0,r.FD)(“div”,{className:s()(“like-button-container”,”post-ufi-button”,”style-“.concat(u),b&&”state-liked”),children:[l({isLiked:b,handleLike:C}),(0,r.Y)(L.Z,{isStatic:o,displaySignInModal:g,onCloseSignInModal:()=>y(!1),entry:”post-preview-restack”}),!o&&(0,r.Y)(v.Z,{isOpen:p,medium:”web”,pub:t,user:a,post:n,onClose:()=>h(!1)})]})}async function B(e,n,t){let{surface:a}=t;await (0,C.x6)(“/api/v1/posts/saved”,{method:n?”POST”:”DELETE”,json:{post_id:e}}),(0,S.u4)(S.qY.POST_SAVED,{post_id:e,surface:a,is_saved:n})}function F(){let e=(0,P.d)(),{iString:n}=(0,k.GO)();return t=>{t?e.popToast(()=>(0,r.Y)(P.y,{text:n(“Post saved”),Icon:c.A,cta:n(“View now”),href:(0,O.c8C)()})):e.popToast(()=>(0,r.Y)(P.y,{text:n(“Post unsaved”),Icon:d.A}))}}function R(e){let n,{style:t,count:i,labelStyle:o,post:s,pub:l,isStatic:u,onClick:c,isDisabled:d,onOpenUpsellModal:p}=e,{iString:m}=(0,k.GO)(),b=(0,D.Iu)(),f=(0,y.Jd)(),v=(null!=i?i:0)>0,_=void 0!==p&&!f&&b;return n=(null==s?void 0:s.comment_url_override)?s.comment_url_override:u?””.concat(N.T.HALF_MAGIC_COMMENTS_URL,”&utm_source=”).concat(A.VU.substack,”&utm_medium=”).concat(A.Jn.email):!b||(null==f?void 0:f.is_contributor)?(0,O.wu9)(l,s,{comments:!0}):(0,O.XV8)(l.subdomain,s.slug,{params:(0,a._)({comments:!0,utm_source:A.VU.post,utm_medium:A.Jn.web},_&&v&&{show_app_upsell:”comment”})}),(0,r.FD)(z,{style:t,icon:(0,r.Y)(h.A,{className:”icon”,height:Y(t),strokeWidth:2}),href:d?void 0:n,onClick:d?()=>{}:e=>{if((0,S.u4)(S.qY.POST_UFI_BUTTON_CLICKED,{type:”comment”,post_id:s.id}),_&&!v){p(),e.preventDefault();return}c?c(e):(null==e||e.preventDefault(),window.location.href=n)},noLabel:”none”===o,className:”post-ufi-comment-button”,isDisabled:d,ariaLabel:m(“cta”===o?”Comment”:”View comments”+” (“.concat((0,E.numberToString)(i||0),”)”)),children:[“cta”===o&&m(“Comment”),”count”===o&&(0,E.numberToString)(i||0)]})}function x(e){let n,{post:t,user:a,pub:i,style:o,labelStyle:l,isStatic:u,onChange:c,position:d}=e,[h,b]=(0,m.useState)(!1),f=(0,m.useCallback)(()=>{(0,S.u4)(S.qY.POST_SHARE_BUTTON_CLICKED,{position:d,post_id:t.id}),b(!0)},[]),{iString:_}=(0,k.GO)();n=t.share_url_override?t.share_url_override:u?t?N.T.SHARE_URL:N.T.SHARE_PUB_URL:”javascript:void(0)”;let g=”none”===l;return(0,r.FD)(r.FK,{children:[(0,r.Y)(z,{style:o,icon:g?(0,r.Y)(p.A,{className:”icon”,height:Y(o),strokeWidth:2}):null,onClick:f,href:n,noLabel:”none”===l,className:s()(!g&&”no-icon”),children:”cta”===l&&_(“Share”)}),!u&&(0,r.Y)(v.Z,{isOpen:h,medium:”web”,pub:i,user:a,post:t,onChange:c,onClose:()=>b(!1)})]})}let z=(0,m.forwardRef)((e,n)=>{let{icon:t,children:a,state:i,style:o,onClick:l,href:u,noLabel:c,verboseLabel:d,noBorder:p,className:m,isDisabled:h,iconPosition:b=”left”,title:f,ariaLabel:v,ariaPressed:_}=e;return(0,r.FD)(T.Nm,{className:s()(“post-ufi-button”,”style-“.concat(o),m,i?”state-“.concat(i):void 0,h?”state-disabled”:void 0,a&&!c?”has-label”:”no-label”,p?”no-border”:”with-border”,d?”verbose-label”:””),title:f,href:u,onClick:e=>{l&&(e.stopPropagation(),l(e))},ref:n,”aria-label”:null!=v?v:f,”aria-pressed”:_,children:[“left”===b&&t,!c&&a&&(0,r.Y)(“div”,{className:”label”,children:a}),”right”===b&&t]})}),j=e=>{let{pub:n,post:t,user:a,onChange:i,postReactionToken:o,onOpenUpsellModal:s}=e;return(0,g.mJ)().getConfigFor(“like_posts_enabled”)&&n.community_enabled?(0,r.Y)(V,{style:”button”,post:t,pub:n,user:a,onChange:i,postReactionToken:o,onOpenUpsellModal:s}):null},G=e=>{let{pub:n,post:t,onClick:a,onOpenUpsellModal:i}=e,o=(0,E.showCommentsOnPost)({publication:n,post:t}),{comment_count:s}=t;return o?(0,r.Y)(R,{post:t,pub:n,labelStyle:s>0?”count”:”none”,style:”button”,count:s,onClick:a,onOpenUpsellModal:i}):null}},53448:function(e,n,t){function a(e){if(0===e)return”PT0M”;if(e>=1440){let n=Math.floor(e/1440);return”P”.concat(n,”D”)}if(e>=60){let n=Math.floor(e/60),t=e%60;return t>0?”PT”.concat(n,”H”).concat(t,”M”):”PT”.concat(n,”H”)}return”PT”.concat(e,”M”)}function i(e){let n=e.trim();if(!n)return n;let t=n.match(/^(\d+)\s*-\s*(\d+)$/),a=n.match(/^(\d+)$/);if(t&&t[1]&&t[2]){let e=Number.parseInt(t[1]),n=Number.parseInt(t[2]);if(!Number.isNaN(e)&&!Number.isNaN(n))return{“@type”:”QuantitativeValue”,minValue:e,maxValue:n,unitText:”servings”}}else if(a&&a[1]){let e=Number.parseInt(a[1]);if(!Number.isNaN(e))return{“@type”:”QuantitativeValue”,value:e,unitText:”servings”}}return n}t.d(n,{BB:()=>p,J9:()=>o,Xn:()=>a,fb:()=>l,jQ:()=>i,rU:()=>c});let r=”\xbd⅓⅔\xbc\xbe⅕⅖⅗⅘⅙⅚⅐⅛⅜⅝⅞”;function o(e){return e.replace(/^(Step\s*\d+[:.]?\s*)/i,””).replace(/^(\d+[.)]\s*)/,””).trim()}RegExp(“^(\\d+\\s+\\d+/\\d+|”+”\\d+\\s+[“.concat(r,”]|”)+”\\d+(?:-\\d+)?(?:/\\d+)?(?:\\.\\d+)?[“.concat(r,”]?|”)+”[“.concat(r,”]”)+”)\\s+(.+)$”);let s={DiabeticDiet:”Diabetic”,GlutenFreeDiet:”Gluten free”,HalalDiet:”Halal”,HinduDiet:”Hindu”,KosherDiet:”Kosher”,LowCalorieDiet:”Low calorie”,LowFatDiet:”Low fat”,LowLactoseDiet:”Low lactose”,LowSaltDiet:”Low salt”,VeganDiet:”Vegan”,VegetarianDiet:”Vegetarian”};function l(){return Object.entries(s).map(e=>{let[n,t]=e;return{value:n,label:t}})}let u={african:”African”,american:”American”,argentinian:”Argentinian”,balkan:”Balkan”,brazilian:”Brazilian”,british:”British”,cajun:”Cajun”,caribbean:”Caribbean”,central_european:”Central European”,chinese:”Chinese”,creole:”Creole”,cuban:”Cuban”,ethiopian:”Ethiopian”,filipino:”Filipino”,french:”French”,fusion:”Fusion”,georgian:”Georgian”,german:”German”,greek:”Greek”,hawaiian:”Hawaiian”,indian:”Indian”,indonesian:”Indonesian”,irish:”Irish”,italian:”Italian”,japanese:”Japanese”,korean:”Korean”,lebanese:”Lebanese”,malaysian:”Malaysian”,mediterranean:”Mediterranean”,mexican:”Mexican”,middle_eastern:”Middle Eastern”,moroccan:”Moroccan”,nepalese:”Nepalese”,nigerian:”Nigerian”,pakistani:”Pakistani”,persian:”Persian”,peruvian:”Peruvian”,polish:”Polish”,portuguese:”Portuguese”,russian:”Russian”,scandinavian:”Scandinavian”,soul_food:”Soul Food”,south_african:”South African”,spanish:”Spanish”,tex_mex:”Tex-Mex”,thai:”Thai”,turkish:”Turkish”,vegan:”Vegan”,vegetarian:”Vegetarian”,vietnamese:”Vietnamese”};function c(){return Object.entries(u).map(e=>{let[n,t]=e;return{value:n,label:t}})}let d={appetizer:”Appetizer”,baked_good:”Baked good”,beverage:”Beverage”,beef:”Beef”,bread:”Bread”,breakfast:”Breakfast”,brunch:”Brunch”,cake:”Cake”,casserole:”Casserole”,cocktail:”Cocktail”,cookie:”Cookie”,curry:”Curry”,dinner:”Dinner”,dip:”Dip”,dessert:”Dessert”,entree:”Entr\xe9e”,frozen_dessert:”Frozen dessert”,grill:”Grill”,lunch:”Lunch”,main_course:”Main course”,mocktail:”Mocktail”,noodle_dish:”Noodle dish”,pasta:”Pasta”,pastry:”Pastry”,pie:”Pie”,pizza:”Pizza”,pork:”Pork”,poultry:”Poultry”,pressure_cooker:”Pressure cooker”,pudding:”Pudding”,rice_dish:”Rice dish”,roast:”Roast”,salad:”Salad”,sandwich:”Sandwich”,seafood:”Seafood”,side_dish:”Side dish”,slow_cooker:”Slow cooker”,smoothie:”Smoothie”,snack:”Snack”,soup:”Soup”,stew:”Stew”,stir_fry:”Stir-fry”,vegan_main:”Vegan main”,vegetarian_main:”Vegetarian main”,wrap:”Wrap”};function p(){return Object.entries(d).map(e=>{let[n,t]=e;return{value:n,label:t}})}}}]);