Files
004_comission/_utils/_comment_backup/louis coding's Reviews on Carousell Hong Kong_files/a11b7c46979d890e.min.js.download
louiscklaw 6c60a73f30 update,
2025-01-31 19:15:17 +08:00

6 lines
48 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]="b80d2248-5a60-5f72-b488-26690b9f20f5")}catch(e){}}();
(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[31],{801:(e,s,t)=>{t.d(s,{Z:()=>d});var r=t(9),i=t.n(r),n=(t(0),t(10)),l=t(399),a=t(21),o=t(18),c=t(1);const d=function(e){const{url:s,className:t="",doNotLazyLoadImage:r=!1,badgeUrl:d,onImageLoad:u,size:g}=e,p=(0,n.v9)(a.l$),h=i()(t,"D_pm",{D_pp:"XXXS"===g,D_pq:"XXS"===g,D_pr:"XS"===g,D_ps:"S"===g,D_pt:"M"===g,D_pu:"L"===g,D_pv:"XL"===g}),m=i()("D_pn",{D_pw:"XXXS"===g,D_px:"XXS"===g,D_py:"XS"===g,D_pz:"S"===g,D_p_:"M"===g,D_pA:"L"===g,D_pB:"XL"===g});return(0,c.jsxs)("div",{className:"D_pl",children:[(0,c.jsx)(l.Z,{alt:p((0,o.ZP)("Avatar")),className:h,doNotLazyLoad:r,forceSquare:!0,loadingClassName:"D_po",onImageLoad:u,src:s}),d?(0,c.jsx)(l.Z,{className:m,src:d}):null]})}},919:(e,s,t)=>{t.d(s,{Z:()=>o});var r=t(9),i=t.n(r),n=(t(0),t(72)),l=t(101),a=t(1);const o=function(e){const s=(0,l.Fg)(),{className:t="",color:r=s.BackgroundDisplay,icon:o,size:c="s",text:d,textClassName:u}=e,g=i()("D_GZ",t,{D_Ha:!o,D_Hb:!!o});let p;switch(r){case s.BrandingCertified:case s.BackgroundPriority:case s.BrandingSpotlight:case s.BackgroundInteractive:p=s.ContentOnDark;break;case s.BackgroundDisplay:p=s.ContentSecondary}return(0,a.jsxs)("div",{className:g,style:{background:r},children:[o,(0,a.jsx)(n.Z,{className:u,colorToken:p,size:c,children:d})]})}},905:(e,s,t)=>{t.d(s,{Z:()=>u});var r=t(9),i=t.n(r),n=t(0),l=t(397),a=t(17),o=t(18),c=t(1);const d=(e,s)=>{const{autoPlay:r=!1,className:d="",videoClassName:u="",controls:g=!0,forceSquare:p,loop:h=!1,muted:m,onClick:_,poster:f,videoUrl:x,id:y}=e,C=(0,n.useRef)(null),D=s||C,v=e=>Boolean(e?.canPlayType("application/vnd.apple.mpegurl")),[b,N]=(0,n.useState)(v(D.current));(0,n.useEffect)((()=>{N(v(D.current))}),[D]);const j=(0,n.useMemo)((()=>(0,a.iH)(x)),[x]);return(0,n.useEffect)((()=>{const e=D.current;e&&(e.muted=m||!1)}),[m,D]),(0,n.useEffect)((()=>{if(j)return;let e;return t.e(431).then(t.t.bind(t,1005,23)).then((s=>{if(s.default.isSupported()){const t=D.current?D.current:null;e=new s.default,e.loadSource(x),e.attachMedia(t)}})),()=>{e&&e.destroy()}}),[D,x,j]),(0,c.jsx)("div",{className:i()(d,{D_awP:p}),id:y,children:j?(0,c.jsx)("iframe",{className:`D_awQ ${u}`,height:"100%",src:`https://www.youtube.com/embed/${j}?autoplay=${r?1:0}&controls=${g?1:0}&loop=${h?1:0}&muted=${m?1:0}`,title:j,width:"100%"}):(0,c.jsxs)("video",{autoPlay:r,className:`D_awO ${u}`,controls:g,loop:h,onClick:_||void 0,playsInline:r&&m,poster:f,ref:D,children:[b&&(0,c.jsx)("source",{src:x,type:"application/vnd.apple.mpegurl"}),(0,c.jsx)(l.Z,{id:(0,o.ZP)("Your browser does not support HTML5 video.")})]})})},u=(0,n.forwardRef)(d)},833:(e,s,t)=>{t.d(s,{Z:()=>d});var r=t(9),i=t.n(r),n=t(0),l=t(99),a=t(734),o=t(398),c=t(1);const d=(0,n.forwardRef)((function(e,s){const t=(0,l._x)(),{className:r,isEnabled:n,isVisible:d,subtext:u,text:g,textClassName:p,...h}=e,m=i()("D_sT",{D_sU:!d},r);let _=t.white;switch(h.type){case"linkRed":_=t.carouRed80;break;case"linkGrey":case"outline":_=t.urbanGrey90;break;case"linkTeal":_=t.skyTeal80}return(0,c.jsxs)(o.Z,{ref:s,className:m,disabled:!n,...h,children:[(0,c.jsx)(a.Z,{className:p,color:_,weight:"semibold",...g}),(0,c.jsx)(a.Z,{className:i()("D_sV",p),color:_,weight:"semibold",...u})]})}))},734:(e,s,t)=>{t.d(s,{Z:()=>c});var r=t(9),i=t.n(r),n=(t(0),t(72)),l=t(101),a=t(750),o=t(1);const c=function(e){const{className:s,template:t,isStrikedthrough:r,attributes:c,iconClassName:d="",icons:u="block",...g}=e,p=i()("D_tb",s),h=(0,l.Fg)();if(!t)return null;const m=i()("block"===u?"D_tc":"D_te",d),_=(0,a.V)({attributes:c,iconClassNames:m,template:t,theme:h});return(0,o.jsx)(n.Z,{className:p,decoration:r?"strikethrough":"none",...g,children:_})}},2439:(e,s,t)=>{t.d(s,{Z:()=>n}),t(0);var r=t(99),i=t(1);const n=e=>{const s=(0,r._x)(),{className:t=""}=e,n={skyTeal80:s.skyTeal80,urbanGrey60:s.urbanGrey60}[e.color];return(0,i.jsx)("svg",{className:t,fill:"none",height:"16",viewBox:"0 0 16 16",width:"16",xmlns:"http://www.w3.org/2000/svg",children:(0,i.jsx)("path",{clipRule:"evenodd",d:"M11.6464 9.64645L10 11.2929L4.70711 6L6.35355 4.35355C6.54882 4.15829 6.54882 3.84171 6.35355 3.64645L3.35355 0.646447C3.15829 0.451184 2.84171 0.451184 2.64645 0.646447L0.646447 2.64645C0.552678 2.74021 0.5 2.86739 0.5 3C0.5 9.90314 6.09686 15.5 13 15.5C13.1326 15.5 13.2598 15.4473 13.3536 15.3536L15.3536 13.3536C15.5488 13.1583 15.5488 12.8417 15.3536 12.6464L12.3536 9.64645C12.1583 9.45118 11.8417 9.45118 11.6464 9.64645ZM10.3536 12.3536L12 10.7071L14.2929 13L12.7947 14.4982C6.60683 14.3899 1.61015 9.39317 1.5018 3.20531L3 1.70711L5.29289 4L3.64645 5.64645C3.45118 5.84171 3.45118 6.15829 3.64645 6.35355L9.64645 12.3536C9.84171 12.5488 10.1583 12.5488 10.3536 12.3536Z",fill:n,fillRule:"evenodd"})})}},1023:(e,s,t)=>{t.d(s,{Z:()=>a});var r=t(9),i=t.n(r),n=(t(0),"D_awR"),l=t(1);function a({className:e,size:s=32}){return(0,l.jsx)("div",{className:i()(e,n),style:{height:`${s}px`,width:`${s}px`},children:(0,l.jsx)("svg",{style:{height:.75*s+"px",width:.75*s+"px"},viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M19.75 10.701c1 .5773 1 2.0207 0 2.598l-10.5 6.0622c-1 .5774-2.25-.1443-2.25-1.299V5.93782c0-1.1547 1.25-1.87639 2.25-1.29904l10.5 6.06222z",fill:"#fff"})})})}},1502:(e,s,t)=>{t.d(s,{Z:()=>l});var r=t(0),i=t(2428),n=t(1);const l=({children:e,className:s,onImpressionCreate:t,root:l,rootMargin:a})=>{const o=(0,r.useRef)(null),[c,d]=(0,r.useState)(null),[u,g]=(0,r.useState)(!1);return(0,r.useEffect)((()=>{d("string"==typeof l?document.querySelector(l):l)}),[l]),(0,r.useEffect)((()=>()=>{null!=o.current&&clearTimeout(o.current)}),[]),(0,n.jsx)(i.df,{onChange:(e,s)=>{s.isIntersecting&&s.intersectionRatio>=.5?o.current=setTimeout((()=>{g(!0),t()}),1e3):null!=o.current&&clearTimeout(o.current)},className:s,root:c,rootMargin:a,threshold:.5,skip:u,children:e})}},774:(e,s,t)=>{t.d(s,{Z:()=>l});var r=t(0),i=t(2428),n=t(1);const l=({className:e,children:s,placeholder:t,root:l,rootMargin:a,threshold:o})=>{const[c,d]=(0,r.useState)(!1),[u,g]=(0,r.useState)(null);return(0,r.useEffect)((()=>{g("string"==typeof l?document.querySelector(l):l)}),[l]),(0,n.jsx)(i.df,{className:e,root:u,rootMargin:a,threshold:o,onChange:(e,s)=>{d(e)},triggerOnce:!0,children:c?s:t||(0,n.jsx)("div",{})})}},904:(e,s,t)=>{t.d(s,{Z:()=>Le});var r=t(9),i=t.n(r),n=t(0),l=t(2428),a=t(10),o=t(66),c=t(738),d=t(801),u=t(919),g=t(398),p=t(40),h=t(405),m=t(407),_=t(746),f=t(72),x=t(99),y=t(1313),C=t(832),D=t(397),v=t(8),b=t(16),N=t(12),j=t(21),L=t(15),w=t(53),S=t(33),k=t(403),I=t(404),T=t(178),P=t(101),Z=t(2440),E=t(70),R=t(17),M=t(888),z=t(779),A=t(18),O=t(106),F=t(110),B=t(735),G=t(1022),$=t(1055),U=t(1314),H=t(432),q=t(833),V=t(751),W=t(879),X=t(2439),Y=t(1);const K=e=>{const s=(0,x._x)(),{className:t=""}=e,r={skyTeal80:s.skyTeal80,urbanGrey60:s.urbanGrey60}[e.color];return(0,Y.jsx)("svg",{className:t,height:"16",viewBox:"0 0 24 24",width:"16",xmlns:"http://www.w3.org/2000/svg",children:(0,Y.jsx)("path",{d:"M8.447 13.894A1 1 0 0 1 7 13V3a3 3 0 0 1 3-3h10a3 3 0 0 1 3 3v6a3 3 0 0 1-3 3h-7.764l-3.789 1.894zm3.106-3.788A1 1 0 0 1 12 10h8a1 1 0 0 0 1-1V3a1 1 0 0 0-1-1H10a1 1 0 0 0-1 1v8.382l2.553-1.276zM5 2a1 1 0 1 1 0 2H3a1 1 0 0 0-1 1v16a1 1 0 0 0 1 1h11a1 1 0 0 0 1-1v-7a1 1 0 0 1 2 0v7a3 3 0 0 1-3 3H3a3 3 0 0 1-3-3V5a3 3 0 0 1 3-3h2z",fill:r})})},J=function(e){const s=(0,x._x)(),{className:t,color:r="urbanGrey60",size:i=24}=e;let n;return n="skyTeal80"===r?s.skyTeal80:s.urbanGrey60,(0,Y.jsx)("svg",{className:t,height:i,viewBox:"0 0 24 24",width:i,xmlns:"http://www.w3.org/2000/svg",children:(0,Y.jsx)("path",{d:"M19.8 8H16a1 1 0 0 1 0-2h6a1 1 0 0 1 1 1v6a1 1 0 0 1-2 0V9.6l-7.3 8a1 1 0 0 1-1.4.1L7 12.4l-4.3 4.3a1 1 0 1 1-1.4-1.4l5-5a1 1 0 0 1 1.4 0l5.3 5.2L19.8 8z",fill:n})})};var Q=t(1502),ee=t(774),se=t(1503),te=t(840),re=t(724),ie=t(113),ne=t(843),le=t(784),ae=t(411),oe="D_vg",ce="D_vf",de="D_v_",ue="D_vT",ge="D_wj",pe="D_wh",he="D_vR",me="D_vE",_e="D_vo",fe="D_vJ",xe="D_vy",ye="D_vj",Ce="D_vk",De="D_vl",ve="D_wn";const be=t(1938);var Ne=function(e){return e.NORMAL="NORMAL",e.PROPERTY="PROPERTY",e.CARS="CARS",e.PAYABLE="PAYABLE",e.AUTHENTICATED="AUTHENTICATED",e.INSPECTED="INSPECTED",e.C2C="C2C",e.ESSENTIAL="ESSENTIAL",e.RECOMMERCE="RECOMMERCE",e.CERTIFIED_PRODUCT="CERTIFIED_PRODUCT",e}(Ne||{});class je extends n.PureComponent{constructor(e){super(e),this.ellipsisRef=void 0,this.onEllipsisClick=e=>{e.preventDefault();const{listing:s,trackBatchedEvent:t}=this.props;s?.id&&t({name:"more_options_tapped",properties:{context:"browse_cell",product_id:s.id,referrer:"category_homescreen"},type:"action"}),this.setState({showPopover:!0})},this.onImpressionCreate=()=>{const{listingCard:e,onImpressionCreate:s}=this.props;if(null!=e&&null!=e.promoted){const s=e.promoted.trackingData.trackingUrls.impressions[0];this.trackPromotedListing(s)}s&&e&&s(e)},this.onLikeButtonClick=e=>{e.preventDefault();const{listingCardLike:s,listingCard:t,location:r,onListingLikeClick:i,requestID:n,index:l}=this.props;if(null!=t){const e=r?.pathname??"";let i;(0,R.eg)(e)?i="for_you_page":(0,R.vL)(e)&&(i="homepage");const l={context:"browse_cell",referrer:"category_homescreen"};n&&(l.referrer_request_id=n),i&&(l.source=i),s({listingID:t.listingID,trackingData:l})}null!=i&&i(l)},this.onListingLinkClick=()=>{const{listingCard:e,onListingClick:s,index:t}=this.props;if(null!=s&&s(t),null!=e&&null!=e.promoted){const s=e.promoted.trackingData.trackingUrls.clicks[0];this.trackPromotedListing(s)}},this.onPopoverHide=()=>{this.setState({showPopover:!1})},this.onPublishClick=()=>{const{onPublishClick:e,index:s}=this.props;e&&e(s)},this.onReportListingClick=()=>{const{listingCard:e,reportListingModalSetListingID:s,reportListingModalShow:t,trackBatchedEvent:r,trackingData:i}=this.props;null!=e&&(s({listingID:e.listingID}),r({name:"report_listing_button_tapped",properties:{reported_product_id:`${e.listingID}`,source:"report_listing"},type:"action"}),i?.referrer&&"category_homescreen"===i.referrer&&r({name:"listing_reported",properties:{context:"browse_cell",product_id:`${e.listingID}`,referrer:i.referrer},type:"action"})),t()},this.onSellerProfileClick=()=>{const{listing:e,trackBatchedEvent:s,trackingData:t}=this.props;if(null==e)return void Sentry.captureMessage("ListingCard seller profile click but no listing");const{id:r,seller:i}=e;s({name:"seller_profile_tapped",properties:{context:"browse_cell",product_id:r,seller_id:i.id,...t},type:"action"})},this.onShowListingInsightsModal=()=>{const{isDesktop:e,listing:s,listingCard:t,listingPromotionsListInit:r,listingStatsInsightsModalShow:i}=this.props;s&&t&&(r({listingCard:t,sellerToolsTrackingSource:"listing_insight",sellerToolsTrackingUuid:(0,E.z)(8)}),i({isDesktop:e,listingID:s.id,listingInsightsBack:"DEFAULT"}))},this.onClickChatCTA=()=>{const{listing:e,listingCardGalleryChatCTA:s}=this.props;e&&s({listingID:e.id})},this.onObserve=(e,s)=>{const{onListingCardObserved:t,listingCard:r}=this.props;t&&r&&t(r,e,s)},this.renderAttribute=(e,s,t)=>this.isStringAttribute(e)?this.renderStringAttribute(e,s,t):this.renderTimeAttribute(e,s,t),this.isStringAttribute=e=>void 0!==e.stringContent,this.getListingTitleFromListingCard=e=>{const s=e.belowFold.find((e=>"header_1"===e.component));let t;return s&&this.isStringAttribute(s)&&(t=s),t?t.stringContent:""},this.state={showPopover:!1},this.ellipsisRef=(0,n.createRef)()}render(){const{className:e="",hideGalleryFooter:s,isDesktop:t,isGallery:r,listing:n,listingCard:a,isListingClickable:o=!0,reqSessionId:d,showSeller:u=!0,isHorizontalLayout:g,openListingInNewTab:p,isBot:h,forceToReferIsSellerVisible:_=!1}=this.props;if(null==a||null==n){let s=u;return _&&(s=!!a?.isSellerVisible),(0,Y.jsx)(te.Z,{className:e,showSeller:s})}if(h)return(0,Y.jsx)(y.ZP,{...this.props});const f=(0,F.O8)(a),x=null!=a.listingID?(0,R.Wm)(f,a.listingID):"",C=this.generatePageListingTrackingData(),D=(0,Y.jsxs)(Y.Fragment,{children:[this.renderThumbnail(n,a),r?this.renderGalleryDetails(n,a):a.belowFold.map(((e,s)=>this.renderAttribute(e,s,!1)))]}),v=a?.deepLink?.value?(0,R.QW)(a.deepLink.value):x,b=(0,ae.oA)(v,C,d),N=r?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)("div",{className:"D_vb",children:[o?p?(0,Y.jsx)(c.Z,{onClick:this.onListingLinkClick,target:"_blank",to:b,children:D}):(0,Y.jsx)(m.Z,{onClick:this.onListingLinkClick,to:b,children:D}):D,!s&&(0,Y.jsxs)("div",{className:"D_wf",children:[this.renderSeller(n,a),(0,Y.jsx)("div",{className:"D_wg",children:this.renderGalleryCTAs(n,a)})]})]}),this.renderPopover()]}):(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)("div",{className:"D_va",children:[this.renderSeller(n,a),o?p?(0,Y.jsx)(c.Z,{onClick:this.onListingLinkClick,target:"_blank",to:b,children:D}):(0,Y.jsx)(m.Z,{onClick:this.onListingLinkClick,to:b,children:D}):D]}),this.renderAction(n,a),this.renderPopover()]});return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(Q.Z,{className:i()(e,t&&be.card),onImpressionCreate:this.onImpressionCreate,children:(0,Y.jsx)(l.df,{as:"div","data-testid":(0,le.i)("LISTING_CARD_COMPONENT",[n.id]),onChange:this.props.onListingCardObserved&&a?this.onObserve:void 0,triggerOnce:!0,className:i()(r?"D_vL":"D_uZ",t&&r?be.galleryCardDesktop:""),children:N})}),!t&&r&&!g&&(0,Y.jsx)("div",{className:"D_vN"})]})}renderGalleryDetails(e,s){const{localizeText:t}=this.props,r=this.context;return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)("div",{className:"D_vO",children:[(0,Y.jsxs)("div",{className:"D_vP",children:[this.renderSpotlightedOrBumpedBadge(),(0,Y.jsx)(f.Z,{className:"D_vQ",inline:!0,showTooltip:!0,singleline:!0,size:"l",weight:"semibold",children:s.price}),s?.originalPrice?(0,Y.jsx)(f.Z,{ariaLabel:t((0,A.ZP)("Stricken Price: %{strickenPrice}"),{strickenPrice:s.originalPrice.value}),className:fe,decoration:"strikethrough",inline:!0,showTooltip:!0,singleline:!0,size:"xs",children:s.originalPrice.value}):null]}),this.renderAction(e,s)]}),(0,Y.jsx)("div",{children:(0,Y.jsx)(f.Z,{showTooltip:!0,singleline:!0,size:"m",children:s.title})}),s.attributes?.length&&(0,Y.jsx)("div",{className:"D_vW",children:s.attributes?.map(((e,i)=>(0,Y.jsxs)(n.Fragment,{children:[(0,Y.jsxs)("div",{className:"D_vY",children:[e.iconUrl?.value&&(0,Y.jsx)(h.Z,{alt:t(A.ZP`Image %{i}`),className:"D_vZ",cssHeight:p.spacing16,cssWidth:p.spacing16,src:e.iconUrl.value}),(0,Y.jsx)(f.Z,{colorToken:r.ContentSecondary,inline:!0,showTooltip:!0,singleline:!0,size:"s",children:e.content})]}),i+1!==s.attributes?.length&&(0,Y.jsx)(f.Z,{className:"D_vX",inline:!0,size:"s",children:"·"})]},i)))}),s.tags?.length&&(0,Y.jsx)(x.WE.Consumer,{children:e=>(0,Y.jsx)("div",{className:"D_wa",children:s.tags?.map(((s,t)=>{const r=(0,T.DM)(e)[s.backgroundColor||"urbangrey_20"],i=(0,T.DM)(e)[s?.fontColor||"urbangrey_80"];return(0,Y.jsx)("div",{className:"D_wb",style:{backgroundColor:r},children:(0,Y.jsxs)(f.Z,{className:"D_wc",color:i,inline:!0,size:"s",children:[s.iconUrl?.value&&(0,Y.jsx)(h.Z,{alt:"",ariaHidden:!0,className:"D_we",cssHeight:p.spacing16,cssWidth:p.spacing16,src:s.iconUrl.value}),s.content]})},t)}))})})]})}renderSeller(e,s){const{host:t,isListingClickable:r=!0,location:i,reqSessionId:n,showSeller:l=!0,isGallery:a,forceToReferIsSellerVisible:o=!1}=this.props;if(!(o?s?.isSellerVisible:l))return null;const{seller:c}=e,d=null!=i?`https://${t}${i.pathname}${i.search}`:"",u={};if((0,R.ip)(d))u.source="stuff_liked";else if((0,R.Uv)(d)){const e=/\/search\/([^\/\?]*)(\/)?/,s=d.match(e);if(null!=s){const e=s[1];""!==e&&(u.source="search_results",u.source_query=e)}}const g=a?this.renderGallerySellerDetails(e,s,c):this.renderSellerDetails(e,s,c),p=a?"D_wk":"D_vi";return(0,Y.jsx)(Y.Fragment,{children:r?(0,Y.jsx)(m.Z,{className:p,onClick:this.onSellerProfileClick,to:(0,ae.oA)((0,R.J$)(c.username),u,n),children:g}):(0,Y.jsx)("div",{className:p,children:g})})}renderSellerDetails(e,s,t){return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(ee.Z,{placeholder:(0,Y.jsx)("div",{className:`${ye} ${Ce}`}),children:(0,Y.jsx)(d.Z,{className:ye,size:"XS",url:e.seller.profile.image_url})}),(0,Y.jsxs)("div",{className:De,children:[(0,Y.jsx)(f.Z,{singleline:!0,size:"s",testId:re.ZT.LISTING_CARD_TEXT_SELLER_NAME,weight:"semibold",children:t.username}),s.aboveFold.map(((e,s)=>this.renderAttribute(e,s,!0)))]})]})}renderGallerySellerDetails(e,s,t){return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(ee.Z,{placeholder:(0,Y.jsx)("div",{className:`${ye} ${Ce}`}),children:(0,Y.jsx)(d.Z,{className:ye,size:"XS",url:e.seller.profile.image_url})}),(0,Y.jsxs)("div",{className:De,children:[(0,Y.jsx)(f.Z,{singleline:!0,size:"s",testId:re.ZT.LISTING_CARD_TEXT_SELLER_NAME,children:t.username}),s.aboveFold.map(((e,s)=>this.renderAttribute(e,s,!0)))]})]})}renderGalleryCTAs(e,s){const{isDesktop:t,trackBatchedEvent:r}=this.props;let n=s.ctaButtons;if(!n)return null;n=n.filter((e=>["chat","call","sms"].includes(e))),t&&(n=n.filter((e=>!["call","sms"].includes(e))));const l=n.length;return n.map(((t,n)=>{let a,o,d,u,p=!1;switch(t){case"chat":d=(0,A.ZP)("Chat"),o=(0,Y.jsx)(W.Z,{className:pe}),a=this.onClickChatCTA;break;case"sms":if(!s.seller.mobile)return null;o=(0,Y.jsx)(K,{className:pe,color:"urbanGrey60"}),u=`sms:${s.seller.mobile}`,d=(0,A.ZP)("SMS"),p=!0;break;case"call":if(!s.seller.mobile)return null;o=(0,Y.jsx)(X.Z,{className:pe,color:"urbanGrey60"}),u=`tel:${s.seller.mobile}`,d=(0,A.ZP)("Call"),p=!0;break;default:return null}const h=(0,Y.jsxs)(g.Z,{className:i()("D_wi",ge),onClick:s=>{r({name:"response_button_tapped",properties:{cta_type:t,product_id:`${e.id}`,source:"browse_cell"},type:"action"}),p&&r({name:"response_sent",properties:{product_id:`${e.id}`,response_type:t,source:"browse_cell"},type:"action"}),a&&a(s)},type:"outline",children:[1===l&&o,(0,Y.jsx)(D.Z,{id:d})]},n);return u?(0,Y.jsx)(c.Z,{className:ge,to:u,children:h}):h})).filter((e=>e))}renderThumbnail(e,s){const{isGallery:t,index:r}=this.props,{media:i,thumbnailURL:n}=s,l=e.title||this.getListingTitleFromListingCard(s),a=(0,Y.jsx)(se.ZP,{aspectRatio:t?"3:2":"1:1",media:i||[],index:r,showOneItemOnly:!t,thumbnailURL:n,title:l});return(0,Y.jsxs)("div",{className:t?"D_vM":"D_vm",children:[!t&&(0,Y.jsxs)(Y.Fragment,{children:[this.renderListingStatus(e,s),this.renderListingLabel(e,s),this.renderSpotlightedOrBumpedBadge()]}),a]})}renderTimeAttribute(e,s,t){const{dateNow:r}=this.props,{component:i,timestampContent:n}=e,l="active_bump"===i,a=l||"expired_bump"===i,o=this.context;return(0,Y.jsxs)("div",{className:"D_vt",children:[a?(0,Y.jsx)(V.Z,{className:"D_vv",color:l?o.BrandingBump:o.ContentSecondary}):null,n?.seconds?.low?(0,Y.jsx)(x.WE.Consumer,{children:e=>(0,Y.jsx)(f.Z,{className:"D_vu",color:l?e.skyTeal60:e.urbanGrey60,singleline:!0,size:t?"xs":"s",children:(0,Y.jsx)(C.Z,{dateSource:r||new Date,dateTarget:new Date(1e3*n.seconds.low)})})}):null]},s)}renderStringAttribute(e,s,t){const{isDesktop:r,listingCard:i,listingCardPayableFlag:l,listingCardTitleDescriptionEnabled:a,localizeText:o}=this.props;if("spotlight"===e.component){const e=this.context;return(0,Y.jsx)("div",{className:"D_wm",children:(0,Y.jsxs)("div",{className:"D_wl",children:[(0,Y.jsx)(k.Z,{fillColor:e.BrandingSpotlight,name:I.T.spotlight,size:20}),(0,Y.jsx)(x.WE.Consumer,{children:e=>(0,Y.jsx)(f.Z,{color:e.urbanGrey60,size:"s",children:(0,Y.jsx)(D.Z,{id:(0,A.ZP)("Spotlight")})})})]})},s)}if("inline_icon"===e.component)return null;if("header_1"===e.component){const t=this.context;return r&&a?(0,Y.jsx)(n.Fragment,{children:(0,Y.jsxs)(f.Z,{inline:"inline_icon"===i?.belowFold?.[0]?.component,maxLines:2,size:"s",weight:"regular",children:["inline_icon"===i?.belowFold?.[0]?.component?(0,Y.jsx)(k.Z,{className:ve,fillColor:t.BrandingSpotlight,name:I.T.spotlight,size:20},s):null,(0,M.Bn)(e.stringContent)]})},s):(0,Y.jsx)(n.Fragment,{children:(0,Y.jsx)(x.WE.Consumer,{children:r=>(0,Y.jsxs)(f.Z,{color:r.urbanGrey60,inline:"inline_icon"===i?.belowFold?.[0]?.component,maxLines:2,size:"s",weight:"semibold",children:["inline_icon"===i?.belowFold?.[0]?.component?(0,Y.jsx)(k.Z,{className:ve,fillColor:t.BrandingSpotlight,name:I.T.spotlight,size:20},s):null,e.stringContent]})})},s)}if("header_2"===e.component){const t=a?"semibold":"regular",r=!(8===i?.cardType||String(i?.cardType)===Ne.RECOMMERCE||(3===i?.cardType||String(i?.cardType)===Ne.PAYABLE)&&l);return(0,Y.jsxs)("div",{className:"D_vw",children:[(0,Y.jsx)(x.WE.Consumer,{children:s=>{const r=a?s.urbanGrey90:s.urbanGrey60;return(0,Y.jsx)(f.Z,{color:r,showTooltip:!0,singleline:!0,weight:t,children:e.stringContent})}}),i?.originalPrice?(0,Y.jsx)(f.Z,{ariaLabel:o((0,A.ZP)("Stricken Price: %{strickenPrice}"),{strickenPrice:i.originalPrice.value}),className:fe,decoration:"strikethrough",inline:!0,showTooltip:!0,singleline:!0,size:"xs",children:i.originalPrice.value}):null,r&&i?.badges?.map((e=>(0,Y.jsx)(h.Z,{alt:o(A.ZP`badge`),className:"D_vK",cssHeight:p.spacing16,cssWidth:p.spacing16,src:`${e.stringContent}.svg`},e.stringContent)))]},s)}return a&&"paragraph"===e.component&&2===s&&i&&1!==i.cardType&&6!==i.cardType&&9!==i.cardType&&String(i.cardType)!==Ne.PROPERTY&&String(i.cardType)!==Ne.C2C&&String(i.cardType)!==Ne.CERTIFIED_PRODUCT?null:(0,Y.jsx)(n.Fragment,{children:(0,Y.jsx)(x.WE.Consumer,{children:s=>(0,Y.jsx)(f.Z,{color:s.urbanGrey60,singleline:!0,size:"s",children:e.stringContent})})},s)}renderAction(e,s){const{classNameActionButton:t="",isCertifiedSpotlightEnabled:r,isDesktop:n,isOwnProfile:l,localizeText:a,showOptions:o=!1,showActions:c=!0,isGallery:d}=this.props;if(!c)return null;const u=d?ue:de,p=(9===s.cardType||String(s.cardType)===Ne.CERTIFIED_PRODUCT)&&!r;return(0,Y.jsx)(Y.Fragment,{children:l?(0,Y.jsxs)("div",{className:i()({[be?.cardActionContent]:n}),children:[this.renderLikeButton(e),p?null:(0,Y.jsxs)(Y.Fragment,{children:[this.renderViewInsightsButton(),(0,Y.jsx)("div",{className:"D_vA",children:this.renderCTAButtons()})]})]}):(0,Y.jsxs)("div",{className:i()({D_vz:!d,D_vS:d}),children:[this.renderLikeButton(e),o&&(0,Y.jsx)(g.Z,{ariaLabel:a((0,A.ZP)("More options")),className:i()(de,t,u,{D_vU:n&&d}),ref:this.ellipsisRef,onClick:this.onEllipsisClick,type:"icon",children:(0,Y.jsx)(k.Z,{name:I.T.more,size:16})})]})})}renderLikeButton(e){const{classNameActionButton:s="",classNameLikeIcon:t="",isDesktop:r,isOwnProfile:n,isGallery:l,localizeText:a,me:o}=this.props,{likes_count:c}=e,d=l?ue:de,u=l?"D_vV":me,p=(0,Y.jsx)(x.WE.Consumer,{children:e=>(0,Y.jsx)(f.Z,{color:e.urbanGrey60,inline:!0,size:r?"s":"m",children:c>0?String((0,Z.o)(c)):String.fromCharCode(160)})}),h=n||e.seller.id===o?.id,m=e.like_status||h?I.T.like_f:I.T.like;return(0,Y.jsxs)(g.Z,{ariaLabel:a(e.like_status?(0,A.ZP)("Heart"):(0,A.ZP)("Like")),className:i()(d,s,{[be?.cardActionOwnProfile]:r&&n}),onClick:this.onLikeButtonClick,testId:re.ZT.LISTING_CARD_BTN_LIKE,type:"icon",disabled:h,children:[l&&p,(0,Y.jsx)(k.Z,{className:i()(u,t,{D_vF:e.like_status,D_vG:h}),name:m,size:16}),!l&&p]})}renderViewInsightsButton(){const{isDesktop:e,isOwnProfile:s,showListingInsight:t}=this.props;return t?(0,Y.jsx)(x.WE.Consumer,{children:t=>(0,Y.jsxs)(g.Z,{className:i()(de,{[be?.cardActionOwnProfile]:e&&s}),size:"s",onClick:this.onShowListingInsightsModal,type:"icon",children:[(0,Y.jsx)(J,{className:me,color:"skyTeal80"}),(0,Y.jsx)(f.Z,{color:t.skyTeal80,inline:!0,size:e?"s":"m",children:(0,Y.jsx)(D.Z,{id:(0,A.ZP)("View insights")})})]})}):null}renderCTAButtons(){const{onPromoteClick:e,ctas:s,index:t}=this.props;if(!s)return null;const r={className:"D_vB",size:"s",textClassName:"D_vC",type:"outline"};return(0,Y.jsxs)(Y.Fragment,{children:[s.renew&&(0,Y.jsx)(q.Z,{...s.renew,...r,onClick:()=>this.onPublishClick()}),s.promote&&(0,Y.jsx)(q.Z,{...s.promote,...r,onClick:e?()=>e(t):void 0})]})}renderPopover(){const{showPopover:e}=this.state;return(0,Y.jsx)(_.Z,{container:this,horizontalAlign:"center",onHide:this.onPopoverHide,show:e,target:this.ellipsisRef.current,children:(0,Y.jsx)("div",{className:"D_vH",children:(0,Y.jsx)(g.Z,{className:"D_vI",onClick:this.onReportListingClick,type:"linkTeal",children:(0,Y.jsx)(D.Z,{id:(0,A.ZP)("Report Listing")})})})})}renderListingStatus(e,s){const{listingStatusClassName:t,listingStatusText:r}=this.getListingStatus(e,s);return null!=t&&null!=r?(0,Y.jsx)(x.WE.Consumer,{children:e=>(0,Y.jsx)(f.Z,{className:`D_vn ${t}`,color:e.white,singleline:!0,size:"xs",children:r})}):null}renderListingLabel(e,s){const{isDesktop:t}=this.props,r=t?"18px":"15px",{listingStatusText:n}=this.getListingStatus(e,s);if(s?.tags?.length){const e=s.tags[0];return e?.imageTagUrl?(0,Y.jsx)("div",{className:i()("D_ve",{[ce]:!n,[oe]:n}),children:(0,Y.jsx)(h.Z,{alt:"",ariaHidden:!0,cssWidth:"auto",cssHeight:r,src:e.imageTagUrl.value})}):(0,Y.jsx)(x.WE.Consumer,{children:s=>{const t=(0,T.DM)(s)[e.backgroundColor||"urbangrey_20"],r=(0,T.DM)(s)[e.fontColor||"urbangrey_80"];return(0,Y.jsxs)("div",{className:i()("D_vc",{[ce]:!n,[oe]:n}),style:{backgroundColor:t},children:[e.iconUrl?.value?(0,Y.jsx)(h.Z,{alt:"",ariaHidden:!0,className:"D_vh",cssHeight:p.spacing16,cssWidth:p.spacing16,src:e.iconUrl.value}):null,(0,Y.jsx)(f.Z,{color:r,singleline:!0,size:"s",children:e.content})]})}})}return null}renderSpotlightedOrBumpedBadge(){const{isSpotlighted:e,listingCard:s,localizeText:t,isGallery:r}=this.props,n=this.context,l=s&&s.aboveFold&&s.aboveFold.length&&"active_bump"===s.aboveFold[0].component;if((e||s?.promoted)&&"spotlight"!==s?.aboveFold?.[0]?.component&&"inline_icon"!==s?.belowFold?.[0]?.component)return(0,Y.jsx)(u.Z,{className:i()(xe,r?he:null),color:n.BrandingSpotlight,size:"xs",text:t((0,A.ZP)("Spotlight"))});if(l){const e=(0,Y.jsx)(V.Z,{className:"D_vx",size:16});return(0,Y.jsx)(u.Z,{className:i()(xe,r?he:null),icon:e,size:"xs",text:t((0,A.ZP)("Bumped"))})}return null}getListingStatus(e,s){const{isOwnProfile:t,ctas:r}=this.props,i=e.status;let n=null,l=null;const a="ON"===r?.autoRenewalStatus||"ONCE"===r?.autoRenewalStatus;let o=null;if(s?.expiresAt){const e=new Date(1e3*s.expiresAt.seconds.low||0),t=new Date;o=(0,z.Xy)(t,e)}if(("L"===i||"R"===i)&&t&&s?.expiresAt&&null!==o&&o>=0&&o<=7){let e;return a?(n="D_vq",e=o?(0,A.ZP)("RENEWS IN %{day} DAY |||| RENEWS IN %{day} DAYS"):(0,A.ZP)("RENEWS TODAY")):(n="D_vp",e=o?(0,A.ZP)("EXPIRES IN %{day} DAY |||| EXPIRES IN %{day} DAYS"):(0,A.ZP)("EXPIRES TODAY")),l=(0,Y.jsx)(D.Z,{id:e,options:{day:o,smart_count:o}}),{listingStatusClassName:n,listingStatusText:l}}switch(i){case"C":case"T":case"E":case"I":n=`${_e}`,l=(0,Y.jsx)(D.Z,{id:(0,A.ZP)("INACTIVE")});break;case"R":n="D_vr",l=(0,Y.jsx)(D.Z,{id:(0,A.ZP)("RESERVED")});break;case"RMV":n=`${_e}`,l=(0,Y.jsx)(D.Z,{id:(0,A.ZP)("NOT LISTED")});break;case"S":n="D_vs",l=(0,Y.jsx)(D.Z,{id:(0,A.ZP)("SOLD")});break;case"O":case"D":n=`${_e}`,l=(0,Y.jsx)(D.Z,{id:(0,A.ZP)("DELETED")})}return{listingStatusClassName:n,listingStatusText:l}}trackPromotedListing(e){const s=new XMLHttpRequest;s.open("POST",e,!0),s.send()}generatePageListingTrackingData(){const{listing:e,location:s,requestID:t,trackingData:r,index:i}=this.props;if(null==s)return Sentry.captureMessage("ListingCard: location is missing"),{};const{pathname:n,search:l}=s;let a={};a=(0,R.hG)(window.location.href);let o={};if((0,R.Cw)(n)){const e=(0,R.u0)(n);if(e){const{query:s,search:t,"t-source":i,source:n,type:l,"t-search_query_source":c}=a,d=i||n||void 0,u=l||null;o=null!=s||null!=t?{referrer_browse_type:u||"search_results",referrer_filter_category:e,referrer_page_type:r?.referrer_page_type??"search",referrer_search_query:s,referrer_search_query_source:c,referrer_source:d,...r}:e===ie.HC?{referrer_browse_type:"following",referrer_source:d,...r}:{referrer_browse_type:u||"categories",referrer_category_id:e,referrer_page_type:r?.referrer_page_type??"category_browse",referrer_search_query_source:c,referrer_source:d,...r}}}else if((0,R.Ih)(n)){const{listingCard:e}=this.props,s=(0,R.u0)(n);s?o={listing_status:"L",product_id:`${e?e.listingID:""}`,referrer:n,referrer_browse_type:"special_categories",referrer_page_type:"special_categories",referrer_special_category_id:s,...r}:Sentry.captureMessage("spcID is missing")}else if((0,R.Uv)(n)){const e=/\/search\/([^\/\?]*)(\/)?/,s=n.match(e),{type:t,"t-source":i,source:l,"t-search_query_source":c}=a,d=i||l||void 0,u=t||null;if(null!=s){const e=s[1];""!==e&&(o={referrer_browse_type:u||"search_results",referrer_page_type:r?.referrer_page_type??"search",referrer_search_query:e,referrer_search_query_source:c,...d?{referrer_source:d}:{}})}}else if((0,R.vL)(n))o={referrer_browse_type:"homepage",referrer_page_type:"homepage",referrer_source:"homepage",...r};else if((0,R.tG)(n))o={referrer_browse_type:"category_homescreen",referrer_page_type:"category_homescreen",referrer_source:"category_homescreen",...r};else if((0,R.ip)(n))o={referrer:"/likes/",referrer_page_type:"like_page"};else if((0,R.jd)(n))o={referrer_browse_type:"item_item_rec",referrer_page_type:"listing_page",referrer_product_id:(0,R.u0)(n)||"",referrer_source:"listing_page",...r,...e?{product_id:`${e.id}`}:{}};else if((0,R.Fw)(n)){const{name:s}=(0,ne.q)(n,l);o={referrer_browse_type:"marketing_landing_page",referrer_landing_page_id:s,referrer_page_type:"market-landing-page",...r,...e?{product_id:`${e.id}`}:{}}}else if((0,R.eg)(n))o={referrer_browse_type:"for_you",referrer_page_type:"for_you_page",referrer_source:"for_you_page",...r};else if((0,R.lT)(n)){const{"t-source":e}=a;null!=e&&(o={referrer_source:e})}else(0,R.Fy)(n)?o={referrer_browse_type:"seller",referrer_page_type:"profile"}:(0,R.hK)(n)?o={referrer_browse_type:"sa_search_results",referrer_page_type:"shopping_assistant_search",referrer_search_query:n.split("/")[2]||"",referrer_search_query_source:"direct_sa_search"}:(0,R.ac)(n)&&(o={referrer_browse_type:`certified_${(0,H.bw)(a.brand??"")}`,referrer_page_type:"certified_content_feed_page",...r});if((0,R.Cw)(n)||(0,R.Uv)(n)){const{condition_v2:e,deal_options:s,price_end:t,price_start:r,sort_by:i}=a;null!=r&&(o={...o,referrer_filter_price_min:r}),null!=t&&(o={...o,referrer_filter_price_max:t}),null!=e&&(o={...o,referrer_filter_condition:e}),null!=s&&(o={...o,referrer_filter_dealopt:s});const n=i?(0,ae.hV)(i):"popular";o={...o,referrer_sort_by:n||""}}return null!=t&&(o={...o,referrer_request_id:t}),o={...r,...o,...void 0!==i?{tap_index:i}:{}},o}}je.contextType=P.Ni;const Le=(0,a.$j)((function(e,s){const{listingCard:t}=s;return{ctas:t?(0,U.fc)(e,t?.listingID):void 0,dateNow:(0,v.eR)(e),host:(0,L.RR)(e),isBot:(0,v.Tv)(e),isCertifiedSpotlightEnabled:(0,N.c6)(e,{experimentId:"cats-9024-certified-spotlight"}),isDesktop:(0,v.Y6)(e),listing:null!=t?(0,O.MO)(e,{listingID:t.listingID}):null,listingCardPayableFlag:(0,N.c6)(e,{experimentId:"cs-4156-new-listing-card-type-payable"}),listingCardTitleDescriptionEnabled:(0,N.c6)(e,{experimentId:"bx-6644-listing-card-title-description"}),listingPageVideoPlaybackEnabled:(0,N.c6)(e,{experimentId:"cats-3713-listing-page-video-playback"}),localizeDateRelative:(0,j.Nf)(e),localizeText:(0,j.l$)(e),location:(0,L.Xt)(e),me:(0,b.XM)(e),reqSessionId:(0,w.ID)(e),requestID:null!=t?(0,O.LS)(e,{listingID:`${t.listingID}`}):null}}),(function(e){return(0,o.DE)({listingCardGalleryChatCTA:F.uC,listingCardLike:F.MY,listingPromotionsListInit:B.Bn,listingStatsInsightsModalShow:G.cv,reportListingModalSetListingID:$.ON,reportListingModalShow:$.up,routerPush:L.J5,trackBatchedEvent:S.Vh},e)}),null,{forwardRef:!0})(je)},1503:(e,s,t)=>{t.d(s,{ZP:()=>C});var r=t(9),i=t.n(r),n=t(0),l=t(10),a=t(862),o=t(405),c=t(730),d=t(905),u=t(8),g=t(723),p=t(961),h=t(1023),m=t(774),_="D_Wz",f=t(1);function x(e){return!!e.videoItem}function y(e,s){const t=x(e)?e.videoItem:null,r=x(e)?null:e.photoItem;return t?(0,f.jsx)(d.Z,{autoPlay:!0,className:_,controls:!1,loop:!0,muted:!0,poster:t.thumbnail?.url,videoUrl:t.supportedFormat.hls}):r?(0,f.jsx)(o.Z,{alt:s,className:_,cssWidth:"100%",cssHeight:"100%",src:r.progressiveUrl||r.url},r.progressiveUrl||r.url):null}const C=e=>{const{index:s,media:t,thumbnailURL:r,title:d,showOneItemOnly:x,aspectRatio:C}=e,D=(0,g.c)("cats-3713-listing-page-video-playback"),v=(0,l.v9)(u.Y6),b=t[0],N=e=>!!e.videoItem,j=D&&b&&N(b)?b:null,L="1:1"===C?"D_Wx":"D_Wy",w=i()("D_Ww",L),{componentName:S,isAboveTheFold:k}=(0,n.useContext)(p.Z),I=()=>{const e=k&&Number(s)<=3,t=k&&0===s;let i;return e&&(i=S?`${S}-img-${s}`:`img-${s}`),(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(o.Z,{alt:d,className:_,cssHeight:"100%",cssWidth:"100%",id:i,fetchPriority:t?"high":void 0,lazy:!e&&void 0,src:r,title:d}),j?(0,f.jsx)(h.Z,{className:"D_W_"}):null]})};return t.length>0&&!x?(()=>{const e=e=>{e.preventDefault(),e.stopPropagation()};return(0,f.jsx)(a.Z,{dotIndicators:!0,edgeNavigationArrowsStyle:t.length>1?"disabled":"hide",enableSwipe:!v,navigationArrows:v,onBackArrowClick:e,onForwardArrowClick:e,showNavigationArrowOnHoverOnly:!0,slidesToShow:1,children:t.map(((e,s)=>0!==s||N(e)?(0,f.jsx)(m.Z,{placeholder:(0,f.jsx)(c.Z,{className:w}),threshold:.1,rootMargin:"0px",children:(0,f.jsx)("div",{className:w,children:y(e,d)})},s):(0,f.jsx)("div",{className:w,children:I()},s)))})})():(0,f.jsx)("div",{className:w,children:0!==t.length&&j?y(j,d):I()})}},1313:(e,s,t)=>{t.d(s,{ZP:()=>P});var r=t(9),i=t.n(r),n=(t(0),t(10)),l=t(99),a=t(840),o=t(8),c=t(21),d=t(403),u=t(404),g=t(743),p=t(101),h=t(173),m=t(17),_=t(18),f=t(110),x="D_VC",y="D_VE",C="D_VJ",D="D_VI",v="D_Vu",b="D_VB",N="D_Vw",j="D_Vv",L=t(1);function w(e){if(!e.listingID)return"";const s=(0,f.O8)(e);return(0,m.Wm)(s,e.listingID)}function S(e,s,t,r=!1){const i=new Array(s.length);for(let n=0;n<s.length;n++){if("below"===t&&2===n){i[n]=null;continue}let l=null;const a=s[n];switch(a.component){case"header_1":a.stringContent&&(l=r?k(e,s,n):(0,L.jsx)("p",{className:x,children:a.stringContent},n));break;case"header_2":a.stringContent&&(l=r?k(e,s,n):(0,L.jsx)("p",{className:y,children:a.stringContent},n));break;case"paragraph":a.stringContent&&(l=(0,L.jsx)("p",{className:"D_VF",children:a.stringContent},n));break;case"inline_icon":break;case"spotlight":l=(0,L.jsxs)("p",{className:"D_VG",children:[(0,L.jsx)(d.Z,{className:C,color:e.deprecatedTheme.orchidPurple50,name:u.T.spotlight,size:16}),a.stringContent]},n);break;case"active_bump":l=(0,L.jsxs)("p",{className:"D_VH",children:[(0,L.jsx)(d.Z,{className:C,color:e.deprecatedTheme.skyTeal60,name:u.T.bump,size:16}),e.localizeDateRelative(e.serverInitTimestamp?new Date(1e3*e.serverInitTimestamp):new Date,new Date(1e3*a.timestampContent.seconds.low))]},n);break;case"expired_bump":l=(0,L.jsxs)("p",{className:D,children:[(0,L.jsx)(d.Z,{className:C,name:u.T.bump,size:16}),e.localizeDateRelative(e.serverInitTimestamp?new Date(1e3*e.serverInitTimestamp):new Date,new Date(1e3*a.timestampContent.seconds.low))]},n);break;case"time_created":l=(0,L.jsx)("p",{className:D,children:e.localizeDateRelative(e.serverInitTimestamp?new Date(1e3*e.serverInitTimestamp):new Date,new Date(1e3*a.timestampContent.seconds.low))},n)}i[n]=l}return i}function k(e,s,t){const r=s[t],i=(s,t)=>s?(0,L.jsx)("a",{className:j,href:w(e.listingCard),children:s},t):null;if("header_1"===r.component){const e=(0,L.jsx)("p",{className:x,children:r.stringContent}),n=s[t+1];if("header_2"===n.component){const s=(0,L.jsx)("p",{className:y,children:n.stringContent});return i((0,L.jsxs)(L.Fragment,{children:[e,s]}),t)}return i(e,t)}if("header_2"===r.component){const e=(0,L.jsx)("p",{className:y,children:r.stringContent});return"header_1"===s[t-1].component?null:i(e,t)}return null}function I(e){return(0,L.jsx)("p",{className:"D_VK",children:e.localizeText(_.ZP`Spotlight`)})}function T(e,s,t){const r=e[0];if(!r)return null;if(r.imageTagUrl)return(0,L.jsx)("img",{alt:"",className:"D_VL",src:r.imageTagUrl.value});if(r.content){const e=(0,g.Lq)(r.fontColor,s),i=(0,g.Lq)(r.backgroundColor,s),n=(0,g.a_)(r.fontColor,t),l=(0,g.a_)(r.backgroundColor,t);return"string"!=typeof e||"string"!=typeof i?null:(0,L.jsxs)("p",{className:"D_VM",style:{backgroundColor:l??i,color:n??e},children:[r.iconUrl?.value?(0,L.jsx)("img",{alt:"",className:"D_VN",src:r.iconUrl.value}):null,r.content]})}}const P=function(e){const{className:s,listingCard:t}=e,r=(0,h.Z)(),d=(0,n.v9)(o.Tv),u=(0,l._x)(),g=(0,p.Fg)(),m=(0,n.v9)(c.l$),_=(0,n.v9)(c.Nf),f=(0,n.v9)(o.JE),x=!(!e.isSpotlighted&&!t?.promoted||"spotlight"===t?.aboveFold?.[0]?.component||"inline_icon"===t?.belowFold?.[0]?.component);return t?function(e){const{className:s,listingCard:t,isDesktop:r,deprecatedTheme:n,theme:l,isBot:a}=e,{seller:o}=t,c=function(e){const s=e.media;if(!s)return null;for(let e=0;e<s.length;e++)if(s[e].photoItem)return s[e]}(t),d=o?(0,L.jsxs)("div",{className:"D_Vx",children:[(0,L.jsx)("img",{alt:"",className:"D_Vy",src:o.profilePicture}),(0,L.jsxs)("div",{className:b,children:[(0,L.jsx)("p",{className:"D_Vz",children:o.username}),S(e,t.aboveFold,"above")]})]}):null,u=(0,L.jsxs)("div",{className:"D_V_",children:[c?(0,L.jsx)("img",{alt:"",className:"D_VA",src:c.photoItem.url}):null,e.enableSpotlightHack?I(e):null,t.tags?T(t.tags,n,l):null]}),g=(0,L.jsx)("div",{className:b,children:S(e,t.belowFold,"below",a)});return a?(0,L.jsxs)("div",{className:i()(s,v,r?N:null),children:[d,u,g]}):(0,L.jsxs)("a",{className:i()(j,s,v,r?N:null),href:w(t),children:[d,u,g]})}({className:s,deprecatedTheme:u,enableSpotlightHack:x,isBot:d,isDesktop:r,listingCard:t,localizeDateRelative:_,localizeText:m,serverInitTimestamp:f,theme:g}):(0,L.jsx)(a.Z,{className:s,showSeller:!0})}},1056:(e,s,t)=>{t.d(s,{_:()=>r});const r="z-"},832:(e,s,t)=>{t.d(s,{Z:()=>l}),t(0);var r=t(10),i=t(21),n=t(1);function l(e){const s=(0,r.v9)(i.Nf),{dateSource:t,dateTarget:l,options:a}=e;return(0,n.jsx)(n.Fragment,{children:s(t,l,a)})}},2440:(e,s,t)=>{function r(e){return e>999999?`${Math.floor(e/1e6)}M`:e>999?`${Math.floor(e/1e3)}k`:String(e)}t.d(s,{o:()=>r})},779:(e,s,t)=>{t.d(s,{Al:()=>a,CB:()=>m,Fw:()=>g,KC:()=>l,UH:()=>_,X2:()=>c,Xy:()=>p,gO:()=>u,mr:()=>o,z1:()=>h,zk:()=>d});var r=t(585),i=t(706),n=t(52);function l(e,s,t){return(0,i.Z)(e,t,"ddMMyyyy")===(0,i.Z)(s,t,"ddMMyyyy")}function a(e){return e.getTime()-Date.now()>0}function o(e,s){return(0,i.Z)(e,s,"Iyyyy")===(0,i.Z)(new Date,s,"Iyyyy")}function c(e,s){return(0,i.Z)(e,s,"yyyy")===(0,i.Z)(new Date,s,"yyyy")}function d(e,s){return l(e,new Date,s)}function u(e,s){return l(e,new Date(Date.now()-n.Wj),s)}function g(e){const s=(new Date).getTime()-e.getTime();return Math.floor(s/31536e6)}function p(e,s){return Math.round((s.getTime()-e.getTime())/864e5)}function h(e){return 1e3*(e.seconds+e.nanos/n.W2)}function m(e){const s=e*n.it;return{nanos:Math.trunc(e)%1e3*n.it,seconds:Math.floor(s/n.W2)}}function _(e,s){return`${e}_${(0,r.Z)(Date.now(),"yyyy-MM-dd_HHmm")}.${s}`}},1055:(e,s,t)=>{t.d(s,{bz:()=>p,ON:()=>m,up:()=>g,$8:()=>x});var r=t(6),i=t(4);const n="ReportListingModal";var l=t(39),a=t(5),o=t(1198),c=t(423),d=t(7),u=t(105);const g=(0,r.PH)(`${n}/reportListingModalShow`),p=(0,r.PH)(`${n}/reportListingModalClose`),h=(0,r.oM)({initialState:{selectedListingID:null},name:n,reducers:{reportListingModalSetListingID(e,s){const{payload:{listingID:t}}=s;e.selectedListingID=t}}}),{reportListingModalSetListingID:m}=h.actions;function*_(){(yield(0,i.Ys)((e=>(0,c.uk)(e,{route:"report_listing"}))))?yield(0,i.gz)((0,l.Gu)("USER_RESTRICTIONS")):(yield(0,i.gz)((0,l.Gu)("REPORT")),yield(0,i.RE)(o.Wb))}function*f(){yield(0,i.gz)((0,u.eG)()),yield(0,i.gz)((0,l.qf)())}function x(e){return e[n].selectedListingID}h.reducer,a.Z.register(n,h.reducer),d.Z.register(n,(function*(){yield(0,i.Fm)(g.type,_),yield(0,i.Fm)(p.type,f)}))},1198:(e,s,t)=>{t.d(s,{Wb:()=>j,zL:()=>g,fb:()=>p,ry:()=>k,UC:()=>T,I:()=>P,vy:()=>I,ME:()=>Z});var r=t(6),i=t(4);const n="ReportListing";var l=t(5),a=t(1055),o=t(115),c=t(7),d=t(105),u=t(1056);const g=(0,r.PH)(`${n}/reportListingGetCategoriesRequest`),p=((0,r.PH)(`${n}/reportListingGetFlagReasonsRequest`),(0,r.PH)(`${n}/reportListingSubmitRequest`)),h=(0,r.oM)({initialState:{flagReasons:[],getCategoriesPending:!1,getFlagReasonsPending:!1,recatCategories:[],submitPending:!1},name:n,reducers:{reportListingGetCategoriesFailure(e,s){e.getCategoriesPending=!1},reportListingGetCategoriesPending(e){e.getCategoriesPending=!0},reportListingGetCategoriesSuccess(e,s){const{payload:{recatCategories:t}}=s;e.getCategoriesPending=!1,e.recatCategories=t},reportListingGetFlagReasonsFailure(e,s){e.getFlagReasonsPending=!1},reportListingGetFlagReasonsPending(e){e.getFlagReasonsPending=!0},reportListingGetFlagReasonsSuccess(e,s){const{payload:{flagReasons:t}}=s;e.flagReasons=t,e.getFlagReasonsPending=!1},reportListingSubmitFailure(e,s){e.submitPending=!1},reportListingSubmitPending(e){e.submitPending=!0},reportListingSubmitSuccess(e){e.submitPending=!1}}}),{reportListingGetCategoriesFailure:m,reportListingGetCategoriesPending:_,reportListingGetCategoriesSuccess:f,reportListingGetFlagReasonsFailure:x,reportListingGetFlagReasonsPending:y,reportListingGetFlagReasonsSuccess:C,reportListingSubmitFailure:D,reportListingSubmitPending:v,reportListingSubmitSuccess:b}=h.actions;let N;function*j(){const e=yield(0,i.Ys)(k);if(0===e.length){null==N&&(N=yield(0,i.rM)(L));const e=yield(0,i.v_)(N);return N=null,e}return e}function*L(){yield(0,i.gz)(y());try{const{body:{reasons:e}}=yield(0,i.RE)(o.B,"/service/api/2.0/product-flagging/reasons/",{method:"GET"});yield(0,i.gz)(C({flagReasons:e}))}catch(e){yield(0,i.gz)(x({err:e}))}}function*w(){yield(0,i.gz)(_());try{const{body:e}=yield(0,i.RE)(o.B,"/service/api/2.1/report-flow/collections",{method:"GET"});yield(0,i.gz)(f({recatCategories:e}))}catch(e){yield(0,i.gz)(m({err:e}))}}function*S({payload:{data:{listingID:e,reason:s,suggestedCategory:t,description:r}}}){yield(0,i.gz)(v());const n=t?"2.1":"2.2";try{yield(0,i.RE)(o.B,`/service/api/${n}/product/${e}/flags/`,{data:{reason:s,...t?{suggestedCategory:t}:null,...r?{description:r}:null},headers:{[`${u._}use-form`]:"true"},method:"POST"}),yield(0,i.gz)(b()),yield(0,i.gz)((0,a.bz)()),yield(0,i.gz)((0,d.LO)({snackbarID:"REPORT_LISTING_SUCCESS"}))}catch(e){yield(0,i.gz)(D({err:e})),yield(0,i.gz)((0,d.LO)({snackbarID:"REPORT_LISTING_FAILURE"}))}}function k(e){return e[n].flagReasons}function I(e){return e[n].recatCategories}function T(e){return e[n].getCategoriesPending}function P(e){return e[n].getFlagReasonsPending}function Z(e){return e[n].submitPending}h.reducer,l.Z.register(n,h.reducer),c.Z.register(n,(function*(){yield(0,i.Fm)(g.type,w),yield(0,i.ib)(p.type,S)}))},1314:(e,s,t)=>{t.d(s,{T5:()=>N,LW:()=>f,fc:()=>E,fY:()=>j,eu:()=>w,p9:()=>L,e3:()=>P,i5:()=>Z,$U:()=>S,kI:()=>k,KE:()=>I,wK:()=>T});var r=t(6),i=t(67),n=t(4),l=t(70),a=t(2426),o=t(11),c=t(106),d=t(110),u=t(21),g=t(24),p=t(5),h=t(7),m=t(773);const _="ProfileListing",f=(0,r.PH)(`${_}/profileListingsGetRequest`),x={error:null,listingCards:void 0,listingIsSpotlightedMap:{},listingPromoteCtaMap:{ctaBtn:{},promoteBtn:{}},numberOfCards:0,pageNumber:0,parameters:null,pending:!1,requestID:null,shouldLoadMore:!1},y=(0,r.oM)({initialState:x,name:_,reducers:{profileListingsAddRequestId:(e,s)=>{const{requestID:t}=s.payload;e.requestID=t},profileListingsGetFailure:(e,s)=>{const{err:t}=s.payload;e.error=t,e.pending=!1},profileListingsGetPending:(e,s)=>{const{session:t}=s.payload;t||Object.assign(e,x),e.error=null,e.pending=!0},profileListingsGetSuccess:(e,s)=>{const{service:t,listingCards:r,listingIsSpotlightedMap:i,listingPromoteCtaMap:n,parameters:l,session:a,shouldLoadMore:o}=s.payload;e.listingCards="search"===t?[...e.listingCards||[],...r]:r,e.listingIsSpotlightedMap={...e.listingIsSpotlightedMap,...i},e.listingPromoteCtaMap={ctaBtn:{...e.listingPromoteCtaMap?.ctaBtn,...n?.ctaBtn},promoteBtn:{...e.listingPromoteCtaMap?.promoteBtn,...n?.promoteBtn}},e.numberOfCards=r.length,e.pageNumber=e.pageNumber+1,e.parameters={...l,session:a},e.pending=!1,e.shouldLoadMore=o}}}),{profileListingsGetPending:C,profileListingsGetSuccess:D,profileListingsGetFailure:v,profileListingsAddRequestId:b}=y.actions;function*N(e){const{parameters:s,service:t="search",username:r}=e.payload,{count:i=20,filters:a,query:p,session:h,sort:_}=s,f=yield(0,n.RE)(m.g,r);yield(0,n.gz)(C({session:h}));try{const{country_id:e}=yield(0,n.Ys)(g.S$),m=yield(0,n.Ys)(u.fN),{data:x}=yield(0,n.RE)(o.v_,t,{data:{count:i,countryId:e,filters:a,locale:m,query:p,session:h,sortParam:_},path:`/search/3.3/username/${r}/products/`}),{session:y,results:C=[]}=x,v=(0,d.Zx)(C),N=(0,l.z)(16);yield(0,n.gz)((0,c.oU)({rawListingCards:v,requestID:N})),yield(0,n.gz)(b({requestID:N})),yield(0,n.rM)(R,{requestID:N,userID:f?.user_id});const j=v.map(d.Bg),L=j.length===i;let w={},S={ctaBtn:{},promoteBtn:{}};if(f?.is_me){const e=j.map((e=>`${e.listingID}`)),{data:s}=yield(0,n.RE)(o.v_,"listing-promotions",{data:{listingIds:e},path:"/dogs/1.0/promoted_listings/purchases/"});w=s;const t=v.map((e=>({ccId:e.countryCollectionId,expiresAt:e.expiresAt,listingId:e.id,status:e.status}))),r=yield(0,n.RE)(o.v_,"listing-promotions",{data:{listings:t},path:"/dogs/2.0/get-listing-cta/"});r.data?.profileListing&&(S=r.data.profileListing)}yield(0,n.gz)(D({listingCards:j,listingIsSpotlightedMap:w,listingPromoteCtaMap:S,parameters:s,service:t,session:y,shouldLoadMore:L})),yield(0,n.gz)((0,c.gq)({listingCards:v}))}catch(e){yield(0,n.gz)(v({err:e}))}}function j(e){return e.ProfileListing.listingCards}function L(e){return e.ProfileListing.listingIsSpotlightedMap}function w(e){return e.ProfileListing.error}function S(e){return e.ProfileListing.parameters}function k(e){return e.ProfileListing.pending}function I(e){return e.ProfileListing.requestID}function T(e){return e.ProfileListing.shouldLoadMore}function P(e){return e.ProfileListing.numberOfCards}function Z(e){return e.ProfileListing.pageNumber}y.reducer,p.Z.register(_,y.reducer),h.Z.register("ProfileListing",(function*(){yield(0,n.Fm)(f.type,N)}));const E=(0,i.P1)([function(e,s){return e.ProfileListing.listingPromoteCtaMap.ctaBtn[s]}],(function(e){return{autoRenewalStatus:e?.autoRenewalStatus,promote:e?.promoteBtn,publish:e?.publishBtn,renew:e?.renewBtn}}));function*R(e){e.userID&&(yield(0,n.gz)((0,a.H6)({browse_type:"seller",page_type:"profile",request_id:e.requestID,seller_id:`${e.userID}`})))}},961:(e,s,t)=>{t.d(s,{Z:()=>r});const r=(0,t(0).createContext)({componentName:"",isAboveTheFold:!1})},750:(e,s,t)=>{t.d(s,{V:()=>p});var r=t(0),i=t(399),n=t(751),l=t(752),a=t(742);var o=t(732),c=t(805),d=t(748),u=t(1);function g({icon:e,className:s,theme:t,index:r}){switch(e){case"ICON_COIN":case 1:return(0,u.jsx)(i.Z,{className:s,src:o},r);case"ICON_BUMP":case 2:return(0,u.jsx)(n.Z,{className:s,color:t.BrandingBump,size:16},r);case"ICON_SPOTLIGHT":case 3:return(0,u.jsx)(l.Z,{className:s},r);case"ICON_PROFILE_PROMOTION":case 4:return(0,u.jsx)(i.Z,{className:s,src:d},r);case"ICON_PROMO":case 12:return(0,u.jsx)(i.Z,{className:s,src:c},r);case"ICON_CAROUBIZ":case 5:return(0,u.jsx)(i.Z,{className:s,src:a},r);case"ICON_CHECKMARK_OUTLINE":case 9:case"ICON_CHECKMARK_FILLED":case"ICON_BUMP_SCHEDULER":case"ICON_UNKNOWN":default:return(0,u.jsx)(i.Z,{className:s,src:"https://mweb-cdn.karousell.com/build/check-outlined-8a41b23a67.svg"},r);case"ICON_NEW":case 7:return(0,u.jsx)(i.Z,{className:s,src:"https://mweb-cdn.karousell.com/build/icon-new-868c8d6d14.svg"},r);case"ICON_CLICK":case 10:return(0,u.jsx)(i.Z,{className:s,src:"https://mweb-cdn.karousell.com/build/icon-click-902a6dce2c.svg"},r);case"ICON_WHATSAPP":case 11:return(0,u.jsx)(i.Z,{className:s,src:"https://mweb-cdn.karousell.com/build/whatsapp-outline-280a96a4a3.svg"},r)}}const p=({attributes:e,iconClassNames:s,template:t,theme:i})=>{const n=[];if(e.length){const l=e.map((e=>{return`(${s=e.replaceSymbol,s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")})`;var s})).join("|"),a=new RegExp(`(${l})`,"g");let o=0,c=null,d=0;for(;c=a.exec(t);){const l=t.substring(o,a.lastIndex-c[0].length);l&&(n.push((0,u.jsx)(r.Fragment,{children:l},d)),d++);const p=e.find((e=>e.replaceSymbol===c[0]));p&&(n.push(g({className:s,icon:p.icon,index:d,theme:i})),d++),o=a.lastIndex}n.push((0,u.jsx)(r.Fragment,{children:t.substring(o)},d))}else n.push((0,u.jsx)(r.Fragment,{children:t},0));return n}},1938:(e,s,t)=>{t.r(s),t.d(s,{card:()=>r,cardActionContent:()=>i,cardActionOwnProfile:()=>n,cardActions:()=>l,galleryCardDesktop:()=>a});var r="D_uU",i="D_uW",n="D_uX",l="D_uV",a="D_uY"},742:e=>{e.exports="https://mweb-cdn.karousell.com/build/caroubiz-logo-fe43cd76bd.svg"},805:e=>{e.exports="https://mweb-cdn.karousell.com/build/promo-796235ee48.svg"},748:e=>{e.exports="https://mweb-cdn.karousell.com/build/shoutout-icon-154fbd3f92.svg"}}]);
//# sourceMappingURL=https://mdev.llesuorac.com/01857052a1fbff6c7926249973b6164fd2b19d8b/a11b7c46979d890e.min.js.map
//# debugId=b80d2248-5a60-5f72-b488-26690b9f20f5