1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9518],{12746:(e,t,s)=>{"use strict";s.d(t,{A:()=>o});var r=s(6789),l=s(5068),a=s(35161);let n=r.S?a.Dn:a.x8,i=l.A.create({baseURL:"".concat(n,"/restful/v3")});l.A.create({baseURL:"".concat(a.Dn,"/private/v1")});let o=i},35295:(e,t,s)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/[lang]/authorization",function(){return s(99653)}])},36813:e=>{e.exports={popup:"styles_popup__Y2RfD"}},40587:(e,t,s)=>{"use strict";s.d(t,{$:()=>i});var r=s(37876),l=s(51986),a=s.n(l),n=s(69241);let i=e=>{let{invertColors:t,variant:s="primary",...l}=e;return(0,r.jsx)("button",{...l,className:(0,n.A)(a().button,t&&a().inverted,"primary"===s&&a().primary,"secondary"===s&&a().secondary,l.className)})}},41003:(e,t,s)=>{"use strict";s.d(t,{A:()=>u});var r,l=s(37876),a=s(81734),n=s.n(a),i=s(58350),o=s(6027),c=s(66534),d=s(14232);function m(){return(m=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e}).apply(null,arguments)}let h=function(e){return d.createElement("svg",m({xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24"},e),r||(r=d.createElement("path",{d:"M12 2a1 1 0 0 0-.71.297l-10.087 8.8A.5.5 0 0 0 1 11.5a.5.5 0 0 0 .5.5H4v8a1 1 0 0 0 1 1h4a1 1 0 0 0 1-1v-6h4v6a1 1 0 0 0 1 1h4a1 1 0 0 0 1-1v-8h2.5a.5.5 0 0 0 .5-.5.5.5 0 0 0-.203-.402l-10.08-8.795-.006-.006A1 1 0 0 0 12 2"})))};function x(e){let{href:t="",children:s,...r}=e;return(0,l.jsxs)("div",{className:n().item,children:[(0,l.jsx)(o.s$,{}),t?(0,l.jsx)(i.A,{prefetch:!1,href:t,...r,children:s}):s]})}let u=function(e){let{items:t=[]}=e;return(0,l.jsx)("div",{className:"my-2 hidden bg-primaryExtraLight p-2 lg:flex",children:(0,l.jsxs)("div",{children:[(0,l.jsx)(c.m,{title:"Main page",children:(0,l.jsx)(i.A,{href:"/",className:"mx-1 inline-block align-middle",title:"Main page",children:(0,l.jsx)(h,{className:"align-middle text-primary",width:20,height:20})})}),t.map((e,t)=>(0,l.jsx)(x,{href:e.url,children:e.label||""},t))]})})}},48041:(e,t,s)=>{"use strict";s.d(t,{k:()=>o});var r=s(37876),l=s(14232),a=s(69241),n=s(69308),i=s.n(n);let o=(0,l.forwardRef)((e,t)=>{let{floating:s,error:l,invalid:n,...o}=e;return(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:(0,a.A)(i().container,{[i().floating]:s,[i().withError]:l||n,[i().disabled]:o.disabled}),children:[(0,r.jsx)("input",{type:"text",...o,className:(0,a.A)(o.className,i().input),ref:t}),s&&(0,r.jsx)("span",{className:i().floatPlaceholder,children:o.placeholder})]}),l&&(0,r.jsx)("div",{className:i().error,children:l})]})})},51986:e=>{e.exports={button:"styles_button__DNJ4N",primary:"styles_primary__OrxC6",inverted:"styles_inverted___6Lhm",secondary:"styles_secondary__RBxYH"}},55879:(e,t,s)=>{"use strict";s.d(t,{x:()=>n});var r=s(37876),l=s(73721),a=s(41204);let n=e=>(0,r.jsxs)(r.Fragment,{children:[e.children,(0,r.jsx)(l.A,{isOpen:e.loading,children:(0,r.jsx)(a.A,{className:"text-white"})})]})},66534:(e,t,s)=>{"use strict";s.d(t,{m:()=>o});var r=s(37876),l=s(36813),a=s.n(l),n=s(94827),i=s(69241);let o=e=>{let{title:t,children:s,...l}=e,{getTooltipProps:o,getArrowProps:c,setTooltipRef:d,setTriggerRef:m,visible:h}=(0,n.b)({delayShow:500});return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{...l,ref:m,className:(0,i.A)("relative inline cursor-pointer",l.className),children:s}),h&&t&&(0,r.jsxs)("div",{ref:d,...o({className:a().popup}),children:[(0,r.jsx)("div",{...c()}),t]})]})}},69308:e=>{e.exports={container:"styles_container__SX6_A",disabled:"styles_disabled__8PTJn",input:"styles_input__FGL4L",withError:"styles_withError__6kg3Z",floating:"styles_floating__fjh2Y",floatPlaceholder:"styles_floatPlaceholder__Tl1c_"}},81734:e=>{e.exports={container:"styles_container__giUcQ",homeIcon:"styles_homeIcon__qKb8J",item:"styles_item__8nxm8"}},86612:(e,t,s)=>{"use strict";s.d(t,{O:()=>m});var r=s(29653),l=s(56908),a=s(14232),n=s(41639),i=s(95725),o=s(3724);let c=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:location.host;return new Promise((s,r)=>{let l,a=setTimeout(()=>r(),2e3),c=()=>clearTimeout(a),d=new Image;d.src="https://".concat(t,"/").concat((l=e,n.A.stringifyUrl({url:"setCookies.php",query:{cookies:l||"",prefix:i.N,ttl:(Date.now()+(0,o.Lm)(7))/1e3}}))),d.onload=()=>{c(),s()},d.onerror=()=>{c(),r()}})},d=(e,t)=>Promise.allSettled(t.map(t=>c(e,t))),m=()=>{let[e,t]=(0,a.useState)(),s=(()=>{let e=(0,r.o)();return(0,l.A)(e.data.map(e=>e.host))})();return{login:async e=>{try{t(!0),await d(e,s)}catch(e){console.error(e)}finally{t(!1)}},logout:async()=>{try{t(!0),await d("",s)}catch(e){console.error(e)}finally{t(!1)}},loading:e}}},95725:(e,t,s)=>{"use strict";s.d(t,{N:()=>r});let r=(0,s(31121).A)("NEXT_PUBLIC_ENV_PREFIX")||""},99653:(e,t,s)=>{"use strict";s.r(t),s.d(t,{__N_SSP:()=>w,default:()=>N});var r=s(37876),l=s(41003),a=s(71616),n=s(77328),i=s.n(n),o=s(14232),c=s(86612),d=s(40587),m=s(48041),h=s(72068),x=s(88992),u=s(58350);let p=e=>{var t;let{onSubmit:s}=e,l=(0,a.W)(),n=(0,h.Ub)("(max-width: 768px)"),{control:i,handleSubmit:c,watch:p,formState:_,setError:y,setValue:f}=(0,x.mN)({defaultValues:{login:"",password:"",key2FA:"",has2FA:!1}}),v=p("login"),g=p("has2FA");return(0,o.useEffect)(()=>{f("has2FA",!1),f("key2FA","")},[v,f]),(0,r.jsxs)("form",{onSubmit:c(e=>s(e,y,f)),className:"m-auto max-w-[400px]",children:[(0,r.jsx)("h1",{className:"my-3 text-center font-bold",children:l("info")}),(0,r.jsx)("div",{className:"min-h-5 text-center text-danger",children:null==(t=_.errors.root)?void 0:t.message}),(0,r.jsxs)("div",{className:"my-2 flex items-center",children:[(0,r.jsx)("div",{className:"hidden md:block md:w-1/3",children:(0,r.jsx)("label",{htmlFor:"name",children:l("txt_username")})}),(0,r.jsx)("div",{className:"w-full md:w-2/3",children:(0,r.jsx)(x.xI,{name:"login",control:i,rules:{required:!0},render:e=>{let{field:t}=e;return(0,r.jsx)(m.k,{type:"text",id:"name",placeholder:n?l("txt_username"):void 0,floating:n,...t})}})})]}),(0,r.jsxs)("div",{className:"my-2 flex items-center",children:[(0,r.jsx)("div",{className:"hidden md:block md:w-1/3",children:(0,r.jsx)("label",{htmlFor:"password",children:l("txt_password")})}),(0,r.jsx)("div",{className:"w-full md:w-2/3",children:(0,r.jsx)(x.xI,{name:"password",control:i,rules:{required:!0},render:e=>{let{field:t}=e;return(0,r.jsx)(m.k,{type:"password",id:"password",required:!0,floating:n,placeholder:n?l("txt_password"):void 0,...t})}})})]}),g&&(0,r.jsxs)("div",{className:"my-2 flex items-center",children:[(0,r.jsx)("div",{className:"hidden md:block md:w-1/3",children:(0,r.jsx)("label",{htmlFor:"key2FA",children:l("2fa_login_input_text")})}),(0,r.jsx)("div",{className:"w-full md:w-2/3",children:(0,r.jsx)(x.xI,{name:"key2FA",control:i,rules:{required:!0,minLength:6,pattern:/^[0-9]+$/},render:e=>{let{field:t}=e;return(0,r.jsx)(m.k,{type:"text",id:"key2FA",pattern:"[0-9]+",required:!0,floating:n,minLength:6,placeholder:n?l("2FA"):void 0,...t})}})})]}),(0,r.jsx)("div",{className:"my-4 text-center",children:(0,r.jsx)(d.$,{type:"submit",children:l("login_ok")})}),(0,r.jsx)("div",{className:"my-2 text-center text-primary",children:(0,r.jsx)(u.A,{rel:"nofollow",href:"/forgot",children:l("forgot_pass")})}),(0,r.jsx)("div",{className:"my-2 text-center text-primary",children:(0,r.jsx)(u.A,{href:"/registration",children:l("register")})})]})};var _=s(55879),y=s(12746);let f=async e=>{var t;return null==(t=(await y.A.post("/Session",{Login:e.login,Password:e.password,"2FAKey":e.key2FA})).data.Data)?void 0:t.SessionId},v=e=>{let{accessKey:t}=e,s=(0,c.O)(),[l,a]=(0,o.useState)(!1),n=async(e,t,s)=>{try{a(!0);let t=await f({login:e.login,password:e.password,...e.has2FA?{key2FA:e.key2FA}:{}});await i(t)}catch(i){var r,l,n,o;let e=null==i||null==(l=i.response)||null==(r=l.data)?void 0:r.DetailedCode,a=(null==i||null==(o=i.response)||null==(n=o.data)?void 0:n.Message)||i.message;10001===e?s("has2FA",!0):t("root",{type:"server",message:a})}finally{a(!1)}},i=async e=>{try{a(!0),await s.login(e),window.location.href="/myIcecat".concat(window.location.search)}catch(e){console.error(e)}finally{a(!1)}};return(0,o.useEffect)(()=>{t&&i(t)},[t]),(0,r.jsx)(_.x,{loading:l,children:(0,r.jsx)(p,{onSubmit:n})})};var g=s(98114);let j=e=>{let t=(0,a.W)();return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i(),{children:(0,r.jsx)("title",{children:"".concat(t("title_prefix")," ").concat(t("menu_openicecat"))})}),(0,r.jsx)(l.A,{items:[{label:t("menu_openicecat")}]}),(0,r.jsx)(v,{accessKey:e.accessKey})]})};j.meta={tags:{keywords:e=>e("lang_keywords_login"),description:e=>e("lang_description_login")}},j.getLayout=g.B;var w=!0;let N=j}},e=>{e.O(0,[4587,4796,9512,4827,8992,8114,636,6593,8792],()=>e(e.s=35295)),_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.