(globalThis.webpackChunk=globalThis.webpackChunk||[]).push([[2203],{532203(__unused_webpack_module,__webpack_exports__,__webpack_require__){(function(){if(!this.ST)return()=>{};with(this.ST)with(this.RH)with(this.G)return function(){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{"default":()=>f});var e=__webpack_require__(303280);__webpack_require__.n(e);var t=__webpack_require__(860012);var r=__webpack_require__(48084);var n=__webpack_require__(107495);var a=__webpack_require__(798777);var i=__webpack_require__(762550);var l=__webpack_require__(92807);var c=__webpack_require__(59293);var s=__webpack_require__(358623);var o=__webpack_require__(609654);var u=__webpack_require__(79222);var h=__webpack_require__(895462);var v=__webpack_require__(365337);var d=__webpack_require__(731728);function f(){let a=(0,e.c)(14);(0,c.J)("PerpsLayout"),(0,s.U)();let o=(0,r.wA)();let{pathname:v,search:f}=(0,n.zy)();let y=(0,r.d4)(p);let E=(0,r.d4)(S,r.bN);let $;let _;a[0]!==E||a[1]!==y?($=()=>{(0,h.SB)().hydrateFromControllerCache(E,y)},_=[E,y],a[0]=E,a[1]=y,a[2]=$,a[3]=_):($=a[2],_=a[3]),(0,t.useLayoutEffect)($,_);let k;let P;a[4]!==o||a[5]!==v||a[6]!==f?(k=()=>{let e=f?`${v}${f}`:v;Promise.resolve(o((0,u.GSC)(e))).catch(w)},P=[o,v,f],a[4]=o,a[5]=v,a[6]=f,a[7]=k,a[8]=P):(k=a[7],P=a[8]),(0,t.useEffect)(k,P);let C;let L;a[9]!==o?(C=()=>()=>{(0,d.sz)(),Promise.resolve(o((0,u.GSC)(null))).catch(b)},L=[o],a[9]=o,a[10]=C,a[11]=L):(C=a[10],L=a[11]),(0,t.useLayoutEffect)(C,L);let T;a[12]===Symbol.for("react.memo_cache_sentinel")?(T=[],a[12]=T):T=a[12],(0,t.useEffect)(m,T);let z;return a[13]===Symbol.for("react.memo_cache_sentinel")?(z=t.createElement(l.pP,null,t.createElement(i.zX,null,t.createElement(n.sv,null))),a[13]=z):z=a[13],z}function m(){let e=null;let t=()=>{if(document.visibilityState==="hidden"){e=Date.now();return}let t=e;if(e=null,t!==null&&Date.now()-t<3e4)return;(0,o.Rb)("perpsCheckHealth").catch(y)};return document.addEventListener("visibilitychange",t),()=>document.removeEventListener("visibilitychange",t)}function y(){}function b(){}function w(){}function S(e){let t=e.metamask;let r=t.activeProvider??a.x$.DefaultProvider;let n=`${r}:${t.isTestnet?"testnet":"mainnet"}`;let i=t.cachedMarketDataByProvider?.[n];let l=t.cachedUserDataByProvider?.[n];return{markets:i?.data,positions:l?.positions,orders:l?.orders,account:l?.accountState,address:l?.address}}function p(e){return(0,v._)(e)?.address??null}}}).call(__webpack_require__._LM_("$root$",{__webpack_require__,__webpack_exports__}))()},762550(__unused_webpack_module,__webpack_exports__,__webpack_require__){(function(){if(!this.ST)return()=>{};with(this.ST)with(this.RH)with(this.G)return function(){"use strict";__webpack_require__.d(__webpack_exports__,{zX:()=>e.zX}),__webpack_require__(654352),__webpack_require__(93769),__webpack_require__(425462),__webpack_require__(650836),__webpack_require__(606760);var e=__webpack_require__(311441);__webpack_require__(918540),__webpack_require__(938685),__webpack_require__(791796),__webpack_require__(774153),__webpack_require__(663870),__webpack_require__(336795),__webpack_require__(454704),__webpack_require__(409823),__webpack_require__(22677),__webpack_require__(118670),__webpack_require__(227980),__webpack_require__(890194)}}).call(__webpack_require__._LM_("$root$",{__webpack_require__,__webpack_exports__}))()}}]);