1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2163],{2163:(e,i,t)=>{"use strict";t.d(i,{A:()=>ee});var r=t(37876),n=t(89318),l=t(14232);let a=e=>(0,r.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,r.jsx)("path",{d:"M13.3333 11.3333H2.66667M2.66667 11.3333L5.33333 8.66667M2.66667 11.3333L5.33333 14M2.66667 4.66667H13.3333M13.3333 4.66667L10.6667 2M13.3333 4.66667L10.6667 7.33333",stroke:"#9A9BA3",strokeLinecap:"round",strokeLinejoin:"round"})});var o=t(70402),s=t(79352),d=t(44206),u=t(69241),c=t(22390),_=t(39785),m=t(52475),f=t.n(m);let v=RegExp("[^\\p{Script=Latin}\\p{Script=Cyrillic}\\p{N} -]","gu");function p(e){return e.replace(v,"")}function h(e){return e.trim().replace(/\s+/g," ")}function g(e,i){let t=0,r=0;for(let n of e){if(" "!==n){if(t===i)break;t++}r+=n.length}return e.slice(0,r)}function x(e){let{label:i,hint:t,hintIcon:n,placeholder:a,disabled:o,required:s,markRequired:d,maxTags:m,maxTagLength:v,minTagLength:x=2,maxTagWords:b=3,value:y,onChange:j}=e,[C,w]=(0,l.useState)(""),[D,k]=(0,l.useState)(null),N=(0,l.useRef)(null),A=y.length>=m;function I(e){let i=[...y],t=null;for(let r of e){let e=g(h(p(r)),v).trim().split(" ").map(e=>e.replace(/-+/g,"-").replace(/^-+|-+$/g,"")).filter(Boolean).join(" ");if(e){if(i.length>=m){t="Ðожно ÑказаÑÑ Ð½Ðµ болÑÑе ".concat(m," Ñегов");break}if(e.replace(/ /g,"").length<x){t="Тег должен ÑодеÑжаÑÑ Ð¼Ð¸Ð½Ð¸Ð¼Ñм ".concat(x," Ñимвола");continue}if(e.split(" ").length>b){t="Тег не Ð¼Ð¾Ð¶ÐµÑ ÑодеÑжаÑÑ Ð±Ð¾Ð»ÑÑе ".concat(b," Ñлов");continue}if(i.some(i=>i.toLowerCase()===e.toLowerCase())){t="Такой Ñег Ñже добавлен";continue}i.push(e)}}return k(t),i.length!==y.length&&j(i),null===t}function S(){if(!h(C)){w(""),k(null);return}I([C])&&w("")}function M(e){k(null),j(y.filter((i,t)=>t!==e))}return(0,r.jsxs)("div",{children:[(0,r.jsx)(c.dh,{label:i,required:s,markRequired:d,asDiv:!0}),(0,r.jsxs)("div",{className:(0,u.A)(f().box,{[f().invalid]:!!D,[f().disabled]:o}),onMouseDown:e=>{var i;o||e.target!==e.currentTarget||(e.preventDefault(),null==(i=N.current)||i.focus())},children:[y.map((e,i)=>(0,r.jsxs)("span",{className:f().tag,children:[e,!o&&(0,r.jsx)("button",{type:"button",className:f().tag_remove,"aria-label":"УдалиÑÑ Ñег ".concat(e),onClick:()=>M(i),children:(0,r.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("path",{d:"M12.0001 10.7275L16.4551 6.27246L17.7277 7.54506L13.2727 12.0001L17.7277 16.4551L16.4551 17.7277L12.0001 13.2727L7.54506 17.7277L6.27246 16.4551L10.7275 12.0001L6.27246 7.54506L7.54506 6.27246L12.0001 10.7275Z",fill:"currentColor"})})})]},e)),(0,r.jsx)("input",{ref:N,type:"text",className:f().input,placeholder:y.length?"":a,disabled:o,value:C,maxLength:v+b-1,onChange:e=>{A||(k(null),w(g(p(e.target.value),v)))},onKeyDown:function(e){if("Enter"===e.key||","===e.key){e.preventDefault(),S();return}"Backspace"===e.key&&!C&&y.length&&(e.preventDefault(),M(y.length-1))},onPaste:function(e){var i;let t=e.clipboardData.getData("text");if(!t.includes(","))return;e.preventDefault();let r=(C+t).split(","),n=null!=(i=r.pop())?i:"";I(r)&&w(h(n))},onBlur:S})]}),(D||t)&&(0,r.jsx)(_.C,{text:null!=D?D:t,danger:!!D,showHintIcon:!D&&n})]})}var b=t(56750),y=t(13977),j=t.n(y),C=t(62096),w=t(9534),D=t(55928),k=t(48654),N=t(85812),A=t(70727),I=t(83245),S=t(5057),M=t(61948),R=t(54964),T=t(73207),L=t(40637),E=t(56591),q=t(36649),O=t(58069),F=t(77328),z=t.n(F),V=t(14e3),H=t(20061),U=t.n(H);function B(e){let{value:i,label:t,placeholder:n,hint:l,onChange:a,className:o}=e;return(0,r.jsxs)("div",{className:(0,u.A)(U().field_text_select,o),children:[(0,r.jsx)("label",{className:j().label,children:t}),(0,r.jsxs)("div",{className:U().field_text_select__content,children:[(0,r.jsx)(b.A,{noborder:!0,value:i.value,placeholder:n,onInput:e=>null==a?void 0:a({...i,value:Number.isNaN(parseInt(e,10))?"":parseInt(e,10)})}),(0,r.jsx)(C.A,{size:"small",noborder:!0,value:i.unit,items:[{title:"минÑÑ",index:S.tn.MINUTES},{title:"ÑаÑов",index:S.tn.HOURS},{title:"дней",index:S.tn.DAYS}],onChange:e=>null==a?void 0:a({...i,unit:e.index})})]}),l&&(0,r.jsx)(_.C,{text:l,showHintIcon:!0})]})}var P=t(83985),Z=t(61498),Y=t(7319),K=t(48978),G=t(92048),J=t(48105),Q=t.n(J),W=t(27684),X=t(70818),$=t(15064);function ee(e){var i,t,m,f,v,p,h,g,y,F,H,U;let{offer:J,category:$,game:ee,paymentSystems:el}=e,ea=(0,l.useMemo)(()=>(0,T.RX)($.subCategories),[$]),eo=(0,l.useMemo)(()=>{var e;return null!=(e=$.subCategories)?e:[]},[$.subCategories]),es=e=>(0,E.ZZ)($,e,ea).map(e=>{let i=e.options.filter(e=>!e.redirectSlug&&!e.isHidden);return 1===i.length?{id:e.id,optionId:i[0].id}:null}
1).filter(Boolean),[ed,eu]=(0,l.useState)(J?{...J,deliveryTime:null!=(f=J.deliveryTime)?f:{from:{unit:S.tn.MINUTES,value:""},to:{unit:S.tn.MINUTES,value:""}},goods:null!=(v=null==(i=J.goods)?void 0:i.join("\n"))?v:"",goodsInstruction:null!=(p=J.goodsInstruction)?p:"",tags:null!=(h=J.tags)?h:[],price:(0,L.DN)(J.price),minOrderCurrencyAmount:null!=(g=J.minOrderCurrencyAmount)?g:void 0}:{type:$.offerType,categoryId:$.id,price:void 0,minOrderCurrencyAmount:void 0,isActive:!0,availability:void 0,goods:"",goodsInstruction:"",tags:[],attributes:es(void 0),numericAttributes:[],instantDelivery:void 0,autoDelivery:!1,postPaymentMessage:void 0,subCategoryId:void 0,deliveryTime:{from:{unit:S.tn.MINUTES,value:""},to:{unit:S.tn.MINUTES,value:""}},descriptions:{rus:{briefDescription:"",description:""}}}),ec=(0,l.useMemo)(()=>(0,E.ZZ)($,ed.subCategoryId,ea).filter(e=>{var i;return null==(i=e.options)?void 0:i.some(e=>!e.redirectSlug&&!e.isHidden)}),[$,ed.subCategoryId,ea]),e_=(0,l.useMemo)(()=>(0,E.k4)($,ed.subCategoryId,ea),[$,ed.subCategoryId,ea]),em=e=>{var i,t;if(!e)return{instantDelivery:$.instantDelivery,instantDeliveryRequired:$.instantDeliveryRequired};let r=eo.find(i=>i.id===e);return{instantDelivery:null!=(i=null==r?void 0:r.instantDelivery)?i:$.instantDelivery,instantDeliveryRequired:null!=(t=null==r?void 0:r.instantDeliveryRequired)?t:$.instantDeliveryRequired}},ef=(0,l.useMemo)(()=>em(ed.subCategoryId),[ed.subCategoryId,$,eo]),ev=(0,l.useMemo)(()=>{var e;if(!ed.subCategoryId)return $.autoDelivery;let i=eo.find(e=>e.id===ed.subCategoryId);return null!=(e=null==i?void 0:i.autoDelivery)?e:$.autoDelivery},[ed.subCategoryId,$.autoDelivery,eo]),ep=(0,l.useMemo)(()=>{let e=[];for(let r of ec){var i,t;let n=null==(t=ed.attributes)||null==(i=t.find(e=>e.id===r.id&&void 0!==e.optionId))?void 0:i.optionId;if(!n)continue;let l=r.options.find(e=>e.id===n);l&&e.push(l)}return e},[ec,ed.attributes]),eh=(0,l.useMemo)(()=>{if(ep.some(e=>!0===e.instantDeliveryRequired))return{instantDelivery:!0,instantDeliveryRequired:!0};let e=ep.some(e=>!0===e.instantDelivery);return ep.some(e=>!1===e.instantDelivery)?{instantDelivery:!1,instantDeliveryRequired:!1}:e?{instantDelivery:!0,instantDeliveryRequired:!1}:null},[ep]),eg=(0,l.useMemo)(()=>null!=eh&&!!eh.instantDeliveryRequired||(eh?eh.instantDelivery:!!ef.instantDeliveryRequired||ef.instantDelivery),[eh,ef]),ex=(0,l.useMemo)(()=>{var e;return null!=(e=null==eh?void 0:eh.instantDeliveryRequired)?e:ef.instantDeliveryRequired},[eh,ef.instantDeliveryRequired]),eb=(0,l.useMemo)(()=>ev,[ev]),ey=e=>!ed.price||!e||0>=Number(ed.price)?"":new O.A(e).times(ed.price).round(2),[ej,eC]=(0,l.useState)(!1),[ew,eD]=(0,l.useState)(!1),[ek,eN]=(0,l.useState)(null!=(y=null==J?void 0:J.images.map(e=>({id:e.id,src:(0,q.Fs)(e.id,"preview"),fullSrc:(0,q.Fs)(e.id)})))?y:[]),[eA,eI]=(0,l.useState)([]),[eS,eM]=(0,l.useState)(0),[eR,eT]=(0,l.useState)(()=>{if((null==J?void 0:J.minOrderCurrencyAmount)&&J.price)try{let e=ey(null==J?void 0:J.minOrderCurrencyAmount);return String(e)}catch(e){}return""}),eL=(0,l.useRef)([]),{setKycPopup:eE}=(0,A.Y7)(),eq=(0,V.useRouter)(),eO=ea&&ed.subCategoryId?ea[ed.subCategoryId]:null,eF=$.requiresKyc||(null==eO?void 0:eO.requiresKyc),ez="GAME_CURRENCY"===$.offerType||(null!=(F=null==eO?void 0:eO.isMinOrderSupported)?F:null==$?void 0:$.isMinOrderSupported),eV=null!=(H=null==eO?void 0:eO.maxMinOrderCurrencyAmount)?H:$.maxMinOrderCurrencyAmount,eH=null!=(U=null==eO?void 0:eO.offerTagsMode)?U:$.offerTagsMode,eU=eH===I.GS.ENABLED||eH===I.GS.REQUIRED,eB=eH===I.GS.REQUIRED,eP={formData:ed,setFormData:eu},{currentUser:eZ}=(0,P.Jd)(),eY=!!J,eK=(0,E.P)(ee,$),eG=ej||ew,eJ=!!eZ&&!!J&&J.userId!==eZ.id&&(0,W.dy)(eZ),eQ=()=>{eZ&&eE({show:!0,status:eZ.kycStatus,data:{categoryId:$.id,subCategoryId:null==eO?void 0:eO.id}})};async function eW(){try{var e;eD(!0),await n.k.delete(null!=(e=null==ed?void 0:ed.publicId)?e:ed.id),k.V.success({text:"ÐÑедложение Ñдалено"}),eq.push(eK)}catch(e){(0,M.T)(e),eD(!1)}}async function eX(){var e,i,t,r,l,a;if(!eG)try{eC(!0);let a=Array.isArray(ed.attributes)?ed.attributes:[],o=new Set(e_.map(e=>String(e.id))),s=new Map(ec.map(e=>[String(e.id),new Set(e.options.filter(e=>!e.redirectSlug&&!e.isHidden).map(e=>String(e.id)))])),d=""!==ed.goods&&ed.instantDelivery?ed.goods.split("\n").map(e=>
1e.trim()).filter(Boolean):[],u="string"==typeof ed.goodsInstruction?ed.goodsInstruction.trim():"",c=ed.instantDelivery&&""!==u?u:null,_=eU?ed.tags:[],m=ed.postPaymentMessage&&(0,R.pR)(ed.postPaymentMessage)||null,f={...ed,tags:_,postPaymentMessage:m,descriptions:{rus:{briefDescription:$.isBriefDescriptionEnabled?null==(e=ed.descriptions.rus.briefDescription)?void 0:e.trim():void 0,description:null==(i=ed.descriptions.rus.description)?void 0:i.trim()}},goods:d,goodsInstruction:c,basicAttributes:a.filter(e=>{var i;return void 0!==e.optionId&&(null==(i=s.get(String(e.id)))?void 0:i.has(String(e.optionId)))}),numericAttributes:a.filter(e=>void 0!==e.numericValue).filter(e=>o.has(String(e.id))).map(e=>({...e,numericValue:Number(e.numericValue)})),attributes:void 0,images:void 0,minOrderCurrencyAmount:ez&&ed.minOrderCurrencyAmount?Number(ed.minOrderCurrencyAmount):void 0,deliveryTime:(null==(t=ed.deliveryTime)?void 0:t.from.value)===""||(null==(r=ed.deliveryTime)?void 0:r.to.value)===""?null:ed.deliveryTime,price:(ed.price||"0").replace(",","."),availability:ed.instantDelivery?(0,T.qE)(d.length,1,Infinity):ed.availability?Number(ed.availability.toString()):+("LOT"===$.offerType)},v=null!=(l=null==ed?void 0:ed.publicId)?l:ed.id;if(eY){if(eJ){if(ed.reason){if(ed.reason.length<=2)throw Error("ÐÑиÑина изменений должна бÑÑÑ Ð±Ð¾Ð»ÑÑе или Ñавна 3-м Ñимволам.")}else throw Error("УкажиÑе пÑиÑÐ¸Ð½Ñ Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ð¹.");delete f.availability,delete f.goods}await n.k.update(v,f)}else{let{id:e,publicId:i}=await n.k.create(f);v=null!=i?i:e}try{if(eY&&eL.current.length&&await (0,M.F)("POST","/offers/".concat(v,"/images/delete"),{imagesToDelete:eL.current}),eA.length){let e=new FormData;eA.forEach(i=>{e.append("images",i)}),await (0,M.F)("POST","/offers/".concat(v,"/images/upload"),e)}}catch(e){(0,M.T)(e),k.V.error({text:"ÐÑедложение Ñоздано, но изобÑÐ°Ð¶ÐµÐ½Ð¸Ñ Ð½Ðµ загÑÑженÑ"})}eJ?eq.push((0,q.qI)({id:null==ed?void 0:ed.id,publicId:ed.publicId})):eq.replace(eK)}catch(e){if((null==e||null==(a=e.extra)?void 0:a.code)&&"KYC_REQUIRED"===e.extra.code){eQ(),eC(!1);return}(0,M.T)(e),eC(!1)}}return(0,l.useEffect)(()=>{ed.instantDelivery&&ed.goods&&eM(ed.goods.split("\n").map(e=>e.trim()).filter(Boolean).length)},[ed.instantDelivery,ed.goods]),(0,l.useEffect)(()=>{eu(e=>!eg&&e.instantDelivery?{...e,instantDelivery:!1}:ex&&!e.instantDelivery?{...e,instantDelivery:!0}:e)},[eg,ex]),(0,l.useEffect)(()=>{eb||eu(e=>e.autoDelivery?{...e,autoDelivery:!1}:e)},[eb]),(0,l.useEffect)(()=>{eU||eu(e=>e.tags.length?{...e,tags:[]}:e)},[eU]),(0,l.useEffect)(()=>{if(!ed.price||!ed.minOrderCurrencyAmount)return void eT("");try{let e=ey(ed.minOrderCurrencyAmount);eT(String(e))}catch(e){eT("")}},[ed.price]),(0,l.useEffect)(()=>{ez||(eT(""),eu(e=>void 0===e.minOrderCurrencyAmount?e:{...e,minOrderCurrencyAmount:void 0}))},[ez]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(w.A,{marginBottom:40,backButton:!0,documentTitle:eY?"РедакÑиÑоваÑÑ Ð¿Ñедложение":"ÐобавиÑÑ Ð¿Ñедложение",children:(0,r.jsxs)("span",{className:Q().edit_title,children:[(0,r.jsx)("span",{children:eY?"РедакÑиÑоваÑÑ Ð¿Ñедложение":"ÐобавиÑÑ Ð¿Ñедложение"}),(null==J?void 0:J.viewsCount)!=null&&(0,r.jsx)(X.V,{count:J.viewsCount})]})}),(0,r.jsx)(z(),{children:(0,r.jsx)("meta",{name:"robots",content:"noindex, follow"})}),(0,r.jsxs)("div",{className:(0,u.A)(Q().form_outline,{[Q().loading]:eG}),children:[!!eo.length&&(0,r.jsx)(C.A,{label:"Тип пÑедложениÑ",title:"ÐÑбеÑиÑе Ñип пÑедложениÑ",showTitleInMenu:!1,items:eo.map(e=>({title:e.name,index:e.id})),variant:"default",model:(0,c.ch)("subCategoryId",eP),onChange:e=>{var i,t;let r=em(e.index),n=(null!=(t=null==ea||null==(i=ea[e.index])?void 0:i.autoDelivery)?t:$.autoDelivery)===!0;eu(i=>({...i,subCategoryId:e.index,attributes:es(e.index),instantDelivery:!!r.instantDeliveryRequired||!!r.instantDelivery&&i.instantDelivery,autoDelivery:!!n&&i.autoDelivery}))}}),eZ&&eF&&"VERIFIED"!==eZ.kycStatus&&(0,r.jsx)("div",{onClick:eQ,className:"pseudo_link",children:$.requiresKyc?"ÐÐ»Ñ Ð¿Ñодажи ÑоваÑов в данной каÑегоÑии необÑ
одима KYC ÐеÑиÑикаÑиÑ":"ÐÐ»Ñ Ð¿Ñодажи ÑоваÑов в данной подкаÑегоÑии необÑ
одима KYC ÐеÑиÑикаÑиÑ"}),ec.map(e=>(0,r.jsx)(en,{filter:e,formModel:eP},e.id)),e_.map(e=>(0,r.jsx)(et,{numericFilter:e,formModel:eP},e.id)),(0,r.jsx)(K.w,{}),"LOT"===$.offerType&&$.isBriefDescriptionEnabled&&(0,r.jsx)(b.A,{label:"ÐÑаÑкое опиÑание",placeholder:"ÐпиÑание пÑедложениÑ",required:!0,markRequired:!0,hint:"ÐÑобÑажаеÑÑÑ Ð¿ÑÑмо в ÑаблиÑе",hintIcon:!0,showCounter:!0,maxLength:100,model:(0,c.ch)("descriptions.rus.briefDescription",eP)}),(0,r.jsx)(D.A,{label:"ÐодÑобное опиÑание",placeholder:"ÐодÑобное опиÑание ваÑего пÑедложениÑ",required:!0,markRequired:!0,maxLength:N.$.maxOfferDescriptionLength,model:(0,c.ch)("descriptions.rus.description",eP)}),eU&&(0,r.jsxs)("div",{className:Q().field_group_vertical_gap8,children:[(0,r.jsx)(x,{label:"Теги",placeholder:"ÐведиÑе Ñег и нажмиÑе Enter",required:eB,markRequired:eB,maxTags:N.$.maxOfferTags,maxTagLength:N.$.maxOfferTagLength,value:ed.tags,onChange:e=>eu(i=>({...i,tags:e}))}),(0,r.jsx)(ei,{})]}),(0,r.jsxs)("div",{className:Q().field_delivery,children:[(0,r.jsxs)("div",{className:Q().field_group_horizontal_gap8,children:[(0,r.jsx)(B,{label:"ÐÑÐµÐ¼Ñ Ð´Ð¾ÑÑавки",placeholder:"оÑ",value:null==(t=ed.deliveryTime)?void 0:t.from,onChange:e=>eu({...ed,deliveryTime:{...ed.deliveryTime,from:e}})}),(0,r.jsx)(B,{label:"\xa0",placeholder:"до",className:Q().field_delivery__to,value:null==(m=ed.deliveryTime)?void 0:m.to,onChange:e=>eu({...ed,deliveryTime:{...ed.deliveryTime,to:e}})})]}),(0,r.jsx)(_.C,{text:"Ðожно не заполнÑÑÑ",showHintIcon:!0})]}),(0,r.jsx)(D.A,{label:"ÐвÑомаÑиÑеÑкое ÑообÑение покÑпаÑÐµÐ»Ñ Ð¿Ð¾Ñле оплаÑÑ",placeholder:"СообÑение бÑÐ´ÐµÑ Ð¾ÑпÑавлено поÑле оплаÑÑ ÐºÐ°Ð¶Ð´Ð¾Ð¼Ñ Ð¿Ð¾ÐºÑпаÑелÑ",hint:"Ðожно не заполнÑÑÑ, бÑÐ´ÐµÑ Ð¾ÑпÑавлено ÐºÐ°Ð¶Ð´Ð¾Ð¼Ñ Ð¿Ð¾ÐºÑпаÑелÑ",hintIcon:!0,maxLength:800,sanitize:e=>(0,R.pR)(e,{trim:!1}),model:(0,c.ch)("postPaymentMessage",eP)}),"LOT"===$.offerType&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(d.Ay,{mainLabel:"ÐаÑÑинки",hint:"JPEG или PNG до 5 MB",onUploadedDelete:e=>{eL.current.push(e)},uploadedFiles:ek,newFiles:eA,setUploadedFiles:eN,setNewFiles:eI,sliderOptions:{slidesToShow:5}}),eg&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(K.w,{}),(0,r.jsx)("div",{className:Q().field_group_vertical_gap8,children:eg&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.A,{markRequired:!0,readonly:ex,required:ex,label:"ÐвÑомаÑиÑеÑÐºÐ°Ñ Ð²ÑдаÑа ÑоваÑа",model:(0,c.ch)("instantDelivery",eP)}),ed.instantDelivery&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(D.A,{label:"ТоваÑÑ",placeholder:"Ð¢Ð¾Ð²Ð°Ñ 1\nÐ¢Ð¾Ð²Ð°Ñ 2\nÐ¢Ð¾Ð²Ð°Ñ 3",hint:"Ðдна ÑÑÑока - один ÑоваÑ. ТоваÑÑ Ð²ÑдаÑÑÑÑ ÑвеÑÑ
Ñ Ð²Ð½Ð¸Ð·, вÑданнÑе ÑдалÑÑÑÑÑ.",hintIcon:!0,maxRows:20,maxLength:5e3,countLines:!0,model:(0,c.ch)("goods",eP)}),(0,r.jsx)(D.A,{label:"ÐнÑÑÑÑкÑÐ¸Ñ Ð¸ пÑоÑÐ°Ñ Ð¸Ð½ÑоÑмаÑÐ¸Ñ Ðº ÑоваÑÑ",placeholder:"Ð¢Ð¾Ð²Ð°Ñ Ð½Ñжно ÑаÑпаковÑваÑÑ Ð°ÐºÐºÑÑаÑно",hint:"Ðоле не обÑзаÑелÑно к заполнениÑ",hintIcon:!0,maxRows:12,maxLength:1e3,model:(0,c.ch)("goodsInstruction",eP)})]})]})})]})]}),eb&&(0,r.jsxs)("div",{className:Q().field_group_vertical_gap8,children:[(0,r.jsx)(s.A,{label:"ÐвÑомаÑизиÑÐ¾Ð²Ð°Ð½Ð½Ð°Ñ Ð´Ð¾ÑÑавка",model:(0,c.ch)("autoDelivery",eP),hintIcon:!0,hintTooltipId:"auto-delivery-tooltip",hintPreventToggle:!0,hint:"ÐвÑомаÑиÑеÑÐºÐ°Ñ Ð²ÑдаÑа ÑоваÑа полÑзоваÑелÑÑким боÑом"}),(0,r.jsx)(G.A,{id:"auto-delivery-tooltip",delayShow:250,place:"bottom-start",children:"ÐкÑивиÑÑйÑе, еÑли Ñ Ð²Ð°Ñ Ð¿Ð¾Ð´ÐºÐ»ÑÑен Ð±Ð¾Ñ Ð´Ð»Ñ Ð°Ð²ÑомаÑиÑеÑкой вÑдаÑи заказов."})]}),(0,r.jsx)(K.w,{}),(0,r.jsxs)("div",{className:Q().price,children:[(0,r.jsxs)("div",{className:Q().field_group_horizontal_gap8,children:[(0,r.jsx)(b.A,{label:"Цена за 1 ".concat(I.lH[$.availabilityUnit]," ÑоваÑа"),placeholder:"0",postfix:"â½",format:"ufloat",model:(0,c.ch)("price",eP)}),(0,r.jsx)(b.A,{label:"ÐалиÑие",disabled:ed.instantDelivery,placeholder:ed.instantDelivery?String(eS):"LOT"===$.offerType?"1":"0",postfix:I.lH[$.availabilityUnit],format:"uint",model:(0,c.ch)("availability",eP)})]}),(0,r.jsx)(K.w,{light:!0}),(0,r.jsxs)("div",{className:Q().field_group_horizontal_gap8,children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:j().label,children:"Цена Ð´Ð»Ñ Ð²Ð°ÑиÑ
покÑпаÑелей"}),(0,r.jsx)("table",{children:(0,r.jsx)("tbody",{children:el.filter(e=>e.isVisibleInPriceComparison).map(e=>{var i;return(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{children:e.name}),(0,r.jsx)("td",{children:(0,r.jsxs)("b",{children:[(0,L.zF)((0,q.Wl)(0,1,{price:null!=(i=(ed.price||"0").replace(",","."))?i:"0"},ee,$,e).paymentInRubles,0,!0,!0,!0)||"0"," ","â½"]})})]},e.id)})})})]}),ez&&(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:Q().min_price_title,children:"ÐинималÑное колиÑеÑÑво Ð´Ð»Ñ Ð·Ð°ÐºÐ°Ð·Ð°"}),(0,r.jsxs)("div",{className:Q().min_price_box,children:[(0,r.jsx)(b.A,{placeholder:"0",hintIcon:!0,postfix:I.lH[$.availabilityUnit],nullable:!0,format:"uint",model:(0,c.ch)("minOrderCurrencyAmount",eP),onInput:e=>{if(!e)return void eT("");let i=Number(e);ed.price&&eT(String(ey(i)))}}),(0,r.jsx)(a,{className:Q().switch_icon}),(0,r.jsx)(b.A,{placeholder:"0",hintIcon:!0,postfix:"â½",nullable:!0,format:"ufloat",value:eR,onInput:e=>{eT(e);let i=(e=>{if(!(!ed.price||!e||0>
1=Number(ed.price)))return Z.W.ceil(new O.A(Number(e)).div(ed.price))})(e);if(!i)return void eu(e=>({...e,minOrderCurrencyAmount:void 0}));eu(e=>({...e,minOrderCurrencyAmount:Number(i)}))}})]}),(0,r.jsx)(_.C,{text:null===eV?"Чем менÑÑе, Ñем лÑÑÑе.":"Чем менÑÑе, Ñем лÑÑÑе. ÐакÑималÑно Ð´Ð»Ñ ÐºÐ°ÑегоÑии: ".concat(eV," ").concat(I.lH[$.availabilityUnit]),showHintIcon:!0})]})]})]}),(0,r.jsx)(er,{price:ed.price,game:ee,category:$,paymentSystems:el}),eJ&&(0,r.jsx)(D.A,{label:"ÐÑиÑина изменений",model:(0,c.ch)("reason",eP),markRequired:!0,required:!0}),(0,r.jsxs)("footer",{className:Q().footer,children:[(0,r.jsx)(s.A,{label:"ÐкÑивное пÑедложение",model:(0,c.ch)("isActive",eP),onChange:()=>{eu(e=>({...e}))}}),(0,r.jsxs)("div",{className:Q().footer_buttons,children:[eY&&(0,r.jsx)(Y.e,{deleting:ew,onDelete:eW,disabled:eG}),(0,r.jsx)(o.b7,{submitting:eG,onClick:eX,text:eY?["СоÑ
ÑаниÑÑ","СоÑ
ÑанÑем..."]:["ÐобавиÑÑ","ÐобавлÑем..."]})]})]})]})]})}function ei(){let[e,i]=(0,l.useState)(!1);return(0,r.jsxs)("div",{className:Q().tags_panel,children:[(0,r.jsxs)("div",{className:Q().tags_panel_header,children:[(0,r.jsx)("div",{className:Q().breakdown_title,children:"ЧÑо Ñакое Ñеги?"}),(0,r.jsx)(o.Ay,{size:"small",onClick:()=>i(e=>!e),children:e?"СкÑÑÑÑ":"ÐодÑобнее"})]}),e&&(0,r.jsxs)("p",{className:Q().tags_panel_text,children:["Теги â ÑÑо клÑÑевÑе Ñлова или ÑловоÑоÑеÑаниÑ, коÑоÑÑе помогаÑÑ Ð¿Ð¾ÐºÑпаÑелÑм наÑ
одиÑÑ Ð²Ð°Ñ ÑÐ¾Ð²Ð°Ñ ÑеÑез поиÑк каÑегоÑии. ÐÑ Ð¼Ð¾Ð¶ÐµÑе добавиÑÑ Ð´Ð¾ ",N.$.maxOfferTags," Ñегов. ÐÑполÑзÑйÑе ÑоÑнÑе и ÑелеванÑнÑе Ñлова или ÑловоÑоÑеÑаниÑ, ÑооÑвеÑÑÑвÑÑÑие ÑоваÑÑ, ÑÑÐ¾Ð±Ñ Ð¾Ð½ коÑÑекÑно оÑобÑажалÑÑ Ð² ÑезÑлÑÑаÑаÑ
поиÑка."]})]})}function et(e){var i,t,n;let{numericFilter:l,formModel:{formData:a,setFormData:o}}=e;return(0,r.jsx)(b.A,{label:l.nameRu,required:!0,value:null!=(n=null==(t=a.attributes)||null==(i=t.find(e=>e.id===l.id))?void 0:i.numericValue)?n:"",format:!1===l.allowFloat?"uint":"ufloat",maxFractionalDigitis:2,min:l.range.min,max:l.range.max,onInput:e=>o({...a,attributes:[...a.attributes.filter(e=>e.id!==l.id),{id:l.id,numericValue:e}]})})}function er(e){let{price:i,game:t,category:n,paymentSystems:a}=e,[s,d]=(0,l.useState)(!1),c=(0,l.useMemo)(()=>a.filter(e=>e.isVisibleInPriceComparison),[a]),_=(0,l.useMemo)(()=>{var e;let r=(i||"0").replace(",","."),l=new O.A(r),a=l.mul(100),o=new O.A(null!=(e=n.serviceFeeRate)?e:"0"),s=a.mul(o).round().div(100),d=o.mul(100),u=c.map(e=>{let i=new O.A(e.feeRate).sub(e.coveredFeeRate),{paymentInRubles:a}=(0,q.Wl)(0,1,{price:r},t,n,e),o=a.sub(l).sub(s);return{id:e.id,name:e.name,feePercent:i.mul(100),commission:o,finalPrice:a}});return{starvellPercent:d,starvellCommission:s,items:u}},[i,t,n,c]),m=e=>(0,L.zF)(e,2,!0,!0,!0)||"0",f=e=>(0,L.zF)(e,2,!0,!0,!0)||"0";return s?(0,r.jsxs)("div",{className:Q().breakdown_expanded,children:[(0,r.jsxs)("div",{className:Q().breakdown_left,children:[(0,r.jsx)("div",{className:Q().breakdown_title,children:"Ðз Ñего ÑкладÑваеÑÑÑ Ñена?"}),(0,r.jsxs)("div",{className:Q().breakdown_description__box,children:[(0,r.jsx)("p",{className:Q().breakdown_description,children:"ФиналÑÐ½Ð°Ñ Ñена завиÑÐ¸Ñ Ð¾Ñ Ð²ÑбÑанного ÑпоÑоба оплаÑа покÑпаÑелем, комиÑÑий плаÑежной ÑиÑÑемÑ."}),(0,r.jsxs)("p",{className:Q().breakdown_description,children:["ÐÑ Ñеним полÑзоваÑелей и пÑозÑаÑно обÑÑÑнÑем ÑиÑÑÐµÐ¼Ñ ÑенообÑазованиÑ. ",(0,r.jsx)("br",{}),"СпаÑибо за довеÑие!"]})]}),(0,r.jsx)(o.Ay,{size:"small",onClick:()=>d(!1),children:"СкÑÑÑÑ"})]}),(0,r.jsx)("div",{"aria-hidden":!0,className:Q().breakdown_vertical_separator}),(0,r.jsxs)("div",{className:Q().breakdown_right,children:[(0,r.jsxs)("div",{className:Q().breakdown_section,children:[(0,r.jsxs)("div",{className:Q().breakdown_section_title,children:["ÐомиÑÑÐ¸Ñ ÑайÑа (",f(_.starvellPercent),"%)"]}),(0,r.jsxs)("div",{className:Q().breakdown_row,children:[(0,r.jsx)("span",{children:"ÐомиÑÑÐ¸Ñ Starvell"}),(0,r.jsx)($.Y,{children:"".concat(m(_.starvellCommission)," â½")})]})]}),!!_.items.length&&(0,r.jsxs)("div",{className:Q().breakdown_section,children:[(0,r.jsx)("div",{className:Q().breakdown_section_title,children:"ÐомиÑÑÐ¸Ñ Ð¿Ð»Ð°Ñежной ÑиÑÑемÑ"}),_.items.map(e=>(0,r.jsxs)("div",{className:Q().breakdown_row,children:[(0,r.jsxs)("span",{children:[e.name," (",f(e.feePercent),"%)"]}),(0,r.jsx)($.Y,{children:"".concat(m(e.commission)," â½")})]},e.id))]}),!!_.items.length&&(0,r.jsxs)("div",{className:Q().breakdown_section,children:[(0,r.jsx)("div",{className:Q().breakdown_section_title,children:"ÐÑÐ¾Ð³Ð¾Ð²Ð°Ñ Ñена Ð´Ð»Ñ Ð¿Ð¾ÐºÑпаÑелÑ"}),_.items.map(e=>(0,r.jsxs)("div",{className:(0,u.A)(Q().breakdown_row,Q().row_summary),children:[(0,r.jsx)("span",{children:e.name}),(0,r.jsx)($.Y,{children:"".concat(m(e.finalPrice)," â½")})]},e.id))]})]})]}):(0,r.jsxs)("div",{className:Q().breakdown_collapsed,children:[(0,r.jsx)("div",{className:Q().breakdown_title,children:"Ðз Ñего ÑкладÑваеÑÑÑ Ñена?"}),(0,r.jsx)(o.Ay,{size:"small",onClick:()=>d(!0),children:"ÐодÑобнее"})]})}function en(e){var i,t,n;let{filter:l,formModel:{formData:a,setFormData:o}}=e,s=null!=(n=null==(i=l.options)?void 0:i.filter(e=>!e.redirectSlug&&!e.isHidden))?n:[];return 0===s.length?null:(0,r.jsx)(C.A,{label:l.nameRu,title:"ÐÑбеÑиÑе знаÑение",showTitleInMenu:!1,value:null==(t=a.attributes.find(e=>e.id===l.id))?void 0:t.optionId,items:s.map(e=>({title:e.nameRu,index:e.id})),onChange:e=>o({...a,attributes:[...a.attributes.filter(e=>e.id!==l.id),{id:l.id,optionId:e.index}]})})}},7319:(e,i,t)=>{"use strict";t.d(i,{A:()=>u,e:()=>c});var r=t(37876),n=t(14232),l=t(55967),a=t(69241),o=t(70402),s=t(17015),d=t.n(s);function u(e){let{onClick:i,text:t="УдалиÑÑ",iconOnly:s=!1,disabled:u=!1,title:c}
1=e,[_,m]=(0,n.useState)(!1);return s?(0,r.jsx)("button",{type:"button",className:(0,a.A)(d().icon_button,d().icon_delete),title:null!=c?c:"УдалиÑÑ",disabled:u,onClick:i,children:(0,r.jsx)(l.A,{})}):(0,r.jsx)(o.QX,{danger:!0,icon:(0,r.jsx)(l.A,{width:12,height:12}),onClick:()=>{if(_){null==i||i();return}m(!0)},children:_?"ÐодÑвеÑдиÑÑ Ñдаление":t})}function c(e){var i;let[t,r]=(0,n.useState)(!1),l=null!=(i=e.text)?i:["УдалиÑÑ","УдалÑем...","ÐодÑвеÑдиÑÑ Ñдаление"];return(0,o.Ay)({...e,redText:!0,onClick:()=>{var i;t?null==(i=e.onDelete)||i.call(e):r(!0)},disabled:e.deleting,children:t?e.deleting?l[1]:l[2]:l[0]})}},9534:(e,i,t)=>{"use strict";t.d(i,{A:()=>f});var r=t(37876),n=t(54587),l=t.n(n),a=t(35284),o=t.n(a);let s={src:"/_next/static/media/arrow-left.aa44af1c.svg",height:20,width:20,blurWidth:0,blurHeight:0};var d=t(89099),u=t(69241),c=t(77328),_=t.n(c),m=t(49908);function f(e){let{children:i,marginBottom:t=8,backButton:n,setDocumentTitle:a=!0,documentTitle:c,size:f="default",backButtonInline:v=!1,onBackButtonClick:p}=e,h=(0,d.useRouter)(),{back:g}=(0,m.O)();return(0,r.jsxs)("h1",{style:{marginBottom:t},className:(0,u.A)(o().title,o().has_back_button,o()["size_".concat(f)],{[o().inline]:v}),children:[("string"==typeof i||c)&&a&&(0,r.jsx)(_(),{children:(0,r.jsx)("title",{children:null!=c?c:i})}),(n||p)&&(0,r.jsx)(l(),{className:o().back_button,src:s,alt:"Ðазад",draggable:!1,onClick:null!=p?p:()=>{"string"==typeof n?h.push(n):"function"==typeof n?n(h):g()}}),(0,r.jsx)("div",{children:i})]})}},17015:e=>{e.exports={icon_button:"action-icon-button_icon_button__WdSmG",icon_edit:"action-icon-button_icon_edit__M988d",icon_delete:"action-icon-button_icon_delete__1AGwN"}},20061:e=>{e.exports={field_text_select__content:"field-text-select_field_text_select__content__8Cfa9"}},26702:(e,i,t)=>{"use strict";t.d(i,{A:()=>n});var r=t(37876);t(14232);let n=e=>(0,r.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",...e,children:[(0,r.jsx)("path",{d:"M5.0002 6C5.0002 5.44772 5.44791 5 6.0002 5C6.55248 5 7.0002 5.44772 7.0002 6C7.0002 6.55228 6.55248 7 6.0002 7C5.44791 7 5.0002 6.55228 5.0002 6Z",fill:"currentColor"}),(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.0002 2C4.56937 2 3.40287 2.63236 2.53858 3.35371C1.67545 4.07409 1.08368 4.90714 0.787311 5.37642L0.775268 5.39542C0.716458 5.48799 0.640101 5.60818 0.6015 5.77658C0.570333 5.91256 0.570333 6.08744 0.6015 6.22342C0.640101 6.39182 0.716457 6.51201 0.775267 6.60458L0.787311 6.62358C1.08368 7.09286 1.67545 7.92591 2.53858 8.64629C3.40287 9.36764 4.56937 10 6.0002 10C7.43104 10 8.59753 9.36764 9.46183 8.64629C10.325 7.92591 10.9167 7.09286 11.2131 6.62358L11.2251 6.60459C11.2839 6.51202 11.3603 6.39183 11.3989 6.22342C11.4301 6.08744 11.4301 5.91256 11.3989 5.77658C11.3603 5.60817 11.2839 5.48798 11.2251 5.39541L11.2131 5.37642C10.9167 4.90714 10.325 4.07409 9.46183 3.35371C8.59753 2.63236 7.43104 2 6.0002 2ZM6.0002 4C4.89563 4 4.0002 4.89543 4.0002 6C4.0002 7.10457 4.89563 8 6.0002 8C7.10477 8 8.0002 7.10457 8.0002 6C8.0002 4.89543 7.10477 4 6.0002 4Z",fill:"currentColor"})]})},33261:e=>{e.exports={separator:"separator_separator__omtZw",force:"separator_force__03VEc",separator_light:"separator_separator_light__hZ4l2",separator_margins:"separator_separator_margins__I3Tsf",fading:"separator_fading__NT45f"}},35284:e=>{e.exports={title:"title_title__rb9tp",back_button:"title_back_button__rC0dy",size_medium:"title_size_medium__898B4",size_small:"title_size_small__KTExz",inline:"title_inline__RV1QZ",has_back_button:"title_has_back_button__tiNiF"}},48105:e=>{e.exports={edit_title:"offer-form_edit_title__xmBF_",form_outline:"offer-form_form_outline__4c_xE",footer
1:"offer-form_footer__bCXYX",loading:"offer-form_loading__dS3Y_",footer_buttons:"offer-form_footer_buttons__w_UuU",price:"offer-form_price__MmowM",field_group_vertical_gap8:"offer-form_field_group_vertical_gap8__DdSLS",field_group_horizontal_gap8:"offer-form_field_group_horizontal_gap8__J2zCN",field_delivery:"offer-form_field_delivery__H1Xvq",min_price_box:"offer-form_min_price_box__3QVeM",min_price_title:"offer-form_min_price_title__VIPgM",switch_icon:"offer-form_switch_icon__RuOvJ",breakdown_collapsed:"offer-form_breakdown_collapsed__RNE15",breakdown_expanded:"offer-form_breakdown_expanded___O3J9",breakdown_vertical_separator:"offer-form_breakdown_vertical_separator__81xas",breakdown_title:"offer-form_breakdown_title__zdlVJ",breakdown_left:"offer-form_breakdown_left__SU93V",breakdown_description__box:"offer-form_breakdown_description__box__vzE3h",breakdown_description:"offer-form_breakdown_description__zPe3A",breakdown_right:"offer-form_breakdown_right__x6oNi",breakdown_section:"offer-form_breakdown_section__TaWVF",breakdown_section_title:"offer-form_breakdown_section_title__veqfr",breakdown_row:"offer-form_breakdown_row__3qon_",row_summary:"offer-form_row_summary__wQFZ8",tags_panel:"offer-form_tags_panel__NhECi",tags_panel_header:"offer-form_tags_panel_header__hA9Nw",tags_panel_text:"offer-form_tags_panel_text__tA3_h",field_delivery__to:"offer-form_field_delivery__to__ZDw0F"}},48978:(e,i,t)=>{"use strict";t.d(i,{w:()=>o});var r=t(37876),n=t(33261),l=t.n(n),a=t(69241);function o(e){let{marginTop:i,marginBottom:t,defaultMargins:n,className:o,light:s,force:d=!1,fading:u=!1}=e;return(0,r.jsx)("div",{className:(0,a.A)(l().separator,{[l().separator_margins]:!!n,[l().separator_light]:!!s,[l().force]:d,[l().fading]:u},o),style:{marginTop:i,marginBottom:t}})}},52475:e=>{e.exports={box:"field-tags_box__JinA5",input:"field-tags_input__3o0Nf",invalid:"field-tags_invalid__ajTz5",disabled:"field-tags_disabled__fUaJ8",tag:"field-tags_tag__UpnKW",tag_remove:"field-tags_tag_remove__6mXI9"}},55967:(e,i,t)=>{"use strict";t.d(i,{A:()=>n});var r=t(37876);t(14232);let n=e=>(0,r.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.58073 0.5H6.41927C6.68283 0.499992 6.91024 0.499985 7.09752 0.515286C7.29519 0.531437 7.4918 0.567095 7.68099 0.663492C7.96323 0.807302 8.1927 1.03677 8.33651 1.31902C8.43291 1.50821 8.46857 1.70482 8.48472 1.90249C8.49843 2.07038 8.49985 2.27048 8.49999 2.5H10.5C10.7761 2.5 11 2.72386 11 3C11 3.27614 10.7761 3.5 10.5 3.5H10V8.62064C10 9.02311 10 9.35532 9.9779 9.62591C9.95494 9.90696 9.90566 10.1653 9.78201 10.408C9.59027 10.7843 9.28431 11.0903 8.90798 11.282C8.66531 11.4057 8.40696 11.4549 8.12591 11.4779C7.85532 11.5 7.52314 11.5 7.12066 11.5H4.87934C4.47686 11.5 4.14468 11.5 3.87409 11.4779C3.59304 11.4549 3.33469 11.4057 3.09202 11.282C2.7157 11.0903 2.40973 10.7843 2.21799 10.408C2.09434 10.1653 2.04506 9.90696 2.0221 9.62591C1.99999 9.35532 1.99999 9.02313 2 8.62065L2 3.5H1.5C1.22386 3.5 1 3.27614 1 3C1 2.72386 1.22386 2.5 1.5 2.5H3.50001C3.50015 2.27048 3.50157 2.07038 3.51529 1.90249C3.53144 1.70482 3.56709 1.50821 3.66349 1.31902C3.8073 1.03677 4.03677 0.807302 4.31902 0.663492C4.5082 0.567095 4.70481 0.531437 4.90249 0.515286C5.08976 0.499985 5.31717 0.499992 5.58073 0.5ZM5 5.25C5.27614 5.25 5.5 5.47386 5.5 5.75V8.25C5.5 8.52614 5.27614 8.75 5 8.75C4.72386 8.75 4.5 8.52614 4.5 8.25V5.75C4.5 5.47386 4.72386 5.25 5 5.25ZM7.5 5.75C7.5 5.47386 7.27614 5.25 7 5.25C6.72386 5.25 6.5 5.47386 6.5 5.75V8.25C6.5 8.52614 6.72386 8.75 7 8.75C7.27614 8.75 7.5 8.52614 7.5 8.25V5.75Z",fill:(null==e?void 0:e.colorRed)?"#FF5C5C":"currentColor"})})},70818:(e,i,t)=>{"use strict";t.d(i,{V:()=>d});var r=t(37876),n=t(26702),l=t(40637),a=t(69241),o=t(95083),s=t.n(o);function d(e){let{count:i,className:t}=e;return(0,r.jsxs)("span",{className:(0,a.A)(s().root,t),title:"ÐолиÑеÑÑво пÑоÑмоÑÑов",children:[(0,r.jsx)(n.A,{}),(0,r.jsx)("span",{children:(0,l.wk)(i)})]})}},95083:e=>{e.exports={root:"offer-views_root__muia8"}}}]);
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.