(window.__LOADABLE_LOADED_CHUNKS__=window.__LOADABLE_LOADED_CHUNKS__||[]).push([[8],{"2NiC":function(e,t,n){var r=n("/MKj"),o=n("7w6Q"),i=n("RNo4");const l="http://play.google.com/store/apps/details?id=com.pinterest",s=["access_token","new_password","new_password_confirm","password","next"],a=(e,t)=>t?Object(i.b)(e,{invite_code:t}):e,c=(e,t,n)=>{if("ios"===t&&"string"==typeof e&&e.startsWith("discover/article/")){const t=e.split("/")[2];e=`discover_article/${t}/?is_deeplink=1`}return"string"==typeof e?a(e,n):"ios"===t||"ipad"===t?a(e.iOS,n):"android"===t?a(e.android,n):null};var d=({deeplinkUri:e,fallbackUrl:t,invite_code:n,platform:r,redirectToLite:a,unauthId:d,userAgent:u})=>{if(e){const p=(({deeplinkUri:e,invite_code:t,platform:n,fallbackUrl:r,unauthId:o})=>({deeplink_path:c(e,n,t),current_page_url:Object(i.m)("undefined"!=typeof window?window.location.href:"",s),install_id:o,utm_source:140,utm_medium:2152,...r?{af_r:r}:null}))({deeplinkUri:e,fallbackUrl:t,invite_code:n,platform:r,unauthId:d,userAgent:u});if(o.a.increment("mweb.deeplink",1,{platform:r}),n&&o.a.increment("mweb.deeplink.invite_code",1),o.a.increment("mweb.deeplink.unauthId",1,{withUnauthId:Boolean(d)}),a){o.a.increment("mweb.deeplink.lite_link",1);const e=(({unauthId:e})=>{const t=Object(i.c)({utm_source:"mweb",utm_medium:"upsell",utm_campaign:"twa",utm_content:e});return{referrer:encodeURI(t)}})({unauthId:d});window.location.href=Object(i.b)("http://play.google.com/store/apps/details?id=com.pinterest.twa",e)}else if("android"===r){const t=(({deeplinkUri:e,invite_code:t,platform:n,unauthId:r})=>{const o=JSON.stringify({deeplink_path:c(e,n,t),current_page_url:Object(i.m)("undefined"!=typeof window?window.location.href:"",s),install_id:r});return{referrer:Object(i.c)({utm_source:"mweb",utm_medium:"upsell",utm_content:o})}})({deeplinkUri:e,invite_code:n,platform:r,unauthId:d});"getInstalledRelatedApps"in navigator?navigator.getInstalledRelatedApps().then(e=>{if(e.length>0){const e=Object(i.b)(window.location.href,p);window.open(e)}else window.location.href=Object(i.b)(l,t)}).catch(o.a.increment("mweb_android.deeplink.playStore.error",1)):window.location.href=Object(i.b)(l,t)}else o.a.increment("mweb.deeplink.appsflyer_link",1),window.location.href=Object(i.b)("https://pinterest.onelink.me/TVSr/21e04bfd",p)}},u=n("QtD7"),p=n("fsjD"),f=n("eQwl"),b=n("nKUr");function h({children:e,invite_code:t,redirectToLite:n}){const{userAgentPlatform:o,unauthId:i,userAgent:l,country:s,locale:a}=Object(r.useSelector)(({session:e})=>e),c=Object(r.useDispatch)(),p=n||Object(f.e)({country:s,locale:a,platform:o,userAgent:l,activateLiteAppExp:()=>c(Object(u.a)("mweb_targeted_lite_app_upsell"))});return e(async(e,n)=>{d({deeplinkUri:e,fallbackUrl:n,invite_code:t,platform:o,redirectToLite:p,unauthId:i,userAgent:l})})}const m=e=>Object(b.jsx)(p.a,{children:t=>Object(b.jsx)(h,{...e,invite_code:t})});m.displayName="DeepLinkNavigator";t.a=m},NymR:function(e,t,n){n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return o})),n.d(t,"c",(function(){return i})),n.d(t,"d",(function(){return l})),n.d(t,"g",(function(){return s})),n.d(t,"f",(function(){return a})),n.d(t,"e",(function(){return c}));const r=36e5,o=24*r,i=7*o,l=365*o;function s(e){const t=Math.floor(e/6e4),n=Number((e%6e4/1e3).toFixed(0));return t+":"+(n<10?"0":"")+n}function a(e,t,n){let r=t;return"tl-PH"===t&&(r="fil-PH"),e.toLocaleTimeString(r,n)}function c(e,t,n){let r=t;return"tl-PH"===t&&(r="fil-PH"),e.toLocaleDateString(r,n)}},PmFr:function(e,t,n){n.d(t,"m",(function(){return r})),n.d(t,"n",(function(){return o})),n.d(t,"e",(function(){return i})),n.d(t,"g",(function(){return l})),n.d(t,"h",(function(){return s})),n.d(t,"f",(function(){return a})),n.d(t,"i",(function(){return c})),n.d(t,"j",(function(){return d})),n.d(t,"l",(function(){return u})),n.d(t,"b",(function(){return p})),n.d(t,"p",(function(){return f})),n.d(t,"c",(function(){return b})),n.d(t,"k",(function(){return h})),n.d(t,"o",(function(){return m})),n.d(t,"d",(function(){return g})),n.d(t,"a",(function(){return w}));const r="OPEN_UNAUTH",o="openUnauthType",i="_isAfterLogin",l="_lastVisitedPages",s="_lastVisitedPagesBeforeLogin",a="_lastVisitedBoardPages",c="_lastVisitedPagesBeforeNavPage",d="_lastVisitedSessionPages",u="unauthTopicsFollowed",p=["US","CA","NZ","AU"],f=new Set(["GB","IE"]),b=new Set(["AT","BE","CH","DE","DK","ES","FR","IT","NL","NO","PT","SE"]),h=new Set(["BR","MX","AR","CL","CO","PE"]),m=(new Set(["IN","ID","JP","KR","PH","TH","VN"]),new Set(["BR","MX","AR","CL","CO","PE","IN"]),"ad_img"),g="[Pinterest/iOS]",w="[Pinterest/Android]"},T0FN:function(e,t,n){n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return s}));var r=n("q1tI"),o=n("fgPB");function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const l=20;class s extends r.Component{constructor(...e){super(...e),i(this,"state",{isHidden:!!this.props.appUpsellFooterConfig}),i(this,"lastScrollPos",0),i(this,"updateHiddenState",e=>{this.reqAnimationId=window.requestAnimationFrame(()=>{this.setState({isHidden:e})})}),i(this,"handleScroll",Object(o.a)(()=>{const{appUpsellFooterConfig:e,isModal:t,onScroll:n,inMwebModalRelaxNoScrollPillGrp:r}=this.props,{isHidden:o}=this.state,i=window.scrollY,s=i-this.lastScrollPos,a=t?0:55;if(e)if(s>l&&o&&i>=500){e.shouldShowAfterScroll()&&(this.updateHiddenState(!1),n&&n(!1))}else(s<-l&&!o||i<=a)&&(r||(this.updateHiddenState(!0),n&&n(!0)));else s<-l&&o||i<=a?(this.updateHiddenState(!1),n&&n(!1)):s>l&&!o&&(this.updateHiddenState(!0),n&&n(!0));this.lastScrollPos=i},30))}componentDidMount(){try{this.props.hideOnScroll&&window.addEventListener("scroll",this.handleScroll)}catch(e){window.console.error(e),window.console.error('Can only register impression obstructions for type "HTMLElement"')}}componentWillUnmount(){this.props.hideOnScroll&&window.removeEventListener("scroll",this.handleScroll),this.reqAnimationId&&(window.cancelAnimationFrame(this.reqAnimationId),this.reqAnimationId=null)}componentDidUpdate(e){!e.hideOnScroll&&this.props.hideOnScroll?window.addEventListener("scroll",this.handleScroll):e.hideOnScroll&&!this.props.hideOnScroll&&window.removeEventListener("scroll",this.handleScroll)}render(){const{children:e}=this.props,{isHidden:t}=this.state;return e({isHidden:t,updateHiddenState:this.updateHiddenState})}}},TXO6:function(e,t,n){n.d(t,"d",(function(){return r})),n.d(t,"c",(function(){return o})),n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return l})),n.d(t,"e",(function(){return s}));function r(e){if(!e||!e.created_at)return!1;const t=new Date(e.created_at);return t.setDate(t.getDate()+28),(new Date).getTime()<t.getTime()}function o(e){return!(!e||!e.is_matured_new_user)&&e.is_matured_new_user}const i=e=>!!e&&2===e.login_state,l=e=>!(!e||!e.match(/\/static\/images\/user\/default_\d+\.png$/));function s(e){return!e||void 0===e.third_party_marketing_tracking_enabled||null===e.third_party_marketing_tracking_enabled||e.third_party_marketing_tracking_enabled}},eQwl:function(e,t,n){n.d(t,"a",(function(){return u})),n.d(t,"f",(function(){return h})),n.d(t,"g",(function(){return m})),n.d(t,"d",(function(){return g})),n.d(t,"e",(function(){return w})),n.d(t,"b",(function(){return O})),n.d(t,"c",(function(){return _}));var r=n("1Mlj"),o=n("vtuW"),i=n("TXO6"),l=n("NymR"),s=n("PmFr"),a=n("0G5S"),c=n("JJAz");const d=["BR","MX","AR","CL","CO","PE","IN"],u=Object.freeze({ANDROID_LITE_APP:"android_lite_app",FLAGSHIP_APP:"flagship_app"}),p=Object.freeze({VIEW_COUNT:"appUpsellViewCount",OPEN_APP_CLICKED:"appUpsellOpenAppClick"}),f=14*l.a;function b(e,t,n){return e-t>n}function h(){const e=Number(Object(a.a)(p.OPEN_APP_CLICKED,0));Object(a.c)(p.OPEN_APP_CLICKED,e+1)}const m=Object(r.a)(()=>{const e=Number(Object(a.a)(p.VIEW_COUNT,0));Object(a.c)(p.VIEW_COUNT,e+1)},200);const g=e=>{const t=function(){const e=Date.now(),t=Number(Object(a.a)("appUpsell"));return{currentTime:e,firstUpsellTime:Number(Object(a.a)("firstUpsellTime")),lastUpsellTime:t,showedAppUpsellCurrentSession:Boolean(Object(o.a)("showedAppUpsellCurrentSession"))}}();return e?function(e,t,n){const{currentTime:r,firstUpsellTime:o,lastUpsellTime:i,showedAppUpsellCurrentSession:l}=e;return n=n||f,!o||function(e,t,n){return e<t+n}(r,o,t)?!l:!!b(r,i,n)&&(Object(a.b)("firstUpsellTime"),!0)}(t,l.a):function(e,t){const{currentTime:n,lastUpsellTime:r}=e;return t=t||f,!r||b(n,r,t)}(t)},w=({country:e,platform:t,userAgent:n,upsellLiteAppExp:r,activateLiteAppExp:o})=>{try{return"android"===t&&(parseFloat((e=>{const t=(e=e.toLowerCase()).match(/android\s([0-9\.]*)/i);return t?t[1]:void 0})(n))<4.4||d.includes(e)&&0===Object(a.a)(p.OPEN_APP_CLICKED,0)&&Object(a.a)(p.VIEW_COUNT,0)>5&&Object(a.a)(p.VIEW_COUNT,0)<=8&&((o&&o()||"").startsWith("enabled")||!!r))}catch(i){return!1}},O=({country:e,currentUser:t,external:n=!1,isAppUpsellDisabled:r=!1,isAuthenticated:l,isMoveAppUpsellFromSaveToCloseupEnabledAndActivate:a,refresh:d=!1,locale:p="",platform:f,userAgent:b,activateLiteAppExp:h})=>{if(r||"undefined"!=typeof window&&Object(c.a)(window)&&Object(c.c)(window))return"";const m=!(Object(o.a)("openUnauthType")===s.m)&&!n&&!d&&l&&g(Object(i.d)(t));return m&&w({country:e,platform:f,userAgent:b,activateLiteAppExp:h})?u.ANDROID_LITE_APP:(p||"").startsWith("ar")&&"ios"===f?"":m?u.FLAGSHIP_APP:""},_=e=>(e.startsWith("zh")||e.startsWith("ar")?e:e.slice(0,2)).toUpperCase()},eyT9:function(e,t,n){n.d(t,"a",(function(){return i})),n.d(t,"e",(function(){return s})),n.d(t,"d",(function(){return p})),n.d(t,"c",(function(){return f})),n.d(t,"b",(function(){return b}));var r=n("28DW"),o=n("0G5S");const i="theme",l="dark"===Object(o.a)(i),s=()=>l,a=[{color:"--g-colorGray0",override:"var(--g-colorGray400)"},{color:"--g-colorGray100",override:"var(--g-colorGray300)"},{color:"--g-colorGray200",override:"var(--g-colorGray200)"},{color:"--g-colorGray300",override:"var(--g-colorGray100)"}];function c(e,t,n,r){e&&e.insertRule?e.insertRule(t+"{"+n+"}",r):e&&e.addRule&&e.addRule(t,n,r)}const d=(e,t,n="")=>new RegExp(`(\\.\\w+){${t}: ?var\\(${e}\\)}`,n),u=e=>{var t;(t=e.ownerNode.textContent,a.map(({color:e,override:n})=>{const r=t.match(d(e,"color")),o=t.match(d(e,"background-color","g")),i=t.match(d(e,"border-color")),l={color:null,background:[],borderColor:null};return r&&"--g-colorGray0"!==e&&(l.color=r[1]),(null==o?void 0:o.length)>0&&("--g-colorGray100"===e?o.forEach(e=>{l.background.push(e.slice(0,4))}):l.background.push(o[0].slice(0,4))),i&&(l.borderColor=i[1]),{selectors:l,override:n}})).forEach(({selectors:t,override:n})=>{t.color&&c(e,t.color,`color: ${n}!important`,10),t.background&&t.background.forEach(t=>c(e,t,`background-color: ${n}!important`,10)),t.borderColor&&c(e,t.borderColor,`border-color: ${n}!important`,10)}),document.body.style.background="#000"},p=()=>{Object(o.c)(i,"dark"),Object(r.a)("mweb.dark_mode.enable"),window.location.reload()},f=()=>{Object(o.b)(i),Object(r.a)("mweb.dark_mode.disable"),window.location.reload()},b=()=>{const e=Array.from(document.styleSheets).find(e=>"gestalt"===e.ownerNode.id);e&&u(e)}},fgPB:function(e,t,n){function r(e,t){let n;const r=(...r)=>{n||(e(...r),n=setTimeout(()=>n=null,t))};return r.cancel=()=>{void 0!==n&&clearTimeout(n)},r}n.d(t,"a",(function(){return r}))},fsjD:function(e,t,n){n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return i})),n.d(t,"c",(function(){return l}));var r=n("1dBE");const{Provider:o,Consumer:i,useHook:l}=Object(r.b)("inviteContext")},"r8+8":function(e,t,n){n.d(t,"a",(function(){return b})),n.d(t,"b",(function(){return h})),n.d(t,"d",(function(){return w})),n.d(t,"c",(function(){return O}));var r=n("q1tI"),o=n("2NiC"),i=n("AGnR"),l=n("yweb"),s=n("n6mq"),a=n("nKUr");class c extends r.PureComponent{constructor(...e){var t,n,r;super(...e),r=e=>{Object(i.h)({view_type:156,view_parameter:3106,component:13452}),e("user/me")},(n="handleInstallButtonClick")in(t=this)?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r}render(){return Object(a.jsx)(r.Fragment,{children:Object(a.jsxs)(s.f,{children:[Object(a.jsxs)(s.f,{alignItems:"center",direction:"row",display:"flex",marginBottom:2,children:[Object(a.jsx)(s.f,{children:Object(a.jsx)(s.w,{color:"red",icon:"pinterest",accessibilityLabel:this.props.i18n._("Pinterest App","Accessibility label for Pinterest App Icon on app upsell.","Accessibility label for Pinterest App Icon on app upsell."),size:48})}),Object(a.jsxs)(s.f,{paddingX:3,paddingY:0,children:[Object(a.jsx)(s.cb,{weight:"bold",children:this.props.i18n._("Unlock business tools","App upsell header for businesses","App upsell header for businesses")}),Object(a.jsx)(s.cb,{overflow:"normal",children:this.props.i18n._("Get the free Pinterest app","App upsell subheader for businesses","App upsell subheader for businesses")})]})]}),Object(a.jsx)(o.a,{children:e=>Object(a.jsx)(s.g,{fullWidth:!0,color:"red",type:"submit",text:this.props.i18n._("Install","Text on install button for app upsell for businesses","Text on install button for app upsell for businesses"),onClick:()=>this.handleInstallButtonClick(e),accessibilityLabel:this.props.i18n._("Download the Pinterest App","Accessibility label for install app button on app upsell.","Accessibility label for install app button on app upsell.")})})]})})}}function d(e){const t=Object(l.c)();return Object(a.jsx)(c,{...e,i18n:t})}var u=n("D2p8"),p=n("eyT9"),f=n("T0FN");const b=64,h=3,m="0px 0px 8px rgba(0, 0, 0, 0.1)";function g({children:e,footerConfig:t,headerConfig:n,height:o,hideOnScroll:i,hideOnScrollState:{isHidden:l,updateHiddenState:c},noPadding:f,paddingY:g=h,type:w,zIndex:O}){const{headerLimitedOverflow:_,ignoreObstructions:j,zIndexForGestaltBug:v}=n||{},{appUpsellFooterConfig:S,footerInLego:A,footerWidth:y,showBusinessAppUpsell:x}=t||{},C=!!S,P="header"===w?"top":"bottom",I=Object(r.useRef)(null),T=Object(r.useRef)(null);Object(r.useEffect)(()=>{try{if(!j){const e=I.current;T.current=_&&e&&Array.isArray(e.children)?e.children[0]:e,T.current instanceof HTMLElement&&u.c.addObstruction(P,T.current)}}catch(e){window.console.error(e),window.console.error('Can only register impression obstructions for type "HTMLElement"')}return()=>{j||T.current instanceof HTMLElement&&u.c.removeObstruction(P,T.current)}},[j,_,P]);const U="top"===P?"relative":"fixed",k=f?0:g,E=(null!=o?o:b)+((null==n?void 0:n.overrideTop)||0),L=i?{transition:A?"transform 300ms ease-in-out, opacity 300ms ease-in-out":"transform 200ms linear",...l?{transform:`translateY(${"top"===P?-E:E}px)`,opacity:A?0:1}:Object.freeze({})}:{},N=x,B="relative"!==U||null!=n&&n.noGutter?0:2,R=B?-B:0;return Object(a.jsxs)(s.f,{ref:I,dangerouslySetInlineStyle:{__style:{...!O||v?{zIndex:v||1}:Object.freeze({}),..._?{background:"transparent",overflow:"hidden",paddingBottom:100,marginBottom:-100,pointerEvents:"none"}:Object.freeze({}),...null!=n&&n.hasBorder?{borderBottom:"1px solid #efefef"}:Object.freeze({}),...Object(p.e)()?"header"===w?{top:-1}:{bottom:-1}:Object.freeze({}),...null!=t&&t.hasTopShadow?{boxShadow:"0 -2px 4px 1px rgba(0, 0, 0, 0.08)"}:Object.freeze({}),...N?Object.freeze({}):L}},zIndex:v?void 0:O,"data-test-id":w,display:C?"flex":void 0,height:o&&!A?x?"auto":o:void 0,position:U,bottom:"footer"===w,top:"header"===w,left:!0,right:!0,marginStart:A?"auto":R,marginEnd:A?"auto":R,onTransitionEnd:()=>{i&&T.current&&(l?u.c.removeObstruction(P,T.current):u.c.addObstruction(P,T.current))},width:A?void 0:"fixed"===U?"100%":void 0,children:[A&&x&&Object(a.jsx)(s.f,{marginBottom:i&&l?0:2,color:"white",rounding:4,padding:4,width:320,marginEnd:"auto",marginStart:"auto",dangerouslySetInlineStyle:{__style:{boxShadow:A?m:void 0}},children:Object(a.jsx)(d,{})}),Object(a.jsx)(s.f,{dangerouslySetInlineStyle:{__style:{backgroundColor:(Object(p.e)()?"#000":(null==n?void 0:n.isTranslucent)&&"rgba(255,255,255,.95)")||(null==n?void 0:n.isTransparentBackground)&&"transparent"||"white",height:A?C?void 0:null!=o?o:b:"100%",boxShadow:A?m:void 0,marginBottom:A?16:void 0,..._?{pointerEvents:"auto"}:Object.freeze({}),...N?L:Object.freeze({}),...null!=n&&n.useRoundedCorners?{zIndex:5,borderTopRightRadius:17,borderTopLeftRadius:17,borderBottomRightRadius:0,borderBottomLeftRadius:0}:Object.freeze({})}},paddingX:("footer"!==w||f?0:4)+B,paddingY:k,position:"relative",width:A&&y?y:C?void 0:"100%",rounding:A?"pill":void 0,display:A||null!=t&&t.alignCenter?"flex":void 0,marginStart:A?"auto":void 0,marginEnd:A?"auto":void 0,alignItems:null!=t&&t.alignCenter?"center":void 0,children:"function"==typeof e?e({updateHiddenState:c}):e})]})}function w({hasBorder:e,headerLimitedOverflow:t,ignoreObstructions:n,isTranslucent:r,isTransparentBackground:o,noGutter:i,overrideTop:l,useRoundedCorners:c,zIndexForGestaltBug:d,...u}){const{noPadding:p,paddingY:b=h,zIndex:m}=u,w=p?0:b;return Object(a.jsx)(s.W,{top:l||0,height:t?44+2*w*4:void 0,zIndex:m||void 0,children:Object(a.jsx)(f.b,{hideOnScroll:u.hideOnScroll,children:s=>Object(a.jsx)(g,{...u,hideOnScrollState:s,type:"header",headerConfig:{isTranslucent:r,isTransparentBackground:o,headerLimitedOverflow:t,hasBorder:e,ignoreObstructions:n,noGutter:i,overrideTop:l,zIndexForGestaltBug:d,useRoundedCorners:c}})})})}function O({alignCenter:e,appUpsellFooterConfig:t,footerInLego:n,footerWidth:r,hasTopShadow:o,isModal:i,onScroll:l,showBusinessAppUpsell:s,...c}){return Object(a.jsx)(f.b,{appUpsellFooterConfig:t,hideOnScroll:c.hideOnScroll||c.inMwebModalRelaxNoScrollPillGrp,isModal:i,onScroll:l,inMwebModalRelaxNoScrollPillGrp:c.inMwebModalRelaxNoScrollPillGrp,children:i=>Object(a.jsx)(g,{...c,hideOnScrollState:i,type:"footer",footerConfig:{alignCenter:e,appUpsellFooterConfig:t,footerInLego:n,footerWidth:r,hasTopShadow:o,showBusinessAppUpsell:s}})})}}}]);
//# sourceMappingURL=https://sm.pinimg.com/webapp/8-7cd444009962bf367ac2.mjs.map