PageSourceSearch

https://karrotmarket.com/_assets/(_lang).buy-sell.new-BVRPDcka.js

js karrotmarket.com collected 2026-09-24 09:12:39 UTC 20,846 bytes, 9 lines download raw bytes

1
2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="c4235949-7f4a-5d4c-92f8-8843c27d2038")}catch(e){}}();
3import{u as Fe,a as Ae,b as Pe,r as j,j as e,T as _e,C as Me}from"./constants-psci6gc1.js";import{e as N,i as q}from"./fleamarketIdlError-Do-JGE7V.js";import{o as Se,d as he,s as Ne,I as z,v as Oe,S as Q,i as De}from"./variants-BpGuSOo8.js";import{a as Ve,b as Ue,c as We,m as ze,d as Be,l as Ge,F as He,U as Ke,e as Ye,g as qe,I as Qe,h as $e,C as O,A as Xe,i as Ze,j as Je,k as er,t as rr,n as tr,x as ir,y as ar,z as or,w as sr,G as nr,o as lr,p as cr,q as dr,u as ur,v as mr,f as hr,r as gr,M as fr,B as pr,s as xr,D as yr}from"./(_lang).buy-sell.new.css-Cdzs6kAj.js";import{I as Tr}from"./IconChevronRightLine-Dk4j3wBd.js";import{u as Cr,S as $,H as jr,a as Er,b as ge,F as y,T as fe,I as Ir,G as vr}from"./Header-BCtZByOG.js";import{I as wr}from"./IconReceiptFill-BixaSiWG.js";import{u as br,a as B,H as kr,b as Rr,M as P,c as Lr,d as Fr,e as Ar}from"./useResponsiveClientValue-82rXJak1.js";import{l as u,u as Pr,V as l,T as I,N as _r,_ as Mr,H as Sr}from"./Link-BOm1qwNN.js";import{F as w}from"./getFleamarketArticlePriceLabel-rvkMtHVw.js";import{L as pe,g as xe}from"./ModalLocationVerification-BfngTnGh.js";import{T as Nr}from"./StepIndicator-DsblN2Ap.js";import{f as Or,n as Dr,P as Vr,r as Ur,i as Wr}from"./FleamarketArticleStatusV2-jOKjdzCz.js";import{t as zr,d as Br,i as Gr}from"./titleMeta-B7faHupF.js";import{s as Hr}from"./safeMeta-D1Yix68w.js";import{C as _,M as Kr,I as ye}from"./ModalTradeLocationInput-VECVI3tx.js";import{u as Yr,B as ie,s as A}from"./services-VIymWOJT.js";import{i as Te}from"./WhereToMeet-Cna9jdTU.js";import{L as Ce}from"./Loader-B6W929u-.js";import{T as je}from"./ArticleDetailMoreOptions-K9FbVnm4.js";import{C as qr}from"./Checkbox-Cu67QP-A.js";import{c as ae}from"./exports-Bqt9E6uA.js";import"./DetailGroup-DATYx5MB.js";import"./IconChevronLeftLine-CYEqnivC.js";import"./KarrotUserProfileSummary-l99xPYRd.js";import"./KarrotUserAvatar-BOOS6-3D.js";import"./useLocale-BvOEoNgk.js";import"./IconHeartLine-Bzvg-_bk.js";import"./IconShoppingbagLine-DnkRyOr3.js";import"./useMutation-BoetWcyS.js";import"./mutation-Boo0lJuK.js";import"./IconKarrotSymbol-DjDfRHuS.js";import"./useAutoCompleteSessionToken-BUaWOfCS.js";import"./CurrentLocationButton-BS2xBd3x.js";import"./IconMagnifyingglassLine-B3UgUX6o.js";import"./index-CV62XGSl.js";import"./IconChevronDownLine-CwIQAFhQ.js";import"./transformImageUrl-DOKV3ylq.js";const Qr=Se({name:Ne().optional(),latitude:he(),longitude:he()});function $r(t){return Object.entries(t).reduce((x,[E,f])=>(Xr(f)&&(x[E]=f),x),{})}function Xr(t){return Qr.safeParse(t).success}const Zr=2,Jr=({savedWhereToMeet:t,newWhereToMeet:x})=>{const E=u.mergeWith({},t,x,(X,G)=>{if(!u.isNil(G))return G}),f=$r(E);if(Object.keys(f).length<=Zr)return f;const M=u.first(Object.keys(f));return M?u.omit(f,M):f},Vt=({data:t,matches:x})=>{if(!t)return[];const E=x.flatMap(f=>De(f)?f.meta??[]:[]);return Hr([...E,...zr("Karrot | Post your listing for free"),...Br("Post your listing for free and sell or trade with locals in your community."),...Gr(t.karrotLocalCountryCode),{name:"twitter:card",content:"summary_large_image"},{property:"og:type",content:"website"}])};function Ut(){var de,ue;const t=Pr(),{userWhereToMeet:x,categoryList:E}=Fe(),{makeHref:f,navigateToNormalizedUrl:M}=br(),X=Ae(),{login:G}=Cr(),oe=Pe(),Z=j.useRef(null),m=Yr(),J=B(!1),H=B(!1),K=B(!1),D=B(!1),ee=B(!1),[k,b]=j.useState(!1),[V,Y]=j.useState(!1),[R,se]=j.useState(!1),[U,Ee]=j.useState(null),[re,Ie]=j.useState(null),{checkCreateArticlePermission:ne}=ur({}),v=x&&t.currentUserLocation?x[t.currentUserLocation.userLocation.h3Index]:null,le={category:null,categoryPredictions:[],images:[],title:"",description:"",price:"",whereToMeet:{name:(v==null?void 0:v.name)??"",latitude:v==null?void 0:v.latitude,longitude:v==null?void 0:v.longitude,isUserInput:!!v},listingType:"sell",offerable:!0,inSearchOf:void 0},s=Ve({defaultValues:le,resolver:Ue(mr)}),S=We({control:s.control,name:"images"}),{errors:T}=s.formState,c=s.watch(),p=j.useMemo(()=>({imageField:k||V||R,aiWriting:k||c.images.length===0||R||V,formFields:k||R,priceField:k||
3c.listingType===w.Free||R}),[k,V,R,c.images.length,c.listingType]);j.useEffect(()=>{const r=$.getArticleFormData(t.karrotLocalCountryCode);Ee(r),r&&ee.activate()},[]);const te=j.useCallback(u.debounce((r,a)=>{$.setArticleFormData({countryCode:a,data:r})},500),[]);j.useEffect(()=>{const r=u.omit(c,"whereToMeet"),a=u.omit(s.formState.defaultValues,"whereToMeet");if(!(u.isEqual(r,a)||k))return te(r,t.karrotLocalCountryCode),()=>{te.cancel()}},[c,k,te]);const ve=async(r,a)=>{try{const o=Jr({savedWhereToMeet:{...x??{}},newWhereToMeet:{[r]:a}});if(u.isEqual(o,x))return;const i=u.omitBy(o,n=>u.isNil(n)||u.isPlainObject(n)&&u.isEmpty(n));if(u.isEmpty(i)&&u.isNil(x))return;if(u.isEmpty(i)){await A.getInstance().karrotmarket.deleteWhereToMeet();return}await A.getInstance().karrotmarket.upsertWhereToMeet({whereToMeet:i})}catch(o){console.error(o)}},we=async()=>{var i,n,h,d,C;b(!0);const r=await ne();if(!r.ok){if(r.reason.type===N.ErrorType.ERROR_TYPE_OPERATION_BLOCK_IDENTIFICATION_REQUIRED){H.activate(),b(!1);return}if(r.reason.type===N.ErrorType.ERROR_TYPE_FLEAMARKET_REQUIRED_CHECK_IN){K.activate(),b(!1);return}b(!1),m.error({text:r.reason.message});return}const a=t.currentUserLocation;if(!a){m.error({text:"Please select your location."}),b(!1);return}const o=s.getValues();
3try{const g=hr.toCreateRequestParams({formValues:o}),L=await A.getInstance().karrotmarket.postArticle({data:g}),F=o.listingType==="free"?{fleamarketArticleTradeType:"FREE",isOpenOffers:"NOT_OFFERABLE"}:o.listingType===w.Sell?{fleamarketArticleTradeType:"SALE",isOpenOffers:o.offerable?"OPEN":"CLOSE"}:{fleamarketArticleTradeType:"TRADE",isSearchOf:o.inSearchOf??void 0};if(Lr(u.merge({articleId:L.id,photoCount:o.images.length,countryCode:t.karrotLocalCountryCode,serviceName:Q.BUY_SELL},F)),$.deleteArticleFormData(t.karrotLocalCountryCode),await ve(a.userLocation.h3Index,{name:(i=g.trading_location)==null?void 0:i.name,latitude:o.whereToMeet.latitude,longitude:o.whereToMeet.longitude}),L&&t.currentUserLocation){const W=Me.fromString(t.currentUserLocation.userRegion.countryCode).toKarrotLocalCountryCode();if(u.isNil(W))return;M({pathname:`/${W}/buy-sell/${L.nodeId}/`})}}catch(g){if(console.log(g,q(g)),q(g)){u.isNil((h=(n=g.message)==null?void 0:n.message)==null?void 0:h.text)&&ae(g),m.error({text:((C=(d=g.message)==null?void 0:d.message)==null?void 0:C.text)??"Failed to post article. Please try again."}),b(!1);return}if(ae(g),g instanceof gr){m.error({text:g.message}),b(!1);return}m.error({text:"Failed to post article. Please try again."}),b(!1)}},be=()=>{m.error({text:"Please check for invalid input values."})};j.useEffect(()=>{oe.state==="idle"&&b(!1)},[oe.state]),j.useEffect(()=>{ne().then(r=>{if(!r.ok){if(r.reason.type===N.ErrorType.ERROR_TYPE_OPERATION_BLOCK_IDENTIFICATION_REQUIRED){H.activate();return}if(r.reason.type===N.ErrorType.ERROR_TYPE_FLEAMARKET_REQUIRED_CHECK_IN){K.activate();return}m.error({text:r.reason.message})}})},[]);const ke=async r=>{Y(!0);const a=r.target.files;if(!a){Y(!1);return}const o=Array.from(a),i=fr-S.fields.length,n=o.slice(0,i);if(o.length-n.length>0&&m.error({text:pr.image.maxLength}),n.length===0){Y(!1);return}try{const d=await xr({files:n});if(d.length===0)return;d.forEach(C=>{S.append({pictureId:C.pictureId,preview:C.preview})}),s.trigger("images")}catch(d){console.error(d),m.error({text:"Failed to upload images. Please try again."})}finally{Y(!1)}},Re=r=>{S.remove(r),s.trigger("images")},ce=async()=>{var a,o;const r=S.fields.map(i=>i.pictureId);if(r.length!==0){se(!0);try{const i=await A.getInstance().karrotmarket.aiWriting({pictureIds:r}),h={...s.getValues(),title:i.content.title,description:i.content.content};if(i.categoryPredictions&&i.categoryPredictions.length>0){const d=i.categoryPredictions[0].category;h.category={id:d.id,name:d.name,articleProperties:d.articleProperties.map(C=>{const g=i.content.articlePropertyContents.find(L=>L.identifier===C.identifier);return{property:C,selectedArticleProperty:g?yr(C,g):""}})},h.categoryPredictions=i.categoryPredictions}i.priceInference&&Ie(i.priceInference),s.reset(h,{keepDefaultValues:!0,keepDirty:!1,keepTouched:!1,keepErrors:!1}),Fr({countryCode:t.karrotLocalCountryCode,serviceName:Q.BUY_SELL})}catch(i){ae(i),console.log(i,q(i));const n=q(i)?(o=(a=i.message)==null?void 0:a.message)==null?void 0:o.text:void 0;m.error({text:n??"Failed to generate content. Please try again."}),Ar({countryCode:t.karrotLocalCountryCode,serviceName:Q.BUY_SELL})}finally{setTimeout(()=>{se(!1)},0)}}},Le=()=>{const{dirtyFields:r}=s.formState;return!!(r.title||r.description||r.category)};return j.useEffect(()=>{if(u.isNil(t.user)){const r=f({pathname:`/${t.karrotLocalCountryCode}/buy-sell/new/`,queryString:X.search});G({redirectPath:r})}},[t.user,X.search]),e.jsxs(l,{minHeight:"100vh",className:ze,children:[e.jsx(jr,{isAuthenticated:!!t.user,style:{background:"transparent"},searchBar:{shouldShow:!1},locationSelectMenu:{shouldShow:!1},sellButton:{disabled:!0}}),e.jsx(l,{as:"main",paddingInline:4,paddingBottom:4,justify:"center",children:e.jsxs(l,{as:"article",maxWidth:"1024px",className:Be,border:!0,borderRadius:"medium",borderColor:"neutral",backgroundColor:"elevation-raised",children:[e.jsx(l,{children:e.jsxs(l,{direction:"row",gap:1.5,align:"center",padding:4,borderBottom:!0,borderColor:"neutral",children:[e.jsx(z,{svg:wr,size:4.5}),e.jsx(I,{variant:"body-1",weight:"bold",as:"h1",children:"New listing"})]})}),e.jsxs(l,{direction:"row",width:"100%",wrap:!1,children:[e.jsx(l,{direction:"column",width:"100%",maxWidth:{s:"100%",l:"400px"},gap:6,padding:4,borderEnd:{s:!1,l:!0},borderColor:"neutral",className:Ge,children:e.jsx(He,{...s,children:e.jsxs(l,{as:"form",width:"100%",gap:6,attributes:{onSubmit:s.handleSubmit(we,be)},children:[e.jsxs(l,{children:[e.jsx(I,{variant:"body-2",weight:"medium",children:"Images"}),e.jsxs(l,{wrap:!0,direction:"row",gap:2.5,as:"ol",paddingTop:3,paddingBottom:1,children:[e.jsx(Ke,{images:S.fields.map(r=>({id:r.id,src:r.preview})),disabled:p.imageField,onDragEnd:(r,a)=>{S.move(r,a)},onRemove:Re}),e.jsx("li",{className:Ye,children:e.jsx("button",{type:"button",className:$e({hasError:!!T.images}),disabled:p.imageField,"aria-label":V?"Uploading images":"Add photos","aria-controls":"image-upload-input",onClick:r=>{r.preventDefault(),Z.current&&Z.current.click()},children:V?e.jsx(l,{justify:"center",align:"center",className:qe,attributes:{role:"status","aria-live":"polite","aria-label":"Uploading images"},children:e.jsx(Ce,{size:"medium",color:"inherit"})}):e.jsxs(l,{justify:"center",align:"center",children:[e.jsx(z,{svg:Qe,size:7,color:p.imageField?"disabled":"neutral-faded"}),e.jsx(I,{variant:"caption-1",weight:"medium",color:p.imageField?"disabled":"neutral-faded",children:"Add Photos"})]})})})]}),T.images&&e.jsx(I,{variant:"body-3",color:"critical",children:T.images.message}),e.jsxs(kr,{children:[e.jsx("input",{type:"hidden",...s.register("images")}),e.jsx("input",{type:"file",id:"image-upload-input",ref:Z,multiple:!0,accept:Er.join(","),onChange:ke})]}
3),e.jsx(l,{paddingTop:3,children:e.jsx(ie,{color:"neutral",size:"medium",fullWidth:!0,disabled:p.aiWriting,icon:R?e.jsx(Ce,{size:"small",color:"inherit"}):e.jsx(z,{svg:e.jsx(ge,{}),size:4}),onClick:()=>{if(Rr({countryCode:t.karrotLocalCountryCode,serviceName:Q.BUY_SELL}),Le()){D.activate();return}ce()},children:R?"Generating...":"Generate content"})}),e.jsx(P,{title:"AI Writing",description:"This will fill your form with AI-generated content, replacing anything you've written.",open:D.active,onClose:D.deactivate,children:e.jsxs(P.ButtonGroup,{children:[e.jsx(P.Cancel,{onClose:D.deactivate,children:"Cancel"}),e.jsx(P.Action,{onClick:()=>{D.deactivate(),ce()},children:"Generate Content"})]})})]}),e.jsxs(l,{children:[e.jsx(O,{control:s.control,name:"title",render:({field:{onChange:r,value:a,onBlur:o,ref:i,...n}})=>{var h;return e.jsxs(y,{size:"large",hasError:!!T.title,children:[e.jsx(y.Label,{children:"Title"}),e.jsx(fe,{size:"xlarge",placeholder:"What are you selling or giving away?",name:"title",variant:"outline",onChange:({value:d})=>{r(d),s.trigger("title")},disabled:p.formFields,value:a,onBlur:o,attributes:{...n}}),e.jsx(y.Error,{children:(h=T.title)==null?void 0:h.message})]})}}),e.jsx(Xe,{categoryList:E,loading:p.formFields,preventRefetch:R})]}),e.jsx(l,{children:e.jsx(O,{control:s.control,name:"description",render:({field:{onChange:r,value:a,onBlur:o,ref:i,...n}})=>{var h;return e.jsxs(y,{size:"large",hasError:!!T.description,children:[e.jsx(y.Label,{children:"Description"}),e.jsx(je,{size:"xlarge",placeholder:`Tell us about your item e.g. brand, material, condition and size.\r
4\r
5Include anything that you think your neighbours would like to know.`,name:"description",variant:"outline",resize:"auto",onChange:({value:d})=>{r(d),s.trigger("description")},disabled:p.formFields,inputAttributes:{style:{borderRadius:Oe.karrot.radiusMedium}},value:a,onBlur:o,className:Ze,attributes:{...n}}),e.jsx(y.Error,{children:(h=T.description)==null?void 0:h.message})]})}})}),e.jsx(l,{children:e.jsx(O,{control:s.control,name:"listingType",render:({field:{onChange:r,value:a,...o}})=>{const i=n=>{n===w.Free&&s.setValue("price","0",{shouldDirty:!0,shouldTouch:!0,shouldValidate:!0}),n===w.Sell&&c.price==="0"&&s.setValue("price","",{shouldDirty:!0,shouldTouch:!0}),r(n)};return e.jsxs(y,{size:"large",children:[e.jsx(y.Label,{children:"Listing type"}),e.jsxs(_.RadioGroup,{defaultValue:w.Sell,onValueChange:i,value:a,disabled:p.formFields,className:Je,...o,children:[e.jsx(_.RadioItem,{value:w.Sell,children:e.jsx(_.RadioLabel,{children:"For sale"})}),e.jsx(_.RadioItem,{value:w.Free,children:e.jsx(_.RadioLabel,{children:"Free"})}),e.jsx(_.RadioItem,{value:w.Trade,prefixIcon:e.jsx(z,{svg:er,size:4}),children:e.jsx(_.RadioLabel,{children:"Trade"})})]})]})}})}),e.jsxs(l,{gap:3,children:[c.listingType===w.Trade?e.jsx(l,{children:e.jsx(O,{control:s.control,name:"inSearchOf",render:({field:{name:r,value:a,onBlur:o,ref:i,onChange:n,...h}})=>{var d;return e.jsxs(y,{size:"large",hasError:!!T.inSearchOf,children:[e.jsx(je,{id:r,name:r,size:"xlarge",resize:"none",variant:"outline",placeholder:"What kind of things are you hoping to trade for?",onChange:({value:C})=>{n(C)},disabled:p.formFields,value:a??void 0,onBlur:o,attributes:{ref:i,...h}}),!T.inSearchOf&&e.jsx(y.Helper,{children:e.jsxs("a",{href:_e[t.stage],target:"_blank",rel:"noopener noreferrer",className:rr,children:[e.jsx(Ir,{size:16,className:tr})," ",e.jsx(I,{variant:"body-3",children:"What are trades?"})]})}),e.jsx(y.Error,{children:(d=T.inSearchOf)==null?void 0:d.message})]})}})}):e.jsx(O,{control:s.control,name:"price",render:({field:{onChange:r,value:a,onBlur:o,ref:i,name:n,...h}})=>{var L;const d=F=>{const W=Dr({value:F});if(W===""){r("");return}const me=W.match(Vr);me&&r(me[0])},C=()=>{const F=Ur({value:a});if(o(),Wr({price:F})){s.setValue("listingType",w.Free,{shouldDirty:!0,shouldTouch:!0});return}r(F)},g=Or({value:a});return e.jsxs(y,{size:"large",hasError:!!T.price,children:[e.jsx(y.Label,{children:"Price"}),e.jsx(fe,{size:"xlarge",placeholder:"10.00",prefix:"$",disabled:p.priceField,value:g,onChange:({value:F})=>{d(F)},onBlur:C,name:n,attributes:{ref:i,...h}}),e.jsx(y.Error,{children:(L=T.price)==null?void 0:L.message})]})}}),re?e.jsxs(l,{gap:1,padding:4,borderRadius:"medium",className:ir,children:[e.jsxs(l,{direction:"row",gap:1,align:"center",className:ar,children:[e.jsx(z,{svg:ge,
5size:4}),e.jsx(I,{variant:"body-3",weight:"medium",children:"Similar items sell for"})]}),e.jsxs(I,{variant:"body-2",weight:"bold",className:or,children:["$",re.lowerPrice," - $",re.upperPrice]})]}):null,_r({watchListingType:c.listingType,hasError:!!T.price}).with({watchListingType:"sell",hasError:!1},()=>e.jsx(l,{children:e.jsx(O,{control:s.control,name:"offerable",render:({field:{ref:r,...a}})=>e.jsx(qr,{size:"large",checked:c.offerable,disabled:p.formFields,value:"Open to offers",attributes:{...a},children:"Open to offers"})})})).with({watchListingType:"sell",hasError:!0},()=>null).with({watchListingType:"free",hasError:Mr.any},()=>e.jsx(I,{variant:"caption-1",color:"positive",children:'"Giving is not just about making a donation. It is about making a difference." - Kathy Calvin 🥕'})).otherwise(()=>null)]}),e.jsxs(l,{gap:2,children:[e.jsxs(l,{children:[e.jsx(I,{variant:"body-2",weight:"medium",children:"Where to meet"}),e.jsx(I,{variant:"body-2",weight:"regular",color:"neutral-faded",children:"Approximate location"})]}),e.jsx(ie,{type:"button",fullWidth:!0,variant:"outline",size:"large",disabled:p.formFields,endIcon:e.jsx(Tr,{size:20}),className:sr,onClick:()=>J.activate(),children:c.whereToMeet.name?c.whereToMeet.name:"Select"}),c.whereToMeet.latitude&&c.whereToMeet.longitude&&c.whereToMeet.isUserInput?e.jsx(vr,{children:e.jsx("div",{className:cr({disabled:p.formFields}),children:e.jsx(nr,{center:{lat:c.whereToMeet.latitude,lng:c.whereToMeet.longitude},zoom:15,gestureHandling:"none",clickableIcons:!1,children:e.jsx(lr,{radius:150,center:{lat:c.whereToMeet.latitude,lng:c.whereToMeet.longitude},clickable:!1})})})}):null,e.jsx(Kr,{defaultCenter:c.whereToMeet.latitude&&c.whereToMeet.longitude?{lat:c.whereToMeet.latitude,lng:c.whereToMeet.longitude}:Nr,defaultName:c.whereToMeet.name,open:J.active,onClose:()=>J.deactivate(),onSelect:({tradeLocation:r,name:a})=>{s.setValue("whereToMeet",{name:a??"",latitude:r.lat,longitude:r.lng,isUserInput:!0},{shouldDirty:!0,shouldTouch:!0})}})]}),e.jsx(l,{children:e.jsx(ie,{type:"submit",size:"large",color:"primary",fullWidth:!0,disabled:p.formFields,children:e.jsx(I,{variant:"body-2",weight:"medium",children:k?"Posting...":"Post"})})})]})})}),e.jsx(Sr,{hide:{s:!0,l:!1},children:e.jsx(l,{width:"100%",overflow:"hidden",children:e.jsx(dr,{control:s.control})})})]})]})}),t.currentUserLocation&&t.user&&e.jsxs(e.Fragment,{children:[e.jsx(pe.EventTracker,{countryCode:t.karrotLocalCountryCode,permissionType:"create_article",children:e.jsx(pe.Modal,{open:K.active,onClose:()=>{K.deactivate()},nickname:t.user.nickname,locationName:(de=xe(t.user.userLocations))==null?void 0:de.name,checkInCount:(ue=xe(t.user.userLocations))==null?void 0:ue.checkinCount,sendLocationVerificationNotification:{action:()=>A.getInstance().karrotmarket.sendLocationVerificationNotification(),onError:()=>{m.error({text:"Failed to send location verification notification. Please try again."})}},checkLocationVerification:{action:()=>A.getInstance().karrotmarket.getCreateArticlePermission(),onSuccess:()=>{m.success({text:"Check location verification successful."})},onError:r=>{if(Te(r)&&r.message.type===N.ErrorType.ERROR_TYPE_FLEAMARKET_REQUIRED_CHECK_IN){m.error({text:"Failed to check location verification. Please try again."});return}m.error({text:"Something went wrong. Please try again."})}}})}),e.jsx(ye.EventTracker,{countryCode:t.karrotLocalCountryCode,permissionType:"create_article",children:e.jsx(ye.Modal,{open:H.active,onClose:()=>{H.deactivate()},nickname:t.user.nickname,sendIdVerificationNotification:{action:()=>A.getInstance().karrotmarket.sendIdVerificationNotification({referrer:"create_article_website"}),onError:()=>{m.error({text:"Failed to send ID verification notification. Please try again."})}},checkIdVerification:{action:()=>A.getInstance().karrotmarket.getCreateArticlePermission(),onSuccess:()=>{m.success({text:"Successfully verified."})},onError:r=>{if(Te(r)&&r.message.type===N.ErrorType.ERROR_TYPE_OPERATION_BLOCK_IDENTIFICATION_REQUIRED){m.error({text:"ID verification not completed yet."});return}m.error({text:"Something went wrong. Please try again."})}}})})]}),e.jsx(et,{articleTitle:U==null?void 0:U.title,isOpen:ee.active,onClose:ee.deactivate,onContinueWithDraft:()=>{U&&s.reset({...U,whereToMeet:{...le.whereToMeet}},{keepDirty:!1,keepTouched:!1})},onStartOver:()=>{$.deleteArticleFormData(t.karrotLocalCountryCode)}})]})}const et=({articleTitle:t,isOpen:x,onClose:E,onContinueWithDraft:f,onStartOver:M})=>e.jsx(P,{title:"Continue with your draft?",description:typeof t=="string"&&t.length>0?`You have a draft titled "${t}"
6Starting a new listing will delete the draft.`:"You have a draft. Starting a new listing will delete the draft.",open:x,onClose:E,children:e.jsxs(P.ButtonGroup,{children:[e.jsx(P.Cancel,{onClose:()=>{E(),M()},children:"Start over"}),e.jsx(P.Action,{onClick:()=>{E(),f()},color:"primary",children:"Continue with draft"})]})});export{Ut as default,Vt as meta};
7//# sourceMappingURL=(_lang).buy-sell.new-BVRPDcka.js.map
8
9//# debugId=c4235949-7f4a-5d4c-92f8-8843c27d2038

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.