PageSourceSearch

https://gmobile.mn/_next/static/chunks/pages/checkout/unit/check-8e4dc0ed09019c4d.js

js gmobile.mn collected 2026-10-04 22:53:39 UTC 15,766 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2531],{1606:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/checkout/unit/check",function(){return a(1941)}])},2925:function(e,t){"use strict";t.Z={src:"/_next/static/media/avatarNoBackground.f3122eff.png",height:574,width:500,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAICAQAAACfDS2NAAAAZklEQVR42jXJsQmEABBE0Tk5ro/9NVwNF1xoZGRkLNiHYGwPRqZ2YmQNKiaK64LIZ4LHyBJEyURLIgnxxc1xypv/4GFOHbQXomFl4HO/PwpScjLeosJ56sVobnvsjFx0HMws0cZ0AZE8J3X4fOGZAAAAAElFTkSuQmCC",blurWidth:7,blurHeight:8}},8878:function(e,t,a){"use strict";var r=a(5893),n=(a(7294),a(1163));t.Z=function(e){var t=e.patharray,a=t.pathName,s=t.routeTo,i=(0,n.useRouter)();return(0,r.jsx)(r.Fragment,{children:(0,r.jsx)("div",{className:"bg-gray-100",children:(0,r.jsx)("div",{className:"container mx-auto max-w-screen-lg px-3 py-3 md:px-3 xl:px-0",children:(0,r.jsx)("ol",{className:"flex flex-wrap md:inline-flex lg:inline-flex xl:inline-flex list-none",children:a.map((function(e,t){var n=t;return t===a.length-1?(0,r.jsx)("li",{children:(0,r.jsx)("div",{id:e,className:"text-sm font-rubik text-gray-400 cursor-pointer",children:e})},e):(0,r.jsxs)("li",{className:"flex items-center text-gray-500",children:[(0,r.jsx)("div",{id:a,onClick:function(){return i.push(s[n])},className:"text-sm font-rubik text-gray-800 hover:text-gray-500 cursor-pointer",children:e}),(0,r.jsx)("svg",{className:"mx-3 h-3 w-3 fill-current",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512",children:(0,r.jsx)("path",{d:"M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z"})})]},e)}))})})})})}},7924:function(e,t,a){"use strict";var r=a(7568),n=a(4924),s=a(6042),i=a(9396),o=a(828),c=a(414),l=a(5893),u=a(7294),m=a(3935),d=a(5552),h=a(7472),f=a(4482),p=a(4547),x=a(8739),b=a(1163),g=a(8502);t.Z=function(e){var t=e.show,a=e.onClose,v=(0,o.Z)(u.useState(!1),2),N=v[0],j=v[1],y=(0,o.Z)(u.useState({email:"",ebarimtId:"",companyReg:"",phoneNumber:"",ebarimtPhoneNumber:"",prefChannel:""}),2),w=y[0],Z=y[1],k=(0,o.Z)(u.useState(!1),2),C=k[0],A=k[1],I=(0,o.Z)(u.useState(""),2),P=I[0],O=I[1],_=u.useContext(p.Z).notificationHandler,E=(0,x.Z)("user"),S=(0,b.useRouter)();u.useEffect((function(){if(E){function e(){return t.apply(this,arguments)}function t(){return(t=(0,r.Z)((function(){var e;return(0,c.__generator)(this,(function(t){return e={channel:"Website",phone_number:E},g.Z.post("user/ebarimtcheck",e).then((function(e){"successful"===e.data.status?(Z((function(t){return(0,i.Z)((0,s.Z)({},t),{email:e.data.info.ebarimt.email,ebarimtId:e.data.info.ebarimt.ebarimtId,ebarimtPhoneNumber:e.data.info.ebarimt.ebarimtPhoneNumber,companyReg:e.data.info.ebarimt.companyReg,phoneNumber:e.data.info.ebarimt.phoneNumber})})),e.data.info.ebarimt.preferredChannel,Z((function(t){return(0,i.Z)((0,s.Z)({},t),{prefChannel:e.data.info.ebarimt.preferredChannel})}))):0===e.data.message.show?_({type:"errors",message:"\u0410\u043c\u0436\u0438\u043b\u0442\u0433\u04af\u0439"}):_({type:"errors",message:e.data.message.text})})).catch((function(e){A(!1),_({type:"errors",message:"\u0410\u043c\u0436\u0438\u043b\u0442\u0433\u04af\u0439!"})})),[2]}))}))).apply(this,arguments)}e()}else S.push("/")}),[E]);var R=function(e){8===e.target.value.length&&e.target.value.match(/^-?\d+$/)?"ebarimtPhoneNumber"===e.target.name?Z((0,i.Z)((0,s.Z)({},w),{ebarimtPhoneNumber:e.target.value,prefChannel:"ebarimtId"})):"ebarimtId"===e.target.name?Z((0,i.Z)((0,s.Z)({},w),{ebarimtId:e.target.value,prefChannel:"ebarimtId"})):Z((0,i.Z)((0,s.Z)({},w),{phoneNumber:e.target.value,prefChannel:"phoneNumber"})):e.target.value.match(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/)?Z((0,i.Z)((0,s.Z)({},w),{email:e.target.value,prefChannel:"email"})):Z((0,i.Z)((0,s.Z)({},w),(0,n.Z)({},e.target.name,e.target.value)))},L=function(e){Z((function(t){return(0,i.Z)((0,s.Z)({},t),{prefChannel:e})}))},D=function(){var e=(0,r.Z)((function(e){var t;return(0,c.__generator)(this,(function(a){return e.preventDefault(),t={email:w.email,ebarimtId:w.ebarimtId,companyReg:w.companyReg,phoneNumber:w.phoneNumber,ebarimtPhoneNumber:w.ebarimtPhoneNumber,preferredChannel:w.prefChannel},A(!0),g.Z.post("user/ebarimt",t).then((function(e){"successful"==e.data.status?(O("\u
10410\u043c\u0436\u0438\u043b\u0442\u0442\u0430\u0439 \u0445\u0430\u0434\u0433\u0430\u043b\u0430\u0433\u0434\u043b\u0430\u0430."),setTimeout((function(){F()}),3e3)):"Not found companyReg"===e.data.error?O("\u0411\u04af\u0440\u0442\u0433\u044d\u043b\u0442\u044d\u0439 \u0431\u0430\u0439\u0433\u0443\u0443\u043b\u043b\u0430\u0433\u0430 \u043e\u043b\u0434\u0441\u043e\u043d\u0433\u04af\u0439!"):"Not found user"===e.data.error?O("\u0410\u043c\u0436\u0438\u043b\u0442\u0433\u04af\u0439!"):0===e.data.message.show?_({type:"errors",message:"\u0410\u043c\u0436\u0438\u043b\u0442\u0433\u04af\u0439"}):_({type:"errors",message:e.data.message.text}),A(!1)})).catch((function(e){A(!1),_({type:"errors",message:"\u0410\u043c\u0436\u0438\u043b\u0442\u0433\u04af\u0439!"})})),[2]}))}));return function(t){return e.apply(this,arguments)}}();u.useEffect((function(){j(!0)}),[]);var F=function(){O(""),a()},B=t?(0,l.jsx)("div",{className:"fixed inset-0 z-50 bg-black bg-opacity-25 backdrop-blur-sm flex items-center justify-center",children:(0,l.jsxs)("div",{className:"bg-white rounded-2xl p-4 mx-auto w-72 md:p-6 md:w-[430px]",children:[(0,l.jsx)("div",{className:"flex flex-row-reverse",children:(0,l.jsx)("button",{className:"rounded-full bg-gray-200 p-1.5 hover:bg-[#F9A825] hover:text-white",onClick:F,children:(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"4",stroke:"currentColor",className:"w-5 h-5",children:(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})}),P&&(0,l.jsx)("div",{className:"text-center font-rubik text-red-600",children:P}),(0,l.jsx)(l.Fragment,{children:"ebarimtId"===w.prefChannel?(0,l.jsx)(f.Z,{buttonData:"\u0425\u0430\u0434\u0433\u0430\u043b\u0430\u0445",onClick:D,onChangeId:R,onChangePhoneNumber:R,valueEbarimtId:w.ebarimtId,valueEbarimtNumber:w.ebarimtPhoneNumber,isLoading:C,changePrefChannel:L}):"companyReg"===w.prefChannel?(0,l.jsx)(h.Z,{buttonData:"\u0425\u0430\u0434\u0433\u0430\u043b\u0430\u0445",onClick:D,onChange:R,isLoading:C,value:w.companyReg,changePrefChannel:L}):(0,l.jsx)(d.Z,{buttonData:"\u0425\u0430\u0434\u0433\u0430\u043b\u0430\u0445",onClick:D,onChange:R,isLoading:C,value:"email"===w.prefChannel?w.email:"phoneNumber"===w.prefChannel?w.phoneNumber:"",channels:w.prefChannel,changePrefChannel:L})})]})}):null;return N?m.createPortal(B,document.getElementById("modal-root")):null}},7935:function(e,t,a){"use strict";a.d(t,{$:function(){return n}});var r=a(5893),n=function(){return(0,r.jsx)("div",{className:"flex items-center justify-center w-full h-full flex-grow gap-2",children:(0,r.jsx)("div",{className:"w-7 h-7 rounded-full animate-spin border-4 border-solid border-[#F9A825] border-t-transparent"})})}},6754:function(e,t,a){"use strict";a.d(t,{Z:function(){return s}});var r=a(5893),n=(a(7294),"/_next/static/media/handleError.b0443430.svg");var s=function(){return(0,r.jsxs)("div",{className:"w-full bg-white",children:[(0,r.jsx)("div",{className:"pt-[160px] flex items-center justify-center",children:(0,r.jsx)("img",{src:n})}),(0,r.jsx)("div",{className:"pb-[180px] mt-6 text-center font-rubik text-base text-red-600",children:"\u0423\u0443\u0447\u043b\u0430\u0430\u0440\u0430\u0439, \u0442\u0430\u043d\u044b \u0445\u04af\u0441\u044d\u043b\u0442 \u0430\u043c\u0436\u0438\u043b\u0442\u0433\u04af\u0439 \u0431\u043e\u043b\u043b\u043e\u043e. \u0425\u044d\u0441\u044d\u0433 \u0445\u0443\u0433\u0430\u0446\u0430\u0430\u043d\u044b \u0434\u0430\u0440\u0430\u0430 \u0434\u0430\u0445\u0438\u043d \u043e\u0440\u043e\u043b\u0434\u043e\u043d\u043e \u0443\u0443."})]})}},1941:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return j}});var r=a(4924),n=a(6042),s=a(9396),i=a(828),o=a(5893),c=a(7294),l=a(8362),u=a(2925),m=a(8739),d=a(1163);var h=function(e){var t=e.totalPrice,a=e.isLoading,r=e.onClick,n=e.buttonData,s=e.userNumber,h=e.onChangeValue,f=e.user,p=e.userData,x=(0,d.useRouter)(),b=(0,m.Z)("_hjBase");c.useEffect((function(){null==b&&x.push("/")}),[b]);var g=(0,i.Z)(c.useState(""),2),v=g[0],N=g[1];return c.useEffect((function(){f&&s===p.number?N(p.customerName):N("******")}),[f]),(0,o.jsx)(l.Z,{children:(0,o.jsx)("div",{className:"bg-gray-100",children:(0,o.jsxs)("div",{className:"container mx-auto mt-10 mb-10 max-w-screen-lg px-3 md:px-3 xl:px-0",children:[(0,o.jsx)("div",{className:"font-rubik text-2xl font-medium text-gray-900 md:text-3xl lg:text-4xl",children:"\u0422\u04e9\u043b\u04e9\u0445"}),(0,o.jsxs)("div",{className:"max-w-sm",children:[(0,o.jsxs)("div",{className:"flex items-center mt-6",children:[(0,o.jsx)("div",{className:"flex h-9 w-9 items-center rounded-xl border-gray-200 border bg-white",children:(0,o.jsx)("img",{className:"mx-auto h-5 w-4",src:u.Z.src})}),(0,o.jsxs)("div",{className:"ml-3",children:[(0,o.jsx)("div",{className:"text-base font-rubik font-semibold text-black",children:s}),(0,o.jsx)("div",{className:"text-sm font-rubik font-normal text-gray-500",children:v})]})]}),(0,o.jsx)("hr",{className:"border-gray-300 mt-3"}),(0,o.jsx)("div",{className:"mt-4",children:(0,o.jsx)("img",{src:"https://api.gmobile.mn"+b})}),(0,o.jsx)("div",{className:"mt-6 font-rubik",children:(0,o.jsxs)("div",{className:"flex items-center justify-between",children:[(0,o.jsx)("div",{className:"text-xl font-semibold",children:"\u041d\u0438\u0439\u0442 \u0442\u04e9\u043b\u0431\u04e9\u0440"}),(0,o.jsxs)("div",{className:"text-xl font-semibold",children:[t,"\u20ae"]})]})}),!f&&(0,o.jsxs)("div",{className:"mt-4",children:[(0,o.jsx)("div",{className:"text-lg text-gray-600 font-rubik",children:"\u0418-\u0411\u0430\u0440\u0438\u043c\u0442 \u0445\u04af\u043b\u044d\u044d\u0436 \u0430\u0432\u0430\u0445 \u0438-\u043c\u044d\u0439\u043b \u0445\u0430\u044f\u0433"}),(0,o.jsx)("input",{type:"text",name:"email",className:"h-14 w-72 pl-3 bg-white rounded-xl font-rubik text-lg p-2 mr-4 border-2 focus:outline-none focus:border-[#F9A825] appearance-none",placeholder:"\u0418-\u043c\u044d\u0439\u043b \u0445\u0430\u044f\u0433",onCh
1ange:h})]}),(0,o.jsx)("div",{className:"mt-8 text-lg text-gray-600 font-rubik",children:"\u042e\u0443\u0433\u0430\u0430\u0440 \u0442\u04e9\u043b\u04e9\u0445 \u0432\u044d?"}),(0,o.jsxs)("button",{className:"mt-2 block h-14 w-72 rounded-xl bg-[#F9A825] py-2 font-rubik text-lg font-normal text-white hover:bg-yellow-400",onClick:r,disabled:a,children:[a&&(0,o.jsxs)("svg",{className:"inline mr-3 h-5 w-5 animate-spin text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[(0,o.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,o.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),a&&(0,o.jsx)("span",{children:"\u0423\u043d\u0448\u0438\u0436 \u0431\u0430\u0439\u043d\u0430..."}),!a&&(0,o.jsx)("span",{children:n})]})]})]})})})},f=a(8502),p=a(7935),x=a(4547),b=a(8878),g=a(7924),v=a(6754),N=[{pathName:["\u041d\u044d\u0433\u0436 \u0430\u0432\u0430\u0445","\u0414\u0443\u0433\u0430\u0430\u0440 \u043e\u0440\u0443\u0443\u043b\u0430\u0445","\u041d\u044d\u0433\u0436 \u0441\u043e\u043d\u0433\u043e\u0445","\u0422\u04e9\u043b\u04e9\u0445"],routeTo:["/","/checkout/unit","/checkout/unit/products"]}];var j=function(){var e=(0,i.Z)(c.useState({}),2),t=e[0],a=e[1],l=(0,i.Z)(c.useState(!1),2),u=l[0],j=l[1],y=(0,i.Z)(c.useState(!0),2),w=y[0],Z=y[1],k=(0,i.Z)(c.useState(!1),2),C=k[0],A=k[1],I=(0,i.Z)(c.useState(!1),2),P=I[0],O=I[1],_=(0,i.Z)(c.useState({email:""}),2),E=_[0],S=_[1],R=c.useContext(x.Z).notificationHandler,L=(0,i.Z)(c.useState({}),2),D=L[0],F=L[1],B=(0,m.Z)("sessionId"),H=(0,m.Z)("user"),T=(0,d.useRouter)();return c.useEffect((function(){B?function(){var e={websessionId:B};f.Z.post("websession/get",e).then((function(e){if("successful"===e.data.status)if("unit"===e.data.info.slug){if(a(e.data.info),localStorage){var t=JSON.parse(localStorage.getItem("_octo")||"{}");F(t)}}else T.push("/");else O(!0),0===e.data.message.show?R({type:"errors",message:"\u0410\u043c\u0436\u0438\u043b\u0442\u0433\u04af\u0439"}):R({type:"errors",message:e.data.message.text});Z(!1)})).catch((function(e){O(!0),Z(!1),R({type:"errors",message:"\u0410\u043c\u0436\u0438\u043b\u0442\u0433\u04af\u0439!"})}))}():T.push("/")}),[B]),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(b.Z,{patharray:N[0]}),H?(0,o.jsx)(g.Z,{show:C,onClose:function(){A(!1)}}):null,!0===w?(0,o.jsx)("div",{className:"h-[650px]",children:(0,o.jsx)(p.$,{})}):(0,o.jsx)(o.Fragment,{children:!0===P?(0,o.jsx)(v.Z,{}):(0,o.jsx)(h,{buttonData:"\u0422\u04e9\u043b\u0431\u04e9\u0440\u0438\u0439\u043d \u0445\u044d\u0440\u044d\u0433\u0441\u044d\u043b \u0441\u043e\u043d\u0433\u043e\u0445",userNumber:t.phoneNumber,totalPrice:t.amount,isLoading:u,onClick:function(){if(j(!0),H){var e={channel:"Website",phoneNumber:H};f.Z.post("user/ebarimtcheck",e).then((function(e){if("successful"===e.data.status)if(null===e.data.info.ebarimt.preferredChannel)A(!0);else switch(e.data.info.ebarimt.preferredChannel){case"email":default:e.data.info.ebarimt.email?T.push("/checkout/payments"):A(!0);break;case"ebarimtId":e.data.info.ebarimt.ebarimtId?T.push("/checkout/payments"):A(!0);break;case"companyReg":e.data.info.ebarimt.companyReg?T.push("/checkout/payments"):A(!0);break;case"phoneNumber":e.data.info.ebarimt.phoneNumber?T.push("/checkout/payments"):A(!0)}else 0===e.data.message.show?R({type:"errors",message:"\u0410\u043c\u0436\u0438\u043b\u0442\u0433\u04af\u0439"}):R({type:"errors",message:e.data.message.text});j(!1)})).catch((function(e){j(!1),R({type:"errors",message:"\u0410\u043c\u0436\u0438\u043b\u0442\u0433\u04af\u0439!"})}))}else E.email.match(/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/)?function(e){var t={websession_id:B,serviceId:"",packageId:"",productId:"",phoneNumber:"",simType:"",shippingType:"",shippingAddress:"",userId:"",orderId:"",amount:"",jsonList:{},email:e,channel:"Website"};f.Z.post("websession/update",t).then((function(e){"successful"===e.data.status?T.push("/checkout/payments"):0===e.data.message.show?R({type:"errors",message:"\u0410\u043c\u0436\u0438\u043b\u0442\u0433\u04af\u0439"}):R({type:"errors",message:e.data.message.text}),j(!1)})).catch((function(e){j(!1),R({type:"errors",message:"\u0410\u043c\u0436\u0438\u043b\u0442\u0433\u04af\u0439!"})}))}(E.email):(R({type:"errors",message:"\u0418-\u043c\u044d\u0439\u043b \u0445\u0430\u044f\u0433 \u043e\u0440\u0443\u0443\u043b\u043d\u0430 \u0443\u0443!"}),j(!1))}
1,onChangeValue:function(e){S((0,s.Z)((0,n.Z)({},E),(0,r.Z)({},e.target.name,e.target.value)))},user:H,userData:D})})]})}},9396:function(e,t,a){"use strict";function r(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}(Object(t)).forEach((function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(t,a))})),e}a.d(t,{Z:function(){return r}})}},function(e){e.O(0,[3149,9774,2888,179],(function(){return t=1606,e(e.s=t);var t}));var t=e.O();_N_E=t}]);

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.