6 lines
23 KiB
Plaintext
6 lines
23 KiB
Plaintext
"use strict";
|
|
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="c6220d0e-210a-5f63-9ed6-6d3aefb6350d")}catch(e){}}();
|
|
(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[40],{851:(e,t,i)=>{i.d(t,{Z:()=>r});var s=i(0),n=i(10),o=i(800),a=i(100);function r(){const e=(0,n.I0)(),t=(0,n.v9)(o.uk),i=(0,n.v9)(o.pH),d=(0,a.D9)(i);return(0,s.useEffect)((()=>{d&&i&&d!==i&&(r.onGoingRequest=!1),!r.onGoingRequest&&!t&&i&&i<Date.now()&&(r.onGoingRequest=!0,e((0,o.sV)()))}),[e,t,i,d]),null}r.onGoingRequest=!1},850:(e,t,i)=>{i.d(t,{Z:()=>z});var s=i(9),n=i.n(s),o=i(180),a=i.n(o),r=i(188),d=i.n(r),l=i(0),h=i(10),c=i(66),p=i(72),g=i(99),u=i(397),f=i(16),m=i(15),S=i(33),v=i(70),b=i(18),y=i(73),w=i(800),C=i(823),E=i(817);const R=class{constructor(){this.adBlockedPaths=void 0,this.googletag=void 0,window.googletag=window.googletag||{},this.googletag=window.googletag,this.adBlockedPaths=[],this.pushCmd((function(){window?.tercept?.init&&window.tercept.init("325540922")})),this.pushCmd((()=>{this.googletag&&(this.googletag.pubads().enableAsyncRendering(),this.googletag.pubads().collapseEmptyDivs(!1),this.googletag.pubads().disableInitialLoad(),this.googletag.enableServices())})),this.loadScript("https://cdn.tercept.com/js/trcpt?account_id=TCPT-1565"),this.loadScript("//js-sec.indexww.com/ht/p/190901-124716667027312.js"),this.loadScript("//securepubads.g.doubleclick.net/tag/js/gpt.js")}loadScript(e){const t=document.createElement("script");t.async=!1,t.type="text/javascript",t.src=e,null!=document.head&&document.head.appendChild(t)}detectAdBlocker(e,t){if(this.adBlockedPaths)if(-1===this.adBlockedPaths.indexOf(e)){this.adBlockedPaths.push(e);try{fetch(new Request("https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js",{method:"HEAD",mode:"no-cors"})).then((t=>{this.adBlockedPaths?.splice(this.adBlockedPaths.indexOf(e),1)})).catch((e=>{t()}))}catch(e){t()}}else t()}execute(e){this.pushCmd((()=>e(this.googletag)))}isApiReady(){return!!this.googletag?.apiReady}isPubAdsReady(){return!!this.googletag?.pubadsReady}pushCmd(e){this.googletag&&(this.googletag.cmd||(this.googletag.cmd=[]),this.googletag.cmd.push((()=>{try{e()}catch(e){}})))}};var I="D_agn",_="D_ags",k="D_agu",D=i(1);const x=/\*|"|'|=|!|\+|#|~|;|\^|\(|\)|\[|\]|\{|\}|,|&|<|>|\?/g;function A(e,t){if(e===t)return!0;const i=Object.keys(e),s=Object.keys(t);return i.length===s.length&&i.reduce(((i,n)=>i&&-1!==s.indexOf(n)&&e[n]===t[n]),!0)}function L(e,t,i,s){Sentry.withScope((n=>{n.setExtra("adSlot",i),n.setExtra("isSlotEmpty",s),n.setExtra("event name",t),Sentry.captureException(new Error(e))}))}class H extends l.Component{static fetchAdConfig(e){H.adConfig.isInitiated||(H.adConfig.isInitiated=!0,e())}constructor(e){super(e),this.adSlot=void 0,this.adUnitContainer=void 0,this.availableWidthRanges=void 0,this.availableHeightRanges=void 0,this.availableFluidHeightRanges=void 0,this.previousWindowHeight=void 0,this.previousWindowWidth=void 0,this.responseInfo=void 0,this.adRequestId=void 0,this.adVisibleImpressionCalled=void 0,this.adViewableImpressionCalled=void 0,this.trackNoFillInViewportCalled=void 0,this.isSlotEmpty=void 0,this.listeners=void 0,this.onResize=()=>{const e=(0,E.fM)(),t=(0,E.gp)();function i(e,t){return(e||[]).filter((e=>e<t)).length}if(this.state.isDirectAd)this.previousWindowHeight&&t&&i(this.availableFluidHeightRanges,this.previousWindowHeight)!==i(this.availableFluidHeightRanges,t)&&this.updateContainerHeight(t,this.props.fluidSizeMapping,this.availableFluidHeightRanges);else{let s=!1;this.previousWindowWidth&&e&&i(this.availableWidthRanges,this.previousWindowWidth)!==i(this.availableWidthRanges,e)&&(s=!0),this.previousWindowHeight&&t&&!s&&i(this.availableHeightRanges,this.previousWindowHeight)!==i(this.availableHeightRanges,t)&&(s=!0),s&&(this.update(this.props),this.updateContainerHeight(t,this.props.sizeMapping,this.availableHeightRanges))}this.previousWindowWidth=e,this.previousWindowHeight=t},this.onResizeDebounced=a()(this.onResize,100),this.onScroll=()=>{this.trackNoFillInViewport()},this.onScrollThrottled=d()(this.onScroll,100),this.onTrackEvent=(e,t)=>{const{trackBatchedEvent:i,path:s,productId:n,requestID:o,targeting:a}=this.props,r={ad_request_id:this.adRequestId,campaign_id:t?.campaignId?.toString()||"",carousell_placement_id:s};if(n&&(r.source_product_id=n),o&&(r.source_request_id=o),a.searchTerms&&(r.raw_search_term=a.searchTerms),t){const e=t.creativeId?.toString(),i=t.lineItemId?.toString(),s=t.creativeTemplateId?.toString();e&&(r.gam_creative_id=e),i&&(r.lineitem_id=i),s&&(r.template_id=s)}i({name:e,properties:r,type:"action"})},this.updateContainerHeight=(e,t,i)=>{if(!t||!this.props.isFullWidthBanner)return;const s=((e,t,i)=>{if(!t||!i)return;const s=i.sort(((e,t)=>t-e)).find((t=>t<=e)),n=t.find((e=>e.height===s));return n?.adHeight})(e,t,i);"number"==typeof s&&this.setState({containerHeight:s})},this.slotRequestListener=()=>e=>{const t=e.slot.getSlotId().getDomId(),{trackBatchedEvent:i,id:s,path:n,productId:o,requestID:a,targeting:r}=this.props;if(t===s){this.adRequestId=(0,v.z)(8),this.setState({adRequestId:this.adRequestId});const e={ad_request_id:this.adRequestId,carousell_placement_id:n};o&&(e.source_product_id=o),a&&(e.source_request_id=a),r.searchTerms&&(e.raw_search_term=r.searchTerms),i({name:"external_ad_requested",properties:e,type:"action"})}},this.slotResponseReceivedListener=()=>e=>{const{id:t,adBlockerSetStatusAction:i,adBlockerDetected:s}=this.props;if(s&&i({adBlockerDetected:!1}),e.slot.getSlotId().getDomId()===t){if(!this.isSlotEmpty)try{this.responseInfo=e.slot.getResponseInformation()}catch(t){L(t.message,"slotResponseReceived",e.slot,void 0===this.isSlotEmpty?"unknown":`${this.isSlotEmpty}`)}this.trackNoFillInViewport(),this.onTrackEvent("external_ad_filled",this.responseInfo)}},this.slotRenderEndedListener=()=>(this.setState({isEmptySlot:null}),e=>{const{id:t,adUnitFillStatuses:i,adUnitSetFillStatusAction:s}=this.props,n=e.slot.getSlotId().getDomId(),o=e.slot.getAdUnitPath();if(this.isSlotEmpty=e.isEmpty,n===t)if(this.isSlotEmpty)this.setState({isEmptySlot:"nofill"},(()=>{this.trackNoFillInViewport(),s({adUnitFillStatus:{adIndex:n,adUnitId:o,fillStatus:!1}})}));else{try{this.responseInfo=e.slot.getResponseInformation()}catch(t){L(t.message,"slotRenderEnded",e.slot,void 0===this.isSlotEmpty?"unknown":`${this.isSlotEmpty}`)}this.setState({isEmptySlot:null}),window?.tercept?.logRenderEvent&&window.tercept.logRenderEvent(e),this.onTrackEvent("external_ad_render_started",this.responseInfo);const t=!!this.responseInfo?.creativeTemplateId;this.setState({isDirectAd:t}),this.updateContainerHeight((0,E.gp)(),t?this.props.fluidSizeMapping:this.props.sizeMapping,t?this.availableFluidHeightRanges:this.availableHeightRanges);const a=i.findIndex((e=>e.adIndex===n&&e.adUnitId===o));-1===a&&"adPageskin"!==n&&"HpbbBanner"!==n||s({adUnitFillStatus:{adIndex:n,adUnitId:o,fillStatus:!0}})}}),this.slotOnloadListener=()=>{const{id:e,me:t}=this.props;return i=>{if(i.slot.getSlotId().getDomId()===e){try{this.isSlotEmpty||(this.responseInfo=i.slot.getResponseInformation());const e=this.adUnitContainer?.element?.querySelector("iframe");e?.id.includes("Desktop_CategorySearch_Native_")&&e.src&&e.contentWindow?.postMessage({emailHash:t?.email_hash||""},e.src)}catch(e){L(e.message,"slotOnload",i.slot,void 0===this.isSlotEmpty?"unknown":`${this.isSlotEmpty}`)}this.onTrackEvent("external_ad_render_ended",this.responseInfo)}}},this.adClickEventListener=()=>{const e=this.adUnitContainer?.element?.querySelector("iframe");e&&document.activeElement===e&&(setTimeout((()=>e?.blur())),this.onTrackEvent("external_ad_click",this.responseInfo))},this.impressionViewableListener=()=>e=>{const{id:t}=this.props;if(e.slot.getSlotId().getDomId()===t&&!this.adViewableImpressionCalled){let t;if(!this.isSlotEmpty)try{t=e.slot.getResponseInformation()}catch(t){L(t.message,"impressionViewable",e.slot,void 0===this.isSlotEmpty?"unknown":`${this.isSlotEmpty}`)}this.adViewableImpressionCalled=!0,window?.tercept?.logImpEvent&&window.tercept.logImpEvent(e),this.onTrackEvent("external_ad_viewable_impression",t)}},this.slotVisibilityChangedListener=()=>{const{id:e}=this.props;return t=>{if(t.slot.getSlotId().getDomId()===e&&t.inViewPercentage>=1&&!this.adVisibleImpressionCalled){let e;if(!this.isSlotEmpty)try{e=t.slot.getResponseInformation()}catch(e){L(e.message,"slotVisibilityChanged",t.slot,void 0===this.isSlotEmpty?"unknown":`${this.isSlotEmpty}`)}this.adVisibleImpressionCalled=!0,this.onTrackEvent("external_ad_visible_impression",e)}}},this.state={adRequestId:null,containerHeight:void 0,isDirectAd:!1,isEmptySlot:null},this.listeners={},this.responseInfo=null,H.adManager||(H.adManager=new R)}componentDidMount(){this.detectAdBlocker();const e=this.props.sizeMapping.map((e=>e.height?e.height:0)),t=this.props.fluidSizeMapping?.map((e=>e.height?e.height:0));this.availableHeightRanges=Array.from(new Set(e)),this.availableFluidHeightRanges=Array.from(new Set(t)),this.isResponsiveAd()&&(this.previousWindowWidth=(0,E.fM)(),this.previousWindowHeight=(0,E.gp)(),this.availableWidthRanges=this.props.sizeMapping.map((e=>e.width)),window.addEventListener("resize",this.onResizeDebounced)),this.updateContainerHeight((0,E.gp)(),this.props.sizeMapping,this.availableHeightRanges),window.addEventListener("scroll",this.onScrollThrottled),this.initialize(this.props),window.addEventListener("blur",this.adClickEventListener)}shouldComponentUpdate(e,t){return e.path!==this.props.path||this.state.isDirectAd!==t.isDirectAd||this.state.containerHeight!==t.containerHeight||this.state.isEmptySlot!==t.isEmptySlot||this.props.adBlockerDetected!==e.adBlockerDetected||this.props.adConfigPpid!==e.adConfigPpid||this.props.me!==e.me||this.props.adConfigNextRefresh!==e.adConfigNextRefresh||this.props.adConfigIsLoading!==e.adConfigIsLoading||!this.props.shouldHoldRefreshing&&!A(this.props.targeting,e.targeting)}componentDidUpdate(e){const{adConfigNextRefresh:t,getAdConfigRequest:i,me:s,targeting:n}=this.props,{adConfigNextRefresh:o,me:a,targeting:r}=e,d=s?.id!==a?.id,l=t!==o,h=!A(n,r)||l;l&&(H.adConfig.isInitiated=!1),d&&H.fetchAdConfig((()=>i({forceFetch:!0}))),h&&this.update(this.props),(e.path!==this.props.path||this.props.adBlockerDetected!==e.adBlockerDetected||this.props.adConfigPpid!==e.adConfigPpid||this.props.me!==e.me||this.props.adConfigNextRefresh!==e.adConfigNextRefresh||this.props.adConfigIsLoading!==e.adConfigIsLoading)&&this.initialize(this.props)}componentWillUnmount(){this.isResponsiveAd()&&window.removeEventListener("resize",this.onResizeDebounced),window.removeEventListener("scroll",this.onScrollThrottled),H.adManager.execute((e=>{e&&Object.keys(this.listeners).forEach((t=>{const i=this.listeners[t];i&&e.pubads().removeEventListener(t,i)}))})),window.removeEventListener("blur",this.adClickEventListener),this.destroySlot()}render(){const{adBlockerDetected:e,className:t="",isNative:i,isFullWidthBanner:s=!1,routerLocation:o}=this.props,a=(0,E.bG)(o);if(e||a)return null;const{isEmptySlot:r}=this.state;if(i){const e=n()(I,{[t]:!r,D_agv:"nofill"===r});return this.renderNativeAd({containerClassName:e})}const d=n()("D_agr",t,{[k]:"nofill"===r});return s?this.renderFullWidthAd({containerClassName:n()(t,{[k]:"nofill"===r})}):this.renderBannnerAd({containerClassName:d})}renderFullWidthAd({containerClassName:e}){let t="",i="";const s=!this.state.isDirectAd;let o=this.state.containerHeight?{height:this.state.containerHeight}:{};return this.state.isDirectAd?(t=n()(e,"D_ago"),i=n()(I,"D_agp","D_agq")):(this.state.containerHeight&&(o={display:"flex",flexDirection:"column",height:this.state.containerHeight,justifyContent:"bottom"===this.props.adTagPlacement?"flex-end":"flex-start",paddingBottom:"bottom"===this.props.adTagPlacement?"5px":"0"}),t=e),this.renderBannnerAd({adClassName:i,containerClassName:t,containerStyle:o,showAdTag:s})}renderNativeAd({containerClassName:e}){const{id:t}=this.props,{isEmptySlot:i}=this.state;return(0,D.jsx)("div",{className:e,id:t,ref:e=>this.adUnitContainer={element:e,id:t,isEmptySlot:i},children:this.props.children})}renderBannnerAd({adClassName:e=I,containerClassName:t,containerStyle:i={},showAdTag:s=!0}){const{adStyles:o={},adTagPlacement:a="top",id:r,labelColor:d}=this.props,{isEmptySlot:l}=this.state,h=()=>{const e=this.context;return s?(0,D.jsx)("div",{className:n()(_,{D_agt:this.props.isFullWidthBanner}),id:`${r}-label`,children:(0,D.jsx)(p.Z,{className:_,color:d||e.urbanGrey60,size:"s",children:(0,D.jsx)(u.Z,{id:(0,b.ZP)("Advertisement")})})}):null};return(0,D.jsxs)("div",{id:`${r}-container`,className:t,ref:e=>this.adUnitContainer={element:e,id:r,isEmptySlot:l},style:i,children:["top"===a?h():null,(0,D.jsx)("div",{className:e,id:r,style:o,children:this.props.children}),"bottom"===a?h():null]})}detectAdBlocker(){const{adBlockerSetStatusAction:e,trackBatchedEvent:t}=this.props;H.adManager.adBlockedPaths&&-1===H.adManager.adBlockedPaths.indexOf(location.pathname)&&H.adManager.detectAdBlocker(location.pathname,(()=>{t({name:"ad_blocker_enabled",properties:{url:location.pathname},type:"action"}),e({adBlockerDetected:!0})}))}initialize(e){this.defineSlot(e),this.configureSlot(e),this.displaySlot(e),this.clearSlot(),this.refreshSlot()}update(e){this.configureSlot(e),this.clearSlot(),this.refreshSlot()}refreshSlot(){H.adManager.execute((e=>{e&&this.adSlot&&e.pubads().refresh([this.adSlot])}))}trackNoFillInViewport(){if(this.adUnitContainer&&this.state.adRequestId){const{element:e,isEmptySlot:t}=this.adUnitContainer;if(e){const{top:i=0,bottom:s=0}=e.getBoundingClientRect();!(i>=0&&(0!==i||0!==s)&&i<=window.innerHeight)||t&&"nofill"!==t||this.trackNoFillInViewportCalled||(this.trackNoFillInViewportCalled=!0,this.onTrackEvent("external_ad_slot_visible_impression",this.responseInfo))}}}adsTracking(){H.adManager.execute((e=>{e&&(this.listeners.slotRequested&&e.pubads().removeEventListener("slotRequested",this.listeners.slotRequested),this.listeners.slotRequested=this.slotRequestListener(),e.pubads().addEventListener("slotRequested",this.listeners.slotRequested),this.listeners.slotResponseReceived&&e.pubads().removeEventListener("slotResponseReceived",this.listeners.slotResponseReceived),this.listeners.slotResponseReceived=this.slotResponseReceivedListener(),e.pubads().addEventListener("slotResponseReceived",this.listeners.slotResponseReceived),this.listeners.slotRenderEnded&&e.pubads().removeEventListener("slotRenderEnded",this.listeners.slotRenderEnded),this.listeners.slotRenderEnded=this.slotRenderEndedListener(),e.pubads().addEventListener("slotRenderEnded",this.listeners.slotRenderEnded),this.listeners.slotOnload&&e.pubads().removeEventListener("slotOnload",this.listeners.slotOnload),this.listeners.slotOnload=this.slotOnloadListener(),e.pubads().addEventListener("slotOnload",this.listeners.slotOnload),this.listeners.impressionViewable&&e.pubads().removeEventListener("impressionViewable",this.listeners.impressionViewable),this.listeners.impressionViewable=this.impressionViewableListener(),e.pubads().addEventListener("impressionViewable",this.listeners.impressionViewable),this.listeners.slotVisibilityChanged&&e.pubads().removeEventListener("slotVisibilityChanged",this.listeners.slotVisibilityChanged),this.listeners.slotVisibilityChanged=this.slotVisibilityChangedListener(),e.pubads().addEventListener("slotVisibilityChanged",this.listeners.slotVisibilityChanged))}))}defineSlot(e){H.adManager.execute((t=>{if(!t)return;const{adConfigIsLoading:i,adConfigPpid:s,adConfigNextRefresh:n,getAdConfigRequest:o,id:a,me:r,path:d,sizes:l}=e,h=[];if(i)return;if(!n||n<Date.now())return void H.fetchAdConfig(o);s&&r&&t.pubads().setPublisherProvidedId(s);const c=t.defineSlot(d,l,a);c&&(this.adSlot=c,h.push(this.adSlot),window?.tercept?.setTargeting?window.tercept.setTargeting(h):h.forEach((e=>e.setTargeting("tcpt",["TCPT_NL"]))),this.adsTracking())}))}configureSlot(e){H.adManager.execute((t=>{if(!t)return;const{sizeMapping:i,targeting:s,ancestorCollections:n}=e;if(this.adSlot){this.adSlot.defineSizeMapping(i.reduce(((e,t)=>e.addSize([t.width,t.height??0],t.slot)),t.sizeMapping()).build());for(const e in s)this.adSlot.setTargeting(e,`${s[e].replace(x,"")}`);n?.length&&this.adSlot.setTargeting("parentCategoryID",n[0].cc_id||-1),this.adSlot.setTargeting("sitetype","pwa"),this.adSlot.addService(t.pubads())}}))}displaySlot(e){H.adManager.execute((t=>{if(!t)return;const{id:i}=e;t.display(i)}))}clearSlot(){H.adManager.execute((e=>{e&&this.adSlot&&e.pubads().clear([this.adSlot])}))}destroySlot(){H.adManager.execute((e=>{e&&this.adSlot&&(e.destroySlots([this.adSlot]),this.adSlot=null)}))}getSlotSize(){const{sizeMapping:e}=this.props;return e[0].slot}isResponsiveAd(){const{sizeMapping:e,fluidSizeMapping:t=[]}=this.props;return e?.length>1||t?.length>1}}H.adManager=void 0,H.defaultProps={adStyles:{},adTagPlacement:"top",fluidSizeMapping:[],isNative:!1,targeting:{}},H.contextType=g.WE,H.adConfig={isInitiated:!1};const z=(0,h.$j)((function(e,t){const{targeting:i}=t,s=(0,y.R9)(e),n=i?.categoryIds?s[i.categoryIds]:null;return{adBlockerDetected:(0,C.Cr)(e),adConfigIsLoading:(0,w.uk)(e),adConfigNextRefresh:(0,w.pH)(e),adConfigPpid:(0,w.KZ)(e),adUnitFillStatuses:(0,C.rF)(e),ancestorCollections:n?(0,y.$k)(e,{collectionID:parseInt(n,10)}):null,ccIDToID:(0,y.R9)(e),me:(0,f.XM)(e),routerLocation:(0,m.Xt)(e)}}),(function(e,t){return(0,c.DE)({adBlockerSetStatusAction:C.zI,adUnitSetFillStatusAction:C.I_,getAdConfigRequest:w.sV,trackBatchedEvent:S.Vh},e)}))(H)},800:(e,t,i)=>{i.d(t,{dq:()=>k,sV:()=>w,y7:()=>E,nT:()=>L,uk:()=>I,pH:()=>_,KZ:()=>R,V:()=>A});var s=i(6),n=i(67),o=i(4),a=i(8),r=i(11),d=i(5),l=i(15),h=i(7),c=i(817);const p="AdConfig",g=36e5,u=5e3,f=e=>{if(!(e&&(t=e,t&&t.adSlotMap&&Array.isArray(t.adSlotMap))))return[];var t;const{adSlotMap:i}=e;return i.map((e=>{const t=e.adProcurementConfig,i=e.pagePositioningMapping?.[0],s=t.adUnitName;let n=null;const o={},a={},r=t.slotSizes.map((e=>{const t=e.screenSize,i=function(e){return!!e.preDefinedSize&&!!e.screenSize}(e)?e.preDefinedSize:void 0,s=function(e){return!!e.customSize&&!!e.screenSize}(e)?e.customSize:void 0,r=function(e){return!!e.customNativeSize&&!!e.screenSize}(e)?e.customNativeSize:void 0;if(t){const{adHeight:e,height:n,width:r}=t,d=`${r}-${n}`;i?(o[d]||(o[d]={adHeight:e,height:n,slot:[],width:r}),o[d].slot.push([i.width,i.height])):s&&(a[d]||(a[d]={adHeight:0,height:n,width:r}),a[d].adHeight=e||0)}return n=n||i?.slotType||r?.slotType||s?.slotType||null,i?[i.width,i.height]:s?s.customSize:[]}));o["0-0"]||(o["0-0"]={height:0,slot:[],width:0});const d=Object.values(o),l=Object.values(a);l.length&&d.forEach((e=>e.slot.push("fluid")));const h=i?.positionSlotSpans?.map((e=>e.startingSlotNumber))||[];return{adUnit:s,fluidSizeMapping:l,isDefault:!!i?.isDefault,isSticky:!!t?.isSticky,maxSlotNumber:i?.maxSlotNumber,pageNumber:i?.pageNumber,positionSlotSpans:i?.positionSlotSpans,slotPositions:h,slotSizeMapping:d,slotSizes:r,slotType:n}}))},m={browse:[],hasFailed:!1,hasFetched:!1,homeScreenExternal:[],hpbb:[],inbox:[],isLoading:!1,listingDetailExternal:[],nextRefresh:Date.now(),ppid:null,profile:[],search:[]},S=(0,s.oM)({initialState:m,name:p,reducers:{getAdConfigFailure(e,t){e.isLoading=!1,e.nextRefresh=t.payload.nextRefresh,e.hasFailed=!0},getAdConfigPending(e){e.isLoading=!0},getAdConfigSuccess(e,t){Object.assign(e,t.payload),e.hasFetched=!0}}});d.Z.register(p,S.reducer);const{getAdConfigSuccess:v,getAdConfigPending:b,getAdConfigFailure:y}=S.actions,w=(0,s.PH)(`${p}/getAdConfigRequest`,(function(e){return{payload:{forceFetch:!!e?.forceFetch}}}));function*C(){yield(0,o.gz)(b());try{const{data:e}=yield(0,o.RE)(r.v_,"ad-config",{path:"/ads/1.0/ad-config/"});yield(0,o.gz)(function({browseConfig:e,homeScreenExternalConfig:t,hpbbAdConfig:i,listingDetailExternalConfig:s,ppid:n,profileConfig:o,searchConfig:a,inboxAdConfig:r}){const d=(e||[]).map((e=>f(e))),l=f(t),h=f({adSlotMap:s}),c=f(o),p=(a||[]).map((e=>f(e))),u=f(r),m={browse:d,hasFailed:!1,hasFetched:!0,homeScreenExternal:l,hpbb:f(i),inbox:u,isLoading:!1,listingDetailExternal:h,nextRefresh:Date.now()+g,ppid:n,profile:c,search:p};return v(m)}(e))}catch(e){yield(0,o.gz)(y({nextRefresh:Date.now()+u}))}}function*E(e){const t=yield(0,o.Ys)(_),i=yield(0,o.Ys)(I);(yield(0,o.Ys)(a.Tv))||i||t&&t>Date.now()&&!e.payload.forceFetch||(yield(0,o.rM)(C))}function R(e){return e[p]?.ppid}function I(e){return e[p].isLoading}function _(e){return e[p]?.nextRefresh}S.reducer,h.Z.register(p,(function*(){yield(0,o.A7)(w.type,E)}));const k="PLACEHOLDER_AD_UNIT",D={adSlots:[{adUnit:k,isDefault:!1,isSticky:!1,slotSizeMapping:[{height:0,slot:[],width:0}],slotSizes:[],slotType:"UNKNOWN_SLOT_TYPE"}]},x={adSlots:[],defaultAdSlot:void 0},A=(0,n.P1)([function(e,t){return t},function(e,t,i){return i},function(e){return e[p]},l.Xt],((e,t,i,s)=>{const n=!(0,c.bG)(s);if(i){const s="browse"===e||"search"===e?i[e]?.[0]:i[e];if(!s?.length&&!i.hasFetched)return D;if(!n)return x;const o=s?.filter((e=>e.slotType===t))||[],a=o.find((e=>e.isDefault));return{adSlots:o,defaultAdSlot:a}}return x}),{memoizeOptions:{maxSize:10}}),L=e=>e[p].hasFailed},823:(e,t,i)=>{i.d(t,{zI:()=>r,I_:()=>d,Cr:()=>h,rF:()=>l});var s=i(6),n=i(5);const o="AdUnit",a=(0,s.oM)({initialState:{adBlockerDetected:!1,adUnitFillStatuses:[]},name:o,reducers:{adBlockerSetStatus(e,t){e.adBlockerDetected=t.payload.adBlockerDetected},adUnitSetFillStatus(e,t){const{payload:{adUnitFillStatus:i}}=t,{adUnitFillStatuses:s}=e,n=s.find((e=>e.adUnitId===i.adUnitId&&e.adIndex===i.adIndex));n?Object.assign(n,i):e.adUnitFillStatuses.push(i)}}});n.Z.register(o,a.reducer),a.reducer;const{adBlockerSetStatus:r,adUnitSetFillStatus:d}=a.actions;function l(e){return e[o]?.adUnitFillStatuses??[]}function h(e){return!!e[o]?.adBlockerDetected}},817:(e,t,i)=>{i.d(t,{a3:()=>n,bG:()=>o,ce:()=>l,fM:()=>a,gp:()=>r,k:()=>d,tL:()=>h});var s=i(779);function n(e,t,i){const n={};if(e){switch(n.userid=e.id.toString(),e.attributes?.gender?.name??e.profile?.gender??void 0){case"M":n.gender="male";break;case"F":n.gender="female";break;case"NB":n.gender="Non-binary";break;case"PNS":n.gender="Prefer not to say";break;case"C":n.gender=e.attributes?.gender.value}const t=e.profile?.birthday??void 0;t&&(n.age=(0,s.Fw)(new Date(t)).toString())}if(t&&(n.categoryIds=t),i){const e=i.toString();n.searchTerms=e.trim(),n.csaSearchTerms=e}return n}function o(e){return!(!e||!e.pathname?.match(/"|'/g)&&!e.search?.match(/"|'/g))}const a=()=>window.innerWidth||document.documentElement?.clientWidth||document.body?.clientWidth||0,r=()=>"undefined"!=typeof window&&(window.innerHeight||document.documentElement?.clientHeight||document.body?.clientHeight)||0;function d(e){const t=r();if(t&&e){const i=[...e].filter((e=>t>=(e.height||0))).sort(((e,t)=>(t?.height||0)-(e?.height||0)))[0],s=i?.adHeight;if(s)return Number(s)}return 0}function l(e){if(e){const t=e.map((e=>e.adHeight||0));return Math.max(...t)}return 0}function h(e){if(e){const t=e.map((e=>e.adHeight||0));return Math.min(...t)}return 0}}}]);
|
|
//# sourceMappingURL=https://mdev.llesuorac.com/01857052a1fbff6c7926249973b6164fd2b19d8b/f17e4fbcfe7314b1.min.js.map
|
|
//# debugId=c6220d0e-210a-5f63-9ed6-6d3aefb6350d
|