1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6365],{3118:function(e,t,n){var r=n(13218),l=Object.create,s=function(){function object(){}return function(e){if(!r(e))return{};if(l)return l(e);object.prototype=e;var t=new object;return object.prototype=void 0,t}}();e.exports=s},278:function(e){e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}},1062:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/firm/dbr-spenders",function(){return n(82403)}])},47031:function(e,t,n){"use strict";n.d(t,{G:function(){return DbrReplenishmentForm}});var r=n(85893),l=n(99260),s=n(2103),i=n(20868),a=n(6862),o=n(97456),c=n(95384),d=n(78349),u=n(34894),h=n(56288),x=n(48783),p=n(34292),f=n(71293),j=n(41731),m=n(49289),b=n(61744),g=n(77985),v=n(64146),w=n(67294);let DbrReplenishmentForm=e=>{var t,n,y;let{userData:D}=e,{provider:C,account:S}=(0,g.useWeb3React)(),[k,_]=(0,w.useState)(""),[B,R]=(0,w.useState)(null===(t=D.marketPositions)||void 0===t?void 0:t[0]),[W,z]=(0,w.useState)(0),{replenishmentPrice:N}=(0,o.F9)(),I=(0,o.A4)(D.user),{dolaLiquidity:P,isLoading:M}=(0,o.Vj)(null==B?void 0:B.market),T=P>=W,E=S&&I?I:D,{signedBalance:L,debt:A}=E,O=L<0?Math.abs(L):0,{costEth:F,costUsd:H}=(0,c.zS)(new v.Contract(null==B?void 0:null===(n=B.market)||void 0===n?void 0:n.address,a.TI,null==C?void 0:C.getSigner()),"forceReplenish",[D.user,k?(0,b.parseEther)((0,h.eW)(Math.abs(L),18)):"1"]),U=W-H,handleReplenish=async()=>{var e;return(0,d.mW)(null==C?void 0:C.getSigner(),D.user,null==B?void 0:null===(e=B.market)||void 0===e?void 0:e.address)},handleMarketSelect=e=>{var t;let n=D.marketPositions.findIndex(t=>t.market.address===e);R(null===(t=D.marketPositions)||void 0===t?void 0:t[n])};return((0,w.useEffect)(()=>{if(!D)return;let e=O*N*(null==B?void 0:B.market.replenishmentIncentive);z(e)},[O,D,B,N]),D)?(0,r.jsxs)(x.g,{w:"full",p:"4",children:[(0,r.jsxs)(p.U,{w:"full",justify:"space-between",children:[(0,r.jsx)(f.x,{children:"Borrower:"}),(0,r.jsx)(i.Z,{value:D.user})]}),(0,r.jsxs)(p.U,{w:"full",justify:"space-between",children:[(0,r.jsx)(f.x,{children:"Market to add cost:"}),(0,r.jsx)(j.P,{minW:"fit-content",maxW:"100px",onChange:e=>handleMarketSelect(e.target.value),children:null==D?void 0:null===(y=D.marketPositions)||void 0===y?void 0:y.map(e=>(0,r.jsx)("option",{value:e.market.address,children:e.market.name}))})]}),(0,r.jsx)(m.i,{}),(0,r.jsxs)(p.U,{w:"full",justify:"space-between",children:[(0,r.jsx)(f.x,{children:"Market's Debt:"}),(0,r.jsxs)(f.x,{fontWeight:"bold",children:[(0,u.z8)(B.debt,2)," DOLA"]})]}),(null==D?void 0:D.liquidatableDebt)!==A&&(0,r.jsxs)(p.U,{w:"full",justify:"space-between",children:[(0,r.jsx)(f.x,{children:"Total Debt:"}),(0,r.jsxs)(f.x,{fontWeight:"bold",children:[(0,u.z8)(A,2)," DOLA"]})]}),(0,r.jsxs)(p.U,{w:"full",justify:"space-between",children:[(0,r.jsx)(f.x,{children:"Replenishment Possible:"}),(0,r.jsxs)(f.x,{fontWeight:"bold",children:[(0,u.z8)(O,4,!1,!0)," DBR"]})]}),(0,r.jsxs)(p.U,{w:"full",justify:"space-between",children:[(0,r.jsx)(f.x,{children:"Replenishment Price:"}),(0,r.jsxs)(f.x,{fontWeight:"bold",children:[(0,u.z8)(N,2)," DOLA per DBR"]})]}),(0,r.jsxs)(p.U,{w:"full",justify:"space-between",children:[(0,r.jsx)(f.x,{children:"Replenishment Cost to borrower:"}),(0,r.jsxs)(f.x,{fontWeight:"bold",children:[(0,u.z8)(O*N,2,!1,!0)," DOLA"]})]}),(0,r.jsxs)(p.U,{w:"full",justify:"space-between",children:[(0,r.jsx)(f.x,{children:"Replenishment Incentive:"}),(0,r.jsxs)(f.x,{fontWeight:"bold",children:[(null==B?void 0:B.market.replenishmentIncentive)*100,"%"]})]}),(0,r.jsxs)(p.U,{w:"full",justify:"space-between",children:[(0,r.jsx)(f.x,{children:"Your reward:"}),(0,r.jsxs)(f.x,{fontWeight:"bold",children:[(0,u.z8)(W,2,!1,!0)," DOLA"]})]}),!S&&(0,r.jsx)(s.$J,{alertProps:{w:"full"},description:"Please connect wallet"}),(0,r.jsx)(l.Mm,{isDisabled:W<=0||!T,refreshOnSuccess:!0,onClick:handleReplenish,children:"Replenish"}),!!S&&(0,r.jsxs)(x.g,{pt:"4",w:"full",alignItems:"flex-start",children:[(0,r.jsx)(s.$J,{alertProps:{w:"full"},description:M||T?"You only pay a transaction fee and get a DOLA reward while the borrower has their debt increased. Note: use flashbot rpc to not be frontrun by a bot.":"Not enough DOLA liquidity in the market at the moment to pay the reward."}),(0,r.jsxs)(p.U,{w:"full",justify:"space-between",children:[(0,r.jsxs)(f.x,{children:["Tx cost: ~",(0,u.z8)(F,4)," (",(0,u.z8)(H,2,!0),")"]}),(0,r.jsxs)(f.x,{color:U>
10?"success":"error",children:["Profit: ",(0,u.z8)(U,2,!0)]})]})]})]}):null}},69258:function(e,t,n){"use strict";n.d(t,{u:function(){return DbrSpenders}});var r=n(85893),l=n(93717),s=n(55281),i=n(71293),a=n(48783),o=n(82730),c=n(72177),d=n(49289),u=n(34292),h=n(38049),x=n(22797),p=n(34894),f=n(59839),j=n(90361),m=n(52622),b=n(71802),g=n(20868),v=n(67294),w=n(24247),y=n(47031);let DbrReplenishmentModal=e=>{let{userData:t,onClose:n,isOpen:l}=e;return(0,r.jsx)(w.u,{header:"Replenishment Form",onClose:n,isOpen:l,children:(0,r.jsx)(y.G,{userData:t})})};var D=n(93036),C=n(97456),S=n(83045),k=n(11117),_=n(39665),B=n(58523),R=n(69685),W=n(56288),z=n(18618);let DbrHistoBalanceChart=e=>{let{account:t}=e,{evolution:n,currentBalance:l,isLoading:s}=(0,C.tG)(t),[o,c]=(0,v.useState)(600),[d]=(0,z.a)("(min-width: ".concat(600,"px)"));return(0,v.useEffect)(()=>{c(d?600:(screen.availWidth||screen.width)-40)},[d]),(0,r.jsxs)(a.g,{w:"full",overflow:"hidden",pt:"2",children:[s&&(0,r.jsxs)(a.g,{w:"full",p:"2",children:[(0,r.jsx)(i.x,{children:"Please wait this may take some time..."}),(0,r.jsx)(R.n4,{})]}),!s&&(null==n?void 0:n.length)>0&&(0,r.jsx)(B.b,{showMonthlyBarChart:!1,maxChartWidth:o,chartWidth:o,chartData:n,isDollars:!1,smoothLineByDefault:!0,areaProps:{title:"number"==typeof l?"Current DBR balance: ".concat((0,W.sR)(l,2)):void 0,forceStaticRangeBtns:!0,id:"dbr-balance-histo-chart",showRangeBtns:!0,yLabel:"Historical DBR balance",useRecharts:!0,simplifyData:!0,showMaxY:!1,showTooltips:!0,autoMinY:!0,mainColor:"info",allowZoom:!0}})]})},DbrHistoBalanceModal=e=>{let{onClose:t,isOpen:n,account:l}=e;return(0,r.jsx)(k.Z,{title:"DBR Balance History for ".concat((0,_.Xn)(l)),minW:{base:"98vw",lg:"800px",xl:"1000px"},isOpen:n,onClose:t,children:(0,r.jsx)(DbrHistoBalanceChart,{account:l})})};var N=n(92069),I=n(70550),P=n(53482);let ColHeader=e=>{let{...t}=e;return(0,r.jsx)(l.k,{justify:"flex-start",minWidth:"100px",fontSize:"14px",fontWeight:"extrabold",...t})},Cell=e=>{let{...t}=e;return(0,r.jsx)(s.K,{direction:"row",fontSize:"14px",fontWeight:"normal",justify:"flex-start",minWidth:"100px",...t})},CellText=e=>{let{...t}=e;return(0,r.jsx)(i.x,{fontSize:"16px",...t})},StatBasic=e=>{let{value:t,name:n,isLoading:l=!1}=e;return(0,r.jsxs)(a.g,{children:[l?(0,r.jsx)(S.P,{width:"100px"}):(0,r.jsx)(i.x,{textAlign:"center",color:"secondary",fontSize:{base:"18px",sm:"24px"},fontWeight:"extrabold",children:t}),(0,r.jsx)(i.x,{textAlign:"center",color:"mainTextColor",fontSize:{base:"14px",sm:"16px"},fontWeight:"bold",children:n})]})},Spender=e=>{let{user:t}=e,{addressName:n}=(0,N.v)(t);return(0,r.jsxs)(Cell,{w:"100px",justify:"flex-start",position:"relative",onClick:e=>e.stopPropagation(),children:[(0,r.jsx)(m.Z,{isExternal:!0,href:"/firm?viewAddress=".concat(t),children:(0,r.jsx)(b.ON,{color:"blue.600",boxSize:3})}),(0,r.jsx)(g.Z,{value:t,label:n||(0,_.Xn)(t)})]})},DbrSpenders=e=>{var t;let{}=e,{priceUsd:n}=(0,C.Y1)(),{positions:l,timestamp:s,isLoading:m}=(0,j.lz)(),{onOpen:b,onClose:g,isOpen:w}=(0,o.q)(),{onOpen:y,onClose:S,isOpen:k}=(0,o.q)(),[_,B]=(0,v.useState)(null),[R,W]=(0,v.useState)(""),[z,N]=(0,v.useState)(!0),openDbrHisto=e=>{W(e),y()},M=[{field:"user",label:"Borrower",header:e=>{let{...t}=e;return(0,r.jsx)(ColHeader,{justify:"flex-start",...t,minWidth:"100px"})},value:e=>{let{user:t}=e;return(0,r.jsx)(Spender,{user:t})},showFilter:!0,filterWidth:"100px"},{field:"signedBalance",label:"DBR Signed Balance",header:e=>{let{...t}=e;return(0,r.jsx)(ColHeader,{minWidth:"150px",justify:"center",...t})},value:e=>{let{signedBalance:t,user:n}=e;return(0,r.jsx)(Cell,{minWidth:"150px",justify:"center",children:(0,r.jsx)(CellText,{onClick:e=>{e.stopPropagation(),openDbrHisto(n)},cursor:"pointer",textDecoration:"underline",color:t<0?"error":"mainTextColor",children:(0,p.z8)(t,t<0?4:2,!1,t>0)})})}},{field:"debt",label:"DOLA Debt",header:e=>{let{...t}=e;return(0,r.jsx)(ColHeader,{minWidth:"100px",justify:"center",...t})},value:e=>{let{debt:t}=e;return(0,r.jsx)(Cell,{minWidth:"100px",justify:"center",children:(0,r.jsx)(CellText,{children:(0,p.z8)(t,2,!1,!0)})})}},{field:"dailyBurn",label:"DBR Daily Spend",header:e=>{let{...t}=e;return(0,r.jsx)(ColHeader,{minWidth:"100px",justify:"center",...t})},value:e=>{let{dailyBurn:t}=e;return(0,r.jsx)(Cell,{minWidth:"100px",justify:"center",children:(0,r.jsxs)(CellText,{children:["-",(0,p.z8)(t,2)]})})}},{field:"monthlyBurn",label:"DBR Monthly Spend",header:e=>{let{...t}=e;return(0,r.jsx)(ColHeader,{minWidth:"100px",justify:"center",...t})},value:e=>{let{monthlyBurn:t}=e;return(0,r.jsx)(Cell,{minWidth:"100px",justify:"center",children:(0,r.jsxs)(CellText,{children:["-",(0,p.z8)(t,2)]})})}},{field:"dbrExpiryDate",label:"DBR Depletion",header:e=>{let{...t}=e;return(0,r.jsx)(ColHeader,{minWidth:"120px",justify:"center",...t})},value:e=>{let{dbrExpiryDate:t}=e;return(0,r.jsxs)(Cell,{spacing:"0",alignItems:"center",direction:"column",minWidth:"120px",justify:"center",children:[(0,r.jsx)(CellText,{children:(0,P.p6)(t).replace("Invalid Date","Distant Future")}),(0,r.jsx)(CellText,{color:"secondaryTextColor",children:(0,P.Zh)(t).replace("Invalid Date","Distant Future")})]})}},{field:"marketIcons",label:"Top 3 Debts",header:e=>{let{...t}=e;return(0,r.jsx)(ColHeader,{minWidth:"100px",justify:"center",...t})},value:e=>{let{marketIcons:t,marketPositions:n}=e;return(0,r.jsx)(Cell,{minWidth:"100px",justify:"center",children:n.slice(0,3).map((e,n)=>e.debt>0?(0,r.jsx)(I.Jv,{icon:t[n],underlying:e.market.underlying}):null)})}}],openReplenish=async e=>{B(e),b()},T=l.reduce((e,t)=>
1e+t.dailyBurn,0),E=l.reduce((e,t)=>e+t.deficit,0);l.reduce((e,t)=>e+t.debt,0);let L=30.416*T,A=365*T,O={base:"12px",sm:"14px"};return(0,r.jsxs)(a.g,{w:"full",spacing:{base:"4",sm:"8"},children:[(0,r.jsxs)(c.M,{px:"4",justify:"space-between",w:"full",columns:{base:3},spacing:{base:"4",sm:"6"},children:[(0,r.jsx)(StatBasic,{isLoading:m,name:"DBR Daily spend",value:"".concat((0,p.z8)(T,2)," (").concat((0,p.z8)(n*T,2,!0),")")}),(0,r.jsx)(StatBasic,{isLoading:m,name:"DBR Monthly spend",value:"".concat((0,p.z8)(L,2)," (").concat((0,p.z8)(n*L,2,!0),")")}),(0,r.jsx)(StatBasic,{isLoading:m,name:"DBR Yearly spend",value:"".concat((0,p.z8)(A,2)," (").concat((0,p.z8)(n*A,2,!0),")")})]}),(0,r.jsx)(d.i,{}),(0,r.jsxs)(f.Z,{label:"Active DBR Spenders",noPadding:!0,py:"4",description:s?"Last update ".concat((0,P.VG)(s)):"Loading...",contentProps:{maxW:{base:"90vw",sm:"100%"},overflowX:"auto"},headerProps:{direction:{base:"column",md:"row"},align:{base:"flex-start",md:"flex-end"}},right:(0,r.jsxs)(u.U,{pt:"2",alignItems:"flex-start",justify:"space-between",spacing:{base:"2",sm:"4"},children:[(0,r.jsxs)(a.g,{spacing:"0",alignItems:{base:"flex-start",sm:"center"},children:[(0,r.jsxs)(h.NI,{w:"fit-content",cursor:"pointer",justifyContent:"flex-start",display:"inline-flex",alignItems:"center",children:[(0,r.jsx)(i.x,{fontSize:O,whitespace:"no-wrap",w:"fit-content",mr:"1",onClick:()=>N(!z),children:"Hide small spenders"}),(0,r.jsx)(x.r,{onChange:e=>N(!z),size:"sm",colorScheme:"purple",isChecked:z})]}),(0,r.jsx)(i.x,{textAlign:"left",fontSize:O,color:"secondaryTextColor",children:"(Debt under 1,000)"})]}),(0,r.jsxs)(a.g,{spacing:"0",alignItems:{base:"flex-start",sm:"center"},children:[(0,r.jsx)(i.x,{textAlign:"left",fontSize:O,fontWeight:"bold",children:"Total DBR Deficit"}),(0,r.jsx)(i.x,{textAlign:"left",fontSize:O,color:E<0?"error":"secondaryTextColor",children:E?(0,p.z8)(E,2):"No Deficit"})]})]}),children:[!!_&&(null==_?void 0:null===(t=_.marketPositions)||void 0===t?void 0:t.length)>0&&(0,r.jsx)(DbrReplenishmentModal,{isOpen:w,onClose:g,userData:_}),!!R&&k&&(0,r.jsx)(DbrHistoBalanceModal,{account:R,isOpen:k,onClose:S}),(0,r.jsx)(D.ZP,{keyName:"user",noDataMessage:m?"Loading":"No DBR deficits in last update",columns:M,items:l.filter(e=>!z||e.debt>=1e3),onClick:e=>openReplenish(e),defaultSort:"dbrExpiryDate",defaultSortDir:"asc"})]})]})}},63673:function(e,t,n){"use strict";n.d(t,{I:function(){return BarChart12Months}});var r=n(85893),l=n(18618),s=n(67294),i=n(88414),a=n(34894),o=n(53482);let c=[...Array(12).keys()],BarChart12Months=e=>{let{chartData:t,maxChartWidth:n=900,chartWidth:d=900,eventName:u,yAttribute:h,isDollars:x,xDateFormat:p="",months:f=c,...j}=e,[m,b]=(0,s.useState)(n),[g]=(0,l.a)("(min-width: ".concat(n,"px)"));(0,s.useEffect)(()=>{b(g?n:(screen.availWidth||screen.width)-40)},[g]);let v=d||m,w=new Date().getUTCFullYear(),y=new Date().getUTCMonth(),D=f.length,C=[u].map(e=>f.map(n=>{let r=Date.UTC(w,y-(D-1)+n),l=new Date(r).getUTCMonth(),s=new Date(r).getUTCFullYear(),i=t.filter(e=>e.month===l&&e.year===s).reduce((e,t)=>e+(t[h]||0),0);return{label:"".concat(e,"s: ").concat((0,a.J_)(i,2,x)),x:(0,o.aI)(r,v>400),y:i}}));return(0,r.jsx)(i.v,{width:v,isDollars:x,yLabel:u,...j,groupedData:C})}},58523:function(e,t,n){"use strict";n.d(t,{b:function(){return DefaultCharts}});var r=n(85893),l=n(18618),s=n(55281),i=n(34292),a=n(71293),o=n(22797),c=n(57139),d=n(67294),u=n(63673),h=n(25802);let DefaultCharts=e=>{let{chartData:t,maxChartWidth:n=800,chartWidth:x,areaProps:p,barProps:f,isDollars:j,isPerc:m,showAreaChart:b=!0,showMonthlyBarChart:g=!1,direction:v="column",showCustomizationBar:w=!1,smoothLineByDefault:y=!0,custombarChildren:D,containerProps:C}=e,[S,k]=(0,d.useState)(y),[_,B]=(0,d.useState)(n),[R]=(0,l.a)("(min-width: ".concat(n,"px)")),{themeStyles:W}=(0,h.V)(),z=[W.colors.secondary];(0,d.useEffect)(()=>{B(R?n:(screen.availWidth||screen.width)-40)},[R]);let N=x||_;return(0,r.jsxs)(s.K,{w:"full",direction:v,justify:"space-between",alignItems:"center",...C,children:[w&&(0,r.jsxs)(s.K,{w:"full",direction:{base:"column",md:"row"},justify:"space-between",children:[(0,r.jsxs)(i.U,{children:[(0,r.jsx)(a.x,{fontSize:"16px",children:"Smooth line"}),(0,r.jsx)(o.r,{value:"true",isChecked:S,onChange:()=>k(!S)})]}),D]}),b&&(0,r.jsx)(c.T,{showTooltips:!0,height:300,width:N,data:t,domainYpadding:"auto",mainColor:"secondary",isDollars:j,isPerc:m,interpolation:(null==p?void 0:p.interpolation)||(S?"basis":"stepAfter"),...p}),g&&(0,r.jsx)(u.I,{chartData:t,maxChartWidth:n,chartWidth:N,colorScale:z,isDollars:j,eventName:"Value",yAttribute:"yDay",...f})]})}},51650:function(e,t,n){"use strict";n.d(t,{S:function(){return ErrorBoundary}});var r=n(85893),l=n(67294),s=n(93717),i=n(2103);let ErrorBoundary=class ErrorBoundary extends l.Component{static getDerivedStateFromError(e){return{hasError:!0}}componentDidCatch(e,t){console.error("Uncaught error:",e,t)}render(){return this.state.hasError?null===this.props.description?null:(0,r.jsx)(s.k,{alignItems:"center",justifyContent:"center",p:"2",w:"full",h:"full",children:(0,r.jsx)(i.g7,{title:this.props.title,de
1scription:this.props.description||"An error occured, please try reloading the page"})}):this.props.children}constructor(...e){super(...e),this.state={hasError:!1}}}},82403:function(e,t,n){"use strict";n.r(t),n.d(t,{F2DbrSpendersPage:function(){return F2DbrSpendersPage}});var r=n(85893),l=n(48783),s=n(51650),i=n(42057),a=n(63977),o=n(9008),c=n.n(o),d=n(69258);let F2DbrSpendersPage=()=>(0,r.jsxs)(i.Z,{children:[(0,r.jsx)(c(),{children:(0,r.jsx)("title",{children:"Inverse Finance - FiRM DBR Deficits"})}),(0,r.jsx)(a.E0,{active:"Earn",activeSubmenu:"Replenish DBR"}),(0,r.jsx)(s.S,{children:(0,r.jsx)(l.g,{w:"full",maxW:"1200px",mt:"4",children:(0,r.jsx)(d.u,{})})})]});t.default=F2DbrSpendersPage},39371:function(e,t,n){"use strict";n.d(t,{l:function(){return d}});var r=n(38049),l=n(16554),s=n(77030),i=n(67798),a=n(48618),o=n(25432),c=n(85893),d=(0,l.G)(function(e,t){var n;let l=(0,s.mq)("FormLabel",e),d=(0,i.Lr)(e),{className:h,children:x,requiredIndicator:p=(0,c.jsx)(u,{}),optionalIndicator:f=null,...j}=d,m=(0,r.NJ)(),b=null!=(n=null==m?void 0:m.getLabelProps(j,t))?n:{ref:t,...j};return(0,c.jsxs)(a.m.label,{...b,className:(0,o.cx)("chakra-form__label",d.className),__css:{display:"block",textAlign:"start",...l},children:[x,(null==m?void 0:m.isRequired)?p:f]})});d.displayName="FormLabel";var u=(0,l.G)(function(e,t){let n=(0,r.NJ)(),l=(0,r.e)();if(!(null==n?void 0:n.isRequired))return null;let s=(0,o.cx)("chakra-form__required-indicator",e.className);return(0,c.jsx)(a.m.span,{...null==n?void 0:n.getRequiredIndicatorProps(e,t),__css:l.requiredIndicator,className:s})});u.displayName="RequiredIndicator"},41731:function(e,t,n){"use strict";n.d(t,{P:function(){return h}});var r=n(25432),l=n(16554),s=n(48618),i=n(85893),a=(0,l.G)(function(e,t){let{children:n,placeholder:l,className:a,...o}=e;return(0,i.jsxs)(s.m.select,{...o,ref:t,className:(0,r.cx)("chakra-select",a),children:[l&&(0,i.jsx)("option",{value:"",children:l}),n]})});a.displayName="SelectField";var o=n(41001),c=n(77030),d=n(67798),u=n(67294),h=(0,l.G)((e,t)=>{var n;let l=(0,c.jC)("Select",e),{rootProps:u,placeholder:h,icon:x,color:p,height:f,h:j,minH:m,minHeight:b,iconColor:g,iconSize:v,...w}=(0,d.Lr)(e),[y,D]=function(e,t){let n={},r={};for(let[l,s]of Object.entries(e))t.includes(l)?n[l]=s:r[l]=s;return[n,r]}(w,d.oE),C=(0,o.Y)(D),S={paddingEnd:"2rem",...l.field,_focus:{zIndex:"unset",...null==(n=l.field)?void 0:n._focus}};return(0,i.jsxs)(s.m.div,{className:"chakra-select__wrapper",__css:{width:"100%",height:"fit-content",position:"relative",color:p},...y,...u,children:[(0,i.jsx)(a,{ref:t,height:null!=j?j:f,minH:null!=m?m:b,placeholder:h,...C,__css:S,children:e.children}),(0,i.jsx)(SelectIcon,{"data-disabled":(0,r.PB)(C.disabled),...(g||p)&&{color:g||p},__css:l.icon,...v&&{fontSize:v},children:x})]})});h.displayName="Select";var DefaultIcon=e=>(0,i.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,i.jsx)("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})}),x=(0,s.m)("div",{baseStyle:{position:"absolute",display:"inline-flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",top:"50%",transform:"translateY(-50%)"}}),SelectIcon=e=>{let{children:t=(0,i.jsx)(DefaultIcon,{}),...n}=e,r=(0,u.cloneElement)(t,{role:"presentation",className:"chakra-select__icon",focusable:!1,"aria-hidden":!0,style:{width:"1em",height:"1em",color:"currentColor"}});return(0,i.jsx)(x,{...n,className:"chakra-select__icon-wrapper",children:(0,u.isValidElement)(t)?r:null})};SelectIcon.displayName="SelectIcon"},22797:function(e,t,n){"use strict";n.d(t,{r:function(){return u}});var r=n(8445),l=n(25432),s=n(16554),i=n(77030),a=n(67798),o=n(48618),c=n(67294),d=n(85893),u=(0,s.G)(function(e,t){let n=(0,i.jC)("Switch",e),{spacing:s="0.5rem",children:u,...h}=(0,a.Lr)(e),{getIndicatorProps:x,getInputProps:p,getCheckboxProps:f,getRootProps:j,getLabelProps:m}=(0,r.O)(h),b=(0,c.useMemo)(()=>({display:"inline-block",position:"relative",verticalAlign:"middle",lineHeight:0,...n.container}),[n.container]),g=(0,c.useMemo)(()=>({display:"inline-flex",flexShrink:0,justifyContent:"flex-start",boxSizing:"content-box",cursor:"pointer",...n.track}),[n.track]),v=(0,c.useMemo)(()=>({userSelect:"none",marginStart:s,...n.label}),[s,n.label]);return(0,d.jsxs)(o.m.label,{...j(),className:(0,l.cx)("chakra-switch",e.className),__css:b,children:[(0,d.jsx)("input",{className:"chakra-switch__input",...p({},t)}),(0,d.jsx)(o.m.span,{...f(),className:"chakra-switch__track",__css:g,children:(0,d.jsx)(o.m.span,{__css:n.thumb,className:"chakra-switch__thumb",...x()})}),u&&(0,d.jsx)(o.m.span,{className:"chakra-switch__label",...m(),__css:v,children:u})]})});u.displayName="Switch"}},function(e){e.O(0,[9785,8445,1905,4879,5213,7699,5902,3644,1141,4727,1915,3167,2206,7877,6852,550,9002,9774,2888,179],function(){return e(e.s=1062)}),_N_E=e.O()}]);
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.