PageSourceSearch

https://inter-nation.uz/_next/static/chunks/4075.910d369f0cb3fc4a.js

js inter-nation.uz collected 2026-10-07 17:40:47 UTC 4,648 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4075],{20464:function(e,n,t){t.d(n,{m:function(){return onClickDownload}});let onClickDownload=e=>{var n;let t=(null==e?void 0:null===(n=e.exam)||void 0===n?void 0:n.certificate_download_url)||"",i=document.createElement("a");i.href=t,i.download="downloadedFile.txt",i.style.display="none",document.body.appendChild(i),i.click(),document.body.removeChild(i)}},46049:function(e,n,t){t.r(n),t.d(n,{default:function(){return view}});var i=t(85893),r=t(67294),l=t(25675),a=t.n(l),o=t(6154),c=t(89552),d=t(11163),s=t(88767),u=t(67421),p=t(95520),x=t(88050);let f=null,loadScript=()=>window.turnstile?Promise.resolve():(f||(f=new Promise((e,n)=>{let t=document.createElement("script");t.src="https://challenges.cloudflare.com/turnstile/v0/api.js?render=explicit",t.async=!0,t.defer=!0,t.onload=()=>e(),t.onerror=()=>{f=null,n(Error("Failed to load Turnstile"))},document.head.appendChild(t)})),f);var turnstile=e=>{let{onSuccess:n,onExpire:t,onError:l,language:a="auto",className:o}=e,c=(0,r.useRef)(null),d=(0,r.useRef)({onSuccess:n,onExpire:t,onError:l});return d.current={onSuccess:n,onExpire:t,onError:l},(0,r.useEffect)(()=>{let e;let n=!1;return loadScript().then(()=>{!n&&c.current&&window.turnstile&&(e=window.turnstile.render(c.current,{sitekey:"1x00000000000000000000AA",language:a,callback:e=>d.current.onSuccess(e),"expired-callback":()=>{var e,n;return null===(e=(n=d.current).onExpire)||void 0===e?void 0:e.call(n)},"error-callback":()=>{var e,n;return null===(e=(n=d.current).onError)||void 0===e?void 0:e.call(n)}}))}).catch(()=>{var e,n;return null===(e=(n=d.current).onError)||void 0===e?void 0:e.call(n)}),()=>{n=!0,e&&window.turnstile&&window.turnstile.remove(e)}},[a]),(0,i.jsx)("div",{ref:c,className:o})},m=t(95762),h=t(20464),v=t(82729),w=t(37556);function _templateObject(){let e=(0,v._)(["\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  gap: 24px;\n  width: 100%;\n  min-height: calc(100vh - 380px);\n  padding: 48px 16px;\n\n  .certificate {\n    position: relative;\n    width: 100%;\n    max-width: 420px;\n    aspect-ratio: 1 / 1.41;\n    background: #ffffff;\n    box-shadow: 0 8px 24px rgba(15, 15, 15, 0.08);\n  }\n\n  .captcha {\n    display: flex;\n    flex-direction: column;\n    align-items: center;\n    gap: 16px;\n    min-height: 120px;\n    text-align: center;\n\n    p {\n      font-weight: 500;\n      font-size: 16px;\n      color: #23262f;\n    }\n\n    .error {\n      font-size: 14px;\n      color: #ef466f;\n    }\n  }\n\n  .download {\n    display: flex;\n    align-items: center;\n    gap: 8px;\n    height: 44px !important;\n  }\n\n  /* Phones */\n  @media (max-width: 480px) {\n    padding: 24px 16px;\n\n    .certificate {\n      max-width: 100%;\n    }\n  }\n"]);return _templateObject=function(){return e},e}let g=w.Z.div(_templateObject());var view=()=>{var e,n,t;let l=(0,d.useRouter)(),{t:f,i18n:v}=(0,u.$G)(["common","info"]),w=l.query.token,[E,_]=(0,r.useState)(!1),[C,j]=(0,r.useState)(!1),[A,k]=(0,r.useState)(0),b=(0,s.useMutation)({mutationFn:e=>o.Z.post("/api/turnstile",{token:e}),onSuccess:()=>_(!0),onError:()=>j(!0)}),{data:y,isFetching:T}=(0,s.useQuery)(["view-certificate",w],()=>p.Z.getCertificateByApi({project:m.i.ars,action:"client_student_certificate_exam_result",query_params:{token:w.replaceAll(" ","+")}}),{enabled:!!w&&E}),R=null==y?void 0:null===(e=y.data)||void 0===e?void 0:e.result,P=null==R?void 0:null===(n=R.exam)||void 0===n?void 0:n.certificate_preview_url;return E?(0,i.jsx)(c.default,{spinning:T,children:(0,i.jsxs)(g,{children:[(0,i.jsx)("div",{className:"certificate",children:P&&(0,i.jsx)(a(),{alt:"certificate",src:P,fill:!0,priority:!0,style:{objectFit:"contain"}})}),(0,i.jsxs)(x.zx,{className:"download",disabled:!(null==R?void 0:null===(t=R.exam)||void 0===t?void 0:t.certificate_download_url),onClick:()=>(0,h.m)(R),children:[(0,i.jsx)(a(),{src:"/certificate/download.png",alt:"download",width:16,height:16}),f("CERTIFICATE_PAGE.DOWNLOAD_PDF")]})]})}):(0,i.jsx)(g,{children:(0,i.jsx)(c.default,{spinning:b.isLoading,children:(0,i.jsxs)("div",{className:"captcha",children:[(0,i.jsx)("p",{children:f("CERTIFICATE_PAGE.CAPTCHA")}),(0,i.jsx)(turnstile,{language:["ru","en"].includes(v.language)?v.language:"auto",onSuccess:e=>{j(!1),b.mutate(e)},onExpire:()=>j(!1),onError:()=>j(!0)},A),C&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("p",{className:"error",children:f("CERTIFICATE_PAGE.CAPTCHA_ERROR")}),(0,i.jsx)(x.zx,{onClick:()=>{j(!1),k(e=>e+1)},children:f("CERTIFICATE_PAGE.CAPTCHA_RETRY")})]})]})})})}}}]);
2//# sourceMappingURL=4075.910d369f0cb3fc4a.js.map

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.