PageSourceSearch

https://www.wallpaperalchemy.com/_next/static/chunks/pages/admin/wallpaper/create-06b3713437a5cd84.js

js wallpaperalchemy.com collected 2026-10-01 23:57:00 UTC 26,370 bytes, 21 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8905],{9568:(e,a,r)=>{"use strict";r.d(a,{A:()=>l});var t=r(27060);class l extends t.A{static getPendingWallpapers(e,a){return this.request("GET","admin/pending-wallpapers",{query:e,token:a})}static getPendingWallpaper(e,a){return this.request("GET",`admin/pending-wallpapers/${e}`,{token:a})}static acceptPendingWallpaper(e){return this.request("POST",`admin/pending-wallpapers/${e}/accept`)}static denyPendingWallpaper(e){return this.request("POST",`admin/pending-wallpapers/${e}/deny`)}static deletePendingWallpaper(e){return this.request("DELETE",`admin/pending-wallpapers/${e}`)}}},13489:(e,a,r)=>{"use strict";r.d(a,{A:()=>m});var t=r(27060);class l extends t.A{static revalidate(e){return this.request("POST","revalidate",{baseUrl:"/api",body:e})}}var p=r(97397),o=r(4766),s=r(12130),i=r(73573),n=r(82028),c=r(42839);let m=()=>{let{locale:e}=(0,o.A)();return async a=>{try{if(!c.KV)return;let r=await l.revalidate(a);(0,n.S)(r),(0,s.A)((0,i.t)(e,{en:"Success"}))}catch(a){(0,s.A)((0,i.t)(e,p.p1),{error:!0}),console.error(a)}}}},16272:e=>{e.exports={"wallpapers-create-form-image":"WallpaperCreateFormImage_wallpapers-create-form-image__jVxYH","wallpapers-create-form-image__file":"WallpaperCreateFormImage_wallpapers-create-form-image__file__nvxZJ"}},22756:e=>{e.exports={"textarea-wrapper":"Textarea_textarea-wrapper__rHu3J","textarea-wrapper--error":"Textarea_textarea-wrapper--error__qltA5",textarea:"Textarea_textarea__GBbeV","textarea--background":"Textarea_textarea--background__LdRYd"}},24468:e=>{e.exports={"wallpaper-create-form-dictionary-actions":"WallpaperCreateFormDictionaryActions_wallpaper-create-form-dictionary-actions__88bcR","wallpaper-create-form-dictionary-actions__row":"WallpaperCreateFormDictionaryActions_wallpaper-create-form-dictionary-actions__row__SLQcy"}},32012:(e,a,r)=>{"use strict";r.d(a,{A:()=>n});var t=r(37876),l=r(14232),p=r(56420),o=r(9362),s=r(22756),i=r.n(s);let n=(0,l.forwardRef)(({error:e,placeholder:a,background:r,wrapperClassName:l="",className:s="",children:n,...c},m)=>(0,t.jsxs)("div",{className:(0,o.x)(`${i()["textarea-wrapper"]} ${e?i()["textarea-wrapper--error"]:""} ${l}`),children:[(0,t.jsx)("textarea",{...c,ref:m,placeholder:a,className:(0,o.x)(`${i().textarea} ${r?i()["textarea--background"]:""} ${s}`)}),("string"==typeof e||"object"==typeof e&&e.message)&&(0,t.jsx)(p.A,{children:"string"==typeof e?e:e.message}),n]}))},39252:e=>{e.exports={"wallpaper-create-form-author-options":"WallpaperCreateFormAuthorOptions_wallpaper-create-form-author-options__YE4Fa","wallpaper-create-form-author-options--open":"WallpaperCreateFormAuthorOptions_wallpaper-create-form-author-options--open__54SRB","wallpaper-create-form-author-options__option":"WallpaperCreateFormAuthorOptions_wallpaper-create-form-author-options__option__vGf4p","wallpaper-create-form-author-options__option-avatar":"WallpaperCreateFormAuthorOptions_wallpaper-create-form-author-options__option-avatar__xAbIE","wallpaper-create-form-author-options__option-avatar-letter":"WallpaperCreateFormAuthorOptions_wallpaper-create-form-author-options__option-avatar-letter__KbOEb"}},42435:(e,a,r)=>{"use strict";r.r(a),r.d(a,{__N_SSP:()=>eI,default:()=>eD});var t=r(37876),l=r(14243),p=r(76817),o=r(53055),s=r(14232),i=r(88992),n=r(71090),c=r(55002),m=r(66485),_=r(13452),d=r(64430),u=r(58348),g=r(16272),h=r.n(g);let w=({wallpaper:e})=>{let{control:a}=(0,i.xW)();return(0,t.jsxs)("div",{className:h()["wallpapers-create-form-image"],children:[(0,t.jsx)(_.A,{name:"imageFile",control:a,image:!0,imageUrl:e?(0,d.GQ)(e):null,previewDeletable:!1,accept:u.ih,label:"Wallpaper","data-e2e":"image-upload",className:h()["wallpapers-create-form-image__file"]}),(0,t.jsx)(_.A,{name:"cardImageFile",control:a,image:!0,imageUrl:e?.cardImage?(0,d.uH)(e):null,previewDeletable:!1,accept:u.ih,label:"Thumbnail","data-e2e":"thumbnail-upload",className:h()["wallpapers-create-form-image__file"]})]})};var f=r(83468),x=r(26478),y=r(32012),A=r(90784),C=r(73395),j=r(4766),v=r(92011),W=r(28994),k=r(25711),b=r(96326),F=r(24468),N=r.n(F);let S=()=>{let{getValues:e,setValue:a,trigger:r}=(0,i.xW)(),{locale:l}=(0,j.A)(),p=(0,C.A)(),o=async()=>{let e=v.A.parse(await (0,k.A)(l));e&&a("locales.en",e)},s=async()=>{let e=v.A.parse(await (0,k.A)(l));e&&(a("locales",e),r("locales"))};return(0,t.jsxs)("div",{className:N()["wallpaper-create-form-dictionary-actions"],children:[(0,t.jsxs)("div",{className:N()["wallpaper-create-form-dictionary-actions__row"],children:[(0,t.jsxs)(c.A,{type:"button","data-e2e":"copy-prompt-default",onClick:()=>{(0,W.A)(`
2      Give me json with name, description (50-100 words) and keywords (string) for this image, mark that image is kind of 4k, high resolution, etc...
3
4      Try to make it SEO optimized.
5    `,l)},children:["Copy prompt (",b.q,")"]}),(0,t.jsxs)(c.A,{type:"button","data-e2e":"copy-prompt-all",onClick:()=>{let a=e("locales.en"),r=v.A.stringify({en:a},2);(0,W.A)(`
6      Give me translations of this in json format
7
8      for following locales
9
10      ${v.A.stringify(p,2)}
11
12      (sr should be cyrillic)
13
14      ${r}
15    `,l)},children:["Copy prompt for all (",b.q," required)"]})]}),(0,t.jsxs)("div",{className:N()["wallpaper-create-form-dictionary-actions__row"],children:[(0,t.jsxs)(c.A,{type:"button","data-e2e":"paste-prompt-default",onClick:o,children:["Paste prompt (",b.q,")"]}),(0,t.jsx)(c.A,{type:"button","data-e2e":"paste-prompt-all",onClick:s,children:"Paste prompt for all"})]})]})};var q=r(81312),E=r.n(q);let O=()=>{let e=(0,C.A)().map(e=>({value:e,label:e})),{register:a,control:r,watch:l,formState:{errors:p}}=(0,i.xW)(),o=l("language");return(0,t.jsxs)("div",{className:E()["wallpaper-create-form-dictionary"],children:[(0,t.jsx)(S,{}),(0,t.jsx)(f.A,{name:"language",control:r,tabs:e,background:!0,errors:p.locales,className:E()["wallpaper-create-form-dictionary__tabs"],buttonClassName:E()["wallpaper-create-form-dictionary__tabs-button"],"data-e2e":"dictionaries"}),(0,t.jsx)(x.A,{icon:A.A,type:"text",autoComplete:"off",placeholder:"Name",error:p.locales?.[o]?.name,"data-e2e":"name",...a(`locales.${o}.name`)}),(0,t.jsx)(y.A,{autoComplete:"off",placeholder:"Description",error:p.locales?.[o]?.description,"data-e2e":"description",...a(`locales.${o}.description`)}),(0,t.jsx)(y.A,{autoComplete:"off",placeholder:"Keywords",error:p.locales?.[o]?.keywords,"data-e2e":"keywords",...a(`locales.${o}.keywords`)})]},o)};var L=r(38816),T=r(6063);let $=()=>{let{getValues:e,setValue:a,register:r,formState:{errors:l}}=(0,i.xW)();return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(c.A,{type:"button","data-e2e":"generate-slug",onClick:()=>{let r=e("locales.en.name");a("slug",(0,T.e9)(r))},children:"Generate"}),(0,t.jsx)(x.A,{icon:L.A,type:"text",autoComplete:"off",placeholder:"Slug",error:l.slug,"data-e2e":"slug",...r("slug")})]})};var I=r(85494),D=r(25648),G=r(88010),P=r(51708),Y=r(80072),U=r.n(Y);let z=({tag:e})=>{let{setValue:a,watch:r}=(0,i.xW)(),l=r("tags"),p=(0,P.EK)(e);return(0,t.jsxs)("div",{className:U()["wallpaper-create-form-category"],children:[p?(0,t.jsx)("img",{src:p,alt:e.title,width:(0,P.U6)(e),height:(0,P.$T)(e),className:U()["wallpaper-create-form-category__image"]}):(0,t.jsx)("div",{className:U()["wallpaper-create-form-category__empty"],children:(0,t.jsx)(G.A,{className:U()["wallpaper-create-form-category__empty-icon"]})}),(0,t.jsx)(o.A,{tag:"span",children:e.title}),(0,t.jsx)("button",{type:"button","aria-label":"Remove category",className:U()["wallpaper-create-form-category__delete"],onClick:()=>{a("tags",l.filter(a=>a.id!==e.id))},children:(0,t.jsx)(D.A,{className:U()["wallpaper-create-form-category__delete-icon"]})})]})};var K=r(9362),R=r(78874),V=r.n(R);let B=({tags:e,open:a,onSelect:r})=>{let{setValue:l,watch:p}=(0,i.xW)(),s=p("tags");return(0,t.jsx)("div",{className:(0,K.x)(`${V()["wallpaper-create-form-categories-options"]} ${a?V()["wallpaper-create-form-categories-options--open"]:""}`),children:e.map(e=>{let a=(0,P.EK)(e),p=!!s.find(a=>a.id===e.id);return(0,t.jsxs)("button",{type:"button",role:"option","aria-selected":p,"data-value":e.id,onClick:()=>{l("tags",p?s.filter(a=>a.id!==e.id):[...s,e]),r?.(e)},className:V()["wallpaper-create-form-categories-options__option"],children:[a?(0,t.jsx)("img",{src:a,alt:e.title,width:(0,P.U6)(e),height:(0,P.$T)(e),className:V()["wallpaper-create-form-categories-options__option-image"]}):(0,t.jsx)("div",{className:V()["wallpaper-create-form-categories-options__option-empty"],children:(0,t.jsx)(G.A,{className:V()["wallpaper-create-form-categories-options__option-empty-icon"]})}),(0,t.jsx)(o.A,{children:e.title})]},e.id)})})};var J=r(37512),M=r(35579),H=r(29469),Z=r(73573),X=r(82028),Q=r(43940),ee=r.n(Q);let ea=()=>{let{locale:e}
15=(0,j.A)(),[a,r]=(0,s.useState)([]),[l,p]=(0,s.useState)(""),[n,m]=(0,s.useState)(!1),{watch:_}=(0,i.xW)(),d=_("tags"),u=(0,H.A)(l,100),g=(0,s.useRef)(null),h=(0,M.A)(()=>{m(!1)}),w=async()=>{try{let e=await J.A.getTags({page:1,perPage:999999,search:l,sort:"downloads"},(0,Z.US)());(0,X.S)(e),r(e.data.data)}catch(e){console.error(e)}},f=async()=>{try{let a=await J.A.getAllTags();(0,X.S)(a),await (0,W.A)(`
16          Choose up to 20 tags for this wallpaper
17          Only super relevant ones
18          Provide answer as JSON string array
19
20          ${v.A.stringify(a.data.map(e=>e.name))}
21        `,e)}catch(e){console.error(e)}};return(0,s.useEffect)(()=>{w()},[u]),(0,t.jsxs)("div",{className:ee()["wallpaper-create-form-categories"],children:[(0,t.jsxs)("div",{className:ee()["wallpaper-create-form-categories__actions"],children:[(0,t.jsx)(I.A,{href:"/admin/categories/create",target:"_blank",children:"Create Category"}),(0,t.jsx)(c.A,{type:"button",onClick:f,children:"Copy prompt"})]}),(0,t.jsxs)("div",{ref:h,className:ee()["wallpaper-create-form-categories__input-wrapper"],children:[(0,t.jsx)(x.A,{icon:G.A,ref:g,type:"text",autoComplete:"off",placeholder:"Type category name...","data-e2e":"tagIds",value:l,onChange:e=>{p(e.target.value)},onFocus:()=>m(!0)}),(0,t.jsx)(B,{tags:a,open:n,onSelect:()=>{h.current?.querySelector("input")?.focus?.()}})]}),(0,t.jsxs)(o.A,{children:["Recommended max count: ",d.length,"/20"]}),!!d.length&&(0,t.jsx)("div",{className:ee()["wallpaper-create-form-categories__list"],children:d.map(e=>(0,t.jsx)(z,{tag:e},e.id))})]})};var er=r(56420),et=r(53890),el=r(6e4),ep=r.n(el);let eo=({link:e,field:a,index:r})=>{let l=(e,t)=>{a.onChange(a.value.map((a,l)=>{if(l===r)return{...a,[e]:t}}))};return(0,t.jsxs)("div",{className:ep()["wallpaper-create-form-link"],children:[(0,t.jsxs)("div",{className:ep()["wallpaper-create-form-link__inputs"],children:[(0,t.jsx)(x.A,{...a,icon:et.A,type:"text",autoComplete:"off",placeholder:"Key",value:e.key,onChange:e=>l("key",e.target.value)}),(0,t.jsx)(x.A,{...a,icon:et.A,type:"text",autoComplete:"off",placeholder:"URL",value:e.value,onChange:e=>l("value",e.target.value)})]}),(0,t.jsx)(c.A,{type:"button",onClick:()=>{a.onChange(a.value.filter((e,a)=>a!==r))},className:ep()["wallpaper-create-form-link__submit"],children:"Delete"})]})};var es=r(86128),ei=r.n(es);let en=()=>{let{setValue:e,getValues:a}=(0,i.xW)(),[r,l]=(0,s.useState)(""),[p,o]=(0,s.useState)("");return(0,t.jsxs)("div",{className:ei()["wallpapers-create-form-links-add"],children:[(0,t.jsxs)("div",{className:ei()["wallpapers-create-form-links-add__inputs"],children:[(0,t.jsx)(x.A,{icon:et.A,type:"text",autoComplete:"off",placeholder:"Key",value:r,onChange:e=>l(e.target.value)}),(0,t.jsx)(x.A,{icon:et.A,type:"text",autoComplete:"off",placeholder:"URL",value:p,onChange:e=>o(e.target.value)})]}),(0,t.jsx)(c.A,{type:"button",onClick:()=>{let t=a("links");l(""),o(""),e("links",[...t,{key:r,value:p}])},className:ei()["wallpapers-create-form-links-add__submit"],children:"Add"})]})},ec=()=>{let{control:e,formState:{errors:a}}=(0,i.xW)(),r=a.links?.find?.(Boolean),l=r?.key||r?.value;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i.xI,{name:"links",control:e,render:({field:e})=>(0,t.jsx)(t.Fragment,{children:e.value.map((a,r)=>(0,t.jsx)(eo,{link:a,index:r,field:e},r))})}),(0,t.jsx)(en,{}),l?.message&&(0,t.jsx)(er.A,{children:l.message})]})};var em=r(21447),e_=r(60683),ed=r(39252),eu=r.n(ed);let eg=({open:e,users:a,onSelect:r})=>{let{setValue:l,watch:p}=(0,i.xW)(),s=p("author");return(0,t.jsx)("div",{className:(0,K.x)(`${eu()["wallpaper-create-form-author-options"]} ${e?eu()["wallpaper-create-form-author-options--open"]:""}`),children:a.map(e=>{let a=e.id===s.id;return(0,t.jsxs)("button",{type:"button",role:"option","aria-selected":a,onClick:()=>{a||l("author",e),r?.(e)},className:eu()["wallpaper-create-form-author-options__option"],children:[(0,t.jsx)(em.A,{user:e,className:eu()["wallpaper-create-form-author-options__option-avatar"],letterClassName:eu()["wallpaper-create-form-author-options__option-avatar-letter"]}),(0,t.jsx)(o.A,{tag:"span",children:e.username})]},e.id)})})};var eh=r(76350),ew=r(43060),ef=r.n(ew);let ex=()=>{let{watch:e}
21=(0,i.xW)(),a=e("author"),[r,l]=(0,s.useState)([]),[p,n]=(0,s.useState)(""),[c,m]=(0,s.useState)(!1),_=(0,H.A)(p,100),d=(0,s.useRef)(null),u=(0,M.A)(()=>{m(!1)}),g=async()=>{try{let e=await eh.A.getUsers({page:1,perPage:999999,search:p});(0,X.S)(e),l(e.data.data)}catch(e){console.error(e)}};return(0,s.useEffect)(()=>{g()},[_]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{ref:u,className:ef()["wallpaper-create-form-author__input-wrapper"],children:[(0,t.jsx)(x.A,{icon:e_.A,ref:d,type:"text",autoComplete:"off",placeholder:"Type username...","data-e2e":"author",value:p,onChange:e=>{n(e.target.value)},onFocus:()=>m(!0)}),(0,t.jsx)(eg,{users:r,open:c,onSelect:()=>{u.current?.querySelector("input")?.focus?.()}})]}),a&&(0,t.jsxs)("div",{className:ef()["wallpaper-create-form-author__card"],children:[(0,t.jsx)(em.A,{user:a,className:ef()["wallpaper-create-form-author__card-avatar"],letterClassName:ef()["wallpaper-create-form-author__card-avatar-letter"]}),(0,t.jsx)(o.A,{tag:"span",children:a.username})]})]})};var ey=r(91408),eA=r(29033),eC=r(28136),ej=r(70198),ev=r(9568),eW=r(13489),ek=r(81082),eb=r(80473),eF=r(61071),eN=r(10748),eS=r(68645),eq=r(80124),eE=r.n(eq);let eO=({wallpaper:e,pendingWallpaper:a})=>{let r,l,p,_=!!e,u=(0,eb.A)(),{locale:g}=(0,j.A)(),h=(0,C.A)(),f=(0,eF.A)(!0),x=(0,eW.A)(),y=(0,i.mN)({resolver:(0,n.t)((r=ey.gl().required((0,eA.h9)(g)).test(eC.wm,(0,eC.O8)(g),eC.LW).test(eC.ps,(0,eC.Fv)(g,eC._9.wallpaper),(0,eC.gl)(eC._9.wallpaper)).test(eC.mV,(0,eC.py)(g),eC.G3).test(eC.y3,(0,eC.WK)(g),eC.rS),ey.Ik({imageFile:_?r.nullable():r,cardImageFile:ey.gl().required((0,eA.h9)(g)).nullable().test(eC.wm,(0,eC.O8)(g),eC.LW).test(eC.ps,(0,eC.Fv)(g,eC._9.wallpaper),(0,eC.gl)(eC._9.wallpaper)).test(eC.mV,(0,eC.py)(g),eC.G3).test(eC.y3,(0,eC.WK)(g),eC.rS),language:ey.Yj().required((0,eA.h9)(g)),locales:ey.Ik().shape((l={},b.IB.forEach(e=>{l[e]=ey.Ik().shape({name:ey.Yj().max(eA.D3.name,(0,eA.mv)(g)).required((0,eA.h9)(g)),description:ey.Yj().max(eA.D3.description,(0,eA.mv)(g)).required((0,eA.h9)(g)),keywords:ey.Yj().max(eA.D3.keywords,(0,eA.mv)(g)).required((0,eA.h9)(g))})}),l)).defined((0,eA.h9)(g)),slug:ey.Yj().max(eA.D3.slug,(0,eA.mv)(g)).required((0,eA.h9)(g)),author:ey.gl().required((0,eA.h9)(g)),tags:ey.YO().of(ey.gl().required((0,eA.h9)(g))).required((0,eA.h9)(g)),links:ey.YO().of(ey.Ik().shape({key:ey.Yj().max(eA.D3.linkKey,(0,eA.mv)(g)).required((0,eA.h9)(g)),value:ey.Yj().max(eA.D3.linkValue,(0,eA.mv)(g)).required((0,eA.h9)(g))})).required((0,eA.h9)(g))}).required((0,eA.h9)(g))),void 0,{raw:!0}),defaultValues:{imageFile:null,cardImageFile:null,language:"en",locales:e?.locales||(p={},h.forEach(e=>{p[e]={name:"",description:"",keywords:""}}),p),slug:e?.slug||"",author:e?.user||a?.user||u,tags:e?.tags||[],links:(()=>{let a=[];if(!e?.links)return a;for(let r in e.links)a.push({key:r,value:e.links[r]});return a})()}}),{handleSubmit:A,formState:{isDirty:W}}=y;(0,ek.A)(W);
21let[k,F]=(0,s.useState)(!1),[N,S]=(0,s.useState)(null),q=async r=>{try{var t;let l;if(k)return;F(!0),S(null);let p=new FormData;if(r.imageFile){p.set("image",r.imageFile);let e=await (0,eN.PO)(r.imageFile);p.set("width",e.width.toString()),p.set("height",e.height.toString())}if(r.cardImageFile&&p.set("cardImage",r.cardImageFile),e&&(p.get("width")||p.set("width",e.width.toString()),p.get("height")||p.set("height",e.height.toString())),p.set("locales",v.A.stringify(r.locales)),p.set("slug",r.slug),p.set("author",r.author.id.toString()),p.set("tagIds",v.A.stringify(r.tags.map(e=>e.id))),p.set("links",v.A.stringify((t=r.links,l={},t.forEach(e=>{l[e.key]=e.value}),l))),_&&e){let a=await ej.A.editWallpaper(e.id,p);(0,X.S)(a);let r=(0,d.qC)(e);await x({url:r}),f(r);return}let o=await ej.A.createWallpaper(p);if((0,X.S)(o),r.author.id===a?.user?.id){let e=await ev.A.acceptPendingWallpaper(a.id);(0,X.S)(e)}let s=await ej.A.getWallpaper(o.data.id);(0,X.S)(s),f((0,d.qC)(s.data))}catch(e){console.error(e),"string"==typeof e.message&&S(e.message)}finally{F(!1)}};return(0,t.jsx)(i.Op,{...y,children:(0,t.jsxs)("form",{className:eE()["wallpaper-create-form"],onSubmit:A(q),children:[a&&(0,t.jsx)("img",{src:(0,eS.tI)(a),alt:a.id.toString(),width:a.width,height:a.height,loading:"lazy",className:eE()["wallpaper-create-form__pending-wallpaper-image"]}),(0,t.jsxs)("div",{className:eE()["wallpaper-create-form__field"],children:[(0,t.jsx)(o.A,{tag:"span",size:"l",weight:500,children:"Image"}),(0,t.jsx)(w,{wallpaper:e})]}),(0,t.jsxs)("div",{className:eE()["wallpaper-create-form__field"],children:[(0,t.jsx)(o.A,{tag:"span",size:"l",weight:500,children:"Dictionary"}),(0,t.jsx)(O,{})]}),(0,t.jsxs)("div",{className:eE()["wallpaper-create-form__field"],children:[(0,t.jsx)(o.A,{tag:"span",size:"l",weight:500,children:"Slug"}),(0,t.jsx)($,{})]}),(0,t.jsxs)("div",{className:eE()["wallpaper-create-form__field"],children:[(0,t.jsx)(o.A,{tag:"span",size:"l",weight:500,children:"Author"}),(0,t.jsx)(ex,{})]}),(0,t.jsxs)("div",{className:eE()["wallpaper-create-form__field"],children:[(0,t.jsx)(o.A,{tag:"span",size:"l",weight:500,children:"Categories"}),(0,t.jsx)(ea,{})]}),(0,t.jsxs)("div",{className:eE()["wallpaper-create-form__field"],children:[(0,t.jsx)(o.A,{tag:"span",size:"l",weight:500,children:"Links"}),(0,t.jsx)(ec,{})]}),N&&(0,t.jsx)(m.A,{error:N}),(0,t.jsx)(c.A,{type:"submit",loading:k,className:eE()["wallpaper-create-form__submit-absolute"],"data-e2e":"submit",children:_?"Edit Wallpaper":"Create Wallpaper"}),(0,t.jsx)(c.A,{type:"submit",loading:k,className:eE()["wallpaper-create-form__submit"],"data-e2e":"submit",children:_?"Edit Wallpaper":"Create Wallpaper"})]})})};var eL=r(42839),eT=r(96274),e$=r.n(eT),eI=!0;let eD=({wallpaper:e,pendingWallpaper:a,user:r})=>{let s=!!e;return(0,t.jsx)(l.A,{title:`${s?"Edit Wallpaper":"Create Wallpaper"} | ${eL.pu}`,description:"Wallpaper form",canonical:"/admin/wallpaper/create",share:!0,noindex:!0,adsense:!1,applicationSchema:!0,user:r,children:(0,t.jsxs)(p.A,{className:e$()["wallpaper-create__container"],children:[(0,t.jsx)("div",{className:e$()["wallpaper-create__header"],children:(0,t.jsx)(o.A,{tag:"h1",size:"heading",children:s?"Edit Wallpaper":"Create Wallpaper"})}),(0,t.jsx)(eO,{wallpaper:e,pendingWallpaper:a})]})})}},43060:e=>{e.exports={"wallpaper-create-form-author__input-wrapper":"WallpaperCreateFormAuthor_wallpaper-create-form-author__input-wrapper___0Qkp","wallpaper-create-form-author__card":"WallpaperCreateFormAuthor_wallpaper-create-form-author__card__Dq33G","wallpaper-create-form-author__card-avatar":"WallpaperCreateFormAuthor_wallpaper-create-form-author__card-avatar__CCMBs","wallpaper-create-form-author__card-avatar-letter":"WallpaperCreateFormAuthor_wallpaper-create-form-author__card-avatar-letter__y8i_H"}},43940:e=>{e.exports={"wallpaper-create-form-categories":"WallpaperCreateFormCategories_wallpaper-create-form-categories__KeWOY","wallpaper-create-form-categories__actions":"WallpaperCreateFormCategories_wallpaper-create-form-categories__actions__LVuML","wallpaper-create-form-categories__input-wrapper":"WallpaperCreateFormCategories_wallpaper-create-form-categories__input-wrapper__hzejG","wallpaper-create-form-categories__list":"WallpaperCreateFormCategories_wallpaper-create-form-categories__list__y87VT"}},53890:(e,a,r)=>{"use strict";r.d(a,{A:()=>l});var t=r(37876);let l=e=>(0,t.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",height:"16",width:"16",stroke:"currentColor",fill:"
21currentColor",strokeWidth:"0",...e,children:(0,t.jsx)("path",{d:"M18.3638 15.5355L16.9496 14.1213L18.3638 12.7071C20.3164 10.7545 20.3164 7.58866 18.3638 5.63604C16.4112 3.68341 13.2453 3.68341 11.2927 5.63604L9.87849 7.05025L8.46428 5.63604L9.87849 4.22182C12.6122 1.48815 17.0443 1.48815 19.778 4.22182C22.5117 6.95549 22.5117 11.3876 19.778 14.1213L18.3638 15.5355ZM15.5353 18.364L14.1211 19.7782C11.3875 22.5118 6.95531 22.5118 4.22164 19.7782C1.48797 17.0445 1.48797 12.6123 4.22164 9.87868L5.63585 8.46446L7.05007 9.87868L5.63585 11.2929C3.68323 13.2455 3.68323 16.4113 5.63585 18.364C7.58847 20.3166 10.7543 20.3166 12.7069 18.364L14.1211 16.9497L15.5353 18.364ZM14.8282 7.75736L16.2425 9.17157L9.17139 16.2426L7.75717 14.8284L14.8282 7.75736Z"})})},6e4:e=>{e.exports={"wallpaper-create-form-link":"WallpaperCreateFormLink_wallpaper-create-form-link__yFdxp","wallpaper-create-form-link__inputs":"WallpaperCreateFormLink_wallpaper-create-form-link__inputs__mTVXC","wallpaper-create-form-link__submit":"WallpaperCreateFormLink_wallpaper-create-form-link__submit___ZQ4A"}},68645:(e,a,r)=>{"use strict";r.d(a,{OP:()=>i,eu:()=>s,tI:()=>o});var t=r(68489),l=r(21725),p=r(42839);let o=e=>`${p.AB}/${(0,l._W)(e.wallpaper)}`,s=e=>!(e.height>e.width),i=(e,a,r=!1,l=433)=>{try{let t;if(a._680)return[e];t=a._1280?2:3;let p=[],o=[];for(let e=0;e<t;e++)p.push([]),o.push(0);for(let a of e){let e=s(a)&&r?a.width/a.height:a.height/a.width,t=l*e,i=o.indexOf(Math.min(...o));p[i].push(a),o[i]+=t}return p}catch(e){throw(0,t.A)(e,"alignPendingWallpapers"),e}}},70198:(e,a,r)=>{"use strict";r.d(a,{A:()=>l});var t=r(27060);class l extends t.A{static getWallpapers(e,a){return this.request("GET","wallpapers",{query:{...e,locale:a},locale:a})}static getAllWallpapers(){return this.request("GET","wallpapers/all")}static getWallpaper(e,a){return this.request("GET",`wallpapers/${e}`,{query:{locale:a},locale:a})}static getWallpaperLocales(e){return this.request("GET",`wallpapers/${e}/locales`)}static getRelatedWallpapers(e,a,r){return this.request("GET",`wallpapers/${e}/related`,{query:{...a,locale:r},locale:r})}static downloadWallpaper(e){return this.request("PATCH",`downloads/${e}`)}static createWallpaper(e){return this.request("POST","wallpapers",{body:e})}static editWallpaper(e,a){return this.request("PUT",`wallpapers/${e}`,{body:a})}static deleteWallpaper(e){return this.request("DELETE",`wallpapers/${e}`)}}},76350:(e,a,r)=>{"use strict";r.d(a,{A:()=>l});var t=r(27060);class l extends t.A{static getUsers(e){return this.request("GET","users",{query:e})}static getAllUsers(){return this.request("GET","users/all")}static getUser(e){return this.request("GET",`users/${e}`)}}},78874:e=>{e.exports={"wallpaper-create-form-categories-options":"WallpaperCreateFormCategoriesOptions_wallpaper-create-form-categories-options__61uOc","wallpaper-create-form-categories-options--open":"WallpaperCreateFormCategoriesOptions_wallpaper-create-form-categories-options--open__l_KZm","wallpaper-create-form-categories-options__option":"WallpaperCreateFormCategoriesOptions_wallpaper-create-form-categories-options__option__igL_X","wallpaper-create-form-categories-options__option-image":"WallpaperCreateFormCategoriesOptions_wallpaper-create-form-categories-options__option-image__leXJT","wallpaper-create-form-categories-options__option-empty":"WallpaperCreateFormCategoriesOptions_wallpaper-create-form-categories-options__option-empty__G3vJD","wallpaper-create-form-categories-options__option-empty-icon":"WallpaperCreateFormCategoriesOptions_wallpaper-create-form-categories-options__option-empty-icon__JNmkO"}},80072:e=>{e.exports={"wallpaper-create-form-category":"WallpaperCreateFormCategory_wallpaper-create-form-category__rKD0G","wallpaper-create-form-category__image":"WallpaperCreateFormCategory_wallpaper-create-form-category__image__LJOGl","wallpaper-create-form-category__empty":"WallpaperCreateFormCategory_wallpaper-create-form-category__empty__oDNed","wallpaper-create-form-category__empty-icon":"WallpaperCreateFormCategory_wallpaper-create-form-category__empty-icon__I0A6R","wallpaper-create-form-category__delete":"WallpaperCreateFormCategory_wallpaper-create-form-category__delete___6Y9e","wallpaper-create-form-category__delete-icon":"WallpaperCreateFormCategory_wallpaper-create-form-category__delete-icon__TFlOO"}},80124:e=>{e.exports={"wallpaper-create-form":"WallpaperCreateForm_wallpaper-create-form__EiIj3","wallpaper-create-form__pending-wallpaper-image":"WallpaperCreateForm_wallpaper-create-form__pending-wallpaper-image__fkw4B","wallpaper-create-form__field":"WallpaperCreateForm_wallpaper-create-form__field__wkOsz","wallpaper-create-form__submit":"WallpaperCreateForm_wallpaper-create-form__submit__aHEUh","wallpaper-create-form__submit-absolute":"WallpaperCreateForm_wallpaper-create-form__submit-absolute__nJOo7"}},81312:e=>{e.exports={"wallpaper-create-form-dictionary":"WallpaperCreateFormDictionary_wallpaper-create-form-dictionary__zhkzM","wallpaper-create-form-dictionary__tabs":"WallpaperCreateFormDictionary_wallpaper-create-form-dictionary__tabs__Emixc","wallpaper-create-form-dictionary__tabs-button":"WallpaperCreateFormDictionary_wallpaper-create-form-dictionary__tabs-button__SMf2Y"}},86128:e=>{e.exports={"wallpapers-create-form-links-add":"WallpaperCreateFormLinksAdd_wallpapers-create-form-links-add__JdhCl","wallpapers-create-form-links-add__inputs":"WallpaperCreateFormLinksAdd_wallpapers-create-form-links-add__inputs__1xCnh","wallpapers-create-form-links-add__submit":"WallpaperCreateFormLinksAdd_wallpapers-create-form-links-add__submit__dmvIy"}}
21,96274:e=>{e.exports={"wallpaper-create__container":"WallpaperCreate_wallpaper-create__container__k82Bp","wallpaper-create__header":"WallpaperCreate_wallpaper-create__header__g9fc9"}},97289:(e,a,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/wallpaper/create",function(){return r(42435)}])}},e=>{e.O(0,[8992,9759,4243,2419,8420,636,6593,8792],()=>e(e.s=97289)),_N_E=e.O()}]);

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.