PageSourceSearch

https://sushilife.top/_nuxt/aLK7C60C.js

js sushilife.top collected 2026-10-04 09:36:33 UTC 8,971 bytes, 1 lines download raw bytes

1import{aZ as x,aK as z,b5 as M,bF as n,bV as O,aL as c,bu as _,b1 as i,a$ as o,b2 as h,bl as u,b3 as d,bd as S,bn as A,aM as I,bh as N,bN as F,ba as L,c7 as R,bB as B,aO as C,bC as v,bD as V,cb as U,aV as q,aW as H,bH as W,b7 as Y,cR as K,cS as j,b6 as Z,bU as J,bA as Q}from"./Bgs6eNSj.js";import{h as X,b as $}from"./DBqWO_wt.js";import{f as ee,r as re,e as te}from"./DSHeSuKR.js";import{k as ae}from"./DoQ0_s42.js";import{P as se}from"./DNQxXoHZ.js";import{G as oe}from"./DFP-_D0A.js";import{_ as ie}from"./bNlPVBLe.js";import{_ as le}from"./CyZCABK2.js";import{_ as ne}from"./twMnu6vx.js";import{m as de,u as me}from"./MbkrmIu1.js";import{c as ue,b as w,d as he,a as y}from"./DNqIvfao.js";import{u as pe,a as ce}from"./DLaGNeLJ.js";import"./B_Dir3Rk.js";import"./BS3a-M1C.js";import"./ZuS3-68E.js";import"./DMs2NsCh.js";import"./BMaw7OB9.js";import"./BIEFcDA3.js";import"./tMYfqdxv.js";import"./CPU-Bimx.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="180fae04-5567-4752-b1af-4b2567dc9774",e._sentryDebugIdIdentifier="sentry-dbid-180fae04-5567-4752-b1af-4b2567dc9774")}catch{}})();function be(){const{t:e}=x(),{birthdateRules:r,emailRules:m}=pe();return ue({phone:y().required(),name:y().required(e("fillTheName")).matches(ce,e("checkTheName")),email:m,sex:he().required(e("selectGender")).oneOf([1,2],e("selectGender")),birthdate:r(),complianceAgreement:w().required(),bonusAgreement:w().required()})}const fe={name:"CreateBonusCard",components:{ValidatedGSelect:ne,ValidatedGInput:le,ValidatedGCheckbox:ie,GForm:oe,GTooltip:ee,GButton:M,GShimmer:$,GShimmerProvider:X,PageTitle:se},directives:{maska:ae},data(){return{sex:"",name:"",phone:"",email:"",birthdate:"",birthdateError:"",isShowTooltip:!1,bonusAgreement:!0,complianceAgreement:!0,IconSizes:J,ButtonView:Z,isEmpty:j,ErrorCodes:K,sexDataArray:[{label:this.$t("male"),value:"1"},{label:this.$t("female"),value:"2"}]}},computed:{Sizes(){return Y},TooltipPosition(){return te},TooltipTrigger(){return re},schema(){return be()},error(){return B().displayErrors},...W(C,["state"]),profile(){return this.state.profile},isProfileBirthdate(){return this.profile&&!!this.profile.birthdate},errorMessage(){return!this.complianceAgreement||!this.bonusAgreement?this.$t("youMustAgreeToTheTermsAndConditionsOfRegistrationOfTheBonusCard"):null},isBirthdateSaveButtonDisabled(){return this.isProfileBirthdate||!!this.birthdateError||!this.birthdate},isLoadingProfile(){return q().isLoading(H.FETCH_PROFILE)}},methods:{...U(Q,["openModal"]),showPersonalDataProcessingAgreement(){const{showUserAgreement:e}=v();e(V.privatePolice)},showBonusCardAgreement(){const{showUserAgreement:e}=v();e(V.bonusCardRules)},onSelectHandler(e){this.sex=e.value},setBirthdateError(e){this.birthdateError=e},dataCreator(){return{phone:this.phone?me(this.phone):"",name:this.name,email:this.email,sex:this.sex,birthdate:this.birthdate,complianceAgreement:this.complianceAgreement,bonusAgreement:this.bonusAgreement}},async addBonusCardMethod(){if(!this.complianceAgreement||!this.bonusAgreement)return;const{validateBonusCard:e,addBonusCard:r}=C();try{await e(this.dataCreator()),await r(this.dataCreator()),this.openModal({modalName:"GotBonusCard",modalData:{name:this.name}})}catch(m){this.handleServerError(m)}},handleServerError(e){const{addPopupError:r}=B(),m=e.error_code||e.code,a=e.error_message||this.$t("unknownError");r({errorKey:m,errorTitle:a})},initProfileValue(){this.name=this.profile?.name||"",this.phone=this.profile?.phone?de(this.profile.phone):"",this.email=this.profile?.email||"",this.sex=this.profile?.sex.toString()||"",this.birthdate=this.profile?.birthdate?L(R(this.profile.birthdate.slice(0,10)),"dd.MM.yyyy"):"",!this.profile?.sex&&this.sexDataArray.length===2&&this.sexDataArray.push({label:this.$t("select"),value:"0"}),this.profile?.sex&&this.sexDataArray.length===3&&(this.sexDataArray=this.sexDataArray.filter(e=>e.value!=="0")),this.$refs.createBonusCardForm?.reset({name:this.name,phone:this.phone,email:this.email,sex:this.sex,birthdate:this.birthdate})},goBonusPage(){this.$router.push(F.BONUS_CARD)}},watch:{profile:{handler(){this.profile&&Object.keys(this.profile).length>0&&this.initProfileValue()},immediate:!0,deep:!0}}},ge={class:"bonus-register__top-block"},_e={class:"bonus-register__tooltip-message"},Se={class:"bonus-register__agreement"},Ae=["innerHTML"];function Be(e,r,m,T,a,t){const P=n("PageTitle"),p=n("ValidatedGInput"),l=n("GShimmer"),k=n("ValidatedGSelect"),b=n("GButton"),G=n("GTooltip"),f=n("ValidatedGCheckbox"),E=n("GForm"),D=n("GShimmerProvider"),g=O("maska");return c(),_(D,{loading:t.isLoadingProfile},{default:i(()=>
1[o(E,{ref:"createBonusCardForm",class:"bonus-register-form","validation-schema":t.schema,"initial-values":{phone:t.profile?.phone,name:t.profile?.name,email:t.profile?.email,sex:t.profile?.sex,birthdate:t.profile?.birthdate,bonusAgreement:a.bonusAgreement,complianceAgreement:a.complianceAgreement},onSubmit:t.addBonusCardMethod},{default:i(()=>[h("div",ge,[o(P,{class:"bonus-register-title",onClickBack:t.goBonusPage},{default:i(()=>[u(d(e.$t("cardDesign")),1)]),_:1},8,["onClickBack"]),o(l,{class:"bonus-register__row"},{default:i(()=>[S(o(p,{modelValue:a.phone,"onUpdate:modelValue":r[0]||(r[0]=s=>a.phone=s),name:"phone",placeholder:e.$t("telephone"),label:e.$t("telephone"),"allow-clear":!1,size:t.Sizes.S,disabled:"",required:""},null,8,["modelValue","placeholder","label","size"]),[[g,"+7 (###) ### ## ##"]])]),_:1}),o(l,{class:"bonus-register__row"},{default:i(()=>[o(p,{modelValue:a.name,"onUpdate:modelValue":r[1]||(r[1]=s=>a.name=s),required:"",name:"name",placeholder:e.$t("name"),label:e.$t("name"),"allow-clear":!1,size:t.Sizes.S,"has-feedback":""},null,8,["modelValue","placeholder","label","size"])]),_:1}),o(l,{class:"bonus-register__row"},{default:i(()=>[o(p,{modelValue:a.email,"onUpdate:modelValue":r[2]||(r[2]=s=>a.email=s),required:"",name:"email",placeholder:"Email",label:"Email","allow-clear":!1,size:t.Sizes.S,"has-feedback":""},null,8,["modelValue","size"])]),_:1}),o(l,{class:"bonus-register__row"},{default:i(()=>[o(k,{modelValue:a.sex,"onUpdate:modelValue":r[3]||(r[3]=s=>a.sex=s),required:"","button-width":"56px",name:"sex",placeholder:e.$t("sex"),label:e.$t("sex"),options:a.sexDataArray,"allow-clear":!1,size:t.Sizes.S,onOnSelect:t.onSelectHandler},null,8,["modelValue","placeholder","label","options","size","onOnSelect"])]),_:1}),o(l,{class:"bonus-register__row"},{default:i(()=>[S((c(),_(p,{modelValue:a.birthdate,"onUpdate:modelValue":r[4]||(r[4]=s=>a.birthdate=s),required:"",disabled:t.isProfileBirthdate,name:"birthdate",placeholder:e.$t("dateOfBirth"),label:e.$t("dateOfBirth"),size:t.Sizes.S,onError:t.setBirthdateError,onOnFocus:r[5]||(r[5]=s=>a.isShowTooltip=!0),onOnBlur:r[6]||(r[6]=s=>a.isShowTooltip=!1)},{"icon-right":i(({error:s})=>[o(G,{class:"bonus-register__tooltip",trigger:a.isShowTooltip?t.TooltipTrigger.SHOW_ALWAYS:t.TooltipTrigger.HIDE,position:t.TooltipPosition.TOP_END},{content:i(()=>[h("div",_e,d(e.$t("afterSavingYouCantChangeBirthday")),1)]),default:i(()=>[o(b,{disabled:t.isBirthdateSaveButtonDisabled||s,view:a.ButtonView.SECONDARY,size:t.Sizes.S},{default:i(()=>[u(d(e.$t("save")),1)]),_:1},8,["disabled","view","size"])]),_:2},1032,["trigger","position"])]),_:1},8,["modelValue","disabled","placeholder","label","size","onError"])),[[g,"##.##.####"]])]),_:1}),o(l,{height:"17px",class:"birthdate-info"},{default:i(()=>[u(d(e.$t("weWillPrepareAGiftForYourBirthday")),1)]),_:1})]),h("div",Se,[o(l,{class:"bonus-register__checkbox",height:"32px"},{default:i(()=>[o(f,{name:"complianceAgreement",modelValue:a.complianceAgreement,"onUpdate:modelValue":r[8]||(r[8]=s=>a.complianceAgreement=s)},{default:i(()=>[u(d(e.$t("iAgreeWith"))+" ",1),h("a",{class:"bonus-register__checkbox-link",href:"#",onClick:r[7]||(r[7]=A((...s)=>t.showPersonalDataProcessingAgreement&&t.showPersonalDataProcessingAgreement(...s),["prevent","stop"]))},d(e.$t("personalDataConditions")),1)]),_:1},8,["modelValue"])]),_:1}),o(l,{height:"32px"},{default:i(()=>[o(f,{name:"bonusAgreement",modelValue:a.bonusAgreement,"onUpdate:modelValue":r[10]||(r[10]=s=>a.bonusAgreement=s)},{default:i(()=>[u(d(e.$t("iAgreeAndTotallyAccept"))+" ",1),h("a",{class:"bonus-register__checkbox-link",href:"#",onClick:r[9]||(r[9]=A((...s)=>t.showBonusCardAgreement&&t.showBonusCardAgreement(...s),["prevent","stop"]))},d(e.$t("bonusCardConditions")),1)]),_:1},8,["modelValue"])]),_:1})]),t.errorMessage?(c(),I("span",{key:0,class:"error-message",innerHTML:t.errorMessage},null,8,Ae)):N("",!0),o(l,null,{default:i(()=>[o(b,{type:"submit"},{default:i(()=>[u(d(e.$t("applyForABonusCard")),1)]),_:1})]),_:1})]),_:1},8,["validation-schema","initial-values","onSubmit"])]),_:1},8,["loading"])}const Ue=z(fe,[["render",Be],["__scopeId","data-v-8ac931cd"]]);export{Ue as default};

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.