PageSourceSearch

https://www.deribit.com/assets/useCurrency-C8kZJM0Z.js

js deribit.com collected 2026-09-24 09:24:11 UTC 6,352 bytes, 1 lines download raw bytes

1(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{};e.SENTRY_RELEASE={id:`3dcc281a8e79fff17adf3e75579634b27b7debb6`}}catch{}})();try{(function(){var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`ae719db5-5e8d-4b78-b6f8-27d494e6c2a1`,e._sentryDebugIdIdentifier=`sentry-dbid-ae719db5-5e8d-4b78-b6f8-27d494e6c2a1`)})()}catch{}import{s as e}from"./rolldown-runtime-Dm_dodAQ.js";import{A as t,g as n,k as r}from"./dist-kP4lwCLB.js";import{Ci as i,Fa as a,Ki as o,La as s,Lu as c,O as l,Od as u,Sa as d,Ta as f,Wi as p,_o as m,as as h,eo as g,gi as _,id as v,is as y,ma as b,md as x,mo as S,os as C,pa as w,pi as T,po as E,rs as D,s as O,so as k,to as A,vc as j,vo as M,wa as N,xa as P,yi as F}from"./formatInstrumentName-BdL2ER9e.js";var I=1/0,L=17976931348623157e292;function toFinite(e){return e?(e=x(e),e===I||e===-I?(e<0?-1:1)*L:e===e?e:0):e===0?e:0}function toInteger(e){var t=toFinite(e),n=t%1;return t===t?n?t-n:t:0}var R=Math.ceil,z=Math.max;function chunk(e,t,n){t=(n?v(e,t,n):t===void 0)?1:z(toInteger(t),0);var r=e==null?0:e.length;if(!r||t<1)return[];for(var i=0,a=0,o=Array(R(r/t));i<r;)o[a++]=c(e,i,i+=t);return o}var B=class Deferred{promise;resolve;reject;state=`pending`;constructor(){this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t}).then(e=>(this.state=`resolved`,e),e=>{throw this.state=`rejected`,e})}isFulfilled(){return this.state!==`pending`}isRejected(){return this.state===`rejected`}static sleep(e){return new Promise(t=>{setTimeout(t,e)})}static async chunkAll(e,t,n,r){let i=chunk(e,n),a=[];for(let e of i)a.push(...await Promise.all(e.map(t))),await Deferred.sleep(r??500);return a}},V=t(),H=e(r());C(),y(),S(),g(),a(),N(),b(),p(),F(),P(),m();function getCollapseUtilityClass(e){return M(`MuiCollapse`,e)}var U=d(`MuiCollapse`,[`root`,`horizontal`,`vertical`,`entered`,`hidden`,`wrapper`,`wrapperInner`]),W=[`addEndListener`,`children`,`className`,`collapsedSize`,`component`,`easing`,`in`,`onEnter`,`onEntered`,`onEntering`,`onExit`,`onExited`,`onExiting`,`orientation`,`style`,`timeout`,`TransitionComponent`],useUtilityClasses=e=>{let{orientation:t,classes:n}=e,r={root:[`root`,`${t}`],entered:[`entered`],hidden:[`hidden`],wrapper:[`wrapper`,`${t}`],wrapperInner:[`wrapperInner`,`${t}`]};return f(r,getCollapseUtilityClass,n)},G=A(`div`,{name:`MuiCollapse`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.orientation],n.state===`entered`&&t.entered,n.state===`exited`&&!n.in&&n.collapsedSize===`0px`&&t.hidden]}})(({theme:e,ownerState:t})=>h({height:0,overflow:`hidden`,transition:e.transitions.create(`height`)},t.orientation===`horizontal`&&{height:`auto`,width:0,transition:e.transitions.create(`width`)},t.state===`entered`&&h({height:`auto`,overflow:`visible`},t.orientation===`horizontal`&&{width:`auto`}),t.state===`exited`&&!t.in&&t.collapsedSize===`0px`&&{visibility:`hidden`})),K=A(`div`,{name:`MuiCollapse`,slot:`Wrapper`,overridesResolver:(e,t)=>t.wrapper})(({ownerState:e})=>h({display:`flex`,width:`100%`},e.orientation===`horizontal`&&{width:`auto`,height:`100%`})),q=A(`div`,{name:`MuiCollapse`,slot:`WrapperInner`,overridesResolver:(e,t)=>t.wrapperInner})(({ownerState:e})=>h({width:`100%`},e.orientation===`horizontal`&&{width:`auto`,height:`100%`})),J=H.forwardRef(function Collapse(e,t){let n=o({props:e,name:`MuiCollapse`}),{addEndListener:r,children:a,className:c,collapsedSize:l=`0px`,component:u,easing:d,in:f,onEnter:p,onEntered:m,onEntering:g,onExit:v,onExited:y,onExiting:b,orientation:x=`vertical`,style:S,timeout:C=E.standard,TransitionComponent:O=_}=n,A=D(n,W),j=h({},n,{orientation:x,collapsedSize:l}),M=useUtilityClasses(j),N=k(),P=s(),F=H.useRef(null),I=H.useRef(),L=typeof l==`number`?`${l}px`:l,R=x===`horizontal`,z=R?`width`:`height`,B=H.useRef(null),U=i(t,B),normalizedTransitionCallback=e=>t=>{if(e){let n=B.current;t===void 0?e(n):e(n,t)}},getWrapperSize=()=>
1F.current?F.current[R?`clientWidth`:`clientHeight`]:0,J=normalizedTransitionCallback((e,t)=>{F.current&&R&&(F.current.style.position=`absolute`),e.style[z]=L,p&&p(e,t)}),Y=normalizedTransitionCallback((e,t)=>{let n=getWrapperSize();F.current&&R&&(F.current.style.position=``);let{duration:r,easing:i}=T({style:S,timeout:C,easing:d},{mode:`enter`});if(C===`auto`){let t=N.transitions.getAutoHeightDuration(n);e.style.transitionDuration=`${t}ms`,I.current=t}else e.style.transitionDuration=typeof r==`string`?r:`${r}ms`;e.style[z]=`${n}px`,e.style.transitionTimingFunction=i,g&&g(e,t)}),X=normalizedTransitionCallback((e,t)=>{e.style[z]=`auto`,m&&m(e,t)}),Z=normalizedTransitionCallback(e=>{e.style[z]=`${getWrapperSize()}px`,v&&v(e)}),Q=normalizedTransitionCallback(y),$=normalizedTransitionCallback(e=>{let t=getWrapperSize(),{duration:n,easing:r}=T({style:S,timeout:C,easing:d},{mode:`exit`});if(C===`auto`){let n=N.transitions.getAutoHeightDuration(t);e.style.transitionDuration=`${n}ms`,I.current=n}else e.style.transitionDuration=typeof n==`string`?n:`${n}ms`;e.style[z]=L,e.style.transitionTimingFunction=r,b&&b(e)}),handleAddEndListener=e=>{C===`auto`&&P.start(I.current||0,e),r&&r(B.current,e)};return(0,V.jsx)(O,h({in:f,onEnter:J,onEntered:X,onEntering:Y,onExit:Z,onExited:Q,onExiting:$,addEndListener:handleAddEndListener,nodeRef:B,timeout:C===`auto`?null:C},A,{children:(e,t)=>(0,V.jsx)(G,h({as:u,className:w(M.root,c,{entered:M.entered,exited:!f&&L===`0px`&&M.hidden}[e]),style:h({[R?`minWidth`:`minHeight`]:L},S),ref:U},t,{ownerState:h({},j,{state:e}),children:(0,V.jsx)(K,{ownerState:h({},j,{state:e}),className:M.wrapper,ref:F,children:(0,V.jsx)(q,{ownerState:h({},j,{state:e}),className:M.wrapperInner,children:a})})}))}))});J.muiSupportAuto=!0;var getCurrencyPair=(e,t)=>t||(e&&e.includes(`_`)?e:null);function useCurrency({ignoreInstrument:e,ignoreCurrencyPair:t=!0}={}){let r=O(),[i]=u(),{currency:a=i.get(l.currency),currencyPair:o=null}=n();if(r&&!e){let e=j.splitInstrument(r);if(e)return t?e.currency:e.currencyPair?.replace(/_USD$/g,``)}let s=getCurrencyPair(a,o);if(s){if(t){let[e,t]=s.split(`_`);return t??e}return s}return a||(e?void 0:`BTC`)}export{chunk as a,B as i,J as n,toInteger as o,U as r,toFinite as s,useCurrency as t};

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.