(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8541],{1844:(e,r,t)=>{"use strict";t.d(r,{I:()=>p});var o=t(37876),i=t(63663),a=t(70065),n=t(77232),d=t(52980);let s=n.I4.div.withConfig({componentId:"sc-7e0d23b4-0"})(["--debug-color:lightgreen;border:1px solid color-mix(in lab,var(--debug-color),black 20%);background:color-mix(in lab,var(--debug-color),white 70%);color:color-mix(in lab,var(--debug-color),black 50%);border-radius:4px;margin:8px 4px;padding:8px;font-size:12px;"]),l=(0,n.i7)(["from{translate:0 80px;scale:0.8 1.25;}"]),c=(0,n.I4)(d.S).withConfig({componentId:"sc-7e0d23b4-1"})(["--debug-color:magenta;--debug-color-background:color-mix(in lab,var(--debug-color),white 70%);--debug-color-border:color-mix(in lab,var(--debug-color),black 20%);--debug-color-text:color-mix(in lab,var(--debug-color),black 50%);border:1px solid var(--debug-color-border);background:var(--debug-color-background);padding-left:24px;border-radius:32px;position:fixed;z-index:1049;bottom:16px;left:16px;box-shadow:0 2px 4px rgb(0,0,0,4%),0 2px 8px rgb(0,0,0,4%),0 4px 10px rgb(0,0,0,6%),0 6px 12px rgb(0,0,0,4%);animation:"," 300ms 300ms both;label{color:var(--debug-color-text);font-family:monospace;font-size:14px;padding-top:14px;padding-bottom:12px;padding-right:24px;}input{border:1px solid var(--debug-color-border);&:checked{border:1px solid var(--debug-color-border);background-color:var(--debug-color-border);}}&:hover{background:color-mix(in lab,var(--debug-color),white 80%);label{color:var(--debug-color-text);}input{border:1px solid var(--debug-color-border);&:checked{border:1px solid var(--debug-color-border);background-color:var(--debug-color-border);}}}"],l),u=e=>{let{layout:r,extensions:t}=e;if(!r)return null;let i=t?.backend_details;return(0,o.jsxs)(s,{children:[(0,o.jsx)("strong",{children:"Name"}),": ",r.name,", ",(0,o.jsx)("strong",{children:"Description"}),":"," ",(0,o.jsx)("em",{children:r.description}),", ",(0,o.jsx)("strong",{children:"Layout Id"}),": ",(0,o.jsx)("code",{children:r.id}),(0,o.jsxs)("div",{className:"h-margin-t-default",children:[(0,o.jsx)(a.N,{href:`https://slingshot.prod.target.com/cdui/layout/${r.id}`,children:"View in Slingshot"})," ",(0,o.jsxs)(a.N,{href:`https://git.target.com/cdui-self-service/cdui-layouts/blob/main/layouts/${r.id}.json`,children:["View in ",(0,o.jsx)("code",{children:"cdui-layouts"})]})]}),(0,o.jsx)("div",{children:i?.length?(0,o.jsx)("div",{className:"h-padding-t-default",children:(0,o.jsxs)("details",{children:[(0,o.jsxs)("summary",{children:[(0,o.jsx)("strong",{children:"Services called"})," ",(0,o.jsx)("em",{children:"(click to expand)"})]}),(0,o.jsx)("div",{className:"h-padding-l-default",children:i?.map(e=>(0,o.jsx)("div",{className:"h-margin-t-tight",children:(0,o.jsxs)("details",{children:[(0,o.jsxs)("summary",{children:[(0,o.jsx)("strong",{children:"Endpoint"})," ",(0,o.jsx)("em",{children:"(click to expand)"}),": ",e.path]}),(0,o.jsxs)("div",{className:"h-padding-l-default",children:[(0,o.jsxs)("div",{children:[(0,o.jsx)("strong",{children:"Status Code"}),": ",e.status_code]}),e.request_body?(0,o.jsxs)("div",{children:[(0,o.jsx)("strong",{children:"Request Body"}),":"," ",(0,o.jsx)("code",{children:JSON.stringify(e.request_body)})]}):null]})]})},e.path))})]})}):null}),(0,o.jsx)(c,{id:"show-module-gaps",label:"Show module gaps"})]})};u.displayName="ConfigDrivenUiDebugLayoutInner";let p=e=>(0,i.t)()?(0,o.jsx)(u,{...e}):null;p.displayName="ConfigDrivenUiDebugLayout"},15923:(e,r,t)=>{"use strict";t.d(r,{H:()=>d});var o=t(829),i=t(76956),a=t(48549),n=t(41447);let d=async(e,r)=>{if(!r?.res?.cdnMetadata?.isBot)return;let t=[],d=Object.values(e?.slots??{}),s=(0,o.x6)(r.asPath),l=d?.filter(e=>(e.metadata?.components?.[0]?.type_name?.toLowerCase()==="item or promotion carousel"||e.metadata?.components?.[0]?.type_name?.toLowerCase()==="manual tcin carousel")&&e?.content?.container?.type==="personalizedProducts"||e.metadata?.components?.[0]?.type_name?.toLowerCase()==="story"&&e?.extensions?.[0]==="shoppable_carousel");l?.forEach(e=>{let o=(0,n.d)(e?.content?.container?.keyValuePairs?.context||e?.content?.extensions?.shoppable_carousel?.context?.prz?.config),a={brand_ids:o?.brandId,category_id:o?.categoryId,fulfillment_types:o?.fulfillmentId,offer_id:o?.promoId,placement_id:o?.placementId,slingshot_component_id:e?.metadata?.components?.[0]?.id,facet_ids:o?.facetId};t.push(r?.preloadInitialQuery(i.Ri,{...a,page:s,include_sponsored_recommendations:!1,channel:"WEB",platform:"desktop",pricing_store_id:"3991",purchasable_store_ids:"",visitor_id:"0"}))});let c=d?.filter(e=>e.metadata?.components?.[0]?.type_name?.toLowerCase()==="recommendations");c?.forEach(o=>{let i={category_id:e?.metadata?.node_id,placement_id:o?.content?.placement_id};t.push(r?.preloadInitialQuery(a.v,{...i,page:s,include_sponsored_recommendations:!1,channel:"WEB",platform:"desktop",pricing_store_id:"3991",purchasable_store_ids:"",visitor_id:"0"}))}),await Promise.all(t)}},38512:(e,r,t)=>{"use strict";t.d(r,{t:()=>u});var o=t(86139),i=t(32612),a=t(90746),n=t(90733),d=t(67863),s=t(75186),l=t(30871);let c="@web/domain-product/get-product-summary-for-drawer",{useQuery:u}=(0,n.T)({name:c,keyFn:e=>{if(!e.tcins)throw Error("TCINS not defined for product summary drawer query");return[c,e]},queryFn:async e=>{let{apiKey:r,baseUrl:t,apis:{product:n}}=(0,s.config)().services.redskyAggregations,{tcins:c,pricing_store_id:u=d.Vz}=e??{},p=await (0,a.E)(),{data:m,ok:h,statusText:g}=await (0,l.T)(c?.split(","),e=>{let a={key:r,effective_date:p,tcins:e.join(","),pricing_store_id:u};if(!a.tcins)throw Error("TCINS not defined for product summary drawer query");let d=o.o.buildURLWithParams(new URL(n.endpointPaths.productSummaryForDrawer,t),a);return(0,i.n)(d,{partialErrorTag:"get_product_summary_for_drawer_v1_partial_api_error"})});if(h)return m?.data??null;throw Error(`${g}`)}})},41447:(e,r,t)=>{"use strict";t.d(r,{d:()=>a});var o=t(40123),i=t.n(o);let a=e=>{if(!i()(e)&&e)return Object.fromEntries(e.split(";").map(e=>{let[r,...t]=e.split(",")??[];return[r,t?.join(",")]}))}},48549:(e,r,t)=>{"use strict";t.d(r,{v:()=>l});var o=t(90733),i=t(90746),a=t(79673),n=t(76062);let d="@web/domain-product/get-general-recommendations-placement",{useQuery:s}=(0,o.T)({name:d,keyFn:e=>(void 0!==e.channel||void 0!==e.placement_id||void 0!==e.page||void 0!==e.visitor_id)&&[d,e],queryFn:async function(e){let{requestMetricsOptions:r}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=await (0,i.E)(),{data:o,ok:a,statusText:d}=await (0,n.V)({requestParams:{effective_date:t,...e},fetchOptions:{...r}});if(a){if(o?.data){let e=Date.now();return{...o.data,timeStamp:e}}return o?.data??null}throw Error(`${d}`)}}),l=(0,a.K)(s)},53441:(e,r)=>{"use strict";r.parse=function(e,r){if("string"!=typeof e)throw TypeError("argument str must be a string");var t={},i=e.length;if(i<2)return t;var a=r&&r.decode||c,n=0,d=0,u=0;do{if(-1===(d=e.indexOf("=",n)))break;if(-1===(u=e.indexOf(";",n)))u=i;else if(d>u){n=e.lastIndexOf(";",d-1)+1;continue}var p=s(e,n,d),m=l(e,d,p),h=e.slice(p,m);if(!o.call(t,h)){var g=s(e,d+1,u),f=l(e,u,g);34===e.charCodeAt(g)&&34===e.charCodeAt(f-1)&&(g++,f--);var b=e.slice(g,f);t[h]=function(e,r){try{return r(e)}catch(r){return e}}(b,a)}n=u+1}while(nt;){var o=e.charCodeAt(--r);if(32!==o&&9!==o)return r+1}return t}function c(e){return -1!==e.indexOf("%")?decodeURIComponent(e):e}},60531:(e,r,t)=>{var o=t(95626),i=t(48217);e.exports=function(e,r){return o(e,r,function(r,t){return i(e,t)})}},67899:(e,r,t)=>{var o=t(60531);e.exports=t(4194)(function(e,r){return null==e?{}:o(e,r)})},70762:(e,r,t)=>{"use strict";t.d(r,{y:()=>n});var o=t(37876),i=t(14232),a=t(6329);let n=(0,i.memo)(e=>{let{children:r,debugName:t,queryResult:n,searchResponseData:d,extensions:s}=e,l=(0,i.useMemo)(()=>({meta:{queryResult:n,extensions:s},searchResponse:d,debugName:t}),[n,d,t,s]);return(0,o.jsx)(a.F.Provider,{value:l,children:r})});n.displayName="SearchResponseContextProvider"},76062:(e,r,t)=>{"use strict";t.d(r,{V:()=>n});var o=t(32612),i=t(86139),a=t(75186);let n=e=>{let{fetchOptions:r,requestParams:t}=e??{},{channel:n,placement_id:d,page:s,visitor_id:l,pricing_store_id:c,member_id:u,category_id:p,tcins:m,purchasable_store_ids:h,exclusions:g,offer_id:f,keyword:b,include_sponsored_recommendations:x,effective_date:v,fulfillment_types:y,brand_ids:_,resolve_to_first_variation_child:w,slingshot_component_id:E,platform:j,facet_ids:k,exclude_category_ids:C,include_dmc_dmr:S,marketing_group_ids:I}=t??{},{apiKey:N,baseUrl:T,apis:{product:P}}=(0,a.config)().services.redskyAggregations;if(!n||!d||!s||!l)throw Error("Required parameters not defined for general recommendations placement query");let R=i.o.buildURLWithParams(new URL(P.endpointPaths.generalRecommendationsPlacementV1,T),{category_id:p,channel:n,effective_date:v,include_sponsored_recommendations:x,key:N,keyword:b,member_id:u,offer_id:f,page:s,placement_id:d,pricing_store_id:c,purchasable_store_ids:h,exclusions:g,tcins:m,visitor_id:l,fulfillment_types:y,brand_ids:_,resolve_to_first_variation_child:w,slingshot_component_id:E,platform:j,facet_ids:k,exclude_category_ids:C,include_dmc_dmr:S,marketing_group_ids:I});return(0,o.n)(R,{partialErrorTag:"get_general_recommendations_placement_partial_api_error",...r})}},76956:(e,r,t)=>{"use strict";t.d(r,{Ri:()=>c,Rt:()=>l});var o=t(90733),i=t(90746),a=t(79673),n=t(76062);let d="@web/domain-product/get-guest-specific-recommendations-placement",{useQuery:s}=(0,o.T)({name:d,keyFn:e=>(void 0!==e.channel||void 0!==e.placement_id||void 0!==e.page||void 0!==e.visitor_id||void 0!==e.member_id)&&[d,e],queryFn:async e=>{let r=await (0,i.E)(),{data:t,ok:o,statusText:a}=await (0,n.V)({requestParams:{effective_date:r,...e}});if(o)return t?.data??null;throw Error(`${a}`)}}),l=s,c=(0,a.K)(s)},80898:(e,r,t)=>{"use strict";t.d(r,{l:()=>u});var o,i=t(14232);let a="GLOBAL_REDIRECT_EVENT_TRACKING",n=`${a}_ENABLED`;var d=t(83739);(o||(o={})).redirect="redirect";class s extends d.r{processMetadata(e){return e}createDataPayload(e){return e}constructor(...e){super(...e),this.intent=o.redirect,this.tag=a,this.flag=n,this.apiMutation="redirect"}}var l=t(43203),c=t(19130);let u=()=>{let{fetchClientContextMetadata:e}=(0,l.p)(),{trackRedirectEvent:r}=(e=>(0,i.useMemo)(()=>({trackRedirectEvent:new s(e)}),[e]))(e),t=(0,c.n)()(r,n);return(0,i.useMemo)(()=>({trackRedirectEvent:t}),[t])}}}]);