1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[71873],{19077:(e,t,n)=>{n.d(t,{a:()=>C});var i,r=n(11241),o=n(742823),E=n(797989),_=n(679273),s=n(356055),a=n(188147),c=n(187788),R=n(987374);n(34268);let l=function(e){let t,n=(t=e?.headers??new Headers,{route:"/api/page-data/opening-order-discount",service:"backend",url:"/api/page-data/opening-order-discount",method:"GET",...e,headers:t});return(0,R.E)(n)};var T=n(427507),d=n(442462),A=n(858655);function N(){return(0,d.x)({eventKey:"pricing-opening_order_incentives_view_offer_banner-view",realTimeTracking:!0,priority:A.T.Priority.EXTRA_LOW,actionCategory:A.T.ActionCategory.ACTION_CATEGORY_IMPRESSION})}(i||(i={})).build=e=>({...e??{}});var O=n(467347),h=n(811331),u=n.n(h);let C=()=>{let e,t,n,R,d,A,N,h,u=(0,r.c)(26),C=(0,o.P)(I);u[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,s.Ap)(),u[0]=e):e=u[0];let S=e,{retailer:P}=(0,c.s)(),p=P?.is_faire_employee_retailer??!1,m=(0,a.lU)();u[1]!==m?(t={enabled:m,refetchOnMount:!1,staleTime:1/0},u[1]=m,u[2]=t):t=u[2];let{data:f,isLoading:v,error:y}=function(e){let t,n,i,o=(0,r.c)(8);if(void 0!==o[0]?(t=function(e){let{headers:t,...n}=e??{};return["/api/page-data/opening-order-discount",n,t?[...t]:[]]}(void 0),o[0]=void 0,o[1]=t):t=o[1],void 0!==o[2]){var E;E=void 0,n=({signal:e})=>l({...E,signal:e}),o[2]=void 0,o[3]=n}else n=o[3];return o[4]!==t||o[5]!==n||o[6]!==e?(i={queryKey:t,queryFn:n,...e},o[4]=t,o[5]=n,o[6]=e,o[7]=i):i=o[7],(0,T.useQuery)(i)}(t);u[3]!==f?(n=void 0===f?{}:f,u[3]=f,u[4]=n):n=u[4];let{opening_order_discount_data:U}=n;u[5]!==U?(R=void 0===U?i.build({}):U,u[5]=U,u[6]=R):R=u[6];let{discount_bps:G,discount_bps_cap_amount:g,expires_at:L,is_retailer_eligible:M}=R,b=!!(M&&L&&C<L&&!(S&&p));u[7]!==C||u[8]!==L?(d=L&&(0,O.M)(L,C),u[7]=C,u[8]=L,u[9]=d):d=u[9];let k=d;e:{let e,t,n;if(!L||!g||!G){A=void 0;break e}u[10]!==L?(e=(0,_.qP)(L,"MMMM d"),u[10]=L,u[11]=e):e=u[11],u[12]!==L?(t=(0,_.qP)(L,"PPpx"),u[12]=L,u[13]=t):t=u[13];let i=G/100;u[14]!==g||u[15]!==i||u[16]!==e||u[17]!==t?(n={endDate:e,endDateWithTimezone:t,discountPercentage:i,discountCapAmount:g},u[14]=g,u[15]=i,u[16]=e,u[17]=t,u[18]=n):n=u[18],A=n}let B=A;u[19]===Symbol.for("react.memo_cache_sentinel")?(N=E.wc.session.getItem("OpeningOrderIncentivesIsDrivenFromEmail"),u[19]=N):N=u[19];let w=!!N;return u[20]!==y||u[21]!==v||u[22]!==k||u[23]!==B||u[24]!==b?(h={isDrivenFromMarketingEmail:w,numberOfHoursRemaining:k,openingOrderIncentivesProps:B,showOpeningOrderIncentives:b,trackOOIBannerViewEvent:D,isLoading:v,error:y},u[20]=y,u[21]=v,u[22]=k,u[23]=B,u[24]=b,u[25]=h):h=u[25],h};function I(e){return e.currentTime}function D(){return u()(N)}},51124:(e,t,n)=>{n.d(t,{R:()=>o});var i=n(901577);let r=["STATIONERY","KIDS_AND_BABY","STYLE_QUIZ_STORE_TYPE_UNKNOWN"],o=e=>{if(!e)return;let t=r.includes(e)?"OTHER":e;return i.M[t]}},82645:(e,t,n)=>{n.d(t,{hV:()=>r,wE:()=>_}),n(864668);var i,r,o=n(686737),E=n(73049);(i=r||(r={})).build=e=>e,i.parse=function(e=""){return{..."string"==typeof e?E.parse(e):e??{}}};let _="/brand-invoice/:brandInvoiceToken([^/]*)";(0,o.wE)(_,{encode:encodeURIComponent})},299220:(e,t,n)=>{n.d(t,{O:()=>d});var i=n(377654),r=n(833279),o=n(718580),E=n(745484),_=n(575611),s=n(592887),a=n(874432);let{logger:c}=s.Vy.getLogger("MESSENGER");class R{static{this.PING_FREQUENCY=15e3}static{this.MISSED_PONG_RECONNECT_THRESHOLD=3}constructor(e){this.websocketUrl=e,this.retryDelay=1e4+1e4*Math.random(),this.isConnected=!1,this.retryingConnection=!1,this.retryConnectionIntervalFactor=1,this.listenerCounter=0,this.listeners=new Map,this.receivedPong=!1,this.missedPongCount=0,this.isClosed=!1,this.subscribe=e=>(0===this.listenerCounter&&this.startConnection(),this.listenerCounter=this.listenerCounter+1,this.listeners.set(this.listenerCounter,e),e({type:"CONNECTION",isConnected:this.isConnected}),this.listenerCounter),this.unsubscribe=e=>{this.listeners.delete(e)},this.close=()=>{this.isClosed=!0,this.socket?.close()},this.retryConnection=()=>{this.socket&&this.socket.readyState!==WebSocket.CLOSED&&this.socket.close(),this.socket=new WebSocket(this.websocketUrl),this.startConnection()},this.startConnection=()=>{this.dispatchConnectionStatus();let e=this.socket;e.onopen=()=>{this.isConnected=!0,this.dispatchConnectionStatus(),this.retryingConnection=!1,this.retryConnectionIntervalFactor=1,e.onclose=()=>{this.socket===e&&(this.isConnected=!1,this.dispatchConnectionStatus(),this.maybeRetryConnectionWithBackoff())}},e.onerror=()=>this.maybeRetryConnectionWithBackoff(),e.onmessage=t=>{if(this.socket===e)try{this.handleMessage(JSON.parse(t.data))}catch(e){c.error(`Error handling message: ${JSON.stringify(e)}. Message: ${t}`)}},this.startPingTimer()},this.handleMessage=e=>{e.type===a.W.Type.ECHO_RESPONSE?(this.receivedPong=!0,this.missedPongCount=0,this.isConnected=!0,this.dispatchConnectionStatus()):this.dispatchMessage(e)},this.dispatchMessage=e=>
1{this.listeners.forEach(t=>t(e))},this.dispatchConnectionStatus=()=>{this.dispatchMessage({type:"CONNECTION",isConnected:this.isConnected})},this.startPingTimer=()=>{void 0===this.pingInterval&&(this.receivedPong=!0,this.missedPongCount=0,this.pingInterval=(0,_.z)()?.setInterval(()=>{(this.socket.readyState===WebSocket.CLOSING||this.socket.readyState===WebSocket.CLOSED)&&this.handleTimeout(),!this.receivedPong&&(this.missedPongCount++,this.missedPongCount>R.MISSED_PONG_RECONNECT_THRESHOLD&&this.handleTimeout()),this.isConnected?(this.receivedPong=!1,this.socket.send(l())):this.stopPingTimer()},R.PING_FREQUENCY))},this.stopPingTimer=()=>{void 0!==this.pingInterval&&((0,_.z)()?.clearInterval(this.pingInterval),this.pingInterval=void 0)},this.handleTimeout=()=>{this.stopPingTimer(),this.isConnected=!1,this.dispatchConnectionStatus(),(0,E.w)()?.onLine&&this.maybeRetryConnectionWithBackoff()},this.maybeRetryConnectionWithBackoff=()=>{!this.isClosed&&(this.retryingConnection||(setTimeout(()=>this.retryConnectionWithBackoff(),this.retryDelay),this.retryingConnection=!0))},this.retryConnectionWithBackoff=()=>{this.isConnected||(this.retryConnectionIntervalFactor*=2,this.retryConnection(),setTimeout(()=>this.retryConnectionWithBackoff(),this.retryConnectionIntervalFactor*this.retryDelay))},this.socket=new WebSocket(e),this.startConnection(),(0,_.z)()?.addEventListener("online",()=>{this.isConnected||this.maybeRetryConnectionWithBackoff()}),(0,r.t)()&&c.error(Error("WebSocketMessageChannel initialized on server, this will lead to memory leaks on production."))}}let l=()=>JSON.stringify({type:a.W.Type.ECHO_REQUEST,echo_string:"ping"}),{logger:T}=s.Vy.getLogger("MESSENGER_INFRASTRUCTURE");class d{static{this.get=(0,o.hw)(d)}constructor(){this.channelByUrl={},this.hiddenChannelByUrl={},this.getOrInitChannel=e=>{if(!(0,r.t)())try{let t=this.channelByUrl[e]??new R(e);return this.channelByUrl[e]=t,t}catch(t){T.error(`Failed to create WebSocketMessageChannel for ${e}`,t);return}},this.closeChannel=e=>{this.channelByUrl[e]?.close(),this.channelByUrl[e]=void 0;let t=(0,i.G)(e);this.hiddenChannelByUrl[t]?.forEach(e=>e.close()),this.hiddenChannelByUrl[t]=void 0}}}},315507:(e,t,n)=>{n.d(t,{G:()=>a});var i=n(11241),r=n(188147),o=n(987374);n(34268);let E=function(e){let t,n=(t=e?.headers??new Headers,{route:"/api/first-order-incentives/first-order-incentive-data",service:"backend",url:"/api/first-order-incentives/first-order-incentive-data",method:"GET",...e,headers:t});return(0,o.E)(n)};var _=n(427507),s=n(51124);let a=()=>{let e,t,n,o,a,c,R=(0,i.c)(28),l=(0,r.lU)();R[0]!==l?(e={enabled:l,staleTime:1/0,gcTime:1/0},R[0]=l,R[1]=e):e=R[1];let{data:T,isLoading:d}=function(e){let t,n,r,o=(0,i.c)(8);if(void 0!==o[0]?(t=function(e){let{headers:t,...n}=e??{};return["/api/first-order-incentives/first-order-incentive-data",n,t?[...t]:[]]}(void 0),o[0]=void 0,o[1]=t):t=o[1],void 0!==o[2]){var s;s=void 0,n=({signal:e})=>E({...s,signal:e}),o[2]=void 0,o[3]=n}else n=o[3];return o[4]!==t||o[5]!==n||o[6]!==e?(r={queryKey:t,queryFn:n,...e},o[4]=t,o[5]=n,o[6]=e,o[7]=r):r=o[7],(0,_.useQuery)(r)}(e);e:{if(d||!T?.is_retailer_eligible){t=void 0;break e}t=T}let A=t,N=A?.store_type_for_modal_text;R[2]!==N?(n=(0,s.R)(N),R[2]=N,R[3]=n):n=R[3];let O=n,h=A?.expires_at,u=A?.discount_amount,C=A?.minimum_amount,I=A?.max_offer_amount,D=(A?.discount_bps||0)/100,S=A?.discount_bps,P=A?.offer_name,p=A?.offer_state,m=A?.modal_image_desktop,f=A?.modal_image_mobile,v=A?.has_free_shipping;R[4]!==O||R[5]!==P||R[6]!==p||R[7]!==m||R[8]!==f||R[9]!==v||R[10]!==h||R[11]!==u||R[12]!==C||R[13]!==I||R[14]!==D||R[15]!==S?(o={expiresAt:h,incentiveAmount:u,incentiveMinimum:C,incentiveMaxOfferAmount:I,incentivePercent:D,incentiveBps:S,incentiveOfferName:P,incentiveOfferState:p,desktopModalImage:m,mobileModalImage:f,hasFreeShipping:v,storeTypeWithVerticalizedOther:O},R[4]=O,R[5]=P,R[6]=p,R[7]=m,R[8]=f,R[9]=v,R[10]=h,R[11]=u,R[12]=C,R[13]=I,R[14]=D,R[15]=S,R[16]=o):o=R[16];let y=o,U=A?.is_retailer_eligible,G=A?.offer_name,g="SHOPIFY_FIRST_ORDER_INCENTIVE_OFFER"===G;R[17]===Symbol.for("react.memo_cache_sentinel")?(a=["FAIRE_DIRECT_SIGN_UP","FAIRE_DIRECT_RETAILER_FOI_ORDER_CANCELLATION"],R[17]=a):a=R[17];let L=a.includes(A?.source??""),M="FIRST_ORDER_INCENTIVE_AUTO_EXTEND_V1"===G||"PERSONALIZED_FIRST_ORDER_INCENTIVE_V2_AUTO_EXTEND"===G,b="LAST_CHANCE_FIRST_ORDER_INCENTIVE_V1"===G||"PERSONALIZED_LAST_CHANCE_FIRST_ORDER_INCENTIVE_V1"===G,k=!!A,B=!!y?.hasFreeShipping;return R[18]!==y||R[19]!==k||R[20]!==L||R[21]!==M||R[22]!==b||R[23]!==d||R[24]!==B||R[25]!==U||R[26]!==g?(c={isLoading:d,isRetailerFoiEligible:U,formattedIncentiveData:y,isLastChanceIncentive:b,isFirstOrderIncentiveAutoExtendEnabled:M,isFirstOrderForFaireDirectIncentive:L,hasFirstOrderIncentive:k,shouldShowShopifyIncentive:g,isMaximalistFoi:B},R[18]=y,R[19]=k,R[20]=L,R[21]=M,R[22]=b,R[23]=d,R[24]=B,R[25]=U,R[26]=g,R[27]=c):c=R[27],c}},340171:(e,t,n)=>{n.d(t,{k:()=>A});var i=n(11241),r=n(188147),o=n(987374);n(34268);let E=function(e,t){let n,i=((n=t?.headers??new Headers).has("content-type")||n.set("content-type","application/json"),{route:"/api/conductor/component/:componentToken",service:"backend",url:`/api/conductor/component/${e}`,method:"GET",...t,headers:n});return(0,o.E)(i)};var _=n(427507),s=n(765803),a=n(532722),c=n(377654),R=n(299220),l=n(874432),T=n(834023),d=n(924165);let A=e=>{let t,n,o,A,N,O,h=(0,i.c)(22),{surface:u,enabled:C,componentToken:I,listenForBackendInvalidation:D,queryParameters:S}=e,P=(0,r.lU)();h[0]!==S||h[1]!==u?(t=s.hV.build({surface:u,...S}),h[0]=S,h[1]=u,h[2]=t):t=h[2];let p=t,m=!1!==C&&!!I,f=!1!==C&&P;h[3]!==m?(n={enabled:m},h[3]=m,h[4]=n):n=h[4];let v=function(e,t){let n,r,o,s=(0,i.c)(10);if(s[0]!==e||void 0!==s[1]?(n=function(e,t){let{headers:n,...i}=t??{};return[`/api/conductor/component/${e}`,i,n?[...n]:[]]}(e,void 0),s[0]=e,s[1]=void 0,s[2]=n):n=s[2],s[3]!==e||void 0!==s[4]){var a;a=void 0,r=({signal:t})=>E(e,{...a,signal:t}),s[3]=e,s[4]=void 0,s[5]=r}else r=s[5];return s[6]!==n||s[7]!==r||s[8]!==t?(o={queryKey:n,queryFn:r,...t},s[6]=n,s[7]=r,s[8]=t,s[9]=o):o=s[9],(0,_.useQuery)(o)}(I??"",n);h[5]!==f?(o={enabled:f,staleTime:1/0,gcTime:1/0},h[5]=f,h[6]=o):o=h[6];let y=(0,a.IT)(p,o),U=(0,d.Z)(u,S),G=!1!==C&&D;
1h[7]!==U||h[8]!==u||h[9]!==G?(A={invalidationCallback:U,listenForBackendInvalidation:G,surface:u},h[7]=U,h[8]=u,h[9]=G,h[10]=A):A=h[10],(e=>{let t,n,r,o=(0,i.c)(8),{surface:E,invalidationCallback:_,listenForBackendInvalidation:s}=e,a=void 0!==s&&s;o[0]!==_||o[1]!==E?(t=e=>{E&&e.type===l.W.Type.CONDUCTOR_CAMPAIGN_UPDATED&&e.conductor_campaign_updated?.surfaces?.includes(E)&&_()},o[0]=_,o[1]=E,o[2]=t):t=o[2];let d=t;o[3]!==d||o[4]!==a||o[5]!==E?(n=()=>{if(!a||!E)return;let e=R.O.get().getOrInitChannel(c.E.faireGeneral());if(!e)return;let t=e.subscribe(d);return()=>e.unsubscribe(t)},r=[a,d,E],o[3]=d,o[4]=a,o[5]=E,o[6]=n,o[7]=r):(n=o[6],r=o[7]),(0,T.useEffect)(n,r)})(A);let{data:g,isPending:L}=I?v:y,M=g?.component?.sdui_component?.view_layout,b=g?.component?.interstitial_modal_and_desktop_modal,k=!!M,B=g?.component?.feature_name,w=g?.component?.child_component_feature_names;h[11]!==g?.component?.on_view_actions?(N=g?.component?.on_view_actions??[],h[11]=g?.component?.on_view_actions,h[12]=N):N=h[12];let F=N,W=I?m&&L:f&&L,H=g?.component?.token;return h[13]!==w||h[14]!==b||h[15]!==F||h[16]!==M||h[17]!==B||h[18]!==W||h[19]!==k||h[20]!==H?(O={componentToken:H,shouldShowConductor:k,conductorSduiViewLayout:M,isConductorComponentPending:W,featureName:B,componentFeatureNames:w,conductorOnViewActions:F,conductorInterstitialModalAndDesktopModal:b},h[13]=w,h[14]=b,h[15]=F,h[16]=M,h[17]=B,h[18]=W,h[19]=k,h[20]=H,h[21]=O):O=h[21],O}},377654:(e,t,n)=>{n.d(t,{E:()=>_,G:()=>s});var i=n(791630),r=n(162080);let o=()=>(0,r.F)("switchboardUrl",E()),E=()=>{switch((0,i.p)()){case"production":return"wss://www.faire.com:443";case"prerelease":return"wss://www.prerelease.faire.dev";case"staging2":return"wss://www.staging.faire.dev";case"sandbox":return a();default:return"wss://www.faire-stage.com"}},_={faireGeneral:()=>`${o()}/web-socket`,retailerNotification:()=>`${o()}/retailer-notification-web-socket`},s=e=>e.replace("wss://www.","wss://switchboard."),a=()=>{let e=(0,r.F)("backendUrl","").match(/e2e(-fe|-e2e|-common)?(-\d+){1,2}\.sandbox(\.oci)?\.faire\.team/);return e?`wss://${e[0]}`:"wss://backend-web"}},532722:(e,t,n)=>{n.d(t,{IT:()=>s,rK:()=>a});var i=n(11241),r=n(765803),o=n(427507),E=n(128780);function _(e,t){let{headers:n,...i}=t??{};return["/api/conductor/component",e,i,n?[...n]:[]]}function s(e,t,n){let E,s,a,c=(0,i.c)(10);if(c[0]!==n||c[1]!==e?(E=_(e,n),c[0]=n,c[1]=e,c[2]=E):E=c[2],c[3]!==n||c[4]!==e)s=({signal:t})=>{let i={...n,signal:t};return(0,r.Ay)(e,i)},c[3]=n,c[4]=e,c[5]=s;else s=c[5];return c[6]!==E||c[7]!==s||c[8]!==t?(a={queryKey:E,queryFn:s,...t},c[6]=E,c[7]=s,c[8]=t,c[9]=a):a=c[9],(0,o.useQuery)(a)}function a(){let e,t=(0,i.c)(2),n=(0,E.useQueryClient)();return t[0]!==n?(e=(e,t,i,r)=>n.invalidateQueries({queryKey:_(e,t),...i},r),t[0]=n,t[1]=e):e=t[1],e}},765803:(e,t,n)=>{n.d(t,{Ay:()=>o,hV:()=>i});var i,r=n(987374);n(34268),n(73049),(i||(i={})).build=e=>e;let o=function(e,t){let n,i=((n=t?.headers??new Headers).has("content-type")||n.set("content-type","application/json"),{route:"/api/conductor/component",service:"backend",url:"/api/conductor/component",method:"GET",params:e,...t,headers:n});return(0,r.E)(i)}},874432:(e,t,n)=>{var i,r,o;n.d(t,{W:()=>i}),(o=(r=i||(i={})).Type||(r.Type={})).ECHO_REQUEST="ECHO_REQUEST",o.ECHO_RESPONSE="ECHO_RESPONSE",o.CONVERSATION_UPDATED="CONVERSATION_UPDATED",o.ALERT_BANNER_UPDATED="ALERT_BANNER_UPDATED",o.DRAFT_ORDER_BRAND_EVENT="DRAFT_ORDER_BRAND_EVENT",o.EXPRESS_DELIVERY_UPDATED="EXPRESS_DELIVERY_UPDATED",o.BATCH_OPERATION_UPDATED="BATCH_OPERATION_UPDATED",o.BRAND_NUDGE_TASK_UPDATED="BRAND_NUDGE_TASK_UPDATED",o.CART_DUTIES_UPDATED="CART_DUTIES_UPDATED",o.CART_SUMMARY_SHIPPING_COSTS_ESTIMATED="CART_SUMMARY_SHIPPING_COSTS_ESTIMATED",o.RETAILER_USER_NOTIFICATION_COUNT_UPDATED="RETAILER_USER_NOTIFICATION_COUNT_UPDATED",o.BRAND_IMAGE_NUDGE_GENERATED="BRAND_IMAGE_NUDGE_GENERATED",o.BRAND_LISTING_NUDGE_GENERATED="BRAND_LISTING_NUDGE_GENERATED",o.BRAND_UPDATED_TO_REVIEW_STATE="BRAND_UPDATED_TO_REVIEW_STATE",o.BRAND_RECEIVED_FIRST_ORDER="BRAND_RECEIVED_FIRST_ORDER",o.TERMS_LIMIT_INCREASE_REQUEST_APPROVED="TERMS_LIMIT_INCREASE_REQUEST_APPROVED",o.TERMS_LIMIT_INCREASE_REQUEST_RECEIVED="TERMS_LIMIT_INCREASE_REQUEST_RECEIVED",o.PRODUCT_REVIEW_INCENTIVE_GRANTED="PRODUCT_REVIEW_INCENTIVE_GRANTED",o.CONDUCTOR_CAMPAIGN_UPDATED="CONDUCTOR_CAMPAIGN_UPDATED",r.build=e=>({...e??{}})},901577:(e,t,n)=>{n.d(t,{M:()=>r});var i,r=((i={}).GIFT="Gift Store",i.CLOTHING="Clothing Boutique",i.HOME_DECOR="Home Decor Store",i.SPA_OR_SALON="Spa / Salon / Beauty Store",i.GENERAL="General Store / Mercantile",i.FLORIST_OR_GARDEN="Florist / Garden Store",i.KIDS_OR_TOY="Kids / Toy Store",i.CAFE_OR_RESTAURANT="Cafe / Restaurant",i.FITNESS_OR_YOGA="Fitness / Yoga Studio",i.FURNITURE="Furniture Store",i.PET="Pet Store",i.BOOK="Bookstore",i.GROCERY_OR_LIQUOR="Grocery / Liquor Store",i.OTHER="Other",i)},924165:(e,t,n)=>{n.d(t,{Z:()=>E}
1);var i=n(11241),r=n(765803),o=n(532722);let E=(e,t)=>{let n,E,_=(0,i.c)(6);if(_[0]!==t||_[1]!==e)n=r.hV.build({surface:e,...t}),_[0]=t,_[1]=e,_[2]=n;else n=_[2];let s=n,a=(0,o.rK)();return _[3]!==a||_[4]!==s?(E=()=>a(s,void 0,{refetchType:"active"}),_[3]=a,_[4]=s,_[5]=E):E=_[5],E}},990981:(e,t,n)=>{n.d(t,{q:()=>N});var i=n(11241),r=n(51124),o=n(679273),E=n(395623),_=n(188147),s=n(987374);n(34268);let a=function(e){let t,n=(t=e?.headers??new Headers,{route:"/api/faire-direct-marketplace-discount/discount-data",service:"backend",url:"/api/faire-direct-marketplace-discount/discount-data",method:"GET",...e,headers:t});return(0,s.E)(n)};var c=n(427507),R=n(433147),l=n(764601),T=n(309684),d=n(695697),A=n(464749);let N=()=>{let e,t,n,s,N,O,h,u,C,I,D,S,P,p=(0,i.c)(48),m=(0,_.lU)();p[0]!==m?(e={staleTime:1/0,enabled:m,refetchOnMount:!1},p[0]=m,p[1]=e):e=p[1];let{data:f,refetch:v}=function(e){let t,n,r,o=(0,i.c)(8);if(void 0!==o[0]?(t=function(e){let{headers:t,...n}=e??{};return["/api/faire-direct-marketplace-discount/discount-data",n,t?[...t]:[]]}(void 0),o[0]=void 0,o[1]=t):t=o[1],void 0!==o[2]){var E;E=void 0,n=({signal:e})=>a({...E,signal:e}),o[2]=void 0,o[3]=n}else n=o[3];return o[4]!==t||o[5]!==n||o[6]!==e?(r={queryKey:t,queryFn:n,...e},o[4]=t,o[5]=n,o[6]=e,o[7]=r):r=o[7],(0,c.useQuery)(r)}(e),{localNum:y}=(0,E.t)(),{formatMoney:U}=(0,T.b)(),G=f?.expires_at??0;p[2]!==G?(t=(0,d.c)(G,Date.now()),p[2]=G,p[3]=t):t=p[3];let g=t,L=g+1,M=g<1,b=f?.max_discount_amount;p[4]!==G?(n=(0,o.qP)(G,"PPpx"),p[4]=G,p[5]=n):n=p[5];let k=n;p[6]!==G?(s=(0,o.qP)(G,"MMM d"),p[6]=G,p[7]=s):s=p[7];let B=s;p[8]!==G?(N=(0,o.qP)(G,"PP"),p[8]=G,p[9]=N):N=p[9];let w=N;p[10]!==y||p[11]!==L?(O=y(L),p[10]=y,p[11]=L,p[12]=O):O=p[12];let F=O,W=(f?.discount_bps??0)/1e4;p[13]!==y||p[14]!==W?(h=y(W,{style:"percent"}),p[13]=y,p[14]=W,p[15]=h):h=p[15];let H=h;p[16]!==U||p[17]!==b?(u=U({money:(0,R.K)(b),roundingStrategy:l.G.DROP_CENTS}),p[16]=U,p[17]=b,p[18]=u):u=p[18];let V=u;p[19]!==f?.in_eligible_brand_tokens?(C=f?.in_eligible_brand_tokens??[],p[19]=f?.in_eligible_brand_tokens,p[20]=C):C=p[20];let K=C,Y=f?.expires_at??0;p[21]!==Y?(I=(0,o.qP)(Y,"px"),p[21]=Y,p[22]=I):I=p[22];let q=I,Q=f?.offer_name,x=f?.modal_image_desktop,$=f?.modal_image_mobile,z=f?.offer_name==="FAIRE_DIRECT_MARKETPLACE_DISCOUNT",X=f?.offer_name==="EVERGREEN_MARKETPLACE_DISCOUNT",Z=f?.store_type_for_modal_text;p[23]!==Z?(D=(0,r.R)(Z),p[23]=Z,p[24]=D):D=p[24];let J=D;p[25]!==f||p[26]!==m?(S=((e,t)=>{if(!e)return!1;let{is_retailer_eligible:n,offer_name:i,expires_at:r}=e,o=!!r&&(0,A.Y)(r,Date.now());return!!n&&t&&("EVERGREEN_MARKETPLACE_DISCOUNT"===i||!o)})(f,m),p[25]=f,p[26]=m,p[27]=S):S=p[27];let j=S;return p[28]!==G||p[29]!==B||p[30]!==k||p[31]!==w||p[32]!==q||p[33]!==H||p[34]!==V||p[35]!==j||p[36]!==K||p[37]!==X||p[38]!==z||p[39]!==M||p[40]!==F||p[41]!==x||p[42]!==$||p[43]!==Q||p[44]!==v||p[45]!==L||p[46]!==J?(P={hasIncentive:j,formattedDiscountPercentNumber:H,formattedMaxDiscountMoney:V,lessThanOneDayRemaining:M,minimumOneDaysRemainingNumber:F,daysRemaining:L,expiresAtDate:B,expiresAtTime:q,expiresAtDateTime:k,ineligibleBrandTokens:K,expiresAt:G,expiresAtDateWithYear:w,offerName:Q,modalImageDesktop:x,modalImageMobile:$,isFaireDirectMarketplaceIncentive:z,isFaireDirectEvergreenIncentive:X,storeType:J,refetchDataAndUpdateStores:v},p[28]=G,p[29]=B,p[30]=k,p[31]=w,p[32]=q,p[33]=H,p[34]=V,p[35]=j,p[36]=K,p[37]=X,p[38]=z,p[39]=M,p[40]=F,p[41]=x,p[42]=$,p[43]=Q,p[44]=v,p[45]=L,p[46]=J,p[47]=P):P=p[47],P}},995053:(e,t,n)=>{n.d(t,{h:()=>r});var i,r=((i={}).CONDUCTOR_SURFACE_UNKNOWN="CONDUCTOR_SURFACE_UNKNOWN",i.ANY="ANY",i.HOME_PAGE_TOP="HOME_PAGE_TOP",i.CHECKOUT_PAGE_TOP="CHECKOUT_PAGE_TOP",i.CHECKOUT_PAGE_ORDER_SUMMARY="CHECKOUT_PAGE_ORDER_SUMMARY",i.SITE_WIDE_TOP_BANNER="SITE_WIDE_TOP_BANNER",i.SITE_WIDE_MODAL="SITE_WIDE_MODAL",i.BOTTOM_SHEET_MODAL="BOTTOM_SHEET_MODAL",i.RETAILER_STORES_PAGE_TOP="RETAILER_STORES_PAGE_TOP",i.HOMEPAGE_BANNER="HOMEPAGE_BANNER",i.APP_HOMEPAGE_BANNER="APP_HOMEPAGE_BANNER",i.MARKET_ANNOUNCEMENT_BANNER="MARKET_ANNOUNCEMENT_BANNER",i.INSIDER_LANDING_PAGE_BANNER="INSIDER_LANDING_PAGE_BANNER",i.REVIEWS_FEED_PAGE_TOP="REVIEWS_FEED_PAGE_TOP",i.RETAILER_SITE_WIDE_NUDGE="RETAILER_SITE_WIDE_NUDGE",i.NEW_BRANDS_CATEGORY_PAGE="NEW_BRANDS_CATEGORY_PAGE",i.NEW_PRODUCTS_CATEGORY_PAGE="NEW_PRODUCTS_CATEGORY_PAGE",i.RETAILER_ORDERS_PAGE_TOP="RETAILER_ORDERS_PAGE_TOP",i.RETAILER_ORDER_DETAILS_PAGE="RETAILER_ORDER_DETAILS_PAGE",i.INSIDER_LANDING_PAGE_UPSELL_BANNER="INSIDER_LANDING_PAGE_UPSELL_BANNER",i.POST_ORDER_CONFIRMATION_PAGE="POST_ORDER_CONFIRMATION_PAGE",i.HOMEPAGE_BANNER_CAROUSEL="HOMEPAGE_BANNER_CAROUSEL",i.PROMO_MODAL_CALCULATOR_BACKEND="PROMO_MODAL_CALCULATOR_BACKEND",i.ORDER_DETAILS_MODAL="ORDER_DETAILS_MODAL",i.RETAILER_REORDER_PAGE_TOP="RETAILER_REORDER_PAGE_TOP",i.RETAILER_INVOICE_PAGE="RETAILER_INVOICE_PAGE",i.RETAILER_PDP_PROMO_BANNER="RETAILER_PDP_PROMO_BANNER",i.APP_WIDE_FULL_SCREEN_MODAL="APP_WIDE_FULL_SCREEN_MODAL",i.RETAILER_ORDERS_PAGE_BANNER_CAROUSEL="RETAILER_ORDERS_PAGE_BANNER_CAROUSEL",i)}}]); 2//# sourceMappingURL=71873-f18c939a1201b803.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.