PageSourceSearch

https://static.znanierussia.ru/production/_next/static/chunks/2deid-_6ewau0.js

js znanierussia.ru collected 2026-10-02 02:58:14 UTC 104,283 bytes, 216 lines download raw bytes

1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="456c99bd-aede-a345-4902-bcfef9b293fb")}catch(e){}}();
2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,308464,e=>{"use strict";var t=e.i(278660),i=e.i(300805),n=e.i(706174),a=class extends i.Removable{#e;#t;#i;#n;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#i=e.mutationCache,this.#t=[],this.state=e.state||r(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#i.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#i.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||("pending"===this.state.status?this.scheduleGc():this.#i.remove(this))}continue(){return this.#n?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#a({type:"continue"})},i={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#n=(0,n.createRetryer)({fn:()=>this.options.mutationFn?this.options.mutationFn(e,i):Promise.reject(Error("No mutationFn found")),onFail:(e,t)=>{this.#a({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#a({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#i.canRun(this)});let a="pending"===this.state.status,r=!this.#n.canStart();try{if(a)t();else{this.#a({type:"pending",variables:e,isPaused:r}),this.#i.config.onMutate&&await this.#i.config.onMutate(e,this,i);let t=await this.options.onMutate?.(e,i);t!==this.state.context&&this.#a({type:"pending",context:t,variables:e,isPaused:r})}let n=await this.#n.start();return await this.#i.config.onSuccess?.(n,e,this.state.context,this,i),await this.options.onSuccess?.(n,e,this.state.context,i),await this.#i.config.onSettled?.(n,null,this.state.variables,this.state.context,this,i),await this.options.onSettled?.(n,null,e,this.state.context,i),this.#a({type:"success",data:n}),n}catch(t){try{await this.#i.config.onError?.(t,e,this.state.context,this,i)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,i)}catch(e){Promise.reject(e)}try{await this.#i.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,i)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,i)}catch(e){Promise.reject(e)}throw this.#a({type:"error",error:t}),t}finally{this.#i.runNext(this)}}#a(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}})(this.state),t.notifyManager.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#i.notify({mutation:this,type:"updated",action:e})})}};function r(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}e.s(["Mutation",0,a,"getDefaultState",0,r])},126612,(e,t,i)=>{"use strict";var n=function(e){var t,i,n;return!!(t=e)&&"object"==typeof t&&(i=e,"[object RegExp]"!==(n=Object.prototype.toString.call(i))&&"[object Date]"!==n&&i.$$typeof!==a)},a="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function r(e,t){return!1!==t.clone&&t.isMergeableObject(e)?d(Array.isArray(e)?[]:{},e,t):e}function o(e,t,i){return e.concat(t).map(function(e){return r(e,i)})}function s(e){return Object.keys(e).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[])}function l(e,t){try{return t in e}catch(e){return!1}}function d(e,t,i){(i=i||{}).arrayMerge=i.arrayMerge||o,i.isMergeableObject=i.isMergeableObject||n,i.cloneUnlessOtherwiseSpecified=r;var a,u,c=Array.isArray(t);return c!==Array.isArray(e)?r(t,i):c?i.arrayMerge(e,t,i):(u={},(a=i).isMergeableObject(e)&&s(e).forEach(function(t){u[t]=r(e[t],a)}),s(t).forEach(function(i){l(e,i)&&!(Object.hasOwnProperty.call(e,i)&&Object.propertyIsEnumerable.call(e,i))||(l(e,i)&&a.isMergeableObject(t[i])?u[i]=(function(e,t){if(!t.customMerge)return d;var i=t.customMerge(e);return"function"==typeof i?i:d})(i,a)(e[i],t[i],a):u[i]=r(t[i],a))}),u)}d.all=function(e,t){if(!Array.isArray(e))throw Error("first argument should be an array");return e.reduce(function(e,i){return d(e,i,t)},{})},t.exports=d},500355,528128,248943,762367,e=>{"use strict";var t,i,n,a=e.i(797639);function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t,i){var n;return(n=function(e,t){if("object"!=r(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t||"default");if("object"!=r(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"),(t="symbol"==r(n)?n:n+"")in e)?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var s=(e,t)=>{e(...t)},l=class e{constructor(){o(this,"subscribers",new Map)}getSubscribers(e){let t=this.subscribers.get(e);if(t)return t;let i=[];return this.subscribers.set(e,i),i}static getInstance(){return e.instance||(e.instance=new e),e.instance}
2on(e,t){return this.getSubscribers(e).push(t),()=>this.off(e,t)}once(e,t){let i=(...n)=>{this.off(e,i),s(t,n)};return this.on(e,i)}off(e,t){let i=this.getSubscribers(e);if(!t)return void this.subscribers.set(e,[]);let n=i.indexOf(t);-1!==n&&i.splice(n,1)}emit(e,...t){for(let i of[...this.getSubscribers(e)])try{s(i,t)}catch(t){console.error(`Error in event handler for "${String(e)}":`,t)}}clear(){this.subscribers.clear()}};o(l,"instance",void 0),e.s(["n",0,o,"t",0,l],528128);var d=e.i(427341),u=e.i(734804);class c{#r=[];#o;#s=!0;#l;#d=this.#u(console.info);#c=this.#u(console.warn);#m={enable:!0,callbackList:[],interval:5};#h;didInitialize=!1;authenticated=!1;loginRequired=!1;responseMode="fragment";responseType="code";flow="standard";timeSkew=null;redirectUri;silentCheckSsoRedirectUri;silentCheckSsoFallback=!0;pkceMethod="S256";enableLogging=!1;logoutMethod="GET";scope;messageReceiveTimeout=1e4;idToken;idTokenParsed;token;tokenParsed;refreshToken;refreshTokenParsed;clientId;sessionId;subject;authServerUrl;realm;realmAccess;resourceAccess;profile;userInfo;endpoints;tokenTimeoutHandle;onAuthSuccess;onAuthError;onAuthRefreshSuccess;onAuthRefreshError;onTokenExpired;onAuthLogout;onReady;onActionUpdate;constructor(e){if("string"!=typeof e&&!v(e))throw Error("The 'Keycloak' constructor must be provided with a configuration object, or a URL to a JSON configuration file.");if(v(e)){for(const t of"oidcProvider"in e?["clientId"]:["url","realm","clientId"])if(!(t in e))throw Error(`The configuration object is missing the required '${t}' property.`)}globalThis.isSecureContext||this.#c("[KEYCLOAK] Keycloak JS must be used in a 'secure context' to function properly as it relies on browser APIs that are otherwise not available.\nContinuing to run your application insecurely will lead to unexpected behavior and breakage.\n\nFor more information see: https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts"),this.#h=e}init=async(e={})=>{if(this.didInitialize)throw Error("A 'Keycloak' instance can only be initialized once.");if(this.didInitialize=!0,this.#l=function(){try{return new p}catch(e){return new f}}(),"string"==typeof e.adapter&&["default","cordova","cordova-native"].includes(e.adapter)?this.#o=this.#k(e.adapter):"object"==typeof e.adapter?this.#o=e.adapter:"Cordova"in window||"cordova"in window?this.#o=this.#k("cordova"):this.#o=this.#k("default"),void 0!==e.useNonce&&(this.#s=e.useNonce),void 0!==e.checkLoginIframe&&(this.#m.enable=e.checkLoginIframe),e.checkLoginIframeInterval&&(this.#m.interval=e.checkLoginIframeInterval),"login-required"===e.onLoad&&(this.loginRequired=!0),e.responseMode)if("query"===e.responseMode||"fragment"===e.responseMode)this.responseMode=e.responseMode;else throw Error("Invalid value for responseMode");if(e.flow){switch(e.flow){case"standard":this.responseType="code";break;case"implicit":this.responseType="id_token token";break;case"hybrid":this.responseType="code id_token token";break;default:throw Error("Invalid value for flow")}this.flow=e.flow}if("number"==typeof e.timeSkew&&(this.timeSkew=e.timeSkew),e.redirectUri&&(this.redirectUri=e.redirectUri),e.silentCheckSsoRedirectUri&&(this.silentCheckSsoRedirectUri=e.silentCheckSsoRedirectUri),"boolean"==typeof e.silentCheckSsoFallback&&(this.silentCheckSsoFallback=e.silentCheckSsoFallback),void 0!==e.pkceMethod){if("S256"!==e.pkceMethod&&!1!==e.pkceMethod)throw TypeError(`Invalid value for pkceMethod', expected 'S256' or false but got ${e.pkceMethod}.`);this.pkceMethod=e.pkceMethod}return"boolean"==typeof e.enableLogging&&(this.enableLogging=e.enableLogging),"POST"===e.logoutMethod&&(this.logoutMethod="POST"),"string"==typeof e.scope&&(this.scope=e.scope),"number"==typeof e.messageReceiveTimeout&&e.messageReceiveTimeout>0&&(this.messageReceiveTimeout=e.messageReceiveTimeout),await this.#p(),await this.#f(),await this.#y(e),this.onReady?.(this.authenticated),this.authenticated};#k(e){if("default"===e)return this.#g();if("cordova"===e)return this.#m.enable=!1,this.#v();if("cordova-native"===e)return this.#m.enable=!1,this.#b();throw Error("invalid adapter type: "+e)}#g(){let e=e=>e?.redirectUri||this.redirectUri||globalThis.location.href;return{login:async e=>(window.location.assign(await this.createLoginUrl(e)),await new Promise(()=>{})),logout:async t=>{if("GET"===(t?.logoutMethod??this.logoutMethod))return void window.location.replace(this.createLogoutUrl(t));let i=document.createElement("form");for(let[n,a]of(i.setAttribute("method","POST"),i.setAttribute("action",this.createLogoutUrl(t)),i.style.display="none",Object.entries({id_token_hint:this.idToken,client_id:this.clientId,post_logout_redirect_uri:e(t)}))){let e=document.createElement("input");e.setAttribute("type","hidden"),e.setAttribute("name",n),e.setAttribute("value",a),i.appendChild(e)}document.body.appendChild(i),i.submit()},register:async e=>(window.location.assign(await this.createRegisterUrl(e)),await new Promise(()=>{})),accountManagement:async()=>{let e=this.createAccountUrl();if(void 0!==e)window.location.href=e;else throw Error("Not supported by the OIDC server");return await new Promise(()=>{})},redirectUri:e}}#v(){let e=(e,t,i)=>window.cordova&&window.cordova.InAppBrowser?window.cordova.InAppBrowser.open(e,t,i):window.open(e,t,i),t=e=>{let t=e&&e.cordovaOptions?Object.keys(e.cordovaOptions).reduce((t,i)=>(t[i]=e.cordovaOptions[i],t),{}):{};return t.location="no",e&&"none"===e.prompt&&(t.hidden="yes"),Object.keys(t).reduce((e,i)=>(e.push(i+"="+t[i]),e),[]).join(",")},i=()=>this.redirectUri||"http://localhost";return{login:async n=>{let a=t(n),r=e(await this.createLoginUrl(n),"_blank",a),o=!1,s=!1;function l(){s=!0,r.close()}return await new Promise((e,t)=>
2{r.addEventListener("loadstart",async n=>{if(0===n.url.indexOf(i())){let i=this.#w(n.url);o=!0,l();try{await this.#N(i),e()}catch(e){t(e)}}}),r.addEventListener("loaderror",async n=>{if(!o)if(0===n.url.indexOf(i())){let i=this.#w(n.url);o=!0,l();try{await this.#N(i),e()}catch(e){t(e)}}else t(Error("Unable to process login.")),l()}),r.addEventListener("exit",function(e){s||t(Error("User closed the login window."))})})},logout:async t=>{let n=e(this.createLogoutUrl(t),"_blank","location=no,hidden=yes,clearcache=yes"),a=!1;n.addEventListener("loadstart",e=>{0===e.url.indexOf(i())&&n.close()}),n.addEventListener("loaderror",e=>{0===e.url.indexOf(i())||(a=!0),n.close()}),await new Promise((e,t)=>{n.addEventListener("exit",()=>{a?t(Error("User closed the login window.")):(this.clearToken(),e())})})},register:async n=>{let a=e(await this.createRegisterUrl(),"_blank",t(n)),r=new Promise((e,t)=>{a.addEventListener("loadstart",async n=>{if(0===n.url.indexOf(i())){a.close();let i=this.#w(n.url);try{await this.#N(i),e()}catch(e){t(e)}}})});await r},accountManagement:async()=>{let t=this.createAccountUrl();if(void 0!==t){let n=e(t,"_blank","location=no");n.addEventListener("loadstart",function(e){0===e.url.indexOf(i())&&n.close()})}else throw Error("Not supported by the OIDC server")},redirectUri:()=>i()}}#b(){return{login:async e=>{let t=await this.createLoginUrl(e);await new Promise((e,i)=>{universalLinks.subscribe("keycloak",async t=>{universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close();let n=this.#w(t.url);try{await this.#N(n),e()}catch(e){i(e)}}),window.cordova.plugins.browsertab.openUrl(t)})},logout:async e=>{let t=this.createLogoutUrl(e);await new Promise(e=>{universalLinks.subscribe("keycloak",()=>{universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close(),this.clearToken(),e()}),window.cordova.plugins.browsertab.openUrl(t)})},register:async e=>{let t=await this.createRegisterUrl(e);await new Promise((e,i)=>{universalLinks.subscribe("keycloak",async t=>{universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close();let n=this.#w(t.url);try{await this.#N(n),e()}catch(e){i(e)}}),window.cordova.plugins.browsertab.openUrl(t)})},accountManagement:async()=>{let e=this.createAccountUrl();if(void 0!==e)window.cordova.plugins.browsertab.openUrl(e);else throw Error("Not supported by the OIDC server")},redirectUri:e=>e&&e.redirectUri?e.redirectUri:this.redirectUri?this.redirectUri:"http://localhost"}}async #p(){if("string"==typeof this.#h){let e=await b(this.#h);this.authServerUrl=e["auth-server-url"],this.realm=e.realm,this.clientId=e.resource,this.#T()}else this.clientId=this.#h.clientId,"oidcProvider"in this.#h?await this.#F(this.#h.oidcProvider):(this.authServerUrl=this.#h.url,this.realm=this.#h.realm,this.#T())}#T(){this.endpoints={authorize:()=>this.#S()+"/protocol/openid-connect/auth",token:()=>this.#S()+"/protocol/openid-connect/token",logout:()=>this.#S()+"/protocol/openid-connect/logout",checkSessionIframe:()=>this.#S()+"/protocol/openid-connect/login-status-iframe.html",thirdPartyCookiesIframe:()=>this.#S()+"/protocol/openid-connect/3p-cookies/step1.html",register:()=>this.#S()+"/protocol/openid-connect/registrations",userinfo:()=>this.#S()+"/protocol/openid-connect/userinfo"}}async #F(e){if("string"==typeof e){let t=`${C(e)}/.well-known/openid-configuration`,i=await w(t);this.#I(i)}else this.#I(e)}#I(e){this.endpoints={authorize:()=>e.authorization_endpoint,token:()=>e.token_endpoint,logout(){if(!e.end_session_endpoint)throw Error("Not supported by the OIDC server");return e.end_session_endpoint},checkSessionIframe(){if(!e.check_session_iframe)throw Error("Not supported by the OIDC server");return e.check_session_iframe},register(){throw Error('Redirection to "Register user" page not supported in standard OIDC mode')},userinfo(){if(!e.userinfo_endpoint)throw Error("Not supported by the OIDC server");return e.userinfo_endpoint}}}async #f(){var e,t;let i;if(!this.#m.enable&&!this.silentCheckSsoRedirectUri||"function"!=typeof this.endpoints.thirdPartyCookiesIframe)return;let n=document.createElement("iframe");n.setAttribute("src",this.endpoints.thirdPartyCookiesIframe()),n.setAttribute("sandbox","allow-storage-access-by-user-activation allow-scripts allow-same-origin"),n.setAttribute("title","keycloak-3p-check-iframe"),n.style.display="none",document.body.appendChild(n);let a=new Promise(e=>{let t=i=>{n.contentWindow===i.source&&("supported"===i.data||"unsupported"===i.data)&&("unsupported"===i.data&&(this.#c("[KEYCLOAK] Your browser is blocking access to 3rd-party cookies, this means:\n\n - It is not possible to retrieve tokens without redirecting to the Keycloak server (a.k.a. no support for silent authentication).\n - It is not possible to automatically detect changes to the session status (such as the user logging out in another tab).\n\nFor more information see: https://www.keycloak.org/securing-apps/javascript-adapter#_modern_browsers"),this.#m.enable=!1,this.silentCheckSsoFallback&&(this.silentCheckSsoRedirectUri=void 0)),document.body.removeChild(n),window.removeEventListener("message",t),e())};window.addEventListener("message",t,!1)});return await (e=a,t=this.messageReceiveTimeout,Promise.race([e,new Promise(function(e,n){i=window.setTimeout(function(){n(Error("Timeout when waiting for 3rd party check iframe message."))},t)})]).finally(function(){clearTimeout(i)}))}async #y(e){let t=this.#w(window.location.href);if(t?.newUrl&&window.history.replaceState(window.history.state,"",t.newUrl),t&&t.valid){await this.#C(),await this.#N(t);return}let i=async t=>{let i={};t||(i.prompt="none"),e.locale&&(i.locale=e.locale),await this.login(i)},n=async()=>{switch(e.onLoad){case"check-sso":this.#m.enable?(await this.#C(),await this.#A()||(this.silentCheckSsoRedirectUri?await this.#U():await i(!1))):this.silentCheckSsoRedirectUri?await this.#U():await i(!1);break;case"login-required":await i(!0);break;default:throw Error("Invalid value for onLoad")}};if(e.token&&e.refreshToken)if(this.#E(e.token,e.refreshToken,e.idToken),this.#m.enable)await this.#C(),await this.#A()&&(this.onAuthSuccess?.(),this.#R());else try{await this.updateToken(-1),this.onAuthSuccess?.()}catch(t){if(this.onAuthError?.(),e.onLoad)await n();else throw t}else e.onLoad&&await n()}async #C(){if(!this.#m.enable||this.#m.iframe)return;let e=document.createElement("iframe");this.#m.iframe=e,e.setAttribute("src",this.endpoints.checkSessionIframe()),e.setAttribute("sandbox","allow-storage-access-by-user-activation allow-scripts allow-same-origin"),e.setAttribute("title","keycloak-session-iframe"),e.style.display="none",document.body.appendChild(e);let t=e=>{if(e.origin!==this.#m.iframeOrigin||this.#m.iframe?.contentWindow!==e.source||"unchanged"!==e.data&&"changed"!==e.data&&"error"!==e.data)return;"unchanged"!==e.data&&this.clearToken();let t=this.#m.callbackList;for(let i of(this.#m.callbackList=[],t.reverse()))"error"===e.data?i(Error("Error while checking login iframe")):i(null,"unchanged"===e.data)};window.addEventListener("message",t,!1);let i=new Promise(t=>{e.addEventListener("load",()=>{let e=this.endpoints.authorize();e.startsWith("/")?this.#m.iframeOrigin=globalThis.location.origin:this.#m.iframeOrigin=new URL(e).origin,t()})});await i}async #A(){if(!this.#m.iframe||!this.#m.iframeOrigin)return;let e=`${this.clientId} ${this.sessionId?this.sessionId:""}`,t=this.#m.iframeOrigin,i=new Promise((i,n)=>{this.#m.callbackList.push((e,t)=>e?n(e):i(t)),1===this.#m.callbackList.length&&this.#m.iframe?.contentWindow?.postMessage(e,t)});return await i}async #U(){let e=document.createElement("iframe"),t=await this.createLoginUrl({prompt:"none",redirectUri:this.silentCheckSsoRedirectUri});return e.setAttribute("src",t),e.setAttribute("sandbox","allow-storage-access-by-user-activation allow-scripts allow-same-origin"),e.setAttribute("title","keycloak-silent-check-sso"),e.style.display="none",document.body.appendChild(e),await new Promise((t,i)=>{let n=async a=>{if(a.origin!==window.location.origin||e.contentWindow!==a.source)return;let r=this.#w(a.data);try{await this.#N(r),t()}catch(e){i(e)}document.body.removeChild(e),window.removeEventListener("message",n)};window.addEventListener("message",n)})}#w(e){let t=this.#D(e);if(!t)return;let i=this.#l.get(t.state);return i&&(t.valid=!0,t.redirectUri=i.redirectUri,t.storedNonce=i.nonce,t.prompt=i.prompt,t.pkceCodeVerifier=i.pkceCodeVerifier,t.loginOptions=i.loginOptions),t}#D(e){let t,i=[];switch(this.flow){case"standard":i=["code","state","session_state","kc_action_status","kc_action","iss"];break;case"implicit":i=["access_token","token_type","id_token","state","session_state","expires_in","kc_action_status","kc_action","iss"];break;case"hybrid":i=["access_token","token_type","id_token","code","state","session_state","expires_in","kc_action_status","kc_action","iss"]}i.push("error"),i.push("error_description"),i.push("error_uri");let n=new URL(e),a="";if("query"===this.responseMode&&n.searchParams.size>0?(t=this.#P(n.search,i),n.search=t.paramsString,a=n.toString()):"fragment"===this.responseMode&&n.hash.length>0&&(t=this.#P(n.hash.substring(1),i),n.hash=t.paramsString,a=n.toString()),t?.oauthParams){if("standard"===this.flow||"hybrid"===this.flow){if((t.oauthParams.code||t.oauthParams.error)&&t.oauthParams.state)return t.oauthParams.newUrl=a,t.oauthParams}else if("implicit"===this.flow&&(t.oauthParams.access_token||t.oauthParams.error)&&t.oauthParams.state)return t.oauthParams.newUrl=a,t.oauthParams}}#P(e,t){let i=e.split("&"),n={},a="";for(let e of i.reverse()){let i=new URLSearchParams(e).entries().next().value;if(!i){a="&"+a;continue}let[r,o]=i;!t.includes(r)||r in n?a=0===a.length?e:e+"&"+a:n[r]=o}return{paramsString:a,oauthParams:n}}
2async #N(e){let{code:t,error:i,prompt:n}=e,a=new Date().getTime(),r=(t,i,n)=>{if(a=(a+new Date().getTime())/2,this.#E(t,i,n,a),this.#s&&this.idTokenParsed&&this.idTokenParsed.nonce!==e.storedNonce)throw this.#d("[KEYCLOAK] Invalid nonce, clearing token"),this.clearToken(),Error("Invalid nonce.")};if(e.kc_action_status&&this.onActionUpdate&&this.onActionUpdate(e.kc_action_status,e.kc_action),i){if("none"!==n)if(e.error_description&&"authentication_expired"===e.error_description)await this.login(e.loginOptions);else{let t={error:i,error_description:e.error_description};throw this.onAuthError?.(t),t}return}if("standard"!==this.flow&&(e.access_token||e.id_token)&&(r(e.access_token,void 0,e.id_token),this.onAuthSuccess?.()),"implicit"!==this.flow&&t)try{let i=await N(this.endpoints.token(),t,this.clientId,e.redirectUri,e.pkceCodeVerifier);r(i.access_token,i.refresh_token,i.id_token),"standard"===this.flow&&this.onAuthSuccess?.(),this.#R()}catch(e){throw this.onAuthError?.(),e}}async #R(){this.#m.enable&&this.token&&(await U(1e3*this.#m.interval),await this.#A()&&await this.#R())}login=e=>this.#o.login(e);createLoginUrl=async e=>{let t=m(),i=m(),n=this.#o.redirectUri(e),a={state:t,nonce:i,redirectUri:n,loginOptions:e};e?.prompt&&(a.prompt=e.prompt);let r=e?.action==="register"?this.endpoints.register():this.endpoints.authorize(),o=e?.scope||this.scope,s=o?o.split(" "):[];s.includes("openid")||s.unshift("openid"),o=s.join(" ");let l=new URLSearchParams([["client_id",this.clientId],["redirect_uri",n],["state",t],["response_mode",this.responseMode],["response_type",this.responseType],["scope",o]]);if(this.#s&&l.append("nonce",i),e?.prompt&&l.append("prompt",e.prompt),"number"==typeof e?.maxAge&&l.append("max_age",e.maxAge.toString()),e?.loginHint&&l.append("login_hint",e.loginHint),e?.idpHint&&l.append("kc_idp_hint",e.idpHint),e?.action&&"register"!==e.action&&l.append("kc_action",e.action),e?.locale&&l.append("ui_locales",e.locale),e?.acr&&l.append("claims",JSON.stringify({id_token:{acr:e.acr}})),e?.acrValues&&l.append("acr_values",e.acrValues),this.pkceMethod)try{let e=function(){var e=96,t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";let i=function(e){if("u"<typeof crypto||void 0===crypto.getRandomValues)throw Error("Web Crypto API is not available.");return crypto.getRandomValues(new Uint8Array(e))}(e),n=Array(e);for(let a=0;a<e;a++)n[a]=t.charCodeAt(i[a]%t.length);return String.fromCharCode.apply(null,n)}(),t=await h(this.pkceMethod,e);a.pkceCodeVerifier=e,l.append("code_challenge",t),l.append("code_challenge_method",this.pkceMethod)}catch(e){throw Error("Failed to generate PKCE challenge.",{cause:e})}return this.#l.add(a),`${r}?${l.toString()}`};logout=e=>this.#o.logout(e);createLogoutUrl=e=>{let t=e?.logoutMethod??this.logoutMethod,i=this.endpoints.logout();if("POST"===t)return i;let n=new URLSearchParams([["client_id",this.clientId],["post_logout_redirect_uri",this.#o.redirectUri(e)]]);return this.idToken&&n.append("id_token_hint",this.idToken),`${i}?${n.toString()}`};register=e=>this.#o.register(e);createRegisterUrl=e=>this.createLoginUrl({...e,action:"register"});createAccountUrl=e=>{let t=this.#S();if(!t)throw Error("Unable to create account URL, make sure the adapter is not configured using a generic OIDC provider.");let i=new URLSearchParams([["referrer",this.clientId],["referrer_uri",this.#o.redirectUri(e)]]);return`${t}/account?${i.toString()}`};accountManagement=()=>this.#o.accountManagement();hasRealmRole=e=>{let t=this.realmAccess;return!!t&&t.roles.indexOf(e)>=0};hasResourceRole=(e,t)=>{if(!this.resourceAccess)return!1;let i=this.resourceAccess[t||this.clientId];return!!i&&i.roles.indexOf(e)>=0};loadUserProfile=async()=>{let e=this.#S();if(!e)throw Error("Unable to load user profile, make sure the adapter is not configured using a generic OIDC provider.");let t=`${e}/account`,i=await F(t,{headers:[I(this.token)]});return this.profile=i};loadUserInfo=async()=>{let e=this.endpoints.userinfo(),t=await F(e,{headers:[I(this.token)]});return this.userInfo=t};isTokenExpired=e=>{if(!this.tokenParsed||!this.refreshToken&&"implicit"!==this.flow)throw Error("Not authenticated");if(null==this.timeSkew)return this.#d("[KEYCLOAK] Unable to determine if token is expired as timeskew is not set"),!0;if("number"!=typeof this.tokenParsed.exp)return!1;let t=this.tokenParsed.exp-Math.ceil(new Date().getTime()/1e3)+this.timeSkew;if(e){if(isNaN(e))throw Error("Invalid minValidity");t-=e}return t<0};updateToken=async e=>{if(!this.refreshToken)throw Error("Unable to update token, no refresh token available.");e=e||5,this.#m.enable&&await this.#A();let t=!1;if(-1===e?(t=!0,this.#d("[KEYCLOAK] Refreshing token: forced refresh")):(!this.tokenParsed||this.isTokenExpired(e))&&(t=!0,this.#d("[KEYCLOAK] Refreshing token: token expired")),!t)return!1;let{promise:i,resolve:n,reject:a}=Promise.withResolvers();if(this.#r.push({resolve:n,reject:a}),1===this.#r.length){let e=this.endpoints.token(),t=new Date().getTime();try{let i=await T(e,this.refreshToken,this.clientId);this.#d("[KEYCLOAK] Token refreshed"),t=(t+new Date().getTime())/2,this.#
2E(i.access_token,i.refresh_token,i.id_token,t),this.onAuthRefreshSuccess?.();for(let e=this.#r.pop();null!=e;e=this.#r.pop())e.resolve(!0)}catch(e){this.#c("[KEYCLOAK] Failed to refresh token"),e instanceof A&&400===e.response.status&&this.clearToken(),this.onAuthRefreshError?.();for(let t=this.#r.pop();null!=t;t=this.#r.pop())t.reject(e)}}return await i};clearToken=()=>{this.token&&(this.#E(),this.onAuthLogout?.(),this.loginRequired&&this.login())};#E(e,t,i,n){if(this.tokenTimeoutHandle&&(clearTimeout(this.tokenTimeoutHandle),this.tokenTimeoutHandle=void 0),t?(this.refreshToken=t,this.refreshTokenParsed=g(t)):(delete this.refreshToken,delete this.refreshTokenParsed),i?(this.idToken=i,this.idTokenParsed=g(i)):(delete this.idToken,delete this.idTokenParsed),e){if(this.token=e,this.tokenParsed=g(e),this.sessionId=this.tokenParsed.sid,this.authenticated=!0,this.subject=this.tokenParsed.sub,this.realmAccess=this.tokenParsed.realm_access,this.resourceAccess=this.tokenParsed.resource_access,n&&(this.timeSkew=Math.floor(n/1e3)-this.tokenParsed.iat),null!==this.timeSkew&&(this.#d("[KEYCLOAK] Estimated time difference between browser and server is "+this.timeSkew+" seconds"),this.onTokenExpired)){let e=(this.tokenParsed.exp-new Date().getTime()/1e3+this.timeSkew)*1e3;this.#d("[KEYCLOAK] Token expires in "+Math.round(e/1e3)+" s"),e<=0?this.onTokenExpired():this.tokenTimeoutHandle=window.setTimeout(this.onTokenExpired,e)}}else delete this.token,delete this.tokenParsed,delete this.subject,delete this.realmAccess,delete this.resourceAccess,this.authenticated=!1}#S(){if(void 0!==this.authServerUrl)return`${C(this.authServerUrl)}/realms/${encodeURIComponent(this.realm)}`}#u(e){return t=>{this.enableLogging&&e.call(console,t)}}}function m(){if("u"<typeof crypto||void 0===crypto.randomUUID)throw Error("Web Crypto API is not available.");return crypto.randomUUID()}async function h(e,t){if("S256"!==e)throw TypeError(`Invalid value for 'pkceMethod', expected 'S256' but got '${e}'.`);return btoa(String.fromCodePoint(...new Uint8Array(await y(t)))).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}let k="kc-callback-";class p{constructor(){globalThis.localStorage.setItem("kc-test","test"),globalThis.localStorage.removeItem("kc-test")}get(e){if(!e)return null;this.#_();let t=k+e,i=globalThis.localStorage.getItem(t);return i?(globalThis.localStorage.removeItem(t),JSON.parse(i)):null}add(e){this.#_();let t=k+e.state,i=JSON.stringify({...e,expires:Date.now()+36e5});try{globalThis.localStorage.setItem(t,i)}catch(e){this.#O(),globalThis.localStorage.setItem(t,i)}}#_(){let e=Date.now();for(let[t,i]of this.#L()){let n=this.#x(i);(null===n||n<e)&&globalThis.localStorage.removeItem(t)}}#O(){for(let[e]of this.#L())globalThis.localStorage.removeItem(e)}#L(){return Object.entries(globalThis.localStorage).filter(([e])=>e.startsWith(k))}#x(e){let t;try{t=JSON.parse(e)}catch(e){return null}return v(t)&&"expires"in t&&"number"==typeof t.expires?t.expires:null}}class f{get(e){if(!e)return null;let t=this.#q(k+e);return(this.#M(k+e,"",this.#$(-100)),t)?JSON.parse(t):null}add(e){this.#M(k+e.state,JSON.stringify(e),this.#$(60))}#q(e){let t=e+"=",i=document.cookie.split(";");for(let e=0;e<i.length;e++){let n=i[e];for(;" "===n.charAt(0);)n=n.substring(1);if(0===n.indexOf(t))return n.substring(t.length,n.length)}return""}#M(e,t,i){let n=e+"="+t+"; expires="+i.toUTCString()+"; ";document.cookie=n}#$(e){let t=new Date;return t.setTime(t.getTime()+60*e*1e3),t}}async function y(e){let t=new TextEncoder().encode(e);if("u"<typeof crypto||void 0===crypto.subtle)throw Error("Web Crypto API is not available.");return await crypto.subtle.digest("SHA-256",t)}function g(e){let t,[,i]=e.split(".");if("string"!=typeof i)throw Error("Unable to decode token, payload not found.");try{t=function(e){let t=e.replaceAll("-","+").replaceAll("_","/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw Error("Input is not of the correct length.")}try{var i;return i=t,decodeURIComponent(atob(i).replace(/(.)/g,(e,t)=>{let i=t.charCodeAt(0).toString(16).toUpperCase();return i.length<2&&(i="0"+i),"%"+i}))}catch(e){return atob(t)}}(i)}catch(e){throw Error("Unable to decode token, payload is not a valid Base64URL value.",{cause:e})}try{return JSON.parse(t)}catch(e){throw Error("Unable to decode token, payload is not a valid JSON value.",{cause:e})}}function v(e){return"object"==typeof e&&null!==e}async function b(e){return await F(e)}async function w(e){return await F(e)}async function N(e,t,i,n,a){let r=new URLSearchParams([["code",t],["grant_type","authorization_code"],["client_id",i],["redirect_uri",n]]);return a&&r.append("code_verifier",a),await F(e,{method:"POST",credentials:"include",body:r})}async function T(e,t,i){let n=new URLSearchParams([["grant_type","refresh_token"],["refresh_token",t],["client_id",i]]);return await F(e,{method:"POST",credentials:"include",body:n})}async function F(e,t={}){let i=new Headers(t.headers);i.set("Accept","application/json");let n=await S(e,{...t,headers:i});return await n.json()}async function S(e,t){let i=await fetch(e,t);
2if(!i.ok)throw new A("Server responded with an invalid status.",{response:i});return i}function I(e){if(!e)throw Error("Unable to build authorization header, token is not set, make sure the user is authenticated.");return["Authorization",`bearer ${e}`]}function C(e){return e.endsWith("/")?e.slice(0,-1):e}class A extends Error{response;constructor(e,t){super(e,t),this.response=t.response}}let U=e=>new Promise(t=>setTimeout(t,e));class E extends Error{response;request;options;constructor(e,t,i){const n=e.status||0===e.status?e.status:"",a=e.statusText??"",r=`${n} ${a}`.trim(),o=r?`status code ${r}`:"an unknown error";super(`Request failed with ${o}: ${t.method} ${t.url}`),this.name="HTTPError",this.response=e,this.request=t,this.options=i}}class R extends Error{name="NonError";value;constructor(e){let t="Non-error value was thrown";try{"string"==typeof e?t=e:e&&"object"==typeof e&&"message"in e&&"string"==typeof e.message&&(t=e.message)}catch{}super(t),this.value=e}}class D extends Error{name="ForceRetryError";customDelay;code;customRequest;constructor(e){const t=e?.cause?e.cause instanceof Error?e.cause:new R(e.cause):void 0;super(e?.code?`Forced retry: ${e.code}`:"Forced retry",t?{cause:t}:void 0),this.customDelay=e?.delay,this.code=e?.code,this.customRequest=e?.request}}let P=(()=>{let e=!1,t=!1,i="function"==typeof globalThis.Request;if("function"==typeof globalThis.ReadableStream&&i)try{t=new globalThis.Request("https://empty.invalid",{body:new globalThis.ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type")}catch(e){if(e instanceof Error&&"unsupported BodyInit type"===e.message)return!1;throw e}return e&&!t})(),_="function"==typeof globalThis.AbortController,O="function"==typeof globalThis.AbortSignal&&"function"==typeof globalThis.AbortSignal.any,L="function"==typeof globalThis.ReadableStream,x="function"==typeof globalThis.FormData,q=["get","post","put","patch","head","delete"],M={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*",bytes:"*/*"},$=new TextEncoder().encode("------WebKitFormBoundaryaxpyiPgbbPti10Rw").length,j=Symbol("stop");class V{options;constructor(e){this.options=e}}let K=e=>new V(e),z={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,prefixUrl:!0,retry:!0,timeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,onUploadProgress:!0,fetch:!0,context:!0},W={next:!0},Q={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,duplex:!0},B=(e,t,i)=>{let n,a=0;return e.pipeThrough(new TransformStream({transform(e,r){if(r.enqueue(e),n){a+=n.byteLength;let e=0===t?0:a/t;e>=1&&(e=1-Number.EPSILON),i?.({percent:e,totalBytes:Math.max(t,a),transferredBytes:a},n)}n=e},flush(){n&&(a+=n.byteLength,i?.({percent:1,totalBytes:Math.max(t,a),transferredBytes:a},n))}}))},G=e=>null!==e&&"object"==typeof e,H=(...e)=>{for(let t of e)if((!G(t)||Array.isArray(t))&&void 0!==t)throw TypeError("The `options` argument must be an object");return ee({},...e)},Y=(e={},t={})=>{let i=new globalThis.Headers(e),n=t instanceof globalThis.Headers;for(let[e,a]of new globalThis.Headers(t).entries())n&&"undefined"===a||void 0===a?i.delete(e):i.set(e,a);return i};function J(e,t,i){return Object.hasOwn(t,i)&&void 0===t[i]?[]:ee(e[i]??[],t[i]??[])}let Z=(e={},t={})=>({beforeRequest:J(e,t,"beforeRequest"),beforeRetry:J(e,t,"beforeRetry"),afterResponse:J(e,t,"afterResponse"),beforeError:J(e,t,"beforeError")}),X=(e,t)=>{let i=new URLSearchParams;for(let n of[e,t])if(void 0!==n)if(n instanceof URLSearchParams)for(let[e,t]of n.entries())i.append(e,t);else if(Array.isArray(n))for(let e of n){if(!Array.isArray(e)||2!==e.length)throw TypeError("Array search parameters must be provided in [[key, value], ...] format");i.append(String(e[0]),String(e[1]))}else if(G(n))for(let[e,t]of Object.entries(n))void 0!==t&&i.append(e,String(t));else for(let[e,t]of new URLSearchParams(n).entries())i.append(e,t);return i},ee=(...e)=>{let t,i={},n={},a={},r=[];for(let o of e)if(Array.isArray(o))Array.isArray(i)||(i=[]),i=[...i,...o];else if(G(o)){for(let[e,n]of Object.entries(o)){if("signal"===e&&n instanceof globalThis.AbortSignal){r.pu
2sh(n);continue}if("context"===e){if(null!=n&&(!G(n)||Array.isArray(n)))throw TypeError("The `context` option must be an object");i={...i,context:null==n?{}:{...i.context,...n}};continue}if("searchParams"===e){t=null==n?void 0:void 0===t?n:X(t,n);continue}G(n)&&e in i&&(n=ee(i[e],n)),i={...i,[e]:n}}G(o.hooks)&&(a=Z(a,o.hooks),i.hooks=a),G(o.headers)&&(n=Y(n,o.headers),i.headers=n)}return void 0!==t&&(i.searchParams=t),r.length>0&&(1===r.length?i.signal=r[0]:O?i.signal=AbortSignal.any(r):i.signal=r.at(-1)),i},et={limit:2,methods:["get","put","head","delete","options","trace"],statusCodes:[408,413,429,500,502,503,504],afterStatusCodes:[413,429,503],maxRetryAfter:1/0,backoffLimit:1/0,delay:e=>.3*2**(e-1)*1e3,jitter:void 0,retryOnTimeout:!1};class ei extends Error{request;constructor(e){super(`Request timed out: ${e.method} ${e.url}`),this.name="TimeoutError",this.request=e}}async function en(e,t,i,n){return new Promise((a,r)=>{let o=setTimeout(()=>{i&&i.abort(),r(new ei(e))},n.timeout);n.fetch(e,t).then(a).catch(r).then(()=>{clearTimeout(o)})})}async function ea(e,{signal:t}){return new Promise((i,n)=>{function a(){clearTimeout(r),n(t.reason)}t&&(t.throwIfAborted(),t.addEventListener("abort",a,{once:!0}));let r=setTimeout(()=>{t?.removeEventListener("abort",a),i()},e)})}class er{static create(e,t){let i=new er(e,t),n=async()=>{if("number"==typeof i.#j.timeout&&i.#j.timeout>0x7fffffff)throw RangeError("The `timeout` option cannot be greater than 2147483647");await Promise.resolve();let e=await i.#V();for(let t of i.#j.hooks.afterResponse){let n,a=i.#K(e.clone());try{n=await t(i.request,i.#z(),a,{retryCount:i.#W})}catch(t){throw i.#Q(a),i.#Q(e),t}if(n instanceof V)throw i.#Q(a),i.#Q(e),new D(n.options);let r=n instanceof globalThis.Response?n:e;a!==r&&i.#Q(a),e!==r&&i.#Q(e),e=r}if(i.#K(e),!e.ok&&("function"==typeof i.#j.throwHttpErrors?i.#j.throwHttpErrors(e.status):i.#j.throwHttpErrors)){let t=new E(e,i.request,i.#z());for(let e of i.#j.hooks.beforeError)t=await e(t,{retryCount:i.#W});throw t}if(i.#j.onDownloadProgress){if("function"!=typeof i.#j.onDownloadProgress)throw TypeError("The `onDownloadProgress` option must be a function");if(!L)throw Error("Streams are not supported in your environment. `ReadableStream` is missing.");let n=e.clone();i.#Q(e);var t=i.#j.onDownloadProgress;if(!n.body)return n;if(204===n.status)return new Response(null,{status:n.status,statusText:n.statusText,headers:n.headers});let a=Math.max(0,Number(n.headers.get("content-length"))||0);return new Response(B(n.body,a,t),{status:n.status,statusText:n.statusText,headers:n.headers})}return e},a=i.#B(n).finally(()=>{let e=i.#G;i.#H(e?.body??void 0),i.#H(i.request.body??void 0)});for(let[e,n]of Object.entries(M))("bytes"!==e||"function"==typeof globalThis.Response?.prototype?.bytes)&&(a[e]=async()=>{i.request.headers.set("accept",i.request.headers.get("accept")||n);let r=await a;if("json"===e){if(204===r.status)return"";let e=await r.text();return""===e?"":t.parseJson?t.parseJson(e):JSON.parse(e)}return r[e]()});return a}static #Y(e){return!e||"object"!=typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.fromEntries(Object.entries(e).filter(([,e])=>void 0!==e))}request;#J;#W=0;#Z;#j;#G;#X;#ee;constructor(e,t={}){if(this.#Z=e,this.#j={...t,headers:Y(this.#Z.headers,t.headers),hooks:Z({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},t.hooks),method:(e=>q.includes(e)?e.toUpperCase():e)(t.method??this.#Z.method??"GET"),prefixUrl:String(t.prefixUrl||""),retry:((e={})=>{if("number"==typeof e)return{...et,limit:e};if(e.methods&&!Array.isArray(e.methods))throw Error("retry.methods must be an array");if(e.methods&&=e.methods.map(e=>e.toLowerCase()),e.statusCodes&&!Array.isArray(e.statusCodes))throw Error("retry.statusCodes must be an array");let t=Object.fromEntries(Object.entries(e).filter(([,e])=>void 0!==e));return{...et,...t}})(t.retry),throwHttpErrors:t.throwHttpErrors??!0,timeout:t.timeout??1e4,fetch:t.fetch??globalThis.fetch.bind(globalThis),context:t.context??{}},"string"!=typeof this.#Z&&!(this.#Z instanceof URL||this.#Z instanceof globalThis.Request))throw TypeError("`input` must be a string, URL, or Request");
2if(this.#j.prefixUrl&&"string"==typeof this.#Z){if(this.#Z.startsWith("/"))throw Error("`input` must not begin with a slash when using `prefixUrl`");this.#j.prefixUrl.endsWith("/")||(this.#j.prefixUrl+="/"),this.#Z=this.#j.prefixUrl+this.#Z}_&&O&&(this.#X=this.#j.signal??this.#Z.signal,this.#J=new globalThis.AbortController,this.#j.signal=this.#X?AbortSignal.any([this.#X,this.#J.signal]):this.#J.signal),P&&(this.#j.duplex="half"),void 0!==this.#j.json&&(this.#j.body=this.#j.stringifyJson?.(this.#j.json)??JSON.stringify(this.#j.json),this.#j.headers.set("content-type",this.#j.headers.get("content-type")??"application/json"));const i=t.headers&&new globalThis.Headers(t.headers).has("content-type");if(this.#Z instanceof globalThis.Request&&(x&&this.#j.body instanceof globalThis.FormData||this.#j.body instanceof URLSearchParams)&&!i&&this.#j.headers.delete("content-type"),this.request=new globalThis.Request(this.#Z,this.#j),(e=>void 0!==e&&(Array.isArray(e)?e.length>0:e instanceof URLSearchParams?e.size>0:"object"==typeof e?Object.keys(e).length>0:"string"==typeof e?e.trim().length>0:!!e))(this.#j.searchParams)){const e="string"==typeof this.#j.searchParams?this.#j.searchParams.replace(/^\?/,""):new URLSearchParams(er.#Y(this.#j.searchParams)).toString(),t=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,"?"+e);this.request=new globalThis.Request(t,this.#j)}if(this.#j.onUploadProgress){if("function"!=typeof this.#j.onUploadProgress)throw TypeError("The `onUploadProgress` option must be a function");if(!P)throw Error("Request streams are not supported in your environment. The `duplex` option for `Request` is not available.");this.request=this.#et(this.request,this.#j.body??void 0)}}#ei(){let e=this.#j.retry.delay(this.#W),t=e;return!0===this.#j.retry.jitter?t=Math.random()*e:"function"==typeof this.#j.retry.jitter&&(!Number.isFinite(t=this.#j.retry.jitter(e))||t<0)&&(t=e),Math.min(this.#j.retry.backoffLimit??1/0,t)}async #en(e){if(this.#W++,this.#W>this.#j.retry.limit)throw e;let t=e instanceof Error?e:new R(e);if(t instanceof D)return t.customDelay??this.#ei();if(!this.#j.retry.methods.includes(this.request.method.toLowerCase()))throw e;if(void 0!==this.#j.retry.shouldRetry){let i=await this.#j.retry.shouldRetry({error:t,retryCount:this.#W});if(!1===i)throw e;if(!0===i)return this.#ei()}if((e instanceof ei||e?.name===ei.name)&&!this.#j.retry.retryOnTimeout)throw e;if(e instanceof E||e?.name===E.name){if(!this.#j.retry.statusCodes.includes(e.response.status))throw e;let t=e.response.headers.get("Retry-After")??e.response.headers.get("RateLimit-Reset")??e.response.headers.get("X-RateLimit-Retry-After")??e.response.headers.get("X-RateLimit-Reset")??e.response.headers.get("X-Rate-Limit-Reset");if(t&&this.#j.retry.afterStatusCodes.includes(e.response.status)){let e=1e3*Number(t);Number.isNaN(e)?e=Date.parse(t)-Date.now():e>=Date.parse("2024-01-01")&&(e-=Date.now());let i=this.#j.retry.maxRetryAfter??e;return e<i?e:i}if(413===e.response.status)throw e}return this.#ei()}#K(e){return this.#j.parseJson&&(e.json=async()=>this.#j.parseJson(await e.text())),e}#H(e){e&&e.cancel().catch(()=>void 0)}#Q(e){this.#H(e.body??void 0)}async #B(e){try{return await e()}catch(i){let t=Math.min(await this.#en(i),0x7fffffff);if(this.#W<1)throw i;if(await ea(t,this.#X?{signal:this.#X}:{}),i instanceof D&&i.customRequest){let e=this.#j.signal?new globalThis.Request(i.customRequest,{signal:this.#j.signal}):new globalThis.Request(i.customRequest);this.#ea(e)}for(let e of this.#j.hooks.beforeRetry){let t=await e({request:this.request,options:this.#z(),error:i,retryCount:this.#W});if(t instanceof globalThis.Request){this.#ea(t);break}if(t instanceof globalThis.Response)return t;if(t===j)return}return this.#B(e)}}async #V(){for(let e of(this.#J?.signal.aborted&&(this.#J=new globalThis.AbortController,this.#j.signal=this.#X?AbortSignal.any([this.#X,this.#J.signal]):this.#J.signal,this.request=new globalThis.Request(this.request,{signal:this.#j.signal})),this.#j.hooks.beforeRequest)){let t=await e(this.request,this.#z(),{retryCount:this.#W});if(t instanceof Response)return t;if(t instanceof globalThis.Request){this.#ea(t);break}}let e=((e,t)=>{let i={};for(let n in t)Object.hasOwn(t,n)&&(n in Q||n in z||n in e&&!(n in W)||(i[n]=t[n]));return i})(this.request,this.#j);return(this.#G=this.request,this.request=this.#G.clone(),!1===this.#j.timeout)?this.#j.fetch(this.#G,e):en(this.#G,e,this.#J,this.#j)}
2#z(){if(!this.#ee){let{hooks:e,...t}=this.#j;this.#ee=Object.freeze(t)}return this.#ee}#ea(e){this.#ee=void 0,this.request=this.#et(e)}#et(e,t){return this.#j.onUploadProgress&&e.body?((e,t,i)=>{if(!e.body)return e;let n=(e=>{if(!e)return 0;if(e instanceof FormData){let t=0;for(let[i,n]of e)t+=$,t+=new TextEncoder().encode(`Content-Disposition: form-data; name="${i}"`).length,t+="string"==typeof n?new TextEncoder().encode(n).length:n.size;return t}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength;if("string"==typeof e)return new TextEncoder().encode(e).length;if(e instanceof URLSearchParams)return new TextEncoder().encode(e.toString()).length;if("byteLength"in e)return e.byteLength;if("object"==typeof e&&null!==e)try{let t=JSON.stringify(e);return new TextEncoder().encode(t).length}catch{}return 0})(i??e.body);return new Request(e,{duplex:"half",body:B(e.body,n,t)})})(e,this.#j.onUploadProgress,t??this.#j.body??void 0):e}}let eo=e=>{let t=(t,i)=>er.create(t,H(e,i));for(let i of q)t[i]=(t,n)=>er.create(t,H(e,n,{method:i}));return t.create=e=>eo(H(e)),t.extend=t=>("function"==typeof t&&(t=t(e??{})),eo(H(e,t))),t.stop=j,t.retry=K,t},es=eo();var el=e.i(399065),ed=e.i(680015),eu=e.i(278660),ec=e.i(70752),em=class extends ec.Subscribable{constructor(e={}){super(),this.config=e,this.#er=new Map}#er;build(e,t,i){let n=t.queryKey,a=t.queryHash??(0,el.hashQueryKeyByOptions)(n,t),r=this.get(a);return r||(r=new ed.Query({client:e,queryKey:n,queryHash:a,options:e.defaultQueryOptions(t),state:i,defaultOptions:e.getQueryDefaults(n)}),this.add(r)),r}add(e){this.#er.has(e.queryHash)||(this.#er.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){let t=this.#er.get(e.queryHash);t&&(e.destroy(),t===e&&this.#er.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){eu.notifyManager.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#er.get(e)}getAll(){return[...this.#er.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>(0,el.matchQuery)(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>(0,el.matchQuery)(e,t)):t}notify(e){eu.notifyManager.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){eu.notifyManager.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){eu.notifyManager.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},eh=e.i(308464),ek=ec,ep=class extends ek.Subscribable{constructor(e={}){super(),this.config=e,this.#eo=new Set,this.#es=new Map,this.#el=0}#eo;#es;#el;build(e,t,i){let n=new eh.Mutation({client:e,mutationCache:this,mutationId:++this.#el,options:e.defaultMutationOptions(t),state:i});return this.add(n),n}add(e){this.#eo.add(e);let t=ef(e);if("string"==typeof t){let i=this.#es.get(t);i?i.push(e):this.#es.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#eo.delete(e)){let t=ef(e);if("string"==typeof t){let i=this.#es.get(t);if(i)if(i.length>1){let t=i.indexOf(e);-1!==t&&i.splice(t,1)}else i[0]===e&&this.#es.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){let t=ef(e);if("string"!=typeof t)return!0;{let i=this.#es.get(t),n=i?.find(e=>"pending"===e.state.status);return!n||n===e}}runNext(e){let t=ef(e);if("string"!=typeof t)return Promise.resolve();{let i=this.#es.get(t)?.find(t=>
2t!==e&&t.state.isPaused);return i?.continue()??Promise.resolve()}}clear(){eu.notifyManager.batch(()=>{this.#eo.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#eo.clear(),this.#es.clear()})}getAll(){return Array.from(this.#eo)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>(0,el.matchMutation)(t,e))}findAll(e={}){return this.getAll().filter(t=>(0,el.matchMutation)(e,t))}notify(e){eu.notifyManager.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return eu.notifyManager.batch(()=>Promise.all(e.map(e=>e.continue().catch(el.noop))))}};function ef(e){return e.options.scope?.id}var ey=e.i(700079),eg=e.i(101198),ev=class{#ed;#i;#eu;#ec;#em;#eh;#ek;#ep;constructor(e={}){this.#ed=e.queryCache||new em,this.#i=e.mutationCache||new ep,this.#eu=e.defaultOptions||{},this.#ec=new Map,this.#em=new Map,this.#eh=0}mount(){this.#eh++,1===this.#eh&&(this.#ek=ey.focusManager.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#ed.onFocus())}),this.#ep=eg.onlineManager.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#ed.onOnline())}))}unmount(){this.#eh--,0===this.#eh&&(this.#ek?.(),this.#ek=void 0,this.#ep?.(),this.#ep=void 0)}isFetching(e){return this.#ed.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#i.findAll({...e,status:"pending"}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#ed.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),i=this.#ed.build(this,t),n=i.state.data;return void 0===n?this.fetchQuery(e):(e.revalidateIfStale&&i.isStaleByTime((0,el.resolveStaleTime)(t.staleTime,i))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return this.#ed.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,i){let n=this.defaultQueryOptions({queryKey:e}),a=this.#ed.get(n.queryHash),r=a?.state.data,o=(0,el.functionalUpdate)(t,r);if(void 0!==o)return this.#ed.build(this,n).setData(o,{...i,manual:!0})}setQueriesData(e,t,i){return eu.notifyManager.batch(()=>this.#ed.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,i)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#ed.get(t.queryHash)?.state}removeQueries(e){let t=this.#ed;eu.notifyManager.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let i=this.#ed;return eu.notifyManager.batch(()=>(i.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){let i={revert:!0,...t};return Promise.all(eu.notifyManager.batch(()=>this.#ed.findAll(e).map(e=>e.cancel(i)))).then(el.noop).catch(el.noop)}invalidateQueries(e,t={}){return eu.notifyManager.batch(()=>(this.#ed.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType==="none")?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t))}refetchQueries(e,t={}){let i={...t,cancelRefetch:t.cancelRefetch??!0};return Promise.all(eu.notifyManager.batch(()=>this.#ed.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,i);return i.throwOnError||(t=t.catch(el.noop)),"paused"===e.state.fetchStatus?Promise.resolve():t}))).then(el.noop)}fetchQuery(e){let t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);let i=this.#ed.build(this,t);return i.isStaleByTime((0,el.resolveStaleTime)(t.staleTime,i))?i.fetch(t):Promise.resolve(i.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(el.noop).catch(el.noop)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(el.noop).catch(el.noop)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return eg.onlineManager.isOnline()?this.#i.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#ed}getMutationCache(){return this.#i}getDefaultOptions(){return this.#eu}setDefaultOptions(e){this.#eu=e}setQueryDefaults(e,t){this.#ec.set((0,el.hashKey)(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#ec.values()],i={};return t.forEach(t=>{(0,el.partialMatchKey)(e,t.queryKey)&&Object.assign(i,t.defaultOptions)}),i}setMutationDefaults(e,t){this.#em.set((0,el.hashKey)(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#em.values()],i={};return t.forEach(t=>{(0,el.partialMatchKey)(e,t.mutationKey)&&Object.assign(i,t.defaultOptions)}),i}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#eu.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=(0,el.hashQueryKeyByOptions)(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.throwOnError&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===el.skipToken&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#eu.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#ed.clear(),this.#i.clear()}};e.s(["QueryClient",0,ev],248943);var eb=e.i(126612),ew=e.i(160562),eN=e.i(925434),eT="u">typeof a.default&&!!a.default.env,eF=!!eT&&"https://znanierussia.ru"||"https://znanierussia.ru",eS=eT&&"https://api.znanierussia.ru"||"https://api.znanierussia.ru",eI=eT&&"https://api.znanierussia.ru/graphql"||"https://api.znanierussia.ru/graphql",eC="post_logout",eA="authorize_in_flight",eU=/^(?![\s'’-])(?!.*[\s'’-]$)(?!.*[А-ЯЁ]{2})(?!.*['’`\s-]{2})(?=(?:[^'’`]*['’`]){0,1}[^'’`]*$)(?=(?:[^\s]*\s){0,1}[^\s]*$)(?=(?:[^-]*-){0,3}[^-]*$)^[А-ЯЁ](?:(?:[а-яёА-ЯЁ]*|-[А-ЯЁ]?[а-яёА-ЯЁ]*|['’`\s][А-ЯЁ]?[а-яёА-ЯЁ]*)(?:\s|$)?)+$/,eE=/[ієїґ']+/i,eR=((t={}).Article="ARTICLE",t.Material="MATERIAL",t.Podcast="PODCAST",t.Video="VIDEO",t),eD=((i={}).A_0="A_0",i.A_1="A_1",i.A_2="A_2",i.A_3="A_3",i.A_4="A_4",i.A_5="A_5",i),eP={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"AddressFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"AddressType"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"area"}},{kind:"Field",name:{kind:"Name",value:"areaFiasId"}},{kind:"Field",name:{kind:"Name",value:"areaKladrId"}},{kind:"Field",name:{kind:"Name",value:"areaType"}},{kind:"Field",name:{kind:"Name",value:"areaTypeFull"}},{kind:"Field",name:{kind:"Name",value:"areaWithType"}},{kind:"Field",name:{kind:"Name",value:"block"}},{kind:"Field",name:{kind:"Name",value:"blockType"}},{kind:"Field",name:{kind:"Name",value:"blockTypeFull"}},{kind:"Field",name:{kind:"Name",value:"capitalMarker"}},{kind:"Field",name:{kind:"Name",value:"city"}},{kind:"Field",name:{kind:"Name",value:"cityArea"}},{kind:"Field",name:{kind:"Name",value:"cityDistrict"}},{kind:"Field",name:{kind:"Name",value:"cityDistrictFiasId"}},{kind:"Field",name:{kind:"Name",value:"cityDistrictKladrId"}},{kind:"Field",name:{kind:"Name",value:"cityDistrictType"}},{kind:"Field",name:{kind:"Name",value:"cityDistrictTypeFull"}},{kind:"Field",name:{kind:"Name",value:"cityDistrictWithType"}},{kind:"Field",name:{kind:"Name",value:"cityFiasId"}},{kind:"Field",name:{kind:"Name",value:"cityKladrId"}},{kind:"Field",name:{kind:"Name",value:"cityType"}},{kind:"Field",name:{kind:"Name",value:"cityTypeFull"}},{kind:"Field",name:{kind:"Name",value:"cityWithType"}},{kind:"Field",name:{kind:"Name",value:"country"}},{kind:"Field",name:{kind:"Name",value:"countryIsoCode"}},{kind:"Field",name:{kind:"Name",value:"entrance"}},{kind:"Field",name:{kind:"Name",value:"federalDistrict"}},{kind:"Field",name:{kind:"Name",value:"fiasCode"}},{kind:"Field",name:{kind:"Name",value:"fiasId"}},{kind:"Field",name:{kind:"Name",value:"fiasLevel"}},{kind:"Field",name:{kind:"Name",value:"flat"}},{kind:"Field",name:{kind:"Name",value:"flatArea"}},{kind:"Field",name:{kind:"Name",value:"flatCadnum"}}
2,{kind:"Field",name:{kind:"Name",value:"flatFiasId"}},{kind:"Field",name:{kind:"Name",value:"flatType"}},{kind:"Field",name:{kind:"Name",value:"flatTypeFull"}},{kind:"Field",name:{kind:"Name",value:"floor"}},{kind:"Field",name:{kind:"Name",value:"geoLat"}},{kind:"Field",name:{kind:"Name",value:"geoLon"}},{kind:"Field",name:{kind:"Name",value:"geonameId"}},{kind:"Field",name:{kind:"Name",value:"historyValues"}},{kind:"Field",name:{kind:"Name",value:"house"}},{kind:"Field",name:{kind:"Name",value:"houseCadnum"}},{kind:"Field",name:{kind:"Name",value:"houseFiasId"}},{kind:"Field",name:{kind:"Name",value:"houseKladrId"}},{kind:"Field",name:{kind:"Name",value:"houseType"}},{kind:"Field",name:{kind:"Name",value:"houseTypeFull"}},{kind:"Field",name:{kind:"Name",value:"kladrId"}},{kind:"Field",name:{kind:"Name",value:"postalBox"}},{kind:"Field",name:{kind:"Name",value:"postalCode"}},{kind:"Field",name:{kind:"Name",value:"region"}},{kind:"Field",name:{kind:"Name",value:"regionFiasId"}},{kind:"Field",name:{kind:"Name",value:"regionIsoCode"}},{kind:"Field",name:{kind:"Name",value:"regionKladrId"}},{kind:"Field",name:{kind:"Name",value:"regionType"}},{kind:"Field",name:{kind:"Name",value:"regionTypeFull"}},{kind:"Field",name:{kind:"Name",value:"regionWithType"}},{kind:"Field",name:{kind:"Name",value:"settlement"}},{kind:"Field",name:{kind:"Name",value:"settlementFiasId"}},{kind:"Field",name:{kind:"Name",value:"settlementKladrId"}},{kind:"Field",name:{kind:"Name",value:"settlementType"}},{kind:"Field",name:{kind:"Name",value:"settlementTypeFull"}},{kind:"Field",name:{kind:"Name",value:"settlementWithType"}},{kind:"Field",name:{kind:"Name",value:"street"}},{kind:"Field",name:{kind:"Name",value:"streetFiasId"}},{kind:"Field",name:{kind:"Name",value:"streetKladrId"}},{kind:"Field",name:{kind:"Name",value:"streetType"}},{kind:"Field",name:{kind:"Name",value:"streetTypeFull"}},{kind:"Field",name:{kind:"Name",value:"streetWithType"}},{kind:"Field",name:{kind:"Name",value:"timezone"}},{kind:"Field",name:{kind:"Name",value:"unparsedParts"}},{kind:"Field",name:{kind:"Name",value:"value"}}]}}]},e_={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CheckEmailCode"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"email"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"code"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"emailCodeCheck"},arguments:[{kind:"Argument",name:{kind:"Name",value:"email"},value:{kind:"Variable",name:{kind:"Name",value:"email"}}},{kind:"Argument",name:{kind:"Name",value:"code"},value:{kind:"Variable",name:{kind:"Name",value:"code"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"success"}}]}}]}}]},eO={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"Login"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"username"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"token"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"tokenAuth"},arguments:[{kind:"Argument",name:{kind:"Name",value:"username"},value:{kind:"Variable",name:{kind:"Name",value:"username"}}},{kind:"Argument",name:{kind:"Name",value:"password"},value:{kind:"Variable",name:{kind:"Name",value:"token"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"payload"}},{kind:"Field",name:{kind:"Name",value:"token"}}]}}]}}]},eL={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"Logout"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteTokenCookie"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleted"}}]}},{kind:"Field",name:{kind:"Name",value:"deleteRefreshTokenCookie"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleted"}}]}}]}}]},ex={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"Registration"}
2,variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"user"}},type:{kind:"NamedType",name:{kind:"Name",value:"UserInput"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"registerUser"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"user"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"user"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}}]}}]},eq={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"SendAuthEmail"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"username"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"refererUrl"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}
2,{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"ymClientId"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sendEmailCode"},arguments:[{kind:"Argument",name:{kind:"Name",value:"email"},value:{kind:"Variable",name:{kind:"Name",value:"username"}}},{kind:"Argument",name:{kind:"Name",value:"refererUrl"},value:{kind:"Variable",name:{kind:"Name",value:"refererUrl"}}},{kind:"Argument",name:{kind:"Name",value:"ymClientId"},value:{kind:"Variable",name:{kind:"Name",value:"ymClientId"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"success"}},{kind:"Field",name:{kind:"Name",value:"userExists"}}]}}]}}]},eM={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"SmsAuthWithToken"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"phone"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"token"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"uuid"}},type:{kind:"NamedType",name:{kind:"Name",value:"UUID"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createSmsAuthorizeWithToken"},arguments:[{kind:"Argument",name:{kind:"Name",value:"phone"},value:{kind:"Variable",name:{kind:"Name",value:"phone"}}},{kind:"Argument",name:{kind:"Name",value:"token"},value:{kind:"Variable",name:{kind:"Name",value:"token"}}},{kind:"Argument",name:{kind:"Name",value:"uuid"},value:{kind:"Variable",name:{kind:"Name",value:"uuid"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"userExists"}}]}}]}}]},e$={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"TokenAuthVk"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"code"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"codeVerifier"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"deviceId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"tokenAuthVkId"},arguments:[{kind:"Argument",name:{kind:"Name",value:"code"},value:{kind:"Variable",name:{kind:"Name",value:"code"}}},{kind:"Argument",name:{kind:"Name",value:"codeVerifier"},value:{kind:"Variable",name:{kind:"Name",value:"codeVerifier"}}},{kind:"Argument",name:{kind:"Name",value:"deviceId"},value:{kind:"Variable",name:{kind:"Name",value:"deviceId"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"payload"}},{kind:"Field",name:{kind:"Name",value:"refreshExpiresIn"}},{kind:"Field",name:{kind:"Name",value:"token"}},{kind:"Field",name:{kind:"Name",value:"refreshToken"}}]}}]}}]},ej={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetAddress"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"term"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}
2,{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"from"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"to"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"all_world"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"suggestAddress"},arguments:[{kind:"Argument",name:{kind:"Name",value:"query"},value:{kind:"Variable",name:{kind:"Name",value:"term"}}},{kind:"Argument",name:{kind:"Name",value:"fromBound"},value:{kind:"Variable",name:{kind:"Name",value:"from"}}},{kind:"Argument",name:{kind:"Name",value:"toBound"},value:{kind:"Variable",name:{kind:"Name",value:"to"}}},{kind:"Argument",name:{kind:"Name",value:"allWorld"},value:{kind:"Variable",name:{kind:"Name",value:"all_world"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"AddressFields"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AddressFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"AddressType"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"area"}},{kind:"Field",name:{kind:"Name",value:"areaFiasId"}},{kind:"Field",name:{kind:"Name",value:"areaKladrId"}},{kind:"Field",name:{kind:"Name",value:"areaType"}},{kind:"Field",name:{kind:"Name",value:"areaTypeFull"}},{kind:"Field",name:{kind:"Name",value:"areaWithType"}},{kind:"Field",name:{kind:"Name",value:"block"}},{kind:"Field",name:{kind:"Name",value:"blockType"}},{kind:"Field",name:{kind:"Name",value:"blockTypeFull"}},{kind:"Field",name:{kind:"Name",value:"capitalMarker"}},{kind:"Field",name:{kind:"Name",value:"city"}},{kind:"Field",name:{kind:"Name",value:"cityArea"}},{kind:"Field",name:{kind:"Name",value:"cityDistrict"}},{kind:"Field",name:{kind:"Name",value:"cityDistrictFiasId"}},{kind:"Field",name:{kind:"Name",value:"cityDistrictKladrId"}},{kind:"Field",name:{kind:"Name",value:"cityDistrictType"}},{kind:"Field",name:{kind:"Name",value:"cityDistrictTypeFull"}},{kind:"Field",name:{kind:"Name",value:"cityDistrictWithType"}},{kind:"Field",name:{kind:"Name",value:"cityFiasId"}},{kind:"Field",name:{kind:"Name",value:"cityKladrId"}},{kind:"Field",name:{kind:"Name",value:"cityType"}},{kind:"Field",name:{kind:"Name",value:"cityTypeFull"}},{kind:"Field",name:{kind:"Name",value:"cityWithType"}},{kind:"Field",name:{kind:"Name",value:"country"}},{kind:"Field",name:{kind:"Name",value:"countryIsoCode"}},{kind:"Field",name:{kind:"Name",value:"entrance"}},{kind:"Field",name:{kind:"Name",value:"federalDistrict"}},{kind:"Field",name:{kind:"Name",value:"fiasCode"}},{kind:"Field",name:{kind:"Name",value:"fiasId"}},{kind:"Field",name:{kind:"Name",value:"fiasLevel"}},{kind:"Field",name:{kind:"Name",value:"flat"}},{kind:"Field",name:{kind:"Name",value:"flatArea"}},{kind:"Field",name:{kind:"Name",value:"flatCadnum"}},{kind:"Field",name:{kind:"Name",value:"flatFiasId"}},{kind:"Field",name:{kind:"Name",value:"flatType"}},{kind:"Field",name:{kind:"Name",value:"flatTypeFull"}},{kind:"Field",name:{kind:"Name",value:"floor"}},{kind:"Field",name:{kind:"Name",value:"geoLat"}},{kind:"Field",name:{kind:"Name",value:"geoLon"}},{kind:"Field",name:{kind:"Name",value:"geonameId"}},{kind:"Field",name:{kind:"Name",value:"historyValues"}},{kind:"Field",name:{kind:"Name",value:"house"}},{kind:"Field",name:{kind:"Name",value:"houseCadnum"}},{kind:"Field",name:{kind:"Name",value:"houseFiasId"}},{kind:"Field",name:{kind:"Name",value:"houseKladrId"}},{kind:"Field",name:{kind:"Name",value:"houseType"}},{kind:"Field",name:{kind:"Name",value:"houseTypeFull"}},{kind:"Field",name:{kind:"Name",value:"kladrId"}},{kind:"Field",name:{kind:"Name",value:"postalBox"}},{kind:"Field",name:{kind:"Name",value:"postalCode"}},{kind:"Field",name:{kind:"Name",value:"region"}},{kind:"Field",name:{kind:"Name",value:"regionFiasId"}},{kind:"Field",name:{kind:"Name",value:"regionIsoCode"}},{kind:"Field",name:{kind:"Name",value:"regionKladrId"}},{kind:"Field",name:{kind:"Name",value:"regionType"}},{kind:"Field",name:{kind:"Name",value:"regionTypeFull"}},{kind:"Field",name:{kind:"Name",value:"regionWithType"}},{kind:"Field",name:{kind:"Name",value:"settlement"}},{kind:"Field",name:{kind:"Name",value:"settlementFiasId"}},{kind:"Field",name:{kind:"Name",value:"settlementKladrId"}},{kind:"Field",name:{kind:"Name",value:"settlementType"}},{kind:"Field",name:{kind:"Name",value:"settlementTypeFull"}},{kind:"Field",name:{kind:"Name",value:"settlementWithType"}},{kind:"Field",name:{kind:"Name",value:"street"}},{kind:"Field",name:{kind:"Name",value:"streetFiasId"}},{kind:"Field",name:{kind:"Name",value:"streetKladrId"}},{kind:"Field",name:{kind:"Name",value:"streetType"}},{kind:"Field",name:{kind:"Name",value:"streetTypeFull"}},{kind:"Field",name:{kind:"Name",value:"streetWithType"}},{kind:"Field",name:{kind:"Name",value:"timezone"}},{kind:"Field",name:{kind:"Name",value:"unparsedParts"}},{kind:"Field",name:{kind:"Name",value:"value"}}]}}]},eV={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"specialProjects"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"specialProjects"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"slug"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"photo"}},{kind:"Field",name:{kind:"Name",value:"projectUrl"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"hasFormScheme"}}]}}]}}]},eK={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"SaveUserData"}
2,variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"user"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateUserInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateUser"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"user"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"user"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}}]}}]},ez={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateUserMetrica"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"refererUrl"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"ymClientId"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateYandexMetrica"},arguments:[{kind:"Argument",name:{kind:"Name",value:"refererUrl"},value:{kind:"Variable",name:{kind:"Name",value:"refererUrl"}}},{kind:"Argument",name:{kind:"Name",value:"ymClientId"},value:{kind:"Variable",name:{kind:"Name",value:"ymClientId"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"success"}}]}}]}}]},eW={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetUserGeolocation"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"userGeoLocationLog"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"country"}},{kind:"Field",name:{kind:"Name",value:"countryIsoCode"}},{kind:"Field",name:{kind:"Name",value:"region"}},{kind:"Field",name:{kind:"Name",value:"regionFiasId"}},{kind:"Field",name:{kind:"Name",value:"city"}},{kind:"Field",name:{kind:"Name",value:"cityFiasId"}}]}}]}}]},eQ={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetUser"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"me"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"uuid"}},{kind:"Field",name:{kind:"Name",value:"username"}},{kind:"Field",name:{kind:"Name",value:"nickname"}},{kind:"Field",name:{kind:"Name",value:"avatar"}},{kind:"Field",name:{kind:"Name",value:"avatarUrl"}},{kind:"Field",name:{kind:"Name",value:"vkAvatar"}},{kind:"Field",name:{kind:"Name",value:"vkAccount"}},{kind:"Field",name:{kind:"Name",value:"firstName"}},{kind:"Field",name:{kind:"Name",value:"lastName"}},{kind:"Field",name:{kind:"Name",value:"middleName"}},{kind:"Field",name:{kind:"Name",value:"email"}},{kind:"Field",name:{kind:"Name",value:"phone"}},{kind:"Field",name:{kind:"Name",value:"promotionalMailings"}},{kind:"Field",name:{kind:"Name",value:"birthDate"}},{kind:"Field",name:{kind:"Name",value:"agreement"}},{kind:"Field",name:{kind:"Name",value:"address"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"area"}},{kind:"Field",name:{kind:"Name",value:"areaFiasId"}},{kind:"Field",name:{kind:"Name",value:"areaKladrId"}},{kind:"Field",name:{kind:"Name",value:"areaType"}},{kind:"Field",name:{kind:"Name",value:"areaTypeFull"}},{kind:"Field",name:{kind:"Name",value:"areaWithType"}},{kind:"Field",name:{kind:"Name",value:"block"}},{kind:"Field",name:{kind:"Name",value:"blockType"}},{kind:"Field",name:{kind:"Name",value:"blockTypeFull"}},{kind:"Field",name:{kind:"Name",value:"capitalMarker"}},{kind:"Field",name:{kind:"Name",value:"city"}},{kind:"Field",name:{kind:"Name",value:"cityArea"}},{kind:"Field",name:{kind:"Name",value:"cityDistrict"}},{kind:"Field",name:{kind:"Name",value:"cityDistrictFiasId"}},{kind:"Field",name:{kind:"Name",value:"cityDistrictKladrId"}},{kind:"Field",name:{kind:"Name",value:"cityDistrictType"}},{kind:"Field",name:{kind:"Name",value:"cityDistrictTypeFull"}},{kind:"Field",name:{kind:"Name",value:"cityDistrictWithType"}},{kind:"Field",name:{kind:"Name",value:"cityFiasId"}},{kind:"Field",name:{kind:"Name",value:"cityKladrId"}},{kind:"Field",name:{kind:"Name",value:"cityType"}},{kind:"Field",name:{kind:"Name",value:"cityTypeFull"}},{kind:"Field",name:{kind:"Name",value:"cityWithType"}},{kind:"Field",name:{kind:"Name",value:"country"}},{kind:"Field",name:{kind:"Name",value:"countryIsoCode"}},{kind:"Field",name:{kind:"Name",value:"entrance"}},{kind:"Field",name:{kind:"Name",value:"federalDistrict"}},{kind:"Field",name:{kind:"Name",value:"fiasCode"}},{kind:"Field",name:{kind:"Name",value:"fiasId"}},{kind:"Field",name:{kind:"Name",value:"fiasLevel"}},{kind:"Field",name:{kind:"Name",value:"flat"}},{kind:"Field",name:{kind:"Name",value:"flatArea"}},{kind:"Field",name:{kind:"Name",value:"flatCadnum"}}
2,{kind:"Field",name:{kind:"Name",value:"flatFiasId"}},{kind:"Field",name:{kind:"Name",value:"flatType"}},{kind:"Field",name:{kind:"Name",value:"flatTypeFull"}},{kind:"Field",name:{kind:"Name",value:"floor"}},{kind:"Field",name:{kind:"Name",value:"geoLat"}},{kind:"Field",name:{kind:"Name",value:"geoLon"}},{kind:"Field",name:{kind:"Name",value:"geonameId"}},{kind:"Field",name:{kind:"Name",value:"historyValues"}},{kind:"Field",name:{kind:"Name",value:"house"}},{kind:"Field",name:{kind:"Name",value:"houseCadnum"}},{kind:"Field",name:{kind:"Name",value:"houseFiasId"}},{kind:"Field",name:{kind:"Name",value:"houseKladrId"}},{kind:"Field",name:{kind:"Name",value:"houseType"}},{kind:"Field",name:{kind:"Name",value:"houseTypeFull"}},{kind:"Field",name:{kind:"Name",value:"kladrId"}},{kind:"Field",name:{kind:"Name",value:"postalBox"}},{kind:"Field",name:{kind:"Name",value:"postalCode"}},{kind:"Field",name:{kind:"Name",value:"region"}},{kind:"Field",name:{kind:"Name",value:"regionFiasId"}},{kind:"Field",name:{kind:"Name",value:"regionIsoCode"}},{kind:"Field",name:{kind:"Name",value:"regionKladrId"}},{kind:"Field",name:{kind:"Name",value:"regionType"}},{kind:"Field",name:{kind:"Name",value:"regionTypeFull"}},{kind:"Field",name:{kind:"Name",value:"regionWithType"}},{kind:"Field",name:{kind:"Name",value:"settlement"}},{kind:"Field",name:{kind:"Name",value:"settlementFiasId"}},{kind:"Field",name:{kind:"Name",value:"settlementKladrId"}},{kind:"Field",name:{kind:"Name",value:"settlementType"}},{kind:"Field",name:{kind:"Name",value:"settlementTypeFull"}},{kind:"Field",name:{kind:"Name",value:"settlementWithType"}},{kind:"Field",name:{kind:"Name",value:"street"}},{kind:"Field",name:{kind:"Name",value:"streetFiasId"}},{kind:"Field",name:{kind:"Name",value:"streetKladrId"}},{kind:"Field",name:{kind:"Name",value:"streetType"}},{kind:"Field",name:{kind:"Name",value:"streetTypeFull"}},{kind:"Field",name:{kind:"Name",value:"streetWithType"}},{kind:"Field",name:{kind:"Name",value:"timezone"}},{kind:"Field",name:{kind:"Name",value:"unparsedParts"}},{kind:"Field",name:{kind:"Name",value:"value"}}]}},{kind:"Field",name:{kind:"Name",value:"speakerRequests"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"status"}}]}},{kind:"Field",name:{kind:"Name",value:"speakers"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"statusRequest"}}]}},{kind:"Field",name:{kind:"Name",value:"lead"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"projectLink"}}]}},{kind:"Field",name:{kind:"Name",value:"projects"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"slug"}}]}}]}}]}}]},eB=[eD.A_0,eD.A_1,eD.A_2,eD.A_3],eG=new c({url:eT&&"https://auth.znanierussia.ru"||"https://auth.znanierussia.ru",realm:eT&&"ROZ"||"ROZ",clientId:eT&&"roz-frontend"||"roz-frontend"}),eH=()=>{try{let e=sessionStorage.getItem(eA);if(!e)return!1;let t=Number(e);return!(!Number.isFinite(t)||Date.now()-t>15e3)||(sessionStorage.removeItem(eA),!1)}catch{return!1}},eY=()=>{try{sessionStorage.removeItem(eA)}catch{}},eJ=!1,eZ=()=>{let e=eG.tokenParsed?.exp,t=e?new Date(1e3*e):void 0;u.default.set("access_token",eG.token||"",t?{expires:t}:{})},eX=/[^A-Za-z0-9\-._~:/?#[\]@!$&'()*+,;=%]/,e0=["code","state","session_state","error","error_description","iss"],e1=async e=>{(()=>{let e,{href:t,origin:i,pathname:n}=window.location;try{let a=new URL(t);a.search=new URLSearchParams(a.search).toString(),e=eX.test(a.href)?i+n:a.href}catch{e=i+n}e!==t&&window.history.replaceState(window.history.state,"",e)})(),(()=>{if(eJ)return;eJ=!0;let e=eG.login;eG.login=t=>{if(eH())return Promise.resolve();try{sessionStorage.setItem(eA,String(Date.now()))}catch{}try{return e(t)}catch(e){throw eY(),e}}})(),eG.onReady=()=>{e.events.emit("keycloakReady")},eG.onAuthError=()=>{eY(),u.default.remove("access_token")},eG.onAuthRefreshSuccess=()=>{eG.token&&eZ()},eG.onAuthLogout=()=>{u.default.remove("access_token")},eG.onTokenExpired=()=>{u.default.remove("access_token")};try{let t=e.config?._usage==="external",i=await eG.init({checkLoginIframe:t,onLoad:"check-sso",responseMode:"query"});return i&&eG.token?eZ():u.default.remove("access_token"),i}catch{return u.default.remove("access_token"),eG.authenticated??!1}},e3=async()=>
2{if(!eG||!eG.authenticated)return null;try{await eG.updateToken(30)}catch{return null}return eG.token??null},e2=async(e=-1)=>await eG.updateToken(e),e4=e=>new d.GraphQLClient(e??eI,{credentials:"include",mode:"cors",requestMiddleware:async e=>{let t=await e3();if(!t)return e;let i=new Headers(e.headers);return i.set("Authorization",`Bearer ${t}`),{...e,headers:i}}}),e5=e4();function e6(e,t,i){return e5.request(e,t,i)}var e7={"\n	mutation CheckEmailCode($email: String!, $code: String!) {\n		emailCodeCheck(email: $email, code: $code) {\n    	success\n  	}\n	}\n":e_,"\n	mutation Login($username: String!, $token: String!) {\n		tokenAuth(username: $username, password: $token) {\n			payload\n			token\n		}\n	}	\n":eO,"\n    mutation Logout {\n        deleteTokenCookie {\n            deleted\n        }\n        deleteRefreshTokenCookie {\n            deleted\n        }\n    }\n":eL,"\n  mutation Registration($user: UserInput) {\n    registerUser(input: $user) {\n      user {\n        id\n      }\n    }\n  }\n":ex,"\n	mutation SendAuthEmail($username: String!, $refererUrl: String, $ymClientId: String) {\n		sendEmailCode(email: $username, refererUrl: $refererUrl, ymClientId: $ymClientId) {\n			success\n			userExists\n		}\n	}\n":eq,"\n	mutation SmsAuthWithToken(\n		$phone: String!\n		$token: String!\n		$uuid: UUID\n	) {\n  	createSmsAuthorizeWithToken(phone: $phone, token: $token, uuid: $uuid) {\n    	userExists\n  	}\n	}	\n":eM,"\n  mutation TokenAuthVk($code: String!, $codeVerifier: String!, $deviceId: String!) {\n    tokenAuthVkId(code: $code, codeVerifier: $codeVerifier, deviceId: $deviceId) {\n      payload\n      refreshExpiresIn\n      token\n      refreshToken\n    }\n  }\n":e$,"\n	fragment AddressFields on AddressType {\n		area\n		areaFiasId\n		areaKladrId\n		areaType\n		areaTypeFull\n		areaWithType\n		block\n		blockType\n		blockTypeFull\n		capitalMarker\n		city\n		cityArea\n		cityDistrict\n		cityDistrictFiasId\n		cityDistrictKladrId\n		cityDistrictType\n		cityDistrictTypeFull\n		cityDistrictWithType\n		cityFiasId\n		cityKladrId\n		cityType\n		cityTypeFull\n		cityWithType\n		country\n		countryIsoCode\n		entrance\n		federalDistrict\n		fiasCode\n		fiasId\n		fiasLevel\n		flat\n		flatArea\n		flatCadnum\n		flatFiasId\n		flatType\n		flatTypeFull\n		floor\n		geoLat\n		geoLon\n		geonameId\n		historyValues\n		house\n		houseCadnum\n		houseFiasId\n		houseKladrId\n		houseType\n		houseTypeFull\n		kladrId\n		postalBox\n		postalCode\n		region\n		regionFiasId\n		regionIsoCode\n		regionKladrId\n		regionType\n		regionTypeFull\n		regionWithType\n		settlement\n		settlementFiasId\n		settlementKladrId\n		settlementType\n		settlementTypeFull\n		settlementWithType\n		street\n		streetFiasId\n		streetKladrId\n		streetType\n		streetTypeFull\n		streetWithType\n		timezone\n		unparsedParts\n		value\n	}\n":eP,"\n  query GetAddress($term: String, $from: String, $to: String, $all_world: Boolean) {\n    suggestAddress(query: $term, fromBound: $from, toBound: $to, allWorld: $all_world) {\n      ...AddressFields\n    }\n  }\n":ej,"\n  query specialProjects {\n    specialProjects {\n      id\n      slug\n      name\n      photo\n      projectUrl\n      description\n      hasFormScheme\n    }\n  }\n":eV,"\n	mutation SaveUserData($user: UpdateUserInput!) {\n		updateUser(input: $user) {\n			user {\n				id\n			}\n		}\n	}\n":eK,"\n  mutation UpdateUserMetrica($refererUrl: String, $ymClientId: String) {\n    updateYandexMetrica(refererUrl: $refererUrl, ymClientId: $ymClientId) {\n      success\n    }\n  }\n":ez,"\n  query GetUserGeolocation {\n    userGeoLocationLog {\n      country\n      countryIsoCode\n      region\n      regionFiasId\n      city\n      cityFiasId\n    }\n  }":eW,"\n  query GetUser {\n    me {\n      id\n      uuid\n      username\n      nickname\n      avatar\n      avatarUrl\n      vkAvatar\n      vkAccount\n      firstName\n      lastName\n      middleName\n      email\n      phone\n      promotionalMailings\n      birthDate\n      agreement\n      address {\n        area\n        areaFiasId\n        areaKladrId\n        areaType\n        areaTypeFull\n        areaWithType\n        block\n        blockType\n        blockTypeFull\n        capitalMarker\n        city\n        cityArea\n        cityDistrict\n        cityDistrictFiasId\n        cityDistrictKladrId\n        cityDistrictType\n        cityDistrictTypeFull\n        cityDistrictWithType\n        cityFiasId\n        cityKladrId\n        cityType\n        cityTypeFull\n        cityWithType\n        country\n        countryIsoCode\n        entrance\n        federalDistrict\n        fiasCode\n        fiasId\n        fiasLevel\n        flat\n        flatArea\n        flatCadnum\n        flatFiasId\n        flatType\n        flatTypeFull\n        floor\n        geoLat\n        geoLon\n        geonameId\n        historyValues\n        house\n        houseCadnum\n        houseFiasId\n        houseKladrId\n        houseType\n        houseTypeFull\n        kladrId\n        postalBox\n        postalCode\n        region\n        regionFiasId\n        regionIsoCode\n        regionKladrId\n        regionType\n        regionTypeFull\n        regionWithType\n        settlement\n        settlementFiasId\n        settlementKladrId\n        settlementType\n        settlementTypeFull\n        settlementWithType\n        street\n        streetFiasId\n        streetKladrId\n        streetType\n        streetTypeFull\n        streetWithType\n        timezone\n        unparsedParts\n        value\n      }\n      speakerRequests {\n        status\n      }\n      speakers {\n        id\n        statusRequest\n      }
2\n      lead {\n        projectLink\n      }\n      projects {\n        slug\n      }\n    }\n  }\n":eQ};function e8(e){return e7[e]??{}}e8(`
3	mutation CheckEmailCode($email: String!, $code: String!) {
4		emailCodeCheck(email: $email, code: $code) {
5    	success
6  	}
7	}
8`),e8(`
9	mutation Login($username: String!, $token: String!) {
10		tokenAuth(username: $username, password: $token) {
11			payload
12			token
13		}
14	}	
15`),e8(`
16    mutation Logout {
17        deleteTokenCookie {
18            deleted
19        }
20        deleteRefreshTokenCookie {
21            deleted
22        }
23    }
24`),e8(`
25  mutation Registration($user: UserInput) {
26    registerUser(input: $user) {
27      user {
28        id
29      }
30    }
31  }
32`),e8(`
33	mutation SendAuthEmail($username: String!, $refererUrl: String, $ymClientId: String) {
34		sendEmailCode(email: $username, refererUrl: $refererUrl, ymClientId: $ymClientId) {
35			success
36			userExists
37		}
38	}
39`),e8(`
40	mutation SmsAuthWithToken(
41		$phone: String!
42		$token: String!
43		$uuid: UUID
44	) {
45  	createSmsAuthorizeWithToken(phone: $phone, token: $token, uuid: $uuid) {
46    	userExists
47  	}
48	}	
49`),e8(`
50  mutation TokenAuthVk($code: String!, $codeVerifier: String!, $deviceId: String!) {
51    tokenAuthVkId(code: $code, codeVerifier: $codeVerifier, deviceId: $deviceId) {
52      payload
53      refreshExpiresIn
54      token
55      refreshToken
56    }
57  }
58`);var e9=e8(`
59  query GetAddress($term: String, $from: String, $to: String, $all_world: Boolean) {
60    suggestAddress(query: $term, fromBound: $from, toBound: $to, allWorld: $all_world) {
61      ...AddressFields
62    }
63  }
64`),te=e8(`
65  query specialProjects {
66    specialProjects {
67      id
68      slug
69      name
70      photo
71      projectUrl
72      description
73      hasFormScheme
74    }
75  }
76`),tt=e8(`
77	mutation SaveUserData($user: UpdateUserInput!) {
78		updateUser(input: $user) {
79			user {
80				id
81			}
82		}
83	}
84`),ti=e8(`
85  mutation UpdateUserMetrica($refererUrl: String, $ymClientId: String) {
86    updateYandexMetrica(refererUrl: $refererUrl, ymClientId: $ymClientId) {
87      success
88    }
89  }
90`),tn=e8(`
91  query GetUserGeolocation {
92    userGeoLocationLog {
93      country
94      countryIsoCode
95      region
96      regionFiasId
97      city
98      cityFiasId
99    }
100  }`),ta=e8(`
101  query GetUser {
102    me {
103      id
104      uuid
105      username
106      nickname
107      avatar
108      avatarUrl
109      vkAvatar
110      vkAccount
111      firstName
112      lastName
113      middleName
114      email
115      phone
116      promotionalMailings
117      birthDate
118      agreement
119      address {
120        area
121        areaFiasId
122        areaKladrId
123        areaType
124        areaTypeFull
125        areaWithType
126        block
127        blockType
128        blockTypeFull
129        capitalMarker
130        city
131        cityArea
132        cityDistrict
133        cityDistrictFiasId
134        cityDistrictKladrId
135        cityDistrictType
136        cityDistrictTypeFull
137        cityDistrictWithType
138        cityFiasId
139        cityKladrId
140        cityType
141        cityTypeFull
142        cityWithType
143        country
144        countryIsoCode
145        entrance
146        federalDistrict
147        fiasCode
148        fiasId
149        fiasLevel
150        flat
151        flatArea
152        flatCadnum
153        flatFiasId
154        flatType
155        flatTypeFull
156        floor
157        geoLat
158        geoLon
159        geonameId
160        historyValues
161        house
162        houseCadnum
163        houseFiasId
164        houseKladrId
165        houseType
166        houseTypeFull
167        kladrId
168        postalBox
169        postalCode
170        region
171        regionFiasId
172        regionIsoCode
173        regionKladrId
174        regionType
175        regionTypeFull
176        regionWithType
177        settlement
178        settlementFiasId
179        settlementKladrId
180        settlementType
181        settlementTypeFull
182        settlementWithType
183        street
184        streetFiasId
185        streetKladrId
186        streetType
187        streetTypeFull
188        streetWithType
189        timezone
190        unparsedParts
191        value
192      }
193      speakerRequests {
194        status
195      }
196      speakers {
197        id
198        statusRequest
199      }
200      lead {
201        projectLink
202      }
203      projects {
204        slug
205      }
206    }
207  }
208`),tr={user:["me"],updateUser:["updateUser"],emailCode:["sendEmailCode"],otpSend:["otp_send"],phoneAuthGetCode:["phoneAuth","getCode"],tokenAuthVkId:["tokenAuthVkId"],checkEmail:["checkEmail"],siteActivate:["siteActivate"],login:["login"],updateYandexMetrica:["updateYandexMetrica"],userGeolocation:["userGeolocation"],specialProjects:["specialProjects"],address:e=>["address",e]};function to(){return new ev({defaultOptions:{queries:{staleTime:6e4,refetchOnWindowFocus:!1,retry:!1}}})}function ts(){return el.isServer?to():(n||(n=to()),n)}es.create({prefixUrl:`${eS}/`,credentials:"include",hooks:{beforeRequest:[async e=>{let t=await e3();t&&e.headers.set("Authorization",`Bearer ${t}`)}]}});var tl="roz-sdk-debug",td="debug",tu={analytics:{enabled:!0},theme:"dark",_usage:"external",debug:!0},tc="data-ntpc",tm="GTM-init",th=`script[${tc}="${tm}"]`,tk=`script[${tc}="GTM"]`,tp=/Tablet|iPad|PlayBook|Silk/i,tf=/Mobile|iPhone|iPod|Android|BlackBerry|IEMobile|Opera Mini/i,ty=e=>e.includes(globalThis.window.location.hostname)?e:globalThis.window.location.origin+e,tg=()=>{},tv={mainAuth:"phone",isRegistering:!1,embedAuthSelector:null,registrationFrom:""},tb=(0,ew.create)(e=>({...tv,updateAuthProps:t=>e(e=>({...e,...t})),setIsRegistering:t=>e({isRegistering:t}),setEmbedAuthSelector:t=>e({embedAuthSelector:t}),setMainAuth:t=>e({mainAuth:t}),setRegistrationFrom:t=>e({registrationFrom:t})})),tw=e=>"object"==typeof e&&null!==e&&"me"in e,tN=()=>{},tT=()=>{},tF=class e{constructor(e){o(this,"configListeners",[]),o(this,"_readyPromise",void 0),o(this,"_readyResolver",void 0),o(this,"_readyRejecter",void 0),o(this,"config",void 0),o(this,"version","0.0.3"),o(this,"auth",void 0),o(this,"user",void 0),o(this,"analytics",void 0),o(this,"utils",void 0),o(this,"events",void 0),o(this,"updateConfig",void 0),o(this,"subscribeToConfigUpdates",void 0),o(this,"ready",void 0),this.config=(0,eb.default)(tu,e),this.updateConfig=this.updateConfigImpl.bind(this),this.subscribeToConfigUpdates=this.subscribeToConfigUpdatesImpl.b
208ind(this),this.ready=this.readyImpl.bind(this),this._readyPromise=new Promise((e,t)=>{this._readyResolver=e,this._readyRejecter=t})}attachModules(){var e,t,i;let n,a,r,o,s,d,c,m,h,k,p,f,y,g,v={auth:(e=this,n=tb.getState(),a=ts(),r=!1,o=!1,s=async()=>{try{let t=(await e.user.refetchUser())?.me,i=u.default.get("_ym_uid")||"unknown",n=new URL(window.location.href);n.search="",await e6(ti,{ymClientId:i,refererUrl:n.toString()}),e.analytics.trackYmAnalytics("uid",{personal_acc:{block_uid:{block_name:"block_uid",userAuth:t?"auth":"not auth",uid:t?t?.uuid:"na",id:t?t?.id:"na"}}}),e.events.emit("login")}catch(e){console.error(e)}},d=()=>{a.clear(),e.events.emit("logout")},{init:async()=>{c(e.config.authProps),r||(r=!0,eG.onAuthSuccess=()=>{eY(),s()},eG.onAuthLogout=()=>{eY(),d()},eG.onTokenExpired=async()=>{try{await eG.updateToken(30)}catch{await eG.logout()}}),"1"===sessionStorage.getItem(eC)&&(d(),sessionStorage.removeItem(eC));try{await e1(e)}finally{eY()}},updateAuthProps:c=t=>{t&&(n.updateAuthProps(t),e.updateConfig({authProps:{...e.config.authProps,...t}}))},isUserAuthorized:()=>{let e;return e=a.getQueryData(tr.user),!!eG.authenticated||!!(tw(e)&&e.me)},login:async t=>{if(!e.isBrowser||o||eH())return;o=!0;let i=(e=>{try{let t=new URL(e);for(let e of e0)t.searchParams.delete(e);return t.href}catch{return e}})(t??globalThis.window.location.href);try{await eG.login({redirectUri:i})}catch(e){throw o=!1,e}},logout:async()=>{if(e.isBrowser)try{sessionStorage.setItem(eC,"1"),await eG.logout({redirectUri:globalThis.window.location.href})}catch(e){console.error(e)}},getAccessToken:e3,refreshToken:e2}),user:(t=this,m=ts(),h=async()=>t.auth.isUserAuthorized()?await e6(ta):null,k=null,p=()=>{let e=h().then(e=>({data:e,isFailed:!1})).catch(()=>({data:null,isFailed:!0})).finally(()=>{k===e&&(k=null)});return k=e,e},f=async e=>{let{data:i,isFailed:n}=await e;if(n){let e=m.getQueryData(tr.user);return t.events.emit("loadUser",e?.me),e??null}return m.setQueryData(tr.user,i),t.events.emit("loadUser",i?.me),i},{init:async()=>{let e=(await y())?.me;t.analytics.trackYmAnalytics("uid",{personal_acc:{block_uid:{block_name:"block_uid",userAuth:e?"auth":"not auth",uid:e?e?.uuid:"na",id:e?e?.id:"na"}}})},updateConfig:tN,destroy:tN,fetchUser:h,refetchUser:async()=>{try{return await f(p())}catch(e){console.error(e)}},getUser:y=async()=>{if(!t.auth.isUserAuthorized())return t.events.emit("loadUser",void 0),null;let e=m.getQueryData(tr.user);return tw(e)?(t.events.emit("loadUser",e?.me),e):await f(k??p())},updateUser:async e=>{try{await e6(tt,e)}catch(e){console.error(e)}},checkSpeakerPermissions:e=>{let t=e?.speakers?.statusRequest;return!!t&&eB.includes(t)}}),analytics:(i=this,{init:tg,updateConfig:tg,destroy:tg,sendYmAnalyticsWithDefaultParams:async({params:e,blockName:t,additionalCounterId:n,additionalCounterEvent:a,ymEvent:r,url:o})=>{if(!(i.isBrowser&&"u">typeof document))return;let s=o??globalThis.window.location.href,[l]=s.split("?"),d=i.auth.isUserAuthorized(),c=(await i.user.getUser())?.me,m=u.default.get("_ym_uid")??"unknown",h={events:{[t]:{title:document.title,url:ty(l),url_params:ty(s),block_name:t,userAuth:d?"auth":"not auth",uid:d?c?.uuid||"unknown":"na",id:d?c?.id||"unknown":"na",cid:m,device_type:(()=>{let e="unknown",t=navigator.userAgent;if(t){let i=tp.test(t),n=tf.test(t);switch(!0){case i:e="tablet";break;case n:e="phone";break;default:e="desktop"}}return e})(),...e}}};g(r,h),n&&g(a||r,h,n)},trackYmAnalytics:g=(e,t,n)=>{if(!i.isBrowser)return;let a=n??0x50d8779,r=()=>globalThis.window.ym?.(a,"reachGoal",e,t);globalThis.window?.ym?r():((e=15e3,t=100)=>new Promise((i,n)=>{if(void 0===globalThis.window||void 0===document)return n("No window/document available");if(globalThis.window.ym)return i();let a=setInterval(()=>{globalThis.window.ym&&(clearInterval(a),clearTimeout(r),i())},t),r=setTimeout(()=>{clearInterval(a),n(`YM not found within ${e}ms`)},e)}))().then(()=>r()).catch(()=>{})},trackGTMAnalytics:async(e,t={})=>{var n;let a,r;if(!i.isBrowser)return;let o=(await i.user.getUser())?.me;n={...t,user:{...o,user_id:o?.id}}
208,a=new Date().toLocaleString("ru-RU",{timeZone:"Europe/Moscow"}),(r=(e=>{let t=window,i=t[e];if(i)return i;let n=[];return t[e]=n,n})((void 0)??"dataLayer"))&&r.push({event:"trackAnalytics",payload:{event:e,params:{...n,date:a}}})}}),utils:{init:tT,updateConfig:tT,destroy:tT,uploadFileToS3:async(e,t)=>{try{let i,{folder:n,customFilename:a,privateBucket:r}=t||{},{url:o}=await es.get(`${eF}/api/s3_signed_url`,{searchParams:(i={filename:e.name,folder:n,customFilename:a,privateBucket:r},Object.fromEntries(Object.entries(i).filter(([,e])=>void 0!==e)))}).json();return await es.put(o,{body:e,headers:{"Content-Type":e.type}}),o.split("?")[0]}catch(e){throw console.error(e),e}},getAccessKeycloakToken:e3}};this.analytics=v.analytics,this.user=v.user,this.auth=v.auth,this.utils=v.utils,this.events=l.getInstance()}async runModuleInit(){for(let e of[this.analytics,this.auth,this.utils,this.user])await e?.init();this._readyResolver()}static create(t){if(e.instance)return console.warn("[SDK] Already initialized. Use SDK.getInstance() to access it."),e.instance;let i=new e(t);return e.instance=i,i.attachModules(),i.runModuleInit().then(()=>i.events.emit("sdkReady")).catch(e=>{console.error("[SDK] Ошибка инициализации",e),i._readyRejecter(e)}),i}static async init(t){let i=e.create(t);return await i.ready(),i}static getInstance(){if(!e.instance)throw Error("SDK not yet initialized. Call SDK.init(config) first.");return e.instance}static log(e,...t){!function(e,...t){if(void 0!==globalThis.window){try{let t;if(function(){let e=new URLSearchParams(globalThis.window.location?.search??"");if(!e.has(td))return;let t=e.get(td);"0"===t?localStorage.removeItem(tl):null===t||""===t||"1"===t?localStorage.setItem(tl,"*"):localStorage.setItem(tl,t)}(),!((t=localStorage.getItem(tl))&&("*"===t||t.split(",").map(e=>e.trim()).includes(e))))return}catch{return}console.log(`[${e}]`,...t)}}(e,...t)}readyImpl(){return this._readyPromise}updateConfigImpl(e){for(let t of(this.config=(0,eb.default)(this.config,e),this.configListeners))t(this.config)}subscribeToConfigUpdatesImpl(e){return this.configListeners.push(e),()=>{this.configListeners=this.configListeners.filter(t=>t!==e)}}static reset(){e.instance=void 0}get isBrowser(){return void 0!==globalThis.window}};o(tF,"instance",void 0),o(tF,"getGraphQLClient",e=>e4(e));var tS={isAuthorized:!1,authType:"Телефон",agreement:!1},tI=((0,ew.create)()(e=>({...tS,setIsAuthorized:t=>e({isAuthorized:t}),setAuthType:t=>e({authType:t}),setAgreement:t=>e({agreement:t})})),/^(?:[\S]*)$/);e.s(["ADDRESS_QUERY",0,e9,"COOKIE_POLICY_NAME",0,"policy_accepted","ContentTypeContentEnum",0,eR,"GET_USER_GEOLOCATION",0,tn,"GTM_DEVELOPMENT_ID",0,"GTM-5LNKZGHD","GTM_INIT_SELECTOR",0,th,"GTM_PRODUCTION_ID",0,"GTM-K89MWRP","GTM_SCRIPT_SELECTOR",0,tk,"IS_PRODUCTION",0,eT&&!0||!0,"MAIN_SITE_ROUTES",0,{home:"/",profile:"/profile/main",profileLector:"/profile/lector",profileApplector:"/profile/applector",search:"/search",events:"/events",projects:"/projects",speakers:"/speakers",library:"/library",cinema:"/cinema",podcasts:"/podcasts",about:"/about",management:"/management",news:"/news",oVajnom:"/razgovory-o-vazhnom",press:"/press",becomeMember:"/become-member",becomePartner:"/become-partner"},"QUERY_KEYS",0,tr,"SDK",0,tF,"SDK_IDS",0,{sdkRoot:"roz-sdk-root",beforeTabbarMenu:"roz-sdk-tabbar-before-menu",afterTabbarMenu:"roz-sdk-tabbar-after-menu",headerAfterLogo:"roz-header_after-logo"},"SITE_DOMAIN",0,eF,"SPECIAL_PROJECTS_QUERY",0,te,"YmLectorEventsType",0,{TARGET_AG:"LK_LECTOR"},"defaultDataLayerName",0,"dataLayer","execute",0,e6,"getCookieUserLocation",0,()=>{let e=u.default.get("userLocation");return e?JSON.parse(e):null},"getQueryClient",0,ts,"getTags",0,({gtmId:e,gtmAuth:t,gtmPreview:i,gtmLayer:n,gtmScriptUrl:a,dataLayer:r,dataLayerName:o})=>({getNoscript:()=>{let n=document.createElement("iframe");n.src=`https://www.googletagmanager.com/ns.html?id=${e}${t}${i}&gtm_cookies_win=x`,n.height="0",n.width="0",n.style.display="none",n.style.visibility="hidden",n.id="tag-manager";let a=document.createElement("noscript");return a.append(n),a},getGTMScript:()=>{let r=document.createElement("script");return r.src=`${a}?id=${e}${n}${t}${i}`,r.setAttribute(tc,"GTM"),r},getGTMInitScript:()=>{let e=document.createElement("script");return e.setAttribute(tc,tm),e.innerHTML=`
209            (function(w,l){
210                w[l]=w[l]||[];
211                w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});
212                ${r?`w[l].push(${JSON.stringify(r)})`:""}
213            })(window,'${o}');
214        `,e}}),"gqlClient",0,e5,"invalidFIOText",0,"Должно содержать только кириллицу, тире и пробел и начинаться с большой буквы","notOnlySpacesText",0,"Не должно содержать только пробелы","requiredFromListText",0,"Обязательное поле. Пожалуйста, выберите вариант из списка","requiredText",0,"Обязательное поле","saveUserLocation",0,e=>{u.default.set("userLocation",JSON.stringify(e),{expires:(0,eN.default)().add(30,"day").toDate()})},"validateFIO",0,e=>eU.test(e)&&!eE.test(e),"validateSpaces",0,e=>tI.test(e)||e.trim().length>0],762367);var tC=e.i(117321),tA=e.i(528139),tU=e.i(622112),tE=e.i(614554),tR=(0,tC.createContext)(null),tD=()=>{let e=(0,tC.useContext)(tR);if(!e)throw Error("useSdk must be used within an SdkProvider");return e.sdk},tP=()=>{let e=tD(),t=(0,tE.useQueryClient)(),[i,n]=(0,tC.useState)(()=>e.auth.isUserAuthorized());return(0,tC.useEffect)(()=>{let i=()=>{n(e.auth.isUserAuthorized())};i();let a=e.events.on("login",()=>{i(),t.invalidateQueries({queryKey:tr.user})}),r=e.events.on("logout",()=>{i(),t.removeQueries({queryKey:tr.user,exact:!0})}),o=e.events.on("loadUser",i);return()=>{a?.(),r?.(),o?.()}},[e,t]),{isAuthorized:i,login:e.auth.login,logout:e.auth.logout}},t_=(e,t="external",i=!1)=>"internal"===t||i||e.startsWith("http")?e:`${eF}${e}`;e.s(["a",0,()=>{let e=tD(),{isAuthorized:t}=tP(),i=(0,tC.useRef)(e),{data:n,isLoading:a,refetch:r}=(0,tU.useQuery)({enabled:t,queryKey:tr.user,queryFn:async()=>(await e.user.refetchUser())?.me??null});return(0,tC.useEffect)(()=>
214{i.current!==e&&(i.current=e,t&&r())},[t,e,r]),{user:t?n??null:null,isLoading:!!t&&a,refetch:async()=>{t&&await r()}}},"c",0,tP,"i",0,(e,t)=>{let i=t_(t,e.config._usage);"internal"===e.config._usage?e.events.emit("navigate",i):window.location.assign(i)},"l",0,tD,"n",0,{menu:"menu",regionSelect:"region-select"},"o",0,()=>{let e=(0,tC.useContext)(tR);if(!e)throw Error("useSdkConfig must be used within an SdkProvider");return e.config},"r",0,({children:e,customLink:t,testId:i,href:n,onClick:a,rel:r,target:o,...s})=>{let l=tD();if(!n)throw Error("NavLink requires href");let d=((e,t="external",i=!1)=>"internal"!==t&&!i&&!e.startsWith("http"))(n,l.config._usage,t),u=t_(n,l.config._usage,t),c=o??(d?"_blank":void 0),m=r??("_blank"===c?"noreferrer nofollow":void 0),h="internal"===l.config._usage&&(!c||"_self"===c)&&(e=>{if(e.startsWith("/"))return!0;try{return new URL(e,window.location.origin).origin===window.location.origin}catch{return!1}})(u);return(0,tA.jsx)("a",{"data-testid":i,href:u,onClick:e=>{a?.(e),e.defaultPrevented||(h&&e.preventDefault(),l.events.emit("linkClick",{href:u,target:c}))},rel:m,target:c,...s,children:e})},"s",0,()=>{let e=(0,tC.useContext)(tR);if(!e)throw Error("useSdkReady must be used within an SdkProvider");return e.ready},"t",0,{thirdParty:"third-party",personalData:"personal-data"},"u",0,tR],500355)}]);
215
216//# debugId=456c99bd-aede-a345-4902-bcfef9b293fb

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.