PageSourceSearch

https://www.artcore.com/_next/static/chunks/4949-0f032cb608367a55.js

js artcore.com collected 2026-10-01 15:16:25 UTC 27,932 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4949],{24949:(e,s,r)=>{r.r(s),r.d(s,{SellerEditPageInner:()=>D,StripeConnect:()=>M,default:()=>U});var l=r(37876),a=r(95364),i=r(77328),t=r.n(i),n=r(18847),c=r.n(n),d=r(14232),o=r(88992),u=r(89099),x=r(60577),h=r(71134),m=r(30079),p=r(29308),j=r(11613),f=r(35768),g=r(61875),v=r(45880),y=r(74413),w=r(75426),_=r(31901),b=r(4186),N=r(10553),S=r(32381),k=r(80214),P=r(5904),A=r(66492),E=r(16765),I=r(19512),T=r(1353),C=r(64885),R=r(88806),$=r(46585),F=r(88707),z=r(30738);let O=c()(()=>r.e(2466).then(r.bind(r,72466)),{loadableGenerated:{webpack:()=>[72466]},ssr:!1,loading:()=>(0,l.jsx)("div",{children:(0,l.jsx)(R.k,{})})});function U({sellerId:e,type:s="artist",sellerTypeId:r=v.Ot,initialEditData:a,...i}){let t=(0,u.useRouter)(),[n,c]=(0,d.useState)(a),o=!n&&t.isReady?`/api/edit/seller/edit?sellerId=${e||""}`:void 0;return(0,d.useEffect)(()=>{if(!o)return;let e=!1;return fetch(o).then(async s=>{if(s.status>=400)return console.log("Failed to load edit data.."),t.push("/seller");let r=await s.json();e||c(r)}),()=>{e=!0}},[o]),(0,l.jsx)(l.Fragment,{children:n?(0,l.jsx)(D,{sellerId:e,type:s,sellerTypeId:r,editData:n,...i}):(0,l.jsx)("div",{children:(0,l.jsx)(R.k,{})})})}function D({sellerId:e,type:s="artist",editData:r,sellerTypeId:i=v.Ot,...n}){let{config:c}=(0,x.r)(),I=(0,u.useRouter)(),{data:U,status:M}=(0,N.useSession)(),[L,V]=(0,d.useState)(e),[G,K]=(0,d.useState)(!1),[B,W]=(0,d.useState)(!1),H=(0,d.useRef)(!1),[q,J]=(0,d.useState)(!1);function Y(e){console.log("setSavedSoNotDirtyAnyMore",e),H.current=e}let X=r?.hasSales,Q={banner_image_url:null,image_url:null,track_price:parseFloat("1.00"),release_discount_percent:5,discography_discount_percent:20,label_share_percent:i==v.d_?100:void 0,seller_type_id:i==v.d_?v.d_:v.Ot,default_track_expense:0,discography_discount:!0,default_track_mix:!0,country:"",region:"",city:"",tags_json:[],currency:w.UM.GBP,paypal_email_confirm:r?.seller?.paypal_email,sales_digital_opt_out:!1},Z=r.seller,ee={resolver:(0,C.u)(T.uN),defaultValues:(0,d.useMemo)(()=>Z?{...Q,...Z}:Q,[Z])},es=(0,o.mN)(ee),{register:er,handleSubmit:el,watch:ea,reset:ei,setValue:et,formState:en,control:ec,setError:ed,clearErrors:eo}=es,{errors:eu}=en,ex=ea(),[eh,em,ep,ej,ef]=(0,$.j)(ex.country,r?.seller),eg=!e||!!ex.id;function ev(e){console.log("RESET",e),ei({...e}),W(!1),V(e.id)}async function ey(e){try{Y(!1),delete e.paypal_email_confirm;let r={...e,id:L};J(!0),await fetch("/api/edit/seller/save",{headers:{"Content-Type":"application/json"},method:"PUT",body:JSON.stringify(r)}).then(async r=>{let l=await r.json();if(!(r.status<400))return console.log("FAILED",l.error),(0,j.UG)("Failed to save: "+l.error),J(!1),l;{let r=l.seller;return Y(!0),(0,j.VX)(`Saved ${(0,h.TF)(s)} ${r.name}`),V(r.id),console.log("Submitting",e,l?.invite,l?.artist),I.push(`/manage?sellerId=${r.id}`),J(!1),l}}).catch(e=>{console.log("CATCH BLOCK..",e.message),(0,j.UG)("Failed to save: server error: "+e.message),J(!1)})}catch(e){J(!1)}finally{J(!1)}}async function ew(e){console.log("FAIL",e),(0,j.UG)(`Cannot save. Please check validation errors (${Object.keys(e).map(s=>`${s}:${e[s]?.message}`).join(", ")} )`)}(0,d.useEffect)(()=>{console.log(`${(0,h.TF)(s)} DATA changed`,Z),Z&&ev(Z)},[Z?.id]),(0,_.G)(function(){return console.log("isDirty? savedSoNotDirtyAnyMore",H.current),!H.current&&en.isDirty},()=>confirm("Warning you have unsaved changes. Are you sure you want to leave this page?"));let e_=q?(0,l.jsx)("div",{}):(0,g.lX)(n,en,e?()=>I.push("/manage"):null,function(){console.log("resetForm:",Z),ev(Z)},el(ey,ew),!1,void 0,{saveName:"Save and Continue"}),eb=2e3-(ex?.bio?.length||0);return Z&&i===v.Ot&&(String(U?.userId),String(Z.owner_id)),(0,l.jsxs)(a.Ay,{...n,nav:(0,l.jsx)("div",{}),hideNav:!0,children:[(0,l.jsx)(t(),{children:(0,l.jsxs)("title",{children:["Editing ",(0,h.TF)(s)," ",ex.name]})}),(0,l.jsx)(y.A,{seller:r?.seller,...n,showSellerSelection:!1,seedSellerFromProp:!0,children:r?.seller?"Edit Profile":"New Profile"}),q?(0,l.jsx)(R.k,{message:"Please wait while we save your profile"}):"",eg?(0,l.jsx)("div",{className:"poppins",children:(0,l.jsx)(o.Op,{...es,children:(0,l.jsxs)(g.cm,{children:[(0,l.jsx)("div",{}),(0,l.jsxs)("div",{children:[(0,l.jsxs)(g.Pz,{children:["artist"==s?"Artist/Band Name":"Label Name"," * "]}),(0,l.jsx)("div",{children:(0,l.jsx)(g.XH,{watchFields:ex,register:er,errors:eu,field:"name",placeholder:"artist"==s?"Artist/Band name":"Label name",setValue:et,setUserSlug:K,slugField:"slug",userSlug:G})}),(0,l.jsx)("section",{className:"mt-2",children:(0,l.jsx)(g.oC,{fullWidth:!0,urlPrefix:`${c.publicUrl}/`,watchFields:ex,register:er,errors:eu,field:"slug",nameField:"name",editSlug:B,setEditSlug:W,setUserSlug:K,setValue:et})}),(0,l.jsx)(g.Pz,{children:"Country *"}),(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:"mt-2 w-1/2",children:(0,l.jsx)(S.wP,{classes:" w-full",value:ex.country||"",valueType:"short",onChange:e=>{et("country",e),et("region",void 0)}})}),(0,l.jsx)(g.Kw,{errors:eu,field:"country"}),(0,h.p0)(ex.country)?(0,l.jsxs)("div",{className:"mt-2 w-1/2",children:[(0,l.jsx)(g.Pz,{children:"State/Region *"}),(0,l.jsx)(S.mM,{classes:" w-full",country:ex.country||"",defaultOptionLabel:"Select State/Region",countryValueType:"short",valueType:"short",value:ex.region||"",onChange:e=>{console.log("Change region to",e),et("region",e)}})]}):""]}),(0,l.jsx)(g.Pz,{children:"City *"}),(0,l.jsxs)("div",{children:[(0,l.jsx)(g.L0,{className:"w-full",field:"city",register:er,errors:eu}),(0,l.jsx)(g.Kw,{errors:eu,field:"city"})]}),(0,l.jsx)(g.Pz,{children:"Currency *"}),(0,l.jsx)("div",{children:(0,l.jsxs)("div",{className:"relative flex flex-row gap-2",children:[(0,l.jsxs)(P.A,{variant:"outlined",className:"w-[200px]",value:ex.currency,disabled:X,...er("currency"),children:[(0,l.jsx)(A.A,{value:w.UM.GBP,children:"GBP"},w.UM.GBP),(0,l.jsx)(A.A,{value:w.UM.EUR,children:"EUR"},w.UM.EUR),(0,l.jsx)(A.A,{value:w.UM.USD,children:"USD"},w.UM.USD)]}),(0,l.jsx)(g.Rr,{children:"The currency you price at and get paid out in. Ask customer support if you need to change this after you have sales. Note, customers will see prices in their own currency."})]})}),e?"":(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:" mt-8",children:e_}),(0,l.jsx)("div",{className:"mt-16 poppins text-xl font-light text-brand text-center",children:" You can complete the rest now or later.."})]}),(0,l.jsxs)("div",{className:e?"":" opacity-50 hover:opacity-100 ",children:[(0,l.jsxs)(g.Pz,{children:[(0,h.TF)(s)," Image "]}),(0,l.jsx)("div",{children:(0,l.jsx)(g.ME,{watchFields:ex,errors:eu,setValue:et,field:"image_url",fullSizeField:"source_image_url",uniqueId:`${Z?.id||"new"}`,sellerId:Z?.id,setImages:e=>{console.log("Setting url from",e),et("image_url",e.imageUrl),et("source_image_url",e.sourceUrl)},onError:e=>{(0,j.UG)(e)}})}),(0,l.jsx)(g.Pz,{children:"Banner Image "}),(0,l.jsx)("div",{children:(0,l.jsx)(g.ME,{watchFields:ex,errors:eu,setValue:et,minWidth:450,minHeight:150,field:"banner_image_url",uniqueId:`${Z?.id||"new"}`,sellerId:Z?.id,imageClassName:"w-full max-w-[450px] aspect-[3/1]",setImages:e=>{console.log("Setting url from",e),et("banner_image_url",e.sourceUrl)},onError:e=>{(0,j.UG)(e)}})}),(0,l.jsxs)(g.Pz,{children:[(0,h.TF)(s)," Tags ",(0,l.jsx)("span",{className:"text-xs",children:"(optional)"})]}),(0,l.jsx)(g.Rr,{children:"Add descriptive tags to describe your music. Try to avoid using common genres and use adjectives or specific characteristics instead."}),(0,l.jsx)(m.A,{value:ex.tags_json||[],onChange:(e,s)=>(0,p.O)("tags_json",s,et,ed,e=>eo(e))}),(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:"my-2 flex flex-wrap overflow-scroll gap-x-1",children:ex.tags_json?.map(e=>(0,l.jsx)(k.A,{sx:{my:"2px",borderRadius:10,color:"#fff",fontSize:"11px",height:"20px",backgroundColor:(0,f.T3)(e)?"#b91c1c":void 0},size:"small",style:{filter:"drop-shadow(2px 2px 2px rgb(0 0 0 / 0.3)"},label:e,onDelete:s=>{let r,l;l=(r=ex.tags_json?[...ex.tags_json]:[]).findIndex(s=>s==e),r.splice(l,1),et("tags_json",r),eo("tags_json")}},e))}),(0,l.jsx)(g.Kw,{errors:eu,field:"tags_json"})]}),(0,l.jsx)(g.Pz,{children:"Bio"}),(0,l.jsxs)(g.Rr,{children:["Simple markdown for formatting: ",(0,l.jsx)("strong",{children:"**bold**"})," ",(0,l.jsx)("span",{className:"italic",children:"*italic*"}),(0,l.jsx)("a",{className:"ml-2",target:"_blank",href:"https://www.markdownguide.org/basic-syntax/",children:(0,l.jsx)(b.tOh,{className:"inline"})})]}),(0,l.jsxs)("div",{className:"w-full",children:[(0,l.jsxs)("div",{className:`text-xs py-1 ${eb>0?"":"text-red-300"}`,children:[eb," characters available"]}),(0,l.jsx)(g.L0,{multiline:!0,rows:14,field:"bio",register:er,errors:eu,className:`w-full form-control ${eu.name?"is-invalid":""}`}),(0,l.jsx)(g.Kw,{errors:eu,field:"bio"}),(0,l.jsx)("br",{}),ex.bio?(0,l.jsxs)("div",{className:"mt-2",children:[(0,l.jsx)(g.Rr,{children:"Preview"}),(0,l.jsx)("div",{className:"bio bg-neutral-900 p-2  rounded ",dangerouslySetInnerHTML:{__html:(0,h.y0)(ex.bio)}})]}):""]}),(0,l.jsx)(g.WP,{children:"Pricing & Track settings"}),(0,l.jsxs)(g.Pz,{children:["Default track price ",(0,l.jsx)("span",{className:"text-sm",children:"Excl. VAT/GST/Sales Tax"})]}),(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:"relative flex flex-row gap-2",children:[(0,l.jsx)(g.IJ,{currency:ex.currency,placeholder:"Default track price",name:"track_price"}),(0,l.jsx)(g.Rr,{children:"Set the default track price you want excl. of tax. You can override for individual tracks. Changing this will change all tracks that have not been overridden"})]}),(0,l.jsx)(g.Kw,{errors:eu,field:"track_price"})]}),(0,l.jsx)(g.Pz,{children:"Default release % discount over individual tracks"}),(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:"relative flex flex-row gap-2",children:[(0,l.jsx)("div",{className:"relative",children:(0,l.jsx)(g.L0,{className:"w-20",register:er,f
1ield:"release_discount_percent",errors:eu,inputProps:{endAdornment:(0,l.jsx)(E.A,{position:"end",children:"%"})}})}),(0,l.jsx)("div",{children:(0,l.jsxs)(g.Rr,{children:["For releases with more than 1 track, this discount will be applied by default. You can always set a specific release price.",(0,l.jsxs)("ul",{className:"text-sm ",children:[(0,l.jsxs)("li",{children:["2 track release:",(0,l.jsx)("span",{className:"ml-2",children:(0,h.$g)(2*(ex.track_price||0)*(100-ex.release_discount_percent)/100,ex.currency)})]}),(0,l.jsxs)("li",{children:["3 track release:",(0,l.jsx)("span",{className:"ml-2",children:(0,h.$g)(3*(ex.track_price||0)*(100-ex.release_discount_percent)/100,ex.currency)})]}),(0,l.jsxs)("li",{children:["4 track release:",(0,l.jsx)("span",{className:"ml-2",children:(0,h.$g)(4*(ex.track_price||0)*(100-ex.release_discount_percent)/100,ex.currency)})]}),(0,l.jsxs)("li",{children:["5 track release:",(0,l.jsx)("span",{className:"ml-2",children:(0,h.$g)(5*(ex.track_price||0)*(100-ex.release_discount_percent)/100,ex.currency)})]})]})]})})]}),(0,l.jsx)(g.Kw,{errors:eu,field:"release_discount_percent"})]}),(0,l.jsx)(g.Pz,{children:"Discography Discount %"}),(0,l.jsx)(g.Rr,{children:"Enabling the discography discount allows customers to buy your entire catalog at a reduced price. The discount set is applied to the combined cost of all your live releases. It only appears once you have 3 or more releases."}),(0,l.jsx)("div",{className:"my-4 child:p-3 child-hover:bg-neutral-700 ",children:(0,l.jsx)(g.Md,{register:er,watchFields:ex,field:"discography_discount",name:"Enabled"})}),ex.discography_discount?(0,l.jsxs)("div",{className:" flex flex-row gap-2",children:[(0,l.jsx)("div",{className:"relative",children:(0,l.jsx)(g.L0,{className:"w-20",register:er,field:"discography_discount_percent",errors:eu,inputProps:{endAdornment:(0,l.jsx)(E.A,{position:"end",children:"%"})}})}),(0,l.jsx)(g.Rr,{children:(0,l.jsx)("ul",{className:"text-sm"})}),(0,l.jsx)(g.Kw,{errors:eu,field:"discography_discount_percent"})]}):"",i===v.d_?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(g.Pz,{children:"Default Label Share %"}),(0,l.jsx)(g.Rr,{children:"The default share of royalties allocated to your label. Changing this does not affect existing releases. May be overridden on a release or track basis."}),(0,l.jsxs)("div",{className:"relative flex flex-row gap-2",children:[(0,l.jsx)("div",{className:"relative",children:(0,l.jsx)(g.L0,{className:"w-20",register:er,field:"label_share_percent",errors:eu,inputProps:{endAdornment:(0,l.jsx)(E.A,{position:"end",children:"%"})}})}),(0,l.jsx)(g.Kw,{errors:eu,field:"label_share_percent"})]}),(0,l.jsx)(g.Pz,{children:"Default Track Expense"}),(0,l.jsxs)("div",{children:[(0,l.jsx)(g.Rr,{children:"A track expense you pay that is recoupable from the artists royalties according to their percentage of royalties"}),(0,l.jsxs)("div",{className:"flex flex-row gap-2",children:[(0,l.jsx)(g.IJ,{currency:ex.currency,placeholder:"Default track price",name:"default_track_expense"}),(0,l.jsx)(g.Kw,{errors:eu,field:"default_track_expense"})]}),(0,l.jsxs)("div",{className:"mt-2",children:[(0,l.jsx)("div",{children:(0,l.jsx)(g.Rr,{children:"Describe expense, typically mastering or remix fees"})}),(0,l.jsx)(g.L0,{className:"w-full",field:"default_track_expense_description",placeholder:"",register:er,errors:eu})]})]}),(0,l.jsx)(g.Pz,{children:"Default Release Expense"}),(0,l.jsxs)("div",{children:[(0,l.jsx)(g.Rr,{children:"A release expense you pay that is recoupable from the artists royalties according to their percentage of royalties"}),(0,l.jsxs)("div",{className:"flex flex-row gap-2",children:[(0,l.jsx)(g.IJ,{currency:ex.currency,name:"default_release_expense"}),(0,l.jsx)(g.Kw,{errors:eu,field:"default_release_expense"})]}),(0,l.jsxs)("div",{className:"mt-2",children:[(0,l.jsx)("div",{children:(0,l.jsx)(g.Rr,{children:"Describe expense, typically artwork and promotion fees"})}),(0,l.jsx)(g.L0,{className:"w-full",field:"default_release_expense_description",placeholder:"",register:er,errors:eu})]})]})]}):"",(0,l.jsx)(g.Pz,{children:'Tracks have "Original Mix" by default'}),(0,l.jsxs)("div",{children:[(0,l.jsx)(g.Rr,{children:'When enabled, tracks will show "Original Mix" by default. Electronic artists should likely leave it enabled. Non-electronic artists may wish to disable.'}),(0,l.jsx)("div",{className:"my-3 child:p-3 child-hover:bg-neutral-700",children:(0,l.jsx)(g.Md,{register:er,watchFields:ex,field:"default_track_mix",name:"Enabled"})}),(0,l.jsx)(g.Kw,{errors:eu,field:"default_track_mix"})]}),(0,l.jsx)(g.WP,{children:"Site-wide promotions"}),(0,l.jsx)(g.Rr,{className:"mt-6",children:"We run promotions from time to time where we offer site-wide discount codes to encourage new fans / customers to buy your music on Artcore."}),(0,l.jsxs)("div",{className:"bg-neutral-900 p-4 mt-4 rounded-lg",children:[(0,l.jsx)(g.Pz,{className:"mt-0",children:"Site-wide digital promotions opt-out"}),(0,l.jsxs)("div",{children:[(0,l.jsx)(g.Rr,{children:"By default, site-wide discount codes WILL apply to all your digital releases and full discography (but not your merch). Check this if you do NOT wish for your music to be included."}),(0,l.jsx)("div",{className:"my-4 child:p-3 child-hover:bg-neutral-700",children:(0,l.jsx)(g.Md,{register:er,watchFields:ex,field:"sales_digital_opt_out",name:"Opt Out"})}),(0,l.jsx)(g.Kw,{errors:eu,field:"sales_digital_opt_out"})]})]}),(0,l.jsxs)(g.Pz,{children:["Socials ",(0,l.jsx)("span",{className:"text-xs",children:"(optional)"})]}),(0,l.jsx)("div",{className:"bg-neutral-900 p-4 mt-2 rounded-lg",children:(0,l.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-[1fr_1fr] gap-y-2",children:[(0,l.jsx)(g.O$,{name:"www.tiktok.com/",field:"socials.tiktok",placeholder:"tiktok id",errors:eu,register:er}),(0,l.jsx)(g.O$,{name:"www.facebook.com/",field:"socials.facebook",placeholder:"facebook i
1d",errors:eu,register:er}),(0,l.jsx)(g.O$,{name:"www.instagram.com/",field:"socials.instagram",placeholder:"instagram id",errors:eu,register:er}),(0,l.jsx)(g.O$,{name:"twitter.com/",field:"socials.twitter",placeholder:"twitter id",errors:eu,register:er}),(0,l.jsx)(g.O$,{name:"soundcloud.com/",field:"socials.soundcloud",placeholder:"soundcloud id",errors:eu,register:er}),(0,l.jsx)(g.O$,{name:"www.mixcloud.com/",field:"socials.mixcloud",placeholder:"mixcloud id",errors:eu,register:er}),(0,l.jsx)(g.O$,{name:"www.ra.co/",field:"socials.ra",placeholder:"resident advisor id",errors:eu,register:er}),(0,l.jsx)(g.O$,{name:"www.twitch.tv/",field:"socials.twitch",placeholder:"twitch id",errors:eu,register:er}),(0,l.jsx)(g.O$,{name:"www.youtube.com/",field:"socials.youtube",placeholder:"youtube channel id",errors:eu,register:er}),(0,l.jsx)("div",{}),(0,l.jsxs)("div",{className:"text-sm text-neutral-500",children:[(0,l.jsx)("a",{className:"text-brand text-sm",href:"https://www.youtube.com/account_advanced",target:"_blank",children:"Get your Youtube channel Id here"}),(0,l.jsx)("br",{}),"It should look similar to UCVonWz4rtuq5XgbmmWfkImQ.",(0,l.jsx)("br",{}),"Your latest youtube video will be shown on your ",s," page"]})]})}),(0,l.jsxs)(g.Pz,{children:[(0,h.TF)(s)," site url ",(0,l.jsx)("span",{className:"text-xs",children:" (optional)"})]}),(0,l.jsx)("div",{children:(0,l.jsx)(g.O$,{name:"",field:"socials.seller_url",placeholder:"website url",errors:eu,register:er})}),(0,l.jsx)(g.Pz,{children:"Fan Email"}),(0,l.jsx)(g.Rr,{children:'Messages sent through the "contact artist" forms will be sent to this address. Defaults to your login email.'}),(0,l.jsxs)("div",{children:[(0,l.jsx)(g.L0,{fullWidth:!0,field:"fan_email",register:er,errors:eu,placeholder:String(U?.user?.email)}),(0,l.jsx)(g.Kw,{errors:eu,field:"fan_email"})]}),(0,l.jsx)(g.WP,{children:"Digital Payment details"}),(0,l.jsx)(g.Rr,{className:"mt-6",children:"To get paid for digital sales on Artcore, you need a valid & verified paypal account. A business account is highly recommended."}),(0,l.jsxs)("div",{className:"bg-neutral-900 p-4 mt-4 rounded-lg",children:[(0,l.jsx)(g.Pz,{className:"mt-0",children:"Paypal Email address *"}),(0,l.jsxs)("div",{children:[(0,l.jsx)(g.L0,{fullWidth:!0,field:"paypal_email",register:er,errors:eu,placeholder:"Paypal email"}),(0,l.jsx)(g.Kw,{errors:eu,field:"paypal_email"})]}),(0,l.jsx)(g.Pz,{children:"Confirm Paypal Email Address *"}),(0,l.jsxs)("div",{children:[(0,l.jsx)(g.L0,{fullWidth:!0,field:"paypal_email_confirm",register:er,errors:eu,placeholder:"Paypal email again"}),(0,l.jsx)(g.Kw,{errors:eu,field:"paypal_email_confirm"})]})]}),(0,l.jsx)(F.E,{children:(0,l.jsxs)("pre",{children:["MerchEnabled: ",eh?"True":"False","Country: ",ex.country,(0,l.jsx)(z.A,{content:{merchEnabled:eh,canView:em,merchViewEnabled:ep,country:ej,seller:ef}})]})}),eh?(0,l.jsx)(O,{}):"",c.payments.paypalProduction?"":(0,l.jsxs)("div",{className:"mt-10 text-sm text-red-300",children:[(0,l.jsx)("div",{children:"Test paypal emails to use"}),(0,l.jsxs)("ul",{className:"child:mt-2",children:[(0,l.jsx)("li",{children:"[email protected]"}),(0,l.jsx)("li",{children:"[email protected]"})]})]}),(0,l.jsx)("div",{className:" mt-8",children:e_}),null]})]})]})})}):"Loading"]})}function M({sellerId:e}){async function s(){let s=await fetch("/api/edit/seller/stripe_connect",{headers:{"Content-Type":"application/json"},method:"POST",body:JSON.stringify({sellerId:e})}),r=s.status;if(console.log("STATUS",r),r>=400)return void alert("Failed  "+s.text());let{stripeLink:l}=await s.json();console.log("resData",l);let a=l?.url;window.location.assign(a)}return(0,l.jsx)("div",{children:(0,l.jsx)(I.A,{variant:"contained",component:"label",onClick:s,children:"Connect your Stripe account"})})}},29308:(e,s,r)=>{r.d(s,{O:()=>a});var l=r(35768);function a(e,s,r,a,i){let t=(0,l.tt)(s),n=(0,l.jT)(t);return n?(a(e,{type:"manual",message:n}),!1):(i(e),r(e,t.tags,{shouldDirty:!0}),!0)}},30079:(e,s,r)=>{r.d(s,{A:()=>m,N:()=>p});var l=r(37876),a=r(14232),i=r(74904),t=r(27910),n=r(17471),c=r(75656),d=r(80214),o=r
1(61875),u=r(29308),x=r(35768);let h=`Type and press enter, or paste a list (max ${x.r4} tags, ${x.Ti} chars each)`;function m({value:e=[],onChange:s}){let{data:r,error:d}=(0,c.Ay)("/api/tags/common",e=>fetch(e).then(e=>e.json())),o=r?r.tags:[],[u,x]=(0,a.useState)("");return(0,l.jsx)(n.A,{sx:{},children:(0,l.jsx)(i.A,{multiple:!0,freeSolo:!0,autoSelect:!0,options:o,defaultValue:[o[0]],getOptionLabel:e=>e,value:e,inputValue:u,onChange:s,renderTags:()=>null,classes:{option:"text-xs"},renderInput:e=>(0,l.jsx)(t.A,{...e,placeholder:h}),onInputChange:(r,l)=>{if((l=l.trimStart()).includes(" ")||l.includes(",")){let a=l.split(/[\s,]+/).filter(e=>e.length);if(a?.length){s(r,e.concat(a)),x("");return}}l.endsWith(",")&&(r.target.blur(),r.target.focus()),x(l)}})})}function p({watchFields:e,field:s,setValue:r,setError:a,clearErrors:i,errors:t}){return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(m,{value:e[s]||[],onChange:(e,l)=>{a&&i?(0,u.O)(s,l,r,a,e=>i(e)):r(s,l)}}),(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:"my-2 flex flex-wrap overflow-scroll gap-x-1",children:e[s]?.map(a=>(0,l.jsx)(d.A,{sx:{my:"2px",borderRadius:10,color:"#fff",fontSize:"11px",height:"20px",backgroundColor:(0,x.T3)(a)?"#b91c1c":void 0},size:"small",style:{filter:"drop-shadow(2px 2px 2px rgb(0 0 0 / 0.3)"},label:a,onDelete:l=>{let t,n;n=(t=e[s]?[...e[s]]:[]).findIndex(e=>e==a),t.splice(n,1),r(s,t),i?.(s)}},a))}),(0,l.jsx)(o.Kw,{errors:t,field:s})]})]})}},31901:(e,s,r)=>{r.d(s,{G:()=>t});var l=r(89099),a=r.n(l),i=r(14232);function t(e,s){let r=e();(0,i.useEffect)(()=>{if(r){let r=()=>{let r=e();if(console.log("routeChangeStart - isDirtyChanges?",r),r){let e=s();if(console.log("ROUTE CHANGE START.."),!e)throw a().events.emit("routeChangeError"),Error("Abort route change. Please ignore this error.")}else console.log("No changes, don't ask...")};return a().events.on("routeChangeStart",r),()=>{a().events.off("routeChangeStart",r)}}},[r]),(0,i.useEffect)(()=>{function e(e){if(r)return(e||window.event).returnValue=!0,!0}return window.addEventListener("beforeunload",e),()=>{window.removeEventListener("beforeunload",e)}})}},46585:(e,s,r)=>{r.d(s,{j:()=>n});var l=r(77966),a=r(55737),i=r(86468),t=r(60577);function n(e,s){let{config:r}=(0,t.r)(),n=(0,l.Tp)(r.featureKeys.merchBeta||""),{seller:c}=(0,a.n)({fallbackSeller:s});e=e||c?.country;let d=r.flags.merchByLocationEnabled&&!!e&&(/(GB|GG)/.test(e)||(0,i.Bt)(e)),o=!!(r.flags.merchEnabled||d||n),u=(0,l.Tp)(r.featureKeys.merchViewBeta||""),x=r.flags.merchViewEnabled||u;return[o,!!(x||n),!!x,e,c]}},55737:(e,s,r)=>{r.d(s,{n:()=>u});var l=r(72702),a=r(34957);let i={selectedSellerId:void 0},t=(0,a.vt)((e,s)=>({...i,setSelectedSellerId:s=>
1{e({selectedSellerId:s})}}));var n=r(89099),c=r(14232),d=r(92306),o=r(75656);function u(e){let{fallbackSeller:s,fetchSeller:r=!0}=e??{},a=(0,n.useRouter)(),i=(0,l.cH)(a.query.sellerId),[u,x]=(0,c.useState)(!1),{selectedSellerId:h,setSelectedSellerId:m}=t(e=>({selectedSellerId:e.selectedSellerId,setSelectedSellerId:e.setSelectedSellerId})),p=r&&!s&&h?`/api/edit/seller/get?sellerId=${h}`:null,{data:j,error:f,mutate:g,isValidating:v}=(0,o.Ay)(p||null,(0,d.we)()),y=s??j?.seller;return(0,c.useEffect)(()=>{a.isReady&&(i&&m(i),x(!0))},[a.isReady,i]),{selectedSellerId:u?h:void 0,storedSelectedSellerId:h,setSelectedSellerId:m,sellerIsSet:u,seller:y}}},64885:(e,s,r)=>{r.d(s,{u:()=>t});var l=r(16413),a=r(88992),i=function(e,s){for(var r={};e.length;){var l=e[0],i=l.code,t=l.message,n=l.path.join(".");if(!r[n])if("unionErrors"in l){var c=l.unionErrors[0].errors[0];r[n]={message:c.message,type:c.code}}else r[n]={message:t,type:i};if("unionErrors"in l&&l.unionErrors.forEach(function(s){return s.errors.forEach(function(s){return e.push(s)})}),s){var d=r[n].types,o=d&&d[l.code];r[n]=(0,a.Gb)(n,s,r,i,o?[].concat(o,l.message):l.message)}e.shift()}return r},t=function(e,s,r){return void 0===r&&(r={}),function(a,t,n){try{return Promise.resolve(function(i){try{var t=Promise.resolve(e["sync"===r.mode?"parse":"parseAsync"](a,s)).then(function(e){return n.shouldUseNativeValidation&&(0,l.w)({},n),{errors:{},values:r.raw?a:e}})}catch(e){return i(e)}return t&&t.then?t.then(void 0,i):t}(function(e){if(Array.isArray(null==e?void 0:e.errors))return{values:{},errors:(0,l.H)(i(e.errors,!n.shouldUseNativeValidation&&"all"===n.criteriaMode),n)};throw e}))}catch(e){return Promise.reject(e)}}}},74413:(e,s,r)=>{r.d(s,{A:()=>x});var l=r(37876),a=r(48230),i=r.n(a),t=r(4186),n=r(48516);r(14232);var c=r(89099),d=r(19512),o=r(29573),u=r(55737);function x({seller:e,className:s="",children:r,showSellerSelection:a=!1,seedSellerFromProp:h=!1,mobileManageHeader:m=!1,...p}){let j=(0,c.useRouter)(),{selectedSellerId:f,setSelectedSellerId:g,sellerIsSet:v}=(0,u.n)(h&&e?{fallbackSeller:e}:void 0),y=async(e,s)=>{if(s){let e=s.value,r=s.seller_type,l=j.pathname.replace(/(label|artist)/,r),a={...j.query,sellerId:e},i=Object.keys(a).map(e=>`${e}=${a[e]}`).join("&");l=`${l}?${i}`,j.push(l)}},w=(0,o.QP)(m?"mt-2 flex flex-col gap-2 px-1 poppins md:mt-4 md:flex-row md:gap-y-2 md:bg-brandgrey/20 md:rounded-md md:p-2":"mt-4 flex-col flex md:flex-row bg-brandgrey/20 p-2 rounded-md gap-y-2 poppins",s),_=a&&j.isReady?(0,l.jsx)(n.A,{renderSelected:void 0,sellerId:e?.id,onChange:y}):a?(0,l.jsx)("div",{children:"Loading"}):null;return m?(0,l.jsxs)("div",{className:w,children:[(0,l.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0 md:hidden",children:[(0,l.jsx)(i(),{href:"/seller",className:"shrink-0 text-xs text-neutral-400 hover:text-neutral-200",children:"Manage Profiles"}),(0,l.jsx)(t.xVu,{className:"shrink-0 text-base text-neutral-600"}),(0,l.jsx)("div",{className:"min-w-0 truncate text-sm font-semibold text-mainheading",children:e?.name})]}),(0,l.jsxs)("div",{className:"hidden md:flex flex-grow items-center gap-1 text-sm",children:[(0,l.jsx)(i(),{href:"/seller",children:(0,l.jsx)(d.A,{size:"small",variant:"contained",component:"label",children:"Manage Profiles"})}),(0,l.jsx)(t.xVu,{className:"shrink-0 text-xl text-neutral-500"}),r?(0,l.jsxs)(l.Fragment,{children:[e?(0,l.jsx)(i(),{href:`/manage?sellerId=${e?.id}`,className:"leading-none",children:e?.name}):(0,l.jsx)("span",{className:"leading-none",children:"Manage"}),(0,l.jsx)(t.xVu,{className:"shrink-0 text-xl text-neutral-500"}),r]}):(0,l.jsx)("span",{className:"leading-none",children:e?.name})]}),(0,l.jsx)("div",{className:"hidden md:block min-w-[300px]",children:_})]}):(0,l.jsxs)("div",{className:w,children:[(0,l.jsxs)("div",{className:"flex flex-grow items-center gap-1 text-sm",children:[(0,l.jsx)(i(),{href:"/seller",children:(0,l.jsx)(d.A,{size:"small",variant:"contained",component:"label",children:"Manage Profiles"})}),(0,l.jsx)(t.xVu,{className:"shrink-0 text-xl text-neutral-500"}),r?(0,l.jsxs)(l.Fragment,{children:[e?(0,l.jsx)(i(),{href:`/manage?sellerId=${e?.id}`,className:"leading-none",children:e?.name}):(0,l.jsx)("span",{className:"leading-none",children:"Manage"}),(0,l.jsx)(t.xVu,{className:"shrink-0 text-xl text-neutral-500"}),r]}):(0,l.jsx)("span",{className:"leading-none",children:e?.name})]}),(0,l.jsx)("div",{className:"min-w-[300px] md:min-w-[300px]",children:_})]})}},88707:(e,s,r)=>{r.d(s,{E:()=>t});
1var l=r(37876),a=r(14232),i=r(33115);function t({children:e,name:s="debug"}){let[r,n]=a.useState(!1);return(0,i.B)()?(0,l.jsxs)("div",{className:"mt-8 text-xxs",children:[(0,l.jsx)("a",{className:"cursor-pointer",onClick:()=>n(!r),children:s}),r?e:""]}):(0,l.jsx)(l.Fragment,{})}},88806:(e,s,r)=>{r.d(s,{k:()=>t});var l=r(37876),a=r(26746),i=r(55006);function t({message:e}={}){return(0,l.jsx)(a.A,{sx:{color:"#fff",zIndex:e=>e.zIndex.drawer+1},open:!0,children:e?(0,l.jsxs)("div",{className:"p-10 bg-neutral-800 text-neutral-200 rounded text-center ",children:[(0,l.jsx)("span",{className:"",children:(0,l.jsx)(i.A,{})}),(0,l.jsx)("div",{className:"font-light",children:e})]}):(0,l.jsx)("div",{children:(0,l.jsx)(i.A,{size:50})})})}r(14232)}}]);

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.