PageSourceSearch

https://imfan.com/_next/static/chunks/1898-226150f0ec5b4b5a.js

js imfan.com collected 2026-10-10 01:13:59 UTC 14,609 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1898],{31898:function(e,i,s){var n=s(26042),l=s(828),t=s(85893),r=s(67294),a=s(74231),o=s(41626),d=s(82175),c=s(34289),u=s(34051),m=s(31555),b=s(35005),h=s(62461);i.Z=(0,o.Z)((function(e){var i,s,o,p,v,x,g,Z,j,C,y=e.authUser,N=e.updateSubscription,f=e.i18n,k=(0,l.Z)(r.useState(!1),2),G=k[0],R=k[1],A=a.Ry().shape({limited:a.Ry().shape({price:a.Rx().when("price",{is:function(e){return!isNaN(e)&&0!==Number(e)},then:a.Rx().min(2.95,f.t("message.min.number",{field:f.t("setting.subscription.price.label"),value:(0,h.xG)(2.95)})).max(40,f.t("message.max.number",{field:f.t("setting.subscription.price.label"),value:(0,h.xG)(40)}))}),discount:a.Rx().min(0,f.t("message.min.number",{field:f.t("setting.subscription.discount.label"),value:"0%"})).max(100,f.t("message.max.number",{field:f.t("setting.subscription.discount.label"),value:"100%"})),validTo:a.hT().when("price",{is:function(e){return!isNaN(e)&&0!==Number(e)},then:a.hT().required(f.t("message.required",{field:f.t("setting.subscription.validTo.label")}))}),daysCount:a.Rx().when("price",{is:function(e){return!isNaN(e)&&0!==Number(e)},then:a.Rx().positive().required(f.t("message.required",{field:f.t("setting.subscription.daysCount.label")}))}),maxCount:a.Rx()},[["price","price"]]),month:a.Ry().shape({name:a.Z_(),price:a.Rx().when("price",{is:function(e){return 0!==Number(e)},then:a.Rx().min(2.95,f.t("message.min.number",{field:f.t("setting.subscription.price.label"),value:(0,h.xG)(2.95)})).max(40,f.t("message.max.number",{field:f.t("setting.subscription.price.label"),value:(0,h.xG)(40)}))}),discount:a.Rx().min(0,f.t("message.min.number",{field:f.t("setting.subscription.discount.label"),value:"0%"})).max(100,f.t("message.max.number",{field:f.t("setting.subscription.discount.label"),value:"100%"}))},[["price","price"]]),quarter:a.Ry().shape({name:a.Z_(),price:a.Rx().when("price",{is:function(e){return 0!==Number(e)},then:a.Rx().min(2.95,f.t("message.min.number",{field:f.t("setting.subscription.price.label"),value:(0,h.xG)(2.95)})).max(120,f.t("message.max.number",{field:f.t("setting.subscription.price.label"),value:(0,h.xG)(120)}))}),discount:a.Rx().min(0,f.t("message.min.number",{field:f.t("setting.subscription.discount.label"),value:"0%"})).max(100,f.t("message.max.number",{field:f.t("setting.subscription.discount.label"),value:"100%"}))},[["price","price"]]),semester:a.Ry().shape({name:a.Z_(),price:a.Rx().when("price",{is:function(e){return 0!==Number(e)},then:a.Rx().min(2.95,f.t("message.min.number",{field:f.t("setting.subscription.price.label"),value:(0,h.xG)(2.95)})).max(240,f.t("message.max.number",{field:f.t("setting.subscription.price.label"),value:(0,h.xG)(240)}))}),discount:a.Rx().min(0,f.t("message.min.number",{field:f.t("setting.subscription.discount.label"),value:"0%"})).max(100,f.t("message.max.number",{field:f.t("setting.subscription.discount.label"),value:"100%"}))},[["price","price"]]),year:a.Ry().shape({name:a.Z_(),price:a.Rx().when("price",{is:function(e){return 0!==Number(e)},then:a.Rx().min(2.95,f.t("message.min.number",{field:f.t("setting.subscription.price.label"),value:(0,h.xG)(2.95)})).max(480,f.t("message.max.number",{field:f.t("setting.subscription.price.label"),value:(0,h.xG)(480)}))}),discount:a.Rx().min(0,f.t("message.min.number",{field:f.t("setting.subscription.discount.label"),value:"0%"})).max(100,f.t("message.max.number",{field:f.t("setting.subscription.discount.label"),value:"100%"}))},[["price","price"]])});return(0,t.jsx)("div",{className:"body-box",children:(0,t.jsx)(d.J9,{validationSchema:A,initialValues:{limited:(null===y||void 0===y||null===(i=y.subscription)||void 0===i?void 0:i.limited)?(0,n.Z)({},null===y||void 0===y||null===(s=y.subscription)||void 0===s?void 0:s.limited):{price:void 0,discount:void 0,daysCount:void 0,maxCount:void 0,currCount:0,validTo:void 0,isActive:!1},month:(null===y||void 0===y||null===(o=y.subscription)||void 0===o?void 0:o.month)?(0,n.Z)({},null===y||void 0===y||null===(p=y.subscription)||void 0===p?void 0:p.month):{price:void 0,discount:void 0,isActive:!1},quarter:(null===y||void 0===y||null===(v=y.subscription)||void 0===v?void 0:v.quarter)?(0,n.Z)({},null===y||void 0===y||null===(x=y.subscription)||void 0===x?void 0:x.quarter):{price:void 0,discount:void 0,isActive:!1},semester:(null===y||void 0===y||null===(g=y.subscription)||void 0===g?void 0:g.semester)?(0,n.Z)({},null===y||void 0===y||null===(Z=y.subscription)||void 0===Z?void 0:Z.semester):{price:void 0,discount:void 0,isActive:!1},year:(null===y||void 0===y||null===(j=y.subscription)||void 0===j?void 0:j.year)?(0,n.Z)({},null===y||void 0===y||null===(C=y.subscription)||void 0===C?void 0:C.year):{price:void 0,discount:void 0,isActive:!1}},onSubmit:function(e){return N({subscription:e,modelId:y._id})},children:function(e){var i,s,n,l,r,a,o,d,h,p,v,x,g,Z,j,C,y,N,k,A,q,L,I,F,T,w,_,S;return(0,t.jsxs)(c.Z,{noValidate:!0,onSubmit:e.handleSubmit,children:[!G&&(0,t.jsx)(u.Z,{className:"border-bottom mb-3",children:(0,t.jsx)(m.Z,{className:"mb-3",children:(0,t.jsx)("a",{className:"text-primary pointer",onClick:function(){return R(!G)},children:f.t("setting.subscription.show")})})}),G&&(0,t.jsxs)(u.Z,{className:"border-bottom mb-3",children:[(0,t.jsx)(m.Z,{xs:12,children:(0,t.jsx)(c.Z.Label,{className:"h6",children:f.t("setting.subscription.limited")})}),(0,t.jsx)(m.Z,{md:4,children:(0,t.jsxs)(c.Z.Group,{className:"mb-3",children:[(0,t.jsx)(c.Z.Label,{children:f.t("setting.subscription.price.label")}),(0,t.jsx)(c.Z.Control,{type:"number",name:"limited.price",value:e.values.limited.price,placeholder:f.t("setting.subscription.price.placeholder"),isInvalid:!!(null===(i=e.errors.limited)||void 0===i?void 0:i.price),onChange:e.handleChange}),(0,t.jsx)(c.Z.Control.Feedback,{type:"invalid",children:null===(s=e.errors.limited)||void 0===s?void 0:s.price})]})}),(0,t.jsx)(m.Z,{md:4,children:(0,t.jsxs)(c.Z.Group,{className:"mb-3",children:[(0,t.jsx)(c.Z.Label,{children:f.t("setting.subscription.discount.label")}),(0,t.jsx)(c.Z.Control,{type:"number",name:"limited.discount",value:e.values.limited.discount,placeholder:f.t("setting.subscription.discount.placeholder"),isInvalid:!!(null===(n=e.errors.limited)||void 0===n?void 0:n.discount),onChange:e.handleChange}),(0,t.jsx)(c.Z.Control.Feedback,{type:"invalid",children:null===(l=e.errors.limited)||void 0===l?void 0:l.discount})]})}),(0,t.jsx)(m.Z,{md:4,children:(0,t.jsxs)(c.Z.Group,{className:"mb-3",children:[(0,t.jsx)(c.Z.Label,{children:f.t("setting.subscription.validTo.label")}),(0,t.jsx)(c.Z.Control,{type:"date",name:"limited.validTo",value:e.values.limited.validTo,placeholder:f.t("setting.subscription.validTo.placeholder"),isInvalid:!!(null===(r=e.errors.limited)||void 0===r?void 0:r.validTo),onChange:e.handleChange}),(0,t.jsx)(c.Z.Control.Feedback,{type:"invalid",children:null===(a=e.errors.limited)||void 0===a?void 0:a.validTo})]})}),(0,t.jsx)(m.Z,{md:6,children:(0,t.jsxs)(c.Z.Group,{className:"mb-3",children:[(0,t.jsx)(c.Z.Label,{children:f.t("setting.subscription.daysCount.label")}),(0,t.jsx)(c.Z.Control,{type:"number",name:"limited.daysCount",value:e.values.limited.daysCount,placeholder:f.t("setting.subscription.daysCount.placeholder"),isInvalid:!!(null===(o=e.errors.limited)||void 0===o?void 0:o.daysCount),onChange:e.handleChange}),(0,t.jsx)(c.Z.Control.Feedback,{type:"invalid",children:null===(d=e.errors.limited)||void 0===d?void 0:d.daysCount})]})}),(0,t.jsx)(m.Z,{md:6,children:(0,t.jsxs)(c.Z.Group,{className:"mb-3",children:[(0,t.jsx)(c.Z.Label,{children:f.t("setting.subscription.maxCount.label")}),(0,t.jsx)(c.Z.Control,{type:"number",name:"limited.maxCount",value:e.values.limited.maxCount,placeholder:f.t("setting.subscription.maxCount.placeholder"),isInvalid:!!(null===(h=e.errors.limited)||void 0===h?void 0:h.maxCount),onChange:e.handleChange}),(0,t.jsx)(c.Z.Control.Feedback,{type:"invalid",children:null===(p=e.errors.limited)||void 0===p?void 0:p.maxCount})]})}),(0,t.jsx)(m.Z,{children:(0,t.jsx)(c.Z.Group,{className:"mb-3",children:(0,t.jsx)(c.Z.Check,{type:"checkbox",name:"limited.isActive",label:f.t("setting.subscription.isActive.label"),onChange:e.handleChange,checked:e.values.limited.isActive})})})]}),(0,t.jsxs)(u.Z,{className:"border-bottom mb-3",children:[(0,t.jsx)(m.Z,{xs:12,children:(0,t.jsx)(c.Z.Label,{className:"h6",children:f.t("setting.subscription.month")})}),(0,t.jsx)(m.Z,{md:4,children:(0,t.jsxs)(c.Z.Group,{className:"mb-3",children:[(0,t.jsx)(c.Z.Label,{children:f.t("setting.subscription.price.label")}),(0,t.jsx)(c.Z.Control,{type:"number",name:"month.price",value:e.values.month.price,placeholder:f.t("setting.subscription.price.placeholder"),isInvalid:!!(null===(v=e.errors.month)||void 0===v?void 0:v.price),onChange:e.handleChange}),(0,t.jsx)(c.Z.Control.Feedback,{type:"invalid",children:null===(x=e.errors.month)||void 0===x?void 0:x.price})]})}),(0,t.jsx)(m.Z,{md:4,children:(0,t.jsxs)(c.Z.Group,{className:"mb-3",children:[(0,t.jsx)(c.Z.Label,{children:f.t("setting.subscription.discount.label")}),(0,t.jsx)(c.Z.Control,{type:"number",name:"month.discount",value:e.values.month.discount,placeholder:f.t("setting.subscription.discount.placeholder"),isInvalid:!!(null===(g=e.errors.month)||void 0===g?void 0:g.discount),onChange:e.handleChange}),(0,t.jsx)(c.Z.Control.Feedback,{type:"invalid",children:null===(Z=e.errors.month)||void 0===Z?void 0:Z.discount})]})}),(0,t.jsx)(m.Z,{md:4,children:(0,t.jsxs)(c.Z.Group,{className:"mb-3",children:[(0,t.jsx)(c.Z.Label,{children:f.t("setting.subscription.name.label")}),(0,t.jsx)(c.Z.Control,{name:"month.name",value:e.values.month.name,placeholder:f.t("setting.subscription.name.placeholder"),isInvalid:!!(null===(j=e.errors.month)||void 0===j?void 0:j.name),onChange:e.handleChange}),(0,t.jsx)(c.Z.Control.Feedback,{type:"invalid",children:null===(C=e.errors.month)||void 0===C?void 0:C.name})]})}),(0,t.jsx)(m.Z,{xs:12,children:(0,t.jsx)(c.Z.Group,{className:"mb-3",children:(0,t.jsx)(c.Z.Check,{type:"checkbox",name:"month.isActive",label:f.t("setting.subscription.isActive.label"),onChange:e.handleChange,checked:e.values.month.isActive})})})]}),(0,t.jsxs)(u.Z,{className:"border-bottom mb-3",children:[(0,t.jsx)(m.Z,{xs:12,children:(0,t.jsx)(c.Z.Label,{className:"h6",children:f.t("setting.subscription.quarter")})}),(0,t.jsx)(m.Z,{md:6,children:(0,t.jsxs)(c.Z.Group,{className:"mb-3",children:[(0,t.jsx)(c.Z.Label,{children:f.t("setting.subscription.price.label")}),(0,t.jsx)(c.Z.Control,{type:"number",name:"quarter.price",value:e.values.quarter.price,placeholder:f.t("setting.subscription.price.placeholder"),isInvalid:!!(null===(y=e.errors.quarter)||void 0===y?void 0:y.price),onChange:e.handleChange}),(0,t.jsx)(c.Z.Control.Feedback,{type:"invalid",children:null===(N=e.errors.quarter)||void 0===N?void 0:N.price})]})}),(0,t.jsx)(m.Z,{md:6,children:(0,t.jsxs)(c.Z.Group,{className:"mb-3",children:[(0,t.jsx)(c.Z.Label,{children:f.t("setting.subscription.discount.label")}),(0,t.jsx)(c.Z.Control,{type:"number",name:"quarter.discount",value:e.values.quarter.discount,placeholder:f.t("setting.subscription.discount.placeholder"),isInvalid:!!(null===(k=e.errors.quarter)||void 0===k?void 0:k.discount),onChange:e.handleChange}),(0,t.jsx)(c.Z.Control.Feedback,{type:"invalid",children:null===(A=e.errors.quarter)||void 0===A?void 0:A.discount})]})}),(0,t.jsx)(m.Z,{xs:12,children:(0,t.jsx)(c.Z.Group,{className:"mb-3",children:(0,t.jsx)(c.Z.Check,{type:"checkbox",name:"quarter.isActive",label:f.t("setting.subscription.isActive.label"),onChange:e.handleChange,checked:e.values.quarter.isActive})})})]}),(0,t.jsxs)(u.Z,{className:"border-bottom mb-3",children:[(0,t.jsx)(m.Z,{xs:12,children:(0,t.jsx)(c.Z.Label,{className:"h6",children:f.t("setting.subscription.semester")})}),(0,t.jsx)(m.Z,{md:6,children:(0,t.jsxs)(c.Z.Group,{className:"mb-3",children:[(0,t.jsx)(c.Z.Label,{children:f.t("setting.subscription.price.label")}),(0,t.jsx)(c.Z.Control,{type:"number",name:"semester.price",value:e.values.semester.price,placeholder:f.t("setting.subscription.price.placeholder"),isInvalid:!!(null===(q=e.errors.semester)||void 0===q?void 0:q.price),onChange:e.handleChange}),(0,t.jsx)(c.Z.Control.Feedback,{type:"invalid",children:null===(L=e.errors.semester)||void 0===L?void 0:L.price})]})}),(0,t.jsx)(m.Z,{md:6,children:(0,t.jsxs)(c.Z.Group,{className:"mb-3",children:[(0,t.jsx)(c.Z.Label,{children:f.t("setting.subscription.discount.label")}),(0,t.jsx)(c.Z.Control,{type:"number",name:"semester.discount",value:e.values.semester.discount,placeholder:f.t("setting.subscription.discount.placeholder"),isInvalid:!!(null===(I=e.errors.semester)||void 0===I?void 0:I.discount),onChange:e.handleChange}),(0,t.jsx)(c.Z.Control.Feedback,{type:"invalid",children:null===(F=e.errors.semester)||void 0===F?void 0:F.discount})]})}),(0,t.jsx)(m.Z,{xs:12,children:(0,t.jsx)(c.Z.Group,{className:"mb-3",children:(0,t.jsx)(c.Z.Check,{type:"checkbox",name:"semester.isActive",label:f.t("setting.subscription.isActive.label"),onChange:e.handleChange,checked:e.values.semester.isActive})})})]}),(0,t.jsxs)(u.Z,{className:"border-bottom mb-3",children:[(0,t.jsx)(m.Z,{xs:12,children:(0,t.jsx)(c.Z.Label,{className:"h6",children:f.t("setting.subscription.year")})}),(0,t.jsx)(m.Z,{md:6,children:(0,t.jsxs)(c.Z.Group,{className:"mb-3",children:[(0,t.jsx)(c.Z.Label,{children:f.t("setting.subscription.price.label")}),(0,t.jsx)(c.Z.Control,{type:"number",name:"year.price",value:e.values.year.price,placeholder:f.t("setting.subscription.price.placeholder"),isInvalid:!!(null===(T=e.errors.year)||void 0===T?void 0:T.price),onChange:e.handleChange}),(0,t.jsx)(c.Z.Control.Feedback,{type:"invalid",children:null===(w=e.errors.year)||void 0===w?void 0:w.price})]})}),(0,t.jsx)(m.Z,{md:6,children:(0,t.jsxs)(c.Z.Group,{className:"mb-3",children:[(0,t.jsx)(c.Z.Label,{children:f.t("setting.subscription.discount.label")}),(0,t.jsx)(c.Z.Control,{type:"number",name:"year.discount",value:e.values.year.discount,placeholder:f.t("setting.subscription.discount.placeholder"),isInvalid:!!(null===(_=e.errors.year)||void 0===_?void 0:_.discount),onChange:e.handleChange}),(0,t.jsx)(c.Z.Control.Feedback,{type:"invalid",children:null===(S=e.errors.year)||void 0===S?void 0:S.discount})]})}),(0,t.jsx)(m.Z,{xs:12,children:(0,t.jsx)(c.Z.Group,{className:"mb-3",children:(0,t.jsx)(c.Z.Check,{type:"checkbox",name:"year.isActive",label:f.t("setting.subscription.isActive.label"),onChange:e.handleChange,checked:e.values.year.isActive})})})]}),(0,t.jsx)(b.Z,{type:"submit",variant:"primary",children:f.t("button.update")})]})}})})}))}}]);

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.