"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[55918,78369],{243600:function(e,t){t.Z='-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Fira Sans","Droid Sans","Helvetica Neue",Helvetica,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","ヒラギノ角ゴ Pro W3","Hiragino Kaku Gothic Pro",メイリオ,Meiryo,"MS Pゴシック",Arial,sans-serif'},874261:function(e,t,r){r.d(t,{Z:function(){return f}}),r(548239);var n=r(389282),o=["css","unsafeCSS"];function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function a(e){for(var t=1;t",">").replace("<","<").replace("&","&").replace('"','"').replace("'","'")}return e=[{key:"toString",value:function(){return this._private_safe_value}}],t=[{key:"factory",value:function(e){return e instanceof r?e:new r(String(e))}}],e&&u(r.prototype,e),t&&u(r,t),Object.defineProperty(r,"prototype",{writable:!1}),r}();function f(e){var t=e.css,r=e.unsafeCSS,i=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,o),c=String(t||"")||r||"";return c?(0,n.jsx)("style",a(a({},i),{},{dangerouslySetInnerHTML:{__html:String(l.factory(c))}})):null}},468e3:function(e,t,r){function n(e){return[0,24,21,26].includes(e)}function o(e){var t=e.articleType,r=e.id,n=e.title.toLowerCase().replace(/[.,\/#!?$%\^&\*+;:{}=\-_`~()\’'"]/g,"").trim().replace(/\s+/g,"-");return"today"===t?"/today/shop/".concat(n,"/").concat(r,"/"):"/discover/article/".concat(n,"/").concat(r,"/")}r.d(t,{x:function(){return o},y:function(){return n}})},463310:function(e,t,r){var n=r(965533),o=r(98736),i=r(799665);t.Z=function(e,t){null!=t&&t.disableOriginCheck||(0,i.Z)(e)||(e="/",(0,o.My)("url_reset")),(0,n.Z)(e)}},519677:function(e,t){t.Z={GOOGLE_ADWORDS_ID:852082959,GOOGLE_ADWORDS_LABEL_PROPEL_QUALIFIED:"Mah3CPrv13YQj4KnlgM",GOOGLE_ADWORDS_LABEL_PROPEL_UNQUALIFIED:"_DJfCKzy13YQj4KnlgM",GOOGLE_ADWORDS_LABEL_BUSINESS_CREATE:"GGbCCM7p-nYQj4KnlgM",GOOGLE_ADWORDS_LABEL_BUSINESS_CONVERT:"SwBsCIz9k3cQj4KnlgM",GOOGLE_ADWORDS_LABEL_BUSINESS_ADVERTISER_INTENT:"kDf0COWL4okBEI-Cp5YD",DOUBLECLICK_TAG_ID:"8032161",DOUBLECLICK_EVENT_ID_PROPEL:"prope001",DOUBLECLICK_CATEGORY_ID_PROPEL_QUALIFIED:"pinte0",DOUBLECLICK_CATEGORY_ID_PROPEL_UNQUALIFIED:"pinte00",TRADEDESK_ADVERTISER_ID:"fc1uc9n",TRADEDESK_EVENT_ID_GENERAL_PAGEVIEW:"ogalyt3",TRADEDESK_CONVERSION_ID_PROPEL_QUALIFIED:"judrn76",TRADEDESK_CONVERSION_ID_PROPEL_UNQUALIFIED:"f0v4s5d",FACEBOOK_ADVERTISER_ID:"956400731086791",TWITTER_UNIVERSAL_TAG_ID:"nuzh8",TWITTER_CONVERSION_ID_PROPEL_QUALIFIED:"ny8zl",TWITTER_CONVERSION_ID_PROPEL_UNQUALIFIED:"nya0d",LINKEDIN_PARTNER_ID:"44352",LINKEDIN_CONVERSION_ID_PROPEL_QUALIFIED:"166217",LINKEDIN_CONVERSION_ID_PROPEL_UNQUALIFIED:"171754",LINKEDIN_CONVERSION_ID_SUBMISSION_EVENT:"529092",PINTEREST_TAG_ID:"2614461171935",SMB_PAID_PINTEREST_ID:"2613736141997"}},980124:function(e,t){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function n(e,t,r){return(t=o(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e){var t=function(e,t){if("object"!==r(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!==r(o))return o;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===r(t)?t:String(t)}var i=function(){var e;function t(){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,t)}return e=[{key:"reportGoogleConversion",value:function(e,r,n,o){if(!o){if(void 0===window.gtag_report_conversion){t.queuedGoogleConversions.push({id:e,label:r,url:n});return}window.gtag_report_conversion(e,r,n)}}},{key:"reportFacebookConversion",value:function(e,r,n){if(void 0===window.fbq){t.queuedFacebookConversions.push({id:e,event:r,data:n});return}n?window.fbq("track",r,n):window.fbq("track",r)}},{key:"reportCustomFacebookConversion",value:function(e,r,n){if(void 0===window.fbq){t.queuedFacebookConversions.push({id:e,isCustomEvent:!0,event:r,data:n});return}n?window.fbq("trackCustom",r,n):window.fbq("trackCustom",r)}},{key:"reportPinterestConversion",value:function(e,r,n){if(void 0===window.pintrk){t.queuedPinterestConversions.push({id:e,event:r,data:n});return}n?window.pintrk("track",r,n):window.pintrk("track",r)}},{key:"reportTheTradeDeskConversion",value:function(e,t){var r=document.createElement("img");r.setAttribute("height","1"),r.setAttribute("width","1"),r.setAttribute("role","presentation"),r.style.borderStyle="none",r.style.position="absolute",r.setAttribute("src","//insight.adsrvr.org/track/conv/?adv=".concat(e,"&ct=0:").concat(t,"&fmt=3")),document.body.insertBefore(r,document.body.lastChild)}},{key:"reportLinkedInConversion",value:function(e,t){var r=document.createElement("img");r.setAttribute("width","1"),r.setAttribute("height","1"),r.setAttribute("role","presentation"),r.setAttribute("src","https://dc.ads.linkedin.com/collect/?pid=".concat(e)+"&conversionId=".concat(t,"&fmt=gif")),r.style.display="none",document.body.insertBefore(r,document.body.lastChild)}},{key:"reportDoubleClickConversion",value:function(e,t,r){var n=document.createElement("iframe");n.setAttribute("width","1"),n.setAttribute("height","1"),n.setAttribute("frameborder","0"),n.setAttribute("src","https://".concat(e,".fls.doubleclick.net/activityi;src=").concat(e,";\n type=").concat(t,";cat=").concat(r,";dc_lat=;dc_rdid=;tag_for_child_directed_treatment=;ord=").concat(1e13*Math.random(),"?")),n.style.display="none",document.body.insertBefore(n,document.body.lastChild)}},{key:"insertGoogleAdWordsTag",value:function(e,r){var n=document.createElement("script");r||(n.setAttribute("async",""),n.setAttribute("src","https://www.googletagmanager.com/gtag/js?id=AW-".concat(e)),n.onload=function(){window.dataLayer=window.dataLayer||[],window.gtag=function(e,t,r){window.dataLayer.push(arguments)},window.gtag("js",new Date),window.gtag("config","AW-"+e),window.gtag_report_conversion=function(e,t,r){return window.gtag("event","conversion",{send_to:"AW-"+e+"/"+t,event_callback:function(){void 0!==r&&window.location.assign(r)}}),!1};for(var n=t.queuedGoogleConversions,o=0;o-1?"twitter":r.indexOf("google.")>-1?"google":r.indexOf("bing.")>-1?"bing":r.indexOf("facebook.")>-1?"facebook":"other":"direct"}catch(e){}var n=O===Object(O)?O.container:"container_unknown";(0,_.My)("login.referrer."+t+"."+C),(0,_.My)("login.container."+String(n)+"."+C),(0,_.My)("login.type."+C);var o=C||"method_unknown",a=O.page||"page_unknown";i.facebook_autologin?((0,_.My)("web_autologin_facebook"),(0,_.My)("new_web_autologin_facebook",{page:a,referrer:t,container:n})):((0,_.My)("web_login.".concat(o,".success.").concat(a,".").concat(String(n),".").concat(t,".tier1")),(0,_.My)("new_web_login.".concat(o,".success"),{page:a,referrer:t,container:n})),(0,g.ko)({country:null==e?void 0:e.country,countryFromHostName:null==e?void 0:e.countryFromHostName,countryFromIp:null==e?void 0:e.countryFromIp,regionFromIp:null==e?void 0:e.regionFromIp,deviceType:"Desktop",eventCategory:"Logins"}),R(7536),S({action:k?"autologin":"login",event:"success",trigger:O&&O.trigger,type:C})},L=function(e){var t=e.error,r=e.isCrossDomain;if(t){var n=t.http_status===m.Ej?m.Ej:t.api_error_code,o=n;n&&f.qF.has(n)&&(o=f.qF.get(n));var i=O.container,a=O.trigger;(0,_.My)("".concat(r?"unauth_web_client_cctld_login_api_error":"unauth_web_client_login_api_error",".").concat(String(o),".").concat(i||"unknow_container",".").concat(C)),R(7535),S({action:k?"autologin":"login",event:"fail",trigger:a,type:C})}};if(i.username_or_email&&!i.mfa_resend&&e&&-1!==p.Z.indexOf(e.origin)){var z=function(e){return(0,_.My)("web_cross_domain_login.".concat(e,".").concat((0,y.eD)(i)))};z("attempt");var Z=e.referrer,B=e.facebookToken,F=e.unauthId;return(0,u.pH)(i,{recaptchaV3Token:E,referrer:Z,facebookToken:B,unauthId:F}).then(function(e){var t=e&&e.data;if(t)return z("success_with_token"),(0,u.kv)(t).then(function(e){return z("success_token_exchanged"),M(),Promise.resolve()},function(e){throw z("success_token_not_exchanged"),e});throw z("success_without_token"),Error()},function(e){throw z("failure"),L({error:e,isCrossDomain:!0}),e})}D("login_api_call_start"),A("login_api_call_start");var N=(0,w.OJ)();return o.Z.create("UserSessionResource",P(P(P({},i),N?{referrer:N}:Object.freeze({})),{},{get_user:i.get_user||i.switch_account&&d,app_type_from_client:7===e.appType?7:5,visited_pages_before_login:(0,w.t_)()||null,recaptchaV2Token:T,recaptchaV3Token:E})).callCreate({showError:!1,async:!0}).then(function(e){var t=(null==e?void 0:e.client_context)||Object.freeze({});return M({country:t.country,countryFromHostName:t.country_from_hostname,countryFromIp:t.country_from_ip,regionFromIp:t.region_from_ip}),D("login_api_call_success"),A("login_api_call_success"),(0,s.B)(!1),(0,l.Z)(),a.zN(c.e7.name),a.zN(c.x3.name),(0,v.D)("login").then(function(){return e})},function(e){return L({error:e,isCrossDomain:!1}),D("login_api_call_failure"),A("login_api_call_failure"),Promise.reject(e)})},[e,t,r,S])}},669894:function(e,t,r){r.d(t,{B:function(){return a},a:function(){return i}});var n=r(860438),o=r(619277),i=function(){return!!n.Z.getItem(o.WM)},a=function(e){n.Z.setItem(o.WM,!!e)}},33476:function(e,t,r){r.d(t,{Z:function(){return _}});var n=r(658379),o=r(261783),i=r(527386),a=r(216702),c=r(389282);function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function l(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(d,g),L=w&&r,z=function(){Z(),setTimeout(c,1e3*R)},Z=function(){L&&(window.removeEventListener("scroll",z),window.removeEventListener("touchmove",z))},B=function(){Z(),i()};if(L&&(window.addEventListener("scroll",z),window.addEventListener("touchmove",z)),e.setDefaultPulsarTooltip(M),!M.has_pulsar&&!M.has_tooltip)return B(),null;S&&M.disappearTime&&M.disappearTime>0&&(e.timer=setTimeout(function(){return z(),null},M.disappearTime));var F=501041===u.experience_id||505086===u.experience_id;return M.has_tooltip&&!M.has_pulsar&&(e.dismissRef.current=z,null==r||r.addEventListener("click",e.dismissCb)),(0,a.jsxs)(n.Fragment,{children:[M.has_pulsar&&(0,a.jsx)(h.Z,{anchor:r,leftOverride:F?342:void 0,onTouch:function(){return e.handlePulsarClick(M.has_tooltip,B)},paused:e.state.paused,topOverride:F?-5:void 0,zIndex:C&&C.index()}),M.has_tooltip&&(!M.has_pulsar||e.state.paused)&&(M.thumbnail_urls?(0,a.jsx)(y,{anchor:r,dismiss:z,idealDirection:m||"down",text:M.text,thumbnails:M.thumbnail_urls}):(0,a.jsx)(A,{children:(0,a.jsx)(o.J2,{anchor:r,color:"deprecatedBlue",idealDirection:m||"down",onDismiss:b?function(){}:z,positionRelativeToAnchor:!v&&j,shouldFocus:!1,_deprecatedShowCaret:O,size:l,children:(0,a.jsxs)(o.xu,{column:12,padding:3,children:[(0,a.jsxs)(o.xv,{align:"right"===P?"end":P,color:"inverse",overflow:I,size:f,weight:E||"bold",children:[e.getText(M,s,T),M.secondary_cta_link&&(0,a.jsx)(o.xu,{display:"inlineBlock",marginStart:1,children:(0,a.jsx)(o.xv,{size:f,weight:"bold",color:"inverse",children:(0,a.jsx)(o.rU,{display:"inlineBlock",target:"blank",href:M.secondary_cta_link.url,underline:"hover",children:M.secondary_cta_link.text})})})]}),M.sub_text&&(0,a.jsx)(o.xu,{paddingY:2,children:(0,a.jsx)(o.xv,{color:"inverse",size:f,children:M.sub_text})}),(M.dismiss_button_text||M.complete_button_text)&&(0,a.jsxs)(o.xu,{display:"flex",alignItems:"center",marginTop:2,children:[M.dismiss_button_text&&(0,a.jsx)(o.xu,{marginEnd:1,column:6,children:(0,a.jsx)(o.zx,{fullWidth:p,color:"blue",onClick:function(){x&&x(),z()},size:"md",text:M.dismiss_button_text})}),M.complete_button_text&&(0,a.jsx)(o.xu,{column:M.dismiss_button_text?6:12,children:k?(0,a.jsx)(o.iP,{fullHeight:!0,onTap:function(){B(),_&&_()},rounding:2,children:(0,a.jsx)(o.xu,{display:"flex",color:"default",padding:2,rounding:2,justifyContent:"center",dangerouslySetInlineStyle:{__style:{padding:"10px"}},children:(0,a.jsx)(o.xv,{color:"shopping",weight:"bold",children:M.complete_button_text})})}):(0,a.jsxs)(o.kC,{justifyContent:"center",children:[M.complete_button_cta_url&&(0,a.jsx)(o.ZP,{fullWidth:p,color:"white",href:M.complete_button_cta_url,size:"md",target:M.complete_button_cta_url?"blank":null,text:M.complete_button_text,onClick:function(e){var t=e.event;t.preventDefault(),t.stopPropagation(),B(),_&&_()}}),!M.complete_button_cta_url&&(0,a.jsx)(o.zx,{fullWidth:p,color:"white",size:"md",text:M.complete_button_text,onClick:function(){B(),_&&_()}})]})})]})]})})}))]})}})}}],v(s.prototype,r),c&&v(s,c),Object.defineProperty(s,"prototype",{writable:!1}),s}(n.Component);w(S,"defaultProps",{fontSize:"300",positionRelativeToAnchor:!0})},696508:function(e,t,r){r.d(t,{Z:function(){return p}});var n=r(658379),o=r(249444),i=r(33476),a=r(389282);function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,t){for(var r=0;r0&&(e.timer=setTimeout(function(){return n(),null},s.disappearTime)),(0,a.jsxs)(o.xu,{zIndex:new o.Ry(10),children:[u&&e.renderPulsar(),s.has_tooltip&&(!s.has_pulsar||e.state.paused)&&e.renderFlyout(s.text)]})):(r(),null)}})}}],u(y.prototype,r),n&&u(y,n),Object.defineProperty(y,"prototype",{writable:!1}),y}(n.Component)},216702:function(e,t,r){r.d(t,{CF:function(){return c},Tl:function(){return a},dy:function(){return u}});var n=r(690108),o=r(527386),i=function(e,t){return function(r,i){return function(a){if(r&&r.id){var c=n.Z.create(e,{placed_experience_id:r.id,extra_context:{}});switch(t){case"dismissed":c.callDelete().then(function(){a((0,o.fO)())});break;case"completed":c.callUpdate().then(function(){i||a((0,o.fO)())});break;case"viewed":c.callUpdate()}}}}},a=i("UserExperienceCompletedResource","completed"),c=i("UserExperienceResource","dismissed"),u=i("UserExperienceViewedResource","viewed")},133149:function(e,t,r){r.d(t,{Z:function(){return s}});var n=r(249444),o=r(658379),i=r(389282);function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return c(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);re.length)&&(t=e.length);for(var r=0,n=Array(t);r2&&void 0!==arguments[2]?arguments[2]:{};return a.Z.increment("".concat(e,".").concat(t),1,r)},h=function(e,t){return"function"==typeof t?t(e):t};t.Z=function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=function(e){if(Array.isArray(e))return e}(t=(0,n.useReducer)(h,r))||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return c}}(t,2)||function(e,t){if(e){if("string"==typeof e)return d(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return d(e,t)}}(t,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),s=a[0],l=a[1],g=(0,u.B)().isBot,m=(0,c.M)(),v=m.fetchExperienceForPlacements,b=m.mountPlacement,_=m.triggerExperimentsForPlacement,x=m.unmountPlacement;(0,n.useDebugValue)("Placement Hook ID - ".concat(e)),(0,n.useEffect)(function(){var t=f({},s),r=i&&null!=t&&t.advertiser_id?{advertiserId:t.advertiser_id}:void 0;return b(e,t,r),function(){x(e)}},[]),(0,n.useEffect)(function(){Object.keys(s).length>0&&v([e],g,s)},[s]);var w=(0,o.useSelector)(function(t){return p(t,e)}),j=(0,o.useSelector)(function(t){return t.experiencesMulti[e]}),S=w?w.triggerable_placed_exps:[];return(0,n.useEffect)(function(){y("experienceservice","placementHookExperimentTrigger.1",f({platform:"web",placement_id:e},S)),_(e,s)},[JSON.stringify(S)]),{experience:w,experiencesMulti:j,setExtraContext:l}}},550140:function(e,t,r){r.d(t,{UZ:function(){return f},Vg:function(){return l},ZP:function(){return d}});var n=r(658379),o=r(249444),i=r(549201),a=r(272109),c=r(389282);function u(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return s(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e?t?h:y:g},_=function(e){var t=e.contentVisibleItemCount,r=e.gap,o=e.width;return t||o?(o-(t-1)*r)/t:n},x=function(e,t,r,n){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:f,i=e+o;return"\n@media (min-width: ".concat(t*i,"px) and (max-width: ").concat((r+1)*i-1,"px) {\n ").concat(n,"\n}\n")}},833122:function(e,t,r){r.d(t,{F:function(){return p},Z:function(){return d}});var n=r(658379),o=r(388011),i=r(906215),a=["children"];function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function s(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,a))})}},550941:function(e,t,r){r.d(t,{Di:function(){return d},Jl:function(){return s},R:function(){return l},ZP:function(){return m},aU:function(){return p},j2:function(){return f},pN:function(){return y},rL:function(){return v},vW:function(){return g}});var n=r(249444),o=r(870243),i=r(550140),a=r(630089),c=r(739425),u=r(389282),s=7e3,l="permanent_account_closure",f="account_deletion_email_sent",d="account_deactivated",p="unlink_successful",y="account_switch_to_settings";function h(e,t,r){return(0,u.jsx)(n.xv,{align:r||"center",children:(0,a.nk)(e,{username:(0,u.jsx)(n.xv,{inline:!0,weight:"bold",children:t})})})}function g(e){var t=e.i18n,r=e.message,n=e.multipleAccounts,o=e.username,i=void 0===o?"":o;switch(r){case l:return t._('Your account has been deleted. We\'re sad to see you go', 'unauthLoginPage.accountDeletedToast.message', 'Confirmation message after a user has successfully deleted their account');case f:if(n)return h(t._('An email has been sent with final steps to delete your account, {{username}} and its linked accounts', 'accountDeletedEmailToast.message.multipleAccounts', 'Confirmation message after a user has successfully requested multiple accounts deletion'),i);return h(t._('An email has been sent with final steps to delete your account, {{username}}', 'accountDeletedEmailToast.message.singleAccount', 'Confirmation message after a user has successfully requested a single account deletion'),i);case d:return h(n?t._('The account, {{username}}, and its associated linked accounts have been deactivated', 'unauthLoginPage.deactivatedToast.message.multipleAccounts', 'Confirmation message after a user has successfully deactivated multiple accounts'):t._('The account, {{username}}, has been deactivated', 'unauthLoginPage.deactivatedToast.message.singleAccount', 'Confirmation message after a user has successfully deactivated a single account'),i);case p:return h(t._('Success! You\'ve unlinked this business account. You are currently in {{username}}.', 'authHomeFeedPage.unlinkAccountToast.message', 'Confirmation message after a user has successfully unlinked business account'),i,"start");case y:return h(t._('You\'ve switched into and are currently in the account {{username}}', 'accountSettings.switchAccountToAccountChanges', 'Confirmation message after a user has successfully switched accounts and got redirected to Account Changes'),i,"start");default:return""}}function m(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(!(t&&t.search))return"";var n=(0,c.mB)(t.search).message,o=(0,c.mB)(t.search).username||r;return g({i18n:e,message:n,multipleAccounts:"true"===(0,c.mB)(t.search).multiple_accounts,username:o})}function v(e){var t=e.showOneToast,r=e.i18n,n=e.location,a=e.history,l=e.username,f=e.fullName,d=e.avatarUrl;if(n&&n.search){var h=m(r,n,l||""),g=(0,c.mB)(n.search).message,v=g===y||g===p;h&&(t(function(e){var t=e.hideToast;return(0,u.jsx)(i.ZP,{duration:s,onHide:t,text:h,thumbnail:v?{avatar:(0,u.jsx)(o.qE,{name:f||"",src:d||"",size:"md"})}:void 0})}),a.replace(n.hash?"".concat(n.pathname).concat(n.hash):n.pathname))}}},752977:function(e,t,r){var n=r(840093),o=r(514316);function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function c(e){for(var t=1;t-1){var t=e.split("|");return 3===t.length&&new Date().getTime()/1e3-parseInt(t[0],10)<=3600}return!1}},{key:"updateRecaptchaTimeStamp",value:function(){var e=i.Z.getItem(l.kl),t=[];e&&3===(t=e.split("|")).length&&t.shift();var r=(new Date().getTime()/1e3).toString();t.push(r);var n=t.join("|");i.Z.setItem(l.kl,n)}},{key:"isFullyLoggedIn",value:function(e,t){return e&&t===o.Z.DEFAULT}},{key:"handleRedirect",value:function(e){if(!e){e="/";var t=(0,s.Z)();if(t){var r=t.next;r&&(e=r,delete t.next),e=(0,u.Z)(e,t)}}(0,n.Z)(e)}},{key:"handleRedirectWithFallbackWindowLocation",value:function(){this.handleRedirect(this.defaultLoginRedirectUrl())}},{key:"handleSignupRedirect",value:function(e,r){i.Z.setItem(l.F6,Date.now()),!r&&e&&"/"!==e?t.handleRedirect(e):t.handleRedirect("/")}},{key:"storeLoginCredentialsToBrowser",value:function(e){var t=window.navigator.credentials;if(t&&e.username_or_email)try{var r=new window.PasswordCredential({id:e.username_or_email,password:e.password});t.store(r).then(function(){(0,c.My)("navigatorCredentials.store.success")})}catch(e){(0,c.My)("navigatorCredentials.store.error")}}},{key:"handleLoginMfa",value:function(e,r,n){(0,c.My)("multi_step_login"),t.storeLoginCredentialsToBrowser(e),n?n(e,r):(0,c.My)("unauth.login.error.CLIENT_ERROR.null_mfa_handler")}}],function(e,t){for(var r=0;r1))return(0,o.jsx)("span",{style:c({color:a[0],whiteSpace:"pre-wrap"},u),children:t},"searchDelight-".concat(t));var s=0;return(0,o.jsx)("span",{style:c({whiteSpace:"pre-wrap"},u),children:t.split("").map(function(e,t){var r=a[s];return" "!==e&&(s=(s+1)%a.length),(0,o.jsx)("span",{style:{color:r},children:e},"searchDelight-".concat(t))})})}var s=r(249444),l=function(e){var t=e.children,r=e.gray,n=e.weight;return(0,o.jsx)(s.xv,{color:r?"subtle":void 0,inline:!0,weight:void 0===n?"normal":n,children:(0,o.jsx)("span",{style:{whiteSpace:"pre-wrap"},children:t})})},f=function(e){var t=e.allBold,r=e.searchDelightParts,i=e.searchDelightConfig,a=e.text,c=e.weightPivot,s=r[1],f=a.indexOf(s),d=f+s.length;return c<=f?(0,o.jsxs)(n.Fragment,{children:[(0,o.jsx)(l,{gray:!0,weight:t?"bold":"normal",children:a.substring(0,c)}),(0,o.jsxs)(l,{weight:"bold",children:[a.substring(c,f),(0,o.jsx)(u,{searchDelightText:s,searchDelightConfig:i}),a.substring(d)]})]}):c<=d?(0,o.jsxs)(n.Fragment,{children:[(0,o.jsx)(l,{gray:!0,weight:t?"bold":"normal",children:a.substring(0,f)}),(0,o.jsxs)(l,{weight:"bold",children:[(0,o.jsx)(u,{searchDelightText:s,searchDelightConfig:i}),a.substring(d)]})]}):(0,o.jsxs)(n.Fragment,{children:[(0,o.jsx)(l,{gray:!0,weight:t?"bold":"normal",children:a.substring(0,f)}),(0,o.jsx)(l,{weight:"bold",children:(0,o.jsx)(u,{searchDelightText:s,searchDelightConfig:i})}),(0,o.jsx)(l,{gray:!0,weight:t?"bold":"normal",children:a.substring(d,c)}),(0,o.jsx)(l,{weight:"bold",children:a.substring(c)})]})},d=function(e,t){var r=RegExp("\\b"+t+"\\b","i");if(!e.match(r))return null;var n=e.toLowerCase().indexOf(t.toLowerCase());return[e.slice(0,n),e.slice(n,n+t.length)]};function p(e){var t=e.allBold,r=e.searchDelightConfig,i=e.query,a=void 0===i?"":i,c=e.text,u=(c.toLowerCase().startsWith(a.toLowerCase())?a:"").length,s=r?r.search_query_list.map(function(e){return d(c,e)}).filter(Boolean).sort(function(e,t){return e&&t?e[0].length-t[0].length:0}).shift():null;return s&&r?(0,o.jsx)(f,{allBold:t,searchDelightParts:s,searchDelightConfig:r,text:c,weightPivot:u}):(0,o.jsxs)(n.Fragment,{children:[(0,o.jsx)(l,{gray:!0,weight:t?"bold":"normal",children:c.substr(0,u)}),(0,o.jsx)(l,{weight:"bold",children:c.substr(u)})]})}},369840:function(e,t,r){r.d(t,{Z:function(){return u}});var n=r(658379),o=r(249444),i=r(243600),a=r(536042),c=r(389282);function u(e){var t=e.dataTestId,r=e.focusOptionId,u=e.isFocused,s=e.name,l=e.onBlur,f=e.onChange,d=e.onClick,p=e.onFocus,y=e.onKeyDown,h=e.onSearchTrigger,g=e.placeholder,m=e.value,v=e.disabled,b=(0,a.ZP)(),_=(0,n.useRef)(null);return(0,n.useEffect)(function(){_.current&&h&&_.current.addEventListener("searchTrigger",h)},[]),(0,n.useEffect)(function(){_.current&&document.activeElement===_.current!==u&&(u?_.current.focus():_.current.blur())},[u]),(0,c.jsxs)(o.xu,{height:"100%",flex:"grow",children:[(0,c.jsx)("input",{autoCapitalize:"off",autoCorrect:"off",autoComplete:"off","aria-activedescendant":r,"aria-autocomplete":"list","aria-controls":"SuggestionsMenu","aria-describedby":"searchBoxAccessibleText","aria-label":b._('Search', 'searchBox.searchInput.placeholder', 'placeholder text for the search box'),"aria-expanded":u,"data-test-id":t,name:s,onBlur:l,onChange:function(e){f(e.target.value)},onClick:void 0===d?function(){}:d,onFocus:p,onKeyDown:y,placeholder:g||b._('Search', 'searchBox.searchInput.placeholder', 'placeholder text for the search box'),ref:_,role:"combobox",style:{backgroundColor:"transparent",border:"none",color:"#333",fontFamily:i.Z,fontSize:16,fontWeight:"normal",height:"100%",outline:"none",padding:"0",width:"100%"},type:"text",value:m,disabled:void 0!==v&&v}),(0,c.jsx)(o.xu,{display:"none",id:"searchBoxAccessibleText",children:b._('When autocomplete results are available use up and down arrows to\n review and enter to select. Touch device users, explore by touch or\n with swipe gestures.', 'searchBox.searchInput.accessibleText', 'Accessible text for search input')})]})}},181437:function(e,t,r){r.d(t,{Z:function(){return o}});var n=r(970588);function o(e){var t=e.report,r=e.query,o=e.suggestions,i=e.type;return(0,n.Z)({url:"/v3/search/suggestion/report/",method:"POST",data:{report:t,query:r,suggestions:o,type:i}})}},833603:function(e,t,r){r.d(t,{Z:function(){return y}});var n=r(658379),o=r(690108),i=function(e,t){this.uid=e,this.item=t,this.next=null,this.prev=null},a=function(e){this._maxNumItems=e||10,this._uidToData={},this._numItems=0,this._firstData=null,this._lastData=null};a.prototype.set=function(e,t){var r=this._uidToData[e];r||(r=new i(e,t),this._uidToData[e]=r,this._numItems+=1),this._moveToFront(r),this._numItems>this._maxNumItems&&this._evict()},a.prototype.get=function(e){var t=this._uidToData[e];return t?(this._moveToFront(t),t.item):null},a.prototype.remove=function(e){var t=this._uidToData[e];t&&(delete this._uidToData[e],this._firstData===t&&(this._firstData=t.next),this._lastData===t&&(this._lastData=t.prev),t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),this._numItems-=1)},a.prototype._moveToFront=function(e){this._firstData!==e&&(this._firstData?(this._lastData===e&&(this._lastData=e.prev),e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),this._firstData.prev=e,e.next=this._firstData,e.prev=null,this._firstData=e):(this._firstData=e,this._lastData=e))},a.prototype._evict=function(){delete this._uidToData[this._lastData.uid],this._firstData===this._lastData?(this._firstData=null,this._lastData=null):(this._lastData=this._lastData.prev,this._lastData.next=null),this._numItems-=1};var c=["bookmarks"];function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(u,c),d.options=p(p({},s),{},{term:t,pin_scope:r}),e.next=12,d.callGet({showError:!1});case 12:return f=null==(l=e.sent.resource_response.data)?void 0:l.items,m={hint:g=(null==l?void 0:l.hint)||{},items:f},y.set("".concat(r,"-").concat(t),m),e.abrupt("return",{term:t,items:f,hint:g});case 19:case"end":return e.stop()}},e)})),m=f(regeneratorRuntime.mark(function e(t,r){var n,o,i;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=y.get("".concat(r,"-").concat(t)))||!((o=n.items)&&o.length)){e.next=7;break}return h(),i=n.hint,e.abrupt("return",{hint:i,items:o,term:t});case 7:if(!(t.length>=0)){e.next=11;break}return e.abrupt("return",function(e,t){return g.apply(this,arguments)}(t,r));case 11:return e.abrupt("return",{hint:{},items:[],term:t});case 12:case"end":return e.stop()}},e)})),function(e,t){return m.apply(this,arguments)})),_.current),R=P.pin_scope||"pins",M="".concat(R,"-").concat(I);return(0,n.useEffect)(function(){f(regeneratorRuntime.mark(function e(){var t,r;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(null!=I&&(j||T.current))){e.next=17;break}if(!(M in E.current)){e.next=5;break}D(E.current[M]),e.next=17;break;case 5:return e.prev=5,e.next=8,A(I,R);case 8:(t=e.sent)&&(r=t.items,E.current[M]=r,D(r)),e.next=17;break;case 12:if(e.prev=12,e.t0=e.catch(5),"Resource call aborted"!==e.t0){e.next=16;break}return e.abrupt("return");case 16:throw e.t0;case 17:T.current||(T.current=!0);case 18:case"end":return e.stop()}},e,null,[[5,12]])}))()},[I,R,M]),C}},207732:function(e,t,r){r.d(t,{Z:function(){return a}});var n=r(845098);function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function a(e){var t=e.query,r=e.rs,a=e.scope,c=e.guideAdded,u=e.filters,s=e.user,l=e.requestParams;if(!t)return"/";var f=function(e){for(var t=1;t2?o[2]:"pins"}if(r.q&&t){var i=Array.isArray(r.q)?r.q.join(" "):r.q,a=Array.isArray(r.rs)?"":r.rs,c=Array.isArray(r.user)?"":r.user;return{filters:r.filters||"",user:c,query:i||"",rs:a||"",scope:"pins"===t||"buyable_pins"===t||"my_pins"===t||"boards"===t||"users"===t||"videos"===t||"idea_pins"===t?t:"pins"}}return{filters:"",user:"",query:"",rs:"",scope:"pins"}}},511139:function(e,t,r){r.d(t,{Z:function(){return i}});var n=r(468e3),o=r(845098);function i(e){var t=e.bubbleId,r=e.pinId,i=e.query,a=e.referringSource,c=e.storyCategory,u=e.storyId,s=e.title,l=[0,24,21,26].includes(c),f=(0,o.Z)({q:i,rs:a||void 0,b_id:t,source_id:u,top_pin_id:r}),d=l&&s?(0,n.x)({title:s,id:t,articleType:"discover"}):"/discover/article/".concat(t,"/");return l?d:"/search/pins/".concat(f?"?"+f:"")}},649715:function(e,t,r){r.d(t,{Z:function(){return n}});function n(e){return(e||"").trim().replace(/\s+/g," ")}},637362:function(e,t,r){r.d(t,{J:function(){return n},Z:function(){return o}});var n=-1;function o(e){switch(e){case 0:return"shopping-bag";case 1:return"tag";default:return"search"}}},729522:function(e,t,r){var n=r(540975),o=/\{\{\s*(\w+)\s*\}\}/g;t.Z=function(e,t){return(0,n.Z)(o,e,t)}},686473:function(e,t){t.Z=function(e){return e.replace(/&/g,"&").replace(//g,">").replace(/\"/g,""").replace(/\'/g,"'")}},540975:function(e,t){t.Z=function(e,t,r){return t?t.replace(e,function(e,t){return r&&Object.prototype.hasOwnProperty.call(r,t)?r[t]:""}):""}},493851:function(e,t,r){var n=r(729522),o=r(686473);t.Z=function(e,t){var r={};return Object.keys(t).forEach(function(e){r[e]=t[e]?(0,o.Z)(t[e].toString()):""}),(0,n.Z)(e,r)}},371362:function(e,t,r){r.d(t,{ZP:function(){return n}});function n(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:80,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"…",o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!e)return"";if(e.length<=r)return e;if(" "!==e[r-1]&&" "===e[r]||o)t=e.substring(0,r);else{var i=e.lastIndexOf(" ",r);t=e.substring(0,i)}return(t=t.replace(/[\- _,.<>:;+=*&@~\/\|!]*$/,""))+n}},99220:function(e,t,r){r.d(t,{Z:function(){return P}});var n=r(658379),o=r(758360),i=r(310561),a=r(282802),c=r(114935),u=r(291986),s=(0,r(583592).Z)("timeSpentContext"),l=s.Provider,f=s.useMaybeHook,d=r(393729),p=r(525104),y=r(389282);function h(e){return(h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function g(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function m(e){for(var t=1;t0?t.registerComponent():0===r&&(0===o&&0===i&&0===a&&0===c?t.unregisterComponent():t.registerComponent())}),t.state={timedPair:new u.Z(t.getLoggerContext())},t}return r=[{key:"componentDidUpdate",value:function(e){!this.isRegistered||e.view===this.props.view&&e.viewParameter===this.props.viewParameter&&e.component===this.props.component&&e.element===this.props.element&&e.objectId===this.props.objectId&&(0,c.Z)(e.auxData,this.props.auxData)&&(0,c.Z)(e.viewData,this.props.viewData)||(this.unregisterComponent(),setTimeout(this.registerComponent))}},{key:"render",value:function(){var e=this.props.children;return(0,y.jsx)(l,{value:this.getContext(),children:(0,y.jsx)(o.Z,{options:{threshold:0},onVisibilityChange:this.handleVisibilityChange,children:n.Children.only(e)})})}}],v(s.prototype,r),i&&v(s,i),Object.defineProperty(s,"prototype",{writable:!1}),s}(n.Component);function O(e){var t,r=(0,i.Hv)(),o=f(),c=(0,d.w)(),u=(0,p.H0)(),s=(0,a.B)().requestIdentifier,l=m({app_instance_id:(void 0===s?"":s).slice(0,8)},null!==(t=e.auxData)&&void 0!==t?t:{});return(0,n.useEffect)(function(){null==c||c.setHistoryStackContext(r)},[r,c]),(0,n.useEffect)(function(){null==c||c.setPins(null!=u?u:{})},[u,c]),c?(0,y.jsx)(S,m(m({},e),{},{auxData:l,timeSpentContext:o,timeSpentManager:c,children:e.children})):e.children}O.displayName="TimeSpent";var P=O},3060:function(e,t,r){r.d(t,{Ag:function(){return i},C0:function(){return u},L1:function(){return d},Vi:function(){return a},YD:function(){return f},kS:function(){return o},oo:function(){return c},p3:function(){return p},vC:function(){return s},vI:function(){return l}});var n=r(957286),o="https://www.pinterest.com/business/hub/",i="https://www.pinterest.com/homefeed/",a="www.pinterest.com",c="https://help.pinterest.com",u="".concat((0,n.Z)({site:"www"})),s=(0,n.Z)({site:"developers"}),l="".concat((0,n.Z)({site:"sterling"})),f="".concat((0,n.Z)({site:"analytics"})),d="".concat((0,n.Z)({site:"trends"})),p="".concat((0,n.Z)({site:"www",path:"/product-catalogs/data-source/?advertiserId="}))},286354:function(e,t,r){var n=r(911386);t.Z=function(e){var t=e.url;if(t){var r=t.split("?");if(r[1])return(0,n.Z)(r[1])}return(0,n.Z)()}},806681:function(e,t,r){r.d(t,{q:function(){return c}});var n=r(658379);function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);re.length)&&(t=e.length);for(var r=0,n=Array(t);r0?{url:A[0]}:void 0,z=(0,c.Z)(D||"",{});if(!h.title||!h.id)return null;var Z=(0,u.T7)(null!==(t=h.feed_source)&&void 0!==t?t:0,null!==(r=h.is_product_pin_feed)&&void 0!==r&&r,h.title,h.id);return(0,y.jsx)(p.Y4,{auxData:{grid_index:S.toString(),today_article_id:C,story_type:P,story_id:O},loggingId:C,objectIdStr:C,slotIndex:S,viewParameter:I||3467,viewType:T,children:function(e){var t=e.impressionTrackerRef;return(0,y.jsx)(l.Z,{backgroundColor:"gray",coverImage:L,disableTabIndex:!0,height:g,id:C,isHovered:m,onClick:v,onMouseDown:b,onMouseEnter:_,onMouseLeave:x,ref:t,searchBoxRenderStopwatch:w,url:Z,width:E,children:function(e){var r,a=e.isHovered;return(0,y.jsxs)(n.Fragment,{children:[(0,y.jsx)(o.xu,{alignItems:"end",display:"flex",height:g,justifyContent:"center",padding:3,position:"absolute",top:!0,width:E||"100%",ref:t,children:(0,y.jsxs)(o.kC,{alignItems:"stretch",justifyContent:"start",direction:"column",children:[g>200?(0,y.jsx)(o.X6,{size:"500",align:"center",color:"light",children:z}):(0,y.jsx)(o.xv,{align:"center",color:"light",weight:"bold",children:z}),R&&R.image_small_url&&R.full_name&&(0,y.jsxs)(o.xu,{display:"flex",justifyContent:"center",alignItems:"center",marginTop:4,children:[(0,y.jsx)(o.xu,{marginEnd:2,children:(0,y.jsx)(i.qE,{outline:!0,size:"xs",src:R.image_small_url,name:R.full_name})}),(0,y.jsx)(o.xv,{size:"100",color:"light",children:R.full_name})]})]})}),k.isAuth&&k.isEmployee&&j&&(0,y.jsx)(o.xu,{position:"absolute",bottom:!0,right:!0,marginBottom:1,children:(0,y.jsx)(d.Z,{handleReport:M,imgSignature:null!==(r=null==L?void 0:L.url)&&void 0!==r?r:"",isVisible:a})})]})}})}})}},695458:function(e,t,r){r.d(t,{Z:function(){return g}});var n=r(658379),o=r(249444),i={transparent:{backgroundColor:"transparent"},transparentHovered:{backgroundColor:"rgba(216, 216, 216, 0.37)"},pog:{borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center"},buttonFocus:{outline:"0"}},a=r(389282);function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function s(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);re.length)&&(t=e.length);for(var r=0,n=Array(t);r0&&void 0!==arguments[0]?arguments[0]:Y,t=arguments.length>1?arguments[1]:void 0;if("FETCH_COMPLETE"===t.type){var r=t.payload,n=r.options,o=r.resource,i=t.payload.response.resource_response.data;if("ApiResource"===o&&"/v3/users/me/recent/engaged/pin/stories/"===(void 0===n?{}:n).url&&i){var a=i.find(function(e){return"user_recently_viewed_pins"===e.story_type}),c=i.find(function(e){return"user_recently_saved_pins"===e.story_type}),u=(null==a?void 0:a.objects.map(function(e,t){var r=e.description,n=e.id;return{label:r,images:e.images,resultIndex:t,type:"recent_view",url:"/pin/".concat(n)}}))||[],s=(null==c?void 0:c.objects.map(function(e,t){var r=e.description,n=e.id;return{label:r,images:e.images,resultIndex:t,type:"recent_save",url:"/pin/".concat(n)}}))||[];return V(V({},e),{},{recentSaves:s,recentViews:u})}}return e}function X(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);re.length)&&(t=e.length);for(var r=0,n=Array(t);re.length)&&(t=e.length);for(var r=0,n=Array(t);re.length)&&(t=e.length);for(var r=0,n=Array(t);r=200?(r=3,o="300"):P>=150?(r=2,o="200"):(r=2,o="100");var R=function(){g?g():C(!0)},M=function(){m?m():C(!1)};return(0,O.jsx)(i.xu,{height:A,ref:I,width:P||"100%",children:(0,O.jsx)(i.zd,{wash:!p,rounding:4,children:(0,O.jsx)(i.xu,{dangerouslySetInlineStyle:p?{__style:{backgroundColor:D?"var(--color-gray-roboflow-600)":"var(--color-gray-roboflow-700)"}}:{__style:D?eG.A.lightHoverOverlay:{}},children:(0,O.jsx)(i.st,{children:(0,O.jsxs)(i.Tg,{href:w,onBlur:M,onFocus:R,onMouseEnter:R,onMouseLeave:M,onTap:v,rounding:4,children:[(0,O.jsxs)(i.kC,{direction:"row",children:[(0,O.jsx)(i.zd,{height:A,wash:!0,width:A,children:(0,O.jsx)(i.Ee,{alt:"",color:c,fit:"cover",naturalHeight:1,naturalWidth:1,onLoad:function(){null==b||b.stop()},role:"presentation",src:f})}),(0,O.jsx)(i.xu,{alignItems:"center",display:"flex",maxHeight:A,maxWidth:P?P-A:eU.yF-80,padding:4,children:(0,O.jsx)(i.xv,{color:p?"light":void 0,lineClamp:r,size:o,weight:"bold",children:h})})]}),u&&T.isAuth&&T.isEmployee?(0,O.jsx)(i.xu,{position:"absolute",bottom:!0,right:!0,marginBottom:1,children:(0,O.jsx)(eV.Z,{handleReport:u,imgSignature:f,isVisible:null!=D&&D})}):null]})})})})})}var eX=r(777610),e$=r(970588),eQ=r(575794),eJ=r(470792);function e0(e,t,r,n,o,i,a){try{var c=e[i](a),u=c.value}catch(e){r(e);return}c.done?t(u):Promise.resolve(u).then(n,o)}var e1=function(e){var t=e.handleRemove,r=e.id,n=e.isHovered,o=e.label,a=e.onClick,c=e.onMouseEnter,u=e.onMouseLeave,s=e.removeA11yText,l=e.url;return(0,O.jsx)(i.xu,{"aria-selected":n?"true":"false","data-test-id":"search-suggestion",id:r,marginBottom:2,marginEnd:2,role:"option",children:(0,O.jsx)(i.Tg,{accessibilityLabel:o,href:l,onMouseEnter:c,onMouseLeave:u,onTap:function(e){var t=e.event,r=e.dangerouslyDisableOnNavigation;t.metaKey||t.ctrlKey||(r(),t.preventDefault(),a())},rounding:"pill",children:(0,O.jsxs)(i.xu,{alignItems:"center",color:n?"darkWash":"secondary",dangerouslySetInlineStyle:{__style:{whiteSpace:"nowrap"}},display:"flex",paddingX:3,paddingY:1,position:"relative",rounding:"pill",children:[(0,O.jsx)(i.xv,{align:"center",children:o}),(0,O.jsx)(i.xu,{dangerouslySetInlineStyle:{__style:{paddingTop:"2px"}},"data-test-id":"clear-recent-queries",marginStart:2,children:(0,O.jsx)(i.hU,{accessibilityLabel:null!=s?s:"",icon:"cancel",iconColor:"darkGray",onClick:function(e){var r=e.event;r.stopPropagation(),r.preventDefault(),null==t||t(o)},size:"xs"})})]})})})},e2=function(e){var t,r,o,a,u,s,l=e.id,f=e.isHovered,d=e.onClick,p=e.onMouseEnter,y=e.onMouseLeave,h=e.showSeeMoreOverlay,g=e.suggestion,m=e.trackClick,v=e.url,b=(0,c.ZP)();return(0,O.jsx)(i.xu,{"aria-selected":f?"true":"false","data-test-id":"search-suggestion",id:l,marginBottom:2,paddingX:1,role:"option",children:(0,O.jsx)(i.Tg,{onMouseEnter:p,onMouseLeave:y,href:v||g.url,rounding:3,tabIndex:-1,onTap:function(e){var t=e.event;(0,e.dangerouslyDisableOnNavigation)(),m(),t.metaKey||t.ctrlKey||v||(t.preventDefault(),d())},children:(0,O.jsxs)(i.zd,{height:j.YO,rounding:3,wash:f,width:j.Gh,children:[(0,O.jsx)(i.Ee,{alt:g.label,fit:"cover",naturalHeight:null!==(t=null===(r=g.images["236x"])||void 0===r?void 0:r.height)&&void 0!==t?t:1,naturalWidth:null!==(o=null===(a=g.images["236x"])||void 0===a?void 0:a.width)&&void 0!==o?o:1,src:null!==(u=null===(s=g.images["236x"])||void 0===s?void 0:s.url)&&void 0!==u?u:""}),h&&(0,O.jsxs)(n.Fragment,{children:[(0,O.jsx)(i.xu,{dangerouslySetInlineStyle:j.H2,height:j.YO,left:!0,position:"absolute",top:!0,width:j.Gh}),(0,O.jsx)(i.xu,{alignItems:"center",display:"flex",height:j.YO,justifyContent:"center",padding:3,position:"absolute",top:!0,width:j.Gh,children:(0,O.jsx)(i.xv,{align:"center",color:"inverse",weight:"bold",children:b._('See More', 'searchBox.suggestionGroups.recentPinRep.seeMoreText', 'Text inviting users to see more of the same type of Pins')})})]})]})})})},e3=function(e){var t=e.componentType,r=e.focusedIndex,n=e.groupIndex,o=e.keyPrefix,c=e.onSuggestionClick,u=e.onSuggestionMouseEnter,s=e.onSuggestionMouseLeave,l=e.seeMoreUrl,f=e.suggestions,d=e.title,p=(0,a.v)().logContextEvent;return(0,O.jsxs)(i.kC,{direction:"column",gap:j.Lo,children:[(0,O.jsx)(i.kC,{width:"100%",children:(0,O.jsx)(e8,{title:d})}),(0,O.jsx)(i.xu,{display:"flex",wrap:!0,width:"100%",paddingX:j.r5,children:f.map(function(e,i){var a=i===j.TD-1&&f.length===j.TD;return(0,O.jsx)(e2,{id:ea(n,i),isHovered:r===i,onClick:function(){c(e,i)},onMouseEnter:function(){u(i)},onMouseLeave:function(){s()},showSeeMoreOverlay:a,suggestion:e,trackClick:function(){p({event_type:101,component:t,element:a?179:12374,view_type:j.Ie,view_parameter:103})},url:a?l:e.url},"".concat(o,"-").concat(i))})})]})},e8=function(e){var t=e.title;return(0,O.jsx)(i.xu,{alignItems:"center",display:"flex",marginStart:j.r5,children:(0,O.jsx)(i.xv,{lineClamp:1,weight:"bold",children:t})})};function e4(e){var t=e.focusedIndex,r=e.groupIndex,n=e.onSuggestionClick,o=e.onSuggestionMouseEnter,i=e.onSuggestionMouseLeave,a=e.suggestions,u=(0,c.ZP)();return(0,eX.Q)({component:13844,view_parameter:103,view_type:j.Ie}),(0,O.jsx)(e3,{componentType:13844,focusedIndex:t,groupIndex:r,keyPrefix:"recent_save",onSuggestionClick:n,onSuggestionMouseEnter:o,onSuggestionMouseLeave:i,seeMoreUrl:"/me/pins/",suggestions:a,title:u._('Recently saved', 'searchBox.recentSavedSuggestions.heading', 'Recently saved Pins heading in search autocomplete')})}function e6(e){var t,r,n=e.containerWidth,o=e.focusedIndex,a=e.groupIndex,u=e.onSuggestionClick,s=e.onSuggestionMouseEnter,l=e.onSuggestionMouseLeave,f=e.suggestions,d=(0,c.ZP)(),p=(0,eH.useDispatch)(),y=(t=regeneratorRuntime.mark(function e(t){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,e$.Z)({url:"/v3/search/recent/",method:"DELETE",data:{query:t}});case 2:p((0,eQ.U)("AdvancedTypeaheadResource",{options:{term:"",pin_scope:"pins"}}));case 3:case"end":return e.stop()}},e)}),r=function(){var e=this,r=arguments;return new Promise(function(n,o){var i=t.apply(e,r);function a(e){e0(i,n,o,a,c,"next",e)}function c(e){e0(i,n,o,a,c,"throw",e)}a(void 0)})},function(e){return r.apply(this,arguments)}),h=d._('Remove', 'Remove recent search in search typeahead suggestion', 'Remove recent search in search typeahead suggestion'),g=function(e){var t=e.pillLabels,r=e.maxWidth,n=t.length;if(!r)return n;for(var o=0,i=0;i1.5*eU.yF;)_+=1,x=(t-b(_))/_;var w=x/2.6;return(0,O.jsxs)(i.kC,{direction:"column",gap:j.Lo,children:[(0,O.jsx)(e8,{title:g}),(0,O.jsx)(i.xu,{display:"flex",paddingX:j.r5,ref:v,direction:"row",wrap:!0,children:"shopping_spotlight"===h?y.map(function(e,t){return(0,O.jsx)(eJ.Z,{bubble:e,height:j.Ny,onClick:function(){f({component:200,event_type:101,view_parameter:3467,view_type:2,aux_data:{article_id:e.id,autocomplete_type:"recommended_article",story_type:h}})},onMouseDown:function(e){return e.event.preventDefault()},slotIndex:t,viewParameter:3467,viewType:2,width:j.Ny},"ss-bubble-".concat(t))}):y.map(function(e,t){var a,l,f=r===t,g=e.aux_fields,v=e.cover_images,b=e.dominant_colors,_=e.id,S=e.query,P=e.story_category,I=e.title.format;return(0,O.jsx)(i.xu,{"aria-selected":f?"true":"false","data-test-id":"search-suggestion",id:ea(n,t),marginBottom:2,marginEnd:2,role:"option",children:(0,O.jsx)(eK,{contextLogData:{story_type:h,content_ids:m,grid_index:t,story_id:p},dominantColor:b[0],handleReport:function(){(0,eO.Z)({query:"",report:S,suggestions:y.map(function(e){return e.query}),type:2===e.story_category?j.KH.SEARCH_TRENDING_TEXT:j.KH.SEARCH_IDEAS_FOR_YOU})},height:w,id:_,image:v[0]&&((null===(a=v[0]["236x"])||void 0===a?void 0:a.url)||(null===(l=v[0]["474x"])||void 0===l?void 0:l.url))||"",isHovered:f,name:I,onTap:function(){o(e,t)},onMouseEnter:function(){c(t)},onMouseLeave:function(){u()},searchBoxRenderStopwatch:s,slotIndex:t,url:(0,en.Z)({query:I,referringSource:2===P?"trending":"autocomplete_bubble",bubbleId:null!=_?_:"",storyId:p,pinId:null==g?void 0:g.image_pin_id}),viewParameter:3467,viewType:d,width:x})},"story-".concat(null!=P?P:"","-").concat(n,"-").concat(_))})})]})}var te=r(965671);function tt(e){return(tt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function tr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function tn(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r0?(0,O.jsx)(i.xu,{role:"listbox",dangerouslySetInlineStyle:{__style:{borderRadius:"0 0 16px 16px",top:g}},overflow:"hidden",position:"absolute",width:x||"100%",id:"SuggestionsMenu",children:(0,O.jsx)("div",{"data-test-id":"typeaheadResults",onMouseEnter:u,onMouseLeave:s,style:function(e){for(var t=1;t0?(0,ef.nk)(S._('Search your Pins for {{ query }}', 'searchBox.suggestionsMenu.searchYourPinsForQueryText', 'Heading for search autocomplete when searching your own Pins for specific query'),{query:h}):S._('Search your Pins', 'searchBox.suggestionsMenu.searchYourPinsText', 'Heading for search autocomplete when searching your own Pins')})}),_.map(function(e,r){var n,o,c,u;return e.items.length?(0,O.jsx)(i.kC,{direction:"column",gap:10,children:(0,O.jsx)(i.xu,{children:function(e,r,n){var o=ec(_),i=null==t?void 0:t-o[r],c=function(e){p(ec(_)[r]+e)};switch(e.type){case"recent_query":return(0,O.jsx)(e6,{containerWidth:n,focusedIndex:i,groupIndex:r,onSuggestionClick:d,onSuggestionMouseEnter:c,onSuggestionMouseLeave:k,suggestions:e.items});case"recent_save":return(0,O.jsx)(e4,{focusedIndex:i,groupIndex:r,onSuggestionClick:d,onSuggestionMouseEnter:c,onSuggestionMouseLeave:k,suggestions:e.items});case"recent_view":return(0,O.jsx)(e9,{focusedIndex:i,groupIndex:r,onSuggestionClick:d,onSuggestionMouseEnter:c,onSuggestionMouseLeave:k,suggestions:e.items});case"story":return E&&"shopping_spotlight"===e.story_type?(0,O.jsx)(e5,{containerWidth:n,focusedIndex:i,groupIndex:r,onSuggestionClick:d,onSuggestionMouseEnter:c,onSuggestionMouseLeave:k,searchBoxRenderStopwatch:v,suggestions:e}):(0,O.jsx)(e7,{containerWidth:n,focusedIndex:i,groupIndex:r,onSuggestionClick:d,onSuggestionMouseEnter:c,onSuggestionMouseLeave:k,searchBoxRenderStopwatch:v,suggestions:e});case"blended_autocomplete":return(function(e){var t,r=e.slice(),n=r[0],o=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return tn(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return tn(e,t)}}(e))){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){c=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw i}}}}(r);try{for(o.s();!(t=o.n()).done;){var i=t.value;if(null!==(a=i.modified_filter_eligibility)&&void 0!==a&&a.hair_pattern||null!==(c=i.modified_filter_eligibility)&&void 0!==c&&c.skin_tone){var a,c,u,s,l,f=(null===(u=i.modified_filter_eligibility.hair_pattern)||void 0===u?void 0:u.base_query)||(null===(s=i.modified_filter_eligibility.skin_tone)||void 0===s?void 0:s.base_query)||"",d=null===(l=i.modified_filter_eligibility.hair_pattern)||void 0===l?void 0:l.eligible_filters,p=(0,ep.Z)({url:i.url}).rs,y={query:f,rs:p},h=(0,m.Z)(y),g="enriched_autocomplete"===n.type&&n.image?1:0,v={eligibleHairPatternFilters:d,label:f,query:f,resultIndex:g,type:"inclusive_product_filter_query",url:h};r.splice(g,0,v),n=r[0];break}}}catch(e){o.e(e)}finally{o.f()}return r})(e.items).map(function(e,t){return(0,O.jsx)(eq,{experiences:I,focusedIndex:i,index:t,onInclusiveProductFilterClick:a,onSuggestionClick:d,onSuggestionMouseEnter:c,onSuggestionMouseLeave:k,query:h,suggestion:e},"search-suggestion-".concat(e.label||"","-").concat(e.query||"","-").concat(e.type,"-").concat(e.url||"","-").concat(e.image||""))});case"syop_cta":return(0,O.jsx)(eN,{focusedIndex:i,index:0,onSuggestionClick:y,onSuggestionMouseEnter:c,onSuggestionMouseLeave:k})}return null}(e,r,null!==(c=null===(u=j.current)||void 0===u?void 0:u.getBoundingClientRect().width)&&void 0!==c?c:0)},"".concat(h,"-").concat(e.type,"-").concat(null!==(n=null===(o=e.title)||void 0===o?void 0:o.format)&&void 0!==n?n:""))}):null})]})})}):(0,O.jsx)(i.xu,{})})}function ta(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);re.length)&&(t=e.length);for(var r=0,n=Array(t);r0){var l=a.data[0].text;s=a.data[0].query,u=l}return r&&(u=n?o._('Try a title or description', 'searchBox.placeholder.searchYourOwnPinsFocusedText', 'default placeholder text for input focused search box when searching Your Pins'):o._('Search your Pins', 'searchBox.placeholder.searchYourOwnPinsText', 'default placeholder text for search box when searching Your Pins')),[u,s]}({shouldHideGhostText:eY,isSyop:ey,inputFocused:eO}),2),e1=e0[0],e2=e0[1],e3=(0,n.useRef)();function e8(){var e=(0,b.Z)($);if(e.length){var t=(0,m.Z)({query:e,rs:"ac",scope:_.lw.PINS_MINE});F.push(t)}}(0,n.useEffect)(function(){e3.current!==eF&&(eF?u.Z.pause():u.Z.resume(),eq(!eF),eF||(eB(),Q(K)),eH(eF),e3.current=eF)},[K,eF,eq,eH]),(0,n.useEffect)(function(){Q(K),ep(el),eP(!1),eD(!1)},[K,el]);var e4=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=r?97:101,o={};switch($&&(o.entered_query=$,o.selected_query=e.query||void 0),e.type){case"inclusive_product_filter_query":case"recent_query":case"query":z({event_type:n,view_type:2,view_parameter:103,component:35,element:104,aux_data:tl({autocomplete_type:"inclusive_product_filter_query"===e.type?"query":e.type,result_index:t},o)});var i=ei({suggestion:e,query:$,lastFocusTime:ez});ey&&"recent_query"===e.type&&(i=i.replace("pins","my_pins")),F.push(i);break;case"recent_save":F.push(e.url);break;case"enriched_autocomplete":case"board":case"user":z({event_type:n,view_type:2,view_parameter:103,component:35,element:104,aux_data:tl({autocomplete_type:e.type,result_index:t},o)}),F.push(e.url);break;case"explorearticle":26===e.story_category?z({event_type:101,view_type:2,view_parameter:3467,component:13865,aux_data:tl({article_id:e.id,autocomplete_type:"recommended_article",story_id:e.storyId,story_type:"shopping_spotlight"},o)}):z({event_type:101,view_type:2,view_parameter:3467,component:200,aux_data:tl({autocomplete_type:2===e.story_category?"trending":"recommended",result_index:t},o)}),r&&F.push(ei({suggestion:e,query:""}));break;case"todayarticle":z({event_type:101,view_type:2,view_parameter:3467,component:200,aux_data:tl({article_id:e.id,autocomplete_type:"recommended_article",story_type:"shopping_spotlight"},o)}),r&&F.push(ei({suggestion:e,query:""}));break;case"syop_cta":e8()}eB(),eP(!1),eD(!1)},e6=function(){if(eo!==K||ed!==el){var e=(0,b.Z)(eo);if(e.length){var t=(0,m.Z)({query:e,rs:"typed",scope:ed});F.push(t)}}};if(eW&&!eO&&!K&&!eF)return(0,O.jsx)(i.xu,{id:"searchBoxContainer",children:(0,O.jsx)(i.hU,{accessibilityLabel:B._('Search icon', 'searchBox.searchIcon.accessibilityLabel', 'accessibility label for search icon only at narrow screen width'),icon:"search",onClick:function(){eP(!0),eG(!1),T&&T(!1),R&&z({event_type:101,element:11809})},size:"lg",iconColor:"gray"})});var e9=function(e){var t,r,n=e.suggestionsFocusIndex,o=ec(e.suggestionGroups);if("number"==typeof n){for(var i=o.length-1;i>=0;i-=1)if(n>=o[i]){t=i,r=n-o[i];break}}return"number"==typeof t&&"number"==typeof r?ea(t,r):""}({suggestionsFocusIndex:eb,suggestionGroups:eg}),e5="shrink"===L?"".concat(80,"vw"):void 0,e7=L&&Object.keys(j.ht).includes(L)&&"shrink"!==L?j.ht[L]:"auto",te=(0,O.jsx)(p,{children:(0,O.jsx)(tc,{focusIndex:eb,maxHeight:e$,onInclusiveProductFilterClick:function(e,t,r){var n={};$&&(n.entered_query=$),z({event_type:101,view_type:2,view_parameter:103,component:35,element:104,aux_data:tl({autocomplete_type:"query",result_index:t},n)});var o=ei({suggestion:e,query:$,lastFocusTime:ez,filterSelectedTerm:r});F.push(o)},onMouseEnter:function(){return eD(!0)},onMouseLeave:function(){return eD(!1)},onSuggestionClick:e4,onSuggestionGroupsUpdate:em,onSuggestionHovered:function(e){return e_(e)},onSyopCtaClick:e8,query:$,scope:ed,searchBoxHeight:j.XI+4,suggestionGroups:eg,width:e5})});return(0,O.jsx)(ee,{children:(0,O.jsx)(i.xu,{flex:"grow",id:"searchBoxContainer",minWidth:e7,paddingX:2,children:(0,O.jsxs)(i.xu,{color:eT?void 0:"secondary",dangerouslySetInlineStyle:{__style:{backgroundColor:eT?"#E1E1E1":void 0}},display:"flex",height:j.XI,rounding:6,children:[(0,O.jsxs)(i.xu,{alignItems:"center",dangerouslySetInlineStyle:{__style:tl({padding:N?"0 16px 0 ".concat(eJ):"0 ".concat(eJ," 0 16px")},eF?{borderRadius:"24px",boxShadow:"0 0 0 4px rgba(0, 132, 255, .5)"}:{})},display:"flex",flex:"grow",height:"100%",onMouseEnter:function(){eE(!0)},onMouseLeave:function(){eE(!1)},position:"relative",children:[!(eo||eO)&&(0,O.jsx)(i.xu,{flex:"none",marginEnd:2,children:(0,O.jsx)(i.JO,{accessibilityLabel:B._('Search icon', 'searchBox.searchIcon.accessibilityLabel', 'Search icon in search box'),icon:"search",size:16})}),W&&(0,O.jsx)(q,{handleClearMode:function(){eo===K?F.push("/search/pins/?q=".concat(K)):ep(_.lw.PINS)},scope:ed}),(0,O.jsx)(g.Z,{dataTestId:"search-box-input",focusOptionId:e9,isFocused:eF,name:"searchBoxInput",onBlur:function(){eP(!1)},onChange:function(e){Q(e),eB()},onFocus:function(){eZ(Date.now()),z({event_type:101,component:43,element:227}),eP(!0)},onKeyDown:function(e){switch(e.keyCode){case s.Z.ENTER:var t=eu(eg,eb);eF&&t&&e.preventDefault(),t&&ew?(e4(t,t.resultIndex||0,!0),ej(!1)):e6();break;case s.Z.ESCAPE:eF&&e.preventDefault(),e.stopPropagation(),eP(!1),eD(!1);break;case s.Z.UP:eF&&e.preventDefault();var r,n,o,i=tf((n=eg.map(function(e){var t;return null!==(t=e.items.length)&&void 0!==t?t:0}).reduce(function(e,t){return e+t},0),o=eu(eg,r=null==eb?n-1:0===eb?void 0:eb-1),[r,o]),2),a=i[0],c=i[1];e_(a),ej(!0),en(c);break;case s.Z.DOWN:eF&&e.preventDefault();var u,l,f,d=tf((l=eg.map(function(e){var t;return null!==(t=e.items.length)&&void 0!==t?t:0}).reduce(function(e,t){return e+t},0),f=eu(eg,u=null==eb?0:eb===l-1?void 0:eb+1),[u,f]),2),p=d[0],y=d[1];e_(p),ej(!0),en(y);break;case s.Z.TAB:e2&&!$&&eF&&(e.preventDefault(),e.stopPropagation(),Q(e2))}},onSearchTrigger:e6,placeholder:e1,value:eo}),eo||R&&eQ||eF?(0,O.jsx)(i.xu,{flex:"none",marginStart:3,children:(0,O.jsx)(i.xu,{"data-test-id":"search-cancel",children:(0,O.jsx)(i.hU,{accessibilityLabel:B._('Remove search input', 'searchBox.removeSearchInput.accessibilityLabel', 'Accessibility label to remove the search input'),icon:K?"cancel":"clear",iconColor:"darkGray",onClick:function(){if(Q(""),ep(_.lw.PINS),eB(),Z.isAuth&&K){var e=(0,m.Z)({query:"",rs:"remove"});F.push(e)}else R&&T&&T(!0)},size:K?"sm":"lg"})})}):null,eF&&te]}),eQ?(0,O.jsxs)(n.Fragment,{children:[(0,O.jsx)(i.xu,{dangerouslySetInlineStyle:{__style:{background:"#d8d8d8",borderRadius:"1px"}},height:32,margin:"auto",width:2}),(0,O.jsx)(k,{currentlySelectedFilter:ed,currentQuery:K,handleContentTypeFilterHover:function(){R&&eM(eR)},handleScopeChange:function(e){ep(e),eP(R&&!$),eB()}})]}):null]})})})}},149139:function(e,t,r){r.d(t,{Ag:function(){return p},Fj:function(){return l},Gh:function(){return b},H2:function(){return v},Ie:function(){return x},KH:function(){return _},Lo:function(){return i},Ny:function(){return h},P$:function(){return f},TD:function(){return g},Ub:function(){return y},XI:function(){return n},YO:function(){return m},a3:function(){return u},ht:function(){return a},le:function(){return s},r5:function(){return o},sA:function(){return c},yY:function(){return d}});var n=48,o=8,i=4,a={md:407,sm:332,auto:"auto"},c=7,u=["pin.description","pin.id","pin.images[236x]"],s=360,l=76,f=5,d=7.5,p=40,y=24,h=192,g=7,m=116,v={__style:{backgroundColor:"rgba(0,0,0, .4)"}},b=90,_={AUTOCOMPLETE:0,SEARCH_TRENDING_TEXT:2,SEARCH_IDEAS_FOR_YOU:3},x=2},681557:function(e,t,r){r.d(t,{A:function(){return s},N:function(){return l}});var n=r(658379),o=r(583592),i=r(389282);function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r