"use strict";(self.webpackChunk_ytsaurus_ui=self.webpackChunk_ytsaurus_ui||[]).push([[8810],{58860:(e,t,s)=>{s.d(t,{Wv:()=>O,b_:()=>_,j5:()=>E});var o=s(74360),n=s(59117),r=s.n(n),i=s(84092),u=s.n(i),a=s(13542),c=s(53332),p=s(26264),l=s(33547),f=s(52797),d=s(31229),b=s(3659),y=s(91984);function O(e){var t=l.YT.clusters,s=(0,c.Jc)(t,e);u().setup.setGlobalOption("suppressAccessTracking",!0),u().setup.setGlobalOption("useEncodedParameters",!0),u().setup.setGlobalOption("proxy",(0,f.v9)(s)),!(0,d.FG)().ytApiUseCORS&&(s.secure="https:"===window.location.protocol),u().setup.setGlobalOption("useHeavyProxy",!1),u().setup.setGlobalOption("xsrf",!0),u().setup.setGlobalOption("xsrfCookieName",(0,c.fc)(s.id)),"boolean"==typeof s.secure?u().setup.setGlobalOption("secure",s.secure):u().setup.setGlobalOption("secure",!0),u().setup.setGlobalOption("authentication",{type:s.authentication||"none"}),u().subscribe("error",h)}function h(e){var t,s,o=e&&e.code;if(o===u().codes.USER_IS_BANNED)(0,a.ai)().dispatch({type:p.q8});else if(o===u().codes.USER_EXCEEDED_RPS)(0,a.ai)().dispatch({type:p.W6});else if(o==u().codes.XSRF_TOKEN_EXPIRED){var n="Your CSRF-token '".concat((s=(t=l.YT.cluster)&&(0,c.fc)(t))&&r().get(s),"' has expired. Please reaload the page");console.log(n),y.X.add({name:"xsrf-expired",theme:"info",autoHiding:!1,title:"CSRF-token expired",content:n})}}var E=function(e){try{return b.A.decode(e)}catch(t){return e}},_={stringify:function(e){return JSON.stringify(e)},parse:function(e){return JSON.parse(e,(function(e,t){return"object"!==(0,o.A)(t)||null===t||Array.isArray(t)?t:Object.keys(t).reduce((function(e,s){return e[E(s)]="string"==typeof t[s]?E(t[s]):t[s],e}),{})}))}}}}]);
//# sourceMappingURL=yt-monaco-editor.a691a9db.chunk.js.map