(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2888],{26366:function(e,t,n){"use strict";n.d(t,{X:function(){return u}});var r=n(72621),i=n(66454),o=n(9388),a=n(19829),s=n(85893),u=(0,o.G)(function(e,t){let n=(0,r.uL)(),{status:o}=(0,r.oX)(),u={display:"inline",...n.description};return(0,s.jsx)(a.m.div,{ref:t,"data-status":o,...e,className:(0,i.cx)("chakra-alert__desc",e.className),__css:u})});u.displayName="AlertDescription"},67898:function(e,t,n){"use strict";n.d(t,{C:function(){return u}});var r=n(72621),i=n(66454),o=n(9388),a=n(19829),s=n(85893),u=(0,o.G)(function(e,t){let n=(0,r.uL)(),{status:o}=(0,r.oX)();return(0,s.jsx)(a.m.div,{ref:t,"data-status":o,...e,className:(0,i.cx)("chakra-alert__title",e.className),__css:n.title})});u.displayName="AlertTitle"},72621:function(e,t,n){"use strict";n.d(t,{uZ:function(){return u},Hm:function(){return c},TR:function(){return f},XO:function(){return h},oX:function(){return l},uL:function(){return d}});var r=n(9792),i=n(85893);function o(e){return(0,i.jsx)(r.J,{viewBox:"0 0 24 24",...e,children:(0,i.jsx)("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})}var a=n(15182),s=n(45830),[u,l]=(0,a.k)({name:"AlertContext",hookName:"useAlertContext",providerName:""}),[c,d]=(0,a.k)({name:"AlertStylesContext",hookName:"useAlertStyles",providerName:""}),p={info:{icon:function(e){return(0,i.jsx)(r.J,{viewBox:"0 0 24 24",...e,children:(0,i.jsx)("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"})})},colorScheme:"blue"},warning:{icon:o,colorScheme:"orange"},success:{icon:function(e){return(0,i.jsx)(r.J,{viewBox:"0 0 24 24",...e,children:(0,i.jsx)("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"})})},colorScheme:"green"},error:{icon:o,colorScheme:"red"},loading:{icon:s.$,colorScheme:"blue"}};function f(e){return p[e].colorScheme}function h(e){return p[e].icon}},17357:function(e,t,n){"use strict";n.d(t,{b:function(){return c}});var r=n(72621),i=n(66454),o=n(9388),a=n(70586),s=n(51236),u=n(19829),l=n(85893),c=(0,o.G)(function(e,t){var n;let{status:o="info",addRole:c=!0,...d}=(0,a.Lr)(e),p=null!=(n=e.colorScheme)?n:(0,r.TR)(o),f=(0,s.jC)("Alert",{...e,colorScheme:p}),h={width:"100%",display:"flex",alignItems:"center",position:"relative",overflow:"hidden",...f.container};return(0,l.jsx)(r.uZ,{value:{status:o},children:(0,l.jsx)(r.Hm,{value:f,children:(0,l.jsx)(u.m.div,{"data-status":o,role:c?"alert":void 0,ref:t,...d,className:(0,i.cx)("chakra-alert",e.className),__css:h})})})});c.displayName="Alert"},30989:function(e,t,n){"use strict";n.d(t,{P:function(){return c}});var r=n(9792),i=n(9388),o=n(51236),a=n(70586),s=n(19829),u=n(85893);function l(e){return(0,u.jsx)(r.J,{focusable:"false","aria-hidden":!0,...e,children:(0,u.jsx)("path",{fill:"currentColor",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"})})}var c=(0,i.G)(function(e,t){let n=(0,o.mq)("CloseButton",e),{children:r,isDisabled:i,__css:c,...d}=(0,a.Lr)(e);return(0,u.jsx)(s.m.button,{type:"button","aria-label":"Close",ref:t,disabled:i,__css:{outline:0,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,...n,...c},...d,children:r||(0,u.jsx)(l,{width:"1em",height:"1em"})})});c.displayName="CloseButton"},12916:function(e,t,n){"use strict";n.d(t,{If:function(){return o},kc:function(){return i}});var r=n(67294),i=(0,r.createContext)({});function o(){let e=(0,r.useContext)(i);if(void 0===e)throw Error("useColorMode must be used within a ColorModeProvider");return e}i.displayName="ColorModeContext"},9792:function(e,t,n){"use strict";n.d(t,{J:function(){return l}});var r=n(9388),i=n(51236),o=n(19829),a=n(66454),s=n(85893),u={path:(0,s.jsxs)("g",{stroke:"currentColor",strokeWidth:"1.5",children:[(0,s.jsx)("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),(0,s.jsx)("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),(0,s.jsx)("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]}),viewBox:"0 0 24 24"},l=(0,r.G)((e,t)=>{let{as:n,viewBox:r,color:l="currentColor",focusable:c=!1,children:d,className:p,__css:f,...h}=e,m=(0,a.cx)("chakra-icon",p),g=(0,i.mq)("Icon",e),y={w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:l,...f,...g},b={ref:t,focusable:c,className:m,__css:y},_=null!=r?r:u.viewBox;if(n&&"string"!=typeof n)return(0,s.jsx)(o.m.svg,{as:n,...b,...h});let v=null!=d?d:u.path;return(0,s.jsx)(o.m.svg,{verticalAlign:"middle",viewBox:_,...b,...h,children:v})});l.displayName="Icon"},38751:function(e,t,n){"use strict";n.d(t,{xu:function(){return a}});var r=n(19829),i=n(9388),o=n(85893),a=(0,r.m)("div");a.displayName="Box";var s=(0,i.G)(function(e,t){let{size:n,centerContent:r=!0,...i}=e;return(0,o.jsx)(a,{ref:t,boxSize:n,__css:{...r?{display:"flex",alignItems:"center",justifyContent:"center"}:{},flexShrink:0,flexGrow:0},...i})});s.displayName="Square",(0,i.G)(function(e,t){let{size:n,...r}=e;return(0,o.jsx)(s,{size:n,ref:t,borderRadius:"9999px",...r})}).displayName="Circle"},29196:function(e,t,n){"use strict";n.d(t,{X:function(){return l}});var r=n(9388),i=n(51236),o=n(70586),a=n(19829),s=n(66454),u=n(85893),l=(0,r.G)(function(e,t){let n=(0,i.mq)("Heading",e),{className:r,...l}=(0,o.Lr)(e);return(0,u.jsx)(a.m.h2,{ref:t,className:(0,s.cx)("chakra-heading",e.className),...l,__css:n})});l.displayName="Heading"},95033:function(e,t,n){"use strict";n.d(t,{k:function(){return a}});var r=n(9388),i=n(19829),o=n(85893),a=(0,r.G)(function(e,t){let{direction:n,align:r,justify:a,wrap:s,basis:u,grow:l,shrink:c,...d}=e;return(0,o.jsx)(i.m.div,{ref:t,__css:{display:"flex",flexDirection:n,alignItems:r,justifyContent:a,flexWrap:s,flexBasis:u,flexGrow:l,flexShrink:c},...d})});a.displayName="Flex"},73458:function(e,t,n){"use strict";n.d(t,{x:function(){return c}});var r=n(9388),i=n(51236),o=n(70586),a=n(19829),s=n(66454),u=n(42942),l=n(85893),c=(0,r.G)(function(e,t){let n=(0,i.mq)("Text",e),{className:r,align:c,decoration:d,casing:p,...f}=(0,o.Lr)(e),h=(0,u.o)({textAlign:e.align,textDecoration:e.decoration,textTransform:e.casing});return(0,l.jsx)(a.m.p,{ref:t,className:(0,s.cx)("chakra-text",e.className),...h,...f,__css:n})});c.displayName="Text"},42942:function(e,t,n){"use strict";function r(e){let t=Object.assign({},e);for(let e in t)void 0===t[e]&&delete t[e];return t}n.d(t,{o:function(){return r}})},94443:function(e,t,n){"use strict";n.d(t,{L:function(){return a},h:function(){return s}});var r=n(15182),i=n(85893),[o,a]=(0,r.k)({strict:!1,name:"PortalManagerContext"});function s(e){let{children:t,zIndex:n}=e;return(0,i.jsx)(o,{value:{zIndex:n},children:t})}s.displayName="PortalManager"},56841:function(e,t,n){"use strict";n.d(t,{h:function(){return m}});var r=n(94443),i=n(6228),o=n(15182),a=n(73935),s=n(67294),u=n(85893),[l,c]=(0,o.k)({strict:!1,name:"PortalContext"}),d="chakra-portal",p=e=>(0,u.jsx)("div",{className:"chakra-portal-zIndex",style:{position:"absolute",zIndex:e.zIndex,top:0,left:0,right:0},children:e.children}),f=e=>{let{appendToParentPortal:t,children:n}=e,[o,f]=(0,s.useState)(null),h=(0,s.useRef)(null),[,m]=(0,s.useState)({});(0,s.useEffect)(()=>m({}),[]);let g=c(),y=(0,r.L)();(0,i.G)(()=>{if(!o)return;let e=o.ownerDocument,n=t&&null!=g?g:e.body;if(!n)return;h.current=e.createElement("div"),h.current.className=d,n.appendChild(h.current),m({});let r=h.current;return()=>{n.contains(r)&&n.removeChild(r)}},[o]);let b=(null==y?void 0:y.zIndex)?(0,u.jsx)(p,{zIndex:null==y?void 0:y.zIndex,children:n}):n;return h.current?(0,a.createPortal)((0,u.jsx)(l,{value:h.current,children:b}),h.current):(0,u.jsx)("span",{ref:e=>{e&&f(e)}})},h=e=>{let{children:t,containerRef:n,appendToParentPortal:r}=e,o=n.current,c=null!=o?o:"undefined"!=typeof window?document.body:void 0,p=(0,s.useMemo)(()=>{let e=null==o?void 0:o.ownerDocument.createElement("div");return e&&(e.className=d),e},[o]),[,f]=(0,s.useState)({});return((0,i.G)(()=>f({}),[]),(0,i.G)(()=>{if(p&&c)return c.appendChild(p),()=>{c.removeChild(p)}},[p,c]),c&&p)?(0,a.createPortal)((0,u.jsx)(l,{value:r?p:null,children:t}),p):null};function m(e){let t={appendToParentPortal:!0,...e},{containerRef:n,...r}=t;return n?(0,u.jsx)(h,{containerRef:n,...r}):(0,u.jsx)(f,{...r})}m.className=d,m.selector=".chakra-portal",m.displayName="Portal"},15182:function(e,t,n){"use strict";n.d(t,{k:function(){return i}});var r=n(67294);function i(e={}){let{name:t,strict:n=!0,hookName:i="useContext",providerName:o="Provider",errorMessage:a,defaultValue:s}=e,u=(0,r.createContext)(s);return u.displayName=t,[u.Provider,function e(){var t;let s=(0,r.useContext)(u);if(!s&&n){let n=Error(null!=a?a:`${i} returned \`undefined\`. Seems you forgot to wrap component within ${o}`);throw n.name="ContextError",null==(t=Error.captureStackTrace)||t.call(Error,n,e),n}return s},u]}},62583:function(e,t,n){"use strict";n.d(t,{W:function(){return i}});var r=n(67294);function i(e,t=[]){let n=(0,r.useRef)(e);return(0,r.useEffect)(()=>{n.current=e}),(0,r.useCallback)((...e)=>{var t;return null==(t=n.current)?void 0:t.call(n,...e)},t)}},6228:function(e,t,n){"use strict";n.d(t,{G:function(){return i}});var r=n(67294),i=(null==globalThis?void 0:globalThis.document)?r.useLayoutEffect:r.useEffect},80194:function(e,t,n){"use strict";n.d(t,{r:function(){return i}});var r=n(67294);function i(e,t){let n=(0,r.useRef)(!1),i=(0,r.useRef)(!1);(0,r.useEffect)(()=>{let t=n.current,r=t&&i.current;if(r)return e();i.current=!0},t),(0,r.useEffect)(()=>(n.current=!0,()=>{n.current=!1}),[])}},66454:function(e,t,n){"use strict";n.d(t,{Kn:function(){return i},PB:function(){return u},PP:function(){return d},Pu:function(){return a},Qm:function(){return l},ZK:function(){return o},cx:function(){return r},v0:function(){return c}});var r=(...e)=>e.filter(Boolean).join(" ");function i(e){let t=typeof e;return null!=e&&("object"===t||"function"===t)&&!Array.isArray(e)}var o=e=>{let{condition:t,message:n}=e};function a(e,...t){return s(e)?e(...t):e}var s=e=>"function"==typeof e,u=e=>e?"":void 0,l=e=>!!e||void 0;function c(...e){return function(t){e.some(e=>(null==e||e(t),null==t?void 0:t.defaultPrevented))}}function d(...e){return function(t){e.forEach(e=>{null==e||e(t)})}}},45830:function(e,t,n){"use strict";n.d(t,{$:function(){return d}});var r=n(70917),i=n(9388),o=n(51236),a=n(70586),s=n(19829),u=n(66454),l=n(85893),c=(0,r.F4)({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),d=(0,i.G)((e,t)=>{let n=(0,o.mq)("Spinner",e),{label:r="Loading...",thickness:i="2px",speed:d="0.45s",emptyColor:p="transparent",className:f,...h}=(0,a.Lr)(e),m=(0,u.cx)("chakra-spinner",f),g={display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:i,borderBottomColor:p,borderLeftColor:p,animation:`${c} ${d} linear infinite`,...n};return(0,l.jsx)(s.m.div,{ref:t,__css:g,className:m,...h,children:r&&(0,l.jsx)(s.m.span,{srOnly:!0,children:r})})});d.displayName="Spinner"},70586:function(e,t,n){"use strict";n.d(t,{D:function(){return eO},K1:function(){return eM},Lr:function(){return eR},Ud:function(){return eB},ZR:function(){return eA},_6:function(){return er},c0:function(){return ev},cC:function(){return ek},fj:function(){return eC},gJ:function(){return en},iv:function(){return eE},k0:function(){return eP}});var r=n(66454),i=n(38554),o=n.n(i),a=e=>/!(important)?$/.test(e),s=e=>"string"==typeof e?e.replace(/!(important)?$/,"").trim():e,u=(e,t)=>n=>{let i=String(t),o=a(i),u=s(i),l=e?`${e}.${u}`:u,c=(0,r.Kn)(n.__cssMap)&&l in n.__cssMap?n.__cssMap[l].varRef:t;return c=s(c),o?`${c} !important`:c};function l(e){let{scale:t,transform:n,compose:r}=e,i=(e,i)=>{var o;let a=u(t,e)(i),s=null!=(o=null==n?void 0:n(a,i))?o:a;return r&&(s=r(s,i)),s};return i}var c=(...e)=>t=>e.reduce((e,t)=>t(e),t);function d(e,t){return n=>{let r={property:n,scale:e};return r.transform=l({scale:e,transform:t}),r}}var p=({rtl:e,ltr:t})=>n=>"rtl"===n.direction?e:t,f=["rotate(var(--chakra-rotate, 0))","scaleX(var(--chakra-scale-x, 1))","scaleY(var(--chakra-scale-y, 1))","skewX(var(--chakra-skew-x, 0))","skewY(var(--chakra-skew-y, 0))"],h={"--chakra-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-sepia":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-drop-shadow":"var(--chakra-empty,/*!*/ /*!*/)",filter:"var(--chakra-blur) var(--chakra-brightness) var(--chakra-contrast) var(--chakra-grayscale) var(--chakra-hue-rotate) var(--chakra-invert) var(--chakra-saturate) var(--chakra-sepia) var(--chakra-drop-shadow)"},m={backdropFilter:"var(--chakra-backdrop-blur) var(--chakra-backdrop-brightness) var(--chakra-backdrop-contrast) var(--chakra-backdrop-grayscale) var(--chakra-backdrop-hue-rotate) var(--chakra-backdrop-invert) var(--chakra-backdrop-opacity) var(--chakra-backdrop-saturate) var(--chakra-backdrop-sepia)","--chakra-backdrop-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-opacity":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-sepia":"var(--chakra-empty,/*!*/ /*!*/)"},g={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},y={"to-t":"to top","to-tr":"to top right","to-r":"to right","to-br":"to bottom right","to-b":"to bottom","to-bl":"to bottom left","to-l":"to left","to-tl":"to top left"},b=new Set(Object.values(y)),_=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),v=e=>e.trim(),w=e=>"string"==typeof e&&e.includes("(")&&e.includes(")"),k=e=>{let t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}},x=e=>t=>`${e}(${t})`,A={filter:e=>"auto"!==e?e:h,backdropFilter:e=>"auto"!==e?e:m,ring:e=>({"--chakra-ring-offset-shadow":"var(--chakra-ring-inset) 0 0 0 var(--chakra-ring-offset-width) var(--chakra-ring-offset-color)","--chakra-ring-shadow":"var(--chakra-ring-inset) 0 0 0 calc(var(--chakra-ring-width) + var(--chakra-ring-offset-width)) var(--chakra-ring-color)","--chakra-ring-width":A.px(e),boxShadow:"var(--chakra-ring-offset-shadow), var(--chakra-ring-shadow), var(--chakra-shadow, 0 0 #0000)"}),bgClip:e=>"text"===e?{color:"transparent",backgroundClip:"text"}:{backgroundClip:e},transform:e=>"auto"===e?["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...f].join(" "):"auto-gpu"===e?["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...f].join(" "):e,vh:e=>"$100vh"===e?"var(--chakra-vh)":e,px(e){if(null==e)return e;let{unitless:t}=k(e);return t||"number"==typeof e?`${e}px`:e},fraction:e=>"number"!=typeof e||e>1?e:`${100*e}%`,float:(e,t)=>"rtl"===t.direction?({left:"right",right:"left"})[e]:e,degree(e){if(/^var\(--.+\)$/.test(e)||null==e)return e;let t="string"==typeof e&&!e.endsWith("deg");return"number"==typeof e||t?`${e}deg`:e},gradient:(e,t)=>(function(e,t){if(null==e||_.has(e))return e;let n=w(e)||_.has(e);if(!n)return`url('${e}')`;let r=/(^[a-z-A-Z]+)\((.*)\)/g.exec(e),i=null==r?void 0:r[1],o=null==r?void 0:r[2];if(!i||!o)return e;let a=i.includes("-gradient")?i:`${i}-gradient`,[s,...u]=o.split(",").map(v).filter(Boolean);if((null==u?void 0:u.length)===0)return e;let l=s in y?y[s]:s;u.unshift(l);let c=u.map(e=>{if(b.has(e))return e;let n=e.indexOf(" "),[r,i]=-1!==n?[e.substr(0,n),e.substr(n+1)]:[e],o=w(i)?i:i&&i.split(" "),a=`colors.${r}`,s=a in t.__cssMap?t.__cssMap[a].varRef:r;return o?[s,...Array.isArray(o)?o:[o]].join(" "):s});return`${a}(${c.join(", ")})`})(e,null!=t?t:{}),blur:x("blur"),opacity:x("opacity"),brightness:x("brightness"),contrast:x("contrast"),dropShadow:x("drop-shadow"),grayscale:x("grayscale"),hueRotate:x("hue-rotate"),invert:x("invert"),saturate:x("saturate"),sepia:x("sepia"),bgImage(e){if(null==e)return e;let t=w(e)||_.has(e);return t?e:`url(${e})`},outline(e){let t="0"===String(e)||"none"===String(e);return null!==e&&t?{outline:"2px solid transparent",outlineOffset:"2px"}:{outline:e}},flexDirection(e){var t;let{space:n,divide:r}=null!=(t=g[e])?t:{},i={flexDirection:e};return n&&(i[n]=1),r&&(i[r]=1),i}},S={borderWidths:d("borderWidths"),borderStyles:d("borderStyles"),colors:d("colors"),borders:d("borders"),gradients:d("gradients",A.gradient),radii:d("radii",A.px),space:d("space",c(A.vh,A.px)),spaceT:d("space",c(A.vh,A.px)),degreeT:e=>({property:e,transform:A.degree}),prop:(e,t,n)=>({property:e,scale:t,...t&&{transform:l({scale:t,transform:n})}}),propT:(e,t)=>({property:e,transform:t}),sizes:d("sizes",c(A.vh,A.px)),sizesT:d("sizes",c(A.vh,A.fraction)),shadows:d("shadows"),logical:function(e){let{property:t,scale:n,transform:r}=e;return{scale:n,property:p(t),transform:n?l({scale:n,compose:r}):r}},blur:d("blur",A.blur)},I={background:S.colors("background"),backgroundColor:S.colors("backgroundColor"),backgroundImage:S.gradients("backgroundImage"),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:A.bgClip},bgSize:S.prop("backgroundSize"),bgPosition:S.prop("backgroundPosition"),bg:S.colors("background"),bgColor:S.colors("backgroundColor"),bgPos:S.prop("backgroundPosition"),bgRepeat:S.prop("backgroundRepeat"),bgAttachment:S.prop("backgroundAttachment"),bgGradient:S.gradients("backgroundImage"),bgClip:{transform:A.bgClip}};Object.assign(I,{bgImage:I.backgroundImage,bgImg:I.backgroundImage});var T={border:S.borders("border"),borderWidth:S.borderWidths("borderWidth"),borderStyle:S.borderStyles("borderStyle"),borderColor:S.colors("borderColor"),borderRadius:S.radii("borderRadius"),borderTop:S.borders("borderTop"),borderBlockStart:S.borders("borderBlockStart"),borderTopLeftRadius:S.radii("borderTopLeftRadius"),borderStartStartRadius:S.logical({scale:"radii",property:{ltr:"borderTopLeftRadius",rtl:"borderTopRightRadius"}}),borderEndStartRadius:S.logical({scale:"radii",property:{ltr:"borderBottomLeftRadius",rtl:"borderBottomRightRadius"}}),borderTopRightRadius:S.radii("borderTopRightRadius"),borderStartEndRadius:S.logical({scale:"radii",property:{ltr:"borderTopRightRadius",rtl:"borderTopLeftRadius"}}),borderEndEndRadius:S.logical({scale:"radii",property:{ltr:"borderBottomRightRadius",rtl:"borderBottomLeftRadius"}}),borderRight:S.borders("borderRight"),borderInlineEnd:S.borders("borderInlineEnd"),borderBottom:S.borders("borderBottom"),borderBlockEnd:S.borders("borderBlockEnd"),borderBottomLeftRadius:S.radii("borderBottomLeftRadius"),borderBottomRightRadius:S.radii("borderBottomRightRadius"),borderLeft:S.borders("borderLeft"),borderInlineStart:{property:"borderInlineStart",scale:"borders"},borderInlineStartRadius:S.logical({scale:"radii",property:{ltr:["borderTopLeftRadius","borderBottomLeftRadius"],rtl:["borderTopRightRadius","borderBottomRightRadius"]}}),borderInlineEndRadius:S.logical({scale:"radii",property:{ltr:["borderTopRightRadius","borderBottomRightRadius"],rtl:["borderTopLeftRadius","borderBottomLeftRadius"]}}),borderX:S.borders(["borderLeft","borderRight"]),borderInline:S.borders("borderInline"),borderY:S.borders(["borderTop","borderBottom"]),borderBlock:S.borders("borderBlock"),borderTopWidth:S.borderWidths("borderTopWidth"),borderBlockStartWidth:S.borderWidths("borderBlockStartWidth"),borderTopColor:S.colors("borderTopColor"),borderBlockStartColor:S.colors("borderBlockStartColor"),borderTopStyle:S.borderStyles("borderTopStyle"),borderBlockStartStyle:S.borderStyles("borderBlockStartStyle"),borderBottomWidth:S.borderWidths("borderBottomWidth"),borderBlockEndWidth:S.borderWidths("borderBlockEndWidth"),borderBottomColor:S.colors("borderBottomColor"),borderBlockEndColor:S.colors("borderBlockEndColor"),borderBottomStyle:S.borderStyles("borderBottomStyle"),borderBlockEndStyle:S.borderStyles("borderBlockEndStyle"),borderLeftWidth:S.borderWidths("borderLeftWidth"),borderInlineStartWidth:S.borderWidths("borderInlineStartWidth"),borderLeftColor:S.colors("borderLeftColor"),borderInlineStartColor:S.colors("borderInlineStartColor"),borderLeftStyle:S.borderStyles("borderLeftStyle"),borderInlineStartStyle:S.borderStyles("borderInlineStartStyle"),borderRightWidth:S.borderWidths("borderRightWidth"),borderInlineEndWidth:S.borderWidths("borderInlineEndWidth"),borderRightColor:S.colors("borderRightColor"),borderInlineEndColor:S.colors("borderInlineEndColor"),borderRightStyle:S.borderStyles("borderRightStyle"),borderInlineEndStyle:S.borderStyles("borderInlineEndStyle"),borderTopRadius:S.radii(["borderTopLeftRadius","borderTopRightRadius"]),borderBottomRadius:S.radii(["borderBottomLeftRadius","borderBottomRightRadius"]),borderLeftRadius:S.radii(["borderTopLeftRadius","borderBottomLeftRadius"]),borderRightRadius:S.radii(["borderTopRightRadius","borderBottomRightRadius"])};Object.assign(T,{rounded:T.borderRadius,roundedTop:T.borderTopRadius,roundedTopLeft:T.borderTopLeftRadius,roundedTopRight:T.borderTopRightRadius,roundedTopStart:T.borderStartStartRadius,roundedTopEnd:T.borderStartEndRadius,roundedBottom:T.borderBottomRadius,roundedBottomLeft:T.borderBottomLeftRadius,roundedBottomRight:T.borderBottomRightRadius,roundedBottomStart:T.borderEndStartRadius,roundedBottomEnd:T.borderEndEndRadius,roundedLeft:T.borderLeftRadius,roundedRight:T.borderRightRadius,roundedStart:T.borderInlineStartRadius,roundedEnd:T.borderInlineEndRadius,borderStart:T.borderInlineStart,borderEnd:T.borderInlineEnd,borderTopStartRadius:T.borderStartStartRadius,borderTopEndRadius:T.borderStartEndRadius,borderBottomStartRadius:T.borderEndStartRadius,borderBottomEndRadius:T.borderEndEndRadius,borderStartRadius:T.borderInlineStartRadius,borderEndRadius:T.borderInlineEndRadius,borderStartWidth:T.borderInlineStartWidth,borderEndWidth:T.borderInlineEndWidth,borderStartColor:T.borderInlineStartColor,borderEndColor:T.borderInlineEndColor,borderStartStyle:T.borderInlineStartStyle,borderEndStyle:T.borderInlineEndStyle});var E={color:S.colors("color"),textColor:S.colors("color"),fill:S.colors("fill"),stroke:S.colors("stroke")},P={boxShadow:S.shadows("boxShadow"),mixBlendMode:!0,blendMode:S.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:S.prop("backgroundBlendMode"),opacity:!0};Object.assign(P,{shadow:P.boxShadow});var C={filter:{transform:A.filter},blur:S.blur("--chakra-blur"),brightness:S.propT("--chakra-brightness",A.brightness),contrast:S.propT("--chakra-contrast",A.contrast),hueRotate:S.degreeT("--chakra-hue-rotate"),invert:S.propT("--chakra-invert",A.invert),saturate:S.propT("--chakra-saturate",A.saturate),dropShadow:S.propT("--chakra-drop-shadow",A.dropShadow),backdropFilter:{transform:A.backdropFilter},backdropBlur:S.blur("--chakra-backdrop-blur"),backdropBrightness:S.propT("--chakra-backdrop-brightness",A.brightness),backdropContrast:S.propT("--chakra-backdrop-contrast",A.contrast),backdropHueRotate:S.degreeT("--chakra-backdrop-hue-rotate"),backdropInvert:S.propT("--chakra-backdrop-invert",A.invert),backdropSaturate:S.propT("--chakra-backdrop-saturate",A.saturate)},O={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:A.flexDirection},flex:!0,flexFlow:!0,flexGrow:!0,flexShrink:!0,flexBasis:S.sizes("flexBasis"),justifySelf:!0,alignSelf:!0,order:!0,placeItems:!0,placeContent:!0,placeSelf:!0,gap:S.space("gap"),rowGap:S.space("rowGap"),columnGap:S.space("columnGap")};Object.assign(O,{flexDir:O.flexDirection});var B={gridGap:S.space("gridGap"),gridColumnGap:S.space("gridColumnGap"),gridRowGap:S.space("gridRowGap"),gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridColumnStart:!0,gridColumnEnd:!0,gridRowStart:!0,gridRowEnd:!0,gridAutoRows:!0,gridTemplate:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridArea:!0},M={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:A.outline},outlineOffset:!0,outlineColor:S.colors("outlineColor")},R={width:S.sizesT("width"),inlineSize:S.sizesT("inlineSize"),height:S.sizes("height"),blockSize:S.sizes("blockSize"),boxSize:S.sizes(["width","height"]),minWidth:S.sizes("minWidth"),minInlineSize:S.sizes("minInlineSize"),minHeight:S.sizes("minHeight"),minBlockSize:S.sizes("minBlockSize"),maxWidth:S.sizes("maxWidth"),maxInlineSize:S.sizes("maxInlineSize"),maxHeight:S.sizes("maxHeight"),maxBlockSize:S.sizes("maxBlockSize"),overflow:!0,overflowX:!0,overflowY:!0,overscrollBehavior:!0,overscrollBehaviorX:!0,overscrollBehaviorY:!0,display:!0,aspectRatio:!0,hideFrom:{scale:"breakpoints",transform:(e,t)=>{var n,r,i;let o=null!=(i=null==(r=null==(n=t.__breakpoints)?void 0:n.get(e))?void 0:r.minW)?i:e,a=`@media screen and (min-width: ${o})`;return{[a]:{display:"none"}}}},hideBelow:{scale:"breakpoints",transform:(e,t)=>{var n,r,i;let o=null!=(i=null==(r=null==(n=t.__breakpoints)?void 0:n.get(e))?void 0:r._minW)?i:e,a=`@media screen and (max-width: ${o})`;return{[a]:{display:"none"}}}},verticalAlign:!0,boxSizing:!0,boxDecorationBreak:!0,float:S.propT("float",A.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(R,{w:R.width,h:R.height,minW:R.minWidth,maxW:R.maxWidth,minH:R.minHeight,maxH:R.maxHeight,overscroll:R.overscrollBehavior,overscrollX:R.overscrollBehaviorX,overscrollY:R.overscrollBehaviorY});var L={listStyleType:!0,listStylePosition:!0,listStylePos:S.prop("listStylePosition"),listStyleImage:!0,listStyleImg:S.prop("listStyleImage")},N=(e=>{let t=new WeakMap,n=(n,r,i,o)=>{if(void 0===n)return e(n,r,i);t.has(n)||t.set(n,new Map);let a=t.get(n);if(a.has(r))return a.get(r);let s=e(n,r,i,o);return a.set(r,s),s};return n})(function(e,t,n,r){let i="string"==typeof t?t.split("."):[t];for(r=0;r{let r={},i=N(e,t,{});for(let e in i){let t=e in n&&null!=n[e];t||(r[e]=i[e])}return r},j={position:!0,pos:S.prop("position"),zIndex:S.prop("zIndex","zIndices"),inset:S.spaceT("inset"),insetX:S.spaceT(["left","right"]),insetInline:S.spaceT("insetInline"),insetY:S.spaceT(["top","bottom"]),insetBlock:S.spaceT("insetBlock"),top:S.spaceT("top"),insetBlockStart:S.spaceT("insetBlockStart"),bottom:S.spaceT("bottom"),insetBlockEnd:S.spaceT("insetBlockEnd"),left:S.spaceT("left"),insetInlineStart:S.logical({scale:"space",property:{ltr:"left",rtl:"right"}}),right:S.spaceT("right"),insetInlineEnd:S.logical({scale:"space",property:{ltr:"right",rtl:"left"}})};Object.assign(j,{insetStart:j.insetInlineStart,insetEnd:j.insetInlineEnd});var U={ring:{transform:A.ring},ringColor:S.colors("--chakra-ring-color"),ringOffset:S.prop("--chakra-ring-offset-width"),ringOffsetColor:S.colors("--chakra-ring-offset-color"),ringInset:S.prop("--chakra-ring-inset")},z={margin:S.spaceT("margin"),marginTop:S.spaceT("marginTop"),marginBlockStart:S.spaceT("marginBlockStart"),marginRight:S.spaceT("marginRight"),marginInlineEnd:S.spaceT("marginInlineEnd"),marginBottom:S.spaceT("marginBottom"),marginBlockEnd:S.spaceT("marginBlockEnd"),marginLeft:S.spaceT("marginLeft"),marginInlineStart:S.spaceT("marginInlineStart"),marginX:S.spaceT(["marginInlineStart","marginInlineEnd"]),marginInline:S.spaceT("marginInline"),marginY:S.spaceT(["marginTop","marginBottom"]),marginBlock:S.spaceT("marginBlock"),padding:S.space("padding"),paddingTop:S.space("paddingTop"),paddingBlockStart:S.space("paddingBlockStart"),paddingRight:S.space("paddingRight"),paddingBottom:S.space("paddingBottom"),paddingBlockEnd:S.space("paddingBlockEnd"),paddingLeft:S.space("paddingLeft"),paddingInlineStart:S.space("paddingInlineStart"),paddingInlineEnd:S.space("paddingInlineEnd"),paddingX:S.space(["paddingInlineStart","paddingInlineEnd"]),paddingInline:S.space("paddingInline"),paddingY:S.space(["paddingTop","paddingBottom"]),paddingBlock:S.space("paddingBlock")};Object.assign(z,{m:z.margin,mt:z.marginTop,mr:z.marginRight,me:z.marginInlineEnd,marginEnd:z.marginInlineEnd,mb:z.marginBottom,ml:z.marginLeft,ms:z.marginInlineStart,marginStart:z.marginInlineStart,mx:z.marginX,my:z.marginY,p:z.padding,pt:z.paddingTop,py:z.paddingY,px:z.paddingX,pb:z.paddingBottom,pl:z.paddingLeft,ps:z.paddingInlineStart,paddingStart:z.paddingInlineStart,pr:z.paddingRight,pe:z.paddingInlineEnd,paddingEnd:z.paddingInlineEnd});var V={textDecorationColor:S.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:S.shadows("textShadow")},W={clipPath:!0,transform:S.propT("transform",A.transform),transformOrigin:!0,translateX:S.spaceT("--chakra-translate-x"),translateY:S.spaceT("--chakra-translate-y"),skewX:S.degreeT("--chakra-skew-x"),skewY:S.degreeT("--chakra-skew-y"),scaleX:S.prop("--chakra-scale-x"),scaleY:S.prop("--chakra-scale-y"),scale:S.prop(["--chakra-scale-x","--chakra-scale-y"]),rotate:S.degreeT("--chakra-rotate")},$={transition:!0,transitionDelay:!0,animation:!0,willChange:!0,transitionDuration:S.prop("transitionDuration","transition.duration"),transitionProperty:S.prop("transitionProperty","transition.property"),transitionTimingFunction:S.prop("transitionTimingFunction","transition.easing")},K={fontFamily:S.prop("fontFamily","fonts"),fontSize:S.prop("fontSize","fontSizes",A.px),fontWeight:S.prop("fontWeight","fontWeights"),lineHeight:S.prop("lineHeight","lineHeights"),letterSpacing:S.prop("letterSpacing","letterSpacings"),textAlign:!0,fontStyle:!0,textIndent:!0,wordBreak:!0,overflowWrap:!0,textOverflow:!0,textTransform:!0,whiteSpace:!0,isTruncated:{transform(e){if(!0===e)return{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}},noOfLines:{static:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"var(--chakra-line-clamp)"},property:"--chakra-line-clamp"}},H={scrollBehavior:!0,scrollSnapAlign:!0,scrollSnapStop:!0,scrollSnapType:!0,scrollMargin:S.spaceT("scrollMargin"),scrollMarginTop:S.spaceT("scrollMarginTop"),scrollMarginBottom:S.spaceT("scrollMarginBottom"),scrollMarginLeft:S.spaceT("scrollMarginLeft"),scrollMarginRight:S.spaceT("scrollMarginRight"),scrollMarginX:S.spaceT(["scrollMarginLeft","scrollMarginRight"]),scrollMarginY:S.spaceT(["scrollMarginTop","scrollMarginBottom"]),scrollPadding:S.spaceT("scrollPadding"),scrollPaddingTop:S.spaceT("scrollPaddingTop"),scrollPaddingBottom:S.spaceT("scrollPaddingBottom"),scrollPaddingLeft:S.spaceT("scrollPaddingLeft"),scrollPaddingRight:S.spaceT("scrollPaddingRight"),scrollPaddingX:S.spaceT(["scrollPaddingLeft","scrollPaddingRight"]),scrollPaddingY:S.spaceT(["scrollPaddingTop","scrollPaddingBottom"])};function G(e){return(0,r.Kn)(e)&&e.reference?e.reference:String(e)}var Z=(e,...t)=>t.map(G).join(` ${e} `).replace(/calc/g,""),Y=(...e)=>`calc(${Z("+",...e)})`,X=(...e)=>`calc(${Z("-",...e)})`,Q=(...e)=>`calc(${Z("*",...e)})`,J=(...e)=>`calc(${Z("/",...e)})`,ee=e=>{let t=G(e);return null==t||Number.isNaN(parseFloat(t))?Q(t,-1):String(t).startsWith("-")?String(t).slice(1):`-${t}`},et=Object.assign(e=>({add:(...t)=>et(Y(e,...t)),subtract:(...t)=>et(X(e,...t)),multiply:(...t)=>et(Q(e,...t)),divide:(...t)=>et(J(e,...t)),negate:()=>et(ee(e)),toString:()=>e.toString()}),{add:Y,subtract:X,multiply:Q,divide:J,negate:ee});function en(e,t,n){let r=function(e,t=""){return function(e){let t=function(e,t="-"){return e.replace(/\s+/g,t)}(e.toString());return(function(e){if(e.includes("\\."))return e;let t=!Number.isInteger(parseFloat(e.toString()));return t?e.replace(".","\\."):e})(t).replace(/[!-,/:-@[-^`{-~]/g,"\\$&")}(`--${function(e,t=""){return[t,e].filter(Boolean).join("-")}(e,t)}`)}(e,n);return{variable:r,reference:`var(${r}${t?`, ${t}`:""})`}}function er(e,t){let n={};for(let r of t){if(Array.isArray(r)){let[t,i]=r;n[t]=en(`${e}-${t}`,i);continue}n[r]=en(`${e}-${r}`)}return n}function ei(e){if(null==e)return e;let{unitless:t}=function(e){let t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}}(e);return t||"number"==typeof e?`${e}px`:e}var eo=(e,t)=>parseInt(e[1],10)>parseInt(t[1],10)?1:-1,ea=e=>Object.fromEntries(Object.entries(e).sort(eo));function es(e){let t=ea(e);return Object.assign(Object.values(t),t)}function eu(e){var t;return e?"number"==typeof(e=null!=(t=ei(e))?t:e)?`${e+-.02}`:e.replace(/(\d+\.?\d*)/u,e=>`${parseFloat(e)+-.02}`):e}function el(e,t){let n=["@media screen"];return e&&n.push("and",`(min-width: ${ei(e)})`),t&&n.push("and",`(max-width: ${ei(t)})`),n.join(" ")}var ec={hover:(e,t)=>`${e}:hover ${t}, ${e}[data-hover] ${t}`,focus:(e,t)=>`${e}:focus ${t}, ${e}[data-focus] ${t}`,focusVisible:(e,t)=>`${e}:focus-visible ${t}`,focusWithin:(e,t)=>`${e}:focus-within ${t}`,active:(e,t)=>`${e}:active ${t}, ${e}[data-active] ${t}`,disabled:(e,t)=>`${e}:disabled ${t}, ${e}[data-disabled] ${t}`,invalid:(e,t)=>`${e}:invalid ${t}, ${e}[data-invalid] ${t}`,checked:(e,t)=>`${e}:checked ${t}, ${e}[data-checked] ${t}`,indeterminate:(e,t)=>`${e}:indeterminate ${t}, ${e}[aria-checked=mixed] ${t}, ${e}[data-indeterminate] ${t}`,readOnly:(e,t)=>`${e}:read-only ${t}, ${e}[readonly] ${t}, ${e}[data-read-only] ${t}`,expanded:(e,t)=>`${e}:read-only ${t}, ${e}[aria-expanded=true] ${t}, ${e}[data-expanded] ${t}`,placeholderShown:(e,t)=>`${e}:placeholder-shown ${t}`},ed=e=>ef(t=>e(t,"&"),"[role=group]","[data-group]",".group"),ep=e=>ef(t=>e(t,"~ &"),"[data-peer]",".peer"),ef=(e,...t)=>t.map(e).join(", "),eh={_hover:"&:hover, &[data-hover]",_active:"&:active, &[data-active]",_focus:"&:focus, &[data-focus]",_highlighted:"&[data-highlighted]",_focusWithin:"&:focus-within",_focusVisible:"&:focus-visible, &[data-focus-visible]",_disabled:"&:disabled, &[disabled], &[aria-disabled=true], &[data-disabled]",_readOnly:"&[aria-readonly=true], &[readonly], &[data-readonly]",_before:"&::before",_after:"&::after",_empty:"&:empty",_expanded:"&[aria-expanded=true], &[data-expanded]",_checked:"&[aria-checked=true], &[data-checked]",_grabbed:"&[aria-grabbed=true], &[data-grabbed]",_pressed:"&[aria-pressed=true], &[data-pressed]",_invalid:"&[aria-invalid=true], &[data-invalid]",_valid:"&[data-valid], &[data-state=valid]",_loading:"&[data-loading], &[aria-busy=true]",_selected:"&[aria-selected=true], &[data-selected]",_hidden:"&[hidden], &[data-hidden]",_autofill:"&:-webkit-autofill",_even:"&:nth-of-type(even)",_odd:"&:nth-of-type(odd)",_first:"&:first-of-type",_firstLetter:"&::first-letter",_last:"&:last-of-type",_notFirst:"&:not(:first-of-type)",_notLast:"&:not(:last-of-type)",_visited:"&:visited",_activeLink:"&[aria-current=page]",_activeStep:"&[aria-current=step]",_indeterminate:"&:indeterminate, &[aria-checked=mixed], &[data-indeterminate]",_groupHover:ed(ec.hover),_peerHover:ep(ec.hover),_groupFocus:ed(ec.focus),_peerFocus:ep(ec.focus),_groupFocusVisible:ed(ec.focusVisible),_peerFocusVisible:ep(ec.focusVisible),_groupActive:ed(ec.active),_peerActive:ep(ec.active),_groupDisabled:ed(ec.disabled),_peerDisabled:ep(ec.disabled),_groupInvalid:ed(ec.invalid),_peerInvalid:ep(ec.invalid),_groupChecked:ed(ec.checked),_peerChecked:ep(ec.checked),_groupFocusWithin:ed(ec.focusWithin),_peerFocusWithin:ep(ec.focusWithin),_peerPlaceholderShown:ep(ec.placeholderShown),_placeholder:"&::placeholder",_placeholderShown:"&:placeholder-shown",_fullScreen:"&:fullscreen",_selection:"&::selection",_rtl:"[dir=rtl] &, &[dir=rtl]",_ltr:"[dir=ltr] &, &[dir=ltr]",_mediaDark:"@media (prefers-color-scheme: dark)",_mediaReduceMotion:"@media (prefers-reduced-motion: reduce)",_dark:".chakra-ui-dark &:not([data-theme]),[data-theme=dark] &:not([data-theme]),&[data-theme=dark]",_light:".chakra-ui-light &:not([data-theme]),[data-theme=light] &:not([data-theme]),&[data-theme=light]",_horizontal:"&[data-orientation=horizontal]",_vertical:"&[data-orientation=vertical]"},em=Object.keys(eh);function eg(e,t){return en(String(e).replace(/\./g,"-"),void 0,t)}function ey(e,t,n={}){let{stop:r,getKey:i}=n;return function e(n,o=[]){var a;if("object"==typeof n&&null!=n&&!Array.isArray(n)||Array.isArray(n)){let s={};for(let[u,l]of Object.entries(n)){let c=null!=(a=null==i?void 0:i(u))?a:u,d=[...o,c];if(null==r?void 0:r(n,d))return t(n,o);s[c]=e(l,d)}return s}return t(n,o)}(e)}var eb=["colors","borders","borderWidths","borderStyles","fonts","fontSizes","fontWeights","gradients","letterSpacings","lineHeights","radii","space","shadows","sizes","zIndices","transition","blur","breakpoints"],e_=e=>em.includes(e)||"default"===e;function ev(e){var t;let n=function(e){let{__cssMap:t,__cssVars:n,__breakpoints:r,...i}=e;return i}(e),i=function(e,t){let n={};for(let r of t)r in e&&(n[r]=e[r]);return n}(n,eb),a=n.semanticTokens,s=function({tokens:e,semanticTokens:t}){let n={};return ey(e,(e,t)=>{null!=e&&(n[t.join(".")]={isSemantic:!1,value:e})}),ey(t,(e,t)=>{null!=e&&(n[t.join(".")]={isSemantic:!0,value:e})},{stop:e=>Object.keys(e).every(e_)}),n}({tokens:i,semanticTokens:a}),u=null==(t=n.config)?void 0:t.cssVarPrefix,{cssMap:l,cssVars:c}=function(e,t){let n={},i={};for(let[a,s]of Object.entries(e)){let{isSemantic:u,value:l}=s,{variable:c,reference:d}=eg(a,null==t?void 0:t.cssVarPrefix);if(!u){if(a.startsWith("space")){let e=a.split("."),[t,...n]=e,r=`${t}.-${n.join(".")}`,o=et.negate(l),s=et.negate(d);i[r]={value:o,var:c,varRef:s}}n[c]=l,i[a]={value:l,var:c,varRef:d};continue}let p=n=>{let r=String(a).split(".")[0],i=[r,n].join("."),o=e[i];if(!o)return n;let{reference:s}=eg(i,null==t?void 0:t.cssVarPrefix);return s},f=(0,r.Kn)(l)?l:{default:l};n=o()(n,Object.entries(f).reduce((e,[t,n])=>{var r;if(!n)return e;let i=p(`${n}`);if("default"===t)return e[c]=i,e;let o=null!=(r=null==eh?void 0:eh[t])?r:t;return e[o]={[c]:i},e},{})),i[a]={value:d,var:c,varRef:d}}return{cssVars:n,cssMap:i}}(s,{cssVarPrefix:u});return Object.assign(n,{__cssVars:{"--chakra-ring-inset":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-ring-offset-width":"0px","--chakra-ring-offset-color":"#fff","--chakra-ring-color":"rgba(66, 153, 225, 0.6)","--chakra-ring-offset-shadow":"0 0 #0000","--chakra-ring-shadow":"0 0 #0000","--chakra-space-x-reverse":"0","--chakra-space-y-reverse":"0",...c},__cssMap:l,__breakpoints:function(e){var t;if(!e)return null;e.base=null!=(t=e.base)?t:"0px";let n=es(e),i=Object.entries(e).sort(eo).map(([e,t],n,r)=>{var i;let[,o]=null!=(i=r[n+1])?i:[];return o=parseFloat(o)>0?eu(o):void 0,{_minW:eu(t),breakpoint:e,minW:t,maxW:o,maxWQuery:el(null,o),minWQuery:el(t),minMaxQuery:el(t,o)}}),o=function(e){let t=Object.keys(ea(e));return new Set(t)}(e),a=Array.from(o.values());return{keys:o,normalized:n,isResponsive(e){let t=Object.keys(e);return t.length>0&&t.every(e=>o.has(e))},asObject:ea(e),asArray:es(e),details:i,get:e=>i.find(t=>t.breakpoint===e),media:[null,...n.map(e=>el(e)).slice(1)],toArrayValue(e){if(!(0,r.Kn)(e))throw Error("toArrayValue: value must be an object");let t=a.map(t=>{var n;return null!=(n=e[t])?n:null});for(;null===function(e){let t=null==e?0:e.length;return t?e[t-1]:void 0}(t);)t.pop();return t},toObjectValue(e){if(!Array.isArray(e))throw Error("toObjectValue: value must be an array");return e.reduce((e,t,n)=>{let r=a[n];return null!=r&&null!=t&&(e[r]=t),e},{})}}}(n.breakpoints)}),n}var ew=o()({},I,T,E,O,R,C,U,M,B,{srOnly:{transform:e=>!0===e?D:"focusable"===e?F:{}},layerStyle:{processResult:!0,transform:(e,t,n)=>q(t,`layerStyles.${e}`,n)},textStyle:{processResult:!0,transform:(e,t,n)=>q(t,`textStyles.${e}`,n)},apply:{processResult:!0,transform:(e,t,n)=>q(t,e,n)}},j,P,z,H,K,V,W,L,$);Object.keys(Object.assign({},z,R,O,B,j));var ek=[...Object.keys(ew),...em],ex={...ew,...eh},eA=e=>e in ex,eS=e=>t=>{if(!t.__breakpoints)return e;let{isResponsive:n,toArrayValue:i,media:o}=t.__breakpoints,a={};for(let s in e){let u=(0,r.Pu)(e[s],t);if(null==u)continue;if(!Array.isArray(u=(0,r.Kn)(u)&&n(u)?i(u):u)){a[s]=u;continue}let l=u.slice(0,o.length).length;for(let e=0;ee.startsWith("--")&&"string"==typeof t&&!/^var\(--.+\)$/.test(t),eT=(e,t)=>{var n,r;if(null==t)return t;let i=t=>{var n,r;return null==(r=null==(n=e.__cssMap)?void 0:n[t])?void 0:r.varRef},o=e=>{var t;return null!=(t=i(e))?t:e},[a,s]=function(e){let t=[],n="",r=!1;for(let i=0;it=>{let n=function(e){let{configs:t={},pseudos:n={},theme:i}=e,a=(e,s=!1)=>{var u,l,c;let d=(0,r.Pu)(e,i),p=eS(d)(i),f={};for(let e in p){let h=p[e],m=(0,r.Pu)(h,i);e in n&&(e=n[e]),eI(e,m)&&(m=eT(i,m));let g=t[e];if(!0===g&&(g={property:e}),(0,r.Kn)(m)){f[e]=null!=(u=f[e])?u:{},f[e]=o()({},f[e],a(m,!0));continue}let y=null!=(c=null==(l=null==g?void 0:g.transform)?void 0:l.call(g,m,i,d))?c:m;y=(null==g?void 0:g.processResult)?a(y,!0):y;let b=(0,r.Pu)(null==g?void 0:g.property,i);if(!s&&(null==g?void 0:g.static)){let e=(0,r.Pu)(g.static,i);f=o()({},f,e)}if(b&&Array.isArray(b)){for(let e of b)f[e]=y;continue}if(b){"&"===b&&(0,r.Kn)(y)?f=o()({},f,y):f[b]=y;continue}if((0,r.Kn)(y)){f=o()({},f,y);continue}f[e]=y}return f};return a}({theme:t,pseudos:eh,configs:ew});return n(e)};function eP(e){return e}function eC(e){return e}function eO(e){return{definePartsStyle:e=>e,defineMultiStyleConfig:t=>({parts:e,...t})}}function eB(e){return t=>{var n;let{variant:i,size:a,theme:s}=t,u=function(e){let t=e.__breakpoints;return function(e,n,i,a){var s,u,l;if(!t)return;let c={},d=(l=t.toArrayValue,Array.isArray(i)?i:(0,r.Kn)(i)?l(i):null!=i?[i]:void 0);if(!d)return c;let p=d.length,f=1===p,h=!!e.parts;for(let i=0;i{o()(c,{[e]:f?g[e]:{[m]:g[e]}})});continue}if(!h){f?o()(c,g):c[m]=g;continue}c[m]=g}}return c}}(s);return o()({},(0,r.Pu)(null!=(n=e.baseStyle)?n:{},t),u(e,"sizes",a,t),u(e,"variants",i,t))}}function eM(e,t,n){var r,i,o;return null!=(o=null==(i=null==(r=e.__cssMap)?void 0:r[`${t}.${n}`])?void 0:i.varRef)?o:n}function eR(e){return function(e,t=[]){let n=Object.assign({},e);for(let e of t)e in n&&delete n[e];return n}(e,["styleConfig","size","variant","colorScheme"])}},19829:function(e,t,n){"use strict";n.d(t,{m:function(){return g}});var r,i=n(70586),o=new Set([...i.cC,"textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"]),a=new Set(["htmlWidth","htmlHeight","htmlSize","htmlTranslate"]);function s(e){return a.has(e)||!o.has(e)}var u=n(12916),l=n(65798),c=n(14266),d=n(65114),p=n(67294),f=null!=(r=d.Z.default)?r:d.Z,h=({baseStyle:e})=>t=>{let{theme:n,css:r,__css:o,sx:a,...s}=t,u=(0,l.lw)(s,(e,t)=>(0,i.ZR)(t)),d=(0,c.Pu)(e,t),p=function(e,...t){if(null==e)throw TypeError("Cannot convert undefined or null to object");let n={...e};for(let e of t)if(null!=e)for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(t in n&&delete n[t],n[t]=e[t]);return n}({},o,d,(0,l.YU)(u),a),f=(0,i.iv)(p)(t.theme);return r?[f,r]:f};function m(e,t){let{baseStyle:n,...r}=null!=t?t:{};r.shouldForwardProp||(r.shouldForwardProp=s);let i=h({baseStyle:n}),o=f(e,r)(i),a=p.forwardRef(function(e,t){let{colorMode:n,forced:r}=(0,u.If)();return p.createElement(o,{ref:t,"data-theme":r?n:void 0,...e})});return a}var g=function(){let e=new Map;return new Proxy(m,{apply:(e,t,n)=>m(...n),get:(t,n)=>(e.has(n)||e.set(n,m(n)),e.get(n))})}()},27404:function(e,t,n){"use strict";n.d(t,{LP:function(){return s},dQ:function(){return a},uP:function(){return o}});var r=n(88258),i=n(12916);function o(){let e=(0,i.If)(),t=(0,r.F)();return{...e,theme:t}}function a(e,t,n){let i=(0,r.F)();return s(e,t,n)(i)}function s(e,t,n){let r=Array.isArray(t)?t:[t],i=Array.isArray(n)?n:[n];return n=>{let o=i.filter(Boolean),a=r.map((t,r)=>{var i,a;if("breakpoints"===e)return function(e,t,n){var r,i;if(null==t)return t;let o=t=>{var n,r;return null==(r=null==(n=e.__breakpoints)?void 0:n.asArray)?void 0:r[t]};return null!=(i=null!=(r=o(t))?r:o(n))?i:n}(n,t,null!=(i=o[r])?i:t);let s=`${e}.${t}`;return function(e,t,n){var r,i;if(null==t)return t;let o=t=>{var n,r;return null==(r=null==(n=e.__cssMap)?void 0:n[t])?void 0:r.value};return null!=(i=null!=(r=o(t))?r:o(n))?i:n}(n,s,null!=(a=o[r])?a:t)});return Array.isArray(t)?a:a[0]}}},88258:function(e,t,n){"use strict";n.d(t,{F:function(){return o}});var r=n(47661),i=n(67294);function o(){let e=(0,i.useContext)(r.T);if(!e)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `` or ``");return e}},9388:function(e,t,n){"use strict";n.d(t,{G:function(){return i}});var r=n(67294);function i(e){return(0,r.forwardRef)(e)}},51236:function(e,t,n){"use strict";n.d(t,{jC:function(){return f},mq:function(){return p}});var r=n(27404),i=n(70586),o=n(65798),a=n(38554),s=n.n(a),u=n(67294),l=n(45942),c=n.n(l);function d(e,t={}){var n;let{styleConfig:a,...l}=t,{theme:d,colorMode:p}=(0,r.uP)(),f=e?(0,o.Wf)(d,`components.${e}`):void 0,h=a||f,m=s()({theme:d,colorMode:p},null!=(n=null==h?void 0:h.defaultProps)?n:{},(0,o.YU)((0,o.CE)(l,["children"]))),g=(0,u.useRef)({});if(h){let e=(0,i.Ud)(h),t=e(m),n=c()(g.current,t);n||(g.current=t)}return g.current}function p(e,t={}){return d(e,t)}function f(e,t={}){return d(e,t)}},45942:function(e){var t="undefined"!=typeof Element,n="function"==typeof Map,r="function"==typeof Set,i="function"==typeof ArrayBuffer&&!!ArrayBuffer.isView;e.exports=function(e,o){try{return function e(o,a){if(o===a)return!0;if(o&&a&&"object"==typeof o&&"object"==typeof a){var s,u,l,c;if(o.constructor!==a.constructor)return!1;if(Array.isArray(o)){if((s=o.length)!=a.length)return!1;for(u=s;0!=u--;)if(!e(o[u],a[u]))return!1;return!0}if(n&&o instanceof Map&&a instanceof Map){if(o.size!==a.size)return!1;for(c=o.entries();!(u=c.next()).done;)if(!a.has(u.value[0]))return!1;for(c=o.entries();!(u=c.next()).done;)if(!e(u.value[1],a.get(u.value[0])))return!1;return!0}if(r&&o instanceof Set&&a instanceof Set){if(o.size!==a.size)return!1;for(c=o.entries();!(u=c.next()).done;)if(!a.has(u.value[0]))return!1;return!0}if(i&&ArrayBuffer.isView(o)&&ArrayBuffer.isView(a)){if((s=o.length)!=a.length)return!1;for(u=s;0!=u--;)if(o[u]!==a[u])return!1;return!0}if(o.constructor===RegExp)return o.source===a.source&&o.flags===a.flags;if(o.valueOf!==Object.prototype.valueOf&&"function"==typeof o.valueOf&&"function"==typeof a.valueOf)return o.valueOf()===a.valueOf();if(o.toString!==Object.prototype.toString&&"function"==typeof o.toString&&"function"==typeof a.toString)return o.toString()===a.toString();if((s=(l=Object.keys(o)).length)!==Object.keys(a).length)return!1;for(u=s;0!=u--;)if(!Object.prototype.hasOwnProperty.call(a,l[u]))return!1;if(t&&o instanceof Element)return!1;for(u=s;0!=u--;)if(("_owner"!==l[u]&&"__v"!==l[u]&&"__o"!==l[u]||!o.$$typeof)&&!e(o[l[u]],a[l[u]]))return!1;return!0}return o!=o&&a!=a}(e,o)}catch(e){if((e.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw e}}},44158:function(e,t,n){"use strict";n.d(t,{Dn:function(){return i},IW:function(){return s},sv:function(){return a},ym:function(){return o}});var r=(e,t)=>e.find(e=>e.id===t);function i(e,t){let n=o(e,t),r=n?e[n].findIndex(e=>e.id===t):-1;return{position:n,index:r}}function o(e,t){for(let[n,i]of Object.entries(e))if(r(i,t))return n}function a(e){let t=e.includes("right"),n=e.includes("left"),r="center";return t&&(r="flex-end"),n&&(r="flex-start"),{display:"flex",flexDirection:"column",alignItems:r}}function s(e){let t=e.includes("top")?"env(safe-area-inset-top, 0px)":void 0,n=e.includes("bottom")?"env(safe-area-inset-bottom, 0px)":void 0,r=e.includes("left")?void 0:"env(safe-area-inset-right, 0px)",i=e.includes("right")?void 0:"env(safe-area-inset-left, 0px)";return{position:"fixed",zIndex:"var(--toast-z-index, 5500)",pointerEvents:"none",display:"flex",flexDirection:"column",margin:"top"===e||"bottom"===e?"0 auto":void 0,top:t,bottom:n,right:r,left:i}}},84863:function(e,t,n){"use strict";n.d(t,{Cj:function(){return y},fp:function(){return f}});var r=n(44158),i=n(17357),o=n(72621),a=n(66454),s=n(19829),u=n(85893);function l(e){let{status:t}=(0,o.oX)(),n=(0,o.XO)(t),r=(0,o.uL)(),i="loading"===t?r.spinner:r.icon;return(0,u.jsx)(s.m.span,{display:"inherit","data-status":t,...e,className:(0,a.cx)("chakra-alert__icon",e.className),__css:i,children:e.children||(0,u.jsx)(n,{h:"100%",w:"100%"})})}l.displayName="AlertIcon";var c=n(67898),d=n(26366),p=n(30989),f=function(e){let t=e,n=new Set,i=e=>{t=e(t),n.forEach(e=>e())};return{getState:()=>t,subscribe:t=>(n.add(t),()=>{i(()=>e),n.delete(t)}),removeToast:(e,t)=>{i(n=>({...n,[t]:n[t].filter(t=>t.id!=e)}))},notify:(e,t)=>{let n=function(e,t={}){var n,r;h+=1;let i=null!=(n=t.id)?n:h,o=null!=(r=t.position)?r:"bottom";return{id:i,message:e,position:o,duration:t.duration,onCloseComplete:t.onCloseComplete,onRequestRemove:()=>f.removeToast(String(i),o),status:t.status,requestClose:!1,containerStyle:t.containerStyle}}(e,t),{position:r,id:o}=n;return i(e=>{var t,i;let o=r.includes("top"),a=o?[n,...null!=(t=e[r])?t:[]]:[...null!=(i=e[r])?i:[],n];return{...e,[r]:a}}),o},update:(e,t)=>{e&&i(n=>{let i={...n},{position:o,index:a}=(0,r.Dn)(i,e);return o&&-1!==a&&(i[o][a]={...i[o][a],...t,message:g(t)}),i})},closeAll:({positions:e}={})=>{i(t=>(null!=e?e:["bottom","bottom-right","bottom-left","top","top-left","top-right"]).reduce((e,n)=>(e[n]=t[n].map(e=>({...e,requestClose:!0})),e),{...t}))},close:e=>{i(t=>{let n=(0,r.ym)(t,e);return n?{...t,[n]:t[n].map(t=>t.id==e?{...t,requestClose:!0}:t)}:t})},isActive:e=>!!(0,r.Dn)(f.getState(),e).position}}({top:[],"top-left":[],"top-right":[],"bottom-left":[],bottom:[],"bottom-right":[]}),h=0,m=e=>{let{status:t,variant:n="solid",id:r,title:o,isClosable:a,onClose:f,description:h,colorScheme:m,icon:g}=e,y=r?{root:`toast-${r}`,title:`toast-${r}-title`,description:`toast-${r}-description`}:void 0;return(0,u.jsxs)(i.b,{addRole:!1,status:t,variant:n,id:null==y?void 0:y.root,alignItems:"start",borderRadius:"md",boxShadow:"lg",paddingEnd:8,textAlign:"start",width:"auto",colorScheme:m,children:[(0,u.jsx)(l,{children:g}),(0,u.jsxs)(s.m.div,{flex:"1",maxWidth:"100%",children:[o&&(0,u.jsx)(c.C,{id:null==y?void 0:y.title,children:o}),h&&(0,u.jsx)(d.X,{id:null==y?void 0:y.description,display:"block",children:h})]}),a&&(0,u.jsx)(p.P,{size:"sm",onClick:f,position:"absolute",insetEnd:1,top:1})]})};function g(e={}){let{render:t,toastComponent:n=m}=e,r=r=>"function"==typeof t?t({...r,...e}):(0,u.jsx)(n,{...r,...e});return r}function y(e,t){let n=n=>{var r;return{...t,...n,position:function(e,t){var n;let r=null!=e?e:"bottom",i={"top-start":{ltr:"top-left",rtl:"top-right"},"top-end":{ltr:"top-right",rtl:"top-left"},"bottom-start":{ltr:"bottom-left",rtl:"bottom-right"},"bottom-end":{ltr:"bottom-right",rtl:"bottom-left"}}[r];return null!=(n=null==i?void 0:i[t])?n:r}(null!=(r=null==n?void 0:n.position)?r:null==t?void 0:t.position,e)}},r=e=>{let t=n(e),r=g(t);return f.notify(r,t)};return r.update=(e,t)=>{f.update(e,n(t))},r.promise=(e,t)=>{let n=r({...t.loading,status:"loading",duration:null});e.then(e=>r.update(n,{status:"success",duration:5e3,...(0,a.Pu)(t.success,e)})).catch(e=>r.update(n,{status:"error",duration:5e3,...(0,a.Pu)(t.error,e)}))},r.closeAll=f.closeAll,r.close=f.close,r.isActive=f.isActive,r}},34876:function(e,t,n){"use strict";n.d(t,{Qi:function(){return y},VW:function(){return _},OX:function(){return b}});var r=n(44158),i=n(67294),o=n(62583),a=n(80194),s=n(66454),u=n(85128),l=n(92036),c=n(19829),d=n(85893),p={initial:e=>{let{position:t}=e,n=["top","bottom"].includes(t)?"y":"x",r=["top-right","bottom-right"].includes(t)?1:-1;return"bottom"===t&&(r=1),{opacity:0,[n]:24*r}},animate:{opacity:1,y:0,x:0,scale:1,transition:{duration:.4,ease:[.4,0,.2,1]}},exit:{opacity:0,scale:.85,transition:{duration:.2,ease:[.4,0,1,1]}}},f=(0,i.memo)(e=>{let{id:t,message:n,onCloseComplete:f,onRequestRemove:h,requestClose:m=!1,position:g="bottom",duration:y=5e3,containerStyle:b,motionVariants:_=p,toastSpacing:v="0.5rem"}=e,[w,k]=(0,i.useState)(y),x=(0,u.hO)();(0,a.r)(()=>{x||null==f||f()},[x]),(0,a.r)(()=>{k(y)},[y]);let A=()=>k(null),S=()=>k(y),I=()=>{x&&h()};(0,i.useEffect)(()=>{x&&m&&h()},[x,m,h]),function(e,t){let n=(0,o.W)(e);(0,i.useEffect)(()=>{if(null==t)return;let e=null;return e=window.setTimeout(()=>{n()},t),()=>{e&&window.clearTimeout(e)}},[t,n])}(I,w);let T=(0,i.useMemo)(()=>({pointerEvents:"auto",maxWidth:560,minWidth:300,margin:v,...b}),[b,v]),E=(0,i.useMemo)(()=>(0,r.sv)(g),[g]);return(0,d.jsx)(l.E.div,{layout:!0,className:"chakra-toast",variants:_,initial:"initial",animate:"animate",exit:"exit",onHoverStart:A,onHoverEnd:S,custom:{position:g},style:E,children:(0,d.jsx)(c.m.div,{role:"status","aria-atomic":"true",className:"chakra-toast__inner",__css:T,children:(0,s.Pu)(n,{id:t,onClose:I})})})});f.displayName="ToastComponent";var h=n(84863),m=n(24483),g=n(56841),[y,b]=(0,n(15182).k)({name:"ToastOptionsContext",strict:!1}),_=e=>{let t=(0,i.useSyncExternalStore)(h.fp.subscribe,h.fp.getState,h.fp.getState),{motionVariants:n,component:o=f,portalProps:a}=e,s=Object.keys(t),u=s.map(e=>{let i=t[e];return(0,d.jsx)("div",{role:"region","aria-live":"polite",id:`chakra-toast-manager-${e}`,style:(0,r.IW)(e),children:(0,d.jsx)(m.M,{initial:!1,children:i.map(e=>(0,d.jsx)(o,{motionVariants:n,...e},e.id))})},e)});return(0,d.jsx)(g.h,{...a,children:u})}},14266:function(e,t,n){"use strict";function r(e,...t){return"function"==typeof e?e(...t):e}function i(...e){return function(t){e.some(e=>(null==e||e(t),null==t?void 0:t.defaultPrevented))}}n.d(t,{v0:function(){return i},Pu:function(){return r}})},65798:function(e,t,n){"use strict";function r(e,t){let n={};return Object.keys(e).forEach(r=>{t.includes(r)||(n[r]=e[r])}),n}n.d(t,{CE:function(){return r},Wf:function(){return i},YU:function(){return a},lw:function(){return o}}),n(38554);var i=(e=>{let t=new WeakMap,n=(n,r,i,o)=>{if(void 0===n)return e(n,r,i);t.has(n)||t.set(n,new Map);let a=t.get(n);if(a.has(r))return a.get(r);let s=e(n,r,i,o);return a.set(r,s),s};return n})(function(e,t,n,r){let i="string"==typeof t?t.split("."):[t];for(r=0;r{let i=e[r],o=t(i,r,e);o&&(n[r]=i)}),n}var a=e=>o(e,e=>null!=e)},66292:function(e,t,n){"use strict";function r(e){for(var t,n=0,r=0,i=e.length;i>=4;++r,i-=4)t=(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))*1540483477+((t>>>16)*59797<<16),t^=t>>>24,n=(65535&t)*1540483477+((t>>>16)*59797<<16)^(65535&n)*1540483477+((n>>>16)*59797<<16);switch(i){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n^=255&e.charCodeAt(r),n=(65535&n)*1540483477+((n>>>16)*59797<<16)}return n^=n>>>13,(((n=(65535&n)*1540483477+((n>>>16)*59797<<16))^n>>>15)>>>0).toString(36)}n.d(t,{Z:function(){return r}})},71068:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(45042),i=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,o=(0,r.Z)(function(e){return i.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&91>e.charCodeAt(2)})},45042:function(e,t,n){"use strict";function r(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}n.d(t,{Z:function(){return r}})},47661:function(e,t,n){"use strict";n.d(t,{C:function(){return d},E:function(){return v},T:function(){return f},a:function(){return m},c:function(){return b},h:function(){return g},w:function(){return p}});var r=n(67294),i=n(88334);function o(){return(o=Object.assign?Object.assign.bind():function(e){for(var t=1;t-1&&!e.return)switch(e.type){case a.h5:e.return=function e(t,n){switch((0,o.vp)(t,n)){case 5103:return a.G$+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return a.G$+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return a.G$+t+a.uj+t+a.MS+t+t;case 6828:case 4268:return a.G$+t+a.MS+t+t;case 6165:return a.G$+t+a.MS+"flex-"+t+t;case 5187:return a.G$+t+(0,o.gx)(t,/(\w+).+(:[^]+)/,a.G$+"box-$1$2"+a.MS+"flex-$1$2")+t;case 5443:return a.G$+t+a.MS+"flex-item-"+(0,o.gx)(t,/flex-|-self/,"")+t;case 4675:return a.G$+t+a.MS+"flex-line-pack"+(0,o.gx)(t,/align-content|flex-|-self/,"")+t;case 5548:return a.G$+t+a.MS+(0,o.gx)(t,"shrink","negative")+t;case 5292:return a.G$+t+a.MS+(0,o.gx)(t,"basis","preferred-size")+t;case 6060:return a.G$+"box-"+(0,o.gx)(t,"-grow","")+a.G$+t+a.MS+(0,o.gx)(t,"grow","positive")+t;case 4554:return a.G$+(0,o.gx)(t,/([^-])(transform)/g,"$1"+a.G$+"$2")+t;case 6187:return(0,o.gx)((0,o.gx)((0,o.gx)(t,/(zoom-|grab)/,a.G$+"$1"),/(image-set)/,a.G$+"$1"),t,"")+t;case 5495:case 3959:return(0,o.gx)(t,/(image-set\([^]*)/,a.G$+"$1$`$1");case 4968:return(0,o.gx)((0,o.gx)(t,/(.+:)(flex-)?(.*)/,a.G$+"box-pack:$3"+a.MS+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+a.G$+t+t;case 4095:case 3583:case 4068:case 2532:return(0,o.gx)(t,/(.+)-inline(.+)/,a.G$+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if((0,o.to)(t)-1-n>6)switch((0,o.uO)(t,n+1)){case 109:if(45!==(0,o.uO)(t,n+4))break;case 102:return(0,o.gx)(t,/(.+:)(.+)-([^]+)/,"$1"+a.G$+"$2-$3$1"+a.uj+(108==(0,o.uO)(t,n+3)?"$3":"$2-$3"))+t;case 115:return~(0,o.Cw)(t,"stretch")?e((0,o.gx)(t,"stretch","fill-available"),n)+t:t}break;case 4949:if(115!==(0,o.uO)(t,n+1))break;case 6444:switch((0,o.uO)(t,(0,o.to)(t)-3-(~(0,o.Cw)(t,"!important")&&10))){case 107:return(0,o.gx)(t,":",":"+a.G$)+t;case 101:return(0,o.gx)(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+a.G$+(45===(0,o.uO)(t,14)?"inline-":"")+"box$3$1"+a.G$+"$2$3$1"+a.MS+"$2box$3")+t}break;case 5936:switch((0,o.uO)(t,n+11)){case 114:return a.G$+t+a.MS+(0,o.gx)(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return a.G$+t+a.MS+(0,o.gx)(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return a.G$+t+a.MS+(0,o.gx)(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return a.G$+t+a.MS+t+t}return t}(e.value,e.length);break;case a.lK:return(0,s.q)([(0,i.JG)(e,{value:(0,o.gx)(e.value,"@","@"+a.G$)})],r);case a.Fr:if(e.length)return(0,o.$e)(e.props,function(t){switch((0,o.EQ)(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return(0,s.q)([(0,i.JG)(e,{props:[(0,o.gx)(t,/:(read-\w+)/,":"+a.uj+"$1")]})],r);case"::placeholder":return(0,s.q)([(0,i.JG)(e,{props:[(0,o.gx)(t,/:(plac\w+)/,":"+a.G$+"input-$1")]}),(0,i.JG)(e,{props:[(0,o.gx)(t,/:(plac\w+)/,":"+a.uj+"$1")]}),(0,i.JG)(e,{props:[(0,o.gx)(t,/:(plac\w+)/,a.MS+"input-$1")]})],r)}return""})}}],g=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))})}var i=e.stylisPlugins||m,o={},a=[];c=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n96?x:A},I=function(e,t,n){var r;if(t){var i=t.shouldForwardProp;r=e.__emotion_forwardProp&&i?function(t){return e.__emotion_forwardProp(t)&&i(t)}:i}return"function"!=typeof r&&n&&(r=e.__emotion_forwardProp),r},T=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return w(t,n,r),v(function(){return k(t,n,r)}),null},E=(function e(t,n){var s,u,l=t.__emotion_real===t,c=l&&t.__emotion_base||t;void 0!==n&&(s=n.label,u=n.target);var d=I(t,n,l),p=d||S(c),f=!p("as");return function(){var h=arguments,b=l&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==s&&b.push("label:"+s+";"),null==h[0]||void 0===h[0].raw)b.push.apply(b,h);else{var _=h[0];b.push(_[0]);for(var v=h.length,w=1;w{let r=t.localName;return r||d.throwError("cannot encode object for signature with missing names",o.Yd.errors.INVALID_ARGUMENT,{argument:"values",coder:t,value:n}),e[r]&&d.throwError("cannot encode object for signature with duplicate names",o.Yd.errors.INVALID_ARGUMENT,{argument:"values",coder:t,value:n}),e[r]=!0,n[r]})}else d.throwArgumentError("invalid tuple value","tuple",n);t.length!==r.length&&d.throwArgumentError("types/value length mismatch","tuple",n);let i=new s.QV(e.wordSize),a=new s.QV(e.wordSize),u=[];return t.forEach((e,t)=>{let n=r[t];if(e.dynamic){let t=a.length;e.encode(a,n);let r=i.writeUpdatableValue();u.push(e=>{r(e+t)})}else e.encode(i,n)}),u.forEach(e=>{e(i.length)}),e.appendWriter(i)+e.appendWriter(a)}function f(e,t){let n=[],r=e.subReader(0);t.forEach(t=>{let i=null;if(t.dynamic){let n=e.readValue(),a=r.subReader(n.toNumber());try{i=t.decode(a)}catch(e){if(e.code===o.Yd.errors.BUFFER_OVERRUN)throw e;(i=e).baseType=t.name,i.name=t.localName,i.type=t.type}}else try{i=t.decode(e)}catch(e){if(e.code===o.Yd.errors.BUFFER_OVERRUN)throw e;(i=e).baseType=t.name,i.name=t.localName,i.type=t.type}void 0!=i&&n.push(i)});let i=t.reduce((e,t)=>{let n=t.localName;return n&&(e[n]||(e[n]=0),e[n]++),e},{});t.forEach((e,t)=>{let r=e.localName;if(!r||1!==i[r]||("length"===r&&(r="_length"),null!=n[r]))return;let o=n[t];o instanceof Error?Object.defineProperty(n,r,{enumerable:!0,get:()=>{throw o}}):n[r]=o});for(let e=0;e{throw t}})}return Object.freeze(n)}class h extends s.XI{constructor(e,t,n){let r=e.type+"["+(t>=0?t:"")+"]",i=-1===t||e.dynamic;super("array",r,n,i),this.coder=e,this.length=t}defaultValue(){let e=this.coder.defaultValue(),t=[];for(let n=0;ne._data.length&&d.throwError("insufficient data length",o.Yd.errors.BUFFER_OVERRUN,{length:e._data.length,count:t});let n=[];for(let e=0;e{e.dynamic&&(n=!0),r.push(e.type)});let i="tuple("+r.join(",")+")";super("tuple",i,t,n),this.coders=e}defaultValue(){let e=[];this.coders.forEach(t=>{e.push(t.defaultValue())});let t=this.coders.reduce((e,t)=>{let n=t.localName;return n&&(e[n]||(e[n]=0),e[n]++),e},{});return this.coders.forEach((n,r)=>{let i=n.localName;i&&1===t[i]&&("length"===i&&(i="_length"),null==e[i]&&(e[i]=e[r]))}),Object.freeze(e)}encode(e,t){return p(e,this.coders,t)}decode(e){return e.coerce(this.name,f(e,this.coders))}}var I=n(11388);let T=new o.Yd(a.i),E=new RegExp(/^bytes([0-9]*)$/),P=new RegExp(/^(u?int)([0-9]*)$/),C=new class{constructor(e){(0,i.zG)(this,"coerceFunc",e||null)}_getCoder(e){switch(e.baseType){case"address":return new l(e.name);case"bool":return new m(e.name);case"string":return new A(e.name);case"bytes":return new y(e.name);case"array":return new h(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new S((e.components||[]).map(e=>this._getCoder(e)),e.name);case"":return new _(e.name)}let t=e.type.match(P);if(t){let n=parseInt(t[2]||"256");return(0===n||n>256||n%8!=0)&&T.throwArgumentError("invalid "+t[1]+" bit length","param",e),new k(n/8,"int"===t[1],e.name)}if(t=e.type.match(E)){let n=parseInt(t[1]);return(0===n||n>32)&&T.throwArgumentError("invalid bytes length","param",e),new b(n,e.name)}return T.throwArgumentError("invalid type","type",e.type)}_getWordSize(){return 32}_getReader(e,t){return new s.Ej(e,this._getWordSize(),this.coerceFunc,t)}_getWriter(){return new s.QV(this._getWordSize())}getDefaultValue(e){let t=e.map(e=>this._getCoder(I._R.from(e))),n=new S(t,"_");return n.defaultValue()}encode(e,t){e.length!==t.length&&T.throwError("types/values length mismatch",o.Yd.errors.INVALID_ARGUMENT,{count:{types:e.length,values:t.length},value:{types:e,values:t}});let n=e.map(e=>this._getCoder(I._R.from(e))),r=new S(n,"_"),i=this._getWriter();return r.encode(i,t),i.data}decode(e,t,n){let i=e.map(e=>this._getCoder(I._R.from(e))),o=new S(i,"_");return o.decode(this._getReader((0,r.lE)(t),n))}}},61184:function(e,t,n){"use strict";n.d(t,{BR:function(){return l},Ej:function(){return p},QV:function(){return d},XI:function(){return c}});var r=n(16441),i=n(6731),o=n(6881),a=n(1581),s=n(95851);let u=new a.Yd(s.i);function l(e){let t=[],n=function(e,r){if(Array.isArray(r))for(let i in r){let o=e.slice();o.push(i);try{n(o,r[i])}catch(e){t.push({path:o,error:e})}}};return n([],e),t}class c{constructor(e,t,n,r){this.name=e,this.type=t,this.localName=n,this.dynamic=r}_throwError(e,t){u.throwArgumentError(e,this.localName,t)}}class d{constructor(e){(0,o.zG)(this,"wordSize",e||32),this._data=[],this._dataLength=0,this._padding=new Uint8Array(e)}get data(){return(0,r.xs)(this._data)}get length(){return this._dataLength}_writeData(e){return this._data.push(e),this._dataLength+=e.length,e.length}appendWriter(e){return this._writeData((0,r.zo)(e._data))}writeBytes(e){let t=(0,r.lE)(e),n=t.length%this.wordSize;return n&&(t=(0,r.zo)([t,this._padding.slice(n)])),this._writeData(t)}_getValue(e){let t=(0,r.lE)(i.O$.from(e));return t.length>this.wordSize&&u.throwError("value out-of-bounds",a.Yd.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:t.length}),t.length%this.wordSize&&(t=(0,r.zo)([this._padding.slice(t.length%this.wordSize),t])),t}writeValue(e){return this._writeData(this._getValue(e))}writeUpdatableValue(){let e=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,t=>{this._data[e]=this._getValue(t)}}}class p{constructor(e,t,n,i){(0,o.zG)(this,"_data",(0,r.lE)(e)),(0,o.zG)(this,"wordSize",t||32),(0,o.zG)(this,"_coerceFunc",n),(0,o.zG)(this,"allowLoose",i),this._offset=0}get data(){return(0,r.Dv)(this._data)}get consumed(){return this._offset}static coerce(e,t){let n=e.match("^u?int([0-9]+)$");return n&&48>=parseInt(n[1])&&(t=t.toNumber()),t}coerce(e,t){return this._coerceFunc?this._coerceFunc(e,t):p.coerce(e,t)}_peekBytes(e,t,n){let r=Math.ceil(t/this.wordSize)*this.wordSize;return this._offset+r>this._data.length&&(this.allowLoose&&n&&this._offset+t<=this._data.length?r=t:u.throwError("data out-of-bounds",a.Yd.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+r})),this._data.slice(this._offset,this._offset+r)}subReader(e){return new p(this._data.slice(this._offset+e),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(e,t){let n=this._peekBytes(0,e,!!t);return this._offset+=n.length,n.slice(0,e)}readValue(){return i.O$.from(this.readBytes(this.wordSize))}}},11388:function(e,t,n){"use strict";n.d(t,{HY:function(){return y},QV:function(){return b},Xg:function(){return k},YW:function(){return x},_R:function(){return m},pc:function(){return f}});var r=n(6731),i=n(6881),o=n(1581),a=n(95851);let s=new o.Yd(a.i),u={},l={calldata:!0,memory:!0,storage:!0},c={calldata:!0,memory:!0};function d(e,t){if("bytes"===e||"string"===e){if(l[t])return!0}else if("address"===e){if("payable"===t)return!0}else if((e.indexOf("[")>=0||"tuple"===e)&&c[t])return!0;return(l[t]||"payable"===t)&&s.throwArgumentError("invalid modifier","name",t),!1}function p(e,t){for(let n in t)(0,i.zG)(e,n,t[n])}let f=Object.freeze({sighash:"sighash",minimal:"minimal",full:"full",json:"json"}),h=new RegExp(/^(.*)\[([0-9]*)\]$/);class m{constructor(e,t){e!==u&&s.throwError("use fromString",o.Yd.errors.UNSUPPORTED_OPERATION,{operation:"new ParamType()"}),p(this,t);let n=this.type.match(h);n?p(this,{arrayLength:parseInt(n[2]||"-1"),arrayChildren:m.fromObject({type:n[1],components:this.components}),baseType:"array"}):p(this,{arrayLength:null,arrayChildren:null,baseType:null!=this.components?"tuple":this.type}),this._isParamType=!0,Object.freeze(this)}format(e){if(e||(e=f.sighash),f[e]||s.throwArgumentError("invalid format type","format",e),e===f.json){let t={type:"tuple"===this.baseType?"tuple":this.type,name:this.name||void 0};return"boolean"==typeof this.indexed&&(t.indexed=this.indexed),this.components&&(t.components=this.components.map(t=>JSON.parse(t.format(e)))),JSON.stringify(t)}let t="";return"array"===this.baseType?t+=this.arrayChildren.format(e)+"["+(this.arrayLength<0?"":String(this.arrayLength))+"]":"tuple"===this.baseType?(e!==f.sighash&&(t+=this.type),t+="("+this.components.map(t=>t.format(e)).join(e===f.full?", ":",")+")"):t+=this.type,e!==f.sighash&&(!0===this.indexed&&(t+=" indexed"),e===f.full&&this.name&&(t+=" "+this.name)),t}static from(e,t){return"string"==typeof e?m.fromString(e,t):m.fromObject(e)}static fromObject(e){return m.isParamType(e)?e:new m(u,{name:e.name||null,type:I(e.type),indexed:null==e.indexed?null:!!e.indexed,components:e.components?e.components.map(m.fromObject):null})}static fromString(e,t){var n;return n=function(e,t){let n=e;function r(t){s.throwArgumentError(`unexpected character at position ${t}`,"param",e)}function i(e){let n={type:"",name:"",parent:e,state:{allowType:!0}};return t&&(n.indexed=!1),n}e=e.replace(/\s/g," ");let o={type:"",name:"",state:{allowType:!0}},a=o;for(let n=0;nm.fromString(e,t))}class y{constructor(e,t){e!==u&&s.throwError("use a static from method",o.Yd.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),p(this,t),this._isFragment=!0,Object.freeze(this)}static from(e){return y.isFragment(e)?e:"string"==typeof e?y.fromString(e):y.fromObject(e)}static fromObject(e){if(y.isFragment(e))return e;switch(e.type){case"function":return x.fromObject(e);case"event":return b.fromObject(e);case"constructor":return k.fromObject(e);case"error":return S.fromObject(e);case"fallback":case"receive":return null}return s.throwArgumentError("invalid fragment object","value",e)}static fromString(e){return"event"===(e=(e=(e=e.replace(/\s/g," ")).replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," ")).trim()).split(" ")[0]?b.fromString(e.substring(5).trim()):"function"===e.split(" ")[0]?x.fromString(e.substring(8).trim()):"constructor"===e.split("(")[0].trim()?k.fromString(e.trim()):"error"===e.split(" ")[0]?S.fromString(e.substring(5).trim()):s.throwArgumentError("unsupported fragment","value",e)}static isFragment(e){return!!(e&&e._isFragment)}}class b extends y{format(e){if(e||(e=f.sighash),f[e]||s.throwArgumentError("invalid format type","format",e),e===f.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(t=>JSON.parse(t.format(e)))});let t="";return e!==f.sighash&&(t+="event "),t+=this.name+"("+this.inputs.map(t=>t.format(e)).join(e===f.full?", ":",")+") ",e!==f.sighash&&this.anonymous&&(t+="anonymous "),t.trim()}static from(e){return"string"==typeof e?b.fromString(e):b.fromObject(e)}static fromObject(e){if(b.isEventFragment(e))return e;"event"!==e.type&&s.throwArgumentError("invalid event object","value",e);let t={name:E(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(m.fromObject):[],type:"event"};return new b(u,t)}static fromString(e){let t=e.match(P);t||s.throwArgumentError("invalid event string","value",e);let n=!1;return t[3].split(" ").forEach(e=>{switch(e.trim()){case"anonymous":n=!0;break;case"":break;default:s.warn("unknown modifier: "+e)}}),b.fromObject({name:t[1].trim(),anonymous:n,inputs:g(t[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&"event"===e.type}}function _(e,t){t.gas=null;let n=e.split("@");return 1!==n.length?(n.length>2&&s.throwArgumentError("invalid human-readable ABI signature","value",e),n[1].match(/^[0-9]+$/)||s.throwArgumentError("invalid human-readable ABI signature gas","value",e),t.gas=r.O$.from(n[1]),n[0]):e}function v(e,t){t.constant=!1,t.payable=!1,t.stateMutability="nonpayable",e.split(" ").forEach(e=>{switch(e.trim()){case"constant":t.constant=!0;break;case"payable":t.payable=!0,t.stateMutability="payable";break;case"nonpayable":t.payable=!1,t.stateMutability="nonpayable";break;case"pure":t.constant=!0,t.stateMutability="pure";break;case"view":t.constant=!0,t.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+e)}})}function w(e){let t={constant:!1,payable:!0,stateMutability:"payable"};return null!=e.stateMutability?(t.stateMutability=e.stateMutability,t.constant="view"===t.stateMutability||"pure"===t.stateMutability,null!=e.constant&&!!e.constant!==t.constant&&s.throwArgumentError("cannot have constant function with mutability "+t.stateMutability,"value",e),t.payable="payable"===t.stateMutability,null!=e.payable&&!!e.payable!==t.payable&&s.throwArgumentError("cannot have payable function with mutability "+t.stateMutability,"value",e)):null!=e.payable?(t.payable=!!e.payable,null!=e.constant||t.payable||"constructor"===e.type||s.throwArgumentError("unable to determine stateMutability","value",e),t.constant=!!e.constant,t.constant?t.stateMutability="view":t.stateMutability=t.payable?"payable":"nonpayable",t.payable&&t.constant&&s.throwArgumentError("cannot have constant payable function","value",e)):null!=e.constant?(t.constant=!!e.constant,t.payable=!t.constant,t.stateMutability=t.constant?"view":"payable"):"constructor"!==e.type&&s.throwArgumentError("unable to determine stateMutability","value",e),t}class k extends y{format(e){if(e||(e=f.sighash),f[e]||s.throwArgumentError("invalid format type","format",e),e===f.json)return JSON.stringify({type:"constructor",stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(t=>JSON.parse(t.format(e)))});e===f.sighash&&s.throwError("cannot format a constructor for sighash",o.Yd.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let t="constructor("+this.inputs.map(t=>t.format(e)).join(e===f.full?", ":",")+") ";return this.stateMutability&&"nonpayable"!==this.stateMutability&&(t+=this.stateMutability+" "),t.trim()}static from(e){return"string"==typeof e?k.fromString(e):k.fromObject(e)}static fromObject(e){if(k.isConstructorFragment(e))return e;"constructor"!==e.type&&s.throwArgumentError("invalid constructor object","value",e);let t=w(e);t.constant&&s.throwArgumentError("constructor cannot be constant","value",e);let n={name:null,type:e.type,inputs:e.inputs?e.inputs.map(m.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?r.O$.from(e.gas):null};return new k(u,n)}static fromString(e){let t={type:"constructor"},n=(e=_(e,t)).match(P);return n&&"constructor"===n[1].trim()||s.throwArgumentError("invalid constructor string","value",e),t.inputs=g(n[2].trim(),!1),v(n[3].trim(),t),k.fromObject(t)}static isConstructorFragment(e){return e&&e._isFragment&&"constructor"===e.type}}class x extends k{format(e){if(e||(e=f.sighash),f[e]||s.throwArgumentError("invalid format type","format",e),e===f.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(t=>JSON.parse(t.format(e))),outputs:this.outputs.map(t=>JSON.parse(t.format(e)))});let t="";return e!==f.sighash&&(t+="function "),t+=this.name+"("+this.inputs.map(t=>t.format(e)).join(e===f.full?", ":",")+") ",e!==f.sighash&&(this.stateMutability?"nonpayable"!==this.stateMutability&&(t+=this.stateMutability+" "):this.constant&&(t+="view "),this.outputs&&this.outputs.length&&(t+="returns ("+this.outputs.map(t=>t.format(e)).join(", ")+") "),null!=this.gas&&(t+="@"+this.gas.toString()+" ")),t.trim()}static from(e){return"string"==typeof e?x.fromString(e):x.fromObject(e)}static fromObject(e){if(x.isFunctionFragment(e))return e;"function"!==e.type&&s.throwArgumentError("invalid function object","value",e);let t=w(e),n={type:e.type,name:E(e.name),constant:t.constant,inputs:e.inputs?e.inputs.map(m.fromObject):[],outputs:e.outputs?e.outputs.map(m.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?r.O$.from(e.gas):null};return new x(u,n)}static fromString(e){let t={type:"function"},n=(e=_(e,t)).split(" returns ");n.length>2&&s.throwArgumentError("invalid function string","value",e);let r=n[0].match(P);if(r||s.throwArgumentError("invalid function signature","value",e),t.name=r[1].trim(),t.name&&E(t.name),t.inputs=g(r[2],!1),v(r[3].trim(),t),n.length>1){let r=n[1].match(P);(""!=r[1].trim()||""!=r[3].trim())&&s.throwArgumentError("unexpected tokens","value",e),t.outputs=g(r[2],!1)}else t.outputs=[];return x.fromObject(t)}static isFunctionFragment(e){return e&&e._isFragment&&"function"===e.type}}function A(e){let t=e.format();return("Error(string)"===t||"Panic(uint256)"===t)&&s.throwArgumentError(`cannot specify user defined ${t} error`,"fragment",e),e}class S extends y{format(e){if(e||(e=f.sighash),f[e]||s.throwArgumentError("invalid format type","format",e),e===f.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(t=>JSON.parse(t.format(e)))});let t="";return e!==f.sighash&&(t+="error "),(t+=this.name+"("+this.inputs.map(t=>t.format(e)).join(e===f.full?", ":",")+") ").trim()}static from(e){return"string"==typeof e?S.fromString(e):S.fromObject(e)}static fromObject(e){if(S.isErrorFragment(e))return e;"error"!==e.type&&s.throwArgumentError("invalid error object","value",e);let t={type:e.type,name:E(e.name),inputs:e.inputs?e.inputs.map(m.fromObject):[]};return A(new S(u,t))}static fromString(e){let t={type:"error"},n=e.match(P);return n||s.throwArgumentError("invalid error signature","value",e),t.name=n[1].trim(),t.name&&E(t.name),t.inputs=g(n[2],!1),A(S.fromObject(t))}static isErrorFragment(e){return e&&e._isFragment&&"error"===e.type}}function I(e){return e.match(/^uint($|[^1-9])/)?e="uint256"+e.substring(4):e.match(/^int($|[^1-9])/)&&(e="int256"+e.substring(3)),e}let T=RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function E(e){return e&&e.match(T)||s.throwArgumentError(`invalid identifier "${e}"`,"value",e),e}let P=RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$")},8198:function(e,t,n){"use strict";n.d(t,{Hk:function(){return y},vU:function(){return v}});var r=n(19485),i=n(6731),o=n(16441),a=n(32046),s=n(38197),u=n(6881),l=n(84243),c=n(11388),d=n(1581),p=n(95851);let f=new d.Yd(p.i);class h extends u.dk{}class m extends u.dk{}class g extends u.dk{}class y extends u.dk{static isIndexed(e){return!!(e&&e._isIndexed)}}let b={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function _(e,t){let n=Error(`deferred error during ABI decoding triggered accessing ${e}`);return n.error=t,n}class v{constructor(e){let t=[];t="string"==typeof e?JSON.parse(e):e,(0,u.zG)(this,"fragments",t.map(e=>c.HY.from(e)).filter(e=>null!=e)),(0,u.zG)(this,"_abiCoder",(0,u.tu)(new.target,"getAbiCoder")()),(0,u.zG)(this,"functions",{}),(0,u.zG)(this,"errors",{}),(0,u.zG)(this,"events",{}),(0,u.zG)(this,"structs",{}),this.fragments.forEach(e=>{let t=null;switch(e.type){case"constructor":if(this.deploy){f.warn("duplicate definition - constructor");return}(0,u.zG)(this,"deploy",e);return;case"function":t=this.functions;break;case"event":t=this.events;break;case"error":t=this.errors;break;default:return}let n=e.format();if(t[n]){f.warn("duplicate definition - "+n);return}t[n]=e}),this.deploy||(0,u.zG)(this,"deploy",c.Xg.from({payable:!1,type:"constructor"})),(0,u.zG)(this,"_isInterface",!0)}format(e){e||(e=c.pc.full),e===c.pc.sighash&&f.throwArgumentError("interface does not support formatting sighash","format",e);let t=this.fragments.map(t=>t.format(e));return e===c.pc.json?JSON.stringify(t.map(e=>JSON.parse(e))):t}static getAbiCoder(){return l.$}static getAddress(e){return(0,r.Kn)(e)}static getSighash(e){return(0,o.p3)((0,a.id)(e.format()),0,4)}static getEventTopic(e){return(0,a.id)(e.format())}getFunction(e){if((0,o.A7)(e)){for(let t in this.functions)if(e===this.getSighash(t))return this.functions[t];f.throwArgumentError("no matching function","sighash",e)}if(-1===e.indexOf("(")){let t=e.trim(),n=Object.keys(this.functions).filter(e=>e.split("(")[0]===t);return 0===n.length?f.throwArgumentError("no matching function","name",t):n.length>1&&f.throwArgumentError("multiple matching functions","name",t),this.functions[n[0]]}let t=this.functions[c.YW.fromString(e).format()];return t||f.throwArgumentError("no matching function","signature",e),t}getEvent(e){if((0,o.A7)(e)){let t=e.toLowerCase();for(let e in this.events)if(t===this.getEventTopic(e))return this.events[e];f.throwArgumentError("no matching event","topichash",t)}if(-1===e.indexOf("(")){let t=e.trim(),n=Object.keys(this.events).filter(e=>e.split("(")[0]===t);return 0===n.length?f.throwArgumentError("no matching event","name",t):n.length>1&&f.throwArgumentError("multiple matching events","name",t),this.events[n[0]]}let t=this.events[c.QV.fromString(e).format()];return t||f.throwArgumentError("no matching event","signature",e),t}getError(e){if((0,o.A7)(e)){let t=(0,u.tu)(this.constructor,"getSighash");for(let n in this.errors){let r=this.errors[n];if(e===t(r))return this.errors[n]}f.throwArgumentError("no matching error","sighash",e)}if(-1===e.indexOf("(")){let t=e.trim(),n=Object.keys(this.errors).filter(e=>e.split("(")[0]===t);return 0===n.length?f.throwArgumentError("no matching error","name",t):n.length>1&&f.throwArgumentError("multiple matching errors","name",t),this.errors[n[0]]}let t=this.errors[c.YW.fromString(e).format()];return t||f.throwArgumentError("no matching error","signature",e),t}getSighash(e){if("string"==typeof e)try{e=this.getFunction(e)}catch(t){try{e=this.getError(e)}catch(e){throw t}}return(0,u.tu)(this.constructor,"getSighash")(e)}getEventTopic(e){return"string"==typeof e&&(e=this.getEvent(e)),(0,u.tu)(this.constructor,"getEventTopic")(e)}_decodeParams(e,t){return this._abiCoder.decode(e,t)}_encodeParams(e,t){return this._abiCoder.encode(e,t)}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[])}decodeErrorResult(e,t){"string"==typeof e&&(e=this.getError(e));let n=(0,o.lE)(t);return(0,o.Dv)(n.slice(0,4))!==this.getSighash(e)&&f.throwArgumentError(`data signature does not match error ${e.name}.`,"data",(0,o.Dv)(n)),this._decodeParams(e.inputs,n.slice(4))}encodeErrorResult(e,t){return"string"==typeof e&&(e=this.getError(e)),(0,o.Dv)((0,o.zo)([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionData(e,t){"string"==typeof e&&(e=this.getFunction(e));let n=(0,o.lE)(t);return(0,o.Dv)(n.slice(0,4))!==this.getSighash(e)&&f.throwArgumentError(`data signature does not match function ${e.name}.`,"data",(0,o.Dv)(n)),this._decodeParams(e.inputs,n.slice(4))}encodeFunctionData(e,t){return"string"==typeof e&&(e=this.getFunction(e)),(0,o.Dv)((0,o.zo)([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionResult(e,t){"string"==typeof e&&(e=this.getFunction(e));let n=(0,o.lE)(t),r=null,i="",a=null,s=null,u=null;switch(n.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,n)}catch(e){}break;case 4:{let e=(0,o.Dv)(n.slice(0,4)),t=b[e];if(t)a=this._abiCoder.decode(t.inputs,n.slice(4)),s=t.name,u=t.signature,t.reason&&(r=a[0]),"Error"===s?i=`; VM Exception while processing transaction: reverted with reason string ${JSON.stringify(a[0])}`:"Panic"===s&&(i=`; VM Exception while processing transaction: reverted with panic code ${a[0]}`);else try{let t=this.getError(e);a=this._abiCoder.decode(t.inputs,n.slice(4)),s=t.name,u=t.format()}catch(e){}}}return f.throwError("call revert exception"+i,d.Yd.errors.CALL_EXCEPTION,{method:e.format(),data:(0,o.Dv)(t),errorArgs:a,errorName:s,errorSignature:u,reason:r})}encodeFunctionResult(e,t){return"string"==typeof e&&(e=this.getFunction(e)),(0,o.Dv)(this._abiCoder.encode(e.outputs,t||[]))}encodeFilterTopics(e,t){"string"==typeof e&&(e=this.getEvent(e)),t.length>e.inputs.length&&f.throwError("too many arguments for "+e.format(),d.Yd.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:t});let n=[];e.anonymous||n.push(this.getEventTopic(e));let r=(e,t)=>"string"===e.type?(0,a.id)(t):"bytes"===e.type?(0,s.w)((0,o.Dv)(t)):("bool"===e.type&&"boolean"==typeof t&&(t=t?"0x01":"0x00"),e.type.match(/^u?int/)&&(t=i.O$.from(t).toHexString()),"address"===e.type&&this._abiCoder.encode(["address"],[t]),(0,o.$m)((0,o.Dv)(t),32));for(t.forEach((t,i)=>{let o=e.inputs[i];if(!o.indexed){null!=t&&f.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+o.name,t);return}null==t?n.push(null):"array"===o.baseType||"tuple"===o.baseType?f.throwArgumentError("filtering with tuples or arrays not supported","contract."+o.name,t):Array.isArray(t)?n.push(t.map(e=>r(o,e))):n.push(r(o,t))});n.length&&null===n[n.length-1];)n.pop();return n}encodeEventLog(e,t){"string"==typeof e&&(e=this.getEvent(e));let n=[],r=[],i=[];return e.anonymous||n.push(this.getEventTopic(e)),t.length!==e.inputs.length&&f.throwArgumentError("event arguments/values mismatch","values",t),e.inputs.forEach((e,o)=>{let u=t[o];if(e.indexed){if("string"===e.type)n.push((0,a.id)(u));else if("bytes"===e.type)n.push((0,s.w)(u));else if("tuple"===e.baseType||"array"===e.baseType)throw Error("not implemented");else n.push(this._abiCoder.encode([e.type],[u]))}else r.push(e),i.push(u)}),{data:this._abiCoder.encode(r,i),topics:n}}decodeEventLog(e,t,n){if("string"==typeof e&&(e=this.getEvent(e)),null!=n&&!e.anonymous){let t=this.getEventTopic(e);(0,o.A7)(n[0],32)&&n[0].toLowerCase()===t||f.throwError("fragment/topic mismatch",d.Yd.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:t,value:n[0]}),n=n.slice(1)}let r=[],i=[],a=[];e.inputs.forEach((e,t)=>{e.indexed?"string"===e.type||"bytes"===e.type||"tuple"===e.baseType||"array"===e.baseType?(r.push(c._R.fromObject({type:"bytes32",name:e.name})),a.push(!0)):(r.push(e),a.push(!1)):(i.push(e),a.push(!1))});let s=null!=n?this._abiCoder.decode(r,(0,o.zo)(n)):null,u=this._abiCoder.decode(i,t,!0),l=[],p=0,h=0;e.inputs.forEach((e,t)=>{if(e.indexed){if(null==s)l[t]=new y({_isIndexed:!0,hash:null});else if(a[t])l[t]=new y({_isIndexed:!0,hash:s[h++]});else try{l[t]=s[h++]}catch(e){l[t]=e}}else try{l[t]=u[p++]}catch(e){l[t]=e}if(e.name&&null==l[e.name]){let n=l[t];n instanceof Error?Object.defineProperty(l,e.name,{enumerable:!0,get:()=>{throw _(`property ${JSON.stringify(e.name)}`,n)}}):l[e.name]=n}});for(let e=0;e{throw _(`index ${e}`,t)}})}return Object.freeze(l)}parseTransaction(e){let t=this.getFunction(e.data.substring(0,10).toLowerCase());return t?new m({args:this._abiCoder.decode(t.inputs,"0x"+e.data.substring(10)),functionFragment:t,name:t.name,signature:t.format(),sighash:this.getSighash(t),value:i.O$.from(e.value||"0")}):null}parseLog(e){let t=this.getEvent(e.topics[0]);return!t||t.anonymous?null:new h({eventFragment:t,name:t.name,signature:t.format(),topic:this.getEventTopic(t),args:this.decodeEventLog(t,e.data,e.topics)})}parseError(e){let t=(0,o.Dv)(e),n=this.getError(t.substring(0,10).toLowerCase());return n?new g({args:this._abiCoder.decode(n.inputs,"0x"+t.substring(10)),errorFragment:n,name:n.name,signature:n.format(),sighash:this.getSighash(n)}):null}static isInterface(e){return!!(e&&e._isInterface)}}},19485:function(e,t,n){"use strict";n.d(t,{Kn:function(){return p},CR:function(){return h},hB:function(){return m},UJ:function(){return f}});var r=n(16441),i=n(6731),o=n(38197),a=n(59052),s=n(1581);let u=new s.Yd("address/5.7.0");function l(e){(0,r.A7)(e,20)||u.throwArgumentError("invalid address","address",e),e=e.toLowerCase();let t=e.substring(2).split(""),n=new Uint8Array(40);for(let e=0;e<40;e++)n[e]=t[e].charCodeAt(0);let i=(0,r.lE)((0,o.w)(n));for(let e=0;e<40;e+=2)i[e>>1]>>4>=8&&(t[e]=t[e].toUpperCase()),(15&i[e>>1])>=8&&(t[e+1]=t[e+1].toUpperCase());return"0x"+t.join("")}let c={};for(let e=0;e<10;e++)c[String(e)]=String(e);for(let e=0;e<26;e++)c[String.fromCharCode(65+e)]=String(10+e);let d=Math.floor(Math.log10?Math.log10(9007199254740991):Math.log(9007199254740991)/Math.LN10);function p(e){let t=null;if("string"!=typeof e&&u.throwArgumentError("invalid address","address",e),e.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==e.substring(0,2)&&(e="0x"+e),t=l(e),e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&t!==e&&u.throwArgumentError("bad address checksum","address",e);else if(e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(e.substring(2,4)!==function(e){let t=(e=(e=e.toUpperCase()).substring(4)+e.substring(0,2)+"00").split("").map(e=>c[e]).join("");for(;t.length>=d;){let e=t.substring(0,d);t=parseInt(e,10)%97+t.substring(e.length)}let n=String(98-parseInt(t,10)%97);for(;n.length<2;)n="0"+n;return n}(e)&&u.throwArgumentError("bad icap checksum","address",e),t=(0,i.g$)(e.substring(4));t.length<40;)t="0"+t;t=l("0x"+t)}else u.throwArgumentError("invalid address","address",e);return t}function f(e){try{return p(e),!0}catch(e){}return!1}function h(e){let t=null;try{t=p(e.from)}catch(t){u.throwArgumentError("missing from address","transaction",e)}let n=(0,r.G1)((0,r.lE)(i.O$.from(e.nonce).toHexString()));return p((0,r.p3)((0,o.w)((0,a.c)([t,n])),12))}function m(e,t,n){return 32!==(0,r.E1)(t)&&u.throwArgumentError("salt must be 32 bytes","salt",t),32!==(0,r.E1)(n)&&u.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",n),p((0,r.p3)((0,o.w)((0,r.zo)(["0xff",p(e),t,n])),12))}},6731:function(e,t,n){"use strict";n.d(t,{O$:function(){return d},g$:function(){return g}});var r=n(13550),i=n.n(r),o=n(16441),a=n(1581),s=i().BN;let u=new a.Yd("bignumber/5.7.0"),l={},c=!1;class d{constructor(e,t){e!==l&&u.throwError("cannot call constructor directly; use BigNumber.from",a.Yd.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=t,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return f(h(this).fromTwos(e))}toTwos(e){return f(h(this).toTwos(e))}abs(){return"-"===this._hex[0]?d.from(this._hex.substring(1)):this}add(e){return f(h(this).add(h(e)))}sub(e){return f(h(this).sub(h(e)))}div(e){let t=d.from(e);return t.isZero()&&m("division-by-zero","div"),f(h(this).div(h(e)))}mul(e){return f(h(this).mul(h(e)))}mod(e){let t=h(e);return t.isNeg()&&m("division-by-zero","mod"),f(h(this).umod(t))}pow(e){let t=h(e);return t.isNeg()&&m("negative-power","pow"),f(h(this).pow(t))}and(e){let t=h(e);return(this.isNegative()||t.isNeg())&&m("unbound-bitwise-result","and"),f(h(this).and(t))}or(e){let t=h(e);return(this.isNegative()||t.isNeg())&&m("unbound-bitwise-result","or"),f(h(this).or(t))}xor(e){let t=h(e);return(this.isNegative()||t.isNeg())&&m("unbound-bitwise-result","xor"),f(h(this).xor(t))}mask(e){return(this.isNegative()||e<0)&&m("negative-width","mask"),f(h(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&m("negative-width","shl"),f(h(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&m("negative-width","shr"),f(h(this).shrn(e))}eq(e){return h(this).eq(h(e))}lt(e){return h(this).lt(h(e))}lte(e){return h(this).lte(h(e))}gt(e){return h(this).gt(h(e))}gte(e){return h(this).gte(h(e))}isNegative(){return"-"===this._hex[0]}isZero(){return h(this).isZero()}toNumber(){try{return h(this).toNumber()}catch(e){m("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch(e){}return u.throwError("this platform does not support BigInt",a.Yd.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(10===arguments[0]?c||(c=!0,u.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?u.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",a.Yd.errors.UNEXPECTED_ARGUMENT,{}):u.throwError("BigNumber.toString does not accept parameters",a.Yd.errors.UNEXPECTED_ARGUMENT,{})),h(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof d)return e;if("string"==typeof e)return e.match(/^-?0x[0-9a-f]+$/i)?new d(l,p(e)):e.match(/^-?[0-9]+$/)?new d(l,p(new s(e))):u.throwArgumentError("invalid BigNumber string","value",e);if("number"==typeof e)return e%1&&m("underflow","BigNumber.from",e),(e>=9007199254740991||e<=-9007199254740991)&&m("overflow","BigNumber.from",e),d.from(String(e));if("bigint"==typeof e)return d.from(e.toString());if((0,o._t)(e))return d.from((0,o.Dv)(e));if(e){if(e.toHexString){let t=e.toHexString();if("string"==typeof t)return d.from(t)}else{let t=e._hex;if(null==t&&"BigNumber"===e.type&&(t=e.hex),"string"==typeof t&&((0,o.A7)(t)||"-"===t[0]&&(0,o.A7)(t.substring(1))))return d.from(t)}}return u.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!!(e&&e._isBigNumber)}}function p(e){if("string"!=typeof e)return p(e.toString(16));if("-"===e[0])return("-"===(e=e.substring(1))[0]&&u.throwArgumentError("invalid hex","value",e),"0x00"===(e=p(e)))?e:"-"+e;if("0x"!==e.substring(0,2)&&(e="0x"+e),"0x"===e)return"0x00";for(e.length%2&&(e="0x0"+e.substring(2));e.length>4&&"0x00"===e.substring(0,4);)e="0x"+e.substring(4);return e}function f(e){return d.from(p(e))}function h(e){let t=d.from(e).toHexString();return"-"===t[0]?new s("-"+t.substring(3),16):new s(t.substring(2),16)}function m(e,t,n){let r={fault:e,operation:t};return null!=n&&(r.value=n),u.throwError(e,a.Yd.errors.NUMERIC_FAULT,r)}function g(e){return new s(e,36).toString(16)}},16441:function(e,t,n){"use strict";n.d(t,{lE:function(){return c},zo:function(){return d},xs:function(){return _},E1:function(){return y},p3:function(){return b},$P:function(){return v},$m:function(){return w},Dv:function(){return g},_t:function(){return l},Zq:function(){return s},A7:function(){return h},N:function(){return k},G1:function(){return p},Bu:function(){return f}});var r=n(1581);let i=new r.Yd("bytes/5.7.0");function o(e){return!!e.toHexString}function a(e){return e.slice||(e.slice=function(){let t=Array.prototype.slice.call(arguments);return a(new Uint8Array(Array.prototype.slice.apply(e,t)))}),e}function s(e){return h(e)&&!(e.length%2)||l(e)}function u(e){return"number"==typeof e&&e==e&&e%1==0}function l(e){if(null==e)return!1;if(e.constructor===Uint8Array)return!0;if("string"==typeof e||!u(e.length)||e.length<0)return!1;for(let t=0;t=256)return!1}return!0}function c(e,t){if(t||(t={}),"number"==typeof e){i.checkSafeUint53(e,"invalid arrayify value");let t=[];for(;e;)t.unshift(255&e),e=parseInt(String(e/256));return 0===t.length&&t.push(0),a(new Uint8Array(t))}if(t.allowMissingPrefix&&"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),o(e)&&(e=e.toHexString()),h(e)){let n=e.substring(2);n.length%2&&("left"===t.hexPad?n="0"+n:"right"===t.hexPad?n+="0":i.throwArgumentError("hex data is odd-length","value",e));let r=[];for(let e=0;ec(e)),n=t.reduce((e,t)=>e+t.length,0),r=new Uint8Array(n);return t.reduce((e,t)=>(r.set(t,e),e+t.length),0),a(r)}function p(e){let t=c(e);if(0===t.length)return t;let n=0;for(;nt&&i.throwArgumentError("value out of range","value",arguments[0]);let n=new Uint8Array(t);return n.set(e,t-e.length),a(n)}function h(e,t){return"string"==typeof e&&!!e.match(/^0x[0-9A-Fa-f]*$/)&&(!t||e.length===2+2*t)}let m="0123456789abcdef";function g(e,t){if(t||(t={}),"number"==typeof e){i.checkSafeUint53(e,"invalid hexlify value");let t="";for(;e;)t=m[15&e]+t,e=Math.floor(e/16);return t.length?(t.length%2&&(t="0"+t),"0x"+t):"0x00"}if("bigint"==typeof e)return(e=e.toString(16)).length%2?"0x0"+e:"0x"+e;if(t.allowMissingPrefix&&"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),o(e))return e.toHexString();if(h(e))return e.length%2&&("left"===t.hexPad?e="0x0"+e.substring(2):"right"===t.hexPad?e+="0":i.throwArgumentError("hex data is odd-length","value",e)),e.toLowerCase();if(l(e)){let t="0x";for(let n=0;n>4]+m[15&r]}return t}return i.throwArgumentError("invalid hexlify value","value",e)}function y(e){if("string"!=typeof e)e=g(e);else if(!h(e)||e.length%2)return null;return(e.length-2)/2}function b(e,t,n){return("string"!=typeof e?e=g(e):(!h(e)||e.length%2)&&i.throwArgumentError("invalid hexData","value",e),t=2+2*t,null!=n)?"0x"+e.substring(t,2+2*n):"0x"+e.substring(t)}function _(e){let t="0x";return e.forEach(e=>{t+=g(e).substring(2)}),t}function v(e){let t=function(e){"string"!=typeof e&&(e=g(e)),h(e)||i.throwArgumentError("invalid hex string","value",e),e=e.substring(2);let t=0;for(;t2*t+2&&i.throwArgumentError("value out of range","value",arguments[1]);e.length<2*t+2;)e="0x0"+e.substring(2);return e}function k(e){let t={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(s(e)){let n=c(e);64===n.length?(t.v=27+(n[32]>>7),n[32]&=127,t.r=g(n.slice(0,32)),t.s=g(n.slice(32,64))):65===n.length?(t.r=g(n.slice(0,32)),t.s=g(n.slice(32,64)),t.v=n[64]):i.throwArgumentError("invalid signature string","signature",e),t.v<27&&(0===t.v||1===t.v?t.v+=27:i.throwArgumentError("signature invalid v byte","signature",e)),t.recoveryParam=1-t.v%2,t.recoveryParam&&(n[32]|=128),t._vs=g(n.slice(32,64))}else{if(t.r=e.r,t.s=e.s,t.v=e.v,t.recoveryParam=e.recoveryParam,t._vs=e._vs,null!=t._vs){let n=f(c(t._vs),32);t._vs=g(n);let r=n[0]>=128?1:0;null==t.recoveryParam?t.recoveryParam=r:t.recoveryParam!==r&&i.throwArgumentError("signature recoveryParam mismatch _vs","signature",e),n[0]&=127;let o=g(n);null==t.s?t.s=o:t.s!==o&&i.throwArgumentError("signature v mismatch _vs","signature",e)}if(null==t.recoveryParam)null==t.v?i.throwArgumentError("signature missing v and recoveryParam","signature",e):0===t.v||1===t.v?t.recoveryParam=t.v:t.recoveryParam=1-t.v%2;else if(null==t.v)t.v=27+t.recoveryParam;else{let n=0===t.v||1===t.v?t.v:1-t.v%2;t.recoveryParam!==n&&i.throwArgumentError("signature recoveryParam mismatch v","signature",e)}null!=t.r&&h(t.r)?t.r=w(t.r,32):i.throwArgumentError("signature missing or invalid r","signature",e),null!=t.s&&h(t.s)?t.s=w(t.s,32):i.throwArgumentError("signature missing or invalid s","signature",e);let n=c(t.s);n[0]>=128&&i.throwArgumentError("signature s out of range","signature",e),t.recoveryParam&&(n[0]|=128);let r=g(n);t._vs&&(h(t._vs)||i.throwArgumentError("signature invalid _vs","signature",e),t._vs=w(t._vs,32)),null==t._vs?t._vs=r:t._vs!==r&&i.throwArgumentError("signature _vs mismatch v and s","signature",e)}return t.yParityAndS=t._vs,t.compact=t.r+t.yParityAndS.substring(2),t}},21046:function(e,t,n){"use strict";n.d(t,{Bz:function(){return s},_Y:function(){return o},fh:function(){return a},tL:function(){return i}});var r=n(6731);let i=r.O$.from(-1),o=r.O$.from(0),a=r.O$.from(1),s=r.O$.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff")},32046:function(e,t,n){"use strict";n.d(t,{id:function(){return o}});var r=n(38197),i=n(29251);function o(e){return(0,r.w)((0,i.Y0)(e))}},38197:function(e,t,n){"use strict";n.d(t,{w:function(){return a}});var r=n(91094),i=n.n(r),o=n(16441);function a(e){return"0x"+i().keccak_256((0,o.lE)(e))}},1581:function(e,t,n){"use strict";var r,i,o,a;n.d(t,{Yd:function(){return h}});let s=!1,u=!1,l={debug:1,default:2,info:2,warning:3,error:4,off:5},c=l.default,d=null,p=function(){try{let e=[];if(["NFD","NFC","NFKD","NFKC"].forEach(t=>{try{if("test"!=="test".normalize(t))throw Error("bad normalize")}catch(n){e.push(t)}}),e.length)throw Error("missing "+e.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw Error("broken implementation")}catch(e){return e.message}return null}();(o=r||(r={})).DEBUG="DEBUG",o.INFO="INFO",o.WARNING="WARNING",o.ERROR="ERROR",o.OFF="OFF",(a=i||(i={})).UNKNOWN_ERROR="UNKNOWN_ERROR",a.NOT_IMPLEMENTED="NOT_IMPLEMENTED",a.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",a.NETWORK_ERROR="NETWORK_ERROR",a.SERVER_ERROR="SERVER_ERROR",a.TIMEOUT="TIMEOUT",a.BUFFER_OVERRUN="BUFFER_OVERRUN",a.NUMERIC_FAULT="NUMERIC_FAULT",a.MISSING_NEW="MISSING_NEW",a.INVALID_ARGUMENT="INVALID_ARGUMENT",a.MISSING_ARGUMENT="MISSING_ARGUMENT",a.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",a.CALL_EXCEPTION="CALL_EXCEPTION",a.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",a.NONCE_EXPIRED="NONCE_EXPIRED",a.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",a.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",a.TRANSACTION_REPLACED="TRANSACTION_REPLACED",a.ACTION_REJECTED="ACTION_REJECTED";let f="0123456789abcdef";class h{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,t){let n=e.toLowerCase();null==l[n]&&this.throwArgumentError("invalid log level name","logLevel",e),c>l[n]||console.log.apply(console,t)}debug(...e){this._log(h.levels.DEBUG,e)}info(...e){this._log(h.levels.INFO,e)}warn(...e){this._log(h.levels.WARNING,e)}makeError(e,t,n){if(u)return this.makeError("censored error",t,{});t||(t=h.errors.UNKNOWN_ERROR),n||(n={});let r=[];Object.keys(n).forEach(e=>{let t=n[e];try{if(t instanceof Uint8Array){let n="";for(let e=0;e>4]+f[15&t[e]];r.push(e+"=Uint8Array(0x"+n+")")}else r.push(e+"="+JSON.stringify(t))}catch(t){r.push(e+"="+JSON.stringify(n[e].toString()))}}),r.push(`code=${t}`),r.push(`version=${this.version}`);let o=e,a="";switch(t){case i.NUMERIC_FAULT:{a="NUMERIC_FAULT";let t=e;switch(t){case"overflow":case"underflow":case"division-by-zero":a+="-"+t;break;case"negative-power":case"negative-width":a+="-unsupported";break;case"unbound-bitwise-result":a+="-unbound-result"}break}case i.CALL_EXCEPTION:case i.INSUFFICIENT_FUNDS:case i.MISSING_NEW:case i.NONCE_EXPIRED:case i.REPLACEMENT_UNDERPRICED:case i.TRANSACTION_REPLACED:case i.UNPREDICTABLE_GAS_LIMIT:a=t}a&&(e+=" [ See: https://links.ethers.org/v5-errors-"+a+" ]"),r.length&&(e+=" ("+r.join(", ")+")");let s=Error(e);return s.reason=o,s.code=t,Object.keys(n).forEach(function(e){s[e]=n[e]}),s}throwError(e,t,n){throw this.makeError(e,t,n)}throwArgumentError(e,t,n){return this.throwError(e,h.errors.INVALID_ARGUMENT,{argument:t,value:n})}assert(e,t,n,r){e||this.throwError(t,n,r)}assertArgument(e,t,n,r){e||this.throwArgumentError(t,n,r)}checkNormalize(e){null==e&&(e="platform missing String.prototype.normalize"),p&&this.throwError("platform missing String.prototype.normalize",h.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:p})}checkSafeUint53(e,t){"number"==typeof e&&(null==t&&(t="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(t,h.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(t,h.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,t,n){n=n?": "+n:"",et&&this.throwError("too many arguments"+n,h.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:t})}checkNew(e,t){(e===Object||null==e)&&this.throwError("missing new",h.errors.MISSING_NEW,{name:t.name})}checkAbstract(e,t){e===t?this.throwError("cannot instantiate abstract class "+JSON.stringify(t.name)+" directly; use a sub-class",h.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||null==e)&&this.throwError("missing new",h.errors.MISSING_NEW,{name:t.name})}static globalLogger(){return d||(d=new h("logger/5.7.0")),d}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",h.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),s){if(!e)return;this.globalLogger().throwError("error censorship permanent",h.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}u=!!e,s=!!t}static setLogLevel(e){let t=l[e.toLowerCase()];if(null==t){h.globalLogger().warn("invalid log level - "+e);return}c=t}static from(e){return new h(e)}}h.errors=i,h.levels=r},6881:function(e,t,n){"use strict";n.d(t,{dk:function(){return p},uj:function(){return u},p$:function(){return d},zG:function(){return o},tu:function(){return a},mE:function(){return s},DC:function(){return l}});var r=n(1581);let i=new r.Yd("properties/5.7.0");function o(e,t,n){Object.defineProperty(e,t,{enumerable:!0,value:n,writable:!1})}function a(e,t){for(let n=0;n<32;n++){if(e[t])return e[t];if(!e.prototype||"object"!=typeof e.prototype)break;e=Object.getPrototypeOf(e.prototype).constructor}return null}function s(e){var t,n,r,i;return t=this,n=void 0,r=void 0,i=function*(){let t=Object.keys(e).map(t=>{let n=e[t];return Promise.resolve(n).then(e=>({key:t,value:e}))}),n=yield Promise.all(t);return n.reduce((e,t)=>(e[t.key]=t.value,e),{})},new(r||(r=Promise))(function(e,o){function a(e){try{u(i.next(e))}catch(e){o(e)}}function s(e){try{u(i.throw(e))}catch(e){o(e)}}function u(t){var n;t.done?e(t.value):((n=t.value)instanceof r?n:new r(function(e){e(n)})).then(a,s)}u((i=i.apply(t,n||[])).next())})}function u(e,t){e&&"object"==typeof e||i.throwArgumentError("invalid object","object",e),Object.keys(e).forEach(n=>{t[n]||i.throwArgumentError("invalid object key - "+n,"transaction:"+n,e)})}function l(e){let t={};for(let n in e)t[n]=e[n];return t}let c={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function d(e){return function(e){if(function e(t){if(null==t||c[typeof t])return!0;if(Array.isArray(t)||"object"==typeof t){if(!Object.isFrozen(t))return!1;let n=Object.keys(t);for(let r=0;rd(e)));if("object"==typeof e){let t={};for(let n in e){let r=e[n];void 0!==r&&o(t,n,d(r))}return t}return i.throwArgumentError(`Cannot deepCopy ${typeof e}`,"object",e)}(e)}class p{constructor(e){for(let t in e)this[t]=d(e[t])}}},59052:function(e,t,n){"use strict";n.d(t,{J:function(){return d},c:function(){return u}});var r=n(16441),i=n(1581);let o=new i.Yd("rlp/5.7.0");function a(e){let t=[];for(;e;)t.unshift(255&e),e>>=8;return t}function s(e,t,n){let r=0;for(let i=0;it+1+r&&o.throwError("child data too short",i.Yd.errors.BUFFER_OVERRUN,{})}return{consumed:1+r,result:a}}function c(e,t){if(0===e.length&&o.throwError("data too short",i.Yd.errors.BUFFER_OVERRUN,{}),e[t]>=248){let n=e[t]-247;t+1+n>e.length&&o.throwError("data short segment too short",i.Yd.errors.BUFFER_OVERRUN,{});let r=s(e,t+1,n);return t+1+n+r>e.length&&o.throwError("data long segment too short",i.Yd.errors.BUFFER_OVERRUN,{}),l(e,t,t+1+n,n+r)}if(e[t]>=192){let n=e[t]-192;return t+1+n>e.length&&o.throwError("data array too short",i.Yd.errors.BUFFER_OVERRUN,{}),l(e,t,t+1,n)}if(e[t]>=184){let n=e[t]-183;t+1+n>e.length&&o.throwError("data array too short",i.Yd.errors.BUFFER_OVERRUN,{});let a=s(e,t+1,n);t+1+n+a>e.length&&o.throwError("data array too short",i.Yd.errors.BUFFER_OVERRUN,{});let u=(0,r.Dv)(e.slice(t+1+n,t+1+n+a));return{consumed:1+n+a,result:u}}if(e[t]>=128){let n=e[t]-128;t+1+n>e.length&&o.throwError("data too short",i.Yd.errors.BUFFER_OVERRUN,{});let a=(0,r.Dv)(e.slice(t+1,t+1+n));return{consumed:1+n,result:a}}return{consumed:1,result:(0,r.Dv)(e[t])}}function d(e){let t=(0,r.lE)(e),n=c(t,0);return n.consumed!==t.length&&o.throwArgumentError("invalid rlp data","data",e),n.result}},29251:function(e,t,n){"use strict";n.d(t,{Y0:function(){return f},XL:function(){return m},ZN:function(){return h}});var r,i,o,a,s=n(16441),u=n(1581);let l=new u.Yd("strings/5.7.0");function c(e,t,n,r,i){if(e===a.BAD_PREFIX||e===a.UNEXPECTED_CONTINUE){let e=0;for(let r=t+1;r>6==2;r++)e++;return e}return e===a.OVERRUN?n.length-t-1:0}(r=o||(o={})).current="",r.NFC="NFC",r.NFD="NFD",r.NFKC="NFKC",r.NFKD="NFKD",(i=a||(a={})).UNEXPECTED_CONTINUE="unexpected continuation byte",i.BAD_PREFIX="bad codepoint prefix",i.OVERRUN="string overrun",i.MISSING_CONTINUE="missing continuation byte",i.OUT_OF_RANGE="out of UTF-8 range",i.UTF16_SURROGATE="UTF-16 surrogate",i.OVERLONG="overlong representation";let d=Object.freeze({error:function(e,t,n,r,i){return l.throwArgumentError(`invalid codepoint at offset ${t}; ${e}`,"bytes",n)},ignore:c,replace:function(e,t,n,r,i){return e===a.OVERLONG?(r.push(i),0):(r.push(65533),c(e,t,n,r,i))}});function p(e,t){null==t&&(t=d.error),e=(0,s.lE)(e);let n=[],r=0;for(;r>7==0){n.push(i);continue}let o=null,s=null;if((224&i)==192)o=1,s=127;else if((240&i)==224)o=2,s=2047;else if((248&i)==240)o=3,s=65535;else{(192&i)==128?r+=t(a.UNEXPECTED_CONTINUE,r-1,e,n):r+=t(a.BAD_PREFIX,r-1,e,n);continue}if(r-1+o>=e.length){r+=t(a.OVERRUN,r-1,e,n);continue}let u=i&(1<<8-o-1)-1;for(let i=0;i1114111){r+=t(a.OUT_OF_RANGE,r-1-o,e,n,u);continue}if(u>=55296&&u<=57343){r+=t(a.UTF16_SURROGATE,r-1-o,e,n,u);continue}if(u<=s){r+=t(a.OVERLONG,r-1-o,e,n,u);continue}n.push(u)}}return n}function f(e,t=o.current){t!=o.current&&(l.checkNormalize(),e=e.normalize(t));let n=[];for(let t=0;t>6|192),n.push(63&r|128);else if((64512&r)==55296){t++;let i=e.charCodeAt(t);if(t>=e.length||(64512&i)!=56320)throw Error("invalid utf-8 string");let o=65536+((1023&r)<<10)+(1023&i);n.push(o>>18|240),n.push(o>>12&63|128),n.push(o>>6&63|128),n.push(63&o|128)}else n.push(r>>12|224),n.push(r>>6&63|128),n.push(63&r|128)}return(0,s.lE)(n)}function h(e,t){return p(e,t).map(e=>e<=65535?String.fromCharCode(e):String.fromCharCode(((e-=65536)>>10&1023)+55296,(1023&e)+56320)).join("")}function m(e,t=o.current){return p(f(e,t))}},19477:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let r=n(85893),i=n(67294);t.default=function({html:e,height:t=null,width:n=null,children:o,dataNtpc:a=""}){return(0,i.useEffect)(()=>{a&&performance.mark("mark_feature_usage",{detail:{feature:`next-third-parties-${a}`}})},[a]),(0,r.jsxs)(r.Fragment,{children:[o,e?(0,r.jsx)("div",{style:{height:null!=t?`${t}px`:"auto",width:null!=n?`${n}px`:"auto"},"data-ntpc":a,dangerouslySetInnerHTML:{__html:e}}):null]})}},7834:function(e,t,n){"use strict";let r;var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.sendGAEvent=t.GoogleAnalytics=void 0;let o=n(85893),a=n(67294),s=i(n(4298));t.GoogleAnalytics=function(e){let{gaId:t,dataLayerName:n="dataLayer"}=e;return void 0===r&&(r=n),(0,a.useEffect)(()=>{performance.mark("mark_feature_usage",{detail:{feature:"next-third-parties-ga"}})},[]),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(s.default,{id:"_next-ga-init",dangerouslySetInnerHTML:{__html:` window['${n}'] = window['${n}'] || []; function gtag(){window['${n}'].push(arguments);} gtag('js', new Date()); gtag('config', '${t}');`}}),(0,o.jsx)(s.default,{id:"_next-ga",src:`https://www.googletagmanager.com/gtag/js?id=${t}`})]})},t.sendGAEvent=function(...e){if(void 0===r){console.warn("@next/third-parties: GA has not been initialized");return}window[r]?window[r].push(arguments):console.warn(`@next/third-parties: GA dataLayer ${r} does not exist`)}},83632:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});let i=n(85893),o=n(86257),a=r(n(19477));t.default=function(e){let{apiKey:t,...n}=e,r={...n,key:t},{html:s}=(0,o.GoogleMapsEmbed)(r);return(0,i.jsx)(a.default,{height:r.height||null,width:r.width||null,html:s,dataNtpc:"GoogleMapsEmbed"})}},30674:function(e,t,n){"use strict";let r;var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.sendGTMEvent=t.GoogleTagManager=void 0;let o=n(85893),a=n(67294),s=i(n(4298));t.GoogleTagManager=function(e){let{gtmId:t,dataLayerName:n="dataLayer",auth:i,preview:u,dataLayer:l}=e;void 0===r&&(r=n);let c="dataLayer"!==n?`&l=${n}`:"",d=i?`>m_auth=${i}`:"",p=u?`>m_preview=${u}>m_cookies_win=x`:"";return(0,a.useEffect)(()=>{performance.mark("mark_feature_usage",{detail:{feature:"next-third-parties-gtm"}})},[]),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(s.default,{id:"_next-gtm-init",dangerouslySetInnerHTML:{__html:` (function(w,l){ w[l]=w[l]||[]; w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'}); ${l?`w[l].push(${JSON.stringify(l)})`:""} })(window,'${n}');`}}),(0,o.jsx)(s.default,{id:"_next-gtm","data-ntpc":"GTM",src:`https://www.googletagmanager.com/gtm.js?id=${t}${c}${d}${p}`})]})};let u=e=>{if(void 0===r){console.warn("@next/third-parties: GTM has not been initialized");return}window[r]?window[r].push(e):console.warn(`@next/third-parties: GTM dataLayer ${r} does not exist`)};t.sendGTMEvent=u},19692:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.sendGAEvent=t.GoogleAnalytics=t.sendGTMEvent=t.GoogleTagManager=t.YouTubeEmbed=t.GoogleMapsEmbed=void 0;var i=n(83632);Object.defineProperty(t,"GoogleMapsEmbed",{enumerable:!0,get:function(){return r(i).default}});var o=n(11494);Object.defineProperty(t,"YouTubeEmbed",{enumerable:!0,get:function(){return r(o).default}});var a=n(30674);Object.defineProperty(t,"GoogleTagManager",{enumerable:!0,get:function(){return a.GoogleTagManager}}),Object.defineProperty(t,"sendGTMEvent",{enumerable:!0,get:function(){return a.sendGTMEvent}});var s=n(7834);Object.defineProperty(t,"GoogleAnalytics",{enumerable:!0,get:function(){return s.GoogleAnalytics}}),Object.defineProperty(t,"sendGAEvent",{enumerable:!0,get:function(){return s.sendGAEvent}})},11494:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});let i=n(85893),o=r(n(4298)),a=n(86257),s=r(n(19477)),u={server:"beforeInteractive",client:"afterInteractive",idle:"lazyOnload",worker:"worker"};t.default=function(e){let{html:t,scripts:n,stylesheets:r}=(0,a.YouTubeEmbed)(e);return(0,i.jsx)(s.default,{height:e.height||null,width:e.width||null,html:t,dataNtpc:"YouTubeEmbed",children:null==n?void 0:n.map(e=>(0,i.jsx)(o.default,{src:e.url,strategy:u[e.strategy],stylesheets:r},e.url))})}},77520:function(e,t,n){"use strict";function r(e){if(!Number.isSafeInteger(e)||e<0)throw Error(`positive integer expected, not ${e}`)}function i(e,...t){if(!(e instanceof Uint8Array||null!=e&&"object"==typeof e&&"Uint8Array"===e.constructor.name))throw Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw Error(`Uint8Array expected of length ${t}, not of length=${e.length}`)}function o(e){if("function"!=typeof e||"function"!=typeof e.create)throw Error("Hash should be wrapped by utils.wrapConstructor");r(e.outputLen),r(e.blockLen)}function a(e,t=!0){if(e.destroyed)throw Error("Hash instance has been destroyed");if(t&&e.finished)throw Error("Hash#digest() has already been called")}function s(e,t){i(e);let n=t.outputLen;if(e.lengthe&t^~e&n,a=(e,t,n)=>e&t^e&n^t&n;class s extends i.kb{constructor(e,t,n,r){super(),this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=r,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=(0,i.GL)(this.buffer)}update(e){(0,r.Gg)(this);let{view:t,buffer:n,blockLen:o}=this;e=(0,i.O0)(e);let a=e.length;for(let r=0;ro-s&&(this.process(n,0),s=0);for(let e=s;e>i&o),s=Number(n&o);e.setUint32(t+(r?4:0),a,r),e.setUint32(t+(r?0:4),s,r)}(n,o-8,BigInt(8*this.length),a),this.process(n,0);let u=(0,i.GL)(e),l=this.outputLen;if(l%4)throw Error("_sha2: outputLen should be aligned to 32bit");let c=l/4,d=this.get();if(c>d.length)throw Error("_sha2: outputLen bigger than state");for(let e=0;e>>3,o=(0,i.np)(n,17)^(0,i.np)(n,19)^n>>>10;s[e]=o+s[e-7]+r+s[e-16]|0}let{A:n,B:a,C:u,D:l,E:c,F:d,G:p,H:f}=this;for(let e=0;e<64;e++){let t=(0,i.np)(c,6)^(0,i.np)(c,11)^(0,i.np)(c,25),h=f+t+(0,r.bc)(c,d,p)+o[e]+s[e]|0,m=(0,i.np)(n,2)^(0,i.np)(n,13)^(0,i.np)(n,22),g=m+(0,r.l3)(n,a,u)|0;f=p,p=d,d=c,c=l+h|0,l=u,u=a,a=n,n=h+g|0}n=n+this.A|0,a=a+this.B|0,u=u+this.C|0,l=l+this.D|0,c=c+this.E|0,d=d+this.F|0,p=p+this.G|0,f=f+this.H|0,this.set(n,a,u,l,c,d,p,f)}roundClean(){s.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}let l=(0,i.hE)(()=>new u)},40963:function(e,t,n){"use strict";n.d(t,{kb:function(){return m},l1:function(){return c},ci:function(){return p},eV:function(){return h},GL:function(){return a},iA:function(){return u},O6:function(){return y},np:function(){return s},O0:function(){return f},Jq:function(){return o},hE:function(){return g}});let r="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0;var i=n(77520);let o=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4)),a=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),s=(e,t)=>e<<32-t|e>>>t,u=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],l=e=>e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255;function c(e){for(let t=0;tt.toString(16).padStart(2,"0"));function p(e){(0,i.aI)(e);let t="";for(let n=0;ne().update(f(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function y(e=32){if(r&&"function"==typeof r.getRandomValues)return r.getRandomValues(new Uint8Array(e));throw Error("crypto.getRandomValues must be defined")}},61034:function(e,t,n){"use strict";let r,i;n.d(t,{_vi:function(){return i9},Y9z:function(){return os},s0b:function(){return i2},Hl7:function(){return uW},EKc:function(){return u$},EMY:function(){return iD},lfF:function(){return iq},Tin:function(){return ij},kol:function(){return oo},FTx:function(){return or},Fpb:function(){return sq},SsU:function(){return uZ},ZwB:function(){return aH},gGi:function(){return is},$zz:function(){return oa},fmp:function(){return sB},NLW:function(){return sg},UF3:function(){return sR},SjD:function(){return sp},tAG:function(){return il},PDy:function(){return r5},kk0:function(){return u7},YGS:function(){return ie},_Fs:function(){return rG},Uf8:function(){return ol},TOp:function(){return sw},WRY:function(){return rZ},gA1:function(){return sT},dtM:function(){return rK},eVA:function(){return iv},LA$:function(){return r8},q3f:function(){return r9},DAM:function(){return r7},eq:function(){return id},jNi:function(){return af},VJ7:function(){return ah},iUk:function(){return am},XiO:function(){return aa},l9z:function(){return as},gkL:function(){return au},WCb:function(){return up},A07:function(){return aP},u10:function(){return ud},RER:function(){return uR},D2S:function(){return sd},CaP:function(){return sa},wfV:function(){return i7},B0r:function(){return it},FRm:function(){return sH},I$S:function(){return o3},MP3:function(){return s$},Lj:function(){return iR},XRi:function(){return od},Hl$:function(){return sG}});var o,a,s,u,l,c,d,p,f={};function h(e,t){return function(){return e.apply(t,arguments)}}n.r(f),n.d(f,{hasBrowserEnv:function(){return eO},hasStandardBrowserEnv:function(){return eB},hasStandardBrowserWebWorkerEnv:function(){return eM}});let{toString:m}=Object.prototype,{getPrototypeOf:g}=Object,y=(nr=Object.create(null),e=>{let t=m.call(e);return nr[t]||(nr[t]=t.slice(8,-1).toLowerCase())}),b=e=>(e=e.toLowerCase(),t=>y(t)===e),_=e=>t=>typeof t===e,{isArray:v}=Array,w=_("undefined"),k=b("ArrayBuffer"),x=_("string"),A=_("function"),S=_("number"),I=e=>null!==e&&"object"==typeof e,T=e=>{if("object"!==y(e))return!1;let t=g(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},E=b("Date"),P=b("File"),C=b("Blob"),O=b("FileList"),B=e=>I(e)&&A(e.pipe),M=e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||A(e.append)&&("formdata"===(t=y(e))||"object"===t&&A(e.toString)&&"[object FormData]"===e.toString()))},R=b("URLSearchParams"),L=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function N(e,t,{allOwnKeys:n=!1}={}){let r,i;if(null!=e){if("object"!=typeof e&&(e=[e]),v(e))for(r=0,i=e.length;r0;)if(t===(n=r[i]).toLowerCase())return n;return null}let F="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:n.g,q=e=>!w(e)&&e!==F,j=(e,t,n,{allOwnKeys:r}={})=>(N(t,(t,r)=>{n&&A(t)?e[r]=h(t,n):e[r]=t},{allOwnKeys:r}),e),U=e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),z=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},V=(e,t,n,r)=>{let i,o,a;let s={};if(t=t||{},null==e)return t;do{for(o=(i=Object.getOwnPropertyNames(e)).length;o-- >0;)a=i[o],(!r||r(a,e,t))&&!s[a]&&(t[a]=e[a],s[a]=!0);e=!1!==n&&g(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},W=(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;let r=e.indexOf(t,n);return -1!==r&&r===n},$=e=>{if(!e)return null;if(v(e))return e;let t=e.length;if(!S(t))return null;let n=Array(t);for(;t-- >0;)n[t]=e[t];return n},K=(ni="undefined"!=typeof Uint8Array&&g(Uint8Array),e=>ni&&e instanceof ni),H=(e,t)=>{let n;let r=e&&e[Symbol.iterator],i=r.call(e);for(;(n=i.next())&&!n.done;){let r=n.value;t.call(e,r[0],r[1])}},G=(e,t)=>{let n;let r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},Z=b("HTMLFormElement"),Y=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),X=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Q=b("RegExp"),J=(e,t)=>{let n=Object.getOwnPropertyDescriptors(e),r={};N(n,(n,i)=>{let o;!1!==(o=t(n,i,e))&&(r[i]=o||n)}),Object.defineProperties(e,r)},ee=e=>{J(e,(t,n)=>{if(A(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;let r=e[n];if(A(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},et=(e,t)=>{let n={};return(e=>{e.forEach(e=>{n[e]=!0})})(v(e)?e:String(e).split(t)),n},en=()=>{},er=(e,t)=>Number.isFinite(e=+e)?e:t,ei="abcdefghijklmnopqrstuvwxyz",eo="0123456789",ea={DIGIT:eo,ALPHA:ei,ALPHA_DIGIT:ei+ei.toUpperCase()+eo},es=(e=16,t=ea.ALPHA_DIGIT)=>{let n="",{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n},eu=e=>{let t=Array(10),n=(e,r)=>{if(I(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;let i=v(e)?[]:{};return N(e,(e,t)=>{let o=n(e,r+1);w(o)||(i[t]=o)}),t[r]=void 0,i}}return e};return n(e,0)},el=b("AsyncFunction"),ec=e=>e&&(I(e)||A(e))&&A(e.then)&&A(e.catch);var ed={isArray:v,isArrayBuffer:k,isBuffer:function(e){return null!==e&&!w(e)&&null!==e.constructor&&!w(e.constructor)&&A(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:M,isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&k(e.buffer)},isString:x,isNumber:S,isBoolean:e=>!0===e||!1===e,isObject:I,isPlainObject:T,isUndefined:w,isDate:E,isFile:P,isBlob:C,isRegExp:Q,isFunction:A,isStream:B,isURLSearchParams:R,isTypedArray:K,isFileList:O,forEach:N,merge:function e(){let{caseless:t}=q(this)&&this||{},n={},r=(r,i)=>{let o=t&&D(n,i)||i;T(n[o])&&T(r)?n[o]=e(n[o],r):T(r)?n[o]=e({},r):v(r)?n[o]=r.slice():n[o]=r};for(let e=0,t=arguments.length;e{eh[e]={value:e}}),Object.defineProperties(ep,eh),Object.defineProperty(ef,"isAxiosError",{value:!0}),ep.from=(e,t,n,r,i,o)=>{let a=Object.create(ef);return ed.toFlatObject(e,a,function(e){return e!==Error.prototype},e=>"isAxiosError"!==e),ep.call(a,e.message,t,n,r,i),a.cause=e,a.name=e.name,o&&Object.assign(a,o),a};var em=n(48764).Buffer;function eg(e){return ed.isPlainObject(e)||ed.isArray(e)}function ey(e){return ed.endsWith(e,"[]")?e.slice(0,-2):e}function eb(e,t,n){return e?e.concat(t).map(function(e,t){return e=ey(e),!n&&t?"["+e+"]":e}).join(n?".":""):t}let e_=ed.toFlatObject(ed,{},null,function(e){return/^is[A-Z]/.test(e)});var ev=function(e,t,n){if(!ed.isObject(e))throw TypeError("target must be an object");t=t||new FormData,n=ed.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!ed.isUndefined(t[e])});let r=n.metaTokens,i=n.visitor||c,o=n.dots,a=n.indexes,s=n.Blob||"undefined"!=typeof Blob&&Blob,u=s&&ed.isSpecCompliantForm(t);if(!ed.isFunction(i))throw TypeError("visitor must be a function");function l(e){if(null===e)return"";if(ed.isDate(e))return e.toISOString();if(!u&&ed.isBlob(e))throw new ep("Blob is not supported. Use a Buffer instead.");return ed.isArrayBuffer(e)||ed.isTypedArray(e)?u&&"function"==typeof Blob?new Blob([e]):em.from(e):e}function c(e,n,i){let s=e;if(e&&!i&&"object"==typeof e){if(ed.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else{var u;if(ed.isArray(e)&&(u=e,ed.isArray(u)&&!u.some(eg))||(ed.isFileList(e)||ed.endsWith(n,"[]"))&&(s=ed.toArray(e)))return n=ey(n),s.forEach(function(e,r){ed.isUndefined(e)||null===e||t.append(!0===a?eb([n],r,o):null===a?n:n+"[]",l(e))}),!1}}return!!eg(e)||(t.append(eb(i,n,o),l(e)),!1)}let d=[],p=Object.assign(e_,{defaultVisitor:c,convertValue:l,isVisitable:eg});if(!ed.isObject(e))throw TypeError("data must be an object");return!function e(n,r){if(!ed.isUndefined(n)){if(-1!==d.indexOf(n))throw Error("Circular reference detected in "+r.join("."));d.push(n),ed.forEach(n,function(n,o){let a=!(ed.isUndefined(n)||null===n)&&i.call(t,n,ed.isString(o)?o.trim():o,r,p);!0===a&&e(n,r?r.concat(o):[o])}),d.pop()}}(e),t};function ew(e){let t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\x00"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function ek(e,t){this._pairs=[],e&&ev(e,this,t)}let ex=ek.prototype;function eA(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function eS(e,t,n){let r;if(!t)return e;let i=n&&n.encode||eA,o=n&&n.serialize;if(r=o?o(t,n):ed.isURLSearchParams(t)?t.toString():new ek(t,n).toString(i)){let t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+r}return e}ex.append=function(e,t){this._pairs.push([e,t])},ex.toString=function(e){let t=e?function(t){return e.call(this,t,ew)}:ew;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};var eI=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){ed.forEach(this.handlers,function(t){null!==t&&e(t)})}},eT={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},eE="undefined"!=typeof URLSearchParams?URLSearchParams:ek,eP="undefined"!=typeof FormData?FormData:null,eC="undefined"!=typeof Blob?Blob:null;let eO="undefined"!=typeof window&&"undefined"!=typeof document,eB=(no="undefined"!=typeof navigator&&navigator.product,eO&&0>["ReactNative","NativeScript","NS"].indexOf(no)),eM="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts;var eR={...f,isBrowser:!0,classes:{URLSearchParams:eE,FormData:eP,Blob:eC},protocols:["http","https","file","blob","url","data"]},eL=function(e){if(ed.isFormData(e)&&ed.isFunction(e.entries)){let t={};return ed.forEachEntry(e,(e,n)=>{!function e(t,n,r,i){let o=t[i++];if("__proto__"===o)return!0;let a=Number.isFinite(+o),s=i>=t.length;if(o=!o&&ed.isArray(r)?r.length:o,s)return ed.hasOwnProp(r,o)?r[o]=[r[o],n]:r[o]=n,!a;r[o]&&ed.isObject(r[o])||(r[o]=[]);let u=e(t,n,r[o],i);return u&&ed.isArray(r[o])&&(r[o]=function(e){let t,n;let r={},i=Object.keys(e),o=i.length;for(t=0;t"[]"===e[0]?"":e[1]||e[0]),n,t,0)}),t}return null};let eN={transitional:eT,adapter:["xhr","http"],transformRequest:[function(e,t){let n;let r=t.getContentType()||"",i=r.indexOf("application/json")>-1,o=ed.isObject(e);o&&ed.isHTMLForm(e)&&(e=new FormData(e));let a=ed.isFormData(e);if(a)return i?JSON.stringify(eL(e)):e;if(ed.isArrayBuffer(e)||ed.isBuffer(e)||ed.isStream(e)||ed.isFile(e)||ed.isBlob(e))return e;if(ed.isArrayBufferView(e))return e.buffer;if(ed.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1){var s,u;return(s=e,u=this.formSerializer,ev(s,new eR.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return eR.isNode&&ed.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},u))).toString()}if((n=ed.isFileList(e))||r.indexOf("multipart/form-data")>-1){let t=this.env&&this.env.FormData;return ev(n?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||i?(t.setContentType("application/json",!1),function(e,t,n){if(ed.isString(e))try{return(0,JSON.parse)(e),ed.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){let t=this.transitional||eN.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(e&&ed.isString(e)&&(n&&!this.responseType||r)){let n=t&&t.silentJSONParsing;try{return JSON.parse(e)}catch(e){if(!n&&r){if("SyntaxError"===e.name)throw ep.from(e,ep.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:eR.classes.FormData,Blob:eR.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ed.forEach(["delete","get","head","post","put","patch"],e=>{eN.headers[e]={}});let eD=ed.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);var eF=e=>{let t,n,r;let i={};return e&&e.split("\n").forEach(function(e){r=e.indexOf(":"),t=e.substring(0,r).trim().toLowerCase(),n=e.substring(r+1).trim(),!t||i[t]&&eD[t]||("set-cookie"===t?i[t]?i[t].push(n):i[t]=[n]:i[t]=i[t]?i[t]+", "+n:n)}),i};let eq=Symbol("internals");function ej(e){return e&&String(e).trim().toLowerCase()}function eU(e){return!1===e||null==e?e:ed.isArray(e)?e.map(eU):String(e)}let ez=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function eV(e,t,n,r,i){if(ed.isFunction(r))return r.call(this,t,n);if(i&&(t=n),ed.isString(t)){if(ed.isString(r))return -1!==t.indexOf(r);if(ed.isRegExp(r))return r.test(t)}}class eW{constructor(e){e&&this.set(e)}set(e,t,n){let r=this;function i(e,t,n){let i=ej(t);if(!i)throw Error("header name must be a non-empty string");let o=ed.findKey(r,i);o&&void 0!==r[o]&&!0!==n&&(void 0!==n||!1===r[o])||(r[o||t]=eU(e))}let o=(e,t)=>ed.forEach(e,(e,n)=>i(e,n,t));return ed.isPlainObject(e)||e instanceof this.constructor?o(e,t):ed.isString(e)&&(e=e.trim())&&!ez(e)?o(eF(e),t):null!=e&&i(t,e,n),this}get(e,t){if(e=ej(e)){let n=ed.findKey(this,e);if(n){let e=this[n];if(!t)return e;if(!0===t)return function(e){let t;let n=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;for(;t=r.exec(e);)n[t[1]]=t[2];return n}(e);if(ed.isFunction(t))return t.call(this,e,n);if(ed.isRegExp(t))return t.exec(e);throw TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=ej(e)){let n=ed.findKey(this,e);return!!(n&&void 0!==this[n]&&(!t||eV(this,this[n],n,t)))}return!1}delete(e,t){let n=this,r=!1;function i(e){if(e=ej(e)){let i=ed.findKey(n,e);i&&(!t||eV(n,n[i],i,t))&&(delete n[i],r=!0)}}return ed.isArray(e)?e.forEach(i):i(e),r}clear(e){let t=Object.keys(this),n=t.length,r=!1;for(;n--;){let i=t[n];(!e||eV(this,this[i],i,e,!0))&&(delete this[i],r=!0)}return r}normalize(e){let t=this,n={};return ed.forEach(this,(r,i)=>{let o=ed.findKey(n,i);if(o){t[o]=eU(r),delete t[i];return}let a=e?i.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n):String(i).trim();a!==i&&delete t[i],t[a]=eU(r),n[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let t=Object.create(null);return ed.forEach(this,(n,r)=>{null!=n&&!1!==n&&(t[r]=e&&ed.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){let n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){let t=this[eq]=this[eq]={accessors:{}},n=t.accessors,r=this.prototype;function i(e){let t=ej(e);n[t]||(!function(e,t){let n=ed.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(e,n,i){return this[r].call(this,t,e,n,i)},configurable:!0})})}(r,e),n[t]=!0)}return ed.isArray(e)?e.forEach(i):i(e),this}}function e$(e,t){let n=this||eN,r=t||n,i=eW.from(r.headers),o=r.data;return ed.forEach(e,function(e){o=e.call(n,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function eK(e){return!!(e&&e.__CANCEL__)}function eH(e,t,n){ep.call(this,null==e?"canceled":e,ep.ERR_CANCELED,t,n),this.name="CanceledError"}eW.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),ed.reduceDescriptors(eW.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),ed.freezeMethods(eW),ed.inherits(eH,ep,{__CANCEL__:!0});var eG=eR.hasStandardBrowserEnv?{write(e,t,n,r,i,o){let a=[e+"="+encodeURIComponent(t)];ed.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),ed.isString(r)&&a.push("path="+r),ed.isString(i)&&a.push("domain="+i),!0===o&&a.push("secure"),document.cookie=a.join("; ")},read(e){let t=document.cookie.match(RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function eZ(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e:t}var eY=eR.hasStandardBrowserEnv?function(){let e;let t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function r(e){let r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=r(window.location.href),function(t){let n=ed.isString(t)?r(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0},eX=function(e,t){let n;e=e||10;let r=Array(e),i=Array(e),o=0,a=0;return t=void 0!==t?t:1e3,function(s){let u=Date.now(),l=i[a];n||(n=u),r[o]=s,i[o]=u;let c=a,d=0;for(;c!==o;)d+=r[c++],c%=e;if((o=(o+1)%e)===a&&(a=(a+1)%e),u-n{let o=i.loaded,a=i.lengthComputable?i.total:void 0,s=o-n,u=r(s);n=o;let l={loaded:o,total:a,progress:a?o/a:void 0,bytes:s,rate:u||void 0,estimated:u&&a&&o<=a?(a-o)/u:void 0,event:i};l[t?"download":"upload"]=!0,e(l)}}let eJ="undefined"!=typeof XMLHttpRequest;var e0=eJ&&function(e){return new Promise(function(t,n){let r,i,o=e.data,a=eW.from(e.headers).normalize(),{responseType:s,withXSRFToken:u}=e;function l(){e.cancelToken&&e.cancelToken.unsubscribe(r),e.signal&&e.signal.removeEventListener("abort",r)}if(ed.isFormData(o)){if(eR.hasStandardBrowserEnv||eR.hasStandardBrowserWebWorkerEnv)a.setContentType(!1);else if(!1!==(i=a.getContentType())){let[e,...t]=i?i.split(";").map(e=>e.trim()).filter(Boolean):[];a.setContentType([e||"multipart/form-data",...t].join("; "))}}let c=new XMLHttpRequest;if(e.auth){let t=e.auth.username||"",n=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";a.set("Authorization","Basic "+btoa(t+":"+n))}let d=eZ(e.baseURL,e.url);function p(){if(!c)return;let r=eW.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders()),i=s&&"text"!==s&&"json"!==s?c.response:c.responseText,o={data:i,status:c.status,statusText:c.statusText,headers:r,config:e,request:c};!function(e,t,n){let r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new ep("Request failed with status code "+n.status,[ep.ERR_BAD_REQUEST,ep.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}(function(e){t(e),l()},function(e){n(e),l()},o),c=null}if(c.open(e.method.toUpperCase(),eS(d,e.params,e.paramsSerializer),!0),c.timeout=e.timeout,"onloadend"in c?c.onloadend=p:c.onreadystatechange=function(){c&&4===c.readyState&&(0!==c.status||c.responseURL&&0===c.responseURL.indexOf("file:"))&&setTimeout(p)},c.onabort=function(){c&&(n(new ep("Request aborted",ep.ECONNABORTED,e,c)),c=null)},c.onerror=function(){n(new ep("Network Error",ep.ERR_NETWORK,e,c)),c=null},c.ontimeout=function(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",r=e.transitional||eT;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new ep(t,r.clarifyTimeoutError?ep.ETIMEDOUT:ep.ECONNABORTED,e,c)),c=null},eR.hasStandardBrowserEnv&&(u&&ed.isFunction(u)&&(u=u(e)),u||!1!==u&&eY(d))){let t=e.xsrfHeaderName&&e.xsrfCookieName&&eG.read(e.xsrfCookieName);t&&a.set(e.xsrfHeaderName,t)}void 0===o&&a.setContentType(null),"setRequestHeader"in c&&ed.forEach(a.toJSON(),function(e,t){c.setRequestHeader(t,e)}),ed.isUndefined(e.withCredentials)||(c.withCredentials=!!e.withCredentials),s&&"json"!==s&&(c.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&c.addEventListener("progress",eQ(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&c.upload&&c.upload.addEventListener("progress",eQ(e.onUploadProgress)),(e.cancelToken||e.signal)&&(r=t=>{c&&(n(!t||t.type?new eH(null,e,c):t),c.abort(),c=null)},e.cancelToken&&e.cancelToken.subscribe(r),e.signal&&(e.signal.aborted?r():e.signal.addEventListener("abort",r)));let f=function(e){let t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(d);if(f&&-1===eR.protocols.indexOf(f)){n(new ep("Unsupported protocol "+f+":",ep.ERR_BAD_REQUEST,e));return}c.send(o||null)})};let e1={http:null,xhr:e0};ed.forEach(e1,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});let e2=e=>`- ${e}`,e6=e=>ed.isFunction(e)||null===e||!1===e;var e3={getAdapter:e=>{let t,n;e=ed.isArray(e)?e:[e];let{length:r}=e,i={};for(let o=0;o`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")),t=r?e.length>1?"since :\n"+e.map(e2).join("\n"):" "+e2(e[0]):"as no adapter specified";throw new ep("There is no suitable adapter to dispatch the request "+t,"ERR_NOT_SUPPORT")}return n},adapters:e1};function e4(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new eH(null,e)}function e5(e){e4(e),e.headers=eW.from(e.headers),e.data=e$.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);let t=e3.getAdapter(e.adapter||eN.adapter);return t(e).then(function(t){return e4(e),t.data=e$.call(e,e.transformResponse,t),t.headers=eW.from(t.headers),t},function(t){return!eK(t)&&(e4(e),t&&t.response&&(t.response.data=e$.call(e,e.transformResponse,t.response),t.response.headers=eW.from(t.response.headers))),Promise.reject(t)})}let e8=e=>e instanceof eW?{...e}:e;function e9(e,t){t=t||{};let n={};function r(e,t,n){return ed.isPlainObject(e)&&ed.isPlainObject(t)?ed.merge.call({caseless:n},e,t):ed.isPlainObject(t)?ed.merge({},t):ed.isArray(t)?t.slice():t}function i(e,t,n){return ed.isUndefined(t)?ed.isUndefined(e)?void 0:r(void 0,e,n):r(e,t,n)}function o(e,t){if(!ed.isUndefined(t))return r(void 0,t)}function a(e,t){return ed.isUndefined(t)?ed.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function s(n,i,o){return o in t?r(n,i):o in e?r(void 0,n):void 0}let u={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(e,t)=>i(e8(e),e8(t),!0)};return ed.forEach(Object.keys(Object.assign({},e,t)),function(r){let o=u[r]||i,a=o(e[r],t[r],r);ed.isUndefined(a)&&o!==s||(n[r]=a)}),n}let e7="1.6.8",te={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{te[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});let tt={};te.transitional=function(e,t,n){function r(e,t){return"[Axios v"+e7+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,i,o)=>{if(!1===e)throw new ep(r(i," has been removed"+(t?" in "+t:"")),ep.ERR_DEPRECATED);return t&&!tt[i]&&(tt[i]=!0,console.warn(r(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,i,o)}};var tn={assertOptions:function(e,t,n){if("object"!=typeof e)throw new ep("options must be an object",ep.ERR_BAD_OPTION_VALUE);let r=Object.keys(e),i=r.length;for(;i-- >0;){let o=r[i],a=t[o];if(a){let t=e[o],n=void 0===t||a(t,o,e);if(!0!==n)throw new ep("option "+o+" must be "+n,ep.ERR_BAD_OPTION_VALUE);continue}if(!0!==n)throw new ep("Unknown option "+o,ep.ERR_BAD_OPTION)}},validators:te};let tr=tn.validators;class ti{constructor(e){this.defaults=e,this.interceptors={request:new eI,response:new eI}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t;Error.captureStackTrace?Error.captureStackTrace(t={}):t=Error();let n=t.stack?t.stack.replace(/^.+\n/,""):"";e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+n):e.stack=n}throw e}}_request(e,t){let n,r;"string"==typeof e?(t=t||{}).url=e:t=e||{},t=e9(this.defaults,t);let{transitional:i,paramsSerializer:o,headers:a}=t;void 0!==i&&tn.assertOptions(i,{silentJSONParsing:tr.transitional(tr.boolean),forcedJSONParsing:tr.transitional(tr.boolean),clarifyTimeoutError:tr.transitional(tr.boolean)},!1),null!=o&&(ed.isFunction(o)?t.paramsSerializer={serialize:o}:tn.assertOptions(o,{encode:tr.function,serialize:tr.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let s=a&&ed.merge(a.common,a[t.method]);a&&ed.forEach(["delete","get","head","post","put","patch","common"],e=>{delete a[e]}),t.headers=eW.concat(s,a);let u=[],l=!0;this.interceptors.request.forEach(function(e){("function"!=typeof e.runWhen||!1!==e.runWhen(t))&&(l=l&&e.synchronous,u.unshift(e.fulfilled,e.rejected))});let c=[];this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let d=0;if(!l){let e=[e5.bind(this),void 0];for(e.unshift.apply(e,u),e.push.apply(e,c),r=e.length,n=Promise.resolve(t);d{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t;let r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,i){n.reason||(n.reason=new eH(e,r,i),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;let t=new to(function(t){e=t});return{token:t,cancel:e}}}let ta={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ta).forEach(([e,t])=>{ta[t]=e});let ts=function e(t){let n=new ti(t),r=h(ti.prototype.request,n);return ed.extend(r,ti.prototype,n,{allOwnKeys:!0}),ed.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(e9(t,n))},r}(eN);ts.Axios=ti,ts.CanceledError=eH,ts.CancelToken=to,ts.isCancel=eK,ts.VERSION=e7,ts.toFormData=ev,ts.AxiosError=ep,ts.Cancel=ts.CanceledError,ts.all=function(e){return Promise.all(e)},ts.spread=function(e){return function(t){return e.apply(null,t)}},ts.isAxiosError=function(e){return ed.isObject(e)&&!0===e.isAxiosError},ts.mergeConfig=e9,ts.AxiosHeaders=eW,ts.formToJSON=e=>eL(ed.isHTMLForm(e)?new FormData(e):e),ts.getAdapter=e3.getAdapter,ts.HttpStatusCode=ta,ts.default=ts;var tu=n(64174),tl=n(96486),tc=n(26224),td=n(79127),tp=n(39386),tf=n(93066);function th(e){return(0,tp.n_)([(0,tf.AW)("epoch"),(0,tf.AW)("maximumFee"),(0,tp.KB)("transferFeeBasisPoints")],e)}(na=nc||(nc={}))[na.Uninitialized=0]="Uninitialized",na[na.TransferFeeConfig=1]="TransferFeeConfig",na[na.TransferFeeAmount=2]="TransferFeeAmount",na[na.MintCloseAuthority=3]="MintCloseAuthority",na[na.ConfidentialTransferMint=4]="ConfidentialTransferMint",na[na.ConfidentialTransferAccount=5]="ConfidentialTransferAccount",na[na.DefaultAccountState=6]="DefaultAccountState",na[na.ImmutableOwner=7]="ImmutableOwner",na[na.MemoTransfer=8]="MemoTransfer",na[na.NonTransferable=9]="NonTransferable",na[na.InterestBearingConfig=10]="InterestBearingConfig",na[na.CpiGuard=11]="CpiGuard",na[na.PermanentDelegate=12]="PermanentDelegate",na[na.NonTransferableAccount=13]="NonTransferableAccount",na[na.TransferHook=14]="TransferHook",na[na.TransferHookAccount=15]="TransferHookAccount",na[na.MetadataPointer=18]="MetadataPointer",na[na.TokenMetadata=19]="TokenMetadata",na[na.GroupPointer=20]="GroupPointer",na[na.TokenGroup=21]="TokenGroup",na[na.GroupMemberPointer=22]="GroupMemberPointer",na[na.TokenGroupMember=23]="TokenGroupMember",BigInt(1e4);let tm=(0,tp.n_)([(0,tf.ZL)("transferFeeConfigAuthority"),(0,tf.ZL)("withdrawWithheldAuthority"),(0,tf.AW)("withheldAmount"),th("olderTransferFee"),th("newerTransferFee")]);tm.span;let tg=(0,tp.n_)([(0,tf.AW)("withheldAmount")]);tg.span;var ty=n(13550),tb=n.n(ty),t_="[big.js] ",tv=t_+"Invalid ",tw=tv+"decimal places",tk=tv+"rounding mode",tx=t_+"Division by zero",tA={},tS=void 0,tI=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;function tT(e,t,n,r){var i=e.c;if(n===tS&&(n=e.constructor.RM),0!==n&&1!==n&&2!==n&&3!==n)throw Error(tk);if(t<1)r=3===n&&(r||!!i[0])||0===t&&(1===n&&i[0]>=5||2===n&&(i[0]>5||5===i[0]&&(r||i[1]!==tS))),i.length=1,r?(e.e=e.e-t+1,i[0]=1):i[0]=e.e=0;else if(t=5||2===n&&(i[t]>5||5===i[t]&&(r||i[t+1]!==tS||1&i[t-1]))||3===n&&(r||!!i[0]),i.length=t,r){for(;++i[--t]>9;)if(i[t]=0,0===t){++e.e,i.unshift(1);break}}for(t=i.length;!i[--t];)i.pop()}return e}function tE(e,t,n){var r=e.e,i=e.c.join(""),o=i.length;if(t)i=i.charAt(0)+(o>1?"."+i.slice(1):"")+(r<0?"e":"e+")+r;else if(r<0){for(;++r;)i="0"+i;i="0."+i}else if(r>0){if(++r>o)for(r-=o;r--;)i+="0";else r1&&(i=i.charAt(0)+"."+i.slice(1));return e.s<0&&n?"-"+i:i}tA.abs=function(){var e=new this.constructor(this);return e.s=1,e},tA.cmp=function(e){var t,n=this.c,r=(e=new this.constructor(e)).c,i=this.s,o=e.s,a=this.e,s=e.e;if(!n[0]||!r[0])return n[0]?i:r[0]?-o:0;if(i!=o)return i;if(t=i<0,a!=s)return a>s^t?1:-1;for(i=-1,o=(a=n.length)<(s=r.length)?a:s;++ir[i]^t?1:-1;return a==s?0:a>s^t?1:-1},tA.div=function(e){var t=this.constructor,n=this.c,r=(e=new t(e)).c,i=this.s==e.s?1:-1,o=t.DP;if(o!==~~o||o<0||o>1e6)throw Error(tw);if(!r[0])throw Error(tx);if(!n[0])return e.s=i,e.c=[e.e=0],e;var a,s,u,l,c,d=r.slice(),p=a=r.length,f=n.length,h=n.slice(0,a),m=h.length,g=e,y=g.c=[],b=0,_=o+(g.e=this.e-e.e)+1;for(g.s=i,i=_<0?0:_,d.unshift(0);m++m?1:-1;else for(c=-1,l=0;++ch[c]?1:-1;break}if(l<0){for(s=m==a?r:d;m;){if(h[--m]_&&tT(g,_,t.RM,h[0]!==tS),g},tA.eq=function(e){return 0===this.cmp(e)},tA.gt=function(e){return this.cmp(e)>0},tA.gte=function(e){return this.cmp(e)>-1},tA.lt=function(e){return 0>this.cmp(e)},tA.lte=function(e){return 1>this.cmp(e)},tA.minus=tA.sub=function(e){var t,n,r,i,o=this.constructor,a=this.s,s=(e=new o(e)).s;if(a!=s)return e.s=-s,this.plus(e);var u=this.c.slice(),l=this.e,c=e.c,d=e.e;if(!u[0]||!c[0])return c[0]?e.s=-s:u[0]?e=new o(this):e.s=1,e;if(a=l-d){for((i=a<0)?(a=-a,r=u):(d=l,r=c),r.reverse(),s=a;s--;)r.push(0);r.reverse()}else for(n=((i=u.length0)for(;s--;)u[t++]=0;for(s=t;n>a;){if(u[--n]0?(s=o,r=u):(t=-t,r=a),r.reverse();t--;)r.push(0);r.reverse()}for(a.length-u.length<0&&(r=u,u=a,a=r),t=u.length,n=0;t;a[t]%=10)n=(a[--t]=a[t]+u[t]+n)/10|0;for(n&&(a.unshift(n),++s),t=a.length;0===a[--t];)a.pop();return e.c=a,e.e=s,e},tA.pow=function(e){var t=this,n=new t.constructor("1"),r=n,i=e<0;if(e!==~~e||e<-1e6||e>1e6)throw Error(tv+"exponent");for(i&&(e=-e);1&e&&(r=r.times(t)),e>>=1;)t=t.times(t);return i?n.div(r):r},tA.prec=function(e,t){if(e!==~~e||e<1||e>1e6)throw Error(tv+"precision");return tT(new this.constructor(this),e,t)},tA.round=function(e,t){if(e===tS)e=0;else if(e!==~~e||e<-1e6||e>1e6)throw Error(tw);return tT(new this.constructor(this),e+this.e+1,t)},tA.sqrt=function(){var e,t,n,r=this.constructor,i=this.s,o=this.e,a=new r("0.5");if(!this.c[0])return new r(this);if(i<0)throw Error(t_+"No square root");0===(i=Math.sqrt(this+""))||i===1/0?((t=this.c.join("")).length+o&1||(t+="0"),i=Math.sqrt(t),o=((o+1)/2|0)-(o<0||1&o),e=new r((i==1/0?"5e":(i=i.toExponential()).slice(0,i.indexOf("e")+1))+o)):e=new r(i+""),o=e.e+(r.DP+=4);do n=e,e=a.times(n.plus(this.div(n)));while(n.c.slice(0,o).join("")!==e.c.slice(0,o).join(""));return tT(e,(r.DP-=4)+e.e+1,r.RM)},tA.times=tA.mul=function(e){var t,n=this.constructor,r=this.c,i=(e=new n(e)).c,o=r.length,a=i.length,s=this.e,u=e.e;if(e.s=this.s==e.s?1:-1,!r[0]||!i[0])return e.c=[e.e=0],e;for(e.e=s+u,os;)a=t[u]+i[s]*r[u-s-1]+a,t[u--]=a%10,a=a/10|0;t[u]=a}for(a?++e.e:t.shift(),s=t.length;!t[--s];)t.pop();return e.c=t,e},tA.toExponential=function(e,t){var n=this,r=n.c[0];if(e!==tS){if(e!==~~e||e<0||e>1e6)throw Error(tw);for(n=tT(new n.constructor(n),++e,t);n.c.length1e6)throw Error(tw);for(n=tT(new n.constructor(n),e+n.e+1,t),e=e+n.e+1;n.c.length=e.PE,!!this.c[0])},tA.toNumber=function(){var e=Number(tE(this,!0,!0));if(!0===this.constructor.strict&&!this.eq(e.toString()))throw Error(t_+"Imprecise conversion");return e},tA.toPrecision=function(e,t){var n=this,r=n.constructor,i=n.c[0];if(e!==tS){if(e!==~~e||e<1||e>1e6)throw Error(tv+"precision");for(n=tT(new r(n),e,t);n.c.length=r.PE,!!i)},tA.valueOf=function(){var e=this.constructor;if(!0===e.strict)throw Error(t_+"valueOf disallowed");return tE(this,this.e<=e.NE||this.e>=e.PE,!0)};var tP=function e(){function t(n){var r=this;if(!(r instanceof t))return n===tS?e():new t(n);if(n instanceof t)r.s=n.s,r.e=n.e,r.c=n.c.slice();else{if("string"!=typeof n){if(!0===t.strict&&"bigint"!=typeof n)throw TypeError(tv+"value");n=0===n&&1/n<0?"-0":String(n)}!function(e,t){var n,r,i;if(!tI.test(t))throw Error(tv+"number");for(e.s="-"==t.charAt(0)?(t=t.slice(1),-1):1,(n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),i=t.length,r=0;r0&&"0"==t.charAt(--i););for(e.e=n-r-1,e.c=[],n=0;r<=i;)e.c[n++]=+t.charAt(r++)}}(r,n)}r.constructor=t}return t.prototype=tA,t.DP=20,t.RM=1,t.NE=-7,t.PE=21,t.strict=!1,t.roundDown=0,t.roundHalfUp=1,t.roundHalfEven=2,t.roundUp=3,t}(),tC=n(12447),tO=n.n(tC),tB=n(29887),tM=n.n(tB),tR=n(48764).Buffer;function tL(e,t,n,r,i=td.H_,o=td._u){return function(e,t,n,r,i,o=td.H_,a=td._u){let s=[{pubkey:e,isSigner:!0,isWritable:!0},{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:n,isSigner:!1,isWritable:!1},{pubkey:r,isSigner:!1,isWritable:!1},{pubkey:tu.yc.programId,isSigner:!1,isWritable:!1},{pubkey:o,isSigner:!1,isWritable:!1}];return new tu.Sl({keys:s,programId:a,data:i})}(e,t,n,r,tR.alloc(0),i,o)}var tN=n(83304);(ns=nd||(nd={}))[ns.InitializeMint=0]="InitializeMint",ns[ns.InitializeAccount=1]="InitializeAccount",ns[ns.InitializeMultisig=2]="InitializeMultisig",ns[ns.Transfer=3]="Transfer",ns[ns.Approve=4]="Approve",ns[ns.Revoke=5]="Revoke",ns[ns.SetAuthority=6]="SetAuthority",ns[ns.MintTo=7]="MintTo",ns[ns.Burn=8]="Burn",ns[ns.CloseAccount=9]="CloseAccount",ns[ns.FreezeAccount=10]="FreezeAccount",ns[ns.ThawAccount=11]="ThawAccount",ns[ns.TransferChecked=12]="TransferChecked",ns[ns.ApproveChecked=13]="ApproveChecked",ns[ns.MintToChecked=14]="MintToChecked",ns[ns.BurnChecked=15]="BurnChecked",ns[ns.InitializeAccount2=16]="InitializeAccount2",ns[ns.SyncNative=17]="SyncNative",ns[ns.InitializeAccount3=18]="InitializeAccount3",ns[ns.InitializeMultisig2=19]="InitializeMultisig2",ns[ns.InitializeMint2=20]="InitializeMint2",ns[ns.GetAccountDataSize=21]="GetAccountDataSize",ns[ns.InitializeImmutableOwner=22]="InitializeImmutableOwner",ns[ns.AmountToUiAmount=23]="AmountToUiAmount",ns[ns.UiAmountToAmount=24]="UiAmountToAmount",ns[ns.InitializeMintCloseAuthority=25]="InitializeMintCloseAuthority",ns[ns.TransferFeeExtension=26]="TransferFeeExtension",ns[ns.ConfidentialTransferExtension=27]="ConfidentialTransferExtension",ns[ns.DefaultAccountStateExtension=28]="DefaultAccountStateExtension",ns[ns.Reallocate=29]="Reallocate",ns[ns.MemoTransferExtension=30]="MemoTransferExtension",ns[ns.CreateNativeMint=31]="CreateNativeMint",ns[ns.InitializeNonTransferableMint=32]="InitializeNonTransferableMint",ns[ns.InterestBearingMintExtension=33]="InterestBearingMintExtension",ns[ns.CpiGuardExtension=34]="CpiGuardExtension",ns[ns.InitializePermanentDelegate=35]="InitializePermanentDelegate",ns[ns.TransferHookExtension=36]="TransferHookExtension",ns[ns.MetadataPointerExtension=39]="MetadataPointerExtension",ns[ns.GroupPointerExtension=40]="GroupPointerExtension",ns[ns.GroupMemberPointerExtension=41]="GroupMemberPointerExtension";var tD=n(48764).Buffer;let tF=(0,tp.n_)([(0,tp.u8)("instruction")]);function tq(e,t,n,r=td.H_){let i=[{pubkey:e,isSigner:!1,isWritable:!0},{pubkey:t,isSigner:!1,isWritable:!1},{pubkey:n,isSigner:!1,isWritable:!1},{pubkey:tu.ze,isSigner:!1,isWritable:!1}],o=tD.alloc(tF.span);return tF.encode({instruction:nd.InitializeAccount},o),new tu.Sl({keys:i,programId:r,data:o})}function tj(e,t,n){if(n.length)for(let r of(e.push({pubkey:t,isSigner:!1,isWritable:!1}),n))e.push({pubkey:r instanceof tu.nh?r:r.publicKey,isSigner:!0,isWritable:!1});else e.push({pubkey:t,isSigner:!0,isWritable:!1});return e}var tU=n(48764).Buffer;let tz=(0,tp.n_)([(0,tp.u8)("instruction")]);var tV=n(48764).Buffer;let tW=(0,tp.n_)([(0,tp.u8)("instruction"),(0,tf.AW)("amount")]);function t$(e,t,n,r,i=[],o=td.H_){let a=tj([{pubkey:e,isSigner:!1,isWritable:!0},{pubkey:t,isSigner:!1,isWritable:!0}],n,i),s=tV.alloc(tW.span);return tW.encode({instruction:nd.Transfer,amount:BigInt(r)},s),new tu.Sl({keys:a,programId:o,data:s})}var tK=n(48764).Buffer,tH=Object.defineProperty,tG=Object.defineProperties,tZ=Object.getOwnPropertyDescriptors,tY=Object.getOwnPropertySymbols,tX=Object.prototype.hasOwnProperty,tQ=Object.prototype.propertyIsEnumerable,tJ=(e,t,n)=>t in e?tH(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,t0=(e,t)=>{for(var n in t||(t={}))tX.call(t,n)&&tJ(e,n,t[n]);if(tY)for(var n of tY(t))tQ.call(t,n)&&tJ(e,n,t[n]);return e},t1=(e,t)=>tG(e,tZ(t)),t2=(e,t)=>{var n={};for(var r in e)tX.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&tY)for(var r of tY(e))0>t.indexOf(r)&&tQ.call(e,r)&&(n[r]=e[r]);return n},t6=((nu=t6||{})[nu.Error=0]="Error",nu[nu.Warning=1]="Warning",nu[nu.Info=2]="Info",nu[nu.Debug=3]="Debug",nu),t3=class{constructor(e){this.logLevel=void 0!==e.logLevel?e.logLevel:0,this.name=e.name}set level(e){this.logLevel=e}get time(){return Date.now().toString()}get moduleName(){return this.name}isLogLevel(e){return e<=this.logLevel}error(...e){return this.isLogLevel(0)&&console.error(this.time,this.name,"sdk logger error",...e),this}logWithError(...e){throw Error(e.map(e=>"object"==typeof e?JSON.stringify(e):e).join(", "))}warning(...e){return this.isLogLevel(1)&&console.warn(this.time,this.name,"sdk logger warning",...e),this}info(...e){return this.isLogLevel(2)&&console.info(this.time,this.name,"sdk logger info",...e),this}debug(...e){return this.isLogLevel(3)&&console.debug(this.time,this.name,"sdk logger debug",...e),this}},t4={},t5={};function t8(e){let t=(0,tl.get)(t4,e);if(!t){let n=(0,tl.get)(t5,e);t=new t3({name:e,logLevel:n}),(0,tl.set)(t4,e,t)}return t}var t9=t8("Raydium_accountInfo_util");async function t7(e,t,n){let{batchRequest:r,commitment:i="confirmed",chunkCount:o=100}=t0({batchRequest:!1},n),a=ib(t,o),s=Array(a.length).fill([]);if(r){let t=a.map(t=>({methodName:"getMultipleAccounts",args:e._buildArgs([t.map(e=>e.toBase58())],i,"base64")})),n=ib(t,10);s=(await (await Promise.all(n.map(async t=>await e._rpcBatchRequest(t)))).flat()).map(e=>(e.error&&t9.logWithError(`failed to get info for multiple accounts, RPC_ERROR, ${e.error.message}`),e.result.value.map(e=>{if(e){let{data:t,executable:n,lamports:r,owner:i,rentEpoch:o}=e;return 2!==t.length&&"base64"!==t[1]&&t9.logWithError("info must be base64 encoded, RPC_ERROR"),{data:tK.from(t[0],"base64"),executable:n,lamports:r,owner:new tu.nh(i),rentEpoch:o}}return null})))}else try{s=await Promise.all(a.map(t=>e.getMultipleAccountsInfo(t,i)))}catch(e){e instanceof Error&&t9.logWithError(`failed to get info for multiple accounts, RPC_ERROR, ${e.message}`)}return s.flat()}async function ne(e,t,n){let r=await t7(e,t.map(e=>e.pubkey),n);return t.map((e,t)=>t1(t0({},e),{accountInfo:r[t]}))}var nt=((nl=nt||{})[nl.Uninitialized=0]="Uninitialized",nl[nl.Mint=1]="Mint",nl[nl.Account=2]="Account",nl);async function nn({connection:e,mints:t,config:n}){var r,i,o;if(0===t.length)return{};let a=await ne(e,t.map(e=>({pubkey:it(e)})),n),s={};for(let e of a){if(!e.accountInfo||e.accountInfo.data.length0){for(o+=a,t=1;tn)throw Error(nv+e)}function nL(e,t,n,r){var i,o,a,s;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=7,i=0):(i=Math.ceil((t+1)/7),t%=7),o=nS(10,7-t),s=e[i]%o|0,null==r?t<3?(0==t?s=s/100|0:1==t&&(s=s/10|0),a=n<4&&99999==s||n>3&&49999==s||5e4==s||0==s):a=(n<4&&s+1==o||n>3&&s+1==o/2)&&(e[i+1]/o/100|0)==nS(10,t-2)-1||(s==o/2||0==s)&&(e[i+1]/o/100|0)==0:t<4?(0==t?s=s/1e3|0:1==t?s=s/100|0:2==t&&(s=s/10|0),a=(r||n<4)&&9999==s||!r&&n>3&&4999==s):a=((r||n<4)&&s+1==o||!r&&n>3&&s+1==o/2)&&(e[i+1]/o/1e3|0)==nS(10,t-3)-1,a}function nN(e,t,n){for(var r,i,o=[0],a=0,s=e.length;an-1&&(void 0===o[r+1]&&(o[r+1]=0),o[r+1]+=o[r]/n|0,o[r]%=n)}return o.reverse()}nB.absoluteValue=nB.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),nF(e)},nB.ceil=function(){return nF(new this.constructor(this),this.e+1,2)},nB.clampedTo=nB.clamp=function(e,t){var n=this.constructor;if(e=new n(e),t=new n(t),!e.s||!t.s)return new n(NaN);if(e.gt(t))throw Error(nv+t);return 0>this.cmp(e)?e:this.cmp(t)>0?t:new n(this)},nB.comparedTo=nB.cmp=function(e){var t,n,r,i,o=this.d,a=(e=new this.constructor(e)).d,s=this.s,u=e.s;if(!o||!a)return s&&u?s!==u?s:o===a?0:!o^s<0?1:-1:NaN;if(!o[0]||!a[0])return o[0]?s:a[0]?-u:0;if(s!==u)return s;if(this.e!==e.e)return this.e>e.e^s<0?1:-1;for(r=o.length,i=a.length,t=0,n=ra[t]^s<0?1:-1;return r===i?0:r>i^s<0?1:-1},nB.cosine=nB.cos=function(){var e,t,n=this,r=n.constructor;return n.d?n.d[0]?(e=r.precision,t=r.rounding,r.precision=e+Math.max(n.e,n.sd())+7,r.rounding=1,n=function(e,t){var n,r,i;if(t.isZero())return t;(r=t.d.length)<32?i=(1/nJ(4,n=Math.ceil(r/3))).toString():(n=16,i="2.3283064365386962890625e-10"),e.precision+=n,t=nQ(e,1,t.times(i),new e(1));for(var o=n;o--;){var a=t.times(t);t=a.times(a).minus(a).times(8).plus(1)}return e.precision-=n,t}(r,n0(r,n)),r.precision=e,r.rounding=t,nF(2==nf||3==nf?n.neg():n,e,t,!0)):new r(1):new r(NaN)},nB.cubeRoot=nB.cbrt=function(){var e,t,n,r,i,o,a,s,u,l,c=this.constructor;if(!this.isFinite()||this.isZero())return new c(this);for(nb=!1,(o=this.s*nS(this.s*this,1/3))&&Math.abs(o)!=1/0?r=new c(o.toString()):(n=nM(this.d),(o=((e=this.e)-n.length+1)%3)&&(n+=1==o||-2==o?"0":"00"),o=nS(n,1/3),e=nA((e+1)/3)-(e%3==(e<0?-1:2)),n=o==1/0?"5e"+e:(n=o.toExponential()).slice(0,n.indexOf("e")+1)+e,(r=new c(n)).s=this.s),a=(e=c.precision)+3;;)if(l=(u=(s=r).times(s).times(s)).plus(this),r=nD(l.plus(this).times(s),l.plus(u),a+2,1),nM(s.d).slice(0,a)===(n=nM(r.d)).slice(0,a)){if("9999"!=(n=n.slice(a-3,a+1))&&(i||"4999"!=n)){+n&&(+n.slice(1)||"5"!=n.charAt(0))||(nF(r,e+1,1),t=!r.times(r).times(r).eq(this));break}if(!i&&(nF(s,e+1,0),s.times(s).times(s).eq(this))){r=s;break}a+=4,i=1}return nb=!0,nF(r,e,c.rounding,t)},nB.decimalPlaces=nB.dp=function(){var e,t=this.d,n=NaN;if(t){if(n=((e=t.length-1)-nA(this.e/7))*7,e=t[e])for(;e%10==0;e/=10)n--;n<0&&(n=0)}return n},nB.dividedBy=nB.div=function(e){return nD(this,new this.constructor(e))},nB.dividedToIntegerBy=nB.divToInt=function(e){var t=this.constructor;return nF(nD(this,new t(e),0,1,1),t.precision,t.rounding)},nB.equals=nB.eq=function(e){return 0===this.cmp(e)},nB.floor=function(){return nF(new this.constructor(this),this.e+1,3)},nB.greaterThan=nB.gt=function(e){return this.cmp(e)>0},nB.greaterThanOrEqualTo=nB.gte=function(e){var t=this.cmp(e);return 1==t||0===t},nB.hyperbolicCosine=nB.cosh=function(){var e,t,n,r,i,o=this,a=o.constructor,s=new a(1);if(!o.isFinite())return new a(o.s?1/0:NaN);if(o.isZero())return s;n=a.precision,r=a.rounding,a.precision=n+Math.max(o.e,o.sd())+4,a.rounding=1,(i=o.d.length)<32?t=(1/nJ(4,e=Math.ceil(i/3))).toString():(e=16,t="2.3283064365386962890625e-10"),o=nQ(a,1,o.times(t),new a(1),!0);for(var u,l=e,c=new a(8);l--;)u=o.times(o),o=s.minus(u.times(c.minus(u.times(c))));return nF(o,a.precision=n,a.rounding=r,!0)},nB.hyperbolicSine=nB.sinh=function(){var e,t,n,r,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(t=o.precision,n=o.rounding,o.precision=t+Math.max(i.e,i.sd())+4,o.rounding=1,(r=i.d.length)<3)i=nQ(o,2,i,i,!0);else{e=(e=1.4*Math.sqrt(r))>16?16:0|e,i=i.times(1/nJ(5,e)),i=nQ(o,2,i,i,!0);for(var a,s=new o(5),u=new o(16),l=new o(20);e--;)a=i.times(i),i=i.times(s.plus(a.times(u.times(a).plus(l))))}return o.precision=t,o.rounding=n,nF(i,t,n,!0)},nB.hyperbolicTangent=nB.tanh=function(){var e,t,n=this.constructor;return this.isFinite()?this.isZero()?new n(this):(e=n.precision,t=n.rounding,n.precision=e+7,n.rounding=1,nD(this.sinh(),this.cosh(),n.precision=e,n.rounding=t)):new n(this.s)},nB.inverseCosine=nB.acos=function(){var e,t=this,n=t.constructor,r=t.abs().cmp(1),i=n.precision,o=n.rounding;return -1!==r?0===r?t.isNeg()?nz(n,i,o):new n(0):new n(NaN):t.isZero()?nz(n,i+4,o).times(.5):(n.precision=i+6,n.rounding=1,t=t.asin(),e=nz(n,i+4,o).times(.5),n.precision=i,n.rounding=o,e.minus(t))},nB.inverseHyperbolicCosine=nB.acosh=function(){var e,t,n=this,r=n.constructor;return n.lte(1)?new r(n.eq(1)?0:NaN):n.isFinite()?(e=r.precision,t=r.rounding,r.precision=e+Math.max(Math.abs(n.e),n.sd())+4,r.rounding=1,nb=!1,n=n.times(n).minus(1).sqrt().plus(n),nb=!0,r.precision=e,r.rounding=t,n.ln()):new r(n)},nB.inverseHyperbolicSine=nB.asinh=function(){var e,t,n=this,r=n.constructor;return!n.isFinite()||n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+2*Math.max(Math.abs(n.e),n.sd())+6,r.rounding=1,nb=!1,n=n.times(n).plus(1).sqrt().plus(n),nb=!0,r.precision=e,r.rounding=t,n.ln())},nB.inverseHyperbolicTangent=nB.atanh=function(){var e,t,n,r,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=o.precision,t=o.rounding,Math.max(r=i.sd(),e)<-(2*i.e)-1?nF(new o(i),e,t,!0):(o.precision=n=r-i.e,i=nD(i.plus(1),new o(1).minus(i),n+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=t,i.times(.5))):new o(NaN)},nB.inverseSine=nB.asin=function(){var e,t,n,r,i=this,o=i.constructor;return i.isZero()?new o(i):(t=i.abs().cmp(1),n=o.precision,r=o.rounding,-1!==t?0===t?((e=nz(o,n+4,r).times(.5)).s=i.s,e):new o(NaN):(o.precision=n+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=n,o.rounding=r,i.times(2)))},nB.inverseTangent=nB.atan=function(){var e,t,n,r,i,o,a,s,u,l=this,c=l.constructor,d=c.precision,p=c.rounding;if(l.isFinite()){if(l.isZero())return new c(l);if(l.abs().eq(1)&&d+4<=nO)return(a=nz(c,d+4,p).times(.25)).s=l.s,a}else{if(!l.s)return new c(NaN);if(d+4<=nO)return(a=nz(c,d+4,p).times(.5)).s=l.s,a}for(c.precision=s=d+10,c.rounding=1,e=n=Math.min(28,s/7+2|0);e;--e)l=l.div(l.times(l).plus(1).sqrt().plus(1));for(nb=!1,t=Math.ceil(s/7),r=1,u=l.times(l),a=new c(l),i=l;-1!==e;)if(i=i.times(u),o=a.minus(i.div(r+=2)),i=i.times(u),void 0!==(a=o.plus(i.div(r+=2))).d[t])for(e=t;a.d[e]===o.d[e]&&e--;);return n&&(a=a.times(2<this.d.length-2},nB.isNaN=function(){return!this.s},nB.isNegative=nB.isNeg=function(){return this.s<0},nB.isPositive=nB.isPos=function(){return this.s>0},nB.isZero=function(){return!!this.d&&0===this.d[0]},nB.lessThan=nB.lt=function(e){return 0>this.cmp(e)},nB.lessThanOrEqualTo=nB.lte=function(e){return 1>this.cmp(e)},nB.logarithm=nB.log=function(e){var t,n,r,i,o,a,s,u=this.constructor,l=u.precision,c=u.rounding;if(null==e)e=new u(10),t=!0;else{if(n=(e=new u(e)).d,e.s<0||!n||!n[0]||e.eq(1))return new u(NaN);t=e.eq(10)}if(n=this.d,this.s<0||!n||!n[0]||this.eq(1))return new u(n&&!n[0]?-1/0:1!=this.s?NaN:n?0:1/0);if(t){if(n.length>1)i=!0;else{for(r=n[0];r%10==0;)r/=10;i=1!==r}}if(nb=!1,nL((s=nD(nZ(this,a=l+5),t?nU(u,a+10):nZ(e,a),a,1)).d,r=l,c))do if(a+=10,s=nD(nZ(this,a),t?nU(u,a+10):nZ(e,a),a,1),!i){+nM(s.d).slice(r+1,r+15)+1==1e14&&(s=nF(s,l+1,0));break}while(nL(s.d,r+=10,c));return nb=!0,nF(s,l,c)},nB.minus=nB.sub=function(e){var t,n,r,i,o,a,s,u,l,c,d,p,f=this.constructor;if(e=new f(e),!this.d||!e.d)return this.s&&e.s?this.d?e.s=-e.s:e=new f(e.d||this.s!==e.s?this:NaN):e=new f(NaN),e;if(this.s!=e.s)return e.s=-e.s,this.plus(e);if(l=this.d,p=e.d,s=f.precision,u=f.rounding,!l[0]||!p[0]){if(p[0])e.s=-e.s;else{if(!l[0])return new f(3===u?-0:0);e=new f(this)}return nb?nF(e,s,u):e}if(n=nA(e.e/7),c=nA(this.e/7),l=l.slice(),o=c-n){for((d=o<0)?(t=l,o=-o,a=p.length):(t=p,n=c,a=l.length),r=Math.max(Math.ceil(s/7),a)+2,o>r&&(o=r,t.length=1),t.reverse(),r=o;r--;)t.push(0);t.reverse()}else{for((d=(r=l.length)<(a=p.length))&&(a=r),r=0;r0;--r)l[a++]=0;for(r=p.length;r>o;){if(l[--r](a=(o=Math.ceil(s/7))>a?o+1:a+1)&&(i=a,n.length=1),n.reverse();i--;)n.push(0);n.reverse()}for((a=l.length)-(i=c.length)<0&&(i=a,n=c,c=l,l=n),t=0;i;)t=(l[--i]=l[i]+c[i]+t)/1e7|0,l[i]%=1e7;for(t&&(l.unshift(t),++r),a=l.length;0==l[--a];)l.pop();return e.d=l,e.e=nj(l,r),nb?nF(e,s,u):e},nB.precision=nB.sd=function(e){var t;if(void 0!==e&&!!e!==e&&1!==e&&0!==e)throw Error(nv+e);return this.d?(t=nV(this.d),e&&this.e+1>t&&(t=this.e+1)):t=NaN,t},nB.round=function(){var e=this.constructor;return nF(new e(this),this.e+1,e.rounding)},nB.sine=nB.sin=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+Math.max(n.e,n.sd())+7,r.rounding=1,n=function(e,t){var n,r=t.d.length;if(r<3)return t.isZero()?t:nQ(e,2,t,t);n=(n=1.4*Math.sqrt(r))>16?16:0|n,t=t.times(1/nJ(5,n)),t=nQ(e,2,t,t);for(var i,o=new e(5),a=new e(16),s=new e(20);n--;)i=t.times(t),t=t.times(o.plus(i.times(a.times(i).minus(s))));return t}(r,n0(r,n)),r.precision=e,r.rounding=t,nF(nf>2?n.neg():n,e,t,!0)):new r(NaN)},nB.squareRoot=nB.sqrt=function(){var e,t,n,r,i,o,a=this.d,s=this.e,u=this.s,l=this.constructor;if(1!==u||!a||!a[0])return new l(!u||u<0&&(!a||a[0])?NaN:a?this:1/0);for(nb=!1,0==(u=Math.sqrt(+this))||u==1/0?(((t=nM(a)).length+s)%2==0&&(t+="0"),u=Math.sqrt(t),s=nA((s+1)/2)-(s<0||s%2),t=u==1/0?"5e"+s:(t=u.toExponential()).slice(0,t.indexOf("e")+1)+s,r=new l(t)):r=new l(u.toString()),n=(s=l.precision)+3;;)if(r=(o=r).plus(nD(this,o,n+2,1)).times(.5),nM(o.d).slice(0,n)===(t=nM(r.d)).slice(0,n)){if("9999"!=(t=t.slice(n-3,n+1))&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(nF(r,s+1,1),e=!r.times(r).eq(this));break}if(!i&&(nF(o,s+1,0),o.times(o).eq(this))){r=o;break}n+=4,i=1}return nb=!0,nF(r,s,l.rounding,e)},nB.tangent=nB.tan=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+10,r.rounding=1,(n=n.sin()).s=1,n=nD(n,new r(1).minus(n.times(n)).sqrt(),e+10,0),r.precision=e,r.rounding=t,nF(2==nf||4==nf?n.neg():n,e,t,!0)):new r(NaN)},nB.times=nB.mul=function(e){var t,n,r,i,o,a,s,u,l,c=this.constructor,d=this.d,p=(e=new c(e)).d;if(e.s*=this.s,!d||!d[0]||!p||!p[0])return new c(e.s&&(!d||d[0]||p)&&(!p||p[0]||d)?d&&p?0*e.s:e.s/0:NaN);for(n=nA(this.e/7)+nA(e.e/7),(u=d.length)<(l=p.length)&&(o=d,d=p,p=o,a=u,u=l,l=a),o=[],r=a=u+l;r--;)o.push(0);for(r=l;--r>=0;){for(t=0,i=u+r;i>r;)s=o[i]+p[r]*d[i-r-1]+t,o[i--]=s%1e7|0,t=s/1e7|0;o[i]=(o[i]+t)%1e7|0}for(;!o[--a];)o.pop();return t?++n:o.shift(),e.d=o,e.e=nj(o,n),nb?nF(e,c.precision,c.rounding):e},nB.toBinary=function(e,t){return n1(this,2,e,t)},nB.toDecimalPlaces=nB.toDP=function(e,t){var n=this,r=n.constructor;return n=new r(n),void 0===e?n:(nR(e,0,1e9),void 0===t?t=r.rounding:nR(t,0,8),nF(n,e+n.e+1,t))},nB.toExponential=function(e,t){var n,r=this,i=r.constructor;return void 0===e?n=nq(r,!0):(nR(e,0,1e9),void 0===t?t=i.rounding:nR(t,0,8),n=nq(r=nF(new i(r),e+1,t),!0,e+1)),r.isNeg()&&!r.isZero()?"-"+n:n},nB.toFixed=function(e,t){var n,r,i=this.constructor;return void 0===e?n=nq(this):(nR(e,0,1e9),void 0===t?t=i.rounding:nR(t,0,8),n=nq(r=nF(new i(this),e+this.e+1,t),!1,e+r.e+1)),this.isNeg()&&!this.isZero()?"-"+n:n},nB.toFraction=function(e){var t,n,r,i,o,a,s,u,l,c,d,p,f=this.d,h=this.constructor;if(!f)return new h(this);if(l=n=new h(1),r=u=new h(0),a=(o=(t=new h(r)).e=nV(f)-this.e-1)%7,t.d[0]=nS(10,a<0?7+a:a),null==e)e=o>0?t:l;else{if(!(s=new h(e)).isInt()||s.lt(l))throw Error(nv+s);e=s.gt(t)?o>0?t:l:s}for(nb=!1,s=new h(nM(f)),c=h.precision,h.precision=o=14*f.length;d=nD(s,t,0,1,1),1!=(i=n.plus(d.times(r))).cmp(e);)n=r,r=i,i=l,l=u.plus(d.times(i)),u=i,i=t,t=s.minus(d.times(i)),s=i;return i=nD(e.minus(n),r,0,1,1),u=u.plus(i.times(l)),n=n.plus(i.times(r)),u.s=l.s=this.s,p=1>nD(l,r,o,1).minus(this).abs().cmp(nD(u,n,o,1).minus(this).abs())?[l,r]:[u,n],h.precision=c,nb=!0,p},nB.toHexadecimal=nB.toHex=function(e,t){return n1(this,16,e,t)},nB.toNearest=function(e,t){var n=this,r=n.constructor;if(n=new r(n),null==e){if(!n.d)return n;e=new r(1),t=r.rounding}else{if(e=new r(e),void 0===t?t=r.rounding:nR(t,0,8),!n.d)return e.s?n:e;if(!e.d)return e.s&&(e.s=n.s),e}return e.d[0]?(nb=!1,n=nD(n,e,0,t,1).times(e),nb=!0,nF(n)):(e.s=n.s,n=e),n},nB.toNumber=function(){return+this},nB.toOctal=function(e,t){return n1(this,8,e,t)},nB.toPower=nB.pow=function(e){var t,n,r,i,o,a,s=this,u=s.constructor,l=+(e=new u(e));if(!s.d||!e.d||!s.d[0]||!e.d[0])return new u(nS(+s,l));if((s=new u(s)).eq(1))return s;if(r=u.precision,o=u.rounding,e.eq(1))return nF(s,r,o);if((t=nA(e.e/7))>=e.d.length-1&&(n=l<0?-l:l)<=9007199254740991)return i=n$(u,s,n,r),e.s<0?new u(1).div(i):nF(i,r,o);if((a=s.s)<0){if(tu.maxE+1||t0?a/0:0):(nb=!1,u.rounding=s.s=1,n=Math.min(12,(t+"").length),(i=nG(e.times(nZ(s,r+n)),r)).d&&nL((i=nF(i,r+5,1)).d,r,o)&&(t=r+10,+nM((i=nF(nG(e.times(nZ(s,t+n)),t),t+5,1)).d).slice(r+1,r+15)+1==1e14&&(i=nF(i,r+1,0))),i.s=a,nb=!0,u.rounding=o,nF(i,r,o))},nB.toPrecision=function(e,t){var n,r=this,i=r.constructor;return void 0===e?n=nq(r,r.e<=i.toExpNeg||r.e>=i.toExpPos):(nR(e,1,1e9),void 0===t?t=i.rounding:nR(t,0,8),n=nq(r=nF(new i(r),e,t),e<=r.e||r.e<=i.toExpNeg,e)),r.isNeg()&&!r.isZero()?"-"+n:n},nB.toSignificantDigits=nB.toSD=function(e,t){var n=this.constructor;return void 0===e?(e=n.precision,t=n.rounding):(nR(e,1,1e9),void 0===t?t=n.rounding:nR(t,0,8)),nF(new n(this),e,t)},nB.toString=function(){var e=this.constructor,t=nq(this,this.e<=e.toExpNeg||this.e>=e.toExpPos);return this.isNeg()&&!this.isZero()?"-"+t:t},nB.truncated=nB.trunc=function(){return nF(new this.constructor(this),this.e+1,1)},nB.valueOf=nB.toJSON=function(){var e=this.constructor,t=nq(this,this.e<=e.toExpNeg||this.e>=e.toExpPos);return this.isNeg()?"-"+t:t};var nD=function(){function e(e,t,n){var r,i=0,o=e.length;for(e=e.slice();o--;)r=e[o]*t+i,e[o]=r%n|0,i=r/n|0;return i&&e.unshift(i),e}function t(e,t,n,r){var i,o;if(n!=r)o=n>r?1:-1;else for(i=o=0;it[i]?1:-1;break}return o}function n(e,t,n,r){for(var i=0;n--;)e[n]-=i,i=e[n]1;)e.shift()}return function(r,i,o,a,s,u){var l,c,d,p,f,h,m,g,y,b,_,v,w,k,x,A,S,I,T,E,P=r.constructor,C=r.s==i.s?1:-1,O=r.d,B=i.d;if(!O||!O[0]||!B||!B[0])return new P(r.s&&i.s&&(O?!B||O[0]!=B[0]:B)?O&&0==O[0]||!B?0*C:C/0:NaN);for(u?(f=1,c=r.e-i.e):(u=1e7,f=7,c=nA(r.e/f)-nA(i.e/f)),T=B.length,S=O.length,b=(y=new P(C)).d=[],d=0;B[d]==(O[d]||0);d++);if(B[d]>(O[d]||0)&&c--,null==o?(k=o=P.precision,a=P.rounding):k=s?o+(r.e-i.e)+1:o,k<0)b.push(1),h=!0;else{if(k=k/f+2|0,d=0,1==T){for(p=0,B=B[0],k++;(d1&&(B=e(B,p,u),O=e(O,p,u),T=B.length,S=O.length),A=T,v=(_=O.slice(0,T)).length;v=u/2&&++I;do p=0,(l=t(B,_,T,v))<0?(w=_[0],T!=v&&(w=w*u+(_[1]||0)),(p=w/I|0)>1?(p>=u&&(p=u-1),g=(m=e(B,p,u)).length,v=_.length,1==(l=t(m,_,g,v))&&(p--,n(m,T=10;p/=10)d++;y.e=d+c*f-1,nF(y,s?o+y.e+1:o,a,h)}return y}}();function nF(e,t,n,r){var i,o,a,s,u,l,c,d,p,f=e.constructor;e:if(null!=t){if(!(d=e.d))return e;for(i=1,s=d[0];s>=10;s/=10)i++;if((o=t-i)<0)o+=7,a=t,u=(c=d[p=0])/nS(10,i-a-1)%10|0;else if(p=Math.ceil((o+1)/7),s=d.length,p>=s){if(r){for(;s++<=p;)d.push(0);c=u=0,i=1,o%=7,a=o-7+1}else break e}else{for(c=s=d[p],i=1;s>=10;s/=10)i++;o%=7,u=(a=o-7+i)<0?0:c/nS(10,i-a-1)%10|0}if(r=r||t<0||void 0!==d[p+1]||(a<0?c:c%nS(10,i-a-1)),l=n<4?(u||r)&&(0==n||n==(e.s<0?3:2)):u>5||5==u&&(4==n||r||6==n&&(o>0?a>0?c/nS(10,i-a):0:d[p-1])%10&1||n==(e.s<0?8:7)),t<1||!d[0])return d.length=0,l?(t-=e.e+1,d[0]=nS(10,(7-t%7)%7),e.e=-t||0):d[0]=e.e=0,e;if(0==o?(d.length=p,s=1,p--):(d.length=p+1,s=nS(10,7-o),d[p]=a>0?(c/nS(10,i-a)%nS(10,a)|0)*s:0),l)for(;;)if(0==p){for(o=1,a=d[0];a>=10;a/=10)o++;for(a=d[0]+=s,s=1;a>=10;a/=10)s++;o!=s&&(e.e++,1e7==d[0]&&(d[0]=1));break}else{if(d[p]+=s,1e7!=d[p])break;d[p--]=0,s=1}for(o=d.length;0===d[--o];)d.pop()}return nb&&(e.e>f.maxE?(e.d=null,e.e=NaN):e.e0?o=o.charAt(0)+"."+o.slice(1)+nW(r):a>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+nW(-i-1)+o,n&&(r=n-a)>0&&(o+=nW(r))):i>=a?(o+=nW(i+1-a),n&&(r=n-i-1)>0&&(o=o+"."+nW(r))):((r=i+1)0&&(i+1===a&&(o+="."),o+=nW(r))),o}function nj(e,t){var n=e[0];for(t*=7;n>=10;n/=10)t++;return t}function nU(e,t,n){if(t>nC)throw nb=!0,n&&(e.precision=n),Error(nw);return nF(new e(nm),t,1,!0)}function nz(e,t,n){if(t>nO)throw Error(nw);return nF(new e(ng),t,n,!0)}function nV(e){var t=e.length-1,n=7*t+1;if(t=e[t]){for(;t%10==0;t/=10)n--;for(t=e[0];t>=10;t/=10)n++}return n}function nW(e){for(var t="";e--;)t+="0";return t}function n$(e,t,n,r){var i,o=new e(1),a=Math.ceil(r/7+4);for(nb=!1;;){if(n%2&&n2((o=o.times(t)).d,a)&&(i=!0),0===(n=nA(n/2))){n=o.d.length-1,i&&0===o.d[n]&&++o.d[n];break}n2((t=t.times(t)).d,a)}return nb=!0,o}function nK(e){return 1&e.d[e.d.length-1]}function nH(e,t,n){for(var r,i=new e(t[0]),o=0;++o17)return new p(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:0/0);for(null==t?(nb=!1,u=h):u=t,s=new p(.03125);e.e>-2;)e=e.times(s),d+=5;for(u+=r=Math.log(nS(2,d))/Math.LN10*2+5|0,n=o=a=new p(1),p.precision=u;;){if(o=nF(o.times(e),u,1),n=n.times(++c),nM((s=a.plus(nD(o,n,u,1))).d).slice(0,u)===nM(a.d).slice(0,u)){for(i=d;i--;)a=nF(a.times(a),u,1);if(null!=t)return p.precision=h,a;if(!(l<3&&nL(a.d,u-r,f,l)))return nF(a,p.precision=h,f,nb=!0);p.precision=u+=10,n=o=s=new p(1),c=0,l++}a=s}}function nZ(e,t){var n,r,i,o,a,s,u,l,c,d,p,f=1,h=e,m=h.d,g=h.constructor,y=g.rounding,b=g.precision;if(h.s<0||!m||!m[0]||!h.e&&1==m[0]&&1==m.length)return new g(m&&!m[0]?-1/0:1!=h.s?NaN:m?0:h);if(null==t?(nb=!1,c=b):c=t,g.precision=c+=10,r=(n=nM(m)).charAt(0),!(15e14>Math.abs(o=h.e)))return l=nU(g,c+2,b).times(o+""),h=nZ(new g(r+"."+n.slice(1)),c-10).plus(l),g.precision=b,null==t?nF(h,b,y,nb=!0):h;for(;r<7&&1!=r||1==r&&n.charAt(1)>3;)r=(n=nM((h=h.times(e)).d)).charAt(0),f++;for(o=h.e,r>1?(h=new g("0."+n),o++):h=new g(r+"."+n.slice(1)),d=h,u=a=h=nD(h.minus(1),h.plus(1),c,1),p=nF(h.times(h),c,1),i=3;;){if(a=nF(a.times(p),c,1),nM((l=u.plus(nD(a,new g(i),c,1))).d).slice(0,c)===nM(u.d).slice(0,c)){if(u=u.times(2),0!==o&&(u=u.plus(nU(g,c+2,b).times(o+""))),u=nD(u,new g(f),c,1),null!=t)return g.precision=b,u;if(!nL(u.d,c-10,y,s))return nF(u,g.precision=b,y,nb=!0);g.precision=c+=10,l=a=h=nD(d.minus(1),d.plus(1),c,1),p=nF(h.times(h),c,1),i=s=1}u=l,i+=2}}function nY(e){return String(e.s*e.s/0)}function nX(e,t){var n,r,i;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;48===t.charCodeAt(r);r++);for(i=t.length;48===t.charCodeAt(i-1);--i);if(t=t.slice(r,i)){if(i-=r,e.e=n=n-r-1,e.d=[],r=(n+1)%7,n<0&&(r+=7),re.constructor.maxE?(e.d=null,e.e=NaN):e.e=0&&(c=c.replace(".",""),(p=new f(1)).e=c.length-a,p.d=nN(nq(p),10,i),p.e=p.d.length),o=u=(d=nN(c,10,i)).length;0==d[--u];)d.pop();if(d[0]){if(a<0?o--:((e=new f(e)).d=d,e.e=o,d=(e=nD(e,p,n,r,0,i)).d,o=e.e,l=np),a=d[n],s=i/2,l=l||void 0!==d[n+1],l=r<4?(void 0!==a||l)&&(0===r||r===(e.s<0?3:2)):a>s||a===s&&(4===r||l||6===r&&1&d[n-1]||r===(e.s<0?8:7)),d.length=n,l)for(;++d[--n]>i-1;)d[n]=0,n||(++o,d.unshift(1));for(u=d.length;!d[u-1];--u);for(a=0,c="";a1){if(16==t||8==t){for(a=16==t?4:3,--u;u%a;u++)c+="0";for(u=(d=nN(c,i,t)).length;!d[u-1];--u);for(a=1,c="1.";au)for(o-=u;o--;)c+="0";else ot)return e.length=t,!0}function n6(e){return new this(e).abs()}function n3(e){return new this(e).acos()}function n4(e){return new this(e).acosh()}function n5(e,t){return new this(e).plus(t)}function n8(e){return new this(e).asin()}function n9(e){return new this(e).asinh()}function n7(e){return new this(e).atan()}function re(e){return new this(e).atanh()}function rt(e,t){e=new this(e),t=new this(t);var n,r=this.precision,i=this.rounding,o=r+4;return e.s&&t.s?e.d||t.d?!t.d||e.isZero()?(n=t.s<0?nz(this,r,i):new this(0)).s=e.s:!e.d||t.isZero()?(n=nz(this,o,1).times(.5)).s=e.s:t.s<0?(this.precision=o,this.rounding=1,n=this.atan(nD(e,t,o,1)),t=nz(this,o,1),this.precision=r,this.rounding=i,n=e.s<0?n.minus(t):n.plus(t)):n=this.atan(nD(e,t,o,1)):(n=nz(this,o,1).times(t.s>0?.25:.75)).s=e.s:n=new this(NaN),n}function rn(e){return new this(e).cbrt()}function rr(e){return nF(e=new this(e),e.e+1,2)}function ri(e,t,n){return new this(e).clamp(t,n)}function ro(e){if(!e||"object"!=typeof e)throw Error(n_+"Object expected");var t,n,r,i=!0===e.defaults,o=["precision",1,1e9,"rounding",0,8,"toExpNeg",-9e15,0,"toExpPos",0,9e15,"maxE",0,9e15,"minE",-9e15,0,"modulo",0,9];for(t=0;t=o[t+1]&&r<=o[t+2])this[n]=r;else throw Error(nv+n+": "+r)}if(n="crypto",i&&(this[n]=ny[n]),void 0!==(r=e[n])){if(!0===r||!1===r||0===r||1===r){if(r){if("u">typeof crypto&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[n]=!0;else throw Error(nk)}else this[n]=!1}else throw Error(nv+n+": "+r)}return this}function ra(e){return new this(e).cos()}function rs(e){return new this(e).cosh()}function ru(e,t){return new this(e).div(t)}function rl(e){return new this(e).exp()}function rc(e){return nF(e=new this(e),e.e+1,3)}function rd(){var e,t,n=new this(0);for(nb=!1,e=0;e=429e7?t[o]=crypto.getRandomValues(new Uint32Array(1))[0]:s[o++]=i%1e7;else if(crypto.randomBytes){for(t=crypto.randomBytes(r*=4);o=214e7?crypto.randomBytes(4).copy(t,o):(s.push(i%1e7),o+=4);o=r/4}else throw Error(nk)}else for(;o=10;i/=10)r++;r<7&&(n-=7-r)}return a.e=n,a.d=s,a}function rx(e){return nF(e=new this(e),e.e+1,this.rounding)}function rA(e){return(e=new this(e)).d?e.d[0]?e.s:0*e.s:e.s||NaN}function rS(e){return new this(e).sin()}function rI(e){return new this(e).sinh()}function rT(e){return new this(e).sqrt()}function rE(e,t){return new this(e).sub(t)}function rP(){var e=0,t=arguments,n=new this(t[e]);for(nb=!1;n.s&&++eo.maxE?(i.e=NaN,i.d=null):e.e=10;n/=10)t++;nb?t>o.maxE?(i.e=NaN,i.d=null):t-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),nP.test(t))return nX(e,t)}else if("Infinity"===t||"NaN"===t)return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(nT.test(t))n=16,t=t.toLowerCase();else if(nI.test(t))n=2;else if(nE.test(t))n=8;else throw Error(nv+t);for((o=t.search(/p/i))>0?(u=+t.slice(o+1),t=t.substring(2,o)):t=t.slice(2),a=(o=t.indexOf("."))>=0,r=e.constructor,a&&(o=(s=(t=t.replace(".","")).length)-o,i=n$(r,new r(n),o,2*o)),o=c=(l=nN(t,n,1e7)).length-1;0===l[o];--o)l.pop();return o<0?new r(0*e.s):(e.e=nj(l,c),e.d=l,nb=!1,a&&(e=nD(e,i,4*s)),u&&(e=e.times(54>Math.abs(u)?nS(2,u):rM.pow(2,u))),nb=!0,e)}(i,e)}if(o.prototype=nB,o.ROUND_UP=0,o.ROUND_DOWN=1,o.ROUND_CEIL=2,o.ROUND_FLOOR=3,o.ROUND_HALF_UP=4,o.ROUND_HALF_DOWN=5,o.ROUND_HALF_EVEN=6,o.ROUND_HALF_CEIL=7,o.ROUND_HALF_FLOOR=8,o.EUCLID=9,o.config=o.set=ro,o.clone=e,o.isDecimal=rp,o.abs=n6,o.acos=n3,o.acosh=n4,o.add=n5,o.asin=n8,o.asinh=n9,o.atan=n7,o.atanh=re,o.atan2=rt,o.cbrt=rn,o.ceil=rr,o.clamp=ri,o.cos=ra,o.cosh=rs,o.div=ru,o.exp=rl,o.floor=rc,o.hypot=rd,o.ln=rf,o.log=rh,o.log10=rg,o.log2=rm,o.max=ry,o.min=rb,o.mod=r_,o.mul=rv,o.pow=rw,o.random=rk,o.round=rx,o.sign=rA,o.sin=rS,o.sinh=rI,o.sqrt=rT,o.sub=rE,o.sum=rP,o.tan=rC,o.tanh=rO,o.trunc=rB,void 0===t&&(t={}),t&&!0!==t.defaults)for(i=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],n=0;n=9007199254740991||e<=-9007199254740991)&&t.logWithError(`BigNumberish number overflow: ${e}`),new(tb())(String(e))):"bigint"==typeof e?new(tb())(e.toString()):(t.error(`invalid BigNumberish value: ${e}`),new(tb())(0))}var rD=t8("module/fraction"),rF=rR(tP),rq=rR(tM()),rj={0:rq.ROUND_DOWN,1:rq.ROUND_HALF_UP,2:rq.ROUND_UP},rU={0:tP.roundDown,1:tP.roundHalfUp,2:tP.roundUp},rz=class{constructor(e,t=new(tb())(1)){this.numerator=rN(e),this.denominator=rN(t)}get quotient(){return this.numerator.div(this.denominator)}invert(){return new rz(this.denominator,this.numerator)}add(e){let t=e instanceof rz?e:new rz(rN(e));return this.denominator.eq(t.denominator)?new rz(this.numerator.add(t.numerator),this.denominator):new rz(this.numerator.mul(t.denominator).add(t.numerator.mul(this.denominator)),this.denominator.mul(t.denominator))}sub(e){let t=e instanceof rz?e:new rz(rN(e));return this.denominator.eq(t.denominator)?new rz(this.numerator.sub(t.numerator),this.denominator):new rz(this.numerator.mul(t.denominator).sub(t.numerator.mul(this.denominator)),this.denominator.mul(t.denominator))}mul(e){let t=e instanceof rz?e:new rz(rN(e));return new rz(this.numerator.mul(t.numerator),this.denominator.mul(t.denominator))}div(e){let t=e instanceof rz?e:new rz(rN(e));return new rz(this.numerator.mul(t.denominator),this.denominator.mul(t.numerator))}toSignificant(e,t={groupSeparator:""},n=1){Number.isInteger(e)||rD.logWithError(`${e} is not an integer.`),e<=0&&rD.logWithError(`${e} is not positive.`),rq.set({precision:e+1,rounding:rj[n]});let r=new rq(this.numerator.toString()).div(this.denominator.toString()).toSignificantDigits(e);return r.toFormat(r.decimalPlaces(),t)}toFixed(e,t={groupSeparator:""},n=1){return Number.isInteger(e)||rD.logWithError(`${e} is not an integer.`),e<0&&rD.logWithError(`${e} is negative.`),rF.DP=e,rF.RM=rU[n]||1,new rF(this.numerator.toString()).div(this.denominator.toString()).toFormat(e,t)}isZero(){return this.numerator.isZero()}},rV=t8("Raydium_amount"),rW=rR(tP);function r$(e,t){let n="0",r="0";if(e.includes(".")){let i=e.split(".");2===i.length?([n,r]=i,r=r.padEnd(t,"0")):rV.logWithError(`invalid number string, num: ${e}`)}else n=e;return[n,r.slice(0,t)||r]}var rK=class extends rz{constructor(e,t,n=!0,r){let i=new(tb())(0),o=ig.pow(new(tb())(e.decimals));if(n)i=rN(t);else{let n=new(tb())(0),r=new(tb())(0);if("string"==typeof t||"number"==typeof t||"bigint"==typeof t){let[i,o]=r$(t.toString(),e.decimals);n=rN(i),r=rN(o)}i=(n=n.mul(o)).add(r)}super(i,o),this.logger=t8(r||"TokenAmount"),this.token=e}get raw(){return this.numerator}isZero(){return this.raw.isZero()}gt(e){return this.token.equals(e.token)||this.logger.logWithError("gt token not equals"),this.raw.gt(e.raw)}lt(e){return this.token.equals(e.token)||this.logger.logWithError("lt token not equals"),this.raw.lt(e.raw)}add(e){return this.token.equals(e.token)||this.logger.logWithError("add token not equals"),new rK(this.token,this.raw.add(e.raw))}subtract(e){return this.token.equals(e.token)||this.logger.logWithError("sub token not equals"),new rK(this.token,this.raw.sub(e.raw))}toSignificant(e=this.token.decimals,t,n=0){return super.toSignificant(e,t,n)}toFixed(e=this.token.decimals,t,n=0){return e>this.token.decimals&&this.logger.logWithError("decimals overflow"),super.toFixed(e,t,n)}toExact(e={groupSeparator:""}){return rW.DP=this.token.decimals,new rW(this.numerator.toString()).div(this.denominator.toString()).toFormat(e)}},rH=class extends null{constructor(e,t,n=!0,r){let i=new gn(0),o=ig.pow(new gn(e.decimals));if(n)i=rN(t);else{let n=new gn(0),r=new gn(0);if("string"==typeof t||"number"==typeof t||"bigint"==typeof t){let[i,o]=r$(t.toString(),e.decimals);n=rN(i),r=rN(o)}i=(n=n.mul(o)).add(r)}super(i,o),this.logger=t8(r||"TokenAmount"),this.currency=e}get raw(){return this.numerator}isZero(){return this.raw.isZero()}gt(e){return this.currency.equals(e.currency)||this.logger.logWithError("gt currency not equals"),this.raw.gt(e.raw)}lt(e){return this.currency.equals(e.currency)||this.logger.logWithError("lt currency not equals"),this.raw.lt(e.raw)}add(e){return this.currency.equals(e.currency)||this.logger.logWithError("add currency not equals"),new rH(this.currency,this.raw.add(e.raw))}sub(e){return this.currency.equals(e.currency)||this.logger.logWithError("sub currency not equals"),new rH(this.currency,this.raw.sub(e.raw))}toSignificant(e=this.currency.decimals,t,n=0){return super.toSignificant(e,t,n)}toFixed(e=this.currency.decimals,t,n=0){return e>this.currency.decimals&&this.logger.logWithError("decimals overflow"),super.toFixed(e,t,n)}toExact(e={groupSeparator:""}){return rW.DP=this.currency.decimals,new rW(this.numerator.toString()).div(this.denominator.toString()).toFormat(e)}},rG={chainId:101,address:tu.nh.default.toBase58(),programId:td.H_.toBase58(),decimals:9,symbol:"SOL",name:"solana",logoURI:"https://img-v1.raydium.io/icon/So11111111111111111111111111111111111111112.png",tags:[],priority:2,type:"raydium",extensions:{coingeckoId:"solana"}},rZ={chainId:101,address:"So11111111111111111111111111111111111111112",programId:td.H_.toBase58(),decimals:9,symbol:"WSOL",name:"Wrapped SOL",logoURI:"https://img-v1.raydium.io/icon/So11111111111111111111111111111111111111112.png",tags:[],priority:2,type:"raydium",extensions:{coingeckoId:"solana"}};function rY({pubkey:e,isSigner:t=!1,isWritable:n=!0}){return{pubkey:e,isWritable:n,isSigner:t}}var rX=[rY({pubkey:td.H_,isWritable:!1}),rY({pubkey:tu.yc.programId,isWritable:!1}),rY({pubkey:tu.ze,isWritable:!1})];function rQ({publicKey:e,transformSol:t}){let n=rJ(e.toString());if(n instanceof tu.nh)return t&&n.equals(ie)?r7:n;if(t&&n.toString()===ie.toBase58())return r7;if("string"==typeof n){if(n===tu.nh.default.toBase58())return tu.nh.default;try{return new tu.nh(n)}catch{throw Error("invalid public key")}}throw Error("invalid public key")}function rJ(e){try{return new tu.nh(e)}catch{return e}}var r0=new tu.nh("MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"),r1=new tu.nh("MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"),r2=new tu.nh("SysvarRent111111111111111111111111111111111"),r6=new tu.nh("SysvarC1ock11111111111111111111111111111111"),r3=new tu.nh("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"),r4=(new tu.nh("Sysvar1nstructions1111111111111111111111111"),tu.yc.programId),r5=new tu.nh("4k3Dyjzvzp8eMZWUXbBCjEvwSkkk59S5iCNLY3QrkX6R"),r8=(new tu.nh("Ea5SjE2Y6yvCeW5dYTn7PYMuW5ikXkvbGdcmSnXeaLjS"),new tu.nh("SRMuApVNdxXokk5GT7XD5cUUgXMBCoAz2LHeuAoKWRt"),new tu.nh("EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v")),r9=new tu.nh("Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB"),r7=(new tu.nh("mSoLzYCxHdYgdzU16g5QSh3i5K3z3KZK7ytfqcJm7So"),new tu.nh("7dHbWXmci3dT8UFYWYZweBLXgycu7Y3iL6trKn1Y7ARj"),new tu.nh("USDH1SM1ojwWUga67PGrgFWUHibbjqMvuMaDkRJTgkX"),new tu.nh("NRVwhjBQiUPYtfDT5zRBVJajzFQHaBUNtC7SNVvqRFa"),new tu.nh("ANAxByE6G2WjFp7A4NqtWYXb3mgruyzZYg3spfxe6Lbo"),new tu.nh("7vfCXTUXx5WJV5JADk17DUJ4ksgau7utNKj4b963voxs"),new tu.nh("So11111111111111111111111111111111111111112")),ie=tu.nh.default;function it(e){return rQ({publicKey:e,transformSol:!0})}var ir=class{constructor({mint:e,decimals:t,symbol:n,name:r,skipMint:i=!1,isToken2022:o=!1}){if(e===ie.toBase58()||e instanceof tu.nh&&ie.equals(e)){this.decimals=rZ.decimals,this.symbol=rZ.symbol,this.name=rZ.name,this.mint=new tu.nh(rZ.address),this.isToken2022=!1;return}this.decimals=t,this.symbol=n||e.toString().substring(0,6),this.name=r||e.toString().substring(0,6),this.mint=i?tu.nh.default:rQ({publicKey:e}),this.isToken2022=o}equals(e){return this===e||this.mint.equals(e.mint)}},ii=ir;ii.WSOL=new ir(t1(t0({},rZ),{mint:rZ.address}));var io=class{constructor({decimals:e,symbol:t="UNKNOWN",name:n="UNKNOWN"}){this.decimals=e,this.symbol=t,this.name=n}equals(e){return this===e}};io.SOL=new io(rG);var ia=new rz(new(tb())(100)),is=class extends rz{toSignificant(e=5,t,n){return this.mul(ia).toSignificant(e,t,n)}toFixed(e=2,t,n){return this.mul(ia).toFixed(e,t,n)}},iu=t8("Raydium_price"),il=class extends rz{constructor(e){var t,n;let{baseToken:r,quoteToken:i,numerator:o,denominator:a}=e;super(o,a),this.baseToken=r,this.quoteToken=i,this.scalar=new rz((t=r.decimals,ig.pow(rN(t))),(n=i.decimals,ig.pow(rN(n))))}get raw(){return new rz(this.numerator,this.denominator)}get adjusted(){return super.mul(this.scalar)}invert(){return new il({baseToken:this.quoteToken,quoteToken:this.baseToken,denominator:this.numerator,numerator:this.denominator})}mul(e){this.quoteToken!==e.baseToken&&iu.logWithError("mul token not equals");let t=super.mul(e);return new il({baseToken:this.baseToken,quoteToken:e.quoteToken,denominator:t.denominator,numerator:t.numerator})}toSignificant(e=this.quoteToken.decimals,t,n){return this.adjusted.toSignificant(e,t,n)}toFixed(e=this.quoteToken.decimals,t,n){return this.adjusted.toFixed(e,t,n)}};function ic(e){if(e instanceof is)return new rz(e.numerator,e.denominator);if(e instanceof il)return e.adjusted;if(e instanceof rK)try{return ic(e.toExact())}catch{return new rz(ih)}if(e instanceof rz)return e;let t=function(e){var t;if(void 0===e)return{denominator:"1",numerator:"0"};if(e instanceof tb())return{numerator:e.toString(),denominator:"1"};if(e instanceof rz)return{denominator:e.denominator.toString(),numerator:e.numerator.toString()};let[,n="",r="",i=""]=null!=(t=String(e).replace(",","").match(/(-?)(\d*)\.?(\d*)/))?t:[];return{denominator:"1"+"0".repeat(i.length),numerator:n+("0"===r?"":r)+i||"0",sign:n,int:r,dec:i}}(String(e));return new rz(t.numerator,t.denominator)}function id(e,t){if(null==e||null==t)return!1;let n=ic(e),r=ic(t);return n.sub(r).numerator.eq(ih)}function ip(e){return"string"==typeof e?rJ(e):Array.isArray(e)?e.map(e=>ip(e)):"object"!=typeof e||null===e||[ii,rK,tu.nh,rz,tb(),il,is].some(t=>"object"==typeof t&&e instanceof t)?e:Object.fromEntries(Object.entries(e).map(([e,t])=>[e,ip(t)]))}var ih=new(tb())(0),im=new(tb())(1),ig=(new(tb())(2),new(tb())(3),new(tb())(5),new(tb())(10));function iy(e,t){let n=e.divmod(t);return n.mod.isZero()?n.div:n.div.isNeg()?n.div.isubn(1):n.div.iaddn(1)}function ib(e,t=1,n=[]){let r=[...e];if(t<=0)return n;for(;r.length;)n.push(r.splice(0,t));return n}new(tb())(100),new(tb())(1e3),new(tb())(1e4);var i_=class{constructor(e){this._owner=e}get publicKey(){return i_.isKeyPair(this._owner)?this._owner.publicKey:this._owner}get signer(){return i_.isKeyPair(this._owner)?this._owner:void 0}get isKeyPair(){return i_.isKeyPair(this._owner)}get isPublicKey(){return i_.isPublicKey(this._owner)}static isKeyPair(e){return void 0!==e.secretKey}static isPublicKey(e){return!i_.isKeyPair(e)}},iv=((a=iv||{})[a.V0=0]="V0",a[a.LEGACY=1]="LEGACY",a),iw={CreateAccount:"CreateAccount",InitAccount:"InitAccount",CreateATA:"CreateATA",CloseAccount:"CloseAccount",TransferAmount:"TransferAmount",InitMint:"InitMint",MintTo:"MintTo",InitMarket:"InitMarket",Util1216OwnerClaim:"Util1216OwnerClaim",SetComputeUnitPrice:"SetComputeUnitPrice",SetComputeUnitLimit:"SetComputeUnitLimit",ClmmCreatePool:"ClmmCreatePool",ClmmOpenPosition:"ClmmOpenPosition",ClmmIncreasePosition:"ClmmIncreasePosition",ClmmDecreasePosition:"ClmmDecreasePosition",ClmmClosePosition:"ClmmClosePosition",ClmmSwapBaseIn:"ClmmSwapBaseIn",ClmmSwapBaseOut:"ClmmSwapBaseOut",ClmmInitReward:"ClmmInitReward",ClmmSetReward:"ClmmSetReward",ClmmCollectReward:"ClmmCollectReward",ClmmLockPosition:"ClmmLockPosition",ClmmHarvestLockPosition:"ClmmHarvestLockPosition",AmmV4Swap:"AmmV4Swap",AmmV4AddLiquidity:"AmmV4AddLiquidity",AmmV4RemoveLiquidity:"AmmV4RemoveLiquidity",AmmV4SimulatePoolInfo:"AmmV4SimulatePoolInfo",AmmV4SwapBaseIn:"AmmV4SwapBaseIn",AmmV4SwapBaseOut:"AmmV4SwapBaseOut",AmmV4CreatePool:"AmmV4CreatePool",AmmV4InitPool:"AmmV4InitPool",AmmV5AddLiquidity:"AmmV5AddLiquidity",AmmV5RemoveLiquidity:"AmmV5RemoveLiquidity",AmmV5SimulatePoolInfo:"AmmV5SimulatePoolInfo",AmmV5SwapBaseIn:"AmmV5SwapBaseIn",AmmV5SwapBaseOut:"AmmV5SwapBaseOut",RouteSwap:"RouteSwap",RouteSwap1:"RouteSwap1",RouteSwap2:"RouteSwap2",FarmV3Deposit:"FarmV3Deposit",FarmV3Withdraw:"FarmV3Withdraw",FarmV3CreateLedger:"FarmV3CreateLedger",FarmV4Withdraw:"FarmV4Withdraw",FarmV5Deposit:"FarmV5Deposit",FarmV5Withdraw:"FarmV5Withdraw",FarmV5CreateLedger:"FarmV5CreateLedger",FarmV6Deposit:"FarmV6Deposit",FarmV6Withdraw:"FarmV6Withdraw",FarmV6Create:"FarmV6Create",FarmV6Restart:"FarmV6Restart",FarmV6CreatorAddReward:"FarmV6CreatorAddReward",FarmV6CreatorWithdraw:"FarmV6CreatorWithdraw",CpmmCreatePool:"CpmmCreatePool",CpmmAddLiquidity:"CpmmAddLiquidity",CpmmWithdrawLiquidity:"CpmmWithdrawLiquidity",CpmmSwapBaseIn:"CpmmSwapBaseIn",CpmmSwapBaseOut:"CpmmSwapBaseOut",CpmmLockLp:"CpmmLockLp",CpmmCollectLockFee:"CpmmCollectLockFee"},ik=t8("Raydium_txUtil");function ix(e){let t=[],n=[];return e.microLamports&&(t.push(tu.Lb.setComputeUnitPrice({microLamports:e.microLamports})),n.push(iw.SetComputeUnitPrice)),e.units&&(t.push(tu.Lb.setComputeUnitLimit({units:e.units})),n.push(iw.SetComputeUnitLimit)),{instructions:t,instructionTypes:n}}async function iA(e,t){var n,r;return null==(r=await (null==(n=e.getLatestBlockhash)?void 0:n.call(e,{commitment:null!=t?t:"confirmed"})))?void 0:r.blockhash}async function iS(e,t){return e.getSignatureStatuses([t]),new Promise((n,r)=>{let i=setTimeout(r,6e4);e.onSignature(t,e=>{if(clearTimeout(i),!e.err){n("");return}r(e.err.toString())},"confirmed")})}function iI(e,t){e.length<1&&ik.logWithError(`no instructions provided: ${e.toString()}`),t.length<1&&ik.logWithError(`no signers provided:, ${t.toString()}`);let n=new tu.YW;n.recentBlockhash="11111111111111111111111111111111",n.feePayer=t[0],n.add(...e);try{return tK.from(n.serialize({verifySignatures:!1})).toString("base64").length<1644}catch{return!1}}async function iT(e,t,n,r=!0){let i=new tu.nh("RaydiumSimuLateTransaction11111111111111111"),o=[],a=new tu.YW;for(let e of(a.feePayer=i,t))iI([...a.instructions,e],[i])||(o.push(a),(a=new tu.YW).feePayer=i),a.add(e);a.instructions.length>0&&o.push(a);let s=[];try{if((s=await iC(e,o,r)).find(e=>null!==e.err))throw Error("rpc simulateTransaction error")}catch(e){e instanceof Error&&ik.logWithError("failed to simulate for instructions","RPC_ERROR",{message:e.message})}let u=[];for(let e of s)if(ik.debug("simulate result:",e),e.logs){let t=e.logs.filter(e=>e&&e.includes(n));ik.debug("filteredLog:",u),t.length||ik.logWithError("simulate log not match keyword","keyword",n),u.push(...t)}return u}function iE(e,t){let n=RegExp(`"${t}":(\\d+)`,"g").exec(e);return n&&2===n.length?n[1]:ik.logWithError(`simulate log fail to match key", key: ${t}`)}function iP(e,t){let[n,r]=tu.nh.findProgramAddressSync(e,t);return{publicKey:n,nonce:r}}async function iC(e,t,n){let r=[];if(n){let n=await e.getLatestBlockhash(),i=[];for(let e of t){e.recentBlockhash=n.blockhash,e.lastValidBlockHeight=n.lastValidBlockHeight;let t=e._compile().serialize(),r=e._serialize(t).toString("base64");i.push(r)}let o=i.map(t=>({methodName:"simulateTransaction",args:e._buildArgs([t],void 0,"base64")})),a=[];for(let e=0;e(await e._rpcBatchRequest(t)).map(e=>e.result.value)))).flat()}else try{r=await Promise.all(t.map(async t=>await (await e.simulateTransaction(t)).value))}catch(e){e instanceof Error&&ik.logWithError("failed to get info for multiple accounts","RPC_ERROR",{message:e.message})}return r}function iO({instructions:e,payer:t,signers:n}){return iI(e,[t,...n])}function iB({instructions:e,payer:t,lookupTableAddressAccount:n,recentBlockhash:r=tu.RG.generate().publicKey.toString()}){let i=new tu.$Z({payerKey:t,recentBlockhash:r,instructions:e}).compileToV0Message(Object.values(null!=n?n:{}));try{return tK.from(new tu.GS(i).serialize()).toString("base64").length<1644}catch{return!1}}var iM=e=>tK.isBuffer(e)?e:e instanceof Uint8Array?tK.from(e.buffer,e.byteOffset,e.byteLength):tK.from(e),iR=e=>{let t=e.serialize({requireAllSignatures:!1,verifySignatures:!1});e instanceof tu.GS&&(t=iM(t));try{return t instanceof tK?t.toString("base64"):tK.from(t).toString("base64")}catch{return t.toString("base64")}};function iL(e){let t=[];return e.forEach(e=>{e instanceof tu.YW&&(e.recentBlockhash||(e.recentBlockhash=td.H_.toBase58()),e.feePayer||(e.feePayer=tu.RG.generate().publicKey)),t.push(iR(e))}),console.log("simulate tx string:",t),t}function iN(e,t,n){return iP([e.toBuffer(),(null!=n?n:td.H_).toBuffer(),t.toBuffer()],new tu.nh("ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"))}var iD=new tu.nh("EhhTKczWMGQt46ynNeRX1WfeagwwJd7ufHvCDjRxjo5Q"),iF=new tu.nh("CBuCnLe26faBpcBP2fktp4rp8abpcAnTWft6ZrP5Q4T"),iq=new tu.nh("9KEPoZmtHUrBbhWN1v1KWLMkkvwY6WLtAVUCPRtRjP4z"),ij=new tu.nh("FarmqiPv5eAj3j1GMdMCMUGXqPUvmquZtMy86QH6rzhG"),iU=new tu.nh("CLaimxFqjHzgTJtAGHU47NPhg6qrc5sCnpC4tBLyABQS"),iz=new tu.nh("srmqPvymJeFKQ4zGQed1GFppgkRHL9kaELCbyksJtPX"),iV=new tu.nh("9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin"),iW=new tu.nh("675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8"),i$=new tu.nh("5quBtoiQqxF9Jv6KYKctB59NT3gtJD2Y65kdnB1Uev3h"),iK=new tu.nh("CDSr3ssLcRB6XYPJwAfFt18MZvEZp4LjHcvzBVZ45duo"),iH=new tu.nh("CAMMCzo5YL8w4VFF8KVHrK22GGUsp5VTaW7grrKgrWqK"),iG=new tu.nh("LockrWmn6K5twhz3y9w1dQERbmgSaRkfnTeTKbpofwE"),iZ=new tu.nh("kN1kEznaF5Xbd8LYuqtEFcxzWSBk5Fv6ygX6SqEGJVy"),iY=new tu.nh("routeUGWgWzqBWFcrCfv8tritsqukccJPu3q5GPP3xS"),iX=new tu.nh("7YttLkHDoNj9wyDur5pM1ejNaAvT9X4eqaYcHQqtj2G5"),iQ=new tu.nh("6FJon3QE27qgPVggARueB22hLvoh22VzJpXv4rBEoSLF"),iJ=new tu.nh("CC12se5To1CdEuw7fDS27B7Geo5jJyL7t5UK2B44NgiH"),i0=new tu.nh("9HzJyW1qZsEiSfMUf6L2jo3CcTKAyBmSyKdwQeYisHrC"),i1=new tu.nh("DropEU8AvevN3UrXWXTMuz3rqnMczQVNjq3kcSdW2SQi"),i2=new tu.nh("CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C"),i6=new tu.nh("GpMZbSM2GgvTKHJirzeGfMFoaZ8UR2X7F4v8vHTvxFbL"),i3=new tu.nh("DNXgeM9EiiaAbaWvwjHj9fQQLAX5ZsfHyvmYUNRAdNC8"),i4=(new tu.nh("CPMDWBwJDtYax9qW7AyRuVC19Cc4L4Vcy4n2BHAbHkCW"),new tu.nh("7rQ1QFNosMkUCuh7Z7fPbTHvh73b68sQYdirycEzJVuw"),new tu.nh("G11FKBRaAkHAKuLCgLM6K6NUc9rTjPAznRCjZifrTQe2"),new tu.nh("LockrWmn6K5twhz3y9w1dQERbmgSaRkfnTeTKbpofwE")),i5=(new tu.nh("DLockwT7X7sxtLmGH9g5kmfcjaBtncdbUmi738m5bvQC"),new tu.nh("3f7GcQFG397GAaEnv51zR6tsTVihYRydnydDD1cXekxH")),i8=(new tu.nh("7AFUeLVRjBfzqK3tTGw8hN48KLQWSk6DTE8xprWdPqix"),{IDO_PROGRAM_ID_V1:iQ,IDO_PROGRAM_ID_V2:iJ,IDO_PROGRAM_ID_V3:i0,IDO_PROGRAM_ID_V4:i1}),i9={AMM_V4:iW,AMM_STABLE:i$,CLMM_PROGRAM_ID:iH,CLMM_LOCK_PROGRAM_ID:iG,CLMM_LOCK_AUTH_ID:iZ,FARM_PROGRAM_ID_V3:iD,FARM_PROGRAM_ID_V5:iq,FARM_PROGRAM_ID_V6:ij,OPEN_BOOK_PROGRAM:iz,SERUM_PROGRAM_ID_V3:iV,UTIL1216:iU,Router:iY,CREATE_CPMM_POOL_PROGRAM:i2,CREATE_CPMM_POOL_AUTH:i6,CREATE_CPMM_POOL_FEE_ACC:i3,LOCK_CPMM_PROGRAM:i4,LOCK_CPMM_AUTH:i5};function i7(e,t,n,r){if(void 0===t)return{amount:e,fee:void 0,expirationTime:void 0};let i=t1(t0({},t),{olderTransferFee:{epoch:BigInt(t.olderTransferFee.epoch),maximumFee:BigInt(t.olderTransferFee.maximumFee),transferFeeBasisPoints:t.olderTransferFee.transferFeeBasisPoints},newerTransferFee:{epoch:BigInt(t.newerTransferFee.epoch),maximumFee:BigInt(t.newerTransferFee.maximumFee),transferFeeBasisPoints:t.newerTransferFee.transferFeeBasisPoints}}),o=n.epoche.toString()))].map(e=>new tu.nh(e))),r={};for(let e=0;ee!==tu.nh.default.toString())),this}async versionBuild({txVersion:e,extInfo:t}){return 0===e?await this.buildV0(t0({},t||{})):this.build(t)}build(e){var t;let n=new tu.YW;return this.allInstructions.length&&n.add(...this.allInstructions),n.feePayer=this.feePayer,(null==(t=this.owner)?void 0:t.signer)&&!this.signers.some(e=>e.publicKey.equals(this.owner.publicKey))&&this.signers.push(this.owner.signer),{builder:this,transaction:n,signers:this.signers,instructionTypes:[...this.instructionTypes,...this.endInstructionTypes],execute:async e=>{var t;let{recentBlockHash:r,skipPreflight:i=!0,sendAndConfirm:o}=e||{},a=null!=r?r:await iA(this.connection,this.blockhashCommitment);if(n.recentBlockhash=a,this.signers.length&&n.sign(...this.signers),iL([n]),null!=(t=this.owner)&&t.isKeyPair)return{txId:o?await (0,tu.BV)(this.connection,n,this.signers.find(e=>e.publicKey.equals(this.owner.publicKey))?this.signers:[...this.signers,this.owner.signer],{skipPreflight:i}):await this.connection.sendRawTransaction(n.serialize(),{skipPreflight:i}),signedTx:n};if(this.signAllTransactions){let e=await this.signAllTransactions([n]);return{txId:await this.connection.sendRawTransaction(e[0].serialize(),{skipPreflight:i}),signedTx:e[0]}}throw Error("please provide owner in keypair format or signAllTransactions function")},extInfo:e||{}}}buildMultiTx(e){var t;let{extraPreBuildData:n=[],extInfo:r}=e,{transaction:i}=this.build(r),o=n.filter(e=>e.transaction.instructions.length>0),a=[i,...o.map(e=>e.transaction)],s=[this.signers,...o.map(e=>e.signers)],u=[...this.instructionTypes,...o.map(e=>e.instructionTypes).flat()];return null!=(t=this.owner)&&t.signer&&s.forEach(e=>{e.some(e=>e.publicKey.equals(this.owner.publicKey))||this.signers.push(this.owner.signer)}),{builder:this,transactions:a,signers:s,instructionTypes:u,execute:async e=>{var t;let{sequentially:n,onTxUpdate:r,skipTxCount:i=0,recentBlockHash:o,skipPreflight:u=!0}=e||{},l=null!=o?o:await iA(this.connection,this.blockhashCommitment);if(null!=(t=this.owner)&&t.isKeyPair){if(n){let e=[],t=0;for(let n of a){if(++t<=i)continue;let r=await (0,tu.BV)(this.connection,n,this.signers.find(e=>e.publicKey.equals(this.owner.publicKey))?this.signers:[...this.signers,this.owner.signer],{skipPreflight:u});e.push(r)}return{txIds:e,signedTxs:a}}return{txIds:await await Promise.all(a.map(async e=>(e.recentBlockhash=l,await this.connection.sendRawTransaction(e.serialize(),{skipPreflight:u})))),signedTxs:a}}if(this.signAllTransactions){let e=a.map((e,t)=>(e.recentBlockhash=l,s[t].length&&e.sign(...s[t]),e));iL(e);let t=await this.signAllTransactions(e);if(n){let e=0,n=[],i=async()=>{if(!t[e])return;let o=await this.connection.sendRawTransaction(t[e].serialize(),{skipPreflight:u});n.push({txId:o,status:"sent",signedTx:t[e]}),null==r||r([...n]),e++,this.connection.onSignature(o,e=>{let t=n.findIndex(e=>e.txId===o);t>-1&&(n[t].status=e.err?"error":"success"),null==r||r([...n]),e.err||i()},"processed"),this.connection.getSignatureStatus(o)};return await i(),{txIds:n.map(e=>e.txId),signedTxs:t}}{let e=[];for(let n=0;ne.publicKey.equals(this.owner.publicKey))&&this.signers.push(this.owner.signer);let f=new tu.GS(p);return f.sign(this.signers),{builder:this,transaction:f,signers:this.signers,instructionTypes:[...this.instructionTypes,...this.endInstructionTypes],execute:async e=>{var t;let{skipPreflight:n=!0,sendAndConfirm:r}=e||{};if(iL([f]),null!=(t=this.owner)&&t.isKeyPair){let e=await this.connection.sendTransaction(f,{skipPreflight:n});return r&&await iS(this.connection,e),{txId:e,signedTx:f}}if(this.signAllTransactions){let e=await this.signAllTransactions([f]);return{txId:await this.connection.sendTransaction(e[0],{skipPreflight:n}),signedTx:e[0]}}throw Error("please provide owner in keypair format or signAllTransactions function")},extInfo:s||{}}}async buildV0MultiTx(e){var t;let{extraPreBuildData:n=[],buildProps:r}=e,{transaction:i}=await this.buildV0(r),o=n.filter(e=>e.builder.instructions.length>0),a=[i,...o.map(e=>e.transaction)],s=[this.signers,...o.map(e=>e.signers)],u=[...this.instructionTypes,...o.map(e=>e.instructionTypes).flat()];return null!=(t=this.owner)&&t.signer&&s.forEach(e=>{e.some(e=>e.publicKey.equals(this.owner.publicKey))||this.signers.push(this.owner.signer)}),a.forEach(async(e,t)=>{e.sign(s[t])}),{builder:this,transactions:a,signers:s,instructionTypes:u,buildProps:r,execute:async e=>{var t;let{sequentially:n,onTxUpdate:r,recentBlockHash:i,skipPreflight:o=!0}=e||{};if(i&&a.forEach(e=>e.message.recentBlockhash=i),iL(a),null!=(t=this.owner)&&t.isKeyPair){if(n){let e=[];for(let t of a){let n=await this.connection.sendTransaction(t,{skipPreflight:o});await iS(this.connection,n),e.push(n)}return{txIds:e,signedTxs:a}}return{txIds:await Promise.all(a.map(async e=>await this.connection.sendTransaction(e,{skipPreflight:o}))),signedTxs:a}}if(this.signAllTransactions){let e=await this.signAllTransactions(a);if(n){let t=0,n=[],i=async()=>{if(!e[t])return;let a=await this.connection.sendTransaction(e[t],{skipPreflight:o});n.push({txId:a,status:"sent",signedTx:e[t]}),null==r||r([...n]),t++,this.connection.onSignature(a,e=>{let t=n.findIndex(e=>e.txId===a);t>-1&&(n[t].status=e.err?"error":"success"),null==r||r([...n]),e.err||i()},"processed"),this.connection.getSignatureStatus(a)};return i(),{txIds:[],signedTxs:e}}{let t=[];for(let n=0;nt1(t0({},e),{[t.publicKey.toBase58()]:t}),{}),u=[],l=[],c=[],d=0;if(this.allInstructions.forEach(e=>{let t=[...c,e],n=i?[...a.instructions,...t]:t,o=[...new Set(t.map(e=>e.keys.filter(e=>e.isSigner).map(e=>e.pubkey.toString())).flat()).values()].map(e=>new tu.nh(e));if(e!==r[d]&&c.length<12&&(iO({instructions:n,payer:this.feePayer,signers:o})||iO({instructions:t,payer:this.feePayer,signers:o})))c.push(e);else{if(0===c.length)throw Error("item ins too big");d+=e===r[d]?1:0,iO({instructions:i?[...a.instructions,...c]:[...c],payer:this.feePayer,signers:o})?u.push(new tu.YW().add(...a.instructions,...c)):u.push(new tu.YW().add(...c)),l.push(Array.from(new Set(c.map(e=>e.keys.filter(e=>e.isSigner).map(e=>e.pubkey.toString())).flat())).map(e=>s[e]).filter(e=>void 0!==e)),c=[e]}}),c.length>0){let e=[...new Set(c.map(e=>e.keys.filter(e=>e.isSigner).map(e=>e.pubkey.toString())).flat()).values()].map(e=>s[e]).filter(e=>void 0!==e);iO({instructions:i?[...a.instructions,...c]:[...c],payer:this.feePayer,signers:e.map(e=>e.publicKey)})?u.push(new tu.YW().add(...a.instructions,...c)):u.push(new tu.YW().add(...c)),l.push(e)}return u.forEach(e=>e.feePayer=this.feePayer),null!=(t=this.owner)&&t.signer&&l.forEach(e=>{e.some(e=>e.publicKey.equals(this.owner.publicKey))||e.push(this.owner.signer)}),{builder:this,transactions:u,signers:l,instructionTypes:this.instructionTypes,execute:async e=>{var t;let{sequentially:n,onTxUpdate:r,skipTxCount:i=0,recentBlockHash:o,skipPreflight:a=!0}=e||{},s=null!=o?o:await iA(this.connection,this.blockhashCommitment);if(u.forEach(async(e,t)=>{e.recentBlockhash=s,l[t].length&&e.sign(...l[t])}),iL(u),null!=(t=this.owner)&&t.isKeyPair){if(n){let e=0,t=[];for(let n of u){if(++e<=i){t.push("tx skipped");continue}let r=await (0,tu.BV)(this.connection,n,this.signers.find(e=>e.publicKey.equals(this.owner.publicKey))?this.signers:[...this.signers,this.owner.signer],{skipPreflight:a});t.push(r)}return{txIds:t,signedTxs:u}}return{txIds:await Promise.all(u.map(async e=>await this.connection.sendRawTransaction(e.serialize(),{skipPreflight:a}))),signedTxs:u}}if(this.signAllTransactions){let e=await this.signAllTransactions(u.slice(i,u.length)),t=[...u.slice(0,i),...e];if(n){let e=0,n=[],o=async()=>{if(!t[e])return;e{let t=n.findIndex(e=>e.txId===s);t>-1&&(n[t].status=e.err?"error":"success"),null==r||r([...n]),e.err||o()},"processed"),this.connection.getSignatureStatus(s)};return await o(),{txIds:n.map(e=>e.txId),signedTxs:t}}{let e=[];for(let n=0;nt1(t0({},e),{[t.publicKey.toBase58()]:t}),{}),h=[],m=[],g=[],y=0;if(this.allInstructions.forEach(e=>{let t=[...g,e],n=r?[...d.instructions,...t]:t;if(e!==i[y]&&g.length<12&&(iB({instructions:n,payer:this.feePayer,lookupTableAddressAccount:u})||iB({instructions:t,payer:this.feePayer,lookupTableAddressAccount:u})))g.push(e);else{if(0===g.length)throw Error("item ins too big");y+=e===i[y]?1:0;let t={};for(let e of[...new Set(l)])void 0!==u[e]&&(t[e]=u[e]);if(r&&iB({instructions:[...d.instructions,...g],payer:this.feePayer,lookupTableAddressAccount:u,recentBlockhash:p})){let e=new tu.$Z({payerKey:this.feePayer,recentBlockhash:p,instructions:[...d.instructions,...g]}).compileToV0Message(Object.values(u));h.push(new tu.GS(e))}else{let e=new tu.$Z({payerKey:this.feePayer,recentBlockhash:p,instructions:[...g]}).compileToV0Message(Object.values(u));h.push(new tu.GS(e))}m.push(Array.from(new Set(g.map(e=>e.keys.filter(e=>e.isSigner).map(e=>e.pubkey.toString())).flat())).map(e=>f[e]).filter(e=>void 0!==e)),g=[e]}}),g.length>0){let e=[...new Set(g.map(e=>e.keys.filter(e=>e.isSigner).map(e=>e.pubkey.toString())).flat()).values()].map(e=>f[e]).filter(e=>void 0!==e);if(r&&iB({instructions:[...d.instructions,...g],payer:this.feePayer,lookupTableAddressAccount:u,recentBlockhash:p})){let e=new tu.$Z({payerKey:this.feePayer,recentBlockhash:p,instructions:[...d.instructions,...g]}).compileToV0Message(Object.values(u));h.push(new tu.GS(e))}else{let e=new tu.$Z({payerKey:this.feePayer,recentBlockhash:p,instructions:[...g]}).compileToV0Message(Object.values(u));h.push(new tu.GS(e))}m.push(e)}return null!=(t=this.owner)&&t.signer&&m.forEach(e=>{e.some(e=>e.publicKey.equals(this.owner.publicKey))||e.push(this.owner.signer)}),{builder:this,transactions:h,buildProps:e,signers:m,instructionTypes:this.instructionTypes,execute:async e=>{var t;let{sequentially:n,onTxUpdate:r,skipTxCount:i=0,recentBlockHash:o,skipPreflight:a=!0}=e||{};if(h.map(async(e,t)=>{m[t].length&&e.sign(m[t]),o&&(e.message.recentBlockhash=o)}),iL(h),null!=(t=this.owner)&&t.isKeyPair){if(n){let e=0,t=[];for(let n of h){if(++e<=i){console.log("skip tx: ",e),t.push("tx skipped");continue}let r=await this.connection.sendTransaction(n,{skipPreflight:a});await iS(this.connection,r),t.push(r)}return{txIds:t,signedTxs:h}}return{txIds:await Promise.all(h.map(async e=>await this.connection.sendTransaction(e,{skipPreflight:a}))),signedTxs:h}}if(this.signAllTransactions){let e=await this.signAllTransactions(h.slice(i,h.length)),t=[...h.slice(0,i),...e];if(n){let e=0,n=[],o=async()=>{if(!t[e])return;if(e{let t=n.findIndex(e=>e.txId===s);t>-1&&(n[t].status=e.err?"error":"success"),null==r||r([...n]),e.err||o()},"processed"),this.connection.getSignatureStatus(s)};return o(),{txIds:[],signedTxs:t}}{let e=[];for(let n=0;n{window;let e=sessionStorage.getItem(ou);return e||(e=`ray-${Date.now()}`,sessionStorage.setItem(ou,e)),e},od=async e=>{var{logCount:t=1e3,removeLastLog:n}=e,r=t2(e,["logCount","removeLastLog"]);window;let i=JSON.parse(localStorage.getItem(ol)||"[]").slice(0,t-1);n&&i.pop(),new Blob([JSON.stringify(r.data)]).size>1024&&(r.data=JSON.stringify(r.data).substring(0,200)+"..."),i.unshift(t1(t0({},r),{time:Date.now(),session:oc()}));try{localStorage.setItem(ol,JSON.stringify(i))}catch{if(n){let e=!1,t=JSON.stringify(r.data).substring(0,100);for(i[0].data=t+(t.length>100?"...":"");!e;){i.pop();let t=JSON.stringify(r.data).substring(0,100);i[0].data=t+(t.length>100?"...":"");try{localStorage.setItem(ol,JSON.stringify(i)),e=!0}catch{e=!1}}return new Promise(e=>e())}return od(t1(t0({},r),{logCount:t,removeLastLog:!0}))}},op=t8("Raydium_Api"),of=new Map,oh=class{constructor({cluster:e,timeout:t,logRequests:n,logCount:r,urlConfigs:i}){this.cluster=e,this.urlConfigs=i||{},this.logCount=r||1e3,this.api=ts.create({baseURL:this.urlConfigs.BASE_HOST||os.BASE_HOST,timeout:t}),this.api.interceptors.request.use(e=>{let{method:t,baseURL:n,url:r}=e;return op.debug(`${null==t?void 0:t.toUpperCase()} ${n}${r}`),e},e=>(op.error("Request failed"),Promise.reject(e))),this.api.interceptors.response.use(e=>{let{config:t,data:r,status:i}=e,{method:o,baseURL:a,url:s}=t;return n&&od({status:i,url:`${a}${s}`,params:t.params,data:r,logCount:this.logCount}),op.debug(`${null==o?void 0:o.toUpperCase()} ${a}${s} ${i}`),r},e=>{let{config:t,response:r={}}=e,{status:i}=r,{method:o,baseURL:a,url:s}=t;return n&&od({status:i,url:`${a}${s}`,params:t.params,data:e.message,logCount:this.logCount}),op.error(`${o.toUpperCase()} ${a}${s} ${i||e.message}`),Promise.reject(e)})}async getClmmConfigs(){return(await this.api.get(this.urlConfigs.CLMM_CONFIG||os.CLMM_CONFIG)).data}async getCpmmConfigs(){return(await this.api.get(this.urlConfigs.CPMM_CONFIG||os.CPMM_CONFIG)).data}async getClmmPoolLines(e){return(await this.api.get(`${this.urlConfigs.POOL_LIQUIDITY_LINE||os.POOL_LIQUIDITY_LINE}?pool_id=${e}`)).data}async getBlockSlotCountForSecond(e){if(!e)return 2;let t=(await ts.post(e,{id:"getRecentPerformanceSamples",jsonrpc:"2.0",method:"getRecentPerformanceSamples",params:[4]})).result.map(e=>e.numSlots);return t.reduce((e,t)=>e+t,0)/t.length/60}async getChainTimeOffset(){return(await this.api.get(this.urlConfigs.CHAIN_TIME||os.CHAIN_TIME)).data}async getRpcs(){return this.api.get(this.urlConfigs.RPCS||os.RPCS)}async getTokenList(){return(await this.api.get(this.urlConfigs.TOKEN_LIST||os.TOKEN_LIST)).data}async getJupTokenList(){return this.api.get("",{baseURL:this.urlConfigs.JUP_TOKEN_LIST||os.JUP_TOKEN_LIST})}async getTokenInfo(e){return(await this.api.get((this.urlConfigs.MINT_INFO_ID||os.MINT_INFO_ID)+`?mints=${e.map(e=>e.toString()).join(",")}`)).data}async getPoolList(e={}){let{type:t="all",sort:n="liquidity",order:r="desc",page:i=0,pageSize:o=100}=e;return(await this.api.get((this.urlConfigs.POOL_LIST||os.POOL_LIST)+`?poolType=${t}&poolSortField=${n}&sortType=${r}&page=${i}&pageSize=${o}`)).data}async fetchPoolById(e){let{ids:t}=e;return(await this.api.get((this.urlConfigs.POOL_SEARCH_BY_ID||os.POOL_SEARCH_BY_ID)+`?ids=${t}`)).data}async fetchPoolKeysById(e){let{idList:t}=e,n=[],r=t.filter(e=>!of.has(e)||(n.push(of.get(e)),!1)),i=[];return r.length&&(i=(await this.api.get((this.urlConfigs.POOL_KEY_BY_ID||os.POOL_KEY_BY_ID)+`?ids=${r.join(",")}`)).data.filter(Boolean)).forEach(e=>{of.set(e.id,e)}),n.concat(i)}async fetchPoolByMints(e){let{mint1:t,mint2:n,type:r="all",sort:i="default",order:o="desc",page:a=1}=e,[s,u]=[t&&it(t).toBase58(),n&&"undefined"!==n?it(n).toBase58():""],[l,c]=u&&s>u?[u,s]:[s,u];return(await this.api.get((this.urlConfigs.POOL_SEARCH_MINT||os.POOL_SEARCH_MINT)+`?mint1=${l}&mint2=${c}&poolType=${r}&poolSortField=${i}&sortType=${o}&pageSize=100&page=${a}`)).data}async fetchFarmInfoById(e){let{ids:t}=e;return(await this.api.get((this.urlConfigs.FARM_INFO||os.FARM_INFO)+`?ids=${t}`)).data}async fetchFarmKeysById(e){let{ids:t}=e;return(await this.api.get((this.urlConfigs.FARM_KEYS||os.FARM_KEYS)+`?ids=${t}`)).data}async fetchAvailabilityStatus(){return(await this.api.get(this.urlConfigs.CHECK_AVAILABILITY||os.CHECK_AVAILABILITY)).data}async sendTxToJito(e,t){let n=t?this.urlConfigs.JITO_BUNDLE||os.JITO_BUNDLE:this.urlConfigs.JITO_TRANSACTION||os.JITO_TRANSACTION;return(await this.api.post(n,{jsonrpc:"2.0",id:1,method:t?"sendBundle":"sendTransaction",params:e},{baseURL:this.urlConfigs.JITO||os.JITO})).data}},om="please provide owner in load() initialization or you can set by calling raydium.setOwner(owner)",og=(...e)=>e.map(e=>{try{return"object"==typeof e?JSON.stringify(e):e}catch{return e}}).join(", "),oy=class{constructor({scope:e,moduleName:t}){this.disabled=!1,this.scope=e,this.logger=t8(t)}createTxBuilder(e){return this.scope.checkOwner(),new oi({connection:this.scope.connection,feePayer:e||this.scope.ownerPubKey,cluster:this.scope.cluster,owner:this.scope.owner,blockhashCommitment:this.scope.blockhashCommitment,api:this.scope.api,signAllTransactions:this.scope.signAllTransactions})}logDebug(...e){this.logger.debug(og(e))}logInfo(...e){this.logger.info(og(e))}logAndCreateError(...e){throw Error(og(e))}checkDisabled(){(this.disabled||!this.scope)&&this.logAndCreateError("module not working")}};function ob(e,...t){if(!(e instanceof Uint8Array||null!=e&&"object"==typeof e&&"Uint8Array"===e.constructor.name))throw Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw Error(`Uint8Array expected of length ${t}, not of length=${e.length}`)}function o_(e,t=!0){if(e.destroyed)throw Error("Hash instance has been destroyed");if(t&&e.finished)throw Error("Hash#digest() has already been called")}var ov=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),ow=(e,t)=>e<<32-t|e>>>t;function ok(e){return"string"==typeof e&&(e=function(e){if("string"!=typeof e)throw Error(`utf8ToBytes expected string, got ${typeof e}`);return new Uint8Array(new TextEncoder().encode(e))}(e)),ob(e),e}new Uint8Array(new Uint32Array([287454020]).buffer)[0];var ox=class{clone(){return this._cloneInto()}},oA=(e,t,n)=>e&t^~e&n,oS=(e,t,n)=>e&t^e&n^t&n,oI=class extends ox{constructor(e,t,n,r){super(),this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=r,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=ov(this.buffer)}update(e){o_(this);let{view:t,buffer:n,blockLen:r}=this,i=(e=ok(e)).length;for(let o=0;or-o&&(this.process(n,0),o=0);for(let e=o;e>i&o),s=Number(n&o);e.setUint32(t+(r?4:0),a,r),e.setUint32(t+(r?0:4),s,r)})(n,r-8,BigInt(8*this.length),i),this.process(n,0);let a=ov(e),s=this.outputLen;if(s%4)throw Error("_sha2: outputLen should be aligned to 32bit");let u=s/4,l=this.get();if(u>l.length)throw Error("_sha2: outputLen bigger than state");for(let e=0;e>>3,i=ow(n,17)^ow(n,19)^n>>>10;oP[e]=i+oP[e-7]+r+oP[e-16]|0}let{A:n,B:r,C:i,D:o,E:a,F:s,G:u,H:l}=this;for(let e=0;e<64;e++){let t=l+(ow(a,6)^ow(a,11)^ow(a,25))+oA(a,s,u)+oT[e]+oP[e]|0,c=(ow(n,2)^ow(n,13)^ow(n,22))+oS(n,r,i)|0;l=u,u=s,s=a,a=o+t|0,o=i,i=r,r=n,n=t+c|0}n=n+this.A|0,r=r+this.B|0,i=i+this.C|0,o=o+this.D|0,a=a+this.E|0,s=s+this.F|0,u=u+this.G|0,l=l+this.H|0,this.set(n,r,i,o,a,s,u,l)}roundClean(){oP.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}},oO=(l=()=>new oC,r=e=>l().update(ok(e)).digest(),i=l(),r.outputLen=i.outputLen,r.blockLen=i.blockLen,r.create=()=>l(),r),oB=tp.Ar,oM=tp.vA,oR=(tp.EJ,tp.VQ,tp.fP),oL=(tp.t6,tp._H,tp.u8),oN=tp.KB,oD=(tp.Vb,tp.Jq),oF=(tp.ut,tp.aq,tp._O),oq=(tp.Lb,tp.b7,tp.Gj,tp.qY,tp.hn,tp.$r,tp.s8,tp.Tl,tp.aQ,tp.Xo);tp._n,tp.Yt,tp.gM,tp.xP,tp.O9,tp.u,tp.IS,tp.hO,tp.LN,tp.xn,tp.WZ,tp.eh,tp.Mn;var oj=tp.A9,oU=(tp.G0,tp.K_,tp.Ik),oz=(tp.ZZ,tp.KA,tp.pc);tp.cv;var oV=class extends oB{constructor(e,t,n){super(e,n),this.blob=oU(e),this.signed=t}decode(e,t=0){let n=new(tb())(this.blob.decode(e,t),10,"le");return this.signed?n.fromTwos(8*this.span).clone():n}encode(e,t,n=0){return"number"==typeof e&&(e=new(tb())(e)),this.signed&&(e=e.toTwos(8*this.span)),this.blob.encode(e.toArrayLike(tK,"le",this.span),t,n)}},oW=class extends oB{constructor(e){super(8,e),this._lower=oz(oD(),!1),this._upper=oz(oD(),!1)}addBoolean(e){this._lower.fields.length<32?this._lower.addBoolean(e):this._upper.addBoolean(e)}decode(e,t=0){let n=this._lower.decode(e,t),r=this._upper.decode(e,t+this._lower.span);return t0(t0({},n),r)}encode(e,t,n=0){return this._lower.encode(e,t,n)+this._upper.encode(e,t,n+this._lower.span)}};function o$(e){return new oR(1,e)}function oK(e){return new oR(4,e)}function oH(e){return new oV(8,!1,e)}function oG(e){return new oV(16,!1,e)}function oZ(e){return new oV(8,!0,e)}var oY=class extends oB{constructor(e,t,n,r){super(e.span,r),this.layout=e,this.decoder=t,this.encoder=n}decode(e,t){return this.decoder(this.layout.decode(e,t))}encode(e,t,n){return this.layout.encode(this.encoder(e),t,n)}getSpan(e,t){return this.layout.getSpan(e,t)}};function oX(e){return new oY(oU(32),e=>new tu.nh(e),e=>e.toBuffer(),e)}function oQ(e){return new oY(oL(),oJ,o0,e)}function oJ(e){if(0===e)return!1;if(1===e)return!0;throw Error("Invalid bool: "+e)}function o0(e){return e?1:0}var o1=class extends oM{decode(e,t){return super.decode(e,t)}};function o2(e,t,n){return new o1(e,t,n)}function o6(e,t,n){let r;return oj(e,"number"==typeof t?t:(0,ty.isBN)(t)?t.toNumber():new Proxy(t,{get(e,t){if(!r){let t=Reflect.get(e,"count");r=(0,ty.isBN)(t)?t.toNumber():t,Reflect.set(e,"count",r)}return Reflect.get(e,t)},set:(e,t,n)=>("count"===t&&(r=n),Reflect.set(e,t,n))}),n)}var o3=o2([oX("mint"),oX("owner"),oH("amount"),oK("delegateOption"),oX("delegate"),o$("state"),oK("isNativeOption"),oH("isNative"),oH("delegatedAmount"),oK("closeAuthorityOption"),oX("closeAuthority")]);function o4({fromPublicKey:e,programId:t=td.H_,assignSeed:n}){let r,i=n?btoa(n).slice(0,32):tu.RG.generate().publicKey.toBase58().slice(0,32);return{publicKey:(r=oO(tK.concat([e.toBuffer(),tK.from(i),t.toBuffer()])),new tu.nh(r)),seed:i}}function o5(e){let{mint:t,tokenAccount:n,owner:r,programId:i=td.H_}=e;return tq(n,t,r,i)}function o8(e){let{tokenAccount:t,payer:n,multiSigners:r=[],owner:i,programId:o=td.H_}=e;return function(e,t,n,r=[],i=td.H_){let o=tj([{pubkey:e,isSigner:!1,isWritable:!0},{pubkey:t,isSigner:!1,isWritable:!0}],n,r),a=tU.alloc(tz.span);return tz.encode({instruction:nd.CloseAccount},a),new tu.Sl({keys:o,programId:i,data:a})}(t,n,i,r,o)}async function o9(e){let{connection:t,amount:n,commitment:r,payer:i,owner:o,skipCloseAccount:a}=e,s=await t.getMinimumBalanceForRentExemption(o3.span,r),u=rN(n).add(new(tb())(s)),l=o4({fromPublicKey:i,programId:td.H_});return{addresses:{newAccount:l.publicKey},signers:[],instructions:[tu.yc.createAccountWithSeed({fromPubkey:i,basePubkey:i,seed:l.seed,newAccountPubkey:l.publicKey,lamports:u.toNumber(),space:o3.span,programId:td.H_}),o5({mint:new tu.nh(rZ.address),tokenAccount:l.publicKey,owner:o,programId:td.H_})],instructionTypes:[iw.CreateAccount,iw.InitAccount],endInstructionTypes:a?[]:[iw.CloseAccount],endInstructions:a?[]:[o8({tokenAccount:l.publicKey,payer:i,owner:o})]}}t8("Raydium_Util");var o7=class extends oy{constructor(e){super(e),this._tokenAccounts=[],this._tokenAccountRawInfos=[],this._accountListener=[],this._clientOwnedToken=!1,this._notSubscribeAccountChange=!1,this._accountFetchTime=0;let{tokenAccounts:t,tokenAccountRawInfos:n,notSubscribeAccountChange:r}=e;this._tokenAccounts=t||[],this._tokenAccountRawInfos=n||[],this._notSubscribeAccountChange=null==r||r,this._clientOwnedToken=!!(t||n)}get tokenAccounts(){return this._tokenAccounts}get tokenAccountRawInfos(){return this._tokenAccountRawInfos}set notSubscribeAccountChange(e){this._notSubscribeAccountChange=e}updateTokenAccount({tokenAccounts:e,tokenAccountRawInfos:t}){return e&&(this._tokenAccounts=e),t&&(this._tokenAccountRawInfos=t),this._accountChangeListenerId&&this.scope.connection.removeAccountChangeListener(this._accountChangeListenerId),this._accountChangeListenerId=void 0,this._clientOwnedToken=!0,this}addAccountChangeListener(e){return this._accountListener.push(e),this}removeAccountChangeListener(e){return this._accountListener=this._accountListener.filter(t=>t!==e),this}getAssociatedTokenAccount(e,t){return iN(this.scope.ownerPubKey,e,t).publicKey}resetTokenAccounts(){this._clientOwnedToken||(this._tokenAccounts=[],this._tokenAccountRawInfos=[])}async fetchWalletTokenAccounts(e){if(this._clientOwnedToken||!(null!=e&&e.forceUpdate)&&this._tokenAccounts.length&&Date.now()-this._accountFetchTime<(this._notSubscribeAccountChange?5e3:18e4))return{tokenAccounts:this._tokenAccounts,tokenAccountRawInfos:this._tokenAccountRawInfos};this.scope.checkOwner();let t=t0(t0({},{}),e),[n,r,i]=await Promise.all([this.scope.connection.getAccountInfo(this.scope.ownerPubKey,t.commitment),this.scope.connection.getTokenAccountsByOwner(this.scope.ownerPubKey,{programId:td.H_},t.commitment),this.scope.connection.getTokenAccountsByOwner(this.scope.ownerPubKey,{programId:td.nA},t.commitment)]),{tokenAccounts:o,tokenAccountRawInfos:a}=function({owner:e,solAccountResp:t,tokenAccountResp:n}){let r=[],i=[];for(let{pubkey:t,account:o}of n.value){let n=o3.decode(o.data),{mint:a,amount:s}=n;r.push({publicKey:t,mint:a,amount:s,isAssociated:iN(e,a,o.owner).publicKey.equals(t),isNative:!1,programId:o.owner}),i.push({pubkey:t,accountInfo:n,programId:o.owner})}return t&&r.push({mint:tu.nh.default,amount:new(tb())(String(t.lamports)),isNative:!0,programId:t.owner}),{tokenAccounts:r,tokenAccountRawInfos:i}}({owner:this.scope.ownerPubKey,solAccountResp:n,tokenAccountResp:{context:r.context,value:[...r.value,...i.value]}});return this._tokenAccounts=o,this._tokenAccountRawInfos=a,this._accountFetchTime=Date.now(),this._notSubscribeAccountChange||(this._accountChangeListenerId&&this.scope.connection.removeAccountChangeListener(this._accountChangeListenerId),this._accountChangeListenerId=this.scope.connection.onAccountChange(this.scope.ownerPubKey,()=>{this.fetchWalletTokenAccounts({forceUpdate:!0}),this._accountListener.forEach(e=>e({tokenAccounts:this._tokenAccounts,tokenAccountRawInfos:this._tokenAccountRawInfos}))},{commitment:null==e?void 0:e.commitment})),{tokenAccounts:o,tokenAccountRawInfos:a}}clearAccountChangeCkb(){void 0!==this._accountChangeListenerId&&this.scope.connection.removeAccountChangeListener(this._accountChangeListenerId)}async getCreatedTokenAccount({mint:e,programId:t=td.H_,associatedOnly:n=!0}){await this.fetchWalletTokenAccounts();let r=this._tokenAccounts.filter(({mint:t})=>null==t?void 0:t.equals(e)).sort((e,t)=>e.amount.lt(t.amount)?1:-1),i=this.getAssociatedTokenAccount(e,t);for(let e of r){let{publicKey:t}=e;if(t&&(!n||n&&i.equals(t)))return t}}async getOrCreateTokenAccount(e){var t,n,r,i;await this.fetchWalletTokenAccounts();let{mint:o,createInfo:a,associatedOnly:s,owner:u,notUseTokenAccount:l=!1,skipCloseAccount:c=!1,checkCreateATAOwner:d=!1,assignSeed:p}=e,f=new tu.nh(e.tokenProgram||td.H_),h=this.getAssociatedTokenAccount(o,new tu.nh(f)),m=(l?[]:this.tokenAccountRawInfos).filter(e=>e.accountInfo.mint.equals(o)&&(!s||e.pubkey.equals(h))).sort((e,t)=>e.accountInfo.amount.lt(t.accountInfo.amount)?1:-1);if(void 0===a||m.length>0)return m.length>0?{account:m[0].pubkey}:{};let g={instructions:[],endInstructions:[],signers:[],instructionTypes:[],endInstructionTypes:[]};if(s){let e=tL(u,h,u,o,f);if(d){let n=await this.scope.connection.getAccountInfo(h);if(null===n)null==(t=g.instructions)||t.push(e),g.instructionTypes.push(iw.CreateATA);else if(!(n.owner.equals(f)&&tN.p0.decode(n.data).mint.equals(o)&&tN.p0.decode(n.data).owner.equals(u)))throw Error(`create ata check error -> mint: ${o.toString()}, ata: ${h.toString()}`)}else g.instructions.push(e),g.instructionTypes.push(iw.CreateATA);if(o.equals(r7)&&a.amount){let e=await o9({connection:this.scope.connection,owner:this.scope.ownerPubKey,payer:a.payer||this.scope.ownerPubKey,amount:null!=(n=a.amount)?n:0,skipCloseAccount:c});g.instructions.push(...e.instructions||[]),g.endInstructions.push(...e.endInstructions||[]),g.instructionTypes.push(...e.instructionTypes||[]),g.endInstructionTypes.push(...e.endInstructionTypes||[]),a.amount&&(g.instructions.push(function({source:e,destination:t,owner:n,amount:r,multiSigners:i=[],tokenProgram:o=td.H_}){return t$(e,t,n,BigInt(String(r)),i,o)}({source:e.addresses.newAccount,destination:h,owner:this.scope.ownerPubKey,amount:a.amount,tokenProgram:td.H_})),g.instructionTypes.push(iw.TransferAmount))}return c||(g.endInstructions.push(o8({owner:u,payer:a.payer||u,tokenAccount:h,programId:f})),g.endInstructionTypes.push(iw.CloseAccount)),{account:h,instructionParams:g}}{let e=o4({fromPublicKey:u,programId:f,assignSeed:p}),t=await this.scope.connection.getMinimumBalanceForRentExemption(tN.p0.span),n=tu.yc.createAccountWithSeed({fromPubkey:u,basePubkey:u,seed:e.seed,newAccountPubkey:e.publicKey,lamports:t+Number(null!=(i=null==(r=a.amount)?void 0:r.toString())?i:0),space:tN.p0.span,programId:f});return g.instructions.push(n,o5({mint:o,tokenAccount:e.publicKey,owner:this.scope.ownerPubKey,programId:f})),g.instructionTypes.push(iw.CreateAccount),g.instructionTypes.push(iw.InitAccount),c||(g.endInstructions.push(o8({owner:u,payer:a.payer||u,tokenAccount:e.publicKey,programId:f})),g.endInstructionTypes.push(iw.CloseAccount)),{account:e.publicKey,instructionParams:g}}}async checkOrCreateAta({mint:e,programId:t=td.H_,autoUnwrapWSOLToSOL:n}){var r;await this.fetchWalletTokenAccounts();let i=null==(r=this.scope.account.tokenAccounts.find(({mint:t})=>(null==t?void 0:t.toBase58())===e.toBase58()))?void 0:r.publicKey,o=this.scope.ownerPubKey,a={};if(!i){let n=this.getAssociatedTokenAccount(e,t),r=await tL(o,n,o,e,t);a.instructions=[r],a.instructionTypes=[iw.CreateATA],i=n}return n&&r7.toBase58()===e.toBase58()&&(a.endInstructions=[o8({owner:o,payer:o,tokenAccount:i,programId:t})],a.endInstructionTypes=[iw.CloseAccount]),{pubKey:i,newInstructions:a}}async handleTokenAccount(e){let{side:t,amount:n,mint:r,programId:i=td.H_,tokenAccount:o,payer:a=this.scope.ownerPubKey,bypassAssociatedCheck:s,skipCloseAccount:u,checkCreateATAOwner:l}=e,c=this.getAssociatedTokenAccount(r,i);if(new tu.nh(r7).equals(r)){let e=await o9({connection:this.scope.connection,owner:this.scope.ownerPubKey,payer:a,amount:n,skipCloseAccount:u});return t0({tokenAccount:e.addresses.newAccount},e)}if(!o||"out"===t&&!c.equals(o)&&!s){let e=[],t=tL(this.scope.ownerPubKey,c,this.scope.ownerPubKey,r,i);if(l){let n=await this.scope.connection.getAccountInfo(c);if(null===n)e.push(t);else if(!(n.owner.equals(td.H_)&&tN.p0.decode(n.data).mint.equals(r)&&tN.p0.decode(n.data).owner.equals(this.scope.ownerPubKey)))throw Error(`create ata check error -> mint: ${r.toString()}, ata: ${c.toString()}`)}else e.push(t);return{tokenAccount:c,instructions:e,instructionTypes:[iw.CreateATA]}}return{tokenAccount:o}}async processTokenAccount(e){let{mint:t,programId:n=td.H_,amount:r,useSOLBalance:i,handleTokenAccount:o}=e,a,s=this.createTxBuilder();if(t.equals(new tu.nh(r7))&&i){let e=await this.handleTokenAccount({side:"in",amount:r||0,mint:t,bypassAssociatedCheck:!0,programId:n}),{tokenAccount:i}=e,o=t2(e,["tokenAccount"]);a=i,s.addInstruction(o)}else if(!(a=await this.getCreatedTokenAccount({mint:t,associatedOnly:!1,programId:n}))&&o){let e=await this.scope.account.handleTokenAccount({side:"in",amount:0,mint:t,bypassAssociatedCheck:!0,programId:n}),{tokenAccount:r}=e,i=t2(e,["tokenAccount"]);a=r,s.addInstruction(i)}return t0({tokenAccount:a},s.AllTxData)}},ae=o2([o$("instruction")]),at=o2([o$("instruction")]),an=o2([oH("rewardState"),oH("rewardOpenTime"),oH("rewardEndTime"),oH("rewardLastUpdateTime"),oH("totalReward"),oH("totalRewardEmissioned"),oH("rewardClaimed"),oH("rewardPerSecond"),oG("accRewardPerShare"),oX("rewardVault"),oX("rewardMint"),oX("rewardSender"),oH("rewardType"),o6(oH(),15,"padding")]),ar=o2([oH("state"),oH("nonce"),oX("lpVault"),oX("rewardVault"),oX(),oX(),oH(),oH(),oH("totalReward"),oG("perShareReward"),oH("lastSlot"),oH("perSlotReward")]),ai=o2([oH("state"),oH("nonce"),oX("lpVault"),oX("rewardVaultA"),oH("totalRewardA"),oG("perShareRewardA"),oH("perSlotRewardA"),o$("option"),oX("rewardVaultB"),oU(7),oH("totalRewardB"),oG("perShareRewardB"),oH("perSlotRewardB"),oH("lastSlot"),oX()]),ao=o2([oH(),oH("state"),oH("nonce"),oH("validRewardTokenNum"),oG("rewardMultiplier"),oH("rewardPeriodMax"),oH("rewardPeriodMin"),oH("rewardPeriodExtend"),oX("lpMint"),oX("lpVault"),o6(an,5,"rewardInfos"),oX("creator"),oX(),o6(oH(),32,"padding")]),aa=new Proxy(ar,{get:(e,t,n)=>"decode"===t?(...t)=>{let n=e.decode(...t);return t1(t0({},n),{version:3,rewardInfos:[{rewardVault:n.rewardVault,totalReward:n.totalReward,perSlotReward:n.perSlotReward,perShareReward:n.perShareReward}]})}:Reflect.get(e,t,n)}),as=new Proxy(ai,{get:(e,t,n)=>"decode"===t?(...t)=>{let n=e.decode(...t);return t1(t0({},n),{version:5,rewardInfos:[{rewardVault:n.rewardVaultA,totalReward:n.totalRewardA,perSlotReward:n.perSlotRewardA,perShareReward:n.perShareRewardA},{rewardVault:n.rewardVaultB,totalReward:n.totalRewardB,perSlotReward:n.perSlotRewardB,perShareReward:n.perShareRewardB}]})}:Reflect.get(e,t,n)}),au=new Proxy(ao,{get:(e,t,n)=>"decode"===t?(...t)=>{let n=e.decode(...t);return t1(t0({},n),{version:6,rewardInfos:n.rewardInfos.map(e=>{var t;return t1(t0({},e),{rewardType:(null!=(t=Object.entries(aS).find(t=>String(t[1])===e.rewardType.toString()))?t:["Standard SPL"])[0]})})})}:Reflect.get(e,t,n)}),al=o2([oH("isSet"),oH("rewardPerSecond"),oH("rewardOpenTime"),oH("rewardEndTime"),oH("rewardType")]),ac=o2([o$("instruction"),oH("nonce"),o6(al,5,"rewardTimeInfo")]),ad=o2([o$("instruction"),oH("rewardReopenTime"),oH("rewardEndTime"),oH("rewardPerSecond")]),ap=o2([o$("instruction"),oH("isSet"),oH("rewardPerSecond"),oH("rewardOpenTime"),oH("rewardEndTime"),oH("rewardType")]),af=(o2([oH("state"),oX("id"),oX("owner"),oH("deposited"),o6(oH(),1,"rewardDebts")]),o2([oH("state"),oX("id"),oX("owner"),oH("deposited"),o6(oG(),1,"rewardDebts"),oH(""),oH("voteLockedBalance"),o6(oH(),15)])),ah=(o2([oH("state"),oX("id"),oX("owner"),oH("deposited"),o6(oH(),2,"rewardDebts")]),o2([oH("state"),oX("id"),oX("owner"),oH("deposited"),o6(oG(),2,"rewardDebts"),o6(oH(),17)])),am=o2([oH(),oH("state"),oX("id"),oX("owner"),oH("deposited"),o6(oG(),5,"rewardDebts"),o6(oH(),16)]),ag=o2([o$("instruction"),oH("amount")]),ay=o2([oX("mint"),oX("grantAuthority"),oH("baselineVoteWeightScaledFactor"),oH("maxExtraLockupVoteWeightScaledFactor"),oH("lockupSaturationSecs"),new oV(1,!0,"digitShift"),o6(o$(),7,"reserved1"),o6(oH(),7,"reserved2")]),ab=(o2([oU(8),oX("governanceProgramId"),oX("realm"),oX("realmGoverningTokenMint"),oX("realmAuthority"),o6(o$(),32,"reserved1"),o6(ay,4,"votingMints"),oZ("timeOffset"),o$("bump"),o6(o$(),7,"reserved2"),o6(oH(),11,"reserved3")]),o2([oZ("startTime"),oZ("endTime"),o$("kind"),o6(o$(),15,"reserved")])),a_=o2([o6(ab,1,"lockup"),oH("amountDeposited_native"),oH("amountInitiallyLockedNative"),oQ("isUsed"),oQ("allowClawback"),o$("votingMintConfigIdx"),o6(o$(),29,"reserved")]);o2([oU(8),oX("voterAuthority"),oX("registrar"),o6(a_,32,"deposits"),o$("voterBump"),o$("voterWweightRecordBump"),o6(o$(),94,"reserved")]),t8("Raydium_farm_config");var av=new tu.nh("4k3Dyjzvzp8eMZWUXbBCjEvwSkkk59S5iCNLY3QrkX6R"),aw=new tu.nh("FrspKwj8i3pNmKwXreTveC4fu7KL5ZbGeXdZBe2XViu1"),ak={3:af,5:ah,6:am},ax=e=>-1!==[3,4,5,6].indexOf(e),aA=e=>{var t;let{version:n,rewardInfos:r,rewardTokenAccountsPublicKeys:i}=e,o=`rewardInfo:${JSON.stringify(r)}, rewardAccount:${JSON.stringify(i)}`,a={3:()=>{if(1!==r.length||1!==i.length)return`rewardInfos or rewardTokenAccounts lengths not equal 1: ${o}`},5:()=>{if(r.length!==i.length)return`rewardInfos and rewardTokenAccounts lengths not equal: ${o}`},6:()=>{if(!i.length||r.length!==i.length)return`no rewardTokenAccounts or rewardInfos and rewardTokenAccounts lengths not equal: ${o}`}};return null==(t=a[n])?void 0:t.call(a)},aS={"Standard SPL":0,"Option tokens":1},aI={[iD.toString()]:3,[iF.toString()]:4,[iq.toString()]:5,[ij.toString()]:6},aT=t8("Raydium.farm.util");function aE({programId:e,poolId:t,mint:n,type:r}){let{publicKey:i}=iP([t.toBuffer(),n.toBuffer(),tK.from("lpVault"===r?"lp_vault_associated_seed":"rewardVault"===r?"reward_vault_associated_seed":"","utf-8")],e);return i}function aP({programId:e,poolId:t,owner:n,version:r}){let{publicKey:i}=iP([t.toBuffer(),n.toBuffer(),tK.from(6===r?"farmer_info_associated_seed":"staker_info_v2_associated_seed","utf-8")],e);return i}var aC=({programId:e,poolId:t})=>iP([t.toBuffer()],e);function aO(e){return rN(e.endTime).sub(rN(e.openTime)).mul(rN(e.perSecond))}function aB(e){let t=ak[e];return t||aT.logWithError("invalid version",e),t}var aM=t8("Raydium_farm_instruction");function aR(e){let{version:t,id:n,ledger:r,programId:i,owner:o}=e,a={3:9,5:10}[t];a||aM.logWithError(`invalid farm pool version: ${t}`);let s=tK.alloc(ae.span);ae.encode({instruction:a},s);let u=[rY({pubkey:n}),rY({pubkey:r}),rY({pubkey:o,isWritable:!1}),rY({pubkey:tu.yc.programId,isWritable:!1}),rY({pubkey:tu.ze,isWritable:!1})];return{instruction:new tu.Sl({programId:i,keys:u,data:s}),instructionType:iw.FarmV3CreateLedger}}function aL({payer:e,rewardVault:t,userRewardTokenPub:n,farmKeys:r,rewardInfo:i}){let o=tK.alloc(ad.span);ad.encode({instruction:3,rewardReopenTime:rN(i.openTime),rewardEndTime:rN(i.endTime),rewardPerSecond:rN(i.perSecond)},o);let a=[rY({pubkey:td.H_,isWritable:!1}),rY({pubkey:r.id}),rY({pubkey:r.lpVault,isWritable:!1}),rY({pubkey:t}),rY({pubkey:n}),rY({pubkey:e,isWritable:!1,isSigner:!0})];return new tu.Sl({programId:r.programId,keys:a,data:o})}function aN({payer:e,userRewardTokenPub:t,farmKeys:n,rewardVault:r,rewardInfo:i}){let o=tK.alloc(ap.span);ap.encode({instruction:4,isSet:new(tb())(1),rewardPerSecond:rN(i.perSecond),rewardOpenTime:rN(i.openTime),rewardEndTime:rN(i.endTime),rewardType:rN(aS[i.rewardType])},o);let a=[...rX,rY({pubkey:n.id}),rY({pubkey:n.authority,isWritable:!1}),rY({pubkey:i.mint,isWritable:!1}),rY({pubkey:r}),rY({pubkey:t}),rY({pubkey:e,isWritable:!1,isSigner:!0})];return new tu.Sl({programId:n.programId,keys:a,data:o})}function aD(e){let{farmInfo:t,farmKeys:n,lpAccount:r,rewardAccounts:i,owner:o,amount:a}=e,[s,u]=[new tu.nh(t.programId),new tu.nh(t.id)],l=aP({programId:s,poolId:u,owner:o,version:6}),c=tK.alloc(ag.span);ag.encode({instruction:2,amount:rN(a)},c);let d=[rY({pubkey:td.H_,isWritable:!1}),rY({pubkey:u}),rY({pubkey:new tu.nh(n.authority),isWritable:!1}),rY({pubkey:new tu.nh(n.lpVault)}),rY({pubkey:l}),rY({pubkey:o,isWritable:!1,isSigner:!0}),rY({pubkey:r})];for(let e=0;e=e.endTime&&this.logAndCreateError("start time error","rewardInfo.rewardOpenTime",e.openTime.toString()),isNaN(aS[e.rewardType])&&this.logAndCreateError("rewardType error",e.rewardType),0>=Number(e.perSecond)&&this.logAndCreateError("rewardPerSecond error",e.perSecond),f.push((m=e,{isSet:new(tb())(1),rewardPerSecond:rN(m.perSecond),rewardOpenTime:rN(m.openTime),rewardEndTime:rN(m.endTime),rewardType:rN(aS[m.rewardType])}));let{rewardPubKey:t,newInstruction:n}=await this._getUserRewardInfo({rewardInfo:e,payer:s});n&&a.addInstruction(n),t||this.logAndCreateError("cannot found target token accounts",this.scope.account.tokenAccounts);let r=e.mint.equals(ie)?new tu.nh(rZ.address):e.mint;h.push({rewardMint:r,rewardVault:aE({programId:o.programId,poolId:u.publicKey,mint:r,type:"rewardVault"}),userRewardToken:t})}let{account:g,instructionParams:y}=await this.scope.account.getOrCreateTokenAccount({mint:new tu.nh(o.lockInfo.lockMint),owner:this.scope.ownerPubKey,skipCloseAccount:!1,createInfo:{payer:this.scope.ownerPubKey,amount:0},associatedOnly:!1});y&&a.addInstruction(y),g||this.logAndCreateError("cannot found lock vault","tokenAccounts",this.scope.account.tokenAccounts);let{instruction:b,instructionType:_}=function(e){var t;let n=tK.alloc(ac.span);ac.encode({instruction:0,nonce:new(tb())(e.nonce),rewardTimeInfo:e.rewardInfoConfig},n);let r=[...rX,rY({pubkey:e.farmId}),rY({pubkey:e.farmAuthority,isWritable:!1}),rY({pubkey:e.lpVault}),rY({pubkey:e.lpMint,isWritable:!1}),rY({pubkey:e.lockVault}),rY({pubkey:e.lockMint,isWritable:!1}),rY({pubkey:null!=(t=e.lockUserAccount)?t:ie}),rY({pubkey:e.owner,isWritable:!1,isSigner:!0})];for(let t of e.rewardInfo)r.push(rY({pubkey:t.rewardMint,isWritable:!1}),rY({pubkey:t.rewardVault}),rY({pubkey:t.userRewardToken}));return{instruction:new tu.Sl({programId:e.programId,keys:r,data:n}),instructionType:iw.FarmV6Create}}({farmId:u.publicKey,owner:this.scope.ownerPubKey,farmAuthority:c,lpVault:p,lpMint:o.lpMint,lockVault:o.lockInfo.lockVault,lockMint:o.lockInfo.lockMint,lockUserAccount:g,programId:o.programId,rewardInfo:h,rewardInfoConfig:f,nonce:d});return a.addInstruction({instructions:[b],instructionTypes:[_]}).versionBuild({txVersion:i,extInfo:{farmId:u.publicKey,farmAuthority:c,lpVault:p,lockUserAccount:g,nonce:d}})}async restartReward({farmInfo:e,payer:t,newRewardInfo:n,txVersion:r}){var i;let o=aI[e.programId];6!==o&&this.logAndCreateError("invalid farm version ",o);let a=ip((await this.scope.api.fetchFarmKeysById({ids:e.id}))[0]),s={id:a.id,rewardInfos:e.rewardInfos,lpVault:a.lpVault,programId:a.programId};n.openTime>=n.endTime&&this.logAndCreateError("start time error","newRewardInfo",n);let u=t||this.scope.ownerPubKey,l=n.mint.equals(ie)?new tu.nh(rZ.address):n.mint,c=s.rewardInfos.findIndex(e=>new tu.nh(e.mint.address).equals(l)),d=a.rewardInfos[c];d||this.logAndCreateError("configuration does not exist","rewardMint",l);let p=null!=(i=d.vault)?i:ie,f=this.createTxBuilder(),{rewardPubKey:h,newInstruction:m}=await this._getUserRewardInfo({rewardInfo:n,payer:u});return m&&f.addInstruction(m),h||this.logAndCreateError("cannot found target token accounts",this.scope.account.tokenAccounts),f.addInstruction({instructions:[aL({payer:this.scope.ownerPubKey,rewardVault:p,userRewardTokenPub:h,farmKeys:s,rewardInfo:n})],instructionTypes:[iw.FarmV6Restart]}).versionBuild({txVersion:r})}async restartRewards({farmInfo:e,payer:t,newRewardInfos:n,txVersion:r}){var i;let o=aI[e.programId];6!==o&&this.logAndCreateError("invalid farm version ",o);let a=ip((await this.scope.api.fetchFarmKeysById({ids:e.id}))[0]),s={id:a.id,rewardInfos:e.rewardInfos,lpVault:a.lpVault,programId:a.programId};n.forEach(e=>{e.openTime>=e.endTime&&this.logAndCreateError("start time error","newRewardInfo",e)});let u=t||this.scope.ownerPubKey,l=this.createTxBuilder();for(let e of n){let t=e.mint.equals(ie)?new tu.nh(rZ.address):e.mint,n=s.rewardInfos.findIndex(e=>new tu.nh(e.mint.address).equals(t)),r=a.rewardInfos[n];r||this.logAndCreateError("configuration does not exist","rewardMint",t);let o=null!=(i=r.vault)?i:ie,{rewardPubKey:c,newInstruction:d}=await this._getUserRewardInfo({rewardInfo:e,payer:u});d&&l.addInstruction(d),c||this.logAndCreateError("cannot found target token accounts",this.scope.account.tokenAccounts);let p=aL({payer:this.scope.ownerPubKey,rewardVault:o,userRewardTokenPub:c,farmKeys:s,rewardInfo:e});l.addInstruction({instructions:[p],instructionTypes:[iw.FarmV6Restart]})}return l.versionBuild({txVersion:r})}async addNewRewardToken(e){let{txVersion:t,farmInfo:n,newRewardInfo:r,payer:i}=e,o=aI[n.programId];6!==o&&this.logAndCreateError("invalid farm version ",o);let a=ip((await this.scope.api.fetchFarmKeysById({ids:n.id}))[0]),s=null!=i?i:this.scope.ownerPubKey,u=this.createTxBuilder(),l=r.mint.equals(ie)?new tu.nh(rZ.address):r.mint,c=aE({programId:new tu.nh(n.programId),poolId:new tu.nh(n.id),mint:l,type:"rewardVault"}),{rewardPubKey:d,newInstruction:p}=await this._getUserRewardInfo({rewardInfo:r,payer:s});return p&&u.addInstruction(p),d||this.logAndCreateError("annot found target token accounts",this.scope.account.tokenAccounts),r.mint=l,u.addInstruction({instructions:[aN({payer:this.scope.ownerPubKey,userRewardTokenPub:d,farmKeys:a,rewardVault:c,rewardInfo:r})],instructionTypes:[iw.FarmV6CreatorAddReward]}).versionBuild({txVersion:t})}async addNewRewardsToken(e){let{txVersion:t,farmInfo:n,newRewardInfos:r,payer:i}=e,o=aI[n.programId];6!==o&&this.logAndCreateError("invalid farm version ",o);let a=ip((await this.scope.api.fetchFarmKeysById({ids:n.id}))[0]),s=null!=i?i:this.scope.ownerPubKey,u=this.createTxBuilder();for(let e of r){let t=e.mint.equals(ie)?new tu.nh(rZ.address):e.mint,r=aE({programId:new tu.nh(n.programId),poolId:new tu.nh(n.id),mint:t,type:"rewardVault"}),{rewardPubKey:i,newInstruction:o}=await this._getUserRewardInfo({rewardInfo:e,payer:s});o&&u.addInstruction(o),i||this.logAndCreateError("cannot found target token accounts",this.scope.account.tokenAccounts);let l=aN({payer:this.scope.ownerPubKey,userRewardTokenPub:i,farmKeys:a,rewardVault:r,rewardInfo:t1(t0({},e),{mint:t})});u.addInstruction({instructions:[l],instructionTypes:[iw.FarmV6CreatorAddReward]})}return u.versionBuild({txVersion:t})}async deposit(e){let{txVersion:t,farmInfo:n,amount:r,feePayer:i,useSOLBalance:o,associatedOnly:a=!0,checkCreateATAOwner:s=!1,userAuxiliaryLedgers:u,computeBudgetConfig:l}=e;!1===this.scope.availability.addFarm&&this.logAndCreateError("farm deposit feature disabled in your region");let{rewardInfos:c,programId:d}=n,p=aI[d];4===p&&this.logAndCreateError("V4 has suspended deposits:",n.programId),ax(p)||this.logAndCreateError("invalid farm program:",n.programId);let[f,h]=[new tu.nh(n.programId),new tu.nh(n.id)],m=(await this.scope.api.fetchFarmKeysById({ids:n.id}))[0],g=aP({programId:f,poolId:h,owner:this.scope.ownerPubKey,version:p}),y=this.createTxBuilder();y.addCustomComputeBudget(l);let b={};for(let e of this.scope.account.tokenAccounts)if(a){let t=iN(this.scope.ownerPubKey,e.mint,e.programId).publicKey;e.publicKey&&t.equals(e.publicKey)&&(b[e.mint.toString()]=e.publicKey)}else b[e.mint.toString()]=e.publicKey;let _=b[m.lpMint.address];_||this.logAndCreateError("you don't have any lp","lp zero",b);let v=[];for(let e of c){let t=o&&e.mint.address===r7.toString(),n=b[e.mint.address];if(!n){let{account:r,instructionParams:o}=await this.scope.account.getOrCreateTokenAccount({tokenProgram:e.mint.programId,mint:new tu.nh(e.mint.address),notUseTokenAccount:t,createInfo:{payer:i||this.scope.ownerPubKey,amount:0},owner:this.scope.ownerPubKey,skipCloseAccount:!t,associatedOnly:!t&&a,checkCreateATAOwner:s});n=r,o&&y.addInstruction(o)}b[e.mint.address]=n,v.push(n)}let w,k=await this.scope.connection.getAccountInfo(g);if(k&&(w=aB(p).decode(k.data)),n.programId!==ij.toString()&&!w){let{instruction:e,instructionType:t}=aR({id:h,programId:f,version:p,ledger:g,owner:this.scope.ownerPubKey});y.addInstruction({instructions:[e],instructionTypes:[t]})}let x=aA({version:p,rewardInfos:c,rewardTokenAccountsPublicKeys:v});x&&this.logAndCreateError(x);let A={amount:rN(r),owner:this.scope.ownerPubKey,farmInfo:n,farmKeys:m,lpAccount:_,rewardAccounts:v,userAuxiliaryLedgers:null==u?void 0:u.map(e=>new tu.nh(e))},S=6===p?function(e){let{farmInfo:t,farmKeys:n,lpAccount:r,rewardAccounts:i,owner:o,amount:a}=e,[s,u]=[new tu.nh(t.programId),new tu.nh(t.id)],l=aP({programId:s,poolId:u,owner:o,version:6}),c=tK.alloc(ag.span);ag.encode({instruction:1,amount:rN(a)},c);let d=[rY({pubkey:td.H_,isWritable:!1}),rY({pubkey:tu.yc.programId,isWritable:!1}),rY({pubkey:u}),rY({pubkey:new tu.nh(n.authority),isWritable:!1}),rY({pubkey:new tu.nh(n.lpVault)}),rY({pubkey:l}),rY({pubkey:o,isWritable:!1,isSigner:!0}),rY({pubkey:r})];for(let e=0;enew tu.nh(e))},k=6===p?aD(w):5===p?aF(w):4===p?function(e){let{farmInfo:t,farmKeys:n,lpAccount:r,rewardAccounts:i,owner:o,amount:a,userAuxiliaryLedgers:s}=e,[u,l]=[new tu.nh(t.programId),new tu.nh(t.id)],c=o2([o$("instruction"),oH("amount")]),d=[rY({pubkey:l}),rY({pubkey:new tu.nh(n.authority),isWritable:!1}),rY({pubkey:s[0]}),rY({pubkey:o,isSigner:!0,isWritable:!1}),rY({pubkey:r}),rY({pubkey:new tu.nh(n.lpVault)}),rY({pubkey:i[0]}),rY({pubkey:new tu.nh(n.rewardInfos[0].vault)}),rY({pubkey:tu.Am,isWritable:!1}),rY({pubkey:td.H_,isWritable:!1}),rY({pubkey:i[1]}),rY({pubkey:new tu.nh(n.rewardInfos[1].vault)})],p=tK.alloc(c.span);return c.encode({instruction:2,amount:a},p),new tu.Sl({keys:d,programId:u,data:p})}(w):aq(w),x={3:iw.FarmV3Withdraw,4:iw.FarmV4Withdraw,5:iw.FarmV5Withdraw,6:iw.FarmV6Withdraw};return h.addInstruction({instructions:[k],instructionTypes:[x[p]]}).versionBuild({txVersion:t})}async withdrawFarmReward({farmInfo:e,withdrawMint:t,txVersion:n,computeBudgetConfig:r}){var i,o;let a,s;this.scope.checkOwner();let u=ip((await this.scope.api.fetchFarmKeysById({ids:e.id}))[0]),l=aI[e.programId];6!==l&&this.logAndCreateError("invalid farm version",l);let c=u.rewardInfos.find(e=>it(e.mint.address).equals(it(t)));c||this.logAndCreateError("withdraw mint error","rewardInfos",e);let d=null!=(i=null==c?void 0:c.vault)?i:ie,p=this.createTxBuilder(),f;if(t.equals(ie)||t.equals(tu.nh.default)){let e=await o9({connection:this.scope.connection,owner:this.scope.ownerPubKey,payer:this.scope.ownerPubKey,amount:aO(t1(t0({},c),{openTime:c.openTime,endTime:c.endTime,perSecond:new rM(c.perSecond).mul(10**c.mint.decimals).toString()}))});f=e.addresses.newAccount,p.addInstruction(e)}else{let e=await this.scope.account.getCreatedTokenAccount({mint:t});null===e?(f=await this.scope.account.getAssociatedTokenAccount(t),p.addInstruction({instructions:[tL(this.scope.ownerPubKey,f,this.scope.ownerPubKey,t)],instructionTypes:[iw.CreateATA]})):f=e}let{instruction:h,instructionType:m}=(o={programId:u.programId,id:u.id,authority:u.authority,lpVault:u.lpVault,rewardVault:d,userRewardToken:f,owner:this.scope.ownerPubKey},a=tK.alloc(at.span),at.encode({instruction:5},a),s=[rY({pubkey:td.H_,isWritable:!1}),rY({pubkey:o.id}),rY({pubkey:o.authority,isWritable:!1}),rY({pubkey:o.lpVault,isWritable:!1}),rY({pubkey:o.rewardVault}),rY({pubkey:o.userRewardToken}),rY({pubkey:o.owner,isWritable:!1,isSigner:!0})],{instruction:new tu.Sl({programId:o.programId,keys:s,data:a}),instructionType:iw.FarmV6CreatorWithdraw});return p.addCustomComputeBudget(r),p.addInstruction({instructions:[h],instructionTypes:[m]}).versionBuild({txVersion:n})}async harvestAllRewards(e){let{farmInfoList:t,useSOLBalance:n,feePayer:r,associatedOnly:i=!0,checkCreateATAOwner:o=!1,userAuxiliaryLedgers:a,txVersion:s,computeBudgetConfig:u}=e,l=this.createTxBuilder(),c={};for(let e of this.scope.account.tokenAccounts)if(i){let t=iN(this.scope.ownerPubKey,e.mint).publicKey;e.publicKey&&t.equals(e.publicKey)&&(c[e.mint.toString()]=e.publicKey)}else c[e.mint.toString()]=e.publicKey;let d=(await this.scope.api.fetchFarmKeysById({ids:Object.values(t).map(e=>e.id).join(",")})).reduce((e,t)=>t1(t0({},e),{[t.id]:t}),{});for(let e of Object.values(t)){let{programId:t,lpMint:s,rewardInfos:u,id:p}=e,f=aI[t],h=s.address,m=n&&h===r7.toString(),g=c[h];if(!g){let{account:e,instructionParams:t}=await this.scope.account.getOrCreateTokenAccount({tokenProgram:s.programId,mint:new tu.nh(h),notUseTokenAccount:m,createInfo:{payer:r||this.scope.ownerPubKey,amount:0},owner:this.scope.ownerPubKey,skipCloseAccount:!0,associatedOnly:!m&&i,checkCreateATAOwner:o});g=e,t&&l.addInstruction(t)}c[h.toString()]=g;let y=[];for(let e of u){let t=n&&e.mint.address===r7.toString(),a=c[e.mint.address];if(!a){let{account:n,instructionParams:s}=await this.scope.account.getOrCreateTokenAccount({tokenProgram:e.mint.programId,mint:new tu.nh(e.mint.address),notUseTokenAccount:t,createInfo:{payer:r||this.scope.ownerPubKey,amount:0},owner:this.scope.ownerPubKey,skipCloseAccount:!t,associatedOnly:!t&&i,checkCreateATAOwner:o});a=n,s&&l.addInstruction(s)}c[e.mint.address]=a,y.push(a)}let b=d[p],_={amount:ih,owner:this.scope.ownerPubKey,farmInfo:e,farmKeys:b,lpAccount:g,rewardAccounts:y,userAuxiliaryLedgers:null==a?void 0:a.map(e=>new tu.nh(e))},v=6===f?aD(_):5===f?aF(_):aq(_),w={3:iw.FarmV3Withdraw,5:iw.FarmV5Withdraw,6:iw.FarmV6Withdraw};l.addInstruction({instructions:[v],instructionTypes:[w[f]]})}return 1===s?l.sizeCheckBuild({computeBudgetConfig:u}):l.sizeCheckBuildV0({computeBudgetConfig:u})}},aU=new(tb())(0),az=new(tb())(1),aV=new(tb())(-1),aW=new(tb())(1).shln(64),a$=new(tb())(1).shln(128),aK=aW.sub(az),aH=a$.subn(1),aG=new(tb())("4295048016"),aZ=new(tb())("79226673521066979257578248091"),aY=new(tb())("4295048017"),aX=new(tb())("79226673521066979257578248090"),aQ=new(tb())(10).pow(new(tb())(6)),aJ=((c=aJ||{})[c.rate_500=500]="rate_500",c[c.rate_3000=3e3]="rate_3000",c[c.rate_10000=1e4]="rate_10000",c),a0={tvl:0,volumeQuote:0,mintAmountA:0,mintAmountB:0,rewardDefaultInfos:[],farmUpcomingCount:0,farmOngoingCount:0,farmFinishedCount:0,day:{volume:0,volumeQuote:0,volumeFee:0,apr:0,feeApr:0,priceMin:0,priceMax:0,rewardApr:[0]},week:{volume:0,volumeQuote:0,volumeFee:0,apr:0,feeApr:0,priceMin:0,priceMax:0,rewardApr:[0]},month:{volume:0,volumeQuote:0,volumeFee:0,apr:0,feeApr:0,priceMin:0,priceMax:0,rewardApr:[0]},pooltype:[]};function a1(e){let t=new ArrayBuffer(4);return new DataView(t).setInt32(0,e,!1),new Uint8Array(t)}function a2(e,t){let n=0;for(let r=e-1;r>=0&&!t.testn(r);r--)n++;return n}function a6(e,t){let n=0;for(let r=0;r=t.tick?(r=t.feeGrowthOutsideX64A,i=t.feeGrowthOutsideX64B):(r=e.feeGrowthGlobalX64A.sub(t.feeGrowthOutsideX64A),i=e.feeGrowthGlobalX64B.sub(t.feeGrowthOutsideX64B));let o=new(tb())(0),a=new(tb())(0);return e.tickCurrentnull!==e?sN.decode(e.data):null),d={};for(let e=0;e0?{isExist:!0,nextStartIndex:a[0]}:{isExist:!1,nextStartIndex:0}}static firstInitializedTickInOneArray(e,t,n,r){let i;if(r){let e=sS-1;for(;e>=0;){let t=n.ticks[e];if(t.liquidityGross.gtn(0)){i=t;break}e-=1}}else{let e=0;for(;e=0;){let e=l.ticks[u];if(e.liquidityGross.gtn(0)){a=e;break}u-=1}else for(u+=1;u443636)&&e==sT.getTickArrayStartIndexByTick(-443636,t):e%this.tickCount(t)==0}static tickCount(e){return sS*e}},sh=class{static maxTickInTickarrayBitmap(e){return e*sS*sI}static getBitmapTickBoundary(e,t){let n=this.maxTickInTickarrayBitmap(t),r=Math.floor(Math.abs(e)/n);e<0&&Math.abs(e)%n!=0&&(r+=1);let i=n*r;return e<0?{minValue:-i,maxValue:-i+n}:{minValue:i,maxValue:i+n}}static nextInitializedTickArrayStartIndex(e,t,n,r){var i,o;if(!sf.checkIsValidStartIndex(t,n))throw Error("nextInitializedTickArrayStartIndex check error");let a=this.maxTickInTickarrayBitmap(n),s=r?t-sf.tickCount(n):t+sf.tickCount(n);if(s<-a||s>=a)return{isInit:!1,tickIndex:t};let u=n*sS,l=s/u+512;s<0&&s%u!=0&&l--;let c=Math.abs(l);if(r){let t=a3(1024,i=e.shln(1024-c-1))?null:a2(1024,i);return null!==t?{isInit:!0,tickIndex:(c-t-512)*u}:{isInit:!1,tickIndex:-a}}{let t=a3(1024,o=e.shrn(c))?null:a6(1024,o);return null!==t?{isInit:!0,tickIndex:(c+t-512)*u}:{isInit:!1,tickIndex:a-sf.tickCount(n)}}}},sm=class{static getBitmapOffset(e,t){if(!sf.checkIsValidStartIndex(e,t))throw Error("No enough initialized tickArray");this.checkExtensionBoundary(e,t);let n=sh.maxTickInTickarrayBitmap(t),r=Math.floor(Math.abs(e)/n)-1;return e<0&&Math.abs(e)%n==0&&r--,r}static getBitmap(e,t,n){let r=this.getBitmapOffset(e,t);return e<0?{offset:r,tickarrayBitmap:n.negativeTickArrayBitmap[r]}:{offset:r,tickarrayBitmap:n.positiveTickArrayBitmap[r]}}static checkExtensionBoundary(e,t){let{positiveTickBoundary:n,negativeTickBoundary:r}=this.extensionTickBoundary(t);if(e>=r&&e InvalidTickArrayBoundary")}static extensionTickBoundary(e){let t=sh.maxTickInTickarrayBitmap(e),n=-t;if(443636<=t)throw Error(`extensionTickBoundary check error: 443636, ${t}`);if(n<=-443636)throw Error(`extensionTickBoundary check error: ${n}, -443636`);return{positiveTickBoundary:t,negativeTickBoundary:n}}static checkTickArrayIsInit(e,t,n){let{tickarrayBitmap:r}=this.getBitmap(e,t,n),i=this.tickArrayOffsetInBitmap(e,t);return{isInitialized:sT.mergeTickArrayBitmap(r).testn(i),startIndex:e}}static nextInitializedTickArrayFromOneBitmap(e,t,n,r){let i=sf.tickCount(t),o=n?e-i:e+i,{tickarrayBitmap:a}=this.getBitmap(o,t,r);return this.nextInitializedTickArrayInBitmap(a,o,t,n)}static nextInitializedTickArrayInBitmap(e,t,n,r){let{minValue:i,maxValue:o}=sh.getBitmapTickBoundary(t,n),a=this.tickArrayOffsetInBitmap(t,n);if(r){let r=sT.mergeTickArrayBitmap(e).shln(sI-1-a),o=a3(512,r)?null:a2(512,r);return null!==o?{isInit:!0,tickIndex:t-o*sf.tickCount(n)}:{isInit:!1,tickIndex:i}}{let r=sT.mergeTickArrayBitmap(e).shrn(a),i=a3(512,r)?null:a6(512,r);return null!==i?{isInit:!0,tickIndex:t+i*sf.tickCount(n)}:{isInit:!1,tickIndex:o-sf.tickCount(n)}}}static tickArrayOffsetInBitmap(e,t){let n=Math.abs(e)%sh.maxTickInTickarrayBitmap(t),r=Math.floor(n/sf.tickCount(t));return e<0&&0!=n&&(r=sI-r),r}},sg=class{static getOutputAmountAndRemainAccounts(e,t,n,r,i,o=!1){let a=n.toBase58()===e.mintA.address,s=[],{isExist:u,startIndex:l,nextAccountMeta:c}=this.getFirstInitializedTickArray(e,a);if(!u||void 0===l||!c)throw Error("Invalid tick array");s.push(c);let{allTrade:d,amountCalculated:p,accounts:f,sqrtPriceX64:h,feeAmount:m}=sA.swapCompute(e.programId,e.id,t,e.tickArrayBitmap,e.exBitmapInfo,a,e.ammConfig.tradeFeeRate,e.liquidity,e.tickCurrent,e.tickSpacing,e.sqrtPriceX64,r,l,i,o);return s.push(...f),{allTrade:d,expectedAmountOut:p.mul(aV),remainingAccounts:s,executionPrice:h,feeAmount:m}}static getInputAmountAndRemainAccounts(e,t,n,r,i){let o=n.toBase58()===e.mintB.address,a=[],{isExist:s,startIndex:u,nextAccountMeta:l}=this.getFirstInitializedTickArray(e,o);if(!s||void 0===u||!l)throw Error("Invalid tick array");try{let t=this.preInitializedTickArrayStartIndex(e,o);if(t.isExist){let{publicKey:n}=si(e.programId,e.id,t.nextStartIndex);a.push(n)}}catch{}a.push(l);let{amountCalculated:c,accounts:d,sqrtPriceX64:p,feeAmount:f}=sA.swapCompute(e.programId,e.id,t,e.tickArrayBitmap,e.exBitmapInfo,o,e.ammConfig.tradeFeeRate,e.liquidity,e.tickCurrent,e.tickSpacing,e.sqrtPriceX64,r.mul(aV),u,i);return a.push(...d),{expectedAmountIn:c,remainingAccounts:a,executionPrice:p,feeAmount:f}}static getFirstInitializedTickArray(e,t){let{isInitialized:n,startIndex:r}=sg.isOverflowDefaultTickarrayBitmap(e.tickSpacing,[e.tickCurrent])?sm.checkTickArrayIsInit(sf.getArrayStartIndex(e.tickCurrent,e.tickSpacing),e.tickSpacing,e.exBitmapInfo):sT.checkTickArrayIsInitialized(sT.mergeTickArrayBitmap(e.tickArrayBitmap),e.tickCurrent,e.tickSpacing);if(n){let{publicKey:t}=si(e.programId,e.id,r);return{isExist:!0,startIndex:r,nextAccountMeta:t}}let{isExist:i,nextStartIndex:o}=this.nextInitializedTickArrayStartIndex(e,sf.getArrayStartIndex(e.tickCurrent,e.tickSpacing),t);if(i){let{publicKey:t}=si(e.programId,e.id,o);return{isExist:!0,startIndex:o,nextAccountMeta:t}}return{isExist:!1,nextAccountMeta:void 0,startIndex:void 0}}static preInitializedTickArrayStartIndex(e,t){let n=Math.floor(e.tickCurrent/sf.tickCount(e.tickSpacing)),r=t?sT.searchHightBitFromStart(e.tickArrayBitmap,e.exBitmapInfo,n+1,1,e.tickSpacing):sT.searchLowBitFromStart(e.tickArrayBitmap,e.exBitmapInfo,n-1,1,e.tickSpacing);return r.length>0?{isExist:!0,nextStartIndex:r[0]}:{isExist:!1,nextStartIndex:0}}static nextInitializedTickArrayStartIndex(e,t,n){for(t=sf.getArrayStartIndex(e.tickCurrent,e.tickSpacing);;){let{isInit:r,tickIndex:i}=sh.nextInitializedTickArrayStartIndex(sT.mergeTickArrayBitmap(e.tickArrayBitmap),t,e.tickSpacing,n);if(r)return{isExist:!0,nextStartIndex:i};t=i;let{isInit:o,tickIndex:a}=sm.nextInitializedTickArrayFromOneBitmap(t,e.tickSpacing,n,e.exBitmapInfo);if(o)return{isExist:!0,nextStartIndex:a};if((t=a)<-443636||t>443636)return{isExist:!1,nextStartIndex:0}}}static async updatePoolRewardInfos({connection:e,apiPoolInfo:t,chainTime:n,poolLiquidity:r,rewardInfos:i}){var o,a,s;let u=[];for(let l=0;l=n||t443636&&(t=sf.getArrayStartIndex(443636,e)+sf.tickCount(e)),n<-443636&&(n=sf.getArrayStartIndex(-443636,e)),{maxTickBoundary:t,minTickBoundary:n}}static get_tick_array_offset(e,t){if(!sf.checkIsValidStartIndex(e,t))throw Error("No enough initialized tickArray");return e/sf.tickCount(t)*sI}static async fetchExBitmaps({connection:e,exBitmapAddress:t,batchRequest:n}){let r=await ne(e,t.map(e=>({pubkey:e})),{batchRequest:n}),i={};for(let e of r)null!==e.accountInfo&&(i[e.pubkey.toString()]=sF.decode(e.accountInfo.data));return i}static async fetchMultiplePoolTickArrays({connection:e,poolKeys:t,batchRequest:n}){let r={},i=[];for(let e of t){let t=sT.getTickArrayStartIndexByTick(e.tickCurrent,e.tickSpacing);for(let n of sT.getInitializedTickArrayInRange(e.tickArrayBitmap,e.exBitmapInfo,e.tickSpacing,t,7)){let{publicKey:t}=si(e.programId,e.id,n);i.push({pubkey:t}),r[t.toString()]=e.id}}let o=await ne(e,i,{batchRequest:n}),a={};for(let e of o){if(!e.accountInfo)continue;let t=r[e.pubkey.toString()];if(!t)continue;void 0===a[t.toString()]&&(a[t.toString()]={});let n=sN.decode(e.accountInfo.data);a[t.toString()][n.startTickIndex]=t1(t0({},n),{address:e.pubkey})}return a}static async fetchPoolsAccountPosition({pools:e,connection:t,ownerInfo:n,batchRequest:r=!1,updateOwnerRewardAndFee:i=!0}){var o;let a=[];for(let t=0;te.equals(n.state.programId))||a.push(n.state.programId))}if(n){let s=n.tokenAccounts.map(e=>e.accountInfo.mint),u=[];for(let e of s)for(let t of a)u.push(sa(t,e).publicKey);let l=await t7(t,u,{batchRequest:r}),c={};for(let t of l){if(null===t)continue;let n=sR.decode(t.data),r=n.poolId.toString(),i=e.find(e=>e.state.id.toBase58()===r);if(void 0===i)continue;let a=i.state,s=sT._getTickPriceLegacy({poolInfo:a,tick:n.tickLower,baseIn:!0}),u=sT._getTickPriceLegacy({poolInfo:a,tick:n.tickUpper,baseIn:!0}),{amountA:l,amountB:d}=sx.getAmountsFromLiquidity(a.sqrtPriceX64,s.tickSqrtPriceX64,u.tickSqrtPriceX64,n.liquidity,!1),p=1/(1-Math.sqrt(Math.sqrt(s.price.div(u.price).toNumber())));i.positionAccount=[...null!=(o=i.positionAccount)?o:[],{poolId:n.poolId,nftMint:n.nftMint,priceLower:s.price,priceUpper:u.price,amountA:l,amountB:d,tickLower:n.tickLower,tickUpper:n.tickUpper,liquidity:n.liquidity,feeGrowthInsideLastX64A:n.feeGrowthInsideLastX64A,feeGrowthInsideLastX64B:n.feeGrowthInsideLastX64B,tokenFeesOwedA:n.tokenFeesOwedA,tokenFeesOwedB:n.tokenFeesOwedB,rewardInfos:n.rewardInfos.map(e=>t1(t0({},e),{pendingReward:new(tb())(0)})),leverage:p,tokenFeeAmountA:new(tb())(0),tokenFeeAmountB:new(tb())(0)}];let f=await sT.getTickArrayAddressByTick(i.state.programId,n.poolId,n.tickLower,i.state.tickSpacing),h=await sT.getTickArrayAddressByTick(i.state.programId,n.poolId,n.tickUpper,i.state.tickSpacing);c[`${i.state.programId.toString()}-${n.poolId.toString()}-${n.tickLower}`]=f,c[`${i.state.programId.toString()}-${n.poolId.toString()}-${n.tickUpper}`]=h}if(i){let n=Object.values(c),i=await t7(t,n,{batchRequest:r}),o={};for(let e=0;e{var t,n;let i=e.mint.decimals,o=r[e.mint.address];return s<(null!=(t=e.startTime)?t:0)||s>(null!=(n=e.endTime)?n:0)||!e.perSecond||!o||void 0===i?0:new rM(o.value).mul(new rM(e.perSecond).mul(31536e3)).div(new rM(10).pow(i)).mul(k).mul(100).toNumber()});return{feeApr:x,rewardsApr:A,apr:x+A.reduce((e,t)=>e+t,0)}}static getLiquidityAmountOutFromAmountIn({poolInfo:e,inputA:t,tickLower:n,tickUpper:r,amount:i,slippage:o,add:a,epochInfo:s,amountHasFee:u}){var l,c;let d=sw.priceToSqrtPriceX64(new rM(e.price),e.mintA.decimals,e.mintB.decimals),p=sw.getSqrtPriceX64FromTick(n),f=sw.getSqrtPriceX64FromTick(r),h=i7(i,null==(l=e[t?"mintA":"mintB"].extensions)?void 0:l.feeConfig,s,!u),m=new(tb())(new rM(h.amount.sub(null!=(c=h.fee)?c:aU).toString()).mul(a?1-o:1+o).toFixed(0)),g;if(d.lte(p))g=t?sx.getLiquidityFromTokenAmountA(p,f,m,!a):new(tb())(0);else if(d.lte(f)){let e=sx.getLiquidityFromTokenAmountA(d,f,m,!a),n=sx.getLiquidityFromTokenAmountB(p,d,m);g=t?e:n}else g=t?new(tb())(0):sx.getLiquidityFromTokenAmountB(p,f,m);return sg.getAmountsFromLiquidity({epochInfo:s,poolInfo:e,tickLower:n,tickUpper:r,liquidity:g,slippage:o,add:a})}static async getAmountsFromLiquidity({epochInfo:e,poolInfo:t,tickLower:n,tickUpper:r,liquidity:i,slippage:o,add:a}){var s,u,l,c;let d=sw.getSqrtPriceX64FromTick(n),p=sw.getSqrtPriceX64FromTick(r),f=a?1+o:1-o,h=sx.getAmountsFromLiquidity(sw.priceToSqrtPriceX64(new rM(t.price),t.mintA.decimals,t.mintB.decimals),d,p,i,a),[m,g]=[i7(h.amountA,null==(s=t.mintA.extensions)?void 0:s.feeConfig,e,!0),i7(h.amountB,null==(u=t.mintB.extensions)?void 0:u.feeConfig,e,!0)],[y,b]=[i7(h.amountA.muln(f),null==(l=t.mintA.extensions)?void 0:l.feeConfig,e,!0),i7(h.amountB.muln(f),null==(c=t.mintB.extensions)?void 0:c.feeConfig,e,!0)];return{liquidity:i,amountA:m,amountB:g,amountSlippageA:y,amountSlippageB:b,expirationTime:oe(m.expirationTime,g.expirationTime)}}static async fetchComputeMultipleClmmInfo({connection:e,poolList:t,rpcDataMap:n={}}){let r=t.filter(e=>!n[e.id]).map(e=>new tu.nh(e.id));(await t7(e,r)).forEach((e,t)=>{e&&(n[r[t].toBase58()]=sB.decode(e.data))});let i=t.map(e=>su(new tu.nh(e.programId),new tu.nh(e.id)).publicKey),o=await sg.fetchExBitmaps({connection:e,exBitmapAddress:i,batchRequest:!1});return t.reduce((e,t)=>t1(t0({},e),{[t.id]:t1(t0({},n[t.id]),{id:new tu.nh(t.id),version:6,programId:new tu.nh(t.programId),mintA:t.mintA,mintB:t.mintB,ammConfig:t1(t0({},t.config),{id:new tu.nh(t.config.id),fundOwner:""}),currentPrice:new rM(t.price),exBitmapAccount:su(new tu.nh(t.programId),new tu.nh(t.id)).publicKey,exBitmapInfo:o[su(new tu.nh(t.programId),new tu.nh(t.id)).publicKey.toBase58()],startTime:n[t.id].startTime.toNumber(),rewardInfos:n[t.id].rewardInfos})}),{})}static async fetchComputeClmmInfo({connection:e,poolInfo:t,rpcData:n}){return(await this.fetchComputeMultipleClmmInfo({connection:e,rpcDataMap:n?{[t.id]:n}:void 0,poolList:[t]}))[t.id]}},sy={volume:0,volumeQuote:0,volumeFee:0,apr:0,feeApr:0,priceMin:0,priceMax:0,rewardApr:[]},sb=class{static mulDivRoundingUp(e,t,n){let r=e.mul(t),i=r.div(n);return r.mod(n).eq(aU)||(i=i.add(az)),i}static mulDivFloor(e,t,n){if(n.eq(aU))throw Error("division by 0");return e.mul(t).div(n)}static mulDivCeil(e,t,n){if(n.eq(aU))throw Error("division by 0");return e.mul(t).add(n.sub(az)).div(n)}static x64ToDecimal(e,t){return new rM(e.toString()).div(rM.pow(2,64)).toDecimalPlaces(t)}static decimalToX64(e){return new(tb())(e.mul(rM.pow(2,64)).floor().toFixed())}static wrappingSubU128(e,t){return e.add(a$).sub(t).mod(a$)}};function s_(e,t){return sv(e.mul(t),64,256)}function sv(e,t,n){let r=e.toTwos(n).shrn(t);return r.imaskn(n-t+1),r.fromTwos(n-t)}var sw=class{static sqrtPriceX64ToPrice(e,t,n){return sb.x64ToDecimal(e).pow(2).mul(rM.pow(10,t-n))}static priceToSqrtPriceX64(e,t,n){return sb.decimalToX64(e.mul(rM.pow(10,n-t)).sqrt())}static getNextSqrtPriceX64FromInput(e,t,n,r){if(!e.gt(aU))throw Error("sqrtPriceX64 must greater than 0");if(!t.gt(aU))throw Error("liquidity must greater than 0");return r?this.getNextSqrtPriceFromTokenAmountARoundingUp(e,t,n,!0):this.getNextSqrtPriceFromTokenAmountBRoundingDown(e,t,n,!0)}static getNextSqrtPriceX64FromOutput(e,t,n,r){if(!e.gt(aU))throw Error("sqrtPriceX64 must greater than 0");if(!t.gt(aU))throw Error("liquidity must greater than 0");return r?this.getNextSqrtPriceFromTokenAmountBRoundingDown(e,t,n,!1):this.getNextSqrtPriceFromTokenAmountARoundingUp(e,t,n,!1)}static getNextSqrtPriceFromTokenAmountARoundingUp(e,t,n,r){if(n.eq(aU))return e;let i=t.shln(64);if(r){let t=i.add(n.mul(e));return t.gte(i)?sb.mulDivCeil(i,e,t):sb.mulDivRoundingUp(i,az,i.div(e).add(n))}{let t=n.mul(e);if(!i.gt(t))throw Error("getNextSqrtPriceFromTokenAmountARoundingUp,liquidityLeftShift must gt amountMulSqrtPrice");let r=i.sub(t);return sb.mulDivCeil(i,e,r)}}static getNextSqrtPriceFromTokenAmountBRoundingDown(e,t,n,r){let i=n.shln(64);if(r)return e.add(i.div(t));{let n=sb.mulDivRoundingUp(i,az,t);if(!e.gt(n))throw Error("getNextSqrtPriceFromTokenAmountBRoundingDown sqrtPriceX64 must gt amountDivLiquidity");return e.sub(n)}}static getSqrtPriceX64FromTick(e){if(!Number.isInteger(e))throw Error("tick must be integer");if(e<-443636||e>443636)throw Error("tick must be in MIN_TICK and MAX_TICK");let t=e<0?-1*e:e,n=new(tb())((1&t)!=0?"18445821805675395072":"18446744073709551616");return(2&t)!=0&&(n=s_(n,new(tb())("18444899583751176192"))),(4&t)!=0&&(n=s_(n,new(tb())("18443055278223355904"))),(8&t)!=0&&(n=s_(n,new(tb())("18439367220385607680"))),(16&t)!=0&&(n=s_(n,new(tb())("18431993317065453568"))),(32&t)!=0&&(n=s_(n,new(tb())("18417254355718170624"))),(64&t)!=0&&(n=s_(n,new(tb())("18387811781193609216"))),(128&t)!=0&&(n=s_(n,new(tb())("18329067761203558400"))),(256&t)!=0&&(n=s_(n,new(tb())("18212142134806163456"))),(512&t)!=0&&(n=s_(n,new(tb())("17980523815641700352"))),(1024&t)!=0&&(n=s_(n,new(tb())("17526086738831433728"))),(2048&t)!=0&&(n=s_(n,new(tb())("16651378430235570176"))),(4096&t)!=0&&(n=s_(n,new(tb())("15030750278694412288"))),(8192&t)!=0&&(n=s_(n,new(tb())("12247334978884435968"))),(16384&t)!=0&&(n=s_(n,new(tb())("8131365268886854656"))),(32768&t)!=0&&(n=s_(n,new(tb())("3584323654725218816"))),(65536&t)!=0&&(n=s_(n,new(tb())("696457651848324352"))),(131072&t)!=0&&(n=s_(n,new(tb())("26294789957507116"))),(262144&t)!=0&&(n=s_(n,new(tb())("37481735321082"))),e>0&&(n=aH.div(n)),n}static getTickFromPrice(e,t,n){return sw.getTickFromSqrtPriceX64(sw.priceToSqrtPriceX64(e,t,n))}static getTickFromSqrtPriceX64(e){let t;if(e.gt(aZ)||e.lt(aG))throw Error("Provided sqrtPrice is not within the supported sqrtPrice range.");let n=e.bitLength()-1,r=((t=new(tb())(n-64).toTwos(128).shln(32)).imaskn(129),t.fromTwos(128)),i=new(tb())("8000000000000000","hex"),o=0,a=new(tb())(0),s=n>=64?e.shrn(n-63):e.shln(63-n);for(;i.gt(new(tb())(0))&&o<16;){let e=(s=s.mul(s)).shrn(127);s=s.shrn(63+e.toNumber()),a=a.add(i.mul(e)),i=i.shrn(1),o+=1}let u=a.shrn(32),l=r.add(u).mul(new(tb())("59543866431248")),c=sv(l.sub(new(tb())("184467440737095516")),64,128).toNumber(),d=sv(l.add(new(tb())("15793534762490258745")),64,128).toNumber();return c==d?c:sw.getSqrtPriceX64FromTick(d).lte(e)?d:c}},sk=class{static getTickWithPriceAndTickspacing(e,t,n,r){let i=sw.getTickFromSqrtPriceX64(sw.priceToSqrtPriceX64(e,n,r))/t;return(i=i<0?Math.floor(i):Math.ceil(i))*t}static roundPriceWithTickspacing(e,t,n,r){let i=sk.getTickWithPriceAndTickspacing(e,t,n,r),o=sw.getSqrtPriceX64FromTick(i);return sw.sqrtPriceX64ToPrice(o,n,r)}},sx=class{static addDelta(e,t){return e.add(t)}static getTokenAmountAFromLiquidity(e,t,n,r){if(e.gt(t)&&([e,t]=[t,e]),!e.gt(aU))throw Error("sqrtPriceX64A must greater than 0");let i=n.ushln(64),o=t.sub(e);return r?sb.mulDivRoundingUp(sb.mulDivCeil(i,o,t),az,e):sb.mulDivFloor(i,o,t).div(e)}static getTokenAmountBFromLiquidity(e,t,n,r){if(e.gt(t)&&([e,t]=[t,e]),!e.gt(aU))throw Error("sqrtPriceX64A must greater than 0");return r?sb.mulDivCeil(n,t.sub(e),aW):sb.mulDivFloor(n,t.sub(e),aW)}static getLiquidityFromTokenAmountA(e,t,n,r){e.gt(t)&&([e,t]=[t,e]);let i=n.mul(e).mul(t),o=t.sub(e),a=i.div(o);return r?sb.mulDivRoundingUp(a,az,aK):a.shrn(64)}static getLiquidityFromTokenAmountB(e,t,n){return e.gt(t)&&([e,t]=[t,e]),sb.mulDivFloor(n,aK,t.sub(e))}static getLiquidityFromTokenAmounts(e,t,n,r,i){if(t.gt(n)&&([t,n]=[n,t]),e.lte(t))return sx.getLiquidityFromTokenAmountA(t,n,r,!1);if(!e.lt(n))return sx.getLiquidityFromTokenAmountB(t,n,i);{let o=sx.getLiquidityFromTokenAmountA(e,n,r,!1),a=sx.getLiquidityFromTokenAmountB(t,e,i);return o.lt(a)?o:a}}static getAmountsFromLiquidity(e,t,n,r,i){return(t.gt(n)&&([t,n]=[n,t]),e.lte(t))?{amountA:sx.getTokenAmountAFromLiquidity(t,n,r,i),amountB:new(tb())(0)}:e.lt(n)?{amountA:sx.getTokenAmountAFromLiquidity(e,n,r,i),amountB:sx.getTokenAmountBFromLiquidity(t,e,r,i)}:{amountA:new(tb())(0),amountB:sx.getTokenAmountBFromLiquidity(t,n,r,i)}}static getAmountsFromLiquidityWithSlippage(e,t,n,r,i,o,a){let{amountA:s,amountB:u}=sx.getAmountsFromLiquidity(e,t,n,r,o),l=i?1+a:1-a;return{amountSlippageA:new(tb())(new rM(s.toString()).mul(l).toFixed(0)),amountSlippageB:new(tb())(new rM(u.toString()).mul(l).toFixed(0))}}static getAmountsOutFromLiquidity({poolInfo:e,tickLower:t,tickUpper:n,liquidity:r,slippage:i,add:o,epochInfo:a,amountAddFee:s}){var u,l,c,d;let p=sw.priceToSqrtPriceX64(new rM(e.price),e.mintA.decimals,e.mintB.decimals),f=sw.getSqrtPriceX64FromTick(t),h=sw.getSqrtPriceX64FromTick(n),m=o?1+i:1-i,g=sx.getAmountsFromLiquidity(p,f,h,r,o),[y,b]=[i7(g.amountA,null==(u=e.mintA.extensions)?void 0:u.feeConfig,a,s),i7(g.amountB,null==(l=e.mintB.extensions)?void 0:l.feeConfig,a,s)],[_,v]=[i7(new(tb())(new rM(g.amountA.toString()).mul(m).toFixed(0)),null==(c=e.mintA.extensions)?void 0:c.feeConfig,a,s),i7(new(tb())(new rM(g.amountB.toString()).mul(m).toFixed(0)),null==(d=e.mintB.extensions)?void 0:d.feeConfig,a,s)];return{liquidity:r,amountA:y,amountB:b,amountSlippageA:_,amountSlippageB:v,expirationTime:oe(y.expirationTime,b.expirationTime)}}},sA=class{static swapCompute(e,t,n,r,i,o,a,s,u,l,c,d,p,f,h=!1){if(d.eq(aU))throw Error("amountSpecified must not be 0");if(f||(f=o?aG.add(az):aZ.sub(az)),o){if(f.lt(aG))throw Error("sqrtPriceX64 must greater than MIN_SQRT_PRICE_X64");if(f.gte(c))throw Error("sqrtPriceX64 must smaller than current")}else{if(f.gt(aZ))throw Error("sqrtPriceX64 must smaller than MAX_SQRT_PRICE_X64");if(f.lte(c))throw Error("sqrtPriceX64 must greater than current")}let m=d.gt(aU),g={amountSpecifiedRemaining:d,amountCalculated:aU,sqrtPriceX64:c,tick:u>p?Math.min(p+sf.tickCount(l)-1,u):p,accounts:[],liquidity:s,feeAmount:new(tb())(0)},y=p,b=n[p],_=!o&&b.startTickIndex===g.tick;for(;!g.amountSpecifiedRemaining.eq(aU)&&!g.sqrtPriceX64.eq(f);){let s;let u={};u.sqrtPriceStartX64=g.sqrtPriceX64;let c=sT.nextInitTick(b,g.tick,l,o,_)||null,d=null;if(!(null!=c&&c.liquidityGross.gtn(0))){let a=sg.nextInitializedTickArrayStartIndex({tickCurrent:g.tick,tickSpacing:l,tickArrayBitmap:r,exBitmapInfo:i},y,o);if(!a.isExist){if(h)return{allTrade:!1,amountSpecifiedRemaining:g.amountSpecifiedRemaining,amountCalculated:g.amountCalculated,feeAmount:g.feeAmount,sqrtPriceX64:g.sqrtPriceX64,liquidity:g.liquidity,tickCurrent:g.tick,accounts:g.accounts};throw Error("swapCompute LiquidityInsufficient")}let{publicKey:s}=si(e,t,y=a.nextStartIndex);d=s,b=n[y];try{c=sT.firstInitializedTick(b,o)}catch{throw Error("not found next tick info")}}if(u.tickNext=c.tick,u.initialized=c.liquidityGross.gtn(0),p!==y&&d&&(g.accounts.push(d),p=y),u.tickNext<-443636?u.tickNext=-443636:u.tickNext>443636&&(u.tickNext=443636),u.sqrtPriceNextX64=sw.getSqrtPriceX64FromTick(u.tickNext),s=o&&u.sqrtPriceNextX64.lt(f)||!o&&u.sqrtPriceNextX64.gt(f)?f:u.sqrtPriceNextX64,[g.sqrtPriceX64,u.amountIn,u.amountOut,u.feeAmount]=sA.swapStepCompute(g.sqrtPriceX64,s,g.liquidity,g.amountSpecifiedRemaining,a),g.feeAmount=g.feeAmount.add(u.feeAmount),m?(g.amountSpecifiedRemaining=g.amountSpecifiedRemaining.sub(u.amountIn.add(u.feeAmount)),g.amountCalculated=g.amountCalculated.sub(u.amountOut)):(g.amountSpecifiedRemaining=g.amountSpecifiedRemaining.add(u.amountOut),g.amountCalculated=g.amountCalculated.add(u.amountIn.add(u.feeAmount))),g.sqrtPriceX64.eq(u.sqrtPriceNextX64)){if(u.initialized){let e=c.liquidityNet;o&&(e=e.mul(aV)),g.liquidity=sx.addDelta(g.liquidity,e)}_=u.tickNext!=g.tick&&!o&&b.startTickIndex===u.tickNext,g.tick=o?u.tickNext-1:u.tickNext}else if(g.sqrtPriceX64!=u.sqrtPriceStartX64){let e=sw.getTickFromSqrtPriceX64(g.sqrtPriceX64);_=e!=g.tick&&!o&&b.startTickIndex===e,g.tick=e}}try{let{nextStartIndex:n,isExist:a}=sf.nextInitializedTickArray(g.tick,l,o,r,i);a&&p!==n&&(g.accounts.push(si(e,t,n).publicKey),p=n)}catch{}return{allTrade:!0,amountSpecifiedRemaining:aU,amountCalculated:g.amountCalculated,feeAmount:g.feeAmount,sqrtPriceX64:g.sqrtPriceX64,liquidity:g.liquidity,tickCurrent:g.tick,accounts:g.accounts}}static swapStepCompute(e,t,n,r,i){let o={sqrtPriceX64Next:new(tb())(0),amountIn:new(tb())(0),amountOut:new(tb())(0),feeAmount:new(tb())(0)},a=e.gte(t),s=r.gte(aU);if(s){let s=sb.mulDivFloor(r,aQ.sub(new(tb())(i.toString())),aQ);o.amountIn=a?sx.getTokenAmountAFromLiquidity(t,e,n,!0):sx.getTokenAmountBFromLiquidity(e,t,n,!0),s.gte(o.amountIn)?o.sqrtPriceX64Next=t:o.sqrtPriceX64Next=sw.getNextSqrtPriceX64FromInput(e,n,s,a)}else o.amountOut=a?sx.getTokenAmountBFromLiquidity(t,e,n,!1):sx.getTokenAmountAFromLiquidity(e,t,n,!1),r.mul(aV).gte(o.amountOut)?o.sqrtPriceX64Next=t:o.sqrtPriceX64Next=sw.getNextSqrtPriceX64FromOutput(e,n,r.mul(aV),a);let u=t.eq(o.sqrtPriceX64Next);return a?(u&&s||(o.amountIn=sx.getTokenAmountAFromLiquidity(o.sqrtPriceX64Next,e,n,!0)),u&&!s||(o.amountOut=sx.getTokenAmountBFromLiquidity(o.sqrtPriceX64Next,e,n,!1))):(o.amountIn=u&&s?o.amountIn:sx.getTokenAmountBFromLiquidity(e,o.sqrtPriceX64Next,n,!0),o.amountOut=u&&!s?o.amountOut:sx.getTokenAmountAFromLiquidity(e,o.sqrtPriceX64Next,n,!1)),!s&&o.amountOut.gt(r.mul(aV))&&(o.amountOut=r.mul(aV)),s&&!o.sqrtPriceX64Next.eq(t)?o.feeAmount=r.sub(o.amountIn):o.feeAmount=sb.mulDivCeil(o.amountIn,new(tb())(i),aQ.sub(new(tb())(i))),[o.sqrtPriceX64Next,o.amountIn,o.amountOut,o.feeAmount]}},sS=60,sI=512,sT=class{static getTickArrayAddressByTick(e,t,n,r){let i=sT.getTickArrayStartIndexByTick(n,r),{publicKey:o}=si(e,t,i);return o}static getTickOffsetInArray(e,t){if(e%t!=0)throw Error("tickIndex % tickSpacing not equal 0");let n=sT.getTickArrayStartIndexByTick(e,t),r=Math.floor((e-n)/t);if(r<0||r>=sS)throw Error("tick offset in array overflow");return r}static getTickArrayBitIndex(e,t){let n=sf.tickCount(t),r=e/n;return e<0&&e%n!=0?Math.ceil(r)-1:Math.floor(r)}static getTickArrayStartIndexByTick(e,t){return this.getTickArrayBitIndex(e,t)*sf.tickCount(t)}static getTickArrayOffsetInBitmapByTick(e,t){return Math.abs(Math.floor(e/(t*sS))+512)}static checkTickArrayIsInitialized(e,t,n){let r=n*sS,i=Math.abs(Math.floor(t/r)+512);return{isInitialized:e.testn(i),startIndex:(i-512)*r}}static getNextTickArrayStartIndex(e,t,n){return n?e-t*sS:e+t*sS}static mergeTickArrayBitmap(e){let t=new(tb())(0);for(let n=0;ne.liquidityGross.gtn(0))}static searchLowBitFromStart(e,t,n,r,i){let o=[...[...t.negativeTickArrayBitmap].reverse(),e.slice(0,8),e.slice(8,16),...t.positiveTickArrayBitmap].map(e=>sT.mergeTickArrayBitmap(e)),a=[];for(;n>=-7680;){let e=Math.floor((n+7680)/512),t=(n+7680)%512;if(o[e].testn(t)&&a.push(n),n--,a.length===r)break}let s=sf.tickCount(i);return a.map(e=>e*s)}static searchHightBitFromStart(e,t,n,r,i){let o=[...[...t.negativeTickArrayBitmap].reverse(),e.slice(0,8),e.slice(8,16),...t.positiveTickArrayBitmap].map(e=>sT.mergeTickArrayBitmap(e)),a=[];for(;n<7680;){let e=Math.floor((n+7680)/512),t=(n+7680)%512;if(o[e].testn(t)&&a.push(n),n++,a.length===r)break}let s=sf.tickCount(i);return a.map(e=>e*s)}static checkIsOutOfBoundary(e){return e<-443636||e>443636}static nextInitTick(e,t,n,r,i){if(sf.getArrayStartIndex(t,n)!=e.startTickIndex)return null;let o=Math.floor((t-e.startTickIndex)/n);if(r)for(;o>=0;){if(e.ticks[o].liquidityGross.gtn(0))return e.ticks[o];o-=1}else for(i||(o+=1);o=0;){if(e.ticks[t].liquidityGross.gtn(0))return e.ticks[t];t-=1}}else{let t=0;for(;t[{pubkey:e.poolRewardVault,isSigner:!1,isWritable:!0},{pubkey:e.ownerRewardVault,isSigner:!1,isWritable:!0},{pubkey:e.rewardMint,isSigner:!1,isWritable:!1}]).flat()],w=[{pubkey:t,isSigner:!0,isWritable:!1},{pubkey:n,isSigner:!1,isWritable:!1},{pubkey:r,isSigner:!1,isWritable:!0},{pubkey:i,isSigner:!1,isWritable:!0},{pubkey:o,isSigner:!1,isWritable:!0},{pubkey:c,isSigner:!1,isWritable:!0},{pubkey:d,isSigner:!1,isWritable:!0},{pubkey:a,isSigner:!1,isWritable:!0},{pubkey:s,isSigner:!1,isWritable:!0},{pubkey:u,isSigner:!1,isWritable:!0},{pubkey:l,isSigner:!1,isWritable:!0},{pubkey:td.H_,isSigner:!1,isWritable:!1},{pubkey:td.nA,isSigner:!1,isWritable:!1},{pubkey:r0,isSigner:!1,isWritable:!1},{pubkey:p,isSigner:!1,isWritable:!1},{pubkey:f,isSigner:!1,isWritable:!1},...v],k=tK.alloc(_.span);_.encode({liquidity:m,amountMinA:g,amountMinB:y},k);let x=tK.from([...sU.decreaseLiquidity,...k]);return new tu.Sl({keys:w,programId:e,data:x})}static decreaseLiquidityInstructions({poolInfo:e,poolKeys:t,ownerPosition:n,ownerInfo:r,liquidity:i,amountMinA:o,amountMinB:a,programId:s,nft2022:u}){let[l,c]=[new tu.nh(e.programId),new tu.nh(e.id)],d=sT.getTickArrayStartIndexByTick(n.tickLower,e.config.tickSpacing),p=sT.getTickArrayStartIndexByTick(n.tickUpper,e.config.tickSpacing),{publicKey:f}=si(l,c,d),{publicKey:h}=si(l,c,p),{publicKey:m}=u?iN(r.wallet,n.nftMint,td.nA):iN(r.wallet,n.nftMint,s),{publicKey:g}=sa(l,n.nftMint),{publicKey:y}=so(l,c,n.tickLower,n.tickUpper),b=[];for(let n=0;n({pubkey:e,isSigner:!1,isWritable:!0}))],_=[{pubkey:t,isSigner:!0,isWritable:!1},{pubkey:r,isSigner:!1,isWritable:!1},{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:i,isSigner:!1,isWritable:!0},{pubkey:o,isSigner:!1,isWritable:!0},{pubkey:a,isSigner:!1,isWritable:!0},{pubkey:s,isSigner:!1,isWritable:!0},{pubkey:d,isSigner:!1,isWritable:!0},{pubkey:td.H_,isSigner:!1,isWritable:!1},{pubkey:td.nA,isSigner:!1,isWritable:!1},{pubkey:r0,isSigner:!1,isWritable:!1},{pubkey:u,isSigner:!1,isWritable:!1},{pubkey:l,isSigner:!1,isWritable:!1},...b],v=tK.alloc(y.span);y.encode({amount:p,otherAmountThreshold:f,sqrtPriceLimitX64:h,isBaseInput:m},v);let w=tK.from([...sU.swap,...v]);return new tu.Sl({keys:_,programId:e,data:w})}static makeSwapBaseInInstructions({poolInfo:e,poolKeys:t,observationId:n,ownerInfo:r,inputMint:i,amountIn:o,amountOutMin:a,sqrtPriceLimitX64:s,remainingAccounts:u}){let[l,c]=[new tu.nh(e.programId),new tu.nh(e.id)],[d,p]=[new tu.nh(t.vault.A),new tu.nh(t.vault.B)],[f,h]=[new tu.nh(e.mintA.address),new tu.nh(e.mintB.address)],m=e.mintA.address===i.toString();return{signers:[],instructions:[this.swapInstruction(l,r.wallet,c,new tu.nh(e.config.id),m?r.tokenAccountA:r.tokenAccountB,m?r.tokenAccountB:r.tokenAccountA,m?d:p,m?p:d,m?f:h,m?h:f,u,n,o,a,s,!0,su(l,c).publicKey)],instructionTypes:[iw.ClmmSwapBaseIn],lookupTableAddress:t.lookupTableAccount?[t.lookupTableAccount]:[],address:{}}}static makeSwapBaseOutInstructions({poolInfo:e,poolKeys:t,observationId:n,ownerInfo:r,outputMint:i,amountOut:o,amountInMax:a,sqrtPriceLimitX64:s,remainingAccounts:u}){let[l,c]=[new tu.nh(e.programId),new tu.nh(e.id)],[d,p]=[new tu.nh(t.vault.A),new tu.nh(t.vault.B)],[f,h]=[new tu.nh(e.mintA.address),new tu.nh(e.mintB.address)],m=e.mintA.address===i.toBase58();return{signers:[],instructions:[this.swapInstruction(l,r.wallet,c,new tu.nh(e.config.id),m?r.tokenAccountB:r.tokenAccountA,m?r.tokenAccountA:r.tokenAccountB,m?p:d,m?d:p,m?h:f,m?f:h,u,n,o,a,s,!1,su(l,c).publicKey)],instructionTypes:[iw.ClmmSwapBaseOut],lookupTableAddress:t.lookupTableAccount?[t.lookupTableAccount]:[],address:{}}}static initRewardInstruction(e,t,n,r,i,o,a,s,u,l,c,d){let p=o2([oH("openTime"),oH("endTime"),oG("emissionsPerSecondX64")]),f=[{pubkey:t,isSigner:!0,isWritable:!0},{pubkey:o,isSigner:!1,isWritable:!0},{pubkey:i,isSigner:!1,isWritable:!1},{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!1,isWritable:!0},{pubkey:s,isSigner:!1,isWritable:!1},{pubkey:u,isSigner:!1,isWritable:!0},{pubkey:a,isSigner:!1,isWritable:!1},{pubkey:tu.yc.programId,isSigner:!1,isWritable:!1},{pubkey:r2,isSigner:!1,isWritable:!1}],h=tK.alloc(p.span);p.encode({openTime:rN(l),endTime:rN(c),emissionsPerSecondX64:d},h);let m=tK.from([...sU.initReward,...h]);return new tu.Sl({keys:f,programId:e,data:m})}static initRewardInstructions({poolInfo:e,poolKeys:t,ownerInfo:n,rewardInfo:r}){var i;let[o,a]=[new tu.nh(e.programId),new tu.nh(e.id)],s=(i=r.mint,iP([a8,a.toBuffer(),i.toBuffer()],o)).publicKey,u=iP([se],o).publicKey,l=[this.initRewardInstruction(o,n.wallet,a,u,new tu.nh(e.config.id),n.tokenAccount,r.programId,r.mint,s,r.openTime,r.endTime,r.emissionsPerSecondX64)];return{address:{poolRewardVault:s,operationId:u},signers:[],instructions:l,instructionTypes:[iw.ClmmInitReward],lookupTableAddress:t.lookupTableAccount?[t.lookupTableAccount]:[]}}static setRewardInstruction(e,t,n,r,i,o,a,s,u,l,c,d){let p=o2([o$("rewardIndex"),oG("emissionsPerSecondX64"),oH("openTime"),oH("endTime")]),f=[{pubkey:t,isSigner:!0,isWritable:!0},{pubkey:i,isSigner:!1,isWritable:!1},{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!1,isWritable:!0},{pubkey:td.H_,isSigner:!1,isWritable:!1},{pubkey:td.nA,isSigner:!1,isWritable:!1},{pubkey:a,isSigner:!1,isWritable:!0},{pubkey:o,isSigner:!1,isWritable:!0},{pubkey:s,isSigner:!1,isWritable:!0}],h=tK.alloc(p.span);p.encode({rewardIndex:u,emissionsPerSecondX64:d,openTime:rN(l),endTime:rN(c)},h);let m=tK.from([...sU.setRewardEmissions,...h]);return new tu.Sl({keys:f,programId:e,data:m})}static setRewardInstructions({poolInfo:e,poolKeys:t,ownerInfo:n,rewardInfo:r}){let[i,o]=[new tu.nh(e.programId),new tu.nh(e.id)],a,s,u;for(let n=0;n[{pubkey:e.poolRewardVault,isSigner:!1,isWritable:!0},{pubkey:e.ownerRewardVault,isSigner:!1,isWritable:!0},{pubkey:e.rewardMint,isSigner:!1,isWritable:!1}]).flat()],p=[{pubkey:e.authProgramId,isSigner:!1,isWritable:!1},{pubkey:sc(e.programId,u).publicKey,isSigner:!1,isWritable:!1},{pubkey:t,isSigner:!1,isWritable:!1},{pubkey:e.owner,isSigner:!0,isWritable:!1},{pubkey:s,isSigner:!1,isWritable:!0},{pubkey:u,isSigner:!1,isWritable:!0},{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:l,isSigner:!1,isWritable:!0},{pubkey:new tu.nh(e.poolKeys.vault.A),isSigner:!1,isWritable:!0},{pubkey:new tu.nh(e.poolKeys.vault.B),isSigner:!1,isWritable:!0},{pubkey:o,isSigner:!1,isWritable:!0},{pubkey:a,isSigner:!1,isWritable:!0},{pubkey:e.userVaultA,isSigner:!1,isWritable:!0},{pubkey:e.userVaultB,isSigner:!1,isWritable:!0},{pubkey:td.H_,isSigner:!1,isWritable:!1},{pubkey:td.nA,isSigner:!1,isWritable:!1},{pubkey:r1,isSigner:!1,isWritable:!1},{pubkey:new tu.nh(e.poolKeys.mintA.address),isSigner:!1,isWritable:!1},{pubkey:new tu.nh(e.poolKeys.mintB.address),isSigner:!1,isWritable:!1},...d];return new tu.Sl({keys:p,programId:e.programId,data:tK.from(sV)})}static harvestLockPositionInstructionV2({programId:e,auth:t,lockPositionId:n,clmmProgram:r,lockOwner:i,lockNftMint:o,lockNftAccount:a,positionNftAccount:s,positionId:u,poolId:l,protocolPosition:c,vaultA:d,vaultB:p,tickArrayLower:f,tickArrayUpper:h,userVaultA:m,userVaultB:g,mintA:y,mintB:b,rewardAccounts:_,exTickArrayBitmap:v}){let w=[...v?[{pubkey:v,isSigner:!1,isWritable:!0}]:[],..._.map(e=>[{pubkey:e.poolRewardVault,isSigner:!1,isWritable:!0},{pubkey:e.ownerRewardVault,isSigner:!1,isWritable:!0},{pubkey:e.rewardMint,isSigner:!1,isWritable:!1}]).flat()],k=[{pubkey:t,isSigner:!1,isWritable:!1},{pubkey:i,isSigner:!0,isWritable:!1},{pubkey:a,isSigner:!1,isWritable:!0},{pubkey:n,isSigner:!1,isWritable:!1},{pubkey:r,isSigner:!1,isWritable:!1},{pubkey:s,isSigner:!1,isWritable:!0},{pubkey:u,isSigner:!1,isWritable:!0},{pubkey:l,isSigner:!1,isWritable:!0},{pubkey:c,isSigner:!1,isWritable:!0},{pubkey:d,isSigner:!1,isWritable:!0},{pubkey:p,isSigner:!1,isWritable:!0},{pubkey:f,isSigner:!1,isWritable:!0},{pubkey:h,isSigner:!1,isWritable:!0},{pubkey:m,isSigner:!1,isWritable:!0},{pubkey:g,isSigner:!1,isWritable:!0},{pubkey:td.H_,isSigner:!1,isWritable:!1},{pubkey:td.nA,isSigner:!1,isWritable:!1},{pubkey:r1,isSigner:!1,isWritable:!1},{pubkey:y,isSigner:!1,isWritable:!1},{pubkey:b,isSigner:!1,isWritable:!1},...w];return new tu.Sl({keys:k,programId:e,data:tK.from(sV)})}};o2([oK("mintAuthorityOption"),oX("mintAuthority"),oH("supply"),o$("decimals"),o$("isInitialized"),oK("freezeAuthorityOption"),oX("freezeAuthority")]);var s$=e=>new ii({mint:e.address,decimals:e.decimals,symbol:e.symbol,name:e.name}),sK=e=>{var{amount:t,isRaw:n,name:r}=e,i=t2(e,["amount","isRaw","name"]);return new rK(new ii({mint:it(i.address).toBase58(),decimals:i.decimals,symbol:i.symbol,name:r}),t,n,r)};function sH(e){return e.address===rG.address?rZ:e}function sG(e){return e.address===rZ.address?rG:e}var sZ=e=>{var{address:t,programId:n,decimals:r}=e,i=t2(e,["address","programId","decimals"]);return t0({chainId:101,address:it(t).toBase58(),programId:n,logoURI:"",symbol:"",name:"",decimals:r,tags:[],extensions:i.extensions||{}},i)},sY=e=>e?t1(t0({},e),{transferFeeConfigAuthority:e.transferFeeConfigAuthority.toBase58(),withdrawWithheldAuthority:e.withdrawWithheldAuthority.toBase58(),withheldAmount:e.withheldAmount.toString(),olderTransferFee:t1(t0({},e.olderTransferFee),{epoch:e.olderTransferFee.epoch.toString(),maximumFee:e.olderTransferFee.maximumFee.toString()}),newerTransferFee:t1(t0({},e.newerTransferFee),{epoch:e.newerTransferFee.epoch.toString(),maximumFee:e.newerTransferFee.maximumFee.toString()})}):void 0,sX=new(tb())(25),sQ=new(tb())(1e4),sJ=o2([o$("instruction"),oH("amountIn"),oH("minAmountOut")]),s0=o2([o$("instruction"),oH("maxAmountIn"),oH("amountOut")]),s1=(o2([o$("instruction"),o$("nonce")]),o2([o$("instruction"),o$("nonce"),oH("startTime")]),o2([oH("status"),oH("nonce"),oH("maxOrder"),oH("depth"),oH("baseDecimal"),oH("quoteDecimal"),oH("state"),oH("resetFlag"),oH("minSize"),oH("volMaxCutRatio"),oH("amountWaveRatio"),oH("baseLotSize"),oH("quoteLotSize"),oH("minPriceMultiplier"),oH("maxPriceMultiplier"),oH("systemDecimalValue"),oH("minSeparateNumerator"),oH("minSeparateDenominator"),oH("tradeFeeNumerator"),oH("tradeFeeDenominator"),oH("pnlNumerator"),oH("pnlDenominator"),oH("swapFeeNumerator"),oH("swapFeeDenominator"),oH("baseNeedTakePnl"),oH("quoteNeedTakePnl"),oH("quoteTotalPnl"),oH("baseTotalPnl"),oH("poolOpenTime"),oH("punishPcAmount"),oH("punishCoinAmount"),oH("orderbookToInitTime"),oG("swapBaseInAmount"),oG("swapQuoteOutAmount"),oH("swapBase2QuoteFee"),oG("swapQuoteInAmount"),oG("swapBaseOutAmount"),oH("swapQuote2BaseFee"),oX("baseVault"),oX("quoteVault"),oX("baseMint"),oX("quoteMint"),oX("lpMint"),oX("openOrders"),oX("marketId"),oX("marketProgramId"),oX("targetOrders"),oX("withdrawQueue"),oX("lpVault"),oX("owner"),oH("lpReserve"),o6(oH(),3,"padding")])),s2=(o2([oH("accountType"),oH("status"),oH("nonce"),oH("maxOrder"),oH("depth"),oH("baseDecimal"),oH("quoteDecimal"),oH("state"),oH("resetFlag"),oH("minSize"),oH("volMaxCutRatio"),oH("amountWaveRatio"),oH("baseLotSize"),oH("quoteLotSize"),oH("minPriceMultiplier"),oH("maxPriceMultiplier"),oH("systemDecimalsValue"),oH("abortTradeFactor"),oH("priceTickMultiplier"),oH("priceTick"),oH("minSeparateNumerator"),oH("minSeparateDenominator"),oH("tradeFeeNumerator"),oH("tradeFeeDenominator"),oH("pnlNumerator"),oH("pnlDenominator"),oH("swapFeeNumerator"),oH("swapFeeDenominator"),oH("baseNeedTakePnl"),oH("quoteNeedTakePnl"),oH("quoteTotalPnl"),oH("baseTotalPnl"),oH("poolOpenTime"),oH("punishPcAmount"),oH("punishCoinAmount"),oH("orderbookToInitTime"),oG("swapBaseInAmount"),oG("swapQuoteOutAmount"),oG("swapQuoteInAmount"),oG("swapBaseOutAmount"),oH("swapQuote2BaseFee"),oH("swapBase2QuoteFee"),oX("baseVault"),oX("quoteVault"),oX("baseMint"),oX("quoteMint"),oX("lpMint"),oX("modelDataAccount"),oX("openOrders"),oX("marketId"),oX("marketProgramId"),oX("targetOrders"),oX("owner"),o6(oH(),64,"padding")]),o2([o$("instruction"),oH("baseAmountIn"),oH("quoteAmountIn"),oH("fixedSide"),oH("otherAmountMin")])),s6=o2([o$("instruction"),oH("lpAmount"),oH("baseAmountMin"),oH("quoteAmountMin")]),s3=o2([oH("fee")]),s4=new tu.nh("CDSr3ssLcRB6XYPJwAfFt18MZvEZp4LjHcvzBVZ45duo"),s5=o2([oH("x"),oH("y"),oH("price")]),s8=o2([oH("accountType"),oH("status"),oH("multiplier"),oH("validDataCount"),o6(s5,5e4,"DataElement")]);function s9(e,t,n){let[r,i,o]=function(e,t,n){let[r,i]=[0,49998],o=r,a=i,s=0,u=t*e.multiplier/n;for(;o<=a&&0!==(s=Math.floor((a+o)/2))&&!(s>=49998);){let t=e.DataElement[s].x*e.multiplier/e.DataElement[s].y,n=e.DataElement[s-1].x*e.multiplier/e.DataElement[s-1].y,r=e.DataElement[s+1].x*e.multiplier/e.DataElement[s+1].y;if(u===t)return[s,s,!0];if(u===n)return[s-1,s-1,!0];if(u===r)return[s+1,s+1,!0];if(un&&ut&&u49998);){let n=e.DataElement[a].x,r=e.DataElement[a-1].x,s=e.DataElement[a+1].x;if(t===n)return[a,a,!0];if(t===r)return[a-1,a-1,!0];if(t===s)return[a+1,a+1,!0];if(tr&&tn&&t=n&&t<=u)return r?[c,p,!0,s]:[l,d,!0,s];{let o,a;return r?(o=l+(c-l)*(t-n)/(u-n),a=d-(i-n)*e.multiplier/c):(o=l+(c-l)*(t-n)/(u-n),a=p+(u-i)*e.multiplier/l),[o,a,!1,s]}}}var un=class{constructor({connection:e}){this._layoutData={accountType:0,status:0,multiplier:0,validDataCount:0,DataElement:[]},this.connection=e}get stableModelData(){return this._layoutData}async initStableModelLayout(){if(0===this._layoutData.validDataCount&&this.connection){var e;let t,n=await this.connection.getAccountInfo(s4);n&&(this._layoutData=(e=null==n?void 0:n.data,{accountType:(t=s8.decode(e)).accountType.toNumber(),status:t.status.toNumber(),multiplier:t.multiplier.toNumber(),validDataCount:t.validDataCount.toNumber(),DataElement:t.DataElement.map(e=>({x:e.x.toNumber(),y:e.y.toNumber(),price:e.price.toNumber()}))}))}}},ur=t8("Raydium_liquidity_instruction");function ui(e){let{poolInfo:t,poolKeys:n,userKeys:r,lpAmount:i,baseAmountMin:o,quoteAmountMin:a}=e,s=ip(n),u=4;if(t.pooltype.includes("StablePool")&&(u=5),4===u||5===u){let e=tK.alloc(s6.span);s6.encode({instruction:4,lpAmount:rN(i),baseAmountMin:rN(o),quoteAmountMin:rN(a)},e);let t=[rY({pubkey:td.H_,isWritable:!1}),rY({pubkey:s.id}),rY({pubkey:s.authority,isWritable:!1}),rY({pubkey:s.openOrders}),rY({pubkey:s.targetOrders}),rY({pubkey:s.mintLp.address}),rY({pubkey:s.vault.A}),rY({pubkey:s.vault.B})];return 5===u?t.push(rY({pubkey:s4})):(t.push(rY({pubkey:s.id})),t.push(rY({pubkey:s.id}))),t.push(rY({pubkey:s.marketProgramId,isWritable:!1}),rY({pubkey:s.marketId}),rY({pubkey:s.marketBaseVault}),rY({pubkey:s.marketQuoteVault}),rY({pubkey:s.marketAuthority,isWritable:!1}),rY({pubkey:r.lpTokenAccount}),rY({pubkey:r.baseTokenAccount}),rY({pubkey:r.quoteTokenAccount}),rY({pubkey:r.owner,isWritable:!1,isSigner:!0}),rY({pubkey:s.marketEventQueue}),rY({pubkey:s.marketBids}),rY({pubkey:s.marketAsks})),new tu.Sl({programId:s.programId,keys:t,data:e})}return new tu.Sl({programId:s.programId,keys:[]})}function uo({programId:e,ammId:t,ammAuthority:n,ammOpenOrders:r,lpMint:i,coinMint:o,pcMint:a,coinVault:s,pcVault:u,withdrawQueue:l,ammTargetOrders:c,poolTempLp:d,marketProgramId:p,marketId:f,userWallet:h,userCoinVault:m,userPcVault:g,userLpVault:y,nonce:b,openTime:_,coinAmount:v,pcAmount:w,ammConfigId:k,feeDestinationId:x}){let A=o2([o$("instruction"),o$("nonce"),oH("openTime"),oH("pcAmount"),oH("coinAmount")]),S=[{pubkey:td.H_,isSigner:!1,isWritable:!1},{pubkey:td._u,isSigner:!1,isWritable:!1},{pubkey:tu.yc.programId,isSigner:!1,isWritable:!1},{pubkey:r2,isSigner:!1,isWritable:!1},{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:n,isSigner:!1,isWritable:!1},{pubkey:r,isSigner:!1,isWritable:!0},{pubkey:i,isSigner:!1,isWritable:!0},{pubkey:o,isSigner:!1,isWritable:!1},{pubkey:a,isSigner:!1,isWritable:!1},{pubkey:s,isSigner:!1,isWritable:!0},{pubkey:u,isSigner:!1,isWritable:!0},{pubkey:c,isSigner:!1,isWritable:!0},{pubkey:k,isSigner:!1,isWritable:!1},{pubkey:x,isSigner:!1,isWritable:!0},{pubkey:p,isSigner:!1,isWritable:!1},{pubkey:f,isSigner:!1,isWritable:!1},{pubkey:h,isSigner:!0,isWritable:!0},{pubkey:m,isSigner:!1,isWritable:!0},{pubkey:g,isSigner:!1,isWritable:!0},{pubkey:y,isSigner:!1,isWritable:!0}],I=tK.alloc(A.span);return A.encode({instruction:1,nonce:b,openTime:_,coinAmount:v,pcAmount:w},I),{instruction:new tu.Sl({keys:S,programId:e,data:I}),instructionType:iw.AmmV4CreatePool}}function ua(e){let{poolKeys:t,version:n,userKeys:r,amountIn:i,amountOut:o,fixedSide:a}=e;if(4===n||5===n){let s={poolKeys:t,userKeys:r};if("in"===a)return function({poolKeys:e,userKeys:t,amountIn:n,minAmountOut:r},i){let o=ip(e),a=tK.alloc(sJ.span);sJ.encode({instruction:9,amountIn:rN(n),minAmountOut:rN(r)},a);let s=[rY({pubkey:td.H_,isWritable:!1}),rY({pubkey:o.id}),rY({pubkey:o.authority,isWritable:!1}),rY({pubkey:o.openOrders})];return 4===i&&s.push(rY({pubkey:o.targetOrders})),s.push(rY({pubkey:o.vault.A}),rY({pubkey:o.vault.B})),5===i&&s.push(rY({pubkey:s4})),s.push(rY({pubkey:o.marketProgramId,isWritable:!1}),rY({pubkey:o.marketId}),rY({pubkey:o.marketBids}),rY({pubkey:o.marketAsks}),rY({pubkey:o.marketEventQueue}),rY({pubkey:o.marketBaseVault}),rY({pubkey:o.marketQuoteVault}),rY({pubkey:o.marketAuthority,isWritable:!1}),rY({pubkey:t.tokenAccountIn}),rY({pubkey:t.tokenAccountOut}),rY({pubkey:t.owner,isWritable:!1})),new tu.Sl({programId:o.programId,keys:s,data:a})}(t1(t0({},s),{amountIn:i,minAmountOut:o}),n);if("out"===a)return function({poolKeys:e,userKeys:t,maxAmountIn:n,amountOut:r},i){let o=ip(e),a=tK.alloc(s0.span);s0.encode({instruction:11,maxAmountIn:rN(n),amountOut:rN(r)},a);let s=[rY({pubkey:td.H_,isWritable:!1}),rY({pubkey:o.id}),rY({pubkey:o.authority,isWritable:!1}),rY({pubkey:o.openOrders}),rY({pubkey:o.targetOrders}),rY({pubkey:o.vault.A}),rY({pubkey:o.vault.B})];return 5===i&&s.push(rY({pubkey:s4})),s.push(rY({pubkey:o.marketProgramId,isWritable:!1}),rY({pubkey:o.marketId}),rY({pubkey:o.marketBids}),rY({pubkey:o.marketAsks}),rY({pubkey:o.marketEventQueue}),rY({pubkey:o.marketBaseVault}),rY({pubkey:o.marketQuoteVault}),rY({pubkey:o.marketAuthority,isWritable:!1}),rY({pubkey:t.tokenAccountIn}),rY({pubkey:t.tokenAccountOut}),rY({pubkey:t.owner,isWritable:!1,isSigner:!0})),new tu.Sl({programId:o.programId,keys:s,data:a})}(t1(t0({},s),{maxAmountIn:i,amountOut:o}),n);ur.logWithError("invalid params","params",e)}throw ur.logWithError("invalid version","poolKeys.version",n),Error("invalid version")}var us=t8("Raydium_liquidity_serum");function uu({programId:e}){let{publicKey:t}=iP([tK.from("amm_config_account_seed","utf-8")],e);return t}function ul({name:e,programId:t,marketId:n}){let{publicKey:r}=iP([t.toBuffer(),n.toBuffer(),tK.from(e,"utf-8")],t);return r}function uc({programId:e}){return iP([tK.from([97,109,109,32,97,117,116,104,111,114,105,116,121])],e)}function ud({version:e,marketVersion:t,marketId:n,baseMint:r,quoteMint:i,baseDecimals:o,quoteDecimals:a,programId:s,marketProgramId:u}){let l=ul({name:"amm_associated_seed",programId:s,marketId:n}),c=ul({name:"lp_mint_associated_seed",programId:s,marketId:n}),{publicKey:d,nonce:p}=uc({programId:s}),f=ul({name:"coin_vault_associated_seed",programId:s,marketId:n}),h=ul({name:"pc_vault_associated_seed",programId:s,marketId:n}),m=ul({name:"temp_lp_token_associated_seed",programId:s,marketId:n}),g=function({programId:e,marketId:t}){let{publicKey:n}=iP([e.toBuffer(),t.toBuffer(),tK.from("open_order_associated_seed","utf-8")],e);return n}({programId:s,marketId:n}),y=ul({name:"target_associated_seed",programId:s,marketId:n}),b=ul({name:"withdraw_associated_seed",programId:s,marketId:n}),{publicKey:_}=function({programId:e,marketId:t}){let n=[t.toBuffer()],r=0,i;for(;r<100;){try{let t=n.concat(tK.from([r]),tK.alloc(7));i=tu.nh.createProgramAddressSync(t,e)}catch(e){if(e instanceof TypeError)throw e;r++;continue}return{publicKey:i,nonce:r}}throw us.logWithError("unable to find a viable program address nonce","params",{programId:e,marketId:t}),Error("unable to find a viable program address nonce")}({programId:u,marketId:n});return{id:l,baseMint:r,quoteMint:i,lpMint:c,baseDecimals:o,quoteDecimals:a,lpDecimals:o,version:e,programId:s,authority:d,nonce:p,baseVault:f,quoteVault:h,lpVault:m,openOrders:g,targetOrders:y,withdrawQueue:b,marketVersion:t,marketProgramId:u,marketId:n,marketAuthority:_,lookupTableAccount:tu.nh.default,configId:uu({programId:s})}}async function up({connection:e,poolKeysList:t,config:n}){p||(p=new un({connection:e}),await p.initStableModelLayout());let r=t.map(e=>(function({poolKeys:e}){let t=o2([o$("instruction"),o$("simulateType")]),n=tK.alloc(t.span);t.encode({instruction:12,simulateType:0},n);let r=[rY({pubkey:new tu.nh(e.id),isWritable:!1}),rY({pubkey:new tu.nh(e.authority),isWritable:!1}),rY({pubkey:new tu.nh(e.openOrders),isWritable:!1}),rY({pubkey:new tu.nh(e.vault.A),isWritable:!1}),rY({pubkey:new tu.nh(e.vault.B),isWritable:!1}),rY({pubkey:new tu.nh(e.mintLp.address),isWritable:!1}),rY({pubkey:new tu.nh(e.marketId),isWritable:!1}),rY({pubkey:new tu.nh(e.marketEventQueue),isWritable:!1})];return{instruction:new tu.Sl({programId:new tu.nh(e.programId),keys:r,data:n})}})({poolKeys:e}));return(await iT(e,r.map(e=>e.instruction),"GetPoolData")).map(e=>{let t;let n=(t=e.match(/{["\w:,]+}/g))&&1===t.length?t[0]:ik.logWithError("simulate log fail to match json, keyword: GetPoolData"),r=new(tb())(iE(n,"status")),i=Number(iE(n,"coin_decimals")),o=Number(iE(n,"pc_decimals")),a=Number(iE(n,"lp_decimals")),s=new(tb())(iE(n,"pool_coin_amount")),u=new(tb())(iE(n,"pool_pc_amount")),l=new(tb())(iE(n,"pool_lp_supply")),c="0";try{c=iE(n,"pool_open_time")}catch{}return{status:r,baseDecimals:i,quoteDecimals:o,lpDecimals:a,baseReserve:s,quoteReserve:u,lpSupply:l,startTime:new(tb())(c)}})}var uf={volume:0,volumeQuote:0,volumeFee:0,apr:0,feeApr:0,priceMin:0,priceMax:0,rewardApr:[]},uh=e=>{let t={},n=td.H_.toBase58();return Object.keys(e).map(r=>{let i=e[r],[o,a]=[i.baseMint.toBase58(),i.quoteMint.toBase58()];t[r]={id:r,version:4,status:i.status.toNumber(),programId:i.programId.toBase58(),mintA:sZ({address:o,programId:n,decimals:i.baseDecimal.toNumber()}),mintB:sZ({address:a,programId:n,decimals:i.quoteDecimal.toNumber()}),rewardDefaultInfos:[],rewardDefaultPoolInfos:"Ecosystem",price:i.poolPrice.toNumber(),mintAmountA:new rM(i.mintAAmount.toString()).div(10**i.baseDecimal.toNumber()).toNumber(),mintAmountB:new rM(i.mintBAmount.toString()).div(10**i.quoteDecimal.toNumber()).toNumber(),baseReserve:i.baseReserve,quoteReserve:i.quoteReserve,feeRate:new rM(i.tradeFeeNumerator.toString()).div(i.tradeFeeDenominator.toString()).toNumber(),openTime:i.poolOpenTime.toString(),tvl:0,day:uf,week:uf,month:uf,pooltype:[],farmUpcomingCount:0,farmOngoingCount:0,farmFinishedCount:0,type:"Standard",marketId:i.marketId.toBase58(),configId:uu({programId:i.programId}).toBase58(),lpPrice:0,lpAmount:0,lpMint:sZ({address:i.lpMint.toBase58(),programId:n,decimals:Math.min(i.baseDecimal.toNumber(),i.quoteDecimal.toNumber())}),burnPercent:0}}),t},um=o2([oU(5),function(e="accountFlags"){let t=new oW(e);return t.addBoolean("initialized"),t.addBoolean("market"),t.addBoolean("openOrders"),t.addBoolean("requestQueue"),t.addBoolean("eventQueue"),t.addBoolean("bids"),t.addBoolean("asks"),t}("accountFlags"),oX("ownAddress"),oH("vaultSignerNonce"),oX("baseMint"),oX("quoteMint"),oX("baseVault"),oH("baseDepositsTotal"),oH("baseFeesAccrued"),oX("quoteVault"),oH("quoteDepositsTotal"),oH("quoteFeesAccrued"),oH("quoteDustThreshold"),oX("requestQueue"),oX("eventQueue"),oX("bids"),oX("asks"),oH("baseLotSize"),oH("quoteLotSize"),oH("feeRateBps"),oH("referrerRebatesAccrued"),oU(7)]);async function ug({connection:e,wallet:t,marketInfo:n}){var r,i,o,a,s,u,l,c;let d=new tu.YW,p=await e.getMinimumBalanceForRentExemption(165);d.add(tu.yc.createAccountWithSeed({fromPubkey:t,basePubkey:t,seed:n.baseVault.seed,newAccountPubkey:n.baseVault.publicKey,lamports:p,space:165,programId:td.H_}),tu.yc.createAccountWithSeed({fromPubkey:t,basePubkey:t,seed:n.quoteVault.seed,newAccountPubkey:n.quoteVault.publicKey,lamports:p,space:165,programId:td.H_}),tq(n.baseVault.publicKey,n.baseMint,n.vaultOwner),tq(n.quoteVault.publicKey,n.quoteMint,n.vaultOwner),tu.yc.createAccountWithSeed({fromPubkey:t,basePubkey:t,seed:n.id.seed,newAccountPubkey:n.id.publicKey,lamports:await e.getMinimumBalanceForRentExemption(um.span),space:um.span,programId:n.programId}));let f=new tu.YW;return f.add(tu.yc.createAccountWithSeed({fromPubkey:t,basePubkey:t,seed:n.requestQueue.seed,newAccountPubkey:n.requestQueue.publicKey,lamports:n.lowestFeeMarket?6208320:await e.getMinimumBalanceForRentExemption(null!=(r=n.requestQueueSpace)?r:5132),space:n.lowestFeeMarket?764:null!=(i=n.requestQueueSpace)?i:5132,programId:n.programId}),tu.yc.createAccountWithSeed({fromPubkey:t,basePubkey:t,seed:n.eventQueue.seed,newAccountPubkey:n.eventQueue.publicKey,lamports:n.lowestFeeMarket?79594560:await e.getMinimumBalanceForRentExemption(null!=(o=n.eventQueueSpace)?o:262156),space:n.lowestFeeMarket?11308:null!=(a=n.eventQueueSpace)?a:262156,programId:n.programId}),tu.yc.createAccountWithSeed({fromPubkey:t,basePubkey:t,seed:n.bids.seed,newAccountPubkey:n.bids.publicKey,lamports:n.lowestFeeMarket?101977920:await e.getMinimumBalanceForRentExemption(null!=(s=n.orderbookQueueSpace)?s:65548),space:n.lowestFeeMarket?14524:null!=(u=n.orderbookQueueSpace)?u:65548,programId:n.programId}),tu.yc.createAccountWithSeed({fromPubkey:t,basePubkey:t,seed:n.asks.seed,newAccountPubkey:n.asks.publicKey,lamports:n.lowestFeeMarket?101977920:await e.getMinimumBalanceForRentExemption(null!=(l=n.orderbookQueueSpace)?l:65548),space:n.lowestFeeMarket?14524:null!=(c=n.orderbookQueueSpace)?c:65548,programId:n.programId}),function({programId:e,marketInfo:t}){let n=o2([o$("version"),oK("instruction"),oH("baseLotSize"),oH("quoteLotSize"),oN("feeRateBps"),oH("vaultSignerNonce"),oH("quoteDustThreshold")]),r=[{pubkey:t.id,isSigner:!1,isWritable:!0},{pubkey:t.requestQueue,isSigner:!1,isWritable:!0},{pubkey:t.eventQueue,isSigner:!1,isWritable:!0},{pubkey:t.bids,isSigner:!1,isWritable:!0},{pubkey:t.asks,isSigner:!1,isWritable:!0},{pubkey:t.baseVault,isSigner:!1,isWritable:!0},{pubkey:t.quoteVault,isSigner:!1,isWritable:!0},{pubkey:t.baseMint,isSigner:!1,isWritable:!1},{pubkey:t.quoteMint,isSigner:!1,isWritable:!1},{pubkey:t.authority?t.quoteMint:tu.ze,isSigner:!1,isWritable:!1}].concat(t.authority?{pubkey:t.authority,isSigner:!1,isWritable:!1}:[]).concat(t.authority&&t.pruneAuthority?{pubkey:t.pruneAuthority,isSigner:!1,isWritable:!1}:[]),i=tK.alloc(n.span);return n.encode({version:0,instruction:0,baseLotSize:t.baseLotSize,quoteLotSize:t.quoteLotSize,feeRateBps:t.feeRateBps,vaultSignerNonce:t.vaultSignerNonce,quoteDustThreshold:t.quoteDustThreshold},i),new tu.Sl({keys:r,programId:e,data:i})}({programId:n.programId,marketInfo:{id:n.id.publicKey,requestQueue:n.requestQueue.publicKey,eventQueue:n.eventQueue.publicKey,bids:n.bids.publicKey,asks:n.asks.publicKey,baseVault:n.baseVault.publicKey,quoteVault:n.quoteVault.publicKey,baseMint:n.baseMint,quoteMint:n.quoteMint,baseLotSize:n.baseLotSize,quoteLotSize:n.quoteLotSize,feeRateBps:n.feeRateBps,vaultSignerNonce:n.vaultSignerNonce,quoteDustThreshold:n.quoteDustThreshold}})),[{transaction:d,signer:[],instructionTypes:[iw.CreateAccount,iw.CreateAccount,iw.InitAccount,iw.InitAccount]},{transaction:f,signer:[],instructionTypes:[iw.CreateAccount,iw.CreateAccount,iw.CreateAccount,iw.CreateAccount,iw.CreateAccount,iw.InitMarket]}]}var uy=class extends oy{async create({baseInfo:e,quoteInfo:t,lotSize:n,tickSize:r,dexProgramId:i,requestQueueSpace:o,eventQueueSpace:a,orderbookQueueSpace:s,lowestFeeMarket:u,assignSeed:l,txVersion:c,computeBudgetConfig:d}){let p=this.scope.ownerPubKey,f=l?`${e.mint.toBase58().slice(0,10)}-${t.mint.toBase58().slice(0,10)}-${l}`:void 0,h=o4({fromPublicKey:p,programId:i,assignSeed:f&&`${f}-market`}),m=o4({fromPublicKey:p,programId:i,assignSeed:f&&`${f}-request`}),g=o4({fromPublicKey:p,programId:i,assignSeed:f&&`${f}-event`}),y=o4({fromPublicKey:p,programId:i,assignSeed:f&&`${f}-bids`}),b=o4({fromPublicKey:p,programId:i,assignSeed:f&&`${f}-asks`}),_=o4({fromPublicKey:p,programId:td.H_,assignSeed:f&&`${f}-baseVault`}),v=o4({fromPublicKey:p,programId:td.H_,assignSeed:f&&`${f}-quoteVault`}),w=new(tb())(100),{vaultOwner:k,vaultSignerNonce:x}=function(){let e=new(tb())(0);for(;;)try{return{vaultOwner:tu.nh.createProgramAddressSync([h.publicKey.toBuffer(),e.toArrayLike(tK,"le",8)],i),vaultSignerNonce:e}}catch{if(e.iaddn(1),e.gt(new(tb())(25555)))throw Error("find vault owner error")}}(),A=new(tb())(Math.round(10**e.decimals*n)),S=new(tb())(Math.round(n*10**t.decimals*r));if(A.eq(ih))throw Error("lot size is too small");if(S.eq(ih))throw Error("tick size or lot size is too small");let I=await ug({connection:this.scope.connection,wallet:this.scope.ownerPubKey,marketInfo:{programId:i,id:h,baseMint:e.mint,quoteMint:t.mint,baseVault:_,quoteVault:v,vaultOwner:k,requestQueue:m,eventQueue:g,bids:y,asks:b,feeRateBps:0,quoteDustThreshold:w,vaultSignerNonce:x,baseLotSize:A,quoteLotSize:S,requestQueueSpace:o,eventQueueSpace:a,orderbookQueueSpace:s,lowestFeeMarket:u}}),T=this.createTxBuilder();for await(let e of(T.addInstruction({instructions:I[0].transaction.instructions,signers:I[0].signer}),I.slice(1,I.length)))T.addInstruction({instructions:e.transaction.instructions,signers:e.signer,instructionTypes:e.instructionTypes});return 0===c?T.sizeCheckBuildV0({computeBudgetConfig:d,address:{marketId:h.publicKey,requestQueue:m.publicKey,eventQueue:g.publicKey,bids:y.publicKey,asks:b.publicKey,baseVault:_.publicKey,quoteVault:v.publicKey,baseMint:new tu.nh(e.mint),quoteMin:new tu.nh(t.mint)}}):T.sizeCheckBuild({computeBudgetConfig:d,address:{marketId:h.publicKey,requestQueue:m.publicKey,eventQueue:g.publicKey,bids:y.publicKey,asks:b.publicKey,baseVault:_.publicKey,quoteVault:v.publicKey,baseMint:new tu.nh(e.mint),quoteMin:new tu.nh(t.mint)}})}},ub=class extends oy{constructor(e){super(e),this.stableLayout=new un({connection:this.scope.connection})}async initLayout(){await this.stableLayout.initStableModelLayout()}async load(){this.checkDisabled()}computePairAmount({poolInfo:e,amount:t,slippage:n,baseIn:r}){let i=new(tb())(new rM(t).mul(10**e[r?"mintA":"mintB"].decimals).toFixed(0)),o=s$(e[r?"mintB":"mintA"]),[a,s]=[new(tb())(new rM(e.mintAmountA).mul(10**e.mintA.decimals).toString()),new(tb())(new rM(e.mintAmountB).mul(10**e.mintB.decimals).toString())],u=new(tb())(new rM(e.lpAmount).mul(10**e.lpMint.decimals).toFixed(0,rM.ROUND_DOWN));this.logDebug("baseReserve:",a.toString(),"quoteReserve:",s.toString()),this.logDebug("tokenIn:",r?e.mintA.symbol:e.mintB.symbol,"amountIn:",i.toString(),"anotherToken:",r?e.mintB.symbol:e.mintA.symbol,"slippage:",`${n.toSignificant()}%`,"baseReserve",a.toString(),"quoteReserve",s.toString());let l=r?"base":"quote";this.logDebug("input side:",l);let c=ih;i.isZero()||(c="base"===l?iy(i.mul(s),a):iy(i.mul(a),s)),this.logDebug("amountRaw:",c.toString(),"lpAmount:",u.toString());let d=iy(i.mul(u),"base"===l?a:s);this.logDebug("liquidity:",d.toString());let p=new is(new(tb())(1)).add(n),f=new is(new(tb())(1)).sub(n),h=p.mul(c).quotient,m=f.mul(c).quotient,g=new rK(o,c),y=new rK(o,h),b=new rK(o,m);return this.logDebug("anotherAmount:",g.toFixed(),"maxAnotherAmount:",y.toFixed()),{anotherAmount:g,maxAnotherAmount:y,minAnotherAmount:b,liquidity:d}}async getAmmPoolKeys(e){return(await this.scope.api.fetchPoolKeysById({idList:[e]}))[0]}async addLiquidity(e){let{poolInfo:t,poolKeys:n,amountInA:r,amountInB:i,otherAmountMin:o,fixedSide:a,config:s,txVersion:u,computeBudgetConfig:l}=e;!1===this.scope.availability.addStandardPosition&&this.logAndCreateError("add liquidity feature disabled in your region"),this.logDebug("amountInA:",r,"amountInB:",i),(r.isZero()||i.isZero())&&this.logAndCreateError("amounts must greater than zero","amountInA & amountInB",{amountInA:r.toFixed(),amountInB:i.toFixed()});let{account:c}=this.scope,{bypassAssociatedCheck:d,checkCreateATAOwner:p}=t0({bypassAssociatedCheck:!1,checkCreateATAOwner:!1},s),[f,h]=[r.token,i.token],m=await c.getCreatedTokenAccount({mint:f.mint,associatedOnly:!1}),g=await c.getCreatedTokenAccount({mint:h.mint,associatedOnly:!1});m||g||this.logAndCreateError("cannot found target token accounts","tokenAccounts",c.tokenAccounts);let y=await c.getCreatedTokenAccount({mint:new tu.nh(t.lpMint.address)}),b=[f,h],_=[m,g],v=[r.raw,i.raw],w=r.token.mint.toBase58()===t.mintA.address?"base":"quote",k="base";["quote","base"].includes(w)||this.logAndCreateError("invalid fixedSide","fixedSide",a),"quote"===w?(b.reverse(),_.reverse(),v.reverse(),k="a"===a?"quote":"base"):"base"===w&&(k="a"===a?"base":"quote");let[x,A]=b,[S,I]=_,[T,E]=v,P=null!=n?n:await this.getAmmPoolKeys(t.id),C=this.createTxBuilder(),O=await c.handleTokenAccount({side:"in",amount:T,mint:x.mint,tokenAccount:S,bypassAssociatedCheck:d,checkCreateATAOwner:p}),{tokenAccount:B}=O,M=t2(O,["tokenAccount"]);C.addInstruction(M);let R=await c.handleTokenAccount({side:"in",amount:E,mint:A.mint,tokenAccount:I,bypassAssociatedCheck:d,checkCreateATAOwner:p}),{tokenAccount:L}=R,N=t2(R,["tokenAccount"]);C.addInstruction(N);let D=await c.handleTokenAccount({side:"out",amount:0,mint:new tu.nh(t.lpMint.address),tokenAccount:y,bypassAssociatedCheck:d,checkCreateATAOwner:p}),{tokenAccount:F}=D,q=t2(D,["tokenAccount"]);return C.addInstruction(q),C.addInstruction({instructions:[function(e){let{poolInfo:t,poolKeys:n,userKeys:r,baseAmountIn:i,quoteAmountIn:o,fixedSide:a,otherAmountMin:s}=e,u=tK.alloc(s2.span);s2.encode({instruction:3,baseAmountIn:rN(i),quoteAmountIn:rN(o),otherAmountMin:rN(s),fixedSide:"base"===a?ih:im},u);let l=[rY({pubkey:td.H_,isWritable:!1}),rY({pubkey:new tu.nh(t.id)}),rY({pubkey:new tu.nh(n.authority),isWritable:!1}),rY({pubkey:new tu.nh(n.openOrders),isWritable:!1}),rY({pubkey:new tu.nh(n.targetOrders)}),rY({pubkey:new tu.nh(t.lpMint.address)}),rY({pubkey:new tu.nh(n.vault.A)}),rY({pubkey:new tu.nh(n.vault.B)})];return t.pooltype.includes("StablePool")&&l.push(rY({pubkey:s4})),l.push(rY({pubkey:new tu.nh(t.marketId),isWritable:!1}),rY({pubkey:r.baseTokenAccount}),rY({pubkey:r.quoteTokenAccount}),rY({pubkey:r.lpTokenAccount}),rY({pubkey:r.owner,isWritable:!1,isSigner:!0}),rY({pubkey:new tu.nh(n.marketEventQueue),isWritable:!1})),new tu.Sl({programId:new tu.nh(t.programId),keys:l,data:u})}({poolInfo:t,poolKeys:P,userKeys:{baseTokenAccount:B,quoteTokenAccount:L,lpTokenAccount:F,owner:this.scope.ownerPubKey},baseAmountIn:T,quoteAmountIn:E,otherAmountMin:o.raw,fixedSide:k})],instructionTypes:[t.pooltype.includes("StablePool")?iw.AmmV5AddLiquidity:iw.AmmV4AddLiquidity],lookupTableAddress:P.lookupTableAccount?[P.lookupTableAccount]:[]}),C.addCustomComputeBudget(l),0===u&&await C.buildV0(),C.build()}async removeLiquidity(e){!1===this.scope.availability.removeStandardPosition&&this.logAndCreateError("remove liquidity feature disabled in your region");let{poolInfo:t,poolKeys:n,lpAmount:r,baseAmountMin:i,quoteAmountMin:o,config:a,txVersion:s,computeBudgetConfig:u}=e,l=null!=n?n:await this.getAmmPoolKeys(t.id),[c,d,p]=[new tu.nh(t.mintA.address),new tu.nh(t.mintB.address),new tu.nh(t.lpMint.address)];this.logDebug("lpAmount:",r),this.logDebug("baseAmountMin:",i),this.logDebug("quoteAmountMin:",o),r.isZero()&&this.logAndCreateError("amount must greater than zero","lpAmount",r.toString());let{account:f}=this.scope,h=await f.getCreatedTokenAccount({mint:p,associatedOnly:!1});h||this.logAndCreateError("cannot found lpTokenAccount","tokenAccounts",f.tokenAccounts);let m=await f.getCreatedTokenAccount({mint:c}),g=await f.getCreatedTokenAccount({mint:d}),y=this.createTxBuilder(),{bypassAssociatedCheck:b,checkCreateATAOwner:_}=t0({bypassAssociatedCheck:!1,checkCreateATAOwner:!1},a),v=await f.handleTokenAccount({side:"out",amount:0,mint:c,tokenAccount:m,bypassAssociatedCheck:b,checkCreateATAOwner:_}),{tokenAccount:w}=v,k=t2(v,["tokenAccount"]);y.addInstruction(k);let x=await f.handleTokenAccount({side:"out",amount:0,mint:d,tokenAccount:g,bypassAssociatedCheck:b,checkCreateATAOwner:_}),{tokenAccount:A}=x,S=t2(x,["tokenAccount"]);return y.addInstruction(S),y.addInstruction({instructions:[ui({poolInfo:t,poolKeys:l,userKeys:{lpTokenAccount:h,baseTokenAccount:w,quoteTokenAccount:A,owner:this.scope.ownerPubKey},lpAmount:r,baseAmountMin:i,quoteAmountMin:o})],lookupTableAddress:l.lookupTableAccount?[l.lookupTableAccount]:[],instructionTypes:[t.pooltype.includes("StablePool")?iw.AmmV5RemoveLiquidity:iw.AmmV4RemoveLiquidity]}),y.addCustomComputeBudget(u),0===s?await y.buildV0():y.build()}async removeAllLpAndCreateClmmPosition({poolInfo:e,clmmPoolInfo:t,removeLpAmount:n,createPositionInfo:r,farmInfo:i,userFarmLpAmount:o,base:a,computeBudgetConfig:s,payer:u,userAuxiliaryLedgers:l,tokenProgram:c=td.H_,checkCreateATAOwner:d=!0,getEphemeralSigners:p,txVersion:f}){if((!1===this.scope.availability.removeStandardPosition||!1===this.scope.availability.createConcentratedPosition)&&this.logAndCreateError("remove liquidity or create position feature disabled in your region"),!(e.mintA.address===t.mintA.address||e.mintA.address===t.mintB.address)||!(e.mintB.address===t.mintA.address||e.mintB.address===t.mintB.address))throw Error("mint check error");let h=this.createTxBuilder();h.addCustomComputeBudget(s);let m={};for(let e of this.scope.account.tokenAccountRawInfos)(void 0===m[e.accountInfo.mint.toString()]||iN(this.scope.ownerPubKey,e.accountInfo.mint,td.H_).publicKey.equals(e.pubkey))&&(m[e.accountInfo.mint.toString()]=e.pubkey);let g=m[e.lpMint.address];if(void 0===g)throw Error("find lp account error in trade accounts");let y=n.add(null!=o?o:new(tb())(0)),b=e.mintA.address===ii.WSOL.mint.toString(),_=e.mintB.address===ii.WSOL.mint.toString(),{account:v,instructionParams:w}=await this.scope.account.getOrCreateTokenAccount({tokenProgram:td.H_,mint:new tu.nh(e.mintA.address),owner:this.scope.ownerPubKey,createInfo:b?{payer:this.scope.ownerPubKey}:void 0,skipCloseAccount:!b,notUseTokenAccount:b,associatedOnly:!0,checkCreateATAOwner:d});if(h.addInstruction(w||{}),void 0===v)throw Error("base token account not found");let{account:k,instructionParams:x}=await this.scope.account.getOrCreateTokenAccount({tokenProgram:td.H_,mint:new tu.nh(e.mintB.address),owner:this.scope.ownerPubKey,createInfo:_?{payer:this.scope.ownerPubKey,amount:0}:void 0,skipCloseAccount:!_,notUseTokenAccount:_,associatedOnly:!0,checkCreateATAOwner:d});if(h.addInstruction(x||{}),void 0===k)throw Error("quote token account not found");if(m[e.mintA.address]=v,m[e.mintB.address]=k,void 0!==i&&!(null!=o&&o.isZero())){let e=aI[i.programId],t=aP({programId:new tu.nh(i.programId),poolId:new tu.nh(i.id),owner:this.scope.ownerPubKey,version:e}),n,r=await this.scope.connection.getAccountInfo(t);if(r&&(n=aB(e).decode(r.data)),6!==e&&!n){let{instruction:n,instructionType:r}=aR({id:new tu.nh(i.id),programId:new tu.nh(i.programId),version:e,ledger:t,owner:this.scope.ownerPubKey});h.addInstruction({instructions:[n],instructionTypes:[r]})}let a=[];for(let e of i.rewardInfos){let t=e.mint.address===ii.WSOL.mint.toString();if(m[e.mint.address])a.push(m[e.mint.address]);else{let{account:n,instructionParams:r}=await this.scope.account.getOrCreateTokenAccount({mint:new tu.nh(e.mint.address),tokenProgram:c,owner:this.scope.ownerPubKey,skipCloseAccount:!t,createInfo:{payer:u||this.scope.ownerPubKey},associatedOnly:!0,checkCreateATAOwner:d});n||this.logAndCreateError("farm reward account not found:",e.mint.address),r&&h.addInstruction(r),a.push(n)}}let s=(await this.scope.api.fetchFarmKeysById({ids:i.id}))[0],p={userAuxiliaryLedgers:l,amount:o,owner:this.scope.ownerPubKey,farmInfo:i,farmKeys:s,lpAccount:g,rewardAccounts:a},f=aI[i.programId],y=6===f?aD(p):5===f?aF(p):aq(p),b={3:iw.FarmV3Withdraw,5:iw.FarmV5Withdraw,6:iw.FarmV6Withdraw};h.addInstruction({instructions:[y],instructionTypes:[b[f]]})}let A=await this.getAmmPoolKeys(e.id),S=ui({poolInfo:e,poolKeys:A,userKeys:{lpTokenAccount:g,baseTokenAccount:v,quoteTokenAccount:k,owner:this.scope.ownerPubKey},lpAmount:y,baseAmountMin:0,quoteAmountMin:0});h.addInstruction({instructions:[S],instructionTypes:[e.pooltype.includes("StablePool")?iw.AmmV5RemoveLiquidity:iw.AmmV4RemoveLiquidity],lookupTableAddress:A.lookupTableAccount?[A.lookupTableAccount]:[]});let[I,T]=e.mintA.address===t.mintA.address?[v,k]:[k,v],E=await this.scope.clmm.getClmmPoolKeys(t.id),P=await sW.openPositionFromBaseInstructions(t1(t0({poolInfo:t,poolKeys:E,ownerInfo:{feePayer:this.scope.ownerPubKey,wallet:this.scope.ownerPubKey,tokenAccountA:I,tokenAccountB:T},withMetadata:"create"},r),{base:a,getEphemeralSigners:p}));return h.addInstruction({instructions:[...P.instructions],signers:P.signers,instructionTypes:[...P.instructionTypes],lookupTableAddress:E.lookupTableAccount?[E.lookupTableAccount]:[]}),0===f?h.sizeCheckBuildV0():h.sizeCheckBuild()}async createPoolV4({programId:e,marketInfo:t,baseMintInfo:n,quoteMintInfo:r,baseAmount:i,quoteAmount:o,startTime:a,ownerInfo:s,associatedOnly:u=!1,checkCreateATAOwner:l=!1,tokenProgram:c,txVersion:d,feeDestinationId:p,computeBudgetConfig:f}){var h;let m=s.feePayer||(null==(h=this.scope.owner)?void 0:h.publicKey),g=s.useSOLBalance&&n.mint.equals(td.Gd),y=s.useSOLBalance&&r.mint.equals(td.Gd),b=this.createTxBuilder(),{account:_,instructionParams:v}=await this.scope.account.getOrCreateTokenAccount({mint:n.mint,owner:this.scope.ownerPubKey,createInfo:g?{payer:m,amount:i}:void 0,notUseTokenAccount:g,skipCloseAccount:!g,associatedOnly:!g&&u,checkCreateATAOwner:l});b.addInstruction(v||{});let{account:w,instructionParams:k}=await this.scope.account.getOrCreateTokenAccount({mint:r.mint,owner:this.scope.ownerPubKey,createInfo:y?{payer:m,amount:o}:void 0,notUseTokenAccount:y,skipCloseAccount:!y,associatedOnly:!y&&u,checkCreateATAOwner:l});if(b.addInstruction(k||{}),void 0===_||void 0===w)throw Error("you don't has some token account");let x=ud({version:4,marketVersion:3,marketId:t.marketId,baseMint:n.mint,quoteMint:r.mint,baseDecimals:n.decimals,quoteDecimals:r.decimals,programId:e,marketProgramId:t.programId}),A={programId:e,ammId:x.id,ammAuthority:x.authority,ammOpenOrders:x.openOrders,lpMint:x.lpMint,coinMint:x.baseMint,pcMint:x.quoteMint,coinVault:x.baseVault,pcVault:x.quoteVault,withdrawQueue:x.withdrawQueue,ammTargetOrders:x.targetOrders,poolTempLp:x.lpVault,marketProgramId:x.marketProgramId,marketId:x.marketId,ammConfigId:x.configId,feeDestinationId:p},{instruction:S,instructionType:I}=uo(t1(t0({},A),{userWallet:this.scope.ownerPubKey,userCoinVault:_,userPcVault:w,userLpVault:iN(this.scope.ownerPubKey,x.lpMint,c).publicKey,nonce:x.nonce,openTime:a,coinAmount:i,pcAmount:o}));return b.addInstruction({instructions:[S],instructionTypes:[I]}),b.addCustomComputeBudget(f),b.versionBuild({txVersion:d,extInfo:{address:A}})}async createMarketAndPoolV4({programId:e=iW,marketProgram:t=iz,feeDestinationId:n=iX,tokenProgram:r,baseMintInfo:i,quoteMintInfo:o,baseAmount:a,quoteAmount:s,startTime:u,ownerInfo:l,lowestFeeMarket:c,assignSeed:d,associatedOnly:p=!1,checkCreateATAOwner:f=!1,lotSize:h=1,tickSize:m=.01,txVersion:g,computeBudgetConfig:y}){var b,_,v;let w=this.scope.ownerPubKey,k=l.feePayer||(null==(b=this.scope.owner)?void 0:b.publicKey),x=l.useSOLBalance&&i.mint.equals(td.Gd),A=l.useSOLBalance&&o.mint.equals(td.Gd),S=d?`${i.mint.toBase58().slice(0,7)}-${o.mint.toBase58().slice(0,7)}-${d}`:void 0,I=o4({fromPublicKey:w,programId:t,assignSeed:S&&`${S}-market`}),T=o4({fromPublicKey:w,programId:t,assignSeed:S&&`${S}-request`}),E=o4({fromPublicKey:w,programId:t,assignSeed:S&&`${S}-event`}),P=o4({fromPublicKey:w,programId:t,assignSeed:S&&`${S}-bids`}),C=o4({fromPublicKey:w,programId:t,assignSeed:S&&`${S}-asks`}),O=o4({fromPublicKey:w,programId:td.H_,assignSeed:S&&`${S}-baseVault`}),B=o4({fromPublicKey:w,programId:td.H_,assignSeed:S&&`${S}-quoteVault`}),M=new(tb())(100),{vaultOwner:R,vaultSignerNonce:L}=function(){let e=new(tb())(0);for(;;)try{return{vaultOwner:tu.nh.createProgramAddressSync([I.publicKey.toBuffer(),e.toArrayLike(tK,"le",8)],t),vaultSignerNonce:e}}catch{if(e.iaddn(1),e.gt(new(tb())(25555)))throw Error("find vault owner error")}}(),N=new(tb())(Math.round(10**i.decimals*h)),D=new(tb())(Math.round(h*10**o.decimals*m));if(N.eq(ih))throw Error("lot size is too small");if(D.eq(ih))throw Error("tick size or lot size is too small");let F=await ug({connection:this.scope.connection,wallet:this.scope.ownerPubKey,marketInfo:{programId:t,vaultOwner:R,baseMint:i.mint,quoteMint:o.mint,id:I,baseVault:O,quoteVault:B,requestQueue:T,eventQueue:E,bids:P,asks:C,feeRateBps:0,quoteDustThreshold:M,vaultSignerNonce:L,baseLotSize:N,quoteLotSize:D,lowestFeeMarket:c}}),q=this.createTxBuilder();for await(let e of(q.addInstruction({instructions:F[0].transaction.instructions,signers:F[0].signer}),F.slice(1,F.length)))q.addInstruction({instructions:e.transaction.instructions,signers:e.signer,instructionTypes:e.instructionTypes});let{account:j,instructionParams:U}=await this.scope.account.getOrCreateTokenAccount({mint:i.mint,owner:this.scope.ownerPubKey,createInfo:x?{payer:k,amount:a}:void 0,notUseTokenAccount:x,skipCloseAccount:!x,associatedOnly:!x&&p,checkCreateATAOwner:f,assignSeed:x&&S?`${S}-wsol`:void 0});q.addInstruction(U||{});let{account:z,instructionParams:V}=await this.scope.account.getOrCreateTokenAccount({mint:o.mint,owner:this.scope.ownerPubKey,createInfo:A?{payer:k,amount:s}:void 0,notUseTokenAccount:A,skipCloseAccount:!A,associatedOnly:!A&&p,checkCreateATAOwner:f,assignSeed:A&&S?`${S}-wsol`:void 0});if(q.addInstruction(V||{}),void 0===j)throw Error("you don't has base token account");if(void 0===z)throw Error("you don't has quote token account");let W=ud({version:4,marketVersion:3,marketId:I.publicKey,baseMint:i.mint,quoteMint:o.mint,baseDecimals:i.decimals,quoteDecimals:o.decimals,programId:e,marketProgramId:t}),$={programId:e,ammId:W.id,ammAuthority:W.authority,ammOpenOrders:W.openOrders,lpMint:W.lpMint,coinMint:W.baseMint,pcMint:W.quoteMint,coinVault:W.baseVault,pcVault:W.quoteVault,withdrawQueue:W.withdrawQueue,ammTargetOrders:W.targetOrders,poolTempLp:W.lpVault,marketProgramId:W.marketProgramId,marketId:W.marketId,ammConfigId:W.configId,feeDestinationId:n},{instruction:K,instructionType:H}=uo(t1(t0({},$),{userWallet:this.scope.ownerPubKey,userCoinVault:j,userPcVault:z,userLpVault:iN(this.scope.ownerPubKey,W.lpMint,r).publicKey,nonce:W.nonce,openTime:u,coinAmount:a,pcAmount:s}));q.addInstruction({instructions:[K],instructionTypes:[H]});let G=x||A?[(null==(_=null==U?void 0:U.instructions)?void 0:_[0])||(null==(v=null==V?void 0:V.instructions)?void 0:v[0])].filter(e=>!!e):void 0;return 0===g?q.sizeCheckBuildV0({computeBudgetConfig:y,splitIns:G,address:t0({requestQueue:T.publicKey,eventQueue:E.publicKey,bids:P.publicKey,asks:C.publicKey,baseVault:O.publicKey,quoteVault:B.publicKey,baseMint:new tu.nh(i.mint),quoteMin:new tu.nh(o.mint)},$)}):q.sizeCheckBuild({computeBudgetConfig:y,splitIns:G,address:t0({requestQueue:T.publicKey,eventQueue:E.publicKey,bids:P.publicKey,asks:C.publicKey,baseVault:O.publicKey,quoteVault:B.publicKey,baseMint:new tu.nh(i.mint),quoteMin:new tu.nh(o.mint)},$)})}async getCreatePoolFee({programId:e}){let t=uu({programId:e}),n=await this.scope.connection.getAccountInfo(t,{dataSlice:{offset:536,length:8}});if(null===n)throw Error("get config account error");return s3.decode(n.data).fee}computeAmountOut({poolInfo:e,amountIn:t,mintIn:n,mintOut:r,slippage:i}){let[o,a]=[n.toString(),r.toString()];if(o!==e.mintA.address&&o!==e.mintB.address||a!==e.mintA.address&&a!==e.mintB.address)throw Error("toke not match");let{baseReserve:s,quoteReserve:u}=e,l=[s,u],c=[e.mintA.decimals,e.mintB.decimals],d=o==e.mintA.address?"base":"quote";"quote"===d&&(l.reverse(),c.reverse());let[p,f]=l,[h,m]=c,g=4===e.version,y;if(g)y=new rM(f.toString()).div(10**m).div(new rM(p.toString()).div(10**h));else{var b,_;let e,t;let n=(b=this.stableLayout.stableModelData,_=s.toNumber(),t=((e=ut(b,s7(b,_,s9(b,_,u.toNumber())),0,!1))[3]?e[0]:0)/b.multiplier,1/t);y="quote"===d?new rM(1e6).div(1e6*n):new rM(1e6*n).div(1e6)}let v=new(tb())(0),w=new(tb())(0);if(!t.isZero()){if(g){w=ot(t.mul(sX),sQ);let e=t.sub(w),n=p.add(e);v=f.mul(e).div(n)}else{w=t.mul(new(tb())(2)).div(new(tb())(1e4));let e=t.sub(w);v=new(tb())("quote"===d?function(e,t,n,r){let i=s9(e,t,n),o=s7(e,t,i),a=s7(e,n,i),s=s7(e,r,i),[u,l,c,d]=ut(e,o,s,!0);return d?c?r*e.multiplier/u:ue(e,a-l,i):0}(this.stableLayout.stableModelData,u.toNumber(),s.toNumber(),e.toNumber()):function(e,t,n,r){let i=s9(e,t,n),o=s7(e,t,i),a=s7(e,n,i),s=s7(e,r,i),[u,l,c,d]=function(e,t,n,r){let i=r?t-n:t+n,[o,a,s]=function(e,t){let[n,r]=[0,49998],i=n,o=r,a=0;for(;i<=o&&!((a=Math.floor((o+i)/2))<=0)&&!(a>=49998);){let n=e.DataElement[a].y,r=e.DataElement[a-1].y,s=e.DataElement[a+1].y;if(t===n)return[a,a,!0];if(t===r)return[a-1,a-1,!0];if(t===s)return[a+1,a+1,!0];if(tn)return[a-1,a,!0];if(ts)return[a,a+1,!0];o=a-1}}return[a,a,!1]}(e,i);if(!s)return[0,0,!1,s];if(o===a)return[e.DataElement[a].price,e.DataElement[a].x,!1,s];{let n=e.DataElement[o].x,u=e.DataElement[a].x,l=e.DataElement[o].price,c=e.DataElement[a].price,d=e.DataElement[o].y,p=e.DataElement[a].y;if(t>=p&&t<=d)return r?[c,u,!0,s]:[l,n,!0,s];{let o,a;return r?(o=l+(c-l)*(d-t)/(d-p),a=n+c*(d-i)/e.multiplier):(o=l+(c-l)*(d-t)/(d-p),a=u-l*(i-p)/e.multiplier),[o,a,!1,s]}}}(e,a,s,!1);return d?c?r*u/e.multiplier:ue(e,o-l,i):0}(this.stableLayout.stableModelData,u.toNumber(),s.toNumber(),e.toNumber()))}}let k=new(tb())(new rM(v.toString()).mul(1-i).toFixed(0)),x=v,A=new rM(v.toString()).div(new rM(t.sub(w).toString()).toFixed(0));t.isZero()||v.isZero()||(A=new rM(v.toString()).div(10**m).div(new rM(t.sub(w).toString()).div(10**h)));let S=y.sub(A).div(y).mul(100);return{amountOut:x,minAmountOut:k,currentPrice:y,executionPrice:A,priceImpact:S,fee:w}}computeAmountIn({poolInfo:e,amountOut:t,mintIn:n,mintOut:r,slippage:i}){let{baseReserve:o,quoteReserve:a}=e;n.toString()!==e.mintA.address&&n.toString()!==e.mintB.address&&this.logAndCreateError("mintIn does not match pool"),r.toString()!==e.mintA.address&&r.toString()!==e.mintB.address&&this.logAndCreateError("mintOut does not match pool"),this.logDebug("baseReserve:",o.toString()),this.logDebug("quoteReserve:",a.toString());let s=n.toString()===e.mintA.address,[u,l]=s?[e.mintA,e.mintB]:[e.mintB,e.mintA];this.logDebug("currencyOut:",l.symbol||l.address),this.logDebug("amountOut:",new rM(t.toString()).div(10**l.decimals).toDecimalPlaces(l.decimals).toString(),u.symbol||u.address),this.logDebug("slippage:",`${100*i}%`);let c=[o,a],d=s?"quote":"base";"base"===d&&c.reverse(),this.logDebug("output side:",d);let[p,f]=c,h=new rM(f.toString()).div(10**e[s?"mintB":"mintA"].decimals).div(new rM(p.toString()).div(10**e[s?"mintA":"mintB"].decimals));this.logDebug("currentPrice:",`1 ${u.symbol||u.address} \u2248 ${h.toString()} ${l.symbol||l.address}`),this.logDebug("currentPrice invert:",`1 ${l.symbol||l.address} \u2248 ${new rM(1).div(h).toString()} ${u.symbol||u.address}`);let m=new(tb())(0),g=t;if(!g.isZero()){g.gt(f)&&(g=f.sub(new(tb())(1)));let e=f.sub(g);m=p.mul(g).div(e).mul(sQ).div(sQ.sub(sX))}let y=new(tb())(new rM(m.toString()).mul(1+i).toFixed(0)),b=m;this.logDebug("amountIn:",new rM(b.toString()).div(10**u.decimals).toDecimalPlaces(u.decimals).toString()),this.logDebug("maxAmountIn:",new rM(y.toString()).div(10**u.decimals).toDecimalPlaces(u.decimals).toString());let _=null;m.isZero()||g.isZero()||(_=new rM(g.toString()).div(10**l.decimals).div(new rM(m.toString()).div(10**u.decimals)),this.logDebug("executionPrice:",`1 ${l.symbol||l.address} \u2248 ${_.toDecimalPlaces(Math.max(e.mintA.decimals,e.mintB.decimals)).toString()} ${u.symbol||u.address}`),this.logDebug("executionPrice invert:",`1 ${l.symbol||l.address} \u2248 ${new rM(1).div(_).toDecimalPlaces(Math.max(e.mintA.decimals,e.mintB.decimals)).toString()} ${u.symbol||u.address}`));let v=h.mul(b.toString()),w=v.sub(t.toString()).abs().div(v);return this.logDebug("priceImpact:",`${w.toString()}%`),{amountIn:b,maxAmountIn:y,currentPrice:h,executionPrice:_,priceImpact:w}}async swap({poolInfo:e,poolKeys:t,amountIn:n,amountOut:r,inputMint:i,fixedSide:o,txVersion:a,config:s,computeBudgetConfig:u}){let l=this.createTxBuilder(),{associatedOnly:c=!0,inputUseSolBalance:d=!0,outputUseSolBalance:p=!0}=s||{},[f,h]=i===e.mintA.address?[e.mintA,e.mintB]:[e.mintB,e.mintA],m=d&&f.address===r7.toBase58(),g=p&&h.address===r7.toBase58(),{account:y,instructionParams:b}=await this.scope.account.getOrCreateTokenAccount({tokenProgram:td.H_,mint:new tu.nh(f.address),owner:this.scope.ownerPubKey,createInfo:m?{payer:this.scope.ownerPubKey,amount:n}:void 0,skipCloseAccount:!m,notUseTokenAccount:m,associatedOnly:c});l.addInstruction(b||{}),y||this.logAndCreateError("input token account not found",{token:f.symbol||f.address,tokenAccountIn:y,inputTokenUseSolBalance:m,associatedOnly:c});let{account:_,instructionParams:v}=await this.scope.account.getOrCreateTokenAccount({tokenProgram:td.H_,mint:new tu.nh(h.address),owner:this.scope.ownerPubKey,createInfo:{payer:this.scope.ownerPubKey,amount:0},skipCloseAccount:!g,notUseTokenAccount:g,associatedOnly:!g&&c});l.addInstruction(v||{}),void 0===_&&this.logAndCreateError("output token account not found",{token:h.symbol||h.address,tokenAccountOut:_,outputTokenUseSolBalance:g,associatedOnly:c});let w=t||await this.getAmmPoolKeys(e.id),k=4;return e.pooltype.includes("StablePool")&&(k=5),l.addInstruction({instructions:[ua({version:k,poolKeys:w,userKeys:{tokenAccountIn:y,tokenAccountOut:_,owner:this.scope.ownerPubKey},amountIn:n,amountOut:r,fixedSide:o})],instructionTypes:[4===k?iw.AmmV4SwapBaseIn:iw.AmmV5SwapBaseIn]}),l.addCustomComputeBudget(u),l.versionBuild({txVersion:a})}async getRpcPoolInfo(e){return(await this.getRpcPoolInfos([e]))[e]}async getRpcPoolInfos(e,t){let n=await ne(this.scope.connection,e.map(e=>({pubkey:new tu.nh(e)})),t),r={},i=[];for(let t=0;t({pubkey:new tu.nh(e)})),t);for(let e=0;ee.mint.address===n.toString());s||this.logAndCreateError("reward mint error","not found reward mint",n);let u=this.createTxBuilder(),l=t.useSOLBalance&&n.equals(r7),{account:c,instructionParams:d}=await this.scope.account.getOrCreateTokenAccount({tokenProgram:new tu.nh(s.mint.programId),mint:n,notUseTokenAccount:l,owner:this.scope.ownerPubKey,skipCloseAccount:!l,createInfo:{payer:t.feePayer||this.scope.ownerPubKey,amount:0},associatedOnly:!l&&r,checkCreateATAOwner:i});d&&u.addInstruction(d),c||this.logAndCreateError("no money","ownerRewardAccount",this.scope.account.tokenAccountRawInfos);let p=await this.getClmmPoolKeys(e.id),f=sW.collectRewardInstructions({poolInfo:e,poolKeys:p,ownerInfo:{wallet:this.scope.ownerPubKey,tokenAccount:c},rewardMint:n});return u.addInstruction(f),u.addCustomComputeBudget(o),u.versionBuild({txVersion:a,extInfo:{address:f.address}})}async collectRewards({poolInfo:e,ownerInfo:t,rewardMints:n,associatedOnly:r=!0,checkCreateATAOwner:i=!1}){let o=this.createTxBuilder(),a={};for(let s of n){let n=e.rewardDefaultInfos.find(e=>e.mint.address===s.toString());if(!n){this.logAndCreateError("reward mint error","not found reward mint",s);continue}let u=t.useSOLBalance&&s.equals(r7),{account:l,instructionParams:c}=await this.scope.account.getOrCreateTokenAccount({tokenProgram:new tu.nh(n.mint.programId),mint:s,notUseTokenAccount:u,owner:this.scope.ownerPubKey,skipCloseAccount:!u,createInfo:{payer:t.feePayer||this.scope.ownerPubKey,amount:0},associatedOnly:!u&&r,checkCreateATAOwner:i});l||this.logAndCreateError("no money","ownerRewardAccount",this.scope.account.tokenAccountRawInfos),c&&o.addInstruction(c);let d=await this.getClmmPoolKeys(e.id),p=sW.collectRewardInstructions({poolInfo:e,poolKeys:d,ownerInfo:{wallet:this.scope.ownerPubKey,tokenAccount:l},rewardMint:s});o.addInstruction(p),a=t0(t0({},a),p.address)}return o.build({address:a})}async swap({poolInfo:e,poolKeys:t,inputMint:n,amountIn:r,amountOutMin:i,priceLimit:o,observationId:a,ownerInfo:s,remainingAccounts:u,associatedOnly:l=!0,checkCreateATAOwner:c=!1,txVersion:d,computeBudgetConfig:p}){let f,h,m=this.createTxBuilder(),g=n.toString()===e.mintA.address,y=s.useSOLBalance&&e.mintA.address===r7.toBase58(),b=s.useSOLBalance&&e.mintB.address===r7.toBase58(),_;if(_=!o||o.equals(new rM(0))?g?aG.add(new(tb())(1)):aZ.sub(new(tb())(1)):sw.priceToSqrtPriceX64(o,e.mintA.decimals,e.mintB.decimals),!f){let{account:t,instructionParams:n}=await this.scope.account.getOrCreateTokenAccount({tokenProgram:e.mintA.programId,mint:new tu.nh(e.mintA.address),notUseTokenAccount:y,owner:this.scope.ownerPubKey,skipCloseAccount:!y,createInfo:y||!g?{payer:s.feePayer||this.scope.ownerPubKey,amount:g?r:0}:void 0,associatedOnly:!y&&l,checkCreateATAOwner:c});f=t,n&&m.addInstruction(n)}if(!h){let{account:t,instructionParams:n}=await this.scope.account.getOrCreateTokenAccount({tokenProgram:e.mintB.programId,mint:new tu.nh(e.mintB.address),notUseTokenAccount:b,owner:this.scope.ownerPubKey,skipCloseAccount:!b,createInfo:b||g?{payer:s.feePayer||this.scope.ownerPubKey,amount:g?0:r}:void 0,associatedOnly:!b&&l,checkCreateATAOwner:c});h=t,n&&m.addInstruction(n)}f&&h||this.logAndCreateError("user do not have token account",{tokenA:e.mintA.symbol||e.mintA.address,tokenB:e.mintB.symbol||e.mintB.address,ownerTokenAccountA:f,ownerTokenAccountB:h,mintAUseSOLBalance:y,mintBUseSOLBalance:b,associatedOnly:l});let v=null!=t?t:await this.getClmmPoolKeys(e.id);return m.addInstruction(sW.makeSwapBaseInInstructions({poolInfo:e,poolKeys:v,observationId:a,ownerInfo:{wallet:this.scope.ownerPubKey,tokenAccountA:f,tokenAccountB:h},inputMint:new tu.nh(n),amountIn:r,amountOutMin:i,sqrtPriceLimitX64:_,remainingAccounts:u})),m.addCustomComputeBudget(p),m.versionBuild({txVersion:d})}async swapBaseOut({poolInfo:e,poolKeys:t,outputMint:n,amountOut:r,amountInMax:i,priceLimit:o,observationId:a,ownerInfo:s,remainingAccounts:u,associatedOnly:l=!0,checkCreateATAOwner:c=!1,txVersion:d,computeBudgetConfig:p}){let f,h,m=this.createTxBuilder(),g=n.toString()===e.mintB.address,y=s.useSOLBalance&&e.mintA.address===r7.toBase58(),b=s.useSOLBalance&&e.mintB.address===r7.toBase58(),_;if(_=!o||o.equals(new rM(0))?n.toString()===e.mintB.address?aG.add(new(tb())(1)):aZ.sub(new(tb())(1)):sw.priceToSqrtPriceX64(o,e.mintA.decimals,e.mintB.decimals),!f){let{account:t,instructionParams:n}=await this.scope.account.getOrCreateTokenAccount({tokenProgram:e.mintA.programId,mint:new tu.nh(e.mintA.address),notUseTokenAccount:y,owner:this.scope.ownerPubKey,skipCloseAccount:!y,createInfo:y||!g?{payer:s.feePayer||this.scope.ownerPubKey,amount:g?i:0}:void 0,associatedOnly:!y&&l,checkCreateATAOwner:c});f=t,n&&m.addInstruction(n)}if(!h){let{account:t,instructionParams:n}=await this.scope.account.getOrCreateTokenAccount({tokenProgram:e.mintB.programId,mint:new tu.nh(e.mintB.address),notUseTokenAccount:b,owner:this.scope.ownerPubKey,skipCloseAccount:!b,createInfo:b||g?{payer:s.feePayer||this.scope.ownerPubKey,amount:g?0:i}:void 0,associatedOnly:!b&&l,checkCreateATAOwner:c});h=t,n&&m.addInstruction(n)}f&&h||this.logAndCreateError("user do not have token account",{tokenA:e.mintA.symbol||e.mintA.address,tokenB:e.mintB.symbol||e.mintB.address,ownerTokenAccountA:f,ownerTokenAccountB:h,mintAUseSOLBalance:y,mintBUseSOLBalance:b,associatedOnly:l});let v=null!=t?t:await this.getClmmPoolKeys(e.id);return m.addInstruction(sW.makeSwapBaseOutInstructions({poolInfo:e,poolKeys:v,observationId:a,ownerInfo:{wallet:this.scope.ownerPubKey,tokenAccountA:f,tokenAccountB:h},outputMint:new tu.nh(n),amountOut:r,amountInMax:i,sqrtPriceLimitX64:_,remainingAccounts:u})),m.addCustomComputeBudget(p),m.versionBuild({txVersion:d})}async harvestAllRewards({allPoolInfo:e,allPositions:t,lockInfo:n,ownerInfo:r,associatedOnly:i=!0,checkCreateATAOwner:o=!1,programId:a,txVersion:s,computeBudgetConfig:u}){var l,c;let d={};for(let e of this.scope.account.tokenAccountRawInfos)i?iN(this.scope.ownerPubKey,e.accountInfo.mint,a).publicKey.equals(e.pubkey)&&(d[e.accountInfo.mint.toString()]=e.pubkey):d[e.accountInfo.mint.toString()]=e.pubkey;let p=Object.values(t).flat().map(e=>e.nftMint),f=await ne(this.scope.connection,p.map(e=>({pubkey:e}))),h={};f.forEach(e=>{var t,n;h[e.pubkey.toBase58()]=null!=(n=null==(t=null==e?void 0:e.accountInfo)?void 0:t.owner)?n:null});let m=this.createTxBuilder();for(let a of Object.values(e)){if(void 0===t[a.id]||!t[a.id].find(e=>!e.liquidity.isZero()||e.rewardInfos.find(e=>!e.rewardAmountOwed.isZero())))continue;let e=a,s=r.useSOLBalance&&e.mintA.address===r7.toString(),u=r.useSOLBalance&&e.mintB.address===r7.toString(),p=d[e.mintA.address];if(!p){let{account:t,instructionParams:n}=await this.scope.account.getOrCreateTokenAccount({tokenProgram:e.mintA.programId,mint:new tu.nh(e.mintA.address),notUseTokenAccount:s,owner:this.scope.ownerPubKey,skipCloseAccount:!s,createInfo:{payer:r.feePayer||this.scope.ownerPubKey,amount:0},associatedOnly:!s&&i,checkCreateATAOwner:o});p=t,n&&m.addInstruction(n)}let f=d[e.mintB.address];if(!f){let{account:t,instructionParams:n}=await this.scope.account.getOrCreateTokenAccount({tokenProgram:e.mintB.programId,mint:new tu.nh(e.mintB.address),notUseTokenAccount:u,owner:this.scope.ownerPubKey,skipCloseAccount:!u,createInfo:{payer:r.feePayer||this.scope.ownerPubKey,amount:0},associatedOnly:!u&&i,checkCreateATAOwner:o});f=t,n&&m.addInstruction(n)}d[e.mintA.address]=p,d[e.mintB.address]=f;let g=[];for(let t of e.rewardDefaultInfos){let e=r.useSOLBalance&&t.mint.address===r7.toString(),n=d[t.mint.address];if(!n){let{account:o,instructionParams:a}=await this.scope.account.getOrCreateTokenAccount({tokenProgram:new tu.nh(t.mint.programId),mint:new tu.nh(t.mint.address),notUseTokenAccount:e,owner:this.scope.ownerPubKey,skipCloseAccount:!e,createInfo:{payer:r.feePayer||this.scope.ownerPubKey,amount:0},associatedOnly:!e&&i});n=o,a&&m.addInstruction(a)}d[t.mint.address]=n,g.push(n)}let y=await this.getClmmPoolKeys(e.id),b=[];for(let e=0;e!e.equals(tu.nh.default)):[]}async getOwnerPositionInfo({programId:e}){await this.scope.account.fetchWalletTokenAccounts();let t=this.scope.account.tokenAccountRawInfos.filter(e=>e.accountInfo.amount.eq(new(tb())(1))).map(t=>sa(new tu.nh(e),t.accountInfo.mint).publicKey),n=await this.scope.connection.getMultipleAccountsInfo(t),r=[];return n.forEach(e=>{if(!e)return;let t=sR.decode(e.data);r.push(t)}),r}async getRpcClmmPoolInfo({poolId:e}){return(await this.getRpcClmmPoolInfos({poolIds:[e]}))[String(e)]}async getRpcClmmPoolInfos({poolIds:e,config:t}){let n=await ne(this.scope.connection,e.map(e=>({pubkey:new tu.nh(e)})),t),r={};for(let t=0;te[t].ammConfig.toBase58())),r=await ne(this.scope.connection,Array.from(n).map(e=>({pubkey:new tu.nh(e)}))),i={};r.forEach(e=>{e.accountInfo&&(i[e.pubkey.toBase58()]=sE.decode(e.accountInfo.data))});let o=await sg.fetchComputeMultipleClmmInfo({connection:this.scope.connection,rpcDataMap:e,poolList:Object.keys(e).map(n=>{var r,o,a,s;let[u,l]=[e[n].mintA.toBase58(),e[n].mintB.toBase58()];return{id:n,programId:e[n].programId.toBase58(),mintA:sZ({address:u,decimals:e[n].mintDecimalsA,programId:t[u].programId.toBase58()||td.H_.toBase58(),extensions:{feeConfig:null!=(r=t[u])&&r.feeConfig?sY(null==(o=t[u])?void 0:o.feeConfig):void 0}}),mintB:sZ({address:l,decimals:e[n].mintDecimalsB,programId:t[l].programId.toBase58()||td.H_.toBase58(),extensions:{feeConfig:null!=(a=t[l])&&a.feeConfig?sY(null==(s=t[l])?void 0:s.feeConfig):void 0}}),price:e[n].currentPrice,config:t1(t0({},i[e[n].ammConfig.toBase58()]),{id:e[n].ammConfig.toBase58(),fundFeeRate:0,description:"",defaultRange:0,defaultRangePoint:[]})}})}),a=await sg.fetchMultiplePoolTickArrays({connection:this.scope.connection,poolKeys:Object.values(o)});return{computeClmmPoolInfo:o,computePoolTickData:a}}async getPoolInfoFromRpc(e){var t,n;let r=await this.getRpcClmmPoolInfo({poolId:e}),i=new Set([r.mintA.toBase58(),r.mintB.toBase58()]),o=await nn({connection:this.scope.connection,mints:Array.from(i).map(e=>new tu.nh(e))}),{computeClmmPoolInfo:a,computePoolTickData:s}=await this.scope.clmm.getComputeClmmPoolInfos({clmmPoolsRpcInfo:{[e]:r},mintInfos:o}),u=await ne(this.scope.connection,[{pubkey:r.vaultA},{pubkey:r.vaultB}]),l=t1(t0({},n=a[e]),{type:"Concentrated",programId:n.programId.toString(),id:n.id.toString(),rewardDefaultInfos:[],rewardDefaultPoolInfos:"Clmm",price:n.currentPrice.toNumber(),mintAmountA:0,mintAmountB:0,feeRate:n.ammConfig.tradeFeeRate,openTime:n.startTime.toString(),tvl:0,day:sy,week:sy,month:sy,pooltype:[],farmUpcomingCount:0,farmOngoingCount:0,farmFinishedCount:0,burnPercent:0,config:t1(t0({},n.ammConfig),{id:n.ammConfig.id.toString(),defaultRange:0,defaultRangePoint:[]})});if(!u[0].accountInfo||!u[1].accountInfo)throw Error("pool vault data not found");l.mintAmountA=Number(tN.p0.decode(u[0].accountInfo.data).amount.toString()),l.mintAmountB=Number(tN.p0.decode(null==(t=u[1].accountInfo)?void 0:t.data).amount.toString());let c=t1(t0({},a[e]),{exBitmapAccount:a[e].exBitmapAccount.toBase58(),observationId:a[e].observationId.toBase58(),id:e,programId:r.programId.toBase58(),openTime:r.startTime.toString(),vault:{A:r.vaultA.toBase58(),B:r.vaultB.toBase58()},config:l.config,rewardInfos:a[e].rewardInfos.filter(e=>!e.tokenVault.equals(tu.nh.default)).map(e=>({mint:sZ({address:e.tokenMint.toBase58(),programId:td.H_.toBase58(),decimals:10}),vault:e.tokenVault.toBase58()}))});return{poolInfo:l,poolKeys:c,computePoolInfo:a[e],tickData:s}}};function uv(e,t){if(t.isZero())throw Error("divisor is zero");return e.mod(t)}var uw=new(tb())(0),uk=class{static swapWithoutFees(e,t,n){let[r,i]=function(e,t){if(t.isZero())throw Error("rhs is zero");let n=e.div(t);if(n.isZero())throw Error("quotient is zero");let r=uv(e,t);return r.gt(uw)&&(n=n.add(new(tb())(1)),t=e.div(n),(r=uv(e,n)).gt(uw)&&(t=t.add(new(tb())(1)))),[n,t]}(t.mul(n),t.add(e)),o=i.sub(t),a=n.sub(r);if(a.isZero())throw Error("destinationAmountSwapped is zero");return{sourceAmountSwapped:o,destinationAmountSwapped:a}}static lpTokensToTradingTokens(e,t,n,r,i){let o=e.mul(n).div(t),a=e.mul(r).div(t);if(0===i)return{tokenAmount0:o,tokenAmount1:a};if(1===i)return uv(e.mul(n),t).gt(uw)&&o.gt(uw)&&(o=o.add(new(tb())(1))),uv(e.mul(r),t).gt(uw)&&a.gt(uw)&&(a=a.add(new(tb())(1))),{tokenAmount0:o,tokenAmount1:a};throw Error("roundDirection value error")}},ux=new(tb())(1e6),uA=class{static tradingFee(e,t){return e.mul(t).add(ux).sub(new(tb())(1)).div(ux)}static protocolFee(e,t){return e.mul(t).div(ux)}static fundFee(e,t){return e.mul(t).div(ux)}},uS=((d=uS||{})[d.Floor=0]="Floor",d[d.Ceiling=1]="Ceiling",d),uI=class{static validate_supply(e,t){if(e.isZero())throw Error("tokenAmount0 is zero");if(t.isZero())throw Error("tokenAmount1 is zero")}static swap(e,t,n,r){let i=uA.tradingFee(e,r),o=e.sub(i),{sourceAmountSwapped:a,destinationAmountSwapped:s}=uk.swapWithoutFees(o,t,n),u=a.add(i);return{newSwapSourceAmount:t.add(u),newSwapDestinationAmount:n.sub(s),sourceAmountSwapped:u,destinationAmountSwapped:s,tradeFee:i}}static swapBaseOut({poolMintA:e,poolMintB:t,tradeFeeRate:n,baseReserve:r,quoteReserve:i,outputMint:o,outputAmount:a}){let[s,u,l,c,d]=t.address===o.toString()?[r,i,e.decimals,t.decimals,e.address]:[i,r,t.decimals,e.decimals,t.address],p=new(tM())(u.toString()).div(10**c).div(new(tM())(s.toString()).div(10**l)),f=a.gte(u)?u.sub(new(tb())(1)):a,h=u.sub(f),m=ot(s.mul(f),h),g=ot(m.mul(new(tb())(1e6)),new(tb())(1e6).sub(n)),y=g.sub(m),b=new(tM())(f.toString()).div(10**c).div(new(tM())(g.toString()).div(10**l));return{amountRealOut:f,amountIn:g,amountInWithoutFee:m,tradeFee:y,priceImpact:p.isZero()?0:b.sub(p).div(p).abs().toNumber()}}},uT=tK.from("vault_and_lp_mint_auth_seed","utf8"),uE=tK.from("amm_config","utf8"),uP=tK.from("pool","utf8"),uC=tK.from("pool_lp_mint","utf8"),uO=tK.from("pool_vault","utf8"),uB=tK.from("observation","utf8");function uM(e){return iP([uT],e)}function uR(e,t){let n;return iP([uE,(n=new ArrayBuffer(2),new DataView(n).setUint16(0,t,!1),new Uint8Array(n))],e)}function uL(e,t,n,r){return iP([uP,t.toBuffer(),n.toBuffer(),r.toBuffer()],e)}function uN(e,t,n){return iP([uO,t.toBuffer(),n.toBuffer()],e)}function uD(e,t){return iP([uB,t.toBuffer()],e)}var uF=tK.from("locked_liquidity","utf8");function uq(e,t){return iP([uF,t.toBuffer()],e)}var uj=t8("Raydium_cpmm"),uU={initialize:[175,175,109,31,13,152,155,237],deposit:[242,35,198,137,82,225,242,182],withdraw:[183,18,70,156,148,109,161,34],swapBaseInput:[143,190,90,218,196,30,51,222],swapBaseOutput:[55,217,98,86,163,74,180,173],lockCpLiquidity:[216,157,29,78,38,51,31,26],collectCpFee:[8,30,51,199,209,184,247,133]};function uz(e,t,n,r,i,o,a,s,u,l,c,d,p,f,h,m){let g=o2([oH("amountIn"),oH("amounOutMin")]),y=tK.alloc(g.span);return g.encode({amountIn:h,amounOutMin:m},y),new tu.Sl({keys:[{pubkey:t,isSigner:!0,isWritable:!1},{pubkey:n,isSigner:!1,isWritable:!1},{pubkey:r,isSigner:!1,isWritable:!1},{pubkey:i,isSigner:!1,isWritable:!0},{pubkey:o,isSigner:!1,isWritable:!0},{pubkey:a,isSigner:!1,isWritable:!0},{pubkey:s,isSigner:!1,isWritable:!0},{pubkey:u,isSigner:!1,isWritable:!0},{pubkey:l,isSigner:!1,isWritable:!1},{pubkey:c,isSigner:!1,isWritable:!1},{pubkey:d,isSigner:!1,isWritable:!1},{pubkey:p,isSigner:!1,isWritable:!1},{pubkey:f,isSigner:!1,isWritable:!0}],programId:e,data:tK.from([...uU.swapBaseInput,...y])})}async function uV(e){var t;let{ownerInfo:n,poolInfo:r,poolKeys:i,getEphemeralSigners:o}=e,a=[],[s,u]=[new tu.nh(r.id),new tu.nh(r.lpMint.address)],l;if(o)l=new tu.nh((await o(1))[0]);else{let e=tu.RG.generate();a.push(e),l=e.publicKey}let{publicKey:c}=iN(n.feePayer,l,td.H_),{publicKey:d}=ss(l),{publicKey:p}=uq(e.lockProgram,l),{publicKey:f}=iN(n.feePayer,u,td.H_),{publicKey:h}=iN(e.lockAuthProgram,u,td.H_),m=function({programId:e,auth:t,payer:n,liquidityOwner:r,nftOwner:i,nftMint:o,nftAccount:a,poolId:s,lockPda:u,mintLp:l,userLpVault:c,lockLpVault:d,poolVaultA:p,poolVaultB:f,metadataAccount:h,lpAmount:m,withMetadata:g}){let y=[{pubkey:t,isSigner:!1,isWritable:!1},{pubkey:n,isSigner:!0,isWritable:!0},{pubkey:r,isSigner:!0,isWritable:!1},{pubkey:i,isSigner:!1,isWritable:!1},{pubkey:o,isSigner:!0,isWritable:!0},{pubkey:a,isSigner:!1,isWritable:!0},{pubkey:s,isSigner:!1,isWritable:!1},{pubkey:u,isSigner:!1,isWritable:!0},{pubkey:l,isSigner:!1,isWritable:!1},{pubkey:c,isSigner:!1,isWritable:!0},{pubkey:d,isSigner:!1,isWritable:!0},{pubkey:p,isSigner:!1,isWritable:!0},{pubkey:f,isSigner:!1,isWritable:!0},{pubkey:h,isSigner:!1,isWritable:!0},{pubkey:r2,isSigner:!1,isWritable:!1},{pubkey:tu.yc.programId,isSigner:!1,isWritable:!1},{pubkey:td.H_,isSigner:!1,isWritable:!1},{pubkey:td._u,isSigner:!1,isWritable:!1},{pubkey:r3,isSigner:!1,isWritable:!1}],b=o2([oH("lpAmount"),oQ("withMetadata")]),_=tK.alloc(b.span);b.encode({lpAmount:m,withMetadata:g},_);let v=tK.from([...uU.lockCpLiquidity,..._]);return new tu.Sl({keys:y,programId:e,data:v})}({programId:e.lockProgram,auth:e.lockAuthProgram,payer:n.feePayer,nftOwner:n.feePayer,liquidityOwner:n.feePayer,nftMint:l,nftAccount:c,poolId:s,lockPda:p,mintLp:u,userLpVault:f,lockLpVault:h,poolVaultA:new tu.nh(i.vault.A),poolVaultB:new tu.nh(i.vault.B),metadataAccount:d,lpAmount:e.lpAmount,withMetadata:null==(t=e.withMetadata)||t});return{address:{nftMint:l,nftAccount:c,metadataAccount:d,lockPda:p,userLpVault:f,lockLpVault:h},instructions:[m],signers:a,instructionTypes:[iw.CpmmLockLp],lookupTableAddress:[]}}var uW=o2([oU(8),o$("bump"),oQ("disableCreatePool"),oN("index"),oH("tradeFeeRate"),oH("protocolFeeRate"),oH("fundFeeRate"),oH("createPoolFee"),oX("protocolOwner"),oX("fundOwner"),o6(oH(),16)]),u$=o2([oU(8),oX("configId"),oX("poolCreator"),oX("vaultA"),oX("vaultB"),oX("mintLp"),oX("mintA"),oX("mintB"),oX("mintProgramA"),oX("mintProgramB"),oX("observationId"),o$("bump"),o$("status"),o$("lpDecimals"),o$("mintDecimalA"),o$("mintDecimalB"),oH("lpAmount"),oH("protocolFeesMintA"),oH("protocolFeesMintB"),oH("fundFeesMintA"),oH("fundFeesMintB"),oH("openTime"),o6(oH(),32)]),uK=class extends oy{constructor(e){super(e)}async load(){this.checkDisabled()}async getCpmmPoolKeys(e){return(await this.scope.api.fetchPoolKeysById({idList:[e]}))[0]}async getRpcPoolInfo(e,t){return(await this.getRpcPoolInfos([e],t))[e]}async getRpcPoolInfos(e,t){let n=await ne(this.scope.connection,e.map(e=>({pubkey:new tu.nh(e)}))),r={},i=new Set,o=[];for(let t=0;t({pubkey:new tu.nh(e)})));for(let n=0;n({pubkey:new tu.nh(e)})));for(let e=0;e{var i,o,a,s;let u=e[r],[l,c]=[u.mintA.toBase58(),u.mintB.toBase58()];return t1(t0({},n),{[r]:t1(t0({},u),{id:new tu.nh(r),configInfo:u.configInfo,version:7,authority:uM(u.programId).publicKey,mintA:sZ({address:l,decimals:u.mintDecimalA,programId:u.mintProgramA.toBase58(),extensions:{feeConfig:null!=(i=t[l])&&i.feeConfig?sY(null==(o=t[l])?void 0:o.feeConfig):void 0}}),mintB:sZ({address:c,decimals:u.mintDecimalB,programId:u.mintProgramB.toBase58(),extensions:{feeConfig:null!=(a=t[c])&&a.feeConfig?sY(null==(s=t[c])?void 0:s.feeConfig):void 0}})})})},{})}async getPoolInfoFromRpc(e){let t=await this.getRpcPoolInfo(e,!0),n=await nn({connection:this.scope.connection,mints:[t.mintA,t.mintB]}),r=sZ({address:t.mintA.toBase58(),decimals:t.mintDecimalA,programId:t.mintProgramA.toBase58(),extensions:{feeConfig:n[t.mintA.toBase58()].feeConfig?sY(n[t.mintA.toBase58()].feeConfig):void 0}}),i=sZ({address:t.mintB.toBase58(),decimals:t.mintDecimalB,programId:t.mintProgramB.toBase58(),extensions:{feeConfig:n[t.mintB.toBase58()].feeConfig?sY(n[t.mintB.toBase58()].feeConfig):void 0}}),o=sZ({address:t.mintLp.toBase58(),decimals:t.lpDecimals,programId:td.H_.toBase58()}),a={id:t.configId.toBase58(),index:t.configInfo.index,protocolFeeRate:t.configInfo.protocolFeeRate.toNumber(),tradeFeeRate:t.configInfo.tradeFeeRate.toNumber(),fundFeeRate:t.configInfo.fundFeeRate.toNumber(),createPoolFee:t.configInfo.createPoolFee.toString()},s={volume:0,volumeQuote:0,volumeFee:0,apr:0,feeApr:0,priceMin:0,priceMax:0,rewardApr:[]};return{poolInfo:{programId:t.programId.toBase58(),id:e,type:"Standard",lpMint:o,lpPrice:0,lpAmount:t.lpAmount.toNumber(),config:a,mintA:r,mintB:i,rewardDefaultInfos:[],rewardDefaultPoolInfos:"Ecosystem",price:t.poolPrice.toNumber(),mintAmountA:new rM(t.vaultAAmount.toString()).div(10**r.decimals).toNumber(),mintAmountB:new rM(t.vaultBAmount.toString()).div(10**i.decimals).toNumber(),feeRate:t.configInfo.tradeFeeRate.toNumber(),openTime:t.openTime.toString(),tvl:0,burnPercent:0,day:s,week:s,month:s,pooltype:[],farmUpcomingCount:0,farmOngoingCount:0,farmFinishedCount:0},poolKeys:{programId:t.programId.toBase58(),id:e,mintA:r,mintB:i,openTime:t.openTime.toString(),vault:{A:t.vaultA.toBase58(),B:t.vaultB.toBase58()},authority:uM(t.programId).publicKey.toBase58(),mintLp:o,config:a,observationId:uD(t.programId,new tu.nh(e)).publicKey.toBase58()},rpcData:t}}async createPool(e){let t,n,r,i;var o,a,s,u,l,c,d,p,f,h,m,g,y,b,{poolId:_,programId:v,poolFeeAccount:w,startTime:k,ownerInfo:x,associatedOnly:A=!1,checkCreateATAOwner:S=!1,txVersion:I,feeConfig:T,computeBudgetConfig:E}=e,P=t2(e,["poolId","programId","poolFeeAccount","startTime","ownerInfo","associatedOnly","checkCreateATAOwner","txVersion","feeConfig","computeBudgetConfig"]);let C=x.feePayer||(null==(g=this.scope.owner)?void 0:g.publicKey),O=new(tb())(new tu.nh(P.mintA.address).toBuffer()).lte(new(tb())(new tu.nh(P.mintB.address).toBuffer())),[B,M]=O?[P.mintA,P.mintB]:[P.mintB,P.mintA],[R,L]=O?[P.mintAAmount,P.mintBAmount]:[P.mintBAmount,P.mintAAmount],N=x.useSOLBalance&&B.address===td.Gd.toBase58(),D=x.useSOLBalance&&M.address===td.Gd.toBase58(),[F,q]=[new tu.nh(B.address),new tu.nh(M.address)],j=this.createTxBuilder(),{account:U,instructionParams:z}=await this.scope.account.getOrCreateTokenAccount({mint:F,tokenProgram:B.programId,owner:this.scope.ownerPubKey,createInfo:N?{payer:C,amount:R}:void 0,notUseTokenAccount:N,skipCloseAccount:!N,associatedOnly:!N&&A,checkCreateATAOwner:S});j.addInstruction(z||{});let{account:V,instructionParams:W}=await this.scope.account.getOrCreateTokenAccount({mint:new tu.nh(M.address),tokenProgram:M.programId,owner:this.scope.ownerPubKey,createInfo:D?{payer:C,amount:L}:void 0,notUseTokenAccount:D,skipCloseAccount:!D,associatedOnly:!D&&A,checkCreateATAOwner:S});if(j.addInstruction(W||{}),void 0===U||void 0===V)throw Error("you don't has some token account");let $=function({poolId:e,programId:t,configId:n,mintA:r,mintB:i}){let o=uM(t).publicKey,a=e||uL(t,n,r,i).publicKey,s=iP([uC,a.toBuffer()],t).publicKey,u=uN(t,a,r).publicKey,l=uN(t,a,i).publicKey,c=uD(t,a).publicKey;return{poolId:a,configId:n,authority:o,lpMint:s,vaultA:u,vaultB:l,observationId:c}}({poolId:_,programId:v,configId:new tu.nh(T.id),mintA:F,mintB:q});return j.addInstruction({instructions:[(o=this.scope.ownerPubKey,a=new tu.nh(T.id),s=$.authority,u=$.poolId,l=$.lpMint,c=iN(this.scope.ownerPubKey,$.lpMint).publicKey,d=$.vaultA,p=$.vaultB,f=new tu.nh(null!=(y=B.programId)?y:td.H_),h=new tu.nh(null!=(b=M.programId)?b:td.H_),m=$.observationId,t=o2([oH("amountMaxA"),oH("amountMaxB"),oH("openTime")]),n=uL(v,a,F,q).publicKey,r=[{pubkey:o,isSigner:!0,isWritable:!1},{pubkey:a,isSigner:!1,isWritable:!1},{pubkey:s,isSigner:!1,isWritable:!1},{pubkey:u,isSigner:!u.equals(n),isWritable:!0},{pubkey:F,isSigner:!1,isWritable:!1},{pubkey:q,isSigner:!1,isWritable:!1},{pubkey:l,isSigner:!1,isWritable:!0},{pubkey:U,isSigner:!1,isWritable:!0},{pubkey:V,isSigner:!1,isWritable:!0},{pubkey:c,isSigner:!1,isWritable:!0},{pubkey:d,isSigner:!1,isWritable:!0},{pubkey:p,isSigner:!1,isWritable:!0},{pubkey:w,isSigner:!1,isWritable:!0},{pubkey:m,isSigner:!1,isWritable:!0},{pubkey:td.H_,isSigner:!1,isWritable:!1},{pubkey:f,isSigner:!1,isWritable:!1},{pubkey:h,isSigner:!1,isWritable:!1},{pubkey:td._u,isSigner:!1,isWritable:!1},{pubkey:r4,isSigner:!1,isWritable:!1},{pubkey:r2,isSigner:!1,isWritable:!1}],i=tK.alloc(t.span),t.encode({amountMaxA:R,amountMaxB:L,openTime:k},i),new tu.Sl({keys:r,programId:v,data:tK.from([...uU.initialize,...i])}))],instructionTypes:[iw.CpmmCreatePool]}),j.addCustomComputeBudget(E),j.versionBuild({txVersion:I,extInfo:{address:t1(t0({},$),{mintA:B,mintB:M,programId:v,poolFeeAccount:w,feeConfig:T})}})}async addLiquidity(e){var t,n,r,i,o,a,s,u,l,c;let d,p,f,{poolInfo:h,poolKeys:m,inputAmount:g,baseIn:y,slippage:b,computeResult:_,computeBudgetConfig:v,config:w,txVersion:k}=e;!1===this.scope.availability.addStandardPosition&&this.logAndCreateError("add liquidity feature disabled in your region"),g.isZero()&&this.logAndCreateError("amounts must greater than zero","amountInA",{amountInA:g.toString()});let{account:x}=this.scope,{bypassAssociatedCheck:A,checkCreateATAOwner:S}=t0({bypassAssociatedCheck:!1,checkCreateATAOwner:!1},w),I=_?void 0:await this.getRpcPoolInfo(h.id),{liquidity:T,inputAmountFee:E,anotherAmount:P}=_||this.computePairAmount({poolInfo:t1(t0({},h),{lpAmount:new rM(I.lpAmount.toString()).div(10**h.lpMint.decimals).toNumber()}),baseReserve:I.baseReserve,quoteReserve:I.quoteReserve,slippage:new is(0),baseIn:y,epochInfo:await this.scope.fetchEpochInfo(),amount:new rM(g.toString()).div(10**(y?h.mintA.decimals:h.mintB.decimals))}),C=P.amount,O=h.mintA.address===td.Gd.toString(),B=h.mintB.address===td.Gd.toString(),M=this.createTxBuilder(),[R,L]=[new tu.nh(h.mintA.address),new tu.nh(h.mintB.address)],{account:N,instructionParams:D}=await this.scope.account.getOrCreateTokenAccount({tokenProgram:h.mintA.programId,mint:new tu.nh(h.mintA.address),owner:this.scope.ownerPubKey,createInfo:O||(y?g:C).isZero()?{payer:this.scope.ownerPubKey,amount:y?g:C}:void 0,skipCloseAccount:!O,notUseTokenAccount:O,associatedOnly:!1,checkCreateATAOwner:S});M.addInstruction(D||{});let{account:F,instructionParams:q}=await this.scope.account.getOrCreateTokenAccount({tokenProgram:h.mintB.programId,mint:new tu.nh(h.mintB.address),owner:this.scope.ownerPubKey,createInfo:B||(y?C:g).isZero()?{payer:this.scope.ownerPubKey,amount:y?C:g}:void 0,skipCloseAccount:!B,notUseTokenAccount:B,associatedOnly:!1,checkCreateATAOwner:S});M.addInstruction(q||{}),N||F||this.logAndCreateError("cannot found target token accounts","tokenAccounts",x.tokenAccounts);let j=await x.getCreatedTokenAccount({mint:new tu.nh(h.lpMint.address)}),U=await x.handleTokenAccount({side:"out",amount:0,mint:new tu.nh(h.lpMint.address),tokenAccount:j,bypassAssociatedCheck:A,checkCreateATAOwner:S}),{tokenAccount:z}=U,V=t2(U,["tokenAccount"]);M.addInstruction(V);let W=null!=m?m:await this.getCpmmPoolKeys(h.id),$=new is(new(tb())(1)).sub(b);return M.addInstruction({instructions:[(t=new tu.nh(h.programId),n=this.scope.ownerPubKey,r=new tu.nh(W.authority),i=new tu.nh(h.id),o=new tu.nh(W.vault.A),a=new tu.nh(W.vault.B),s=new tu.nh(h.lpMint.address),u=_?null==_?void 0:_.liquidity:$.mul(T).quotient,l=y?E.amount:C,c=y?C:E.amount,d=o2([oH("lpAmount"),oH("amountMaxA"),oH("amountMaxB")]),p=[{pubkey:n,isSigner:!0,isWritable:!1},{pubkey:r,isSigner:!1,isWritable:!1},{pubkey:i,isSigner:!1,isWritable:!0},{pubkey:z,isSigner:!1,isWritable:!0},{pubkey:N,isSigner:!1,isWritable:!0},{pubkey:F,isSigner:!1,isWritable:!0},{pubkey:o,isSigner:!1,isWritable:!0},{pubkey:a,isSigner:!1,isWritable:!0},{pubkey:td.H_,isSigner:!1,isWritable:!1},{pubkey:td.nA,isSigner:!1,isWritable:!1},{pubkey:R,isSigner:!1,isWritable:!1},{pubkey:L,isSigner:!1,isWritable:!1},{pubkey:s,isSigner:!1,isWritable:!0}],f=tK.alloc(d.span),uj.debug("cpmm deposit data",{lpAmount:u.toString(),amountMaxA:l.toString(),amountMaxB:c.toString()}),d.encode({lpAmount:u,amountMaxA:l,amountMaxB:c},f),new tu.Sl({keys:p,programId:t,data:tK.from([...uU.deposit,...f])}))],instructionTypes:[iw.CpmmAddLiquidity],lookupTableAddress:W.lookupTableAccount?[W.lookupTableAccount]:[]}),M.addCustomComputeBudget(v),M.versionBuild({txVersion:k})}async withdrawLiquidity(e){var t,n,r,i,o,a,s,u,l,c,d;let p,f,h;let{poolInfo:m,poolKeys:g,lpAmount:y,slippage:b,computeBudgetConfig:_,txVersion:v}=e;!1===this.scope.availability.addStandardPosition&&this.logAndCreateError("add liquidity feature disabled in your region");let w=new is(new(tb())(1)).sub(b),k=await this.getRpcPoolInfo(m.id),[x,A]=[w.mul(y.mul(k.baseReserve).div(k.lpAmount)).quotient,w.mul(y.mul(k.quoteReserve).div(k.lpAmount)).quotient],S=await this.scope.fetchEpochInfo(),[I,T]=[i7(x,m.mintA.extensions.feeConfig,S,!1),i7(A,m.mintB.extensions.feeConfig,S,!1)],{account:E}=this.scope,P=this.createTxBuilder(),[C,O]=[new tu.nh(m.mintA.address),new tu.nh(m.mintB.address)],B=C.equals(r7),M=O.equals(r7),{account:R,instructionParams:L}=await this.scope.account.getOrCreateTokenAccount({tokenProgram:m.mintA.programId,mint:new tu.nh(m.mintA.address),notUseTokenAccount:B,owner:this.scope.ownerPubKey,createInfo:{payer:this.scope.ownerPubKey,amount:0},skipCloseAccount:!B,associatedOnly:!B,checkCreateATAOwner:!1});L&&P.addInstruction(L);let{account:N,instructionParams:D}=await this.scope.account.getOrCreateTokenAccount({tokenProgram:m.mintB.programId,mint:new tu.nh(m.mintB.address),notUseTokenAccount:M,owner:this.scope.ownerPubKey,createInfo:{payer:this.scope.ownerPubKey,amount:0},skipCloseAccount:!M,associatedOnly:!M,checkCreateATAOwner:!1});D&&P.addInstruction(D),R&&N||this.logAndCreateError("cannot found target token accounts","tokenAccounts",E.tokenAccounts);let F=await E.getCreatedTokenAccount({mint:new tu.nh(m.lpMint.address)});F||this.logAndCreateError("cannot found lp token account","tokenAccounts",E.tokenAccounts);let q=null!=g?g:await this.getCpmmPoolKeys(m.id);return P.addInstruction({instructions:[(r=new tu.nh(m.programId),i=this.scope.ownerPubKey,o=new tu.nh(q.authority),a=new tu.nh(m.id),s=new tu.nh(q.vault.A),u=new tu.nh(q.vault.B),l=new tu.nh(m.lpMint.address),c=x.sub(null!=(t=I.fee)?t:new(tb())(0)),d=A.sub(null!=(n=T.fee)?n:new(tb())(0)),p=o2([oH("lpAmount"),oH("amountMinA"),oH("amountMinB")]),f=[{pubkey:i,isSigner:!0,isWritable:!1},{pubkey:o,isSigner:!1,isWritable:!1},{pubkey:a,isSigner:!1,isWritable:!0},{pubkey:F,isSigner:!1,isWritable:!0},{pubkey:R,isSigner:!1,isWritable:!0},{pubkey:N,isSigner:!1,isWritable:!0},{pubkey:s,isSigner:!1,isWritable:!0},{pubkey:u,isSigner:!1,isWritable:!0},{pubkey:td.H_,isSigner:!1,isWritable:!1},{pubkey:td.nA,isSigner:!1,isWritable:!1},{pubkey:C,isSigner:!1,isWritable:!1},{pubkey:O,isSigner:!1,isWritable:!1},{pubkey:l,isSigner:!1,isWritable:!0},{pubkey:r1,isSigner:!1,isWritable:!1}],h=tK.alloc(p.span),p.encode({lpAmount:y,amountMinA:c,amountMinB:d},h),new tu.Sl({keys:f,programId:r,data:tK.from([...uU.withdraw,...h])}))],instructionTypes:[iw.CpmmWithdrawLiquidity],lookupTableAddress:q.lookupTableAccount?[q.lookupTableAccount]:[]}),P.addCustomComputeBudget(_),P.versionBuild({txVersion:v})}async swap(e){var t,n,r,i,o,a,s,u,l,c,d,p,f,h,m,g,y,b;let _,v;let{poolInfo:w,poolKeys:k,baseIn:x,fixedOut:A,inputAmount:S,swapResult:I,slippage:T=0,config:E,computeBudgetConfig:P,txVersion:C}=e,{bypassAssociatedCheck:O,checkCreateATAOwner:B,associatedOnly:M}=t0({bypassAssociatedCheck:!1,checkCreateATAOwner:!1,associatedOnly:!0},E),R=this.createTxBuilder(),[L,N]=[new tu.nh(w.mintA.address),new tu.nh(w.mintB.address)];A?I.sourceAmountSwapped=I.sourceAmountSwapped.mul(new(tb())((1+T)*1e4)).div(new(tb())(1e4)):I.destinationAmountSwapped=I.destinationAmountSwapped.mul(new(tb())((1-T)*1e4)).div(new(tb())(1e4));let D=w.mintA.address===r7.toBase58(),F=w.mintB.address===r7.toBase58(),{account:q,instructionParams:j}=await this.scope.account.getOrCreateTokenAccount({mint:L,tokenProgram:new tu.nh(null!=(t=w.mintA.programId)?t:td.H_),owner:this.scope.ownerPubKey,createInfo:D||!x?{payer:this.scope.ownerPubKey,amount:x?I.sourceAmountSwapped:0}:void 0,notUseTokenAccount:D,skipCloseAccount:!D,associatedOnly:!D&&M,checkCreateATAOwner:B});j&&R.addInstruction(j);let{account:U,instructionParams:z}=await this.scope.account.getOrCreateTokenAccount({mint:N,tokenProgram:new tu.nh(null!=(n=w.mintB.programId)?n:td.H_),owner:this.scope.ownerPubKey,createInfo:F||x?{payer:this.scope.ownerPubKey,amount:x?0:I.sourceAmountSwapped}:void 0,notUseTokenAccount:F,skipCloseAccount:!F,associatedOnly:!F&&M,checkCreateATAOwner:B});z&&R.addInstruction(z),q&&U||this.logAndCreateError("user do not have token account",{mintA:w.mintA.symbol||w.mintA.address,mintB:w.mintB.symbol||w.mintB.address,mintATokenAcc:q,mintBTokenAcc:U,mintAUseSOLBalance:D,mintBUseSOLBalance:F,associatedOnly:M});let V=null!=k?k:await this.getCpmmPoolKeys(w.id);return R.addInstruction({instructions:[A?(s=new tu.nh(w.programId),u=this.scope.ownerPubKey,l=new tu.nh(V.authority),c=new tu.nh(V.config.id),d=new tu.nh(w.id),p=new tu.nh(V.vault[x?"A":"B"]),f=new tu.nh(V.vault[x?"B":"A"]),h=new tu.nh(null!=(o=w[x?"mintA":"mintB"].programId)?o:td.H_),m=new tu.nh(null!=(a=w[x?"mintB":"mintA"].programId)?a:td.H_),g=uD(new tu.nh(w.programId),new tu.nh(w.id)).publicKey,y=I.sourceAmountSwapped,b=I.destinationAmountSwapped,_=o2([oH("amountInMax"),oH("amountOut")]),v=tK.alloc(_.span),_.encode({amountInMax:y,amountOut:b},v),new tu.Sl({keys:[{pubkey:u,isSigner:!0,isWritable:!1},{pubkey:l,isSigner:!1,isWritable:!1},{pubkey:c,isSigner:!1,isWritable:!1},{pubkey:d,isSigner:!1,isWritable:!0},{pubkey:x?q:U,isSigner:!1,isWritable:!0},{pubkey:x?U:q,isSigner:!1,isWritable:!0},{pubkey:p,isSigner:!1,isWritable:!0},{pubkey:f,isSigner:!1,isWritable:!0},{pubkey:h,isSigner:!1,isWritable:!1},{pubkey:m,isSigner:!1,isWritable:!1},{pubkey:x?L:N,isSigner:!1,isWritable:!1},{pubkey:x?N:L,isSigner:!1,isWritable:!1},{pubkey:g,isSigner:!1,isWritable:!0}],programId:s,data:tK.from([...uU.swapBaseOutput,...v])})):uz(new tu.nh(w.programId),this.scope.ownerPubKey,new tu.nh(V.authority),new tu.nh(V.config.id),new tu.nh(w.id),x?q:U,x?U:q,new tu.nh(V.vault[x?"A":"B"]),new tu.nh(V.vault[x?"B":"A"]),new tu.nh(null!=(r=w[x?"mintA":"mintB"].programId)?r:td.H_),new tu.nh(null!=(i=w[x?"mintB":"mintA"].programId)?i:td.H_),x?L:N,x?N:L,uD(new tu.nh(w.programId),new tu.nh(w.id)).publicKey,S,I.destinationAmountSwapped)],instructionTypes:[A?iw.CpmmSwapBaseOut:iw.ClmmSwapBaseIn]}),R.addCustomComputeBudget(P),R.versionBuild({txVersion:C})}async lockLp(e){var t,n,r,i,o;let{poolInfo:a,lpAmount:s,computeBudgetConfig:u,txVersion:l}=e;s.isZero()&&this.logAndCreateError("lpAmount must greater than zero",{lpAmount:s.toString()});let c=this.createTxBuilder(),d=null!=(t=e.poolKeys)?t:await this.getCpmmPoolKeys(a.id),p=await uV({poolInfo:a,poolKeys:d,ownerInfo:{wallet:this.scope.ownerPubKey,feePayer:null!=(n=e.feePayer)?n:this.scope.ownerPubKey},lockProgram:null!=(r=e.programId)?r:i4,lockAuthProgram:null!=(i=e.authProgram)?i:i5,lpAmount:s,withMetadata:null==(o=e.withMetadata)||o,getEphemeralSigners:e.getEphemeralSigners});return c.addInstruction(p),c.addCustomComputeBudget(u),c.versionBuild({txVersion:l,extInfo:p.address})}async harvestLockLp(e){var t;let{poolInfo:n,lpFeeAmount:r,nftMint:i,programId:o=i4,authProgram:a=i5,cpmmProgram:s,computeBudgetConfig:u,txVersion:l}=e;r.isZero()&&this.logAndCreateError("lpFeeAmount must greater than zero",{lpAmount:r.toString()});let c=e.feePayer||this.scope.ownerPubKey,d=this.createTxBuilder(),[p,f]=[new tu.nh(n.mintA.address),new tu.nh(n.mintB.address)],h=p.equals(r7),m=f.equals(r7),{account:g,instructionParams:y}=await this.scope.account.getOrCreateTokenAccount({tokenProgram:n.mintA.programId,mint:new tu.nh(n.mintA.address),notUseTokenAccount:h,owner:this.scope.ownerPubKey,createInfo:{payer:this.scope.ownerPubKey,amount:0},skipCloseAccount:!h,associatedOnly:!h,checkCreateATAOwner:!1});y&&d.addInstruction(y);let{account:b,instructionParams:_}=await this.scope.account.getOrCreateTokenAccount({tokenProgram:n.mintB.programId,mint:new tu.nh(n.mintB.address),notUseTokenAccount:m,owner:this.scope.ownerPubKey,createInfo:{payer:this.scope.ownerPubKey,amount:0},skipCloseAccount:!m,associatedOnly:!m,checkCreateATAOwner:!1});_&&d.addInstruction(_),g&&b||this.logAndCreateError("cannot found target token accounts",{tokenAccountA:g,tokenAccountB:b});let v=null!=(t=e.poolKeys)?t:await this.getCpmmPoolKeys(n.id),{publicKey:w}=iN(c,i,td.H_),{publicKey:k}=uq(o,i),{publicKey:x}=iN(a,new tu.nh(n.lpMint.address),td.H_);return d.addInstruction({instructions:[function({programId:e,nftOwner:t,auth:n,nftAccount:r,lockPda:i,poolId:o,mintLp:a,userVaultA:s,userVaultB:u,poolVaultA:l,poolVaultB:c,mintA:d,mintB:p,lockLpVault:f,lpFeeAmount:h,cpmmProgram:m,cpmmAuthProgram:g}){let y=[{pubkey:n,isSigner:!1,isWritable:!1},{pubkey:t,isSigner:!0,isWritable:!1},{pubkey:r,isSigner:!1,isWritable:!0},{pubkey:i,isSigner:!1,isWritable:!0},{pubkey:null!=m?m:i2,isSigner:!1,isWritable:!1},{pubkey:null!=g?g:i6,isSigner:!1,isWritable:!1},{pubkey:o,isSigner:!1,isWritable:!0},{pubkey:a,isSigner:!1,isWritable:!0},{pubkey:s,isSigner:!1,isWritable:!0},{pubkey:u,isSigner:!1,isWritable:!0},{pubkey:l,isSigner:!1,isWritable:!0},{pubkey:c,isSigner:!1,isWritable:!0},{pubkey:d,isSigner:!1,isWritable:!1},{pubkey:p,isSigner:!1,isWritable:!1},{pubkey:f,isSigner:!1,isWritable:!0},{pubkey:td.H_,isSigner:!1,isWritable:!1},{pubkey:td.nA,isSigner:!1,isWritable:!1},{pubkey:r1,isSigner:!1,isWritable:!1}],b=o2([oH("lpFeeAmount")]),_=tK.alloc(b.span);b.encode({lpFeeAmount:h},_);let v=tK.from([...uU.collectCpFee,..._]);return new tu.Sl({keys:y,programId:e,data:v})}({programId:null!=o?o:i4,nftOwner:this.scope.ownerPubKey,auth:null!=a?a:i5,nftMint:i,nftAccount:w,lockPda:k,poolId:new tu.nh(n.id),mintLp:new tu.nh(v.mintLp.address),userVaultA:g,userVaultB:b,poolVaultA:new tu.nh(v.vault.A),poolVaultB:new tu.nh(v.vault.B),mintA:p,mintB:f,lockLpVault:x,lpFeeAmount:r,cpmmProgram:null==s?void 0:s.programId,cpmmAuthProgram:null==s?void 0:s.authProgram})],instructionTypes:[iw.CpmmCollectLockFee]}),d.addCustomComputeBudget(u),d.versionBuild({txVersion:l})}computeSwapAmount({pool:e,amountIn:t,outputMint:n,slippage:r}){let i=n.toString()===e.mintB.address,o=uI.swap(t,i?e.baseReserve:e.quoteReserve,i?e.quoteReserve:e.baseReserve,e.configInfo.tradeFeeRate),a=new rM(o.destinationAmountSwapped.toString()).div(o.sourceAmountSwapped.toString()),s=o.destinationAmountSwapped.mul(new(tb())((1-r)*1e4)).div(new(tb())(1e4));return{allTrade:o.sourceAmountSwapped.eq(t),amountIn:t,amountOut:o.destinationAmountSwapped,minAmountOut:s,executionPrice:a,fee:o.tradeFee,priceImpact:e.poolPrice.sub(a).div(e.poolPrice)}}computePairAmount({poolInfo:e,baseReserve:t,quoteReserve:n,amount:r,slippage:i,epochInfo:o,baseIn:a}){var s,u,l,c,d,p,f,h,m;let g=1-Number(i.toSignificant())/100,y=new(tb())(new rM(r).mul(10**e[a?"mintA":"mintB"].decimals).mul(g).toFixed(0)),b=i7(y,e[a?"mintA":"mintB"].extensions.feeConfig,o,!1),_=y.sub(null!=(s=b.fee)?s:new(tb())(0)),v=new(tb())(new rM(e.lpAmount).mul(10**e.lpMint.decimals).toFixed(0,rM.ROUND_DOWN));this.logDebug("baseReserve:",t.toString(),"quoteReserve:",n.toString()),this.logDebug("tokenIn:",a?e.mintA.symbol:e.mintB.symbol,"amountIn:",y.toString(),"amountInFee:",null!=(l=null==(u=b.fee)?void 0:u.toString())?l:0,"anotherToken:",a?e.mintB.symbol:e.mintA.symbol,"slippage:",`${i.toSignificant()}%`);let w=a?"base":"quote";this.logDebug("input side:",w);let k=_.mul(v).div("base"===w?t:n),x={amount:ih,fee:void 0,expirationTime:void 0};if(!_.isZero()){let r,i;let s=((r=k.mul(t).div(v)).isZero()||k.mul(t).mod(v).isZero()||(r=r.add(new(tb())(1))),(i=k.mul(n).div(v)).isZero()||k.mul(n).mod(v).isZero()||(i=i.add(new(tb())(1))),{amountA:r,amountB:i});this.logDebug("lpAmountData:",{amountA:s.amountA.toString(),amountB:s.amountB.toString()}),x=i7(s[a?"amountB":"amountA"],e[a?"mintB":"mintA"].extensions.feeConfig,o,!0)}let A=new is(new(tb())(1)).add(i),S=new is(new(tb())(1)).sub(i),I=i7(A.mul(x.amount.sub(null!=(c=x.fee)?c:new(tb())(0))).quotient,e[a?"mintB":"mintA"].extensions.feeConfig,o,!0),T=i7(S.mul(x.amount.sub(null!=(d=x.fee)?d:new(tb())(0))).quotient,e[a?"mintB":"mintA"].extensions.feeConfig,o,!0);return this.logDebug("anotherAmount:",x.amount.toString(),"anotherAmountFee:",null!=(f=null==(p=x.fee)?void 0:p.toString())?f:0,"maxAnotherAmount:",I.amount.toString(),"maxAnotherAmountFee:",null!=(m=null==(h=I.fee)?void 0:h.toString())?m:0),{inputAmountFee:b,anotherAmount:x,maxAnotherAmount:I,minAnotherAmount:T,liquidity:k}}},uH={[iV.toBase58()]:3},uG={3:iV},uZ=o2([oU(5),oU(8),oX("ownAddress"),oH("vaultSignerNonce"),oX("baseMint"),oX("quoteMint"),oX("baseVault"),oH("baseDepositsTotal"),oH("baseFeesAccrued"),oX("quoteVault"),oH("quoteDepositsTotal"),oH("quoteFeesAccrued"),oH("quoteDustThreshold"),oX("requestQueue"),oX("eventQueue"),oX("bids"),oX("asks"),oH("baseLotSize"),oH("quoteLotSize"),oH("feeRateBps"),oH("referrerRebatesAccrued"),oU(7)]),uY={3:uZ},uX=t8("Serum"),uQ=class{static getProgramId(e){let t=uG[e];return t||uX.logWithError("invalid version","version",e),t}static getVersion(e){let t=e.toBase58(),n=uH[t];return n||uX.logWithError("invalid program id","programId",t),n}static getStateLayout(e){let t=uY[e];return t||uX.logWithError(!!t,"invalid version","version",e),t}static getLayouts(e){return{state:this.getStateLayout(e)}}static getAssociatedAuthority({programId:e,marketId:t}){let n=[t.toBuffer()],r=0,i;for(;r<100;){try{let t=n.concat(tK.from([r]),tK.alloc(7));i=tu.nh.createProgramAddressSync(t,e)}catch(e){if(e instanceof TypeError)throw e;r++;continue}return{publicKey:i,nonce:r}}return uX.logWithError("unable to find a viable program address nonce","params",{programId:e,marketId:t}),{publicKey:tu.nh.default,nonce:r}}},uJ=new(tb())(0),u0=class extends oy{constructor(e){super(e)}async getWSolAccounts(){this.scope.checkOwner(),await this.scope.account.fetchWalletTokenAccounts();let e=this.scope.account.tokenAccounts.filter(e=>e.mint.equals(r7));return e.sort((e,t)=>e.isAssociated?1:t.isAssociated||e.amount.lt(t.amount)?-1:1),e}async unWrapWSol(e){let{amount:t,tokenProgram:n,txVersion:r=1}=e,i=await this.getWSolAccounts(),o=this.createTxBuilder();o.addCustomComputeBudget(e.computeBudgetConfig);let a=await o9({connection:this.scope.connection,owner:this.scope.ownerPubKey,payer:this.scope.ownerPubKey,amount:0});o.addInstruction(a);let s=rN(t);for(let e=0;evoid 0!==e),address:{}}}throw Error("route type error")}({routeProgram:i,inputMint:f,swapInfo:t1(t0({},e),{poolInfo:[...e.poolInfoList],poolKey:y,outputMint:h}),ownerInfo:{wallet:this.scope.ownerPubKey,sourceToken:m,routeToken:s,destinationToken:a}});if(void 0!==e.feeConfig){let t=this.createTxBuilder();t.addInstruction({instructions:[t$(m,e.feeConfig.feeAccount,this.scope.ownerPubKey,e.feeConfig.feeAmount.toNumber())],instructionTypes:[iw.TransferAmount]}),t.addInstruction(b);let{transactions:n}=0===o?await t.sizeCheckBuildV0():await t.sizeCheckBuild();n.length<2&&u.addInstruction({instructions:[t$(m,e.feeConfig.feeAccount,this.scope.ownerPubKey,e.feeConfig.feeAmount.toNumber())],instructionTypes:[iw.TransferAmount]})}return u.addInstruction(b),0===o?u.sizeCheckBuildV0({computeBudgetConfig:r,address:b.address}):u.sizeCheckBuild({computeBudgetConfig:r,address:b.address})}async fetchRoutePoolBasicInfo(e){let{amm:t=iW,clmm:n=iH,cpmm:r=i2}=e||{},i=await this.scope.connection.getProgramAccounts(t,{dataSlice:{offset:s1.offsetOf("baseMint"),length:64}}),o=o2([oX("baseMint"),oX("quoteMint")]),a=i.map(e=>({id:e.pubkey,version:4,mintA:o.decode(e.account.data).baseMint,mintB:o.decode(e.account.data).quoteMint})),s=o2([oX("mintA"),oX("mintB")]);return{clmmPools:(await this.scope.connection.getProgramAccounts(n,{filters:[{dataSize:sB.span}],dataSlice:{offset:sB.offsetOf("mintA"),length:64}})).map(e=>{let t=s.decode(e.account.data);return{id:e.pubkey,version:6,mintA:t.mintA,mintB:t.mintB}}),ammPools:a,cpmmPools:(await this.scope.connection.getProgramAccounts(r,{dataSlice:{offset:u$.offsetOf("mintA"),length:64}})).map(e=>{let t=s.decode(e.account.data);return{id:e.pubkey,version:7,mintA:t.mintA,mintB:t.mintB}})}}getAllRoute({inputMint:e,outputMint:t,clmmPools:n,ammPools:r,cpmmPools:i}){e=e.toString()===tu.nh.default.toString()?r7:e,t=t.toString()===tu.nh.default.toString()?r7:t;let o={},a={},s={},u=[],l={};for(let r of null!=n?n:[]){if((r.mintA.equals(e)&&r.mintB.equals(t)||r.mintA.equals(t)&&r.mintB.equals(e))&&(u.push(r),a[r.id.toString()]=r),r.mintA.equals(e)){let e=r.mintB.toString();void 0===l[e]&&(l[e]={mintProgram:td.H_,in:[],out:[],mDecimals:0}),l[e].in.push(r)}if(r.mintB.equals(e)){let e=r.mintA.toString();void 0===l[e]&&(l[e]={mintProgram:td.H_,in:[],out:[],mDecimals:0}),l[e].in.push(r)}if(r.mintA.equals(t)){let e=r.mintB.toString();void 0===l[e]&&(l[e]={mintProgram:td.H_,in:[],out:[],mDecimals:0}),l[e].out.push(r)}if(r.mintB.equals(t)){let e=r.mintA.toString();void 0===l[e]&&(l[e]={mintProgram:td.H_,in:[],out:[],mDecimals:0}),l[e].out.push(r)}}let c=[];for(let n of r)(n.mintA.equals(e)&&n.mintB.equals(t)||n.mintA.equals(t)&&n.mintB.equals(e))&&(u.push(n),o[n.id.toBase58()]=n,c.push(n)),n.mintA.equals(e)&&(void 0===l[n.mintB.toBase58()]&&(l[n.mintB.toBase58()]={mintProgram:td.H_,in:[],out:[],mDecimals:0}),l[n.mintB.toBase58()].in.push(n)),n.mintB.equals(e)&&(void 0===l[n.mintA.toBase58()]&&(l[n.mintA.toBase58()]={mintProgram:td.H_,in:[],out:[],mDecimals:0}),l[n.mintA.toBase58()].in.push(n)),n.mintA.equals(t)&&(void 0===l[n.mintB.toBase58()]&&(l[n.mintB.toBase58()]={mintProgram:td.H_,in:[],out:[],mDecimals:0}),l[n.mintB.toBase58()].out.push(n)),n.mintB.equals(t)&&(void 0===l[n.mintA.toBase58()]&&(l[n.mintA.toBase58()]={mintProgram:td.H_,in:[],out:[],mDecimals:0}),l[n.mintA.toBase58()].out.push(n));for(let n of i)(n.mintA.equals(e)&&n.mintB.equals(t)||n.mintA.equals(t)&&n.mintB.equals(e))&&(u.push(n),s[n.id.toBase58()]=n),n.mintA.equals(e)&&(void 0===l[n.mintB.toBase58()]&&(l[n.mintB.toBase58()]={mintProgram:td.H_,in:[],out:[],mDecimals:0}),l[n.mintB.toBase58()].in.push(n)),n.mintB.equals(e)&&(void 0===l[n.mintA.toBase58()]&&(l[n.mintA.toBase58()]={mintProgram:td.H_,in:[],out:[],mDecimals:0}),l[n.mintA.toBase58()].in.push(n)),n.mintA.equals(t)&&(void 0===l[n.mintB.toBase58()]&&(l[n.mintB.toBase58()]={mintProgram:td.H_,in:[],out:[],mDecimals:0}),l[n.mintB.toBase58()].out.push(n)),n.mintB.equals(t)&&(void 0===l[n.mintA.toBase58()]&&(l[n.mintA.toBase58()]={mintProgram:td.H_,in:[],out:[],mDecimals:0}),l[n.mintA.toBase58()].out.push(n));for(let e of Object.keys(l)){if(1===l[e].in.length&&1===l[e].out.length&&l[e].in[0].id.equals(l[e].out[0].id)||0===l[e].in.length||0===l[e].out.length){delete l[e];continue}let t=l[e];for(let e of t.in)for(let n of t.out)6===e.version&&void 0===a[e.id.toString()]?a[e.id.toString()]=e:7===e.version&&void 0===s[e.id.toString()]?s[e.id.toString()]=e:(4===e.version||5===e.version)&&void 0===o[e.id.toString()]&&(o[e.id.toString()]=e),6===n.version&&void 0===a[n.id.toString()]?a[n.id.toString()]=n:7===n.version&&void 0===s[n.id.toString()]?s[n.id.toString()]=n:(4===n.version||5===n.version)&&void 0===o[n.id.toString()]&&(o[n.id.toString()]=n)}return{directPath:u,addLiquidityPools:c,routePathDict:l,needSimulate:Object.values(o),needTickArray:Object.values(a),cpmmPoolList:Object.values(s)}}async fetchSwapRoutesData({routes:e,inputMint:t,outputMint:n}){let r=new Set([...e.needTickArray.map(e=>[e.mintA.toBase58(),e.mintB.toBase58()]).flat(),t.toString(),n.toString()]);console.log("fetching amm pools info, total: ",e.needSimulate.length);let i=await this.scope.liquidity.getRpcPoolInfos(e.needSimulate.map(e=>e.id)),o=uh(i),a={};Object.values(o).forEach(e=>{r.delete(e.mintA.address),a[e.mintA.address]={address:new tu.nh(e.mintA.address),programId:td.H_,mintAuthority:null,supply:BigInt(0),decimals:e.mintA.decimals,isInitialized:!0,freezeAuthority:null,tlvData:tK.from("0","hex"),feeConfig:void 0},r.delete(e.mintB.address),a[e.mintB.address]={address:new tu.nh(e.mintB.address),programId:td.H_,mintAuthority:null,supply:BigInt(0),decimals:e.mintB.decimals,isInitialized:!0,freezeAuthority:null,tlvData:tK.from("0","hex"),feeConfig:void 0}}),console.log("fetching cpmm pools info, total: ",e.cpmmPoolList.length);let s=await this.scope.cpmm.getRpcPoolInfos(e.cpmmPoolList.map(e=>e.id.toBase58()),!0);Object.values(s).forEach(e=>{let[t,n]=[e.mintA.toBase58(),e.mintB.toBase58()];e.mintProgramA.equals(td.H_)?(r.delete(t),a[t]={address:e.mintA,programId:e.mintProgramA,mintAuthority:null,supply:BigInt(0),decimals:e.mintDecimalA,isInitialized:!0,freezeAuthority:null,tlvData:tK.from("0","hex"),feeConfig:void 0}):r.add(t),e.mintProgramB.equals(td.H_)?(r.delete(n),a[n]={address:e.mintB,programId:e.mintProgramB,mintAuthority:null,supply:BigInt(0),decimals:e.mintDecimalB,isInitialized:!0,freezeAuthority:null,tlvData:tK.from("0","hex"),feeConfig:void 0}):r.add(n)}),console.log("fetching mints info, total: ",r.size);let u=await nn({connection:this.scope.connection,mints:Array.from(r).map(e=>new tu.nh(e))});a=t0(t0({},a),u);let l=this.scope.cpmm.toComputePoolInfos({pools:s,mintInfos:a});console.log("fetching clmm pools info, total:",e.needTickArray.length);let c=await this.scope.clmm.getRpcClmmPoolInfos({poolIds:e.needTickArray.map(e=>e.id)}),{computeClmmPoolInfo:d,computePoolTickData:p}=await this.scope.clmm.getComputeClmmPoolInfos({clmmPoolsRpcInfo:c,mintInfos:a}),f=Object.keys(e.routePathDict).reduce((t,n)=>t1(t0({},t),{[n]:t1(t0({},e.routePathDict[n]),{mintProgram:a[n].programId,mDecimals:a[n].decimals,in:e.routePathDict[n].in.map(e=>o[e.id.toBase58()]||d[e.id.toBase58()]||l[e.id.toBase58()]),out:e.routePathDict[n].out.map(e=>o[e.id.toBase58()]||d[e.id.toBase58()]||l[e.id.toBase58()])})}),{});return{mintInfos:a,ammPoolsRpcInfo:i,ammSimulateCache:o,clmmPoolsRpcInfo:c,computeClmmPoolInfo:d,computePoolTickData:p,computeCpmmData:l,routePathDict:f}}getAllRouteComputeAmountOut({inputTokenAmount:e,outputToken:t,directPath:n,routePathDict:r,simulateCache:i,tickCache:o,slippage:a,chainTime:s,epochInfo:u,feeConfig:l}){var c,d,p,f,h,m,g,y,b;let _=void 0===l?new(tb())(0):e.raw.mul(new(tb())(l.feeBps.toNumber())).div(new(tb())(1e4)),v=e.raw.sub(_),w=new rK(e.token,v),k=void 0===l?void 0:{feeAmount:_,feeAccount:l.feeAccount},x=t1(t0({},t),{address:it(t.address).toString()}),A=[];for(let e of n)try{A.push(t1(t0({},this.computeAmountOut({itemPool:e,tickCache:o,simulateCache:i,chainTime:s,epochInfo:u,slippage:a,outputToken:x,amountIn:w})),{feeConfig:k}))}catch(t){this.logDebug("direct error",e.version,e.id.toString(),t.message)}for(let[e,t]of(this.logDebug("direct done"),Object.entries(r))){let n={chainId:101,address:e,programId:t.mintProgram.toBase58(),logoURI:"",symbol:"",name:"",decimals:t.mDecimals,tags:[],extensions:{}},r=t.in.map(e=>{try{return{pool:e,data:this.computeAmountOut({itemPool:e,tickCache:o,simulateCache:i,chainTime:s,epochInfo:u,slippage:a,outputToken:n,amountIn:w})}}catch(t){this.logDebug("route in error",e.version,e.id.toString(),t.message);return}}).sort((e,t)=>{var n,r,i,o;let a=void 0===e?uJ:e.data.amountOut.amount.raw.sub(null!=(r=null==(n=e.data.amountOut.fee)?void 0:n.raw)?r:uJ),s=void 0===t?uJ:t.data.amountOut.amount.raw.sub(null!=(o=null==(i=t.data.amountOut.fee)?void 0:i.raw)?o:uJ);return a.lt(s)?1:-1})[0];if(void 0===r)continue;let l=new rK(s$(n),r.data.amountOut.amount.raw.sub(null!=(d=null==(c=r.data.amountOut.fee)?void 0:c.raw)?d:uJ));for(let e of t.out)try{let t=this.computeAmountOut({itemPool:e,tickCache:o,simulateCache:i,chainTime:s,epochInfo:u,slippage:a,outputToken:x,amountIn:l});A.push(t1(t0({},t),{allTrade:!!(r.data.allTrade&&t.allTrade),amountIn:r.data.amountIn,amountOut:t.amountOut,minAmountOut:t.minAmountOut,currentPrice:void 0,executionPrice:new rM(new il({baseToken:r.data.amountIn.amount.token,denominator:r.data.amountIn.amount.raw,quoteToken:t.amountOut.amount.token,numerator:t.amountOut.amount.raw.sub(null!=(f=null==(p=t.amountOut.fee)?void 0:p.raw)?f:uJ)}).toFixed()),priceImpact:new rM(r.data.priceImpact.add(t.priceImpact).toFixed()),fee:[r.data.fee[0],t.fee[0]],routeType:"route",poolInfoList:[r.pool,e],remainingAccounts:[r.data.remainingAccounts[0],t.remainingAccounts[0]],minMiddleAmountFee:null!=(h=t.amountOut.fee)&&h.raw?new rK(r.data.amountOut.amount.token,(null!=(g=null==(m=r.data.amountOut.fee)?void 0:m.raw)?g:uJ).add(null!=(b=null==(y=t.amountOut.fee)?void 0:y.raw)?b:uJ)):void 0,middleToken:r.data.amountOut.amount.token,poolReady:r.data.poolReady&&t.poolReady,poolType:[r.data.poolType,t.poolType],feeConfig:k,expirationTime:oe(r.data.expirationTime,t.expirationTime)}))}catch(t){this.logDebug("route out error",e.version,e.id.toString(),t.message)}}return A.filter(e=>(e.allTrade||this.logDebug(`pool ${e.poolInfoList.map(e=>e.id.toString()).join(",")} filter out since not all trade`),e.allTrade)).sort((e,t)=>e.amountOut.amount.raw.sub(t.amountOut.amount.raw).gt(uJ)?-1:1)}computeAmountOut({itemPool:e,tickCache:t,simulateCache:n,chainTime:r,epochInfo:i,slippage:o,outputToken:a,amountIn:s}){if(6===e.version){let{allTrade:n,realAmountIn:u,amountOut:l,minAmountOut:c,expirationTime:d,currentPrice:p,executionPrice:f,priceImpact:h,fee:m,remainingAccounts:g,executionPriceX64:y}=sg.computeAmountOutFormat({poolInfo:e,tickArrayCache:t[e.id.toString()],amountIn:s.raw,tokenOut:a,slippage:o,epochInfo:i,catchLiquidityInsufficient:!0});return{allTrade:n,amountIn:u,amountOut:l,minAmountOut:c,currentPrice:new rM(p.toFixed()),executionPrice:new rM(f.toFixed()),priceImpact:new rM(h.toFixed()),fee:[m],remainingAccounts:[g],routeType:"amm",poolInfoList:[e],poolReady:e.startTime6===e.version&&!t[e.id.toString()]).map(e=>e.id.toString()));if(r.size>0){let e=await this.scope.clmm.getRpcClmmPoolInfos({poolIds:Array.from(r)});Object.keys(e).forEach(n=>{t[n]=e[n]})}if(new Set(e.filter(e=>4===e.version&&!n[e.id.toString()]).map(e=>e.id.toString())).size>0){let e=await this.scope.liquidity.getRpcPoolInfos(Array.from(r));Object.keys(e).forEach(t=>{n[t]=e[t]})}let i=new Set(e.filter(e=>4===e.version).map(e=>e.marketId)),o={};i.size>0&&(await ne(this.scope.connection,Array.from(i).map(e=>({pubkey:new tu.nh(e)})))).forEach(e=>{if(!e.accountInfo)return;let t=uZ.decode(e.accountInfo.data);o[e.pubkey.toBase58()]={marketId:e.pubkey.toString(),marketProgramId:e.accountInfo.owner.toString(),marketAuthority:uQ.getAssociatedAuthority({programId:e.accountInfo.owner,marketId:e.pubkey}).publicKey.toString(),marketBaseVault:t.baseVault.toString(),marketQuoteVault:t.quoteVault.toString(),marketBids:t.bids.toString(),marketAsks:t.asks.toString(),marketEventQueue:t.eventQueue.toString()}});let a=[];return e.forEach(e=>{if(6===e.version){let n=t[e.id.toString()],r={programId:e.programId.toBase58(),id:e.id.toBase58(),mintA:e.mintA,mintB:e.mintB,openTime:String(e.startTime),vault:{A:n.vaultA.toBase58(),B:n.vaultB.toBase58()},config:t1(t0({},e.ammConfig),{id:e.ammConfig.id.toString(),defaultRange:0,defaultRangePoint:[]}),rewardInfos:[],observationId:e.observationId.toBase58(),exBitmapAccount:e.exBitmapAccount.toBase58()};a.push(r)}else if(4===e.version){let t=n[e.id.toString()],r=t0({programId:e.programId,id:e.id,mintA:e.mintA,mintB:e.mintB,openTime:String(e.openTime),vault:{A:t.baseVault.toBase58(),B:t.quoteVault.toBase58()},authority:uc({programId:new tu.nh(e.programId)}).publicKey.toString(),openOrders:t.openOrders.toBase58(),targetOrders:t.targetOrders.toBase58(),mintLp:e.lpMint},o[e.marketId]);a.push(r)}else 7===e.version&&a.push({observationId:e.observationId.toBase58(),programId:e.programId.toBase58(),id:e.id.toBase58(),mintA:e.mintA,mintB:e.mintB,openTime:String(e.openTime),authority:uM(e.programId).publicKey.toBase58(),vault:{A:e.vaultA.toBase58(),B:e.vaultB.toBase58()},mintLp:sZ({address:e.mintLp.toBase58(),programId:td.H_.toBase58(),decimals:e.lpDecimals}),config:t1(t0({id:e.configId.toBase58()},e.configInfo),{protocolFeeRate:e.configInfo.protocolFeeRate.toNumber(),tradeFeeRate:e.configInfo.tradeFeeRate.toNumber(),fundFeeRate:e.configInfo.fundFeeRate.toNumber(),createPoolFee:e.configInfo.createPoolFee.toString()})})}),a}},u1=class extends oy{static getPdaPoolId(e,t){return iP([u1.SEED_CONFIG.pool.id,t.toBuffer()],e)}static getPdaOwnerId(e,t,n,r){return iP([u1.SEED_CONFIG.owner.id,t.toBuffer(),n.toBuffer(),tK.from(new(tb())(r).toArray())],e)}static async getAllInfo({connection:e,programId:t,poolIds:n,wallet:r,chainTime:i}){if(0===n.length)return[];let o=n.map(e=>u1.getPdaPoolId(t,e).publicKey),a=[];for(let e=0;eu1.getPdaOwnerId(t,n,r,e).publicKey));let s=await t7(e,[...o,...a]),u=[];for(let e=0;ee.debtAmount.gt(new(tb())(0))).filter(e=>!e).length,_=i>g&&i({mintAddress:e.mintAddress,mintVault:e.mintVault,mintDecimals:e.mintDecimals,perLpLoss:e.perLpLoss,debtAmount:m.tokenInfo[t].debtAmount.add(m.tokenInfo[t].claimedAmount)}))})}return u}async makeClaimTransaction({poolInfo:e,ownerInfo:t}){t.wallet||this.scope.checkOwner();let n=this.createTxBuilder(),r=t.wallet||this.scope.ownerPubKey,i=[];for(let o of e.tokenInfo){let{account:e,instructionParams:a}=await this.scope.account.getOrCreateTokenAccount({mint:o.mintAddress,owner:this.scope.ownerPubKey,notUseTokenAccount:o.mintAddress.equals(ii.WSOL.mint),createInfo:{payer:r,amount:0},skipCloseAccount:!o.mintAddress.equals(ii.WSOL.mint),associatedOnly:!o.mintAddress.equals(ii.WSOL.mint)&&t.associatedOnly});a&&n.addInstruction(a),i.push(e)}n.addInstruction({instructions:[u1.makeClaimInstruction({programId:e.programId,poolInfo:e,ownerInfo:{wallet:r,ownerPda:e.ownerAccountId,claimAddress:i}})]});let{transaction:o,signers:a}=n.build();return[{transaction:o,signer:a}]}async makeClaimAllTransaction({poolInfos:e,ownerInfo:t}){let n=this.createTxBuilder(),r=t.wallet||this.scope.ownerPubKey,i={};for(let o of e){let e=[];for(let a of o.tokenInfo){let{account:o,instructionParams:s}=await this.scope.account.getOrCreateTokenAccount({mint:a.mintAddress,owner:this.scope.ownerPubKey,notUseTokenAccount:a.mintAddress.equals(ii.WSOL.mint),createInfo:{payer:r,amount:0},skipCloseAccount:!a.mintAddress.equals(ii.WSOL.mint),associatedOnly:!a.mintAddress.equals(ii.WSOL.mint)&&t.associatedOnly});s&&n.addInstruction(s),o&&(i[a.mintAddress.toString()]=o,e.push(o))}n.addInstruction({instructions:[u1.makeClaimInstruction({programId:o.programId,poolInfo:o,ownerInfo:{wallet:r,ownerPda:o.ownerAccountId,claimAddress:e}})]})}let{transaction:o,signers:a}=n.build(),s=n.allInstructions;return iI(s,[r,...a.map(e=>e.publicKey)])?[{transaction:o,signer:a}]:[{transaction:new tu.YW().add(...s.slice(0,n.AllTxData.instructions.length-1)),signer:a},{transaction:new tu.YW().add(...s.slice(n.AllTxData.instructions.length-1)),signer:[]},{transaction:new tu.YW().add(...n.AllTxData.endInstructions),signer:[]}]}static makeClaimInstruction({programId:e,poolInfo:t,ownerInfo:n}){let r=o2([]),i=[{pubkey:n.wallet,isSigner:!0,isWritable:!0},{pubkey:t.poolId,isSigner:!1,isWritable:!0},{pubkey:n.ownerPda,isSigner:!1,isWritable:!0},...n.claimAddress.map(e=>({pubkey:e,isSigner:!1,isWritable:!0})),...t.tokenInfo.map(({mintVault:e})=>({pubkey:e,isSigner:!1,isWritable:!0})),{pubkey:td.H_,isSigner:!1,isWritable:!1}],o=tK.alloc(r.span);r.encode({},o);let a=tK.from([10,66,208,184,161,6,191,98,...o]);return new tu.Sl({keys:i,programId:e,data:a})}},u2=u1;u2.CLAIMED_NUM=3,u2.POOL_LAYOUT=o2([oU(8),o$("bump"),o$("status"),oH("openTime"),oH("endTime"),oX("ammId"),o6(o2([o$("mintDecimals"),oX("mintAddress"),oX("mintVault"),oH("perLpLoss"),oH("totalClaimedAmount")]),u1.CLAIMED_NUM,"tokenInfo"),o6(oH(),10,"padding")]),u2.OWNER_LAYOUT=o2([oU(8),o$("bump"),o$("version"),oX("poolId"),oX("owner"),oH("lpAmount"),o6(o2([oX("mintAddress"),oH("debtAmount"),oH("claimedAmount")]),u1.CLAIMED_NUM,"tokenInfo"),o6(oH(),4,"padding")]),u2.DEFAULT_POOL_ID=["58oQChx4yWmvKdwLLZzBi4ChoCc2fqCUWBkwMihLYQo2","6UmmUiYoBjSrhakAobJw8BvkmJtDVxaeBtbt7rxWo1mg","AVs9TA4nWDzfPJE9gGVNJMVhcQy3V9PGazuz33BfG2RA","DVa7Qmb5ct9RCpaU7UTpSaf3GVMYz17vNVU67XpdCRut","7XawhbbxtsRcQA8KTkHT9f9nc6d69UwqCDh6U5EEbEmX","6a1CsrpeZubDjEJE9s1CMVheB6HWM5d7m1cj2jkhyXhj","EoNrn8iUhwgJySD1pHu8Qxm5gSQqLK3za4m8xzD2RuEb","AceAyRTWt4PyB2pHqf2qhDgNZDtKVNaxgL8Ru3V4aN1P","6tmFJbMk5yVHFcFy7X2K8RwHjKLr6KVFLYXpgpBNeAxB"].map(e=>new tu.nh(e)),u2.SEED_CONFIG={pool:{id:tK.from("pool_seed","utf8")},owner:{id:tK.from("user_claim_seed","utf8")}},u2.VERSION_PROJECT=[void 0,"Francium","Tulip","Larix"],o2([o$("instruction"),oF("amount")]);var u6=o2([o$("instruction")]);function u3({programId:e},t){let n=[{pubkey:td.H_,isSigner:!1,isWritable:!1},{pubkey:r6,isSigner:!1,isWritable:!1},...Object.entries(t).map(([e,t])=>({pubkey:t,isSigner:"userOwner"===e,isWritable:!["authority","userOwner"].includes(e)}))],r=tK.alloc(u6.span);return u6.encode({instruction:2},r),new tu.Sl({keys:n,programId:e,data:r})}function u4(e){let{poolConfig:t,userKeys:n,side:r}=e,i="base"===r?n.baseTokenAccount:n.quoteTokenAccount,o="base"===r?t.baseVault:t.quoteVault,a=tK.alloc(u6.span);u6.encode({instruction:2},a);let s=[{pubkey:td.H_,isWritable:!1,isSigner:!1},{pubkey:tu.Am,isWritable:!1,isSigner:!1},{pubkey:t.id,isWritable:!0,isSigner:!1},{pubkey:t.authority,isWritable:!1,isSigner:!1},{pubkey:o,isWritable:!0,isSigner:!1},{pubkey:i,isWritable:!0,isSigner:!1},{pubkey:n.ledgerAccount,isWritable:!0,isSigner:!1},{pubkey:n.owner,isWritable:!1,isSigner:!0}];return new tu.Sl({programId:t.programId,keys:s,data:a})}var u5={[i8.IDO_PROGRAM_ID_V1.toString()]:1,[i8.IDO_PROGRAM_ID_V2.toString()]:2,[i8.IDO_PROGRAM_ID_V3.toString()]:3,[i8.IDO_PROGRAM_ID_V4.toString()]:4},u8=class extends oy{async claim({ownerInfo:e,idoKeys:t,associatedOnly:n=!0,checkCreateATAOwner:r=!1,txVersion:i}){let o=this.createTxBuilder(),a=u5[t.programId];a||this.logAndCreateError("invalid version",a);let s=ip(t),[u,l]=[!new(tb())(e.coin).isZero(),!new(tb())(e.pc).isZero()],c=s.projectInfo.mint.address.equals(r7),{account:d,instructionParams:p}=await this.scope.account.getOrCreateTokenAccount({tokenProgram:s.projectInfo.mint.programId,mint:s.projectInfo.mint.address,owner:this.scope.ownerPubKey,createInfo:{payer:this.scope.ownerPubKey,amount:0},skipCloseAccount:!c,notUseTokenAccount:c,associatedOnly:!c&&n,checkCreateATAOwner:r});!d&&u&&this.logAndCreateError("target token accounts not found","mint",t.projectInfo.mint.address),u&&p&&o.addInstruction(p);let f=s.buyInfo.mint.address.equals(r7),{account:h,instructionParams:m}=await this.scope.account.getOrCreateTokenAccount({tokenProgram:s.buyInfo.mint.programId,mint:s.buyInfo.mint.address,owner:this.scope.ownerPubKey,createInfo:{payer:this.scope.ownerPubKey,amount:0},skipCloseAccount:!f,notUseTokenAccount:f,associatedOnly:!f&&n,checkCreateATAOwner:r});if(!d&&l&&this.logAndCreateError("target token accounts not found","mint",t.projectInfo.mint.address),l&&m&&o.addInstruction(m),d&&h||this.logAndCreateError("target token accounts not found","mint",t.projectInfo.mint.address,t.buyInfo.mint.address),3===a)return o.addInstruction({instructions:[...u?[u3({programId:s.programId},{idoId:s.id,authority:s.authority,poolTokenAccount:s.projectInfo.vault,userTokenAccount:d,userIdoInfo:new tu.nh(e.userIdoInfo),userOwner:this.scope.ownerPubKey})]:[],...l?[u3({programId:new tu.nh(t.programId)},{idoId:s.id,authority:s.authority,poolTokenAccount:s.buyInfo.vault,userTokenAccount:h,userIdoInfo:new tu.nh(e.userIdoInfo),userOwner:this.scope.ownerPubKey})]:[]]}).versionBuild({txVersion:i});if(a<3)return u||l||this.logAndCreateError("no claimable rewards"),o.addInstruction({instructions:[u3({programId:s.programId},{idoId:s.id,authority:s.authority,poolQuoteTokenAccount:s.buyInfo.vault,poolBaseTokenAccount:s.projectInfo.vault,userQuoteTokenAccount:h,userBaseTokenAccount:d,userIdoInfo:new tu.nh(e.userIdoInfo),userOwner:this.scope.ownerPubKey})]}).versionBuild({txVersion:i});let g={poolConfig:{id:s.id,programId:s.programId,authority:s.authority,baseVault:s.projectInfo.vault,quoteVault:s.buyInfo.vault,baseToken:t.projectInfo.mint,quoteToken:t.buyInfo.mint},userKeys:{baseTokenAccount:d,quoteTokenAccount:h,ledgerAccount:new tu.nh(e.userIdoInfo),owner:this.scope.ownerPubKey}};return o.addInstruction({instructions:[...u?[u4(t1(t0({},g),{side:"base"}))]:[],...l?[u4(t1(t0({},g),{side:"quote"}))]:[]]}).versionBuild({txVersion:i})}},u9=class extends oy{constructor(e){super(e),this._tokenList=[],this._tokenMap=new Map,this._blackTokenMap=new Map,this._mintGroup={official:new Set,jup:new Set,extra:new Set},this._whiteMap=new Set,this._extraTokenList=[]}async load(e){this.checkDisabled();let{forceUpdate:t=!1,type:n="strict"}=e||{},{mintList:r,blacklist:i,whiteList:o}=await this.scope.fetchV3TokenList(t),a=await this.scope.fetchJupTokenList(t);this._tokenList=[],this._tokenMap=new Map,this._blackTokenMap=new Map,this._mintGroup={official:new Set,jup:new Set,extra:new Set},this._whiteMap=new Set(o),this._tokenMap.set(rG.address,rG),this._mintGroup.official.add(rG.address),i.forEach(e=>{this._blackTokenMap.set(e.address,t1(t0({},e),{priority:-1}))}),r.forEach(e=>{var t;this._blackTokenMap.has(e.address)||(this._tokenMap.set(e.address,t1(t0({},e),{type:"raydium",priority:2,programId:null!=(t=e.programId)?t:e.tags.includes("token-2022")?td.nA.toBase58():td.H_.toBase58()})),this._mintGroup.official.add(e.address))}),a.forEach(e=>{var t;this._blackTokenMap.has(e.address)||this._tokenMap.has(e.address)||(this._tokenMap.set(e.address,t1(t0({},e),{type:"jupiter",priority:1,programId:null!=(t=e.programId)?t:e.tags.includes("token-2022")?td.nA.toBase58():td.H_.toBase58(),tags:e.freezeAuthority?[...e.tags||[],"hasFreeze"]:e.tags})),this._mintGroup.jup.add(e.address))}),this._extraTokenList.forEach(e=>{this._blackTokenMap.has(e.address)||this._tokenMap.has(e.address)||(this._tokenMap.set(e.address,t1(t0({},e),{type:"extra",priority:1,programId:e.programId||e.tags.includes("token-2022")?td.nA.toBase58():td.H_.toBase58()})),this._mintGroup.extra.add(e.address))}),this._tokenList=Array.from(this._tokenMap).map(e=>e[1])}get tokenList(){return this._tokenList}get tokenMap(){return this._tokenMap}get blackTokenMap(){return this._blackTokenMap}get mintGroup(){return this._mintGroup}get whiteListMap(){return this._whiteMap}async getTokenInfo(e){if(!e)throw Error("please input mint");let t=e.toString(),n=this._tokenMap.get(t);if(n)return n;if("SOL"===t.toLocaleUpperCase())return rG;let r=(await this.scope.api.getTokenInfo([t]))[0];if(r)return this._mintGroup.extra.add(t),this._tokenMap.set(t,t1(t0({},r),{priority:2})),r;let i=await this.scope.connection.getAccountInfo(new tu.nh(t));if(!i)throw Error(`mint address not found: ${t}`);let o=tc.qT.decode(i.data),a=t.toString().substring(0,6),s={chainId:101,address:t,programId:i.owner.toBase58(),logoURI:"",symbol:a,name:a,decimals:o.decimals,tags:[],extensions:{},priority:0,type:"unknown"};return this._mintGroup.extra.add(t),this._tokenMap.set(t,s),s}},u7=class{constructor(e){this.rawBalances=new Map;let{connection:t,cluster:n,owner:r,api:i,defaultChainTime:o,defaultChainTimeOffset:a,apiCacheTime:s,blockhashCommitment:u="confirmed"}=e;this._connection=t,this.cluster=n||"mainnet",this._owner=r?new i_(r):void 0,this._signAllTransactions=e.signAllTransactions,this.blockhashCommitment=u,this.api=i,this._apiCacheTime=s||3e5,this.logger=t8("Raydium"),this.farm=new aj({scope:this,moduleName:"Raydium_Farm"}),this.account=new o7({scope:this,moduleName:"Raydium_Account",tokenAccounts:e.tokenAccounts,tokenAccountRawInfos:e.tokenAccountRawInfos}),this.liquidity=new ub({scope:this,moduleName:"Raydium_LiquidityV2"}),this.token=new u9({scope:this,moduleName:"Raydium_tokenV2"}),this.tradeV2=new u0({scope:this,moduleName:"Raydium_tradeV2"}),this.clmm=new u_({scope:this,moduleName:"Raydium_clmm"}),this.cpmm=new uK({scope:this,moduleName:"Raydium_cpmm"}),this.utils1216=new u2({scope:this,moduleName:"Raydium_utils1216"}),this.marketV2=new uy({scope:this,moduleName:"Raydium_marketV2"}),this.ido=new u8({scope:this,moduleName:"Raydium_ido"}),this.availability={};let l=new Date().getTime();this.apiData={},a&&(this._chainTime={fetched:l,value:{chainTime:o||Date.now()-a,offset:a}})}static async load(e){var t;let n=(0,tl.merge)({cluster:"mainnet",owner:null,apiRequestInterval:3e5,apiRequestTimeout:1e4},e),{cluster:r,apiRequestTimeout:i,logCount:o,logRequests:a,urlConfigs:s}=n,u=new oh({cluster:r,timeout:i,urlConfigs:s,logCount:o,logRequests:a}),l=new u7(t1(t0({},n),{api:u}));return await l.fetchAvailabilityStatus(null==(t=e.disableFeatureCheck)||t),e.disableLoadToken||await l.token.load({type:e.jupTokenType}),l}get owner(){return this._owner}get ownerPubKey(){if(!this._owner)throw Error(om);return this._owner.publicKey}setOwner(e){return this._owner=e?new i_(e):void 0,this.account.resetTokenAccounts(),this}get connection(){if(!this._connection)throw Error("please provide connection in load() initialization or set it by raydium.setConnection(connection)");return this._connection}setConnection(e){return this._connection=e,this}get signAllTransactions(){return this._signAllTransactions}setSignAllTransactions(e){return this._signAllTransactions=e,this}checkOwner(){if(!this.owner)throw this.logger.error(om),Error(om)}isCacheInvalidate(e){return new Date().getTime()-e>this._apiCacheTime}async fetchChainTime(){try{let e=await this.api.getChainTimeOffset();this._chainTime={fetched:Date.now(),value:{chainTime:Date.now()+1e3*e.offset,offset:1e3*e.offset}}}catch{this._chainTime=void 0}}async fetchV3TokenList(e){if(this.apiData.tokenList&&!this.isCacheInvalidate(this.apiData.tokenList.fetched)&&!e)return this.apiData.tokenList.data;try{let e=await this.api.getTokenList(),t={fetched:Date.now(),data:e};return this.apiData.tokenList=t,t.data}catch(e){return console.error(e),{mintList:[],blacklist:[],whiteList:[]}}}async fetchJupTokenList(e){let t=this.apiData.jupTokenList;if(t&&!this.isCacheInvalidate(t.fetched)&&!e)return t.data;try{let e=await this.api.getJupTokenList();return this.apiData.jupTokenList={fetched:Date.now(),data:e.map(e=>t1(t0({},e),{mintAuthority:e.mint_authority||void 0,freezeAuthority:e.freeze_authority||void 0}))},this.apiData.jupTokenList.data}catch(e){return console.error(e),[]}}get chainTimeData(){var e;return null==(e=this._chainTime)?void 0:e.value}async chainTimeOffset(){var e;return this._chainTime&&Date.now()-this._chainTime.fetched<=3e5?this._chainTime.value.offset:(await this.fetchChainTime(),(null==(e=this._chainTime)?void 0:e.value.offset)||0)}async currentBlockChainTime(){var e;return this._chainTime&&Date.now()-this._chainTime.fetched<=3e5?this._chainTime.value.chainTime:(await this.fetchChainTime(),(null==(e=this._chainTime)?void 0:e.value.chainTime)||Date.now())}async fetchEpochInfo(){return this._epochInfo&&Date.now()-this._epochInfo.fetched<=3e4||(this._epochInfo={fetched:Date.now(),value:await this.connection.getEpochInfo()}),this._epochInfo.value}async fetchAvailabilityStatus(e){if(e)return{};try{let e=await this.api.fetchAvailabilityStatus(),t=!1===e.all;return this.availability={all:e.all,swap:!t&&e.swap,createConcentratedPosition:!t&&e.createConcentratedPosition,addConcentratedPosition:!t&&e.addConcentratedPosition,addStandardPosition:!t&&e.addStandardPosition,removeConcentratedPosition:!t&&e.removeConcentratedPosition,removeStandardPosition:!t&&e.removeStandardPosition,addFarm:!t&&e.addFarm,removeFarm:!t&&e.removeFarm},e}catch{return{}}}};/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */},93066:function(e,t,n){"use strict";n.d(t,{Xg:function(){return x},ZL:function(){return S},AW:function(){return l}});var r=n(39386),i=n(40475);let o=e=>{let t=e.decode.bind(e),n=e.encode.bind(e);return{decode:t,encode:n}};var a=n(48764).Buffer;let s=e=>t=>{let n=(0,r.Ik)(e,t),{encode:s,decode:u}=o(n),l=n;return l.decode=(e,t)=>{let n=u(e,t);return(0,i.oU)(a.from(n))},l.encode=(t,n,r)=>{let o=(0,i.k$)(t,e);return s(o,n,r)},l},u=e=>t=>{let n=(0,r.Ik)(e,t),{encode:s,decode:u}=o(n),l=n;return l.decode=(e,t)=>{let n=u(e,t);return(0,i.Q5)(a.from(n))},l.encode=(t,n,r)=>{let o=(0,i.zP)(t,e);return s(o,n,r)},l},l=s(8);u(8),s(16),u(16),s(24),u(24),s(32),u(32);var c=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,d=Math.ceil,p=Math.floor,f="[BigNumber Error] ",h=f+"Number primitive has more than 15 significant digits: ",m=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13];function g(e){var t=0|e;return e>0||e===t?t:t-1}function y(e){for(var t,n,r=1,i=e.length,o=e[0]+"";rl^n?1:-1;for(a=0,s=(u=i.length)<(l=o.length)?u:l;ao[a]^n?1:-1;return u==l?0:u>l^n?1:-1}function _(e,t,n,r){if(en||e!==p(e))throw Error(f+(r||"Argument")+("number"==typeof e?en?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function v(e){var t=e.c.length-1;return g(e.e/14)==t&&e.c[t]%2!=0}function w(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function k(e,t,n){var r,i;if(t<0){for(i=n+".";++t;i+=n);e=i+e}else if(r=e.length,++t>r){for(i=n,t-=r;--t;i+=n);e+=i}else tO?f.c=f.e=null:e.e=10;a/=10,o++);o>O?f.c=f.e=null:(f.e=o,f.c=[e]);return}d=String(e)}else{if(!c.test(d=String(e)))return x(f,d,s);f.s=45==d.charCodeAt(0)?(d=d.slice(1),-1):1}(o=d.indexOf("."))>-1&&(d=d.replace(".","")),(a=d.search(/e/i))>0?(o<0&&(o=a),o+=+d.slice(a+1),d=d.substring(0,a)):o<0&&(o=d.length)}else{if(_(t,2,N.length,"Base"),10==t&&D)return z(f=new F(e),I+f.e+1,T);if(d=String(e),s="number"==typeof e){if(0*e!=0)return x(f,d,s,t);if(f.s=1/e<0?(d=d.slice(1),-1):1,F.DEBUG&&d.replace(/^0\.0*|\./,"").length>15)throw Error(h+e)}else f.s=45===d.charCodeAt(0)?(d=d.slice(1),-1):1;for(n=N.slice(0,t),o=a=0,u=d.length;an.indexOf(r=d.charAt(a))){if("."==r){if(a>o){o=u;continue}}else if(!i&&(d==d.toUpperCase()&&(d=d.toLowerCase())||d==d.toLowerCase()&&(d=d.toUpperCase()))){i=!0,a=-1,o=0;continue}return x(f,String(e),s,t)}s=!1,(o=(d=l(d,t,10,f.s)).indexOf("."))>-1?d=d.replace(".",""):o=d.length}for(a=0;48===d.charCodeAt(a);a++);for(u=d.length;48===d.charCodeAt(--u););if(d=d.slice(a,++u)){if(u-=a,s&&F.DEBUG&&u>15&&(e>9007199254740991||e!==p(e)))throw Error(h+f.s*e);if((o=o-a-1)>O)f.c=f.e=null;else if(o=P)?w(u,a):k(u,a,"0");else if(o=(e=z(new F(e),t,n)).e,s=(u=y(e.c)).length,1==r||2==r&&(t<=o||o<=E)){for(;ss){if(--t>0)for(u+=".";t--;u+="0");}else if((t+=o-s)>0)for(o+1==s&&(u+=".");t--;u+="0");return e.s<0&&i?"-"+u:u}function j(e,t){for(var n,r=1,i=new F(e[0]);r=10;i/=10,r++);return(n=r+14*n-1)>O?e.c=e.e=null:n=10;s/=10,i++);if((o=t-i)<0)o+=14,a=t,c=(u=f[l=0])/m[i-a-1]%10|0;else if((l=d((o+1)/14))>=f.length){if(r){for(;f.length<=l;f.push(0));u=c=0,i=1,o%=14,a=o-14+1}else break t}else{for(i=1,u=s=f[l];s>=10;s/=10,i++);o%=14,c=(a=o-14+i)<0?0:u/m[i-a-1]%10|0}if(r=r||t<0||null!=f[l+1]||(a<0?u:u%m[i-a-1]),r=n<4?(c||r)&&(0==n||n==(e.s<0?3:2)):c>5||5==c&&(4==n||r||6==n&&(o>0?a>0?u/m[i-a]:0:f[l-1])%10&1||n==(e.s<0?8:7)),t<1||!f[0])return f.length=0,r?(t-=e.e+1,f[0]=m[(14-t%14)%14],e.e=-t||0):f[0]=e.e=0,e;if(0==o?(f.length=l,s=1,l--):(f.length=l+1,s=m[14-o],f[l]=a>0?p(u/m[i-a]%m[a])*s:0),r)for(;;){if(0==l){for(o=1,a=f[0];a>=10;a/=10,o++);for(a=f[0]+=s,s=1;a>=10;a/=10,s++);o!=s&&(e.e++,1e14==f[0]&&(f[0]=1));break}if(f[l]+=s,1e14!=f[l])break;f[l--]=0,s=1}for(o=f.length;0===f[--o];f.pop());}e.e>O?e.c=e.e=null:e.e=P?w(t,n):k(t,n,"0"),e.s<0?"-"+t:t)}return F.clone=e,F.ROUND_UP=0,F.ROUND_DOWN=1,F.ROUND_CEIL=2,F.ROUND_FLOOR=3,F.ROUND_HALF_UP=4,F.ROUND_HALF_DOWN=5,F.ROUND_HALF_EVEN=6,F.ROUND_HALF_CEIL=7,F.ROUND_HALF_FLOOR=8,F.EUCLID=9,F.config=F.set=function(e){var t,n;if(null!=e){if("object"==typeof e){if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(_(n=e[t],0,1e9,t),I=n),e.hasOwnProperty(t="ROUNDING_MODE")&&(_(n=e[t],0,8,t),T=n),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((n=e[t])&&n.pop?(_(n[0],-1e9,0,t),_(n[1],0,1e9,t),E=n[0],P=n[1]):(_(n,-1e9,1e9,t),E=-(P=n<0?-n:n))),e.hasOwnProperty(t="RANGE")){if((n=e[t])&&n.pop)_(n[0],-1e9,-1,t),_(n[1],1,1e9,t),C=n[0],O=n[1];else if(_(n,-1e9,1e9,t),n)C=-(O=n<0?-n:n);else throw Error(f+t+" cannot be zero: "+n)}if(e.hasOwnProperty(t="CRYPTO")){if(!!(n=e[t])===n){if(n){if("undefined"!=typeof crypto&&crypto&&(crypto.getRandomValues||crypto.randomBytes))B=n;else throw B=!n,Error(f+"crypto unavailable")}else B=n}else throw Error(f+t+" not true or false: "+n)}if(e.hasOwnProperty(t="MODULO_MODE")&&(_(n=e[t],0,9,t),M=n),e.hasOwnProperty(t="POW_PRECISION")&&(_(n=e[t],0,1e9,t),R=n),e.hasOwnProperty(t="FORMAT")){if("object"==typeof(n=e[t]))L=n;else throw Error(f+t+" not an object: "+n)}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(n=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(n))throw Error(f+t+" invalid: "+n);D="0123456789"==n.slice(0,10),N=n}}else throw Error(f+"Object expected: "+e)}return{DECIMAL_PLACES:I,ROUNDING_MODE:T,EXPONENTIAL_AT:[E,P],RANGE:[C,O],CRYPTO:B,MODULO_MODE:M,POW_PRECISION:R,FORMAT:L,ALPHABET:N}},F.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!F.DEBUG)return!0;var t,n,r=e.c,i=e.e,o=e.s;t:if("[object Array]"==({}).toString.call(r)){if((1===o||-1===o)&&i>=-1e9&&i<=1e9&&i===p(i)){if(0===r[0]){if(0===i&&1===r.length)return!0;break t}if((t=(i+1)%14)<1&&(t+=14),String(r[0]).length==t){for(t=0;t=1e14||n!==p(n))break t;if(0!==n)return!0}}}else if(null===r&&null===i&&(null===o||1===o||-1===o))return!0;throw Error(f+"Invalid BigNumber: "+e)},F.maximum=F.max=function(){return j(arguments,A.lt)},F.minimum=F.min=function(){return j(arguments,A.gt)},F.random=(n=9007199254740992*Math.random()&2097151?function(){return p(9007199254740992*Math.random())}:function(){return(1073741824*Math.random()|0)*8388608+(8388608*Math.random()|0)},function(e){var t,r,i,o,a,s=0,u=[],l=new F(S);if(null==e?e=I:_(e,0,1e9),o=d(e/14),B){if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(o*=2));s>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),t[s]=r[0],t[s+1]=r[1]):(u.push(a%1e14),s+=2);s=o/2}else if(crypto.randomBytes){for(t=crypto.randomBytes(o*=7);s=9e15?crypto.randomBytes(7).copy(t,s):(u.push(a%1e14),s+=7);s=o/7}else throw B=!1,Error(f+"crypto unavailable")}if(!B)for(;s=10;a/=10,s++);s<14&&(i-=14-s)}return l.e=i,l.c=u,l}),F.sum=function(){for(var e=1,t=arguments,n=new F(t[0]);en-1&&(null==a[i+1]&&(a[i+1]=0),a[i+1]+=a[i]/n|0,a[i]%=n)}return a.reverse()}return function(n,r,i,o,a){var s,l,c,d,p,f,h,m,g=n.indexOf("."),b=I,_=T;for(g>=0&&(d=R,R=0,n=n.replace(".",""),f=(m=new F(r)).pow(n.length-g),R=d,m.c=t(k(y(f.c),f.e,"0"),10,i,e),m.e=m.c.length),c=d=(h=t(n,r,i,a?(s=N,e):(s=e,N))).length;0==h[--d];h.pop());if(!h[0])return s.charAt(0);if(g<0?--c:(f.c=h,f.e=c,f.s=o,h=(f=u(f,m,b,_,i)).c,p=f.r,c=f.e),g=h[l=c+b+1],d=i/2,p=p||l<0||null!=h[l+1],p=_<4?(null!=g||p)&&(0==_||_==(f.s<0?3:2)):g>d||g==d&&(4==_||p||6==_&&1&h[l-1]||_==(f.s<0?8:7)),l<1||!h[0])n=p?k(s.charAt(1),-b,s.charAt(0)):s.charAt(0);else{if(h.length=l,p)for(--i;++h[--l]>i;)h[l]=0,l||(++c,h=[1].concat(h));for(d=h.length;!h[--d];);for(g=0,n="";g<=d;n+=s.charAt(h[g++]));n=k(n,c,s.charAt(0))}return n}}(),u=function(){function e(e,t,n){var r,i,o,a,s=0,u=e.length,l=t%1e7,c=t/1e7|0;for(e=e.slice();u--;)r=c*(o=e[u]%1e7)+(a=e[u]/1e7|0)*l,s=((i=l*o+r%1e7*1e7+s)/n|0)+(r/1e7|0)+c*a,e[u]=i%n;return s&&(e=[s].concat(e)),e}function t(e,t,n,r){var i,o;if(n!=r)o=n>r?1:-1;else for(i=o=0;it[i]?1:-1;break}return o}function n(e,t,n,r){for(var i=0;n--;)e[n]-=i,i=e[n]1;e.splice(0,1));}return function(r,i,o,a,s){var u,l,c,d,f,h,m,y,b,_,v,w,k,x,A,S,I,T=r.s==i.s?1:-1,E=r.c,P=i.c;if(!E||!E[0]||!P||!P[0])return new F(r.s&&i.s&&(E?!P||E[0]!=P[0]:P)?E&&0==E[0]||!P?0*T:T/0:NaN);for(b=(y=new F(T)).c=[],T=o+(l=r.e-i.e)+1,s||(s=1e14,l=g(r.e/14)-g(i.e/14),T=T/14|0),c=0;P[c]==(E[c]||0);c++);if(P[c]>(E[c]||0)&&l--,T<0)b.push(1),d=!0;else{for(x=E.length,S=P.length,c=0,T+=2,(f=p(s/(P[0]+1)))>1&&(P=e(P,f,s),E=e(E,f,s),S=P.length,x=E.length),k=S,v=(_=E.slice(0,S)).length;v=s/2&&A++;do{if(f=0,(u=t(P,_,S,v))<0){if(w=_[0],S!=v&&(w=w*s+(_[1]||0)),(f=p(w/A))>1)for(f>=s&&(f=s-1),m=(h=e(P,f,s)).length,v=_.length;1==t(h,_,m,v);)f--,n(h,St(P,_,S,v);)f++,n(_,S=10;T/=10,c++);z(y,o+(y.e=c+14*l-1)+1,a,d)}else y.e=l,y.r=+d;return y}}(),r=/^(-?)0([xbo])(?=\w[\w.]*$)/i,i=/^([^.]+)\.$/,o=/^\.([^.]+)$/,a=/^-?(Infinity|NaN)$/,s=/^\s*\+(?=[\w.])|^\s+|\s+$/g,x=function(e,t,n,u){var l,c=n?t:t.replace(s,"");if(a.test(c))e.s=isNaN(c)?null:c<0?-1:1;else{if(!n&&(c=c.replace(r,function(e,t,n){return l="x"==(n=n.toLowerCase())?16:"b"==n?2:8,u&&u!=l?e:t}),u&&(l=u,c=c.replace(i,"$1").replace(o,"0.$1")),t!=c))return new F(c,l);if(F.DEBUG)throw Error(f+"Not a"+(u?" base "+u:"")+" number: "+t);e.s=null}e.c=e.e=null},A.absoluteValue=A.abs=function(){var e=new F(this);return e.s<0&&(e.s=1),e},A.comparedTo=function(e,t){return b(this,new F(e,t))},A.decimalPlaces=A.dp=function(e,t){var n,r,i;if(null!=e)return _(e,0,1e9),null==t?t=T:_(t,0,8),z(new F(this),e+this.e+1,t);if(!(n=this.c))return null;if(r=((i=n.length-1)-g(this.e/14))*14,i=n[i])for(;i%10==0;i/=10,r--);return r<0&&(r=0),r},A.dividedBy=A.div=function(e,t){return u(this,new F(e,t),I,T)},A.dividedToIntegerBy=A.idiv=function(e,t){return u(this,new F(e,t),0,1)},A.exponentiatedBy=A.pow=function(e,t){var n,r,i,o,a,s,u,l,c,h=this;if((e=new F(e)).c&&!e.isInteger())throw Error(f+"Exponent not an integer: "+V(e));if(null!=t&&(t=new F(t)),s=e.e>14,!h.c||!h.c[0]||1==h.c[0]&&!h.e&&1==h.c.length||!e.c||!e.c[0])return c=new F(Math.pow(+V(h),s?2-v(e):+V(e))),t?c.mod(t):c;if(u=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new F(NaN);(r=!u&&h.isInteger()&&t.isInteger())&&(h=h.mod(t))}else{if(e.e>9&&(h.e>0||h.e<-1||(0==h.e?h.c[0]>1||s&&h.c[1]>=24e7:h.c[0]<8e13||s&&h.c[0]<=9999975e7)))return o=h.s<0&&v(e)?-0:0,h.e>-1&&(o=1/o),new F(u?1/o:o);R&&(o=d(R/14+2))}for(s?(n=new F(.5),u&&(e.s=1),l=v(e)):l=(i=Math.abs(+V(e)))%2,c=new F(S);;){if(l){if(!(c=c.times(h)).c)break;o?c.c.length>o&&(c.c.length=o):r&&(c=c.mod(t))}if(i){if(0===(i=p(i/2)))break;l=i%2}else if(z(e=e.times(n),e.e+1,1),e.e>14)l=v(e);else{if(0==(i=+V(e)))break;l=i%2}h=h.times(h),o?h.c&&h.c.length>o&&(h.c.length=o):r&&(h=h.mod(t))}return r?c:(u&&(c=S.div(c)),t?c.mod(t):o?z(c,R,T,a):c)},A.integerValue=function(e){var t=new F(this);return null==e?e=T:_(e,0,8),z(t,t.e+1,e)},A.isEqualTo=A.eq=function(e,t){return 0===b(this,new F(e,t))},A.isFinite=function(){return!!this.c},A.isGreaterThan=A.gt=function(e,t){return b(this,new F(e,t))>0},A.isGreaterThanOrEqualTo=A.gte=function(e,t){return 1===(t=b(this,new F(e,t)))||0===t},A.isInteger=function(){return!!this.c&&g(this.e/14)>this.c.length-2},A.isLessThan=A.lt=function(e,t){return 0>b(this,new F(e,t))},A.isLessThanOrEqualTo=A.lte=function(e,t){return -1===(t=b(this,new F(e,t)))||0===t},A.isNaN=function(){return!this.s},A.isNegative=function(){return this.s<0},A.isPositive=function(){return this.s>0},A.isZero=function(){return!!this.c&&0==this.c[0]},A.minus=function(e,t){var n,r,i,o,a=this.s;if(t=(e=new F(e,t)).s,!a||!t)return new F(NaN);if(a!=t)return e.s=-t,this.plus(e);var s=this.e/14,u=e.e/14,l=this.c,c=e.c;if(!s||!u){if(!l||!c)return l?(e.s=-t,e):new F(c?this:NaN);if(!l[0]||!c[0])return c[0]?(e.s=-t,e):new F(l[0]?this:3==T?-0:0)}if(s=g(s),u=g(u),l=l.slice(),a=s-u){for((o=a<0)?(a=-a,i=l):(u=s,i=c),i.reverse(),t=a;t--;i.push(0));i.reverse()}else for(r=(o=(a=l.length)<(t=c.length))?a:t,a=t=0;t0)for(;t--;l[n++]=0);for(t=1e14-1;r>a;){if(l[--r]=0;){for(n=0,p=y[i]%1e7,f=y[i]/1e7|0,a=u,o=i+a;o>i;)s=f*(l=m[--a]%1e7)+(c=m[a]/1e7|0)*p,n=((l=p*l+s%1e7*1e7+h[o]+n)/1e14|0)+(s/1e7|0)+f*c,h[o--]=l%1e14;h[o]=n}return n?++r:h.splice(0,1),U(e,h,r)},A.negated=function(){var e=new F(this);return e.s=-e.s||null,e},A.plus=function(e,t){var n,r=this.s;if(t=(e=new F(e,t)).s,!r||!t)return new F(NaN);if(r!=t)return e.s=-t,this.minus(e);var i=this.e/14,o=e.e/14,a=this.c,s=e.c;if(!i||!o){if(!a||!s)return new F(r/0);if(!a[0]||!s[0])return s[0]?e:new F(a[0]?this:0*r)}if(i=g(i),o=g(o),a=a.slice(),r=i-o){for(r>0?(o=i,n=s):(r=-r,n=a),n.reverse();r--;n.push(0));n.reverse()}for((r=a.length)-(t=s.length)<0&&(n=s,s=a,a=n,t=r),r=0;t;)r=(a[--t]=a[t]+s[t]+r)/1e14|0,a[t]=1e14===a[t]?0:a[t]%1e14;return r&&(a=[r].concat(a),++o),U(e,a,o)},A.precision=A.sd=function(e,t){var n,r,i;if(null!=e&&!!e!==e)return _(e,1,1e9),null==t?t=T:_(t,0,8),z(new F(this),e,t);if(!(n=this.c))return null;if(r=14*(i=n.length-1)+1,i=n[i]){for(;i%10==0;i/=10,r--);for(i=n[0];i>=10;i/=10,r++);}return e&&this.e+1>r&&(r=this.e+1),r},A.shiftedBy=function(e){return _(e,-9007199254740991,9007199254740991),this.times("1e"+e)},A.squareRoot=A.sqrt=function(){var e,t,n,r,i,o=this.c,a=this.s,s=this.e,l=I+4,c=new F("0.5");if(1!==a||!o||!o[0])return new F(!a||a<0&&(!o||o[0])?NaN:o?this:1/0);if(0==(a=Math.sqrt(+V(this)))||a==1/0?(((t=y(o)).length+s)%2==0&&(t+="0"),a=Math.sqrt(+t),s=g((s+1)/2)-(s<0||s%2),t=a==1/0?"5e"+s:(t=a.toExponential()).slice(0,t.indexOf("e")+1)+s,n=new F(t)):n=new F(a+""),n.c[0]){for((a=(s=n.e)+l)<3&&(a=0);;)if(i=n,n=c.times(i.plus(u(this,i,l,1))),y(i.c).slice(0,a)===(t=y(n.c)).slice(0,a)){if(n.e0&&h>0){for(i=h%a||a,l=p.substr(0,i);i0&&(l+=u+p.slice(i)),d&&(l="-"+l)}r=c?l+(n.decimalSeparator||"")+((s=+n.fractionGroupSize)?c.replace(RegExp("\\d{"+s+"}\\B","g"),"$&"+(n.fractionGroupSeparator||"")):c):l}return(n.prefix||"")+r+(n.suffix||"")},A.toFraction=function(e){var t,n,r,i,o,a,s,l,c,d,p,h,g=this.c;if(null!=e&&(!(s=new F(e)).isInteger()&&(s.c||1!==s.s)||s.lt(S)))throw Error(f+"Argument "+(s.isInteger()?"out of range: ":"not an integer: ")+V(s));if(!g)return new F(this);for(t=new F(S),c=n=new F(S),r=l=new F(S),h=y(g),o=t.e=h.length-this.e-1,t.c[0]=m[(a=o%14)<0?14+a:a],e=!e||s.comparedTo(t)>0?o>0?t:c:s,a=O,O=1/0,s=new F(h),l.c[0]=0;d=u(s,t,0,1),1!=(i=n.plus(d.times(r))).comparedTo(e);)n=r,r=i,c=l.plus(d.times(i=c)),l=i,t=s.minus(d.times(i=t)),s=i;return i=u(e.minus(n),r,0,1),l=l.plus(i.times(c)),n=n.plus(i.times(r)),l.s=c.s=this.s,o*=2,p=1>u(c,r,o,T).minus(this).abs().comparedTo(u(l,n,o,T).minus(this).abs())?[c,r]:[l,n],O=a,p},A.toNumber=function(){return+V(this)},A.toPrecision=function(e,t){return null!=e&&_(e,1,1e9),q(this,e,t,2)},A.toString=function(e){var t,n=this,r=n.s,i=n.e;return null===i?r?(t="Infinity",r<0&&(t="-"+t)):t="NaN":(null==e?t=i<=E||i>=P?w(y(n.c),i):k(y(n.c),i,"0"):10===e&&D?t=k(y((n=z(new F(n),I+i+1,T)).c),n.e,"0"):(_(e,2,N.length,"Base"),t=l(k(y(n.c),i,"0"),10,e,r,!0)),r<0&&n.c[0]&&(t="-"+t)),t},A.valueOf=A.toJSON=function(){return V(this)},A._isBigNumber=!0,A[Symbol.toStringTag]="BigNumber",A[Symbol.for("nodejs.util.inspect.custom")]=A.valueOf,null!=t&&F.set(t),F}())("1e+18");let x=e=>{let t=(0,r.u8)(e),{encode:n,decode:i}=o(t),a=t;return a.decode=(e,t)=>{let n=i(e,t);return!!n},a.encode=(e,t,r)=>{let i=Number(e);return n(i,t,r)},a};var A=n(64174);let S=e=>{let t=(0,r.Ik)(32,e),{encode:n,decode:i}=o(t),a=t;return a.decode=(e,t)=>{let n=i(e,t);return new A.nh(n)},a.encode=(e,t,r)=>{let i=e.toBuffer();return n(i,t,r)},a}},39386:function(e,t,n){"use strict";t.Tl=t.s8=t.$r=t.hn=t.qY=t.Gj=t.b7=t.Lb=t._O=t.aq=t.ut=t.Jq=t.Vb=t.KB=t.u8=t.cv=t._H=t.t6=t.VQ=t.EJ=t.vA=t.fP=t.Ar=void 0,t.KA=t.ZZ=t.Ik=t.K_=t.G0=t.A9=t.pc=t.n_=t.Mn=t.eh=t.WZ=t.xn=t.LN=t.hO=t.IS=t.u=t.O9=t.xP=t.gM=t.Yt=t._n=t.Xo=t.aQ=void 0;let r=n(48764);function i(e){if(!(e instanceof Uint8Array))throw TypeError("b must be a Uint8Array")}function o(e){return i(e),r.Buffer.from(e.buffer,e.byteOffset,e.length)}class a{constructor(e,t){if(!Number.isInteger(e))throw TypeError("span must be an integer");this.span=e,this.property=t}makeDestinationObject(){return{}}getSpan(e,t){if(0>this.span)throw RangeError("indeterminate span");return this.span}replicate(e){let t=Object.create(this.constructor.prototype);return Object.assign(t,this),t.property=e,t}fromArray(e){}}function s(e,t){return t.property?e+"["+t.property+"]":e}t.Ar=a;class u extends a{isCount(){throw Error("ExternalLayout is abstract")}}class l extends u{constructor(e=1,t){if(!Number.isInteger(e)||0>=e)throw TypeError("elementSpan must be a (positive) integer");super(-1,t),this.elementSpan=e}isCount(){return!0}decode(e,t=0){i(e);let n=e.length-t;return Math.floor(n/this.elementSpan)}encode(e,t,n){return 0}}class c extends u{constructor(e,t=0,n){if(!(e instanceof a))throw TypeError("layout must be a Layout");if(!Number.isInteger(t))throw TypeError("offset must be integer or undefined");super(e.span,n||e.property),this.layout=e,this.offset=t}isCount(){return this.layout instanceof d||this.layout instanceof p}decode(e,t=0){return this.layout.decode(e,t+this.offset)}encode(e,t,n=0){return this.layout.encode(e,t,n+this.offset)}}class d extends a{constructor(e,t){if(super(e,t),6e+r.encode(i,t,n+e),0);return this.count instanceof u&&this.count.encode(e.length,t,n),i}}class I extends a{constructor(e,t,n){if(!(Array.isArray(e)&&e.reduce((e,t)=>e&&t instanceof a,!0)))throw TypeError("fields must be array of Layout instances");for(let r of("boolean"==typeof t&&void 0===n&&(n=t,t=void 0),e))if(0>r.span&&void 0===r.property)throw Error("fields cannot contain unnamed variable-length layout");let r=-1;try{r=e.reduce((e,t)=>e+t.getSpan(),0)}catch(e){}super(r,t),this.fields=e,this.decodePrefixes=!!n}getSpan(e,t=0){if(0<=this.span)return this.span;let n=0;try{n=this.fields.reduce((n,r)=>{let i=r.getSpan(e,t);return t+=i,n+i},0)}catch(e){throw RangeError("indeterminate span")}return n}decode(e,t=0){i(e);let n=this.makeDestinationObject();for(let r of this.fields)if(void 0!==r.property&&(n[r.property]=r.decode(e,t)),t+=r.getSpan(e,t),this.decodePrefixes&&e.length===t)break;return n}encode(e,t,n=0){let r=n,i=0,o=0;for(let r of this.fields){let a=r.span;if(o=0a&&(a=r.getSpan(t,n)))}i=n,n+=a}return i+o-r}fromArray(e){let t=this.makeDestinationObject();for(let n of this.fields)void 0!==n.property&&0n.span?t=-1:0<=t&&(t+=n.span)}}}t.vA=I;class T{constructor(e){this.property=e}decode(e,t){throw Error("UnionDiscriminator is abstract")}encode(e,t,n){throw Error("UnionDiscriminator is abstract")}}class E extends T{constructor(e,t){if(!(e instanceof u&&e.isCount()))throw TypeError("layout must be an unsigned integer ExternalLayout");super(t||e.property||"variant"),this.layout=e}decode(e,t){return this.layout.decode(e,t)}encode(e,t,n){return this.layout.encode(e,t,n)}}class P extends a{constructor(e,t,n){let r;if(e instanceof d||e instanceof p)r=new E(new c(e));else if(e instanceof u&&e.isCount())r=new E(e);else if(e instanceof T)r=e;else throw TypeError("discr must be a UnionDiscriminator or an unsigned integer layout");if(void 0===t&&(t=null),!(null===t||t instanceof a))throw TypeError("defaultLayout must be null or a Layout");if(null!==t){if(0>t.span)throw Error("defaultLayout must have constant span");void 0===t.property&&(t=t.replicate("content"))}let i=-1;t&&0<=(i=t.span)&&(e instanceof d||e instanceof p)&&(i+=r.layout.span),super(i,n),this.discriminator=r,this.usesPrefixDiscriminator=e instanceof d||e instanceof p,this.defaultLayout=t,this.registry={};let o=this.defaultGetSourceVariant.bind(this);this.getSourceVariant=function(e){return o(e)},this.configGetSourceVariant=function(e){o=e.bind(this)}}getSpan(e,t=0){if(0<=this.span)return this.span;let n=this.getVariant(e,t);if(!n)throw Error("unable to determine span for unrecognized variant");return n.getSpan(e,t)}defaultGetSourceVariant(e){if(Object.prototype.hasOwnProperty.call(e,this.discriminator.property)){if(this.defaultLayout&&this.defaultLayout.property&&Object.prototype.hasOwnProperty.call(e,this.defaultLayout.property))return;let t=this.registry[e[this.discriminator.property]];if(t&&(!t.layout||t.property&&Object.prototype.hasOwnProperty.call(e,t.property)))return t}else for(let t in this.registry){let n=this.registry[t];if(n.property&&Object.prototype.hasOwnProperty.call(e,n.property))return n}throw Error("unable to infer src variant")}decode(e,t=0){let n;let r=this.discriminator,i=r.decode(e,t),o=this.registry[i];if(void 0===o){let o=this.defaultLayout,a=0;this.usesPrefixDiscriminator&&(a=r.layout.span),(n=this.makeDestinationObject())[r.property]=i,n[o.property]=o.decode(e,t+a)}else n=o.decode(e,t);return n}encode(e,t,n=0){let r=this.getSourceVariant(e);if(void 0===r){let r=this.discriminator,i=this.defaultLayout,o=0;return this.usesPrefixDiscriminator&&(o=r.layout.span),r.encode(e[r.property],t,n),o+i.encode(e[i.property],t,n+o)}return r.encode(e,t,n)}addVariant(e,t,n){let r=new C(this,e,t,n);return this.registry[e]=r,r}getVariant(e,t=0){let n;return n=e instanceof Uint8Array?this.discriminator.decode(e,t):e,this.registry[n]}}t.EJ=P;class C extends a{constructor(e,t,n,r){if(!(e instanceof P))throw TypeError("union must be a Union");if(!Number.isInteger(t)||0>t)throw TypeError("variant must be a (non-negative) integer");if("string"==typeof n&&void 0===r&&(r=n,n=null),n){if(!(n instanceof a))throw TypeError("layout must be a Layout");if(null!==e.defaultLayout&&0<=n.span&&n.span>e.defaultLayout.span)throw Error("variant span exceeds span of containing union");if("string"!=typeof r)throw TypeError("variant must have a String property")}let i=e.span;0>e.span&&0<=(i=n?n.span:0)&&e.usesPrefixDiscriminator&&(i+=e.discriminator.layout.span),super(i,r),this.union=e,this.variant=t,this.layout=n||null}getSpan(e,t=0){if(0<=this.span)return this.span;let n=0;this.union.usesPrefixDiscriminator&&(n=this.union.discriminator.layout.span);let r=0;return this.layout&&(r=this.layout.getSpan(e,t+n)),n+r}decode(e,t=0){let n=this.makeDestinationObject();if(this!==this.union.getVariant(e,t))throw Error("variant mismatch");let r=0;return this.union.usesPrefixDiscriminator&&(r=this.union.discriminator.layout.span),this.layout?n[this.property]=this.layout.decode(e,t+r):this.property?n[this.property]=!0:this.union.usesPrefixDiscriminator&&(n[this.union.discriminator.property]=this.variant),n}encode(e,t,n=0){let r=0;if(this.union.usesPrefixDiscriminator&&(r=this.union.discriminator.layout.span),this.layout&&!Object.prototype.hasOwnProperty.call(e,this.property))throw TypeError("variant lacks property "+this.property);this.union.discriminator.encode(this.variant,t,n);let i=r;if(this.layout&&(this.layout.encode(e[this.property],t,n+r),i+=this.layout.getSpan(t,n+r),0<=this.union.span&&i>this.union.span))throw Error("encoded variant overruns containing union");return i}fromArray(e){if(this.layout)return this.layout.fromArray(e)}}function O(e){return 0>e&&(e+=4294967296),e}class B extends a{constructor(e,t,n){if(!(e instanceof d||e instanceof p))throw TypeError("word must be a UInt or UIntBE layout");if("string"==typeof t&&void 0===n&&(n=t,t=!1),4=t)throw TypeError("bits must be positive integer");let r=8*e.span,i=e.fields.reduce((e,t)=>e+t.bits,0);if(t+i>r)throw Error("bits too long for span remainder ("+(r-i)+" of "+r+" remain)");this.container=e,this.bits=t,this.valueMask=(1<>>this.start;return i}encode(e){if("number"!=typeof e||!Number.isInteger(e)||e!==O(e&this.valueMask))throw TypeError(s("BitField.encode",this)+" value must be integer not exceeding "+this.valueMask);let t=this.container._packedGetValue(),n=O(e<n&&(n=this.length.decode(e,t)),n}decode(e,t=0){let n=this.span;return 0>n&&(n=this.length.decode(e,t)),o(e).slice(t,t+n)}encode(e,t,n){let r=this.length;if(this.length instanceof u&&(r=e.length),!(e instanceof Uint8Array&&r===e.length))throw TypeError(s("Blob.encode",this)+" requires (length "+r+") Uint8Array as src");if(n+r>t.length)throw RangeError("encoding overruns Uint8Array");let i=o(e);return o(t).write(i.toString("hex"),n,r,"hex"),this.length instanceof u&&this.length.encode(r,t,n),r}}t.t6=L;class N extends a{constructor(e){super(-1,e)}getSpan(e,t=0){i(e);let n=t;for(;nt.length)throw RangeError("encoding overruns Buffer");let s=o(t);return i.copy(s,n),s[n+a]=0,a+1}}class D extends a{constructor(e,t){if("string"==typeof e&&void 0===t&&(t=e,e=void 0),void 0===e)e=-1;else if(!Number.isInteger(e))throw TypeError("maxSpan must be an integer");super(-1,t),this.maxSpan=e}getSpan(e,t=0){return i(e),e.length-t}decode(e,t=0){let n=this.getSpan(e,t);if(0<=this.maxSpan&&this.maxSpant.length)throw RangeError("encoding overruns Buffer");return i.copy(o(t),n),a}}t._H=(e,t)=>new l(e,t),t.cv=(e,t,n)=>new c(e,t,n),t.u8=e=>new d(1,e),t.KB=e=>new d(2,e),t.Vb=e=>new d(3,e),t.Jq=e=>new d(4,e),t.ut=e=>new d(5,e),t.aq=e=>new d(6,e),t._O=e=>new y(e),t.Lb=e=>new p(2,e),t.b7=e=>new p(3,e),t.Gj=e=>new p(4,e),t.qY=e=>new p(5,e),t.hn=e=>new p(6,e),t.$r=e=>new b(e),t.s8=e=>new f(1,e),t.Tl=e=>new f(2,e),t.aQ=e=>new f(3,e),t.Xo=e=>new f(4,e),t._n=e=>new f(5,e),t.Yt=e=>new f(6,e),t.gM=e=>new _(e),t.xP=e=>new h(2,e),t.O9=e=>new h(3,e),t.u=e=>new h(4,e),t.IS=e=>new h(5,e),t.hO=e=>new h(6,e),t.LN=e=>new v(e),t.xn=e=>new w(e),t.WZ=e=>new k(e),t.eh=e=>new x(e),t.Mn=e=>new A(e),t.n_=(e,t,n)=>new I(e,t,n),t.pc=(e,t,n)=>new B(e,t,n),t.A9=(e,t,n)=>new S(e,t,n),t.G0=(e,t,n)=>new P(e,t,n),t.K_=(e,t)=>new E(e,t),t.Ik=(e,t)=>new L(e,t),t.ZZ=e=>new N(e),t.KA=(e,t)=>new D(e,t)},79127:function(e,t,n){"use strict";n.d(t,{Gd:function(){return s},H_:function(){return i},_u:function(){return a},nA:function(){return o}});var r=n(64174);let i=new r.nh("TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"),o=new r.nh("TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"),a=new r.nh("ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"),s=new r.nh("So11111111111111111111111111111111111111112");new r.nh("9pan9bMn5HatX4EJdBwg9VgCa7Uz5HL8N1m5D3NdXejP")},83304:function(e,t,n){"use strict";n.d(t,{lZ:function(){return u},p0:function(){return s}});var r,i,o=n(39386),a=n(93066);n(48764).Buffer,(r=i||(i={}))[r.Uninitialized=0]="Uninitialized",r[r.Initialized=1]="Initialized",r[r.Frozen=2]="Frozen";let s=(0,o.n_)([(0,a.ZL)("mint"),(0,a.ZL)("owner"),(0,a.AW)("amount"),(0,o.Jq)("delegateOption"),(0,a.ZL)("delegate"),(0,o.u8)("state"),(0,o.Jq)("isNativeOption"),(0,a.AW)("isNative"),(0,a.AW)("delegatedAmount"),(0,o.Jq)("closeAuthorityOption"),(0,a.ZL)("closeAuthority")]),u=s.span},26224:function(e,t,n){"use strict";n.d(t,{Bl:function(){return v},qT:function(){return _},MO:function(){return k},rs:function(){return w}});var r,i,o=n(39386),a=n(93066),s=n(64174),u=n(79127);class l extends Error{constructor(e){super(e)}}class c extends l{constructor(){super(...arguments),this.name="TokenAccountNotFoundError"}}class d extends l{constructor(){super(...arguments),this.name="TokenInvalidAccountOwnerError"}}class p extends l{constructor(){super(...arguments),this.name="TokenInvalidAccountSizeError"}}class f extends l{constructor(){super(...arguments),this.name="TokenInvalidMintError"}}class h extends l{constructor(){super(...arguments),this.name="TokenOwnerOffCurveError"}}(r=i||(i={}))[r.Uninitialized=0]="Uninitialized",r[r.Mint=1]="Mint",r[r.Account=2]="Account";var m=n(83304);let g=(0,o.n_)([(0,o.u8)("m"),(0,o.u8)("n"),(0,a.Xg)("isInitialized"),(0,a.ZL)("signer1"),(0,a.ZL)("signer2"),(0,a.ZL)("signer3"),(0,a.ZL)("signer4"),(0,a.ZL)("signer5"),(0,a.ZL)("signer6"),(0,a.ZL)("signer7"),(0,a.ZL)("signer8"),(0,a.ZL)("signer9"),(0,a.ZL)("signer10"),(0,a.ZL)("signer11")]),y=g.span;var b=n(48764).Buffer;let _=(0,o.n_)([(0,o.Jq)("mintAuthorityOption"),(0,a.ZL)("mintAuthority"),(0,a.AW)("supply"),(0,o.u8)("decimals"),(0,a.Xg)("isInitialized"),(0,o.Jq)("freezeAuthorityOption"),(0,a.ZL)("freezeAuthority")]),v=_.span;function w(e,t,n=u.H_){if(!t)throw new c;if(!t.owner.equals(n))throw new d;if(t.data.lengthv){if(t.data.length<=m.lZ||t.data.length===y)throw new p;if(t.data[m.lZ]!=i.Mint)throw new f;o=t.data.slice(m.lZ+1)}return{address:e,mintAuthority:r.mintAuthorityOption?r.mintAuthority:null,supply:r.supply,decimals:r.decimals,isInitialized:r.isInitialized,freezeAuthority:r.freezeAuthorityOption?r.freezeAuthority:null,tlvData:o}}function k(e,t,n=!1,r=u.H_,i=u._u){if(!n&&!s.nh.isOnCurve(t.toBuffer()))throw new h;let[o]=s.nh.findProgramAddressSync([t.toBuffer(),r.toBuffer(),e.toBuffer()],i);return o}},64174:function(e,t,n){"use strict";n.d(t,{gw:function(){return nX},Lb:function(){return iB},ew:function(){return iP},RG:function(){return iC},nh:function(){return nn},Am:function(){return nI},ze:function(){return nE},yc:function(){return nz},YW:function(){return nx},Sl:function(){return nk},$Z:function(){return nA},GS:function(){return nS},Wf:function(){return iK},BV:function(){return nB}});var r,i,o={};n.r(o),n.d(o,{aInRange:function(){return Z},abool:function(){return C},abytes:function(){return P},bitGet:function(){return X},bitLen:function(){return Y},bitMask:function(){return J},bitSet:function(){return Q},bytesToHex:function(){return B},bytesToNumberBE:function(){return F},bytesToNumberLE:function(){return q},concatBytes:function(){return W},createHmacDrbg:function(){return en},ensureBytes:function(){return V},equalBytes:function(){return $},hexToBytes:function(){return D},hexToNumber:function(){return R},inRange:function(){return G},isBytes:function(){return E},memoized:function(){return ea},notImplemented:function(){return eo},numberToBytesBE:function(){return j},numberToBytesLE:function(){return U},numberToHexUnpadded:function(){return M},numberToVarBytesBE:function(){return z},utf8ToBytes:function(){return K},validateObject:function(){return ei}});var a=n(48764),s=n(12785);let u=BigInt(4294967296-1),l=BigInt(32);function c(e,t=!1){return t?{h:Number(e&u),l:Number(e>>l&u)}:{h:0|Number(e>>l&u),l:0|Number(e&u)}}function d(e,t=!1){let n=new Uint32Array(e.length),r=new Uint32Array(e.length);for(let i=0;iBigInt(e>>>0)<>>0),f=(e,t,n)=>e<>>32-n,h=(e,t,n)=>t<>>32-n,m=(e,t,n)=>t<>>64-n,g=(e,t,n)=>e<>>64-n;var y={fromBig:c,split:d,toBig:p,shrSH:(e,t,n)=>e>>>n,shrSL:(e,t,n)=>e<<32-n|t>>>n,rotrSH:(e,t,n)=>e>>>n|t<<32-n,rotrSL:(e,t,n)=>e<<32-n|t>>>n,rotrBH:(e,t,n)=>e<<64-n|t>>>n-32,rotrBL:(e,t,n)=>e>>>n-32|t<<64-n,rotr32H:(e,t)=>t,rotr32L:(e,t)=>e,rotlSH:f,rotlSL:h,rotlBH:m,rotlBL:g,add:function(e,t,n,r){let i=(t>>>0)+(r>>>0);return{h:e+n+(i/4294967296|0)|0,l:0|i}},add3L:(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0),add3H:(e,t,n,r)=>t+n+r+(e/4294967296|0)|0,add4L:(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0),add4H:(e,t,n,r,i)=>t+n+r+i+(e/4294967296|0)|0,add5H:(e,t,n,r,i,o)=>t+n+r+i+o+(e/4294967296|0)|0,add5L:(e,t,n,r,i)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(i>>>0)},b=n(40963);let[_,v]=y.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(e=>BigInt(e))),w=new Uint32Array(80),k=new Uint32Array(80);class x extends s.VR{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){let{Ah:e,Al:t,Bh:n,Bl:r,Ch:i,Cl:o,Dh:a,Dl:s,Eh:u,El:l,Fh:c,Fl:d,Gh:p,Gl:f,Hh:h,Hl:m}=this;return[e,t,n,r,i,o,a,s,u,l,c,d,p,f,h,m]}set(e,t,n,r,i,o,a,s,u,l,c,d,p,f,h,m){this.Ah=0|e,this.Al=0|t,this.Bh=0|n,this.Bl=0|r,this.Ch=0|i,this.Cl=0|o,this.Dh=0|a,this.Dl=0|s,this.Eh=0|u,this.El=0|l,this.Fh=0|c,this.Fl=0|d,this.Gh=0|p,this.Gl=0|f,this.Hh=0|h,this.Hl=0|m}process(e,t){for(let n=0;n<16;n++,t+=4)w[n]=e.getUint32(t),k[n]=e.getUint32(t+=4);for(let e=16;e<80;e++){let t=0|w[e-15],n=0|k[e-15],r=y.rotrSH(t,n,1)^y.rotrSH(t,n,8)^y.shrSH(t,n,7),i=y.rotrSL(t,n,1)^y.rotrSL(t,n,8)^y.shrSL(t,n,7),o=0|w[e-2],a=0|k[e-2],s=y.rotrSH(o,a,19)^y.rotrBH(o,a,61)^y.shrSH(o,a,6),u=y.rotrSL(o,a,19)^y.rotrBL(o,a,61)^y.shrSL(o,a,6),l=y.add4L(i,u,k[e-7],k[e-16]),c=y.add4H(l,r,s,w[e-7],w[e-16]);w[e]=0|c,k[e]=0|l}let{Ah:n,Al:r,Bh:i,Bl:o,Ch:a,Cl:s,Dh:u,Dl:l,Eh:c,El:d,Fh:p,Fl:f,Gh:h,Gl:m,Hh:g,Hl:b}=this;for(let e=0;e<80;e++){let t=y.rotrSH(c,d,14)^y.rotrSH(c,d,18)^y.rotrBH(c,d,41),x=y.rotrSL(c,d,14)^y.rotrSL(c,d,18)^y.rotrBL(c,d,41),A=c&p^~c&h,S=d&f^~d&m,I=y.add5L(b,x,S,v[e],k[e]),T=y.add5H(I,g,t,A,_[e],w[e]),E=0|I,P=y.rotrSH(n,r,28)^y.rotrBH(n,r,34)^y.rotrBH(n,r,39),C=y.rotrSL(n,r,28)^y.rotrBL(n,r,34)^y.rotrBL(n,r,39),O=n&i^n&a^i&a,B=r&o^r&s^o&s;g=0|h,b=0|m,h=0|p,m=0|f,p=0|c,f=0|d,({h:c,l:d}=y.add(0|u,0|l,0|T,0|E)),u=0|a,l=0|s,a=0|i,s=0|o,i=0|n,o=0|r;let M=y.add3L(E,C,B);n=y.add3H(M,T,P,O),r=0|M}({h:n,l:r}=y.add(0|this.Ah,0|this.Al,0|n,0|r)),({h:i,l:o}=y.add(0|this.Bh,0|this.Bl,0|i,0|o)),({h:a,l:s}=y.add(0|this.Ch,0|this.Cl,0|a,0|s)),({h:u,l:l}=y.add(0|this.Dh,0|this.Dl,0|u,0|l)),({h:c,l:d}=y.add(0|this.Eh,0|this.El,0|c,0|d)),({h:p,l:f}=y.add(0|this.Fh,0|this.Fl,0|p,0|f)),({h:h,l:m}=y.add(0|this.Gh,0|this.Gl,0|h,0|m)),({h:g,l:b}=y.add(0|this.Hh,0|this.Hl,0|g,0|b)),this.set(n,r,i,o,a,s,u,l,c,d,p,f,h,m,g,b)}roundClean(){w.fill(0),k.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}let A=(0,b.hE)(()=>new x),S=BigInt(0),I=BigInt(1),T=BigInt(2);function E(e){return e instanceof Uint8Array||null!=e&&"object"==typeof e&&"Uint8Array"===e.constructor.name}function P(e){if(!E(e))throw Error("Uint8Array expected")}function C(e,t){if("boolean"!=typeof t)throw Error(`${e} must be valid boolean, got "${t}".`)}let O=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function B(e){P(e);let t="";for(let n=0;n=L._0&&e<=L._9?e-L._0:e>=L._A&&e<=L._F?e-(L._A-10):e>=L._a&&e<=L._f?e-(L._a-10):void 0}function D(e){if("string"!=typeof e)throw Error("hex string expected, got "+typeof e);let t=e.length,n=t/2;if(t%2)throw Error("padded hex string expected, got unpadded hex of length "+t);let r=new Uint8Array(n);for(let t=0,i=0;t"bigint"==typeof e&&S<=e;function G(e,t,n){return H(e)&&H(t)&&H(n)&&t<=e&&eS;e>>=I,t+=1);return t}function X(e,t){return e>>BigInt(t)&I}function Q(e,t,n){return e|(n?I:S)<(T<new Uint8Array(e),et=e=>Uint8Array.from(e);function en(e,t,n){if("number"!=typeof e||e<2)throw Error("hashLen must be a number");if("number"!=typeof t||t<2)throw Error("qByteLen must be a number");if("function"!=typeof n)throw Error("hmacFn must be a function");let r=ee(e),i=ee(e),o=0,a=()=>{r.fill(1),i.fill(0),o=0},s=(...e)=>n(i,r,...e),u=(e=ee())=>{i=s(et([0]),e),r=s(),0!==e.length&&(i=s(et([1]),e),r=s())},l=()=>{if(o++>=1e3)throw Error("drbg: tried 1000 values");let e=0,n=[];for(;e{let n;for(a(),u(e);!(n=t(l()));)u();return a(),n};return c}let er={bigint:e=>"bigint"==typeof e,function:e=>"function"==typeof e,boolean:e=>"boolean"==typeof e,string:e=>"string"==typeof e,stringOrUint8Array:e=>"string"==typeof e||E(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>"function"==typeof e&&Number.isSafeInteger(e.outputLen)};function ei(e,t,n={}){let r=(t,n,r)=>{let i=er[n];if("function"!=typeof i)throw Error(`Invalid validator "${n}", expected function`);let o=e[t];if((!r||void 0!==o)&&!i(o,e))throw Error(`Invalid param ${String(t)}=${o} (${typeof o}), expected ${n}`)};for(let[e,n]of Object.entries(t))r(e,n,!1);for(let[e,t]of Object.entries(n))r(e,t,!0);return e}let eo=()=>{throw Error("not implemented")};function ea(e){let t=new WeakMap;return(n,...r)=>{let i=t.get(n);if(void 0!==i)return i;let o=e(n,...r);return t.set(n,o),o}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */let es=BigInt(0),eu=BigInt(1),el=BigInt(2),ec=BigInt(3),ed=BigInt(4),ep=BigInt(5),ef=BigInt(8);function eh(e,t){let n=e%t;return n>=es?n:t+n}function em(e,t,n){let r=e;for(;t-- >es;)r*=r,r%=n;return r}function eg(e,t){if(e===es||t<=es)throw Error(`invert: expected positive integers, got n=${e} mod=${t}`);let n=eh(e,t),r=t,i=es,o=eu,a=eu,s=es;for(;n!==es;){let e=r/n,t=r%n,u=i-a*e,l=o-s*e;r=n,n=t,i=a,o=s,a=u,s=l}let u=r;if(u!==eu)throw Error("invert: does not exist");return eh(i,t)}BigInt(9),BigInt(16);let ey=(e,t)=>(eh(e,t)&eu)===eu,eb=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function e_(e,t){let n=void 0!==t?t:e.toString(2).length;return{nBitLength:n,nByteLength:Math.ceil(n/8)}}function ev(e,t,n=!1,r={}){if(e<=es)throw Error(`Expected Field ORDER > 0, got ${e}`);let{nBitLength:i,nByteLength:o}=e_(e,t);if(o>2048)throw Error("Field lengths over 2048 bytes are not supported");let a=function(e){if(e%ed===ec){let t=(e+eu)/ed;return function(e,n){let r=e.pow(n,t);if(!e.eql(e.sqr(r),n))throw Error("Cannot find square root");return r}}if(e%ef===ep){let t=(e-ep)/ef;return function(e,n){let r=e.mul(n,el),i=e.pow(r,t),o=e.mul(n,i),a=e.mul(e.mul(o,el),i),s=e.mul(o,e.sub(a,e.ONE));if(!e.eql(e.sqr(s),n))throw Error("Cannot find square root");return s}}return function(e){let t,n,r;let i=(e-eu)/el;for(t=e-eu,n=0;t%el===es;t/=el,n++);for(r=el;r 0");if(n===eu)return es;let r=eu;for(;t>es;)t&eu&&(r=r*e%n),e=e*e%n,t>>=eu;return r}(r,i,e)!==e-eu;r++);if(1===n){let t=(e+eu)/ed;return function(e,n){let r=e.pow(n,t);if(!e.eql(e.sqr(r),n))throw Error("Cannot find square root");return r}}let o=(t+eu)/el;return function(e,a){if(e.pow(a,i)===e.neg(e.ONE))throw Error("Cannot find square root");let s=n,u=e.pow(e.mul(e.ONE,r),t),l=e.pow(a,o),c=e.pow(a,t);for(;!e.eql(c,e.ONE);){if(e.eql(c,e.ZERO))return e.ZERO;let t=1;for(let n=e.sqr(c);teh(t,e),isValid:t=>{if("bigint"!=typeof t)throw Error(`Invalid field element: expected bigint, got ${typeof t}`);return es<=t&&te===es,isOdd:e=>(e&eu)===eu,neg:t=>eh(-t,e),eql:(e,t)=>e===t,sqr:t=>eh(t*t,e),add:(t,n)=>eh(t+n,e),sub:(t,n)=>eh(t-n,e),mul:(t,n)=>eh(t*n,e),pow:(e,t)=>(function(e,t,n){if(n 0");if(n===es)return e.ONE;if(n===eu)return t;let r=e.ONE,i=t;for(;n>es;)n&eu&&(r=e.mul(r,i)),i=e.sqr(i),n>>=eu;return r})(s,e,t),div:(t,n)=>eh(t*eg(n,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>eg(t,e),sqrt:r.sqrt||(e=>a(s,e)),invertBatch:e=>(function(e,t){let n=Array(t.length),r=t.reduce((t,r,i)=>e.is0(r)?t:(n[i]=t,e.mul(t,r)),e.ONE),i=e.inv(r);return t.reduceRight((t,r,i)=>e.is0(r)?t:(n[i]=e.mul(t,n[i]),e.mul(t,r)),i),n})(s,e),cmov:(e,t,n)=>n?t:e,toBytes:e=>n?U(e,o):j(e,o),fromBytes:e=>{if(e.length!==o)throw Error(`Fp.fromBytes: expected ${o}, got ${e.length}`);return n?q(e):F(e)}});return Object.freeze(s)}function ew(e){if("bigint"!=typeof e)throw Error("field order must be bigint");let t=e.toString(2).length;return Math.ceil(t/8)}function ek(e){let t=ew(e);return t+Math.ceil(t/2)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */let ex=BigInt(0),eA=BigInt(1),eS=new WeakMap,eI=new WeakMap;function eT(e,t){let n=(e,t)=>{let n=t.negate();return e?n:t},r=e=>{if(!Number.isSafeInteger(e)||e<=0||e>t)throw Error(`Wrong window size=${e}, should be [1..${t}]`)},i=e=>(r(e),{windows:Math.ceil(t/e)+1,windowSize:2**(e-1)});return{constTimeNegate:n,unsafeLadder(t,n){let r=e.ZERO,i=t;for(;n>ex;)n&eA&&(r=r.add(i)),i=i.double(),n>>=eA;return r},precomputeWindow(e,t){let{windows:n,windowSize:r}=i(t),o=[],a=e,s=a;for(let e=0;e>=p,i>s&&(i-=d,o+=eA);let a=t+Math.abs(i)-1,f=e%2!=0,h=i<0;0===i?l=l.add(n(f,r[t])):u=u.add(n(h,r[a]))}return{p:u,f:l}},wNAFCached(e,t,n){let r=eI.get(e)||1,i=eS.get(e);return i||(i=this.precomputeWindow(e,r),1!==r&&eS.set(e,n(i))),this.wNAF(r,i,t)},setWindowSize(e,t){r(t),eI.set(e,t),eS.delete(e)}}}function eE(e){return!function(e){let t=eb.reduce((e,t)=>(e[t]="function",e),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"});ei(e,t)}(e.Fp),ei(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...e_(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */let eP=BigInt(0),eC=BigInt(1),eO=BigInt(2),eB=BigInt(8),eM={zip215:!0},eR=BigInt("57896044618658097711785492504343953926634992332820282019728792003956564819949"),eL=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752"),eN=BigInt(0),eD=BigInt(1),eF=BigInt(2);BigInt(3);let eq=BigInt(5),ej=BigInt(8);function eU(e,t){let n=eh(t*t*t,eR),r=eh(n*n*t,eR),i=function(e){let t=BigInt(10),n=BigInt(20),r=BigInt(40),i=BigInt(80),o=e*e%eR*e%eR,a=em(o,eF,eR)*o%eR,s=em(a,eD,eR)*e%eR,u=em(s,eq,eR)*s%eR,l=em(u,t,eR)*u%eR,c=em(l,n,eR)*l%eR,d=em(c,r,eR)*c%eR,p=em(d,i,eR)*d%eR,f=em(p,i,eR)*d%eR,h=em(f,t,eR)*u%eR,m=em(h,eF,eR)*e%eR;return{pow_p_5_8:m,b2:o}}(e*r).pow_p_5_8,o=eh(e*n*i,eR),a=eh(t*o*o,eR),s=o,u=eh(o*eL,eR),l=a===e,c=a===eh(-e,eR),d=a===eh(-e*eL,eR);return l&&(o=s),(c||d)&&(o=u),ey(o,eR)&&(o=eh(-o,eR)),{isValid:l||c,value:o}}let ez=ev(eR,void 0,!0),eV={a:BigInt(-1),d:BigInt("37095705934669439343138083508754565189542113879843219016388785533085940283555"),Fp:ez,n:BigInt("7237005577332262213973186563042994240857116359379907606001950938285454250989"),h:ej,Gx:BigInt("15112221349535400772501151409588531511454012693041857206046113283949847762202"),Gy:BigInt("46316835694926478169428394003475163141307993866256225615783033603165251855960"),hash:A,randomBytes:b.O6,adjustScalarBytes:function(e){return e[0]&=248,e[31]&=127,e[31]|=64,e},uvRatio:eU},eW=function(e){let t=function(e){let t=eE(e);return ei(e,{hash:"function",a:"bigint",d:"bigint",randomBytes:"function"},{adjustScalarBytes:"function",domain:"function",uvRatio:"function",mapToCurve:"function"}),Object.freeze({...t})}(e),{Fp:n,n:r,prehash:i,hash:o,randomBytes:a,nByteLength:s,h:u}=t,l=eO<{try{return{isValid:!0,value:n.sqrt(e*n.inv(t))}}catch(e){return{isValid:!1,value:eP}}}),p=t.adjustScalarBytes||(e=>e),f=t.domain||((e,t,n)=>{if(C("phflag",n),t.length||n)throw Error("Contexts/pre-hash are not supported");return e});function h(e,t){Z("coordinate "+e,t,eP,l)}function m(e){if(!(e instanceof b))throw Error("ExtendedPoint expected")}let g=ea((e,t)=>{let{ex:r,ey:i,ez:o}=e,a=e.is0();null==t&&(t=a?eB:n.inv(o));let s=c(r*t),u=c(i*t),l=c(o*t);if(a)return{x:eP,y:eC};if(l!==eC)throw Error("invZ was invalid");return{x:s,y:u}}),y=ea(e=>{let{a:n,d:r}=t;if(e.is0())throw Error("bad point: ZERO");let{ex:i,ey:o,ez:a,et:s}=e,u=c(i*i),l=c(o*o),d=c(a*a),p=c(d*d),f=c(u*n),h=c(d*c(f+l)),m=c(p+c(r*c(u*l)));if(h!==m)throw Error("bad point: equation left != right (1)");let g=c(i*o),y=c(a*s);if(g!==y)throw Error("bad point: equation left != right (2)");return!0});class b{constructor(e,t,n,r){this.ex=e,this.ey=t,this.ez=n,this.et=r,h("x",e),h("y",t),h("z",n),h("t",r),Object.freeze(this)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static fromAffine(e){if(e instanceof b)throw Error("extended point not allowed");let{x:t,y:n}=e||{};return h("x",t),h("y",n),new b(t,n,eC,c(t*n))}static normalizeZ(e){let t=n.invertBatch(e.map(e=>e.ez));return e.map((e,n)=>e.toAffine(t[n])).map(b.fromAffine)}_setWindowSize(e){w.setWindowSize(this,e)}assertValidity(){y(this)}equals(e){m(e);let{ex:t,ey:n,ez:r}=this,{ex:i,ey:o,ez:a}=e,s=c(t*a),u=c(i*r),l=c(n*a),d=c(o*r);return s===u&&l===d}is0(){return this.equals(b.ZERO)}negate(){return new b(c(-this.ex),this.ey,this.ez,c(-this.et))}double(){let{a:e}=t,{ex:n,ey:r,ez:i}=this,o=c(n*n),a=c(r*r),s=c(eO*c(i*i)),u=c(e*o),l=n+r,d=c(c(l*l)-o-a),p=u+a,f=p-s,h=u-a,m=c(d*f),g=c(p*h),y=c(d*h),_=c(f*p);return new b(m,g,_,y)}add(e){m(e);let{a:n,d:r}=t,{ex:i,ey:o,ez:a,et:s}=this,{ex:u,ey:l,ez:d,et:p}=e;if(n===BigInt(-1)){let e=c((o-i)*(l+u)),t=c((o+i)*(l-u)),n=c(t-e);if(n===eP)return this.double();let r=c(a*eO*p),f=c(s*eO*d),h=f+r,m=t+e,g=f-r,y=c(h*n),_=c(m*g),v=c(h*g),w=c(n*m);return new b(y,_,w,v)}let f=c(i*u),h=c(o*l),g=c(s*r*p),y=c(a*d),_=c((i+o)*(u+l)-f-h),v=y-g,w=y+g,k=c(h-n*f),x=c(_*v),A=c(w*k),S=c(_*k),I=c(v*w);return new b(x,A,I,S)}subtract(e){return this.add(e.negate())}wNAF(e){return w.wNAFCached(this,e,b.normalizeZ)}multiply(e){Z("scalar",e,eC,r);let{p:t,f:n}=this.wNAF(e);return b.normalizeZ([t,n])[0]}multiplyUnsafe(e){return(Z("scalar",e,eP,r),e===eP)?v:this.equals(v)||e===eC?this:this.equals(_)?this.wNAF(e).p:w.unsafeLadder(this,e)}isSmallOrder(){return this.multiplyUnsafe(u).is0()}isTorsionFree(){return w.unsafeLadder(this,r).is0()}toAffine(e){return g(this,e)}clearCofactor(){let{h:e}=t;return e===eC?this:this.multiplyUnsafe(e)}static fromHex(e,r=!1){let{d:i,a:o}=t,a=n.BYTES;e=V("pointHex",e,a),C("zip215",r);let s=e.slice(),u=e[a-1];s[a-1]=-129&u;let p=q(s),f=r?l:n.ORDER;Z("pointHex.y",p,eP,f);let h=c(p*p),m=c(h-eC),g=c(i*h-o),{isValid:y,value:_}=d(m,g);if(!y)throw Error("Point.fromHex: invalid y coordinate");let v=(_&eC)===eC,w=(128&u)!=0;if(!r&&_===eP&&w)throw Error("Point.fromHex: x=0 and x_0=1");return w!==v&&(_=c(-_)),b.fromAffine({x:_,y:p})}static fromPrivateKey(e){return k(e).point}toRawBytes(){let{x:e,y:t}=this.toAffine(),r=U(t,n.BYTES);return r[r.length-1]|=e&eC?128:0,r}toHex(){return B(this.toRawBytes())}}b.BASE=new b(t.Gx,t.Gy,eC,c(t.Gx*t.Gy)),b.ZERO=new b(eP,eC,eC,eP);let{BASE:_,ZERO:v}=b,w=eT(b,8*s);function k(e){e=V("private key",e,s);let t=V("hashed private key",o(e),2*s),n=p(t.slice(0,s)),i=t.slice(s,2*s),a=eh(q(n),r),u=_.multiply(a),l=u.toRawBytes();return{head:n,prefix:i,scalar:a,point:u,pointBytes:l}}function x(e=new Uint8Array,...t){let n=W(...t);return eh(q(o(f(n,V("context",e),!!i))),r)}return _._setWindowSize(8),{CURVE:t,getPublicKey:function(e){return k(e).pointBytes},sign:function(e,t,o={}){e=V("message",e),i&&(e=i(e));let{prefix:a,scalar:u,pointBytes:l}=k(t),c=x(o.context,a,e),d=_.multiply(c).toRawBytes(),p=x(o.context,d,l,e),f=eh(c+p*u,r);Z("signature.s",f,eP,r);let h=W(d,U(f,n.BYTES));return V("result",h,2*s)},verify:function(e,t,r,o=eM){let a,s,u;let{context:l,zip215:c}=o,d=n.BYTES;e=V("signature",e,2*d),t=V("message",t),void 0!==c&&C("zip215",c),i&&(t=i(t));let p=q(e.slice(d,2*d));try{a=b.fromHex(r,c),s=b.fromHex(e.slice(0,d),c),u=_.multiplyUnsafe(p)}catch(e){return!1}if(!c&&a.isSmallOrder())return!1;let f=x(l,s.toRawBytes(),a.toRawBytes(),t),h=s.add(a.multiplyUnsafe(f));return h.subtract(u).clearCofactor().equals(b.ZERO)},ExtendedPoint:b,utils:{getExtendedPublicKey:k,randomPrivateKey:()=>a(n.BYTES),precompute:(e=8,t=b.BASE)=>(t._setWindowSize(e),t.multiply(BigInt(3)),t)}}}(eV);function e$(e){if(!(e instanceof eZ))throw Error("RistrettoPoint expected")}let eK=e=>eU(eD,e),eH=e=>eW.CURVE.Fp.create(null&bytesToNumberLE(e));function eG(e){let{d:t}=eW.CURVE,n=eW.CURVE.Fp.ORDER,r=eW.CURVE.Fp.create,i=r(null*e*e),o=r((i+eD)*null),a=BigInt(-1),s=r((a-t*i)*r(i+t)),{isValid:u,value:l}=eU(o,s),c=r(l*e);isNegativeLE(c,n)||(c=r(-c)),u||(l=c),u||(a=i);let d=r(a*(i-eD)*null-s),p=l*l,f=r((l+l)*s),h=r(null*d),m=r(eD-p),g=r(eD+p);return new eW.ExtendedPoint(r(f*g),r(m*h),r(h*g),r(f*m))}class eZ{constructor(e){this.ep=e}static fromAffine(e){return new eZ(eW.ExtendedPoint.fromAffine(e))}static hashToCurve(e){e=ensureBytes("ristrettoHash",e,64);let t=eH(e.slice(0,32)),n=eG(t),r=eH(e.slice(32,64)),i=eG(r);return new eZ(n.add(i))}static fromHex(e){e=ensureBytes("ristrettoHex",e,32);let{a:t,d:n}=eW.CURVE,r=eW.CURVE.Fp.ORDER,i=eW.CURVE.Fp.create,o="RistrettoPoint.fromHex: the hex is not valid encoding of RistrettoPoint",a=eH(e);if(!equalBytes(numberToBytesLE(a,32),e)||isNegativeLE(a,r))throw Error(o);let s=i(a*a),u=i(eD+t*s),l=i(eD-t*s),c=i(u*u),d=i(l*l),p=i(t*n*c-d),{isValid:f,value:h}=eK(i(p*d)),m=i(h*l),g=i(h*m*p),y=i((a+a)*m);isNegativeLE(y,r)&&(y=i(-y));let b=i(u*g),_=i(y*b);if(!f||isNegativeLE(_,r)||b===eN)throw Error(o);return new eZ(new eW.ExtendedPoint(y,b,eD,_))}toRawBytes(){let e,{ex:t,ey:n,ez:r,et:i}=this.ep,o=eW.CURVE.Fp.ORDER,a=eW.CURVE.Fp.create,s=a(a(r+n)*a(r-n)),u=a(t*n),l=a(u*u),{value:c}=eK(a(s*l)),d=a(c*s),p=a(c*u),f=a(d*p*i);if(isNegativeLE(i*f,o)){let r=a(null*n),i=a(null*t);t=r,n=i,e=a(null*d)}else e=p;isNegativeLE(t*f,o)&&(n=a(-n));let h=a((r-n)*e);return isNegativeLE(h,o)&&(h=a(-h)),numberToBytesLE(h,32)}toHex(){return bytesToHex(this.toRawBytes())}toString(){return this.toHex()}equals(e){e$(e);let{ex:t,ey:n}=this.ep,{ex:r,ey:i}=e.ep,o=eW.CURVE.Fp.create,a=o(t*i)===o(n*r),s=o(n*i)===o(t*r);return a||s}add(e){return e$(e),new eZ(this.ep.add(e.ep))}subtract(e){return e$(e),new eZ(this.ep.subtract(e.ep))}multiply(e){return new eZ(this.ep.multiply(e))}multiplyUnsafe(e){return new eZ(this.ep.multiplyUnsafe(e))}double(){return new eZ(this.ep.double())}negate(){return new eZ(this.ep.negate())}}var eY=n(13550),eX=n.n(eY),eQ=n(10011),eJ=n.n(eQ),e0=n(88281),e1=n(25532),e2=n(39386),e6=n(40475);class e3 extends TypeError{constructor(e,t){let n;let{message:r,explanation:i,...o}=e,{path:a}=e,s=0===a.length?r:`At path: ${a.join(".")} -- ${r}`;super(i??s),null!=i&&(this.cause=s),Object.assign(this,o),this.name=this.constructor.name,this.failures=()=>n??(n=[e,...t()])}}function e4(e){return"object"==typeof e&&null!=e}function e5(e){return e4(e)&&!Array.isArray(e)}function e8(e){return"symbol"==typeof e?e.toString():"string"==typeof e?JSON.stringify(e):`${e}`}function*e9(e,t,n,r){var i;for(let o of(e4(i=e)&&"function"==typeof i[Symbol.iterator]||(e=[e]),e)){let e=function(e,t,n,r){if(!0===e)return;!1===e?e={}:"string"==typeof e&&(e={message:e});let{path:i,branch:o}=t,{type:a}=n,{refinement:s,message:u=`Expected a value of type \`${a}\`${s?` with refinement \`${s}\``:""}, but received: \`${e8(r)}\``}=e;return{value:r,type:a,refinement:s,key:i[i.length-1],path:i,branch:o,...e,message:u}}(o,t,n,r);e&&(yield e)}}function*e7(e,t,n={}){let{path:r=[],branch:i=[e],coerce:o=!1,mask:a=!1}=n,s={path:r,branch:i,mask:a};o&&(e=t.coercer(e,s));let u="valid";for(let r of t.validator(e,s))r.explanation=n.message,u="not_valid",yield[r,void 0];for(let[l,c,d]of t.entries(e,s)){let t=e7(c,d,{path:void 0===l?r:[...r,l],branch:void 0===l?i:[...i,c],coerce:o,mask:a,message:n.message});for(let n of t)n[0]?(u=null!=n[0].refinement?"not_refined":"not_valid",yield[n[0],void 0]):o&&(c=n[1],void 0===l?e=c:e instanceof Map?e.set(l,c):e instanceof Set?e.add(c):e4(e)&&(void 0!==c||l in e)&&(e[l]=c))}if("not_valid"!==u)for(let r of t.refiner(e,s))r.explanation=n.message,u="not_refined",yield[r,void 0];"valid"===u&&(yield[void 0,e])}class te{constructor(e){let{type:t,schema:n,validator:r,refiner:i,coercer:o=e=>e,entries:a=function*(){}}=e;this.type=t,this.schema=n,this.entries=a,this.coercer=o,r?this.validator=(e,t)=>{let n=r(e,t);return e9(n,t,this,e)}:this.validator=()=>[],i?this.refiner=(e,t)=>{let n=i(e,t);return e9(n,t,this,e)}:this.refiner=()=>[]}assert(e,t){return function(e,t,n){let r=tr(e,t,{message:n});if(r[0])throw r[0]}(e,this,t)}create(e,t){return tt(e,this,t)}is(e){return tn(e,this)}mask(e,t){return function(e,t,n){let r=tr(e,t,{coerce:!0,mask:!0,message:n});if(!r[0])return r[1];throw r[0]}(e,this,t)}validate(e,t={}){return tr(e,this,t)}}function tt(e,t,n){let r=tr(e,t,{coerce:!0,message:n});if(!r[0])return r[1];throw r[0]}function tn(e,t){let n=tr(e,t);return!n[0]}function tr(e,t,n={}){let r=e7(e,t,n),i=function(e){let{done:t,value:n}=e.next();return t?void 0:n}(r);if(i[0]){let e=new e3(i[0],function*(){for(let e of r)e[0]&&(yield e[0])});return[e,void 0]}{let e=i[1];return[void 0,e]}}function ti(e,t){return new te({type:e,schema:null,validator:t})}function to(e){return new te({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(let[n,r]of t.entries())yield[n,r,e]},coercer:e=>Array.isArray(e)?e.slice():e,validator:e=>Array.isArray(e)||`Expected an array value, but received: ${e8(e)}`})}function ta(){return ti("boolean",e=>"boolean"==typeof e)}function ts(e){return ti("instance",t=>t instanceof e||`Expected a \`${e.name}\` instance, but received: ${e8(t)}`)}function tu(e){let t=e8(e),n=typeof e;return new te({type:"literal",schema:"string"===n||"number"===n||"boolean"===n?e:null,validator:n=>n===e||`Expected the literal \`${t}\`, but received: ${e8(n)}`})}function tl(e){return new te({...e,validator:(t,n)=>null===t||e.validator(t,n),refiner:(t,n)=>null===t||e.refiner(t,n)})}function tc(){return ti("number",e=>"number"==typeof e&&!isNaN(e)||`Expected a number, but received: ${e8(e)}`)}function td(e){return new te({...e,validator:(t,n)=>void 0===t||e.validator(t,n),refiner:(t,n)=>void 0===t||e.refiner(t,n)})}function tp(e,t){return new te({type:"record",schema:null,*entries(n){if(e4(n))for(let r in n){let i=n[r];yield[r,r,e],yield[r,i,t]}},validator:e=>e5(e)||`Expected an object, but received: ${e8(e)}`,coercer:e=>e5(e)?{...e}:e})}function tf(){return ti("string",e=>"string"==typeof e||`Expected a string, but received: ${e8(e)}`)}function th(e){let t=ti("never",()=>!1);return new te({type:"tuple",schema:null,*entries(n){if(Array.isArray(n)){let r=Math.max(e.length,n.length);for(let i=0;iArray.isArray(e)||`Expected an array, but received: ${e8(e)}`,coercer:e=>Array.isArray(e)?e.slice():e})}function tm(e){let t=Object.keys(e);return new te({type:"type",schema:e,*entries(n){if(e4(n))for(let r of t)yield[r,n[r],e[r]]},validator:e=>e5(e)||`Expected an object, but received: ${e8(e)}`,coercer:e=>e5(e)?{...e}:e})}function tg(e){let t=e.map(e=>e.type).join(" | ");return new te({type:"union",schema:null,coercer(t,n){for(let r of e){let[e,i]=r.validate(t,{coerce:!0,mask:n.mask});if(!e)return i}return t},validator(n,r){let i=[];for(let t of e){let[...e]=e7(n,t,r),[o]=e;if(!o[0])return[];for(let[t]of e)t&&i.push(t)}return[`Expected the value to satisfy a union of \`${t}\`, but received: ${e8(n)}`,...i]}})}function ty(){return ti("unknown",()=>!0)}function tb(e,t,n){return new te({...e,coercer:(r,i)=>tn(r,t)?e.coercer(n(r,i),i):e.coercer(r,i)})}var t_=n(31198),tv=n.n(t_),tw=n(64714),tk=class extends tw.v{socket;constructor(e,t,n){super(),this.socket=new window.WebSocket(e,n),this.socket.onopen=()=>this.emit("open"),this.socket.onmessage=e=>this.emit("message",e.data),this.socket.onerror=e=>this.emit("error",e),this.socket.onclose=e=>{this.emit("close",e.code,e.reason)}}send(e,t,n){let r=n||t;try{this.socket.send(e),r()}catch(e){r(e)}}close(e,t){this.socket.close(e,t)}addEventListener(e,t,n){this.socket.addEventListener(e,t,n)}},tx=class{encode(e){return JSON.stringify(e)}decode(e){return JSON.parse(e)}},tA=class extends tw.v{address;rpc_id;queue;options;autoconnect;ready;reconnect;reconnect_timer_id;reconnect_interval;max_reconnects;rest_options;current_reconnects;generate_request_id;socket;webSocketFactory;dataPack;constructor(e,t="ws://localhost:8080",{autoconnect:n=!0,reconnect:r=!0,reconnect_interval:i=1e3,max_reconnects:o=5,...a}={},s,u){super(),this.webSocketFactory=e,this.queue={},this.rpc_id=0,this.address=t,this.autoconnect=n,this.ready=!1,this.reconnect=r,this.reconnect_timer_id=void 0,this.reconnect_interval=i,this.max_reconnects=o,this.rest_options=a,this.current_reconnects=0,this.generate_request_id=s||(()=>++this.rpc_id),u?this.dataPack=u:this.dataPack=new tx,this.autoconnect&&this._connect(this.address,{autoconnect:this.autoconnect,reconnect:this.reconnect,reconnect_interval:this.reconnect_interval,max_reconnects:this.max_reconnects,...this.rest_options})}connect(){this.socket||this._connect(this.address,{autoconnect:this.autoconnect,reconnect:this.reconnect,reconnect_interval:this.reconnect_interval,max_reconnects:this.max_reconnects,...this.rest_options})}call(e,t,n,r){return r||"object"!=typeof n||(r=n,n=null),new Promise((i,o)=>{if(!this.ready)return o(Error("socket not ready"));let a=this.generate_request_id(e,t);this.socket.send(this.dataPack.encode({jsonrpc:"2.0",method:e,params:t||void 0,id:a}),r,e=>{if(e)return o(e);this.queue[a]={promise:[i,o]},n&&(this.queue[a].timeout=setTimeout(()=>{delete this.queue[a],o(Error("reply timeout"))},n))})})}async login(e){let t=await this.call("rpc.login",e);if(!t)throw Error("authentication failed");return t}async listMethods(){return await this.call("__listMethods")}notify(e,t){return new Promise((n,r)=>{if(!this.ready)return r(Error("socket not ready"));this.socket.send(this.dataPack.encode({jsonrpc:"2.0",method:e,params:t}),e=>{if(e)return r(e);n()})})}async subscribe(e){"string"==typeof e&&(e=[e]);let t=await this.call("rpc.on",e);if("string"==typeof e&&"ok"!==t[e])throw Error("Failed subscribing to an event '"+e+"' with: "+t[e]);return t}async unsubscribe(e){"string"==typeof e&&(e=[e]);let t=await this.call("rpc.off",e);if("string"==typeof e&&"ok"!==t[e])throw Error("Failed unsubscribing from an event with: "+t);return t}close(e,t){this.socket.close(e||1e3,t)}setAutoReconnect(e){this.reconnect=e}setReconnectInterval(e){this.reconnect_interval=e}setMaxReconnects(e){this.max_reconnects=e}_connect(e,t){clearTimeout(this.reconnect_timer_id),this.socket=this.webSocketFactory(e,t),this.socket.addEventListener("open",()=>{this.ready=!0,this.emit("open"),this.current_reconnects=0}),this.socket.addEventListener("message",({data:e})=>{e instanceof ArrayBuffer&&(e=a.Buffer.from(e).toString());try{e=this.dataPack.decode(e)}catch(e){return}if(e.notification&&this.listeners(e.notification).length){if(!Object.keys(e.params).length)return this.emit(e.notification);let t=[e.notification];if(e.params.constructor===Object)t.push(e.params);else for(let n=0;n{this.emit.apply(this,t)})}if(!this.queue[e.id])return e.method?Promise.resolve().then(()=>{this.emit(e.method,e?.params)}):void 0;"error"in e=="result"in e&&this.queue[e.id].promise[1](Error('Server response malformed. Response must include either "result" or "error", but not both.')),this.queue[e.id].timeout&&clearTimeout(this.queue[e.id].timeout),e.error?this.queue[e.id].promise[1](e.error):this.queue[e.id].promise[0](e.result),delete this.queue[e.id]}),this.socket.addEventListener("error",e=>this.emit("error",e)),this.socket.addEventListener("close",({code:n,reason:r})=>{this.ready&&setTimeout(()=>this.emit("close",n,r),0),this.ready=!1,this.socket=void 0,1e3!==n&&(this.current_reconnects++,this.reconnect&&(this.max_reconnects>this.current_reconnects||0===this.max_reconnects)&&(this.reconnect_timer_id=setTimeout(()=>this._connect(e,t),this.reconnect_interval)))})}},tS=n(77520);let tI=[],tT=[],tE=[],tP=BigInt(0),tC=BigInt(1),tO=BigInt(2),tB=BigInt(7),tM=BigInt(256),tR=BigInt(113);for(let e=0,t=tC,n=1,r=0;e<24;e++){[n,r]=[r,(2*n+3*r)%5],tI.push(2*(5*r+n)),tT.push((e+1)*(e+2)/2%64);let i=tP;for(let e=0;e<7;e++)(t=(t<>tB)*tR)%tM)&tO&&(i^=tC<<(tC<n>32?m(e,t,n):f(e,t,n),tF=(e,t,n)=>n>32?g(e,t,n):h(e,t,n);class tq extends b.kb{constructor(e,t,n,r=!1,i=24){if(super(),this.blockLen=e,this.suffix=t,this.outputLen=n,this.enableXOF=r,this.rounds=i,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,(0,tS.Rx)(n),0>=this.blockLen||this.blockLen>=200)throw Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,b.Jq)(this.state)}keccak(){b.iA||(0,b.l1)(this.state32),function(e,t=24){let n=new Uint32Array(10);for(let r=24-t;r<24;r++){for(let t=0;t<10;t++)n[t]=e[t]^e[t+10]^e[t+20]^e[t+30]^e[t+40];for(let t=0;t<10;t+=2){let r=(t+8)%10,i=(t+2)%10,o=n[i],a=n[i+1],s=tD(o,a,1)^n[r],u=tF(o,a,1)^n[r+1];for(let n=0;n<50;n+=10)e[t+n]^=s,e[t+n+1]^=u}let t=e[2],i=e[3];for(let n=0;n<24;n++){let r=tT[n],o=tD(t,i,r),a=tF(t,i,r),s=tI[n];t=e[s],i=e[s+1],e[s]=o,e[s+1]=a}for(let t=0;t<50;t+=10){for(let r=0;r<10;r++)n[r]=e[t+r];for(let r=0;r<10;r++)e[t+r]^=~n[(r+2)%10]&n[(r+4)%10]}e[0]^=tL[r],e[1]^=tN[r]}n.fill(0)}(this.state32,this.rounds),b.iA||(0,b.l1)(this.state32),this.posOut=0,this.pos=0}update(e){(0,tS.Gg)(this);let{blockLen:t,state:n}=this;e=(0,b.O0)(e);let r=e.length;for(let i=0;i=n&&this.keccak();let o=Math.min(n-this.posOut,i-r);e.set(t.subarray(this.posOut,this.posOut+o),r),this.posOut+=o,r+=o}return e}xofInto(e){if(!this.enableXOF)throw Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return(0,tS.Rx)(e),this.xofInto(new Uint8Array(e))}digestInto(e){if((0,tS.J8)(e,this),this.finished)throw Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){let{blockLen:t,suffix:n,outputLen:r,rounds:i,enableXOF:o}=this;return e||(e=new tq(t,n,r,o,i)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=i,e.suffix=n,e.outputLen=r,e.enableXOF=o,e.destroyed=this.destroyed,e}}let tj=(0,b.hE)(()=>new tq(136,1,32));class tU extends b.kb{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,(0,tS.vp)(e);let n=(0,b.O0)(t);if(this.iHash=e.create(),"function"!=typeof this.iHash.update)throw Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let r=this.blockLen,i=new Uint8Array(r);i.set(n.length>r?e.create().update(n).digest():n);for(let e=0;enew tU(e,t).update(n).digest();/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function tV(e){void 0!==e.lowS&&C("lowS",e.lowS),void 0!==e.prehash&&C("prehash",e.prehash)}tz.create=(e,t)=>new tU(e,t);let{bytesToNumberBE:tW,hexToBytes:t$}=o,tK={Err:class extends Error{constructor(e=""){super(e)}},_parseInt(e){let{Err:t}=tK;if(e.length<2||2!==e[0])throw new t("Invalid signature integer tag");let n=e[1],r=e.subarray(2,n+2);if(!n||r.length!==n)throw new t("Invalid signature integer: wrong length");if(128&r[0])throw new t("Invalid signature integer: negative");if(0===r[0]&&!(128&r[1]))throw new t("Invalid signature integer: unnecessary leading zero");return{d:tW(r),l:e.subarray(n+2)}},toSig(e){let{Err:t}=tK,n="string"==typeof e?t$(e):e;P(n);let r=n.length;if(r<2||48!=n[0])throw new t("Invalid signature tag");if(n[1]!==r-2)throw new t("Invalid signature: incorrect length");let{d:i,l:o}=tK._parseInt(n.subarray(2)),{d:a,l:s}=tK._parseInt(o);if(s.length)throw new t("Invalid signature: left bytes after parsing");return{r:i,s:a}},hexFromSig(e){let t=e=>8&Number.parseInt(e[0],16)?"00"+e:e,n=e=>{let t=e.toString(16);return 1&t.length?`0${t}`:t},r=t(n(e.s)),i=t(n(e.r)),o=r.length/2,a=i.length/2,s=n(o),u=n(a);return`30${n(a+o+4)}02${u}${i}02${s}${r}`}},tH=BigInt(0),tG=BigInt(1),tZ=(BigInt(2),BigInt(3));BigInt(4);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */let tY=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),tX=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),tQ=BigInt(1),tJ=BigInt(2),t0=(e,t)=>(e+t/tJ)/t,t1=ev(tY,void 0,void 0,{sqrt:function(e){let t=BigInt(3),n=BigInt(6),r=BigInt(11),i=BigInt(22),o=BigInt(23),a=BigInt(44),s=BigInt(88),u=e*e*e%tY,l=u*u*e%tY,c=em(l,t,tY)*l%tY,d=em(c,t,tY)*l%tY,p=em(d,tJ,tY)*u%tY,f=em(p,r,tY)*p%tY,h=em(f,i,tY)*f%tY,m=em(h,a,tY)*h%tY,g=em(m,s,tY)*m%tY,y=em(g,a,tY)*h%tY,b=em(y,t,tY)*l%tY,_=em(b,o,tY)*f%tY,v=em(_,n,tY)*u%tY,w=em(v,tJ,tY);if(!t1.eql(t1.sqr(w),e))throw Error("Cannot find square root");return w}}),t2=function(e,t){let n=t=>(function(e){let t=function(e){let t=eE(e);return ei(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}(e),{Fp:n,n:r}=t,i=n.BYTES+1,o=2*n.BYTES+1;function a(e){return eh(e,r)}let{ProjectivePoint:s,normPrivateKeyToScalar:u,weierstrassEquation:l,isWithinCurveOrder:c}=function(e){let t=function(e){let t=eE(e);ei(t,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});let{endo:n,Fp:r,a:i}=t;if(n){if(!r.eql(i,r.ZERO))throw Error("Endomorphism can only be defined for Koblitz curves that have a=0");if("object"!=typeof n||"bigint"!=typeof n.beta||"function"!=typeof n.splitScalar)throw Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...t})}(e),{Fp:n}=t,r=t.toBytes||((e,t,r)=>{let i=t.toAffine();return W(Uint8Array.from([4]),n.toBytes(i.x),n.toBytes(i.y))}),i=t.fromBytes||(e=>{let t=e.subarray(1),r=n.fromBytes(t.subarray(0,n.BYTES)),i=n.fromBytes(t.subarray(n.BYTES,2*n.BYTES));return{x:r,y:i}});function o(e){let{a:r,b:i}=t,o=n.sqr(e),a=n.mul(o,e);return n.add(n.add(a,n.mul(e,r)),i)}if(!n.eql(n.sqr(t.Gy),o(t.Gx)))throw Error("bad generator point: equation left != right");function a(e){let n;let{allowedPrivateKeyLengths:r,nByteLength:i,wrapPrivateKey:o,n:a}=t;if(r&&"bigint"!=typeof e){if(E(e)&&(e=B(e)),"string"!=typeof e||!r.includes(e.length))throw Error("Invalid key");e=e.padStart(2*i,"0")}try{n="bigint"==typeof e?e:F(V("private key",e,i))}catch(t){throw Error(`private key must be ${i} bytes, hex or bigint, not ${typeof e}`)}return o&&(n=eh(n,a)),Z("private key",n,tG,a),n}function s(e){if(!(e instanceof c))throw Error("ProjectivePoint expected")}let u=ea((e,t)=>{let{px:r,py:i,pz:o}=e;if(n.eql(o,n.ONE))return{x:r,y:i};let a=e.is0();null==t&&(t=a?n.ONE:n.inv(o));let s=n.mul(r,t),u=n.mul(i,t),l=n.mul(o,t);if(a)return{x:n.ZERO,y:n.ZERO};if(!n.eql(l,n.ONE))throw Error("invZ was invalid");return{x:s,y:u}}),l=ea(e=>{if(e.is0()){if(t.allowInfinityPoint&&!n.is0(e.py))return;throw Error("bad point: ZERO")}let{x:r,y:i}=e.toAffine();if(!n.isValid(r)||!n.isValid(i))throw Error("bad point: x or y not FE");let a=n.sqr(i),s=o(r);if(!n.eql(a,s))throw Error("bad point: equation left != right");if(!e.isTorsionFree())throw Error("bad point: not in prime-order subgroup");return!0});class c{constructor(e,t,r){if(this.px=e,this.py=t,this.pz=r,null==e||!n.isValid(e))throw Error("x required");if(null==t||!n.isValid(t))throw Error("y required");if(null==r||!n.isValid(r))throw Error("z required");Object.freeze(this)}static fromAffine(e){let{x:t,y:r}=e||{};if(!e||!n.isValid(t)||!n.isValid(r))throw Error("invalid affine point");if(e instanceof c)throw Error("projective point not allowed");let i=e=>n.eql(e,n.ZERO);return i(t)&&i(r)?c.ZERO:new c(t,r,n.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(e){let t=n.invertBatch(e.map(e=>e.pz));return e.map((e,n)=>e.toAffine(t[n])).map(c.fromAffine)}static fromHex(e){let t=c.fromAffine(i(V("pointHex",e)));return t.assertValidity(),t}static fromPrivateKey(e){return c.BASE.multiply(a(e))}_setWindowSize(e){p.setWindowSize(this,e)}assertValidity(){l(this)}hasEvenY(){let{y:e}=this.toAffine();if(n.isOdd)return!n.isOdd(e);throw Error("Field doesn't support isOdd")}equals(e){s(e);let{px:t,py:r,pz:i}=this,{px:o,py:a,pz:u}=e,l=n.eql(n.mul(t,u),n.mul(o,i)),c=n.eql(n.mul(r,u),n.mul(a,i));return l&&c}negate(){return new c(this.px,n.neg(this.py),this.pz)}double(){let{a:e,b:r}=t,i=n.mul(r,tZ),{px:o,py:a,pz:s}=this,u=n.ZERO,l=n.ZERO,d=n.ZERO,p=n.mul(o,o),f=n.mul(a,a),h=n.mul(s,s),m=n.mul(o,a);return m=n.add(m,m),d=n.mul(o,s),d=n.add(d,d),u=n.mul(e,d),l=n.mul(i,h),l=n.add(u,l),u=n.sub(f,l),l=n.add(f,l),l=n.mul(u,l),u=n.mul(m,u),d=n.mul(i,d),h=n.mul(e,h),m=n.sub(p,h),m=n.mul(e,m),m=n.add(m,d),d=n.add(p,p),p=n.add(d,p),p=n.add(p,h),p=n.mul(p,m),l=n.add(l,p),h=n.mul(a,s),h=n.add(h,h),p=n.mul(h,m),u=n.sub(u,p),d=n.mul(h,f),d=n.add(d,d),d=n.add(d,d),new c(u,l,d)}add(e){s(e);let{px:r,py:i,pz:o}=this,{px:a,py:u,pz:l}=e,d=n.ZERO,p=n.ZERO,f=n.ZERO,h=t.a,m=n.mul(t.b,tZ),g=n.mul(r,a),y=n.mul(i,u),b=n.mul(o,l),_=n.add(r,i),v=n.add(a,u);_=n.mul(_,v),v=n.add(g,y),_=n.sub(_,v),v=n.add(r,o);let w=n.add(a,l);return v=n.mul(v,w),w=n.add(g,b),v=n.sub(v,w),w=n.add(i,o),d=n.add(u,l),w=n.mul(w,d),d=n.add(y,b),w=n.sub(w,d),f=n.mul(h,v),d=n.mul(m,b),f=n.add(d,f),d=n.sub(y,f),f=n.add(y,f),p=n.mul(d,f),y=n.add(g,g),y=n.add(y,g),b=n.mul(h,b),v=n.mul(m,v),y=n.add(y,b),b=n.sub(g,b),b=n.mul(h,b),v=n.add(v,b),g=n.mul(y,v),p=n.add(p,g),g=n.mul(w,v),d=n.mul(_,d),d=n.sub(d,g),g=n.mul(_,y),f=n.mul(w,f),f=n.add(f,g),new c(d,p,f)}subtract(e){return this.add(e.negate())}is0(){return this.equals(c.ZERO)}wNAF(e){return p.wNAFCached(this,e,c.normalizeZ)}multiplyUnsafe(e){Z("scalar",e,tH,t.n);let r=c.ZERO;if(e===tH)return r;if(e===tG)return this;let{endo:i}=t;if(!i)return p.unsafeLadder(this,e);let{k1neg:o,k1:a,k2neg:s,k2:u}=i.splitScalar(e),l=r,d=r,f=this;for(;a>tH||u>tH;)a&tG&&(l=l.add(f)),u&tG&&(d=d.add(f)),f=f.double(),a>>=tG,u>>=tG;return o&&(l=l.negate()),s&&(d=d.negate()),d=new c(n.mul(d.px,i.beta),d.py,d.pz),l.add(d)}multiply(e){let r,i;let{endo:o,n:a}=t;if(Z("scalar",e,tG,a),o){let{k1neg:t,k1:a,k2neg:s,k2:u}=o.splitScalar(e),{p:l,f:d}=this.wNAF(a),{p:f,f:h}=this.wNAF(u);l=p.constTimeNegate(t,l),f=p.constTimeNegate(s,f),f=new c(n.mul(f.px,o.beta),f.py,f.pz),r=l.add(f),i=d.add(h)}else{let{p:t,f:n}=this.wNAF(e);r=t,i=n}return c.normalizeZ([r,i])[0]}multiplyAndAddUnsafe(e,t,n){let r=c.BASE,i=(e,t)=>t!==tH&&t!==tG&&e.equals(r)?e.multiply(t):e.multiplyUnsafe(t),o=i(this,t).add(i(e,n));return o.is0()?void 0:o}toAffine(e){return u(this,e)}isTorsionFree(){let{h:e,isTorsionFree:n}=t;if(e===tG)return!0;if(n)return n(c,this);throw Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){let{h:e,clearCofactor:n}=t;return e===tG?this:n?n(c,this):this.multiplyUnsafe(t.h)}toRawBytes(e=!0){return C("isCompressed",e),this.assertValidity(),r(c,this,e)}toHex(e=!0){return C("isCompressed",e),B(this.toRawBytes(e))}}c.BASE=new c(t.Gx,t.Gy,n.ONE),c.ZERO=new c(n.ZERO,n.ONE,n.ZERO);let d=t.nBitLength,p=eT(c,t.endo?Math.ceil(d/2):d);return{CURVE:t,ProjectivePoint:c,normPrivateKeyToScalar:a,weierstrassEquation:o,isWithinCurveOrder:function(e){return G(e,tG,t.n)}}}({...t,toBytes(e,t,r){let i=t.toAffine(),o=n.toBytes(i.x),a=W;return(C("isCompressed",r),r)?a(Uint8Array.from([t.hasEvenY()?2:3]),o):a(Uint8Array.from([4]),o,n.toBytes(i.y))},fromBytes(e){let t=e.length,r=e[0],a=e.subarray(1);if(t===i&&(2===r||3===r)){let e;let t=F(a);if(!G(t,tG,n.ORDER))throw Error("Point is not on curve");let i=l(t);try{e=n.sqrt(i)}catch(t){let e=t instanceof Error?": "+t.message:"";throw Error("Point is not on curve"+e)}let o=(e&tG)===tG;return(1&r)==1!==o&&(e=n.neg(e)),{x:t,y:e}}if(t===o&&4===r){let e=n.fromBytes(a.subarray(0,n.BYTES)),t=n.fromBytes(a.subarray(n.BYTES,2*n.BYTES));return{x:e,y:t}}throw Error(`Point of length ${t} was invalid. Expected ${i} compressed bytes or ${o} uncompressed bytes`)}}),d=e=>B(j(e,t.nByteLength)),p=(e,t,n)=>F(e.slice(t,n));class f{constructor(e,t,n){this.r=e,this.s=t,this.recovery=n,this.assertValidity()}static fromCompact(e){let n=t.nByteLength;return e=V("compactSignature",e,2*n),new f(p(e,0,n),p(e,n,2*n))}static fromDER(e){let{r:t,s:n}=tK.toSig(V("DER",e));return new f(t,n)}assertValidity(){Z("r",this.r,tG,r),Z("s",this.s,tG,r)}addRecoveryBit(e){return new f(this.r,this.s,e)}recoverPublicKey(e){let{r:i,s:o,recovery:u}=this,l=g(V("msgHash",e));if(null==u||![0,1,2,3].includes(u))throw Error("recovery id invalid");let c=2===u||3===u?i+t.n:i;if(c>=n.ORDER)throw Error("recovery id 2 or 3 invalid");let p=s.fromHex(((1&u)==0?"02":"03")+d(c)),f=eg(c,r),h=a(-l*f),m=a(o*f),y=s.BASE.multiplyAndAddUnsafe(p,h,m);if(!y)throw Error("point at infinify");return y.assertValidity(),y}hasHighS(){return this.s>r>>tG}normalizeS(){return this.hasHighS()?new f(this.r,a(-this.s),this.recovery):this}toDERRawBytes(){return D(this.toDERHex())}toDERHex(){return tK.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return D(this.toCompactHex())}toCompactHex(){return d(this.r)+d(this.s)}}function h(e){let t=E(e),n="string"==typeof e,r=(t||n)&&e.length;return t?r===i||r===o:n?r===2*i||r===2*o:e instanceof s}let m=t.bits2int||function(e){let n=F(e),r=8*e.length-t.nBitLength;return r>0?n>>BigInt(r):n},g=t.bits2int_modN||function(e){return a(m(e))},y=J(t.nBitLength);function b(e){return Z(`num < 2^${t.nBitLength}`,e,tH,y),j(e,t.nByteLength)}let _={lowS:t.lowS,prehash:!1},v={lowS:t.lowS,prehash:!1};return s.BASE._setWindowSize(8),{CURVE:t,getPublicKey:function(e,t=!0){return s.fromPrivateKey(e).toRawBytes(t)},getSharedSecret:function(e,t,n=!0){if(h(e))throw Error("first arg must be private key");if(!h(t))throw Error("second arg must be public key");let r=s.fromHex(t);return r.multiply(u(e)).toRawBytes(n)},sign:function(e,i,o=_){let{seed:l,k2sig:d}=function(e,i,o=_){if(["recovered","canonical"].some(e=>e in o))throw Error("sign() legacy options not supported");let{hash:l,randomBytes:d}=t,{lowS:p,prehash:h,extraEntropy:y}=o;null==p&&(p=!0),e=V("msgHash",e),tV(o),h&&(e=V("prehashed msgHash",l(e)));let v=g(e),w=u(i),k=[b(w),b(v)];if(null!=y&&!1!==y){let e=!0===y?d(n.BYTES):y;k.push(V("extraEntropy",e))}let x=W(...k);return{seed:x,k2sig:function(e){let t=m(e);if(!c(t))return;let n=eg(t,r),i=s.BASE.multiply(t).toAffine(),o=a(i.x);if(o===tH)return;let u=a(n*a(v+o*w));if(u===tH)return;let l=(i.x===o?0:2)|Number(i.y&tG),d=u;if(p&&u>r>>tG)d=u>r>>tG?a(-u):u,l^=1;return new f(o,d,l)}}}(e,i,o),p=en(t.hash.outputLen,t.nByteLength,t.hmac);return p(l,d)},verify:function(e,n,i,o=v){let u,l;if(n=V("msgHash",n),i=V("publicKey",i),"strict"in o)throw Error("options.strict was renamed to lowS");tV(o);let{lowS:c,prehash:d}=o;try{if("string"==typeof e||E(e))try{l=f.fromDER(e)}catch(t){if(!(t instanceof tK.Err))throw t;l=f.fromCompact(e)}else if("object"==typeof e&&"bigint"==typeof e.r&&"bigint"==typeof e.s){let{r:t,s:n}=e;l=new f(t,n)}else throw Error("PARSE");u=s.fromHex(i)}catch(e){if("PARSE"===e.message)throw Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(c&&l.hasHighS())return!1;d&&(n=t.hash(n));let{r:p,s:h}=l,m=g(n),y=eg(h,r),b=a(m*y),_=a(p*y),w=s.BASE.multiplyAndAddUnsafe(u,b,_)?.toAffine();if(!w)return!1;let k=a(w.x);return k===p},ProjectivePoint:s,Signature:f,utils:{isValidPrivateKey(e){try{return u(e),!0}catch(e){return!1}},normPrivateKeyToScalar:u,randomPrivateKey:()=>{let e=ek(t.n);return function(e,t,n=!1){let r=e.length,i=ew(t),o=ek(t);if(r<16||r1024)throw Error(`expected ${o}-1024 bytes of input, got ${r}`);let a=n?F(e):q(e),s=eh(a,t-eu)+eu;return n?U(s,i):j(s,i)}(t.randomBytes(e),t.n)},precompute:(e=8,t=s.BASE)=>(t._setWindowSize(e),t.multiply(BigInt(3)),t)}}})({...e,hash:t,hmac:(e,...n)=>tz(t,e,(0,b.eV)(...n)),randomBytes:b.O6});return Object.freeze({...n(t),create:n})}({a:BigInt(0),b:BigInt(7),Fp:t1,n:tX,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{let t=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-tQ*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),r=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),i=BigInt("0x100000000000000000000000000000000"),o=t0(t*e,tX),a=t0(-n*e,tX),s=eh(e-o*t-a*r,tX),u=eh(-o*n-a*t,tX),l=s>i,c=u>i;if(l&&(s=tX-s),c&&(u=tX-u),s>i||u>i)throw Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:l,k1:s,k2neg:c,k2:u}}}},e0.J);BigInt(0),t2.ProjectivePoint,eW.utils.randomPrivateKey;let t6=()=>{let e=eW.utils.randomPrivateKey(),t=t3(e),n=new Uint8Array(64);return n.set(e),n.set(t,32),{publicKey:t,secretKey:n}},t3=eW.getPublicKey;function t4(e){try{return eW.ExtendedPoint.fromHex(e),!0}catch{return!1}}let t5=(e,t)=>eW.sign(e,t.slice(0,32)),t8=eW.verify,t9=e=>a.Buffer.isBuffer(e)?e:e instanceof Uint8Array?a.Buffer.from(e.buffer,e.byteOffset,e.byteLength):a.Buffer.from(e);class t7{constructor(e){Object.assign(this,e)}encode(){return a.Buffer.from((0,e1.serialize)(ne,this))}static decode(e){return(0,e1.deserialize)(ne,this,e)}static decodeUnchecked(e){return(0,e1.deserializeUnchecked)(ne,this,e)}}let ne=new Map,nt=1;class nn extends t7{constructor(e){if(super({}),this._bn=void 0,void 0!==e._bn)this._bn=e._bn;else{if("string"==typeof e){let t=eJ().decode(e);if(32!=t.length)throw Error("Invalid public key input");this._bn=new(eX())(t)}else this._bn=new(eX())(e);if(this._bn.byteLength()>32)throw Error("Invalid public key input")}}static unique(){let e=new nn(nt);return nt+=1,new nn(e.toBuffer())}equals(e){return this._bn.eq(e._bn)}toBase58(){return eJ().encode(this.toBytes())}toJSON(){return this.toBase58()}toBytes(){let e=this.toBuffer();return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}toBuffer(){let e=this._bn.toArrayLike(a.Buffer);if(32===e.length)return e;let t=a.Buffer.alloc(32);return e.copy(t,32-e.length),t}get[Symbol.toStringTag](){return`PublicKey(${this.toString()})`}toString(){return this.toBase58()}static async createWithSeed(e,t,n){let r=a.Buffer.concat([e.toBuffer(),a.Buffer.from(t),n.toBuffer()]),i=(0,e0.J)(r);return new nn(i)}static createProgramAddressSync(e,t){let n=a.Buffer.alloc(0);e.forEach(function(e){if(e.length>32)throw TypeError("Max seed length exceeded");n=a.Buffer.concat([n,t9(e)])}),n=a.Buffer.concat([n,t.toBuffer(),a.Buffer.from("ProgramDerivedAddress")]);let r=(0,e0.J)(n);if(t4(r))throw Error("Invalid seeds, address must fall off the curve");return new nn(r)}static async createProgramAddress(e,t){return this.createProgramAddressSync(e,t)}static findProgramAddressSync(e,t){let n,r=255;for(;0!=r;){try{let i=e.concat(a.Buffer.from([r]));n=this.createProgramAddressSync(i,t)}catch(e){if(e instanceof TypeError)throw e;r--;continue}return[n,r]}throw Error("Unable to find a viable program address nonce")}static async findProgramAddress(e,t){return this.findProgramAddressSync(e,t)}static isOnCurve(e){let t=new nn(e);return t4(t.toBytes())}}nn.default=new nn("11111111111111111111111111111111"),ne.set(nn,{kind:"struct",fields:[["_bn","u256"]]}),new nn("BPFLoader1111111111111111111111111111111111");class nr extends Error{constructor(e){super(`Signature ${e} has expired: block height exceeded.`),this.signature=void 0,this.signature=e}}Object.defineProperty(nr.prototype,"name",{value:"TransactionExpiredBlockheightExceededError"});class ni extends Error{constructor(e,t){super(`Transaction was not confirmed in ${t.toFixed(2)} seconds. It is unknown if it succeeded or failed. Check signature ${e} using the Solana Explorer or CLI tools.`),this.signature=void 0,this.signature=e}}Object.defineProperty(ni.prototype,"name",{value:"TransactionExpiredTimeoutError"});class no extends Error{constructor(e){super(`Signature ${e} has expired: the nonce is no longer valid.`),this.signature=void 0,this.signature=e}}Object.defineProperty(no.prototype,"name",{value:"TransactionExpiredNonceInvalidError"});class na{constructor(e,t){this.staticAccountKeys=void 0,this.accountKeysFromLookups=void 0,this.staticAccountKeys=e,this.accountKeysFromLookups=t}keySegments(){let e=[this.staticAccountKeys];return this.accountKeysFromLookups&&(e.push(this.accountKeysFromLookups.writable),e.push(this.accountKeysFromLookups.readonly)),e}get(e){for(let t of this.keySegments()){if(e256)throw Error("Account index overflow encountered during compilation");let t=new Map;this.keySegments().flat().forEach((e,n)=>{t.set(e.toBase58(),n)});let n=e=>{let n=t.get(e.toBase58());if(void 0===n)throw Error("Encountered an unknown instruction account key during compilation");return n};return e.map(e=>({programIdIndex:n(e.programId),accountKeyIndexes:e.keys.map(e=>n(e.pubkey)),data:e.data}))}}let ns=(e="publicKey")=>e2.Ik(32,e),nu=(e="signature")=>e2.Ik(64,e),nl=(e="string")=>{let t=e2.n_([e2.Jq("length"),e2.Jq("lengthPadding"),e2.Ik(e2.cv(e2.Jq(),-8),"chars")],e),n=t.decode.bind(t),r=t.encode.bind(t),i=t;return i.decode=(e,t)=>{let r=n(e,t);return r.chars.toString()},i.encode=(e,t,n)=>{let i={chars:a.Buffer.from(e,"utf8")};return r(i,t,n)},i.alloc=e=>e2.Jq().span+e2.Jq().span+a.Buffer.from(e,"utf8").length,i};function nc(e){let t=0,n=0;for(;;){let r=e.shift();if(t|=(127&r)<<7*n,n+=1,(128&r)==0)break}return t}function nd(e,t){let n=t;for(;;){let t=127&n;if(0==(n>>=7)){e.push(t);break}t|=128,e.push(t)}}function np(e,t){if(!e)throw Error(t||"Assertion failed")}class nf{constructor(e,t){this.payer=void 0,this.keyMetaMap=void 0,this.payer=e,this.keyMetaMap=t}static compile(e,t){let n=new Map,r=e=>{let t=e.toBase58(),r=n.get(t);return void 0===r&&(r={isSigner:!1,isWritable:!1,isInvoked:!1},n.set(t,r)),r},i=r(t);for(let t of(i.isSigner=!0,i.isWritable=!0,e))for(let e of(r(t.programId).isInvoked=!0,t.keys)){let t=r(e.pubkey);t.isSigner||=e.isSigner,t.isWritable||=e.isWritable}return new nf(t,n)}getMessageComponents(){let e=[...this.keyMetaMap.entries()];np(e.length<=256,"Max static account keys length exceeded");let t=e.filter(([,e])=>e.isSigner&&e.isWritable),n=e.filter(([,e])=>e.isSigner&&!e.isWritable),r=e.filter(([,e])=>!e.isSigner&&e.isWritable),i=e.filter(([,e])=>!e.isSigner&&!e.isWritable),o={numRequiredSignatures:t.length+n.length,numReadonlySignedAccounts:n.length,numReadonlyUnsignedAccounts:i.length};{np(t.length>0,"Expected at least one writable signer key");let[e]=t[0];np(e===this.payer.toBase58(),"Expected first writable signer key to be the fee payer")}let a=[...t.map(([e])=>new nn(e)),...n.map(([e])=>new nn(e)),...r.map(([e])=>new nn(e)),...i.map(([e])=>new nn(e))];return[o,a]}extractTableLookup(e){let[t,n]=this.drainKeysFoundInLookupTable(e.state.addresses,e=>!e.isSigner&&!e.isInvoked&&e.isWritable),[r,i]=this.drainKeysFoundInLookupTable(e.state.addresses,e=>!e.isSigner&&!e.isInvoked&&!e.isWritable);if(0!==t.length||0!==r.length)return[{accountKey:e.key,writableIndexes:t,readonlyIndexes:r},{writable:n,readonly:i}]}drainKeysFoundInLookupTable(e,t){let n=[],r=[];for(let[i,o]of this.keyMetaMap.entries())if(t(o)){let t=new nn(i),o=e.findIndex(e=>e.equals(t));o>=0&&(np(o<256,"Max lookup table index exceeded"),n.push(o),r.push(t),this.keyMetaMap.delete(i))}return[n,r]}}let nh="Reached end of buffer unexpectedly";function nm(e){if(0===e.length)throw Error(nh);return e.shift()}function ng(e,...t){let[n]=t;if(2===t.length?n+(t[1]??0)>e.length:n>=e.length)throw Error(nh);return e.splice(...t)}class ny{constructor(e){this.header=void 0,this.accountKeys=void 0,this.recentBlockhash=void 0,this.instructions=void 0,this.indexToProgramIds=new Map,this.header=e.header,this.accountKeys=e.accountKeys.map(e=>new nn(e)),this.recentBlockhash=e.recentBlockhash,this.instructions=e.instructions,this.instructions.forEach(e=>this.indexToProgramIds.set(e.programIdIndex,this.accountKeys[e.programIdIndex]))}get version(){return"legacy"}get staticAccountKeys(){return this.accountKeys}get compiledInstructions(){return this.instructions.map(e=>({programIdIndex:e.programIdIndex,accountKeyIndexes:e.accounts,data:eJ().decode(e.data)}))}get addressTableLookups(){return[]}getAccountKeys(){return new na(this.staticAccountKeys)}static compile(e){let t=nf.compile(e.instructions,e.payerKey),[n,r]=t.getMessageComponents(),i=new na(r),o=i.compileInstructions(e.instructions).map(e=>({programIdIndex:e.programIdIndex,accounts:e.accountKeyIndexes,data:eJ().encode(e.data)}));return new ny({header:n,accountKeys:r,recentBlockhash:e.recentBlockhash,instructions:o})}isAccountSigner(e){return e=this.header.numRequiredSignatures){let n=this.accountKeys.length-t,r=n-this.header.numReadonlyUnsignedAccounts;return e-t!this.isProgramId(t))}serialize(){let e=this.accountKeys.length,t=[];nd(t,e);let n=this.instructions.map(e=>{let{accounts:t,programIdIndex:n}=e,r=Array.from(eJ().decode(e.data)),i=[];nd(i,t.length);let o=[];return nd(o,r.length),{programIdIndex:n,keyIndicesCount:a.Buffer.from(i),keyIndices:t,dataLength:a.Buffer.from(o),data:r}}),r=[];nd(r,n.length);let i=a.Buffer.alloc(1232);a.Buffer.from(r).copy(i);let o=r.length;n.forEach(e=>{let t=e2.n_([e2.u8("programIdIndex"),e2.Ik(e.keyIndicesCount.length,"keyIndicesCount"),e2.A9(e2.u8("keyIndex"),e.keyIndices.length,"keyIndices"),e2.Ik(e.dataLength.length,"dataLength"),e2.A9(e2.u8("userdatum"),e.data.length,"data")]),n=t.encode(e,i,o);o+=n}),i=i.slice(0,o);let s=e2.n_([e2.Ik(1,"numRequiredSignatures"),e2.Ik(1,"numReadonlySignedAccounts"),e2.Ik(1,"numReadonlyUnsignedAccounts"),e2.Ik(t.length,"keyCount"),e2.A9(ns("key"),e,"keys"),ns("recentBlockhash")]),u={numRequiredSignatures:a.Buffer.from([this.header.numRequiredSignatures]),numReadonlySignedAccounts:a.Buffer.from([this.header.numReadonlySignedAccounts]),numReadonlyUnsignedAccounts:a.Buffer.from([this.header.numReadonlyUnsignedAccounts]),keyCount:a.Buffer.from(t),keys:this.accountKeys.map(e=>t9(e.toBytes())),recentBlockhash:eJ().decode(this.recentBlockhash)},l=a.Buffer.alloc(2048),c=s.encode(u,l);return i.copy(l,c),l.slice(0,c+i.length)}static from(e){let t=[...e],n=nm(t);if(n!==(127&n))throw Error("Versioned messages must be deserialized with VersionedMessage.deserialize()");let r=nm(t),i=nm(t),o=nc(t),s=[];for(let e=0;e0)throw Error("Failed to get account keys because address table lookups were not resolved");return new na(this.staticAccountKeys,t)}isAccountSigner(e){return e=n){let t=this.addressTableLookups.reduce((e,t)=>e+t.writableIndexes.length,0);return e-n=this.header.numRequiredSignatures){let r=n-t-this.header.numReadonlyUnsignedAccounts;return e-te.key.equals(n.accountKey));if(!r)throw Error(`Failed to find address lookup table account for table key ${n.accountKey.toBase58()}`);for(let e of n.writableIndexes)if(ee.toBytes()),recentBlockhash:eJ().decode(this.recentBlockhash),instructionsLength:new Uint8Array(n),serializedInstructions:t,addressTableLookupsLength:new Uint8Array(i),serializedAddressTableLookups:r},a);return a.slice(0,s)}serializeInstructions(){let e=0,t=new Uint8Array(1232);for(let n of this.compiledInstructions){let r=[];nd(r,n.accountKeyIndexes.length);let i=[];nd(i,n.data.length);let o=e2.n_([e2.u8("programIdIndex"),e2.Ik(r.length,"encodedAccountKeyIndexesLength"),e2.A9(e2.u8(),n.accountKeyIndexes.length,"accountKeyIndexes"),e2.Ik(i.length,"encodedDataLength"),e2.Ik(n.data.length,"data")]);e+=o.encode({programIdIndex:n.programIdIndex,encodedAccountKeyIndexesLength:new Uint8Array(r),accountKeyIndexes:n.accountKeyIndexes,encodedDataLength:new Uint8Array(i),data:n.data},t,e)}return t.slice(0,e)}serializeAddressTableLookups(){let e=0,t=new Uint8Array(1232);for(let n of this.addressTableLookups){let r=[];nd(r,n.writableIndexes.length);let i=[];nd(i,n.readonlyIndexes.length);let o=e2.n_([ns("accountKey"),e2.Ik(r.length,"encodedWritableIndexesLength"),e2.A9(e2.u8(),n.writableIndexes.length,"writableIndexes"),e2.Ik(i.length,"encodedReadonlyIndexesLength"),e2.A9(e2.u8(),n.readonlyIndexes.length,"readonlyIndexes")]);e+=o.encode({accountKey:n.accountKey.toBytes(),encodedWritableIndexesLength:new Uint8Array(r),writableIndexes:n.writableIndexes,encodedReadonlyIndexesLength:new Uint8Array(i),readonlyIndexes:n.readonlyIndexes},t,e)}return t.slice(0,e)}static deserialize(e){let t=[...e],n=nm(t),r=127&n;np(n!==r,"Expected versioned message but received legacy message"),np(0===r,`Expected versioned message with version 0 but found version ${r}`);let i={numRequiredSignatures:nm(t),numReadonlySignedAccounts:nm(t),numReadonlyUnsignedAccounts:nm(t)},o=[],a=nc(t);for(let e=0;e{let t=n_.deserializeMessageVersion(e);if("legacy"===t)return ny.from(e);if(0===t)return nb.deserialize(e);throw Error(`Transaction message version ${t} deserialization is not supported`)}},nv=((r={})[r.BLOCKHEIGHT_EXCEEDED=0]="BLOCKHEIGHT_EXCEEDED",r[r.PROCESSED=1]="PROCESSED",r[r.TIMED_OUT=2]="TIMED_OUT",r[r.NONCE_INVALID=3]="NONCE_INVALID",r),nw=a.Buffer.alloc(64).fill(0);class nk{constructor(e){this.keys=void 0,this.programId=void 0,this.data=a.Buffer.alloc(0),this.programId=e.programId,this.keys=e.keys,e.data&&(this.data=e.data)}toJSON(){return{keys:this.keys.map(({pubkey:e,isSigner:t,isWritable:n})=>({pubkey:e.toJSON(),isSigner:t,isWritable:n})),programId:this.programId.toJSON(),data:[...this.data]}}}class nx{get signature(){return this.signatures.length>0?this.signatures[0].signature:null}constructor(e){if(this.signatures=[],this.feePayer=void 0,this.instructions=[],this.recentBlockhash=void 0,this.lastValidBlockHeight=void 0,this.nonceInfo=void 0,this.minNonceContextSlot=void 0,this._message=void 0,this._json=void 0,!e)return;if(e.feePayer&&(this.feePayer=e.feePayer),e.signatures&&(this.signatures=e.signatures),Object.prototype.hasOwnProperty.call(e,"nonceInfo")){let{minContextSlot:t,nonceInfo:n}=e;this.minNonceContextSlot=t,this.nonceInfo=n}else if(Object.prototype.hasOwnProperty.call(e,"lastValidBlockHeight")){let{blockhash:t,lastValidBlockHeight:n}=e;this.recentBlockhash=t,this.lastValidBlockHeight=n}else{let{recentBlockhash:t,nonceInfo:n}=e;n&&(this.nonceInfo=n),this.recentBlockhash=t}}toJSON(){return{recentBlockhash:this.recentBlockhash||null,feePayer:this.feePayer?this.feePayer.toJSON():null,nonceInfo:this.nonceInfo?{nonce:this.nonceInfo.nonce,nonceInstruction:this.nonceInfo.nonceInstruction.toJSON()}:null,instructions:this.instructions.map(e=>e.toJSON()),signers:this.signatures.map(({publicKey:e})=>e.toJSON())}}add(...e){if(0===e.length)throw Error("No instructions");return e.forEach(e=>{"instructions"in e?this.instructions=this.instructions.concat(e.instructions):"data"in e&&"programId"in e&&"keys"in e?this.instructions.push(e):this.instructions.push(new nk(e))}),this}compileMessage(){let e,t,n;if(this._message&&JSON.stringify(this.toJSON())===JSON.stringify(this._json))return this._message;if(this.nonceInfo?(e=this.nonceInfo.nonce,t=this.instructions[0]!=this.nonceInfo.nonceInstruction?[this.nonceInfo.nonceInstruction,...this.instructions]:this.instructions):(e=this.recentBlockhash,t=this.instructions),!e)throw Error("Transaction recentBlockhash required");if(t.length<1&&console.warn("No instructions provided"),this.feePayer)n=this.feePayer;else if(this.signatures.length>0&&this.signatures[0].publicKey)n=this.signatures[0].publicKey;else throw Error("Transaction fee payer required");for(let e=0;e{e.keys.forEach(e=>{i.push({...e})});let t=e.programId.toString();r.includes(t)||r.push(t)}),r.forEach(e=>{i.push({pubkey:new nn(e),isSigner:!1,isWritable:!1})});let o=[];i.forEach(e=>{let t=e.pubkey.toString(),n=o.findIndex(e=>e.pubkey.toString()===t);n>-1?(o[n].isWritable=o[n].isWritable||e.isWritable,o[n].isSigner=o[n].isSigner||e.isSigner):o.push(e)}),o.sort(function(e,t){return e.isSigner!==t.isSigner?e.isSigner?-1:1:e.isWritable!==t.isWritable?e.isWritable?-1:1:e.pubkey.toBase58().localeCompare(t.pubkey.toBase58(),"en",{localeMatcher:"best fit",usage:"sort",sensitivity:"variant",ignorePunctuation:!1,numeric:!1,caseFirst:"lower"})});let a=o.findIndex(e=>e.pubkey.equals(n));if(a>-1){let[e]=o.splice(a,1);e.isSigner=!0,e.isWritable=!0,o.unshift(e)}else o.unshift({pubkey:n,isSigner:!0,isWritable:!0});for(let e of this.signatures){let t=o.findIndex(t=>t.pubkey.equals(e.publicKey));if(t>-1)o[t].isSigner||(o[t].isSigner=!0,console.warn("Transaction references a signature that is unnecessary, only the fee payer and instruction signer accounts should sign a transaction. This behavior is deprecated and will throw an error in the next major version release."));else throw Error(`unknown signer: ${e.publicKey.toString()}`)}let s=0,u=0,l=0,c=[],d=[];o.forEach(({pubkey:e,isSigner:t,isWritable:n})=>{t?(c.push(e.toString()),s+=1,n||(u+=1)):(d.push(e.toString()),n||(l+=1))});let p=c.concat(d),f=t.map(e=>{let{data:t,programId:n}=e;return{programIdIndex:p.indexOf(n.toString()),accounts:e.keys.map(e=>p.indexOf(e.pubkey.toString())),data:eJ().encode(t)}});return f.forEach(e=>{np(e.programIdIndex>=0),e.accounts.forEach(e=>np(e>=0))}),new ny({header:{numRequiredSignatures:s,numReadonlySignedAccounts:u,numReadonlyUnsignedAccounts:l},accountKeys:p,recentBlockhash:e,instructions:f})}_compile(){let e=this.compileMessage(),t=e.accountKeys.slice(0,e.header.numRequiredSignatures);if(this.signatures.length===t.length){let n=this.signatures.every((e,n)=>t[n].equals(e.publicKey));if(n)return e}return this.signatures=t.map(e=>({signature:null,publicKey:e})),e}serializeMessage(){return this._compile().serialize()}async getEstimatedFee(e){return(await e.getFeeForMessage(this.compileMessage())).value}setSigners(...e){if(0===e.length)throw Error("No signers");let t=new Set;this.signatures=e.filter(e=>{let n=e.toString();return!t.has(n)&&(t.add(n),!0)}).map(e=>({signature:null,publicKey:e}))}sign(...e){if(0===e.length)throw Error("No signers");let t=new Set,n=[];for(let r of e){let e=r.publicKey.toString();t.has(e)||(t.add(e),n.push(r))}this.signatures=n.map(e=>({signature:null,publicKey:e.publicKey}));let r=this._compile();this._partialSign(r,...n)}partialSign(...e){if(0===e.length)throw Error("No signers");let t=new Set,n=[];for(let r of e){let e=r.publicKey.toString();t.has(e)||(t.add(e),n.push(r))}let r=this._compile();this._partialSign(r,...n)}_partialSign(e,...t){let n=e.serialize();t.forEach(e=>{let t=t5(n,e.secretKey);this._addSignature(e.publicKey,t9(t))})}addSignature(e,t){this._compile(),this._addSignature(e,t)}_addSignature(e,t){np(64===t.length);let n=this.signatures.findIndex(t=>e.equals(t.publicKey));if(n<0)throw Error(`unknown signer: ${e.toString()}`);this.signatures[n].signature=a.Buffer.from(t)}verifySignatures(e=!0){let t=this._getMessageSignednessErrors(this.serializeMessage(),e);return!t}_getMessageSignednessErrors(e,t){let n={};for(let{signature:r,publicKey:i}of this.signatures)null===r?t&&(n.missing||=[]).push(i):t8(r,e,i.toBytes())||(n.invalid||=[]).push(i);return n.invalid||n.missing?n:void 0}serialize(e){let{requireAllSignatures:t,verifySignatures:n}=Object.assign({requireAllSignatures:!0,verifySignatures:!0},e),r=this.serializeMessage();if(n){let e=this._getMessageSignednessErrors(r,t);if(e){let t="Signature verification failed.";throw e.invalid&&(t+=` Invalid signature for public key${1===e.invalid.length?"":"(s)"} [\`${e.invalid.map(e=>e.toBase58()).join("`, `")}\`].`),e.missing&&(t+=` Missing signature for public key${1===e.missing.length?"":"(s)"} [\`${e.missing.map(e=>e.toBase58()).join("`, `")}\`].`),Error(t)}}return this._serialize(r)}_serialize(e){let{signatures:t}=this,n=[];nd(n,t.length);let r=n.length+64*t.length+e.length,i=a.Buffer.alloc(r);return np(t.length<256),a.Buffer.from(n).copy(i,0),t.forEach(({signature:e},t)=>{null!==e&&(np(64===e.length,"signature has invalid length"),a.Buffer.from(e).copy(i,n.length+64*t))}),e.copy(i,n.length+64*t.length),np(i.length<=1232,`Transaction too large: ${i.length} > 1232`),i}get keys(){return np(1===this.instructions.length),this.instructions[0].keys.map(e=>e.pubkey)}get programId(){return np(1===this.instructions.length),this.instructions[0].programId}get data(){return np(1===this.instructions.length),this.instructions[0].data}static from(e){let t=[...e],n=nc(t),r=[];for(let e=0;e0&&(n.feePayer=e.accountKeys[0]),t.forEach((t,r)=>{let i={signature:t==eJ().encode(nw)?null:eJ().decode(t),publicKey:e.accountKeys[r]};n.signatures.push(i)}),e.instructions.forEach(t=>{let r=t.accounts.map(t=>{let r=e.accountKeys[t];return{pubkey:r,isSigner:n.signatures.some(e=>e.publicKey.toString()===r.toString())||e.isAccountSigner(t),isWritable:e.isAccountWritable(t)}});n.instructions.push(new nk({keys:r,programId:e.accountKeys[t.programIdIndex],data:eJ().decode(t.data)}))}),n._message=e,n._json=n.toJSON(),n}}class nA{constructor(e){this.payerKey=void 0,this.instructions=void 0,this.recentBlockhash=void 0,this.payerKey=e.payerKey,this.instructions=e.instructions,this.recentBlockhash=e.recentBlockhash}static decompile(e,t){let{header:n,compiledInstructions:r,recentBlockhash:i}=e,{numRequiredSignatures:o,numReadonlySignedAccounts:a,numReadonlyUnsignedAccounts:s}=n,u=o-a;np(u>0,"Message header is invalid");let l=e.staticAccountKeys.length-o-s;np(l>=0,"Message header is invalid");let c=e.getAccountKeys(t),d=c.get(0);if(void 0===d)throw Error("Failed to decompile message because no account keys were found");let p=[];for(let e of r){let t=[];for(let r of e.accountKeyIndexes){let e;let i=c.get(r);if(void 0===i)throw Error(`Failed to find key for account key index ${r}`);let a=re.equals(r.publicKey));np(e>=0,`Cannot sign with non signer key ${r.publicKey.toBase58()}`),this.signatures[e]=t5(t,r.secretKey)}}addSignature(e,t){np(64===t.byteLength,"Signature must be 64 bytes long");let n=this.message.staticAccountKeys.slice(0,this.message.header.numRequiredSignatures),r=n.findIndex(t=>t.equals(e));np(r>=0,`Can not add signature; \`${e.toBase58()}\` is not required to sign this transaction`),this.signatures[r]=t}}let nI=new nn("SysvarC1ock11111111111111111111111111111111");new nn("SysvarEpochSchedu1e111111111111111111111111"),new nn("Sysvar1nstructions1111111111111111111111111");let nT=new nn("SysvarRecentB1ockHashes11111111111111111111"),nE=new nn("SysvarRent111111111111111111111111111111111");new nn("SysvarRewards111111111111111111111111111111"),new nn("SysvarS1otHashes111111111111111111111111111"),new nn("SysvarS1otHistory11111111111111111111111111");let nP=new nn("SysvarStakeHistory1111111111111111111111111");class nC extends Error{constructor({action:e,signature:t,transactionMessage:n,logs:r}){let i;let o=r?`Logs: ${JSON.stringify(r.slice(-10),null,2)}. `:"",a="\nCatch the `SendTransactionError` and call `getLogs()` on it for full details.";switch(e){case"send":i=`Transaction ${t} resulted in an error. ${n}. `+o+a;break;case"simulate":i=`Simulation failed. Message: ${n}. `+o+a;break;default:i=`Unknown action '${e}'`}super(i),this.signature=void 0,this.transactionMessage=void 0,this.transactionLogs=void 0,this.signature=t,this.transactionMessage=n,this.transactionLogs=r||void 0}get transactionError(){return{message:this.transactionMessage,logs:Array.isArray(this.transactionLogs)?this.transactionLogs:void 0}}get logs(){let e=this.transactionLogs;if(null==e||"object"!=typeof e||!("then"in e))return e}async getLogs(e){return Array.isArray(this.transactionLogs)||(this.transactionLogs=new Promise((t,n)=>{e.getTransaction(this.signature).then(e=>{if(e&&e.meta&&e.meta.logMessages){let n=e.meta.logMessages;this.transactionLogs=n,t(n)}else n(Error("Log messages not found"))}).catch(n)})),await this.transactionLogs}}class nO extends Error{constructor({code:e,message:t,data:n},r){super(null!=r?`${r}: ${t}`:t),this.code=void 0,this.data=void 0,this.code=e,this.data=n,this.name="SolanaJSONRPCError"}}async function nB(e,t,n,r){let i;let o=r&&{skipPreflight:r.skipPreflight,preflightCommitment:r.preflightCommitment||r.commitment,maxRetries:r.maxRetries,minContextSlot:r.minContextSlot},a=await e.sendTransaction(t,n,o);if(null!=t.recentBlockhash&&null!=t.lastValidBlockHeight)i=(await e.confirmTransaction({abortSignal:r?.abortSignal,signature:a,blockhash:t.recentBlockhash,lastValidBlockHeight:t.lastValidBlockHeight},r&&r.commitment)).value;else if(null!=t.minNonceContextSlot&&null!=t.nonceInfo){let{nonceInstruction:n}=t.nonceInfo,o=n.keys[0].pubkey;i=(await e.confirmTransaction({abortSignal:r?.abortSignal,minContextSlot:t.minNonceContextSlot,nonceAccountPubkey:o,nonceValue:t.nonceInfo.nonce,signature:a},r&&r.commitment)).value}else r?.abortSignal!=null&&console.warn("sendAndConfirmTransaction(): A transaction with a deprecated confirmation strategy was supplied along with an `abortSignal`. Only transactions having `lastValidBlockHeight` or a combination of `nonceInfo` and `minNonceContextSlot` are abortable."),i=(await e.confirmTransaction(a,r&&r.commitment)).value;if(i.err){if(null!=a)throw new nC({action:"send",signature:a,transactionMessage:`Status: (${JSON.stringify(i)})`});throw Error(`Transaction ${a} failed (${JSON.stringify(i)})`)}return a}function nM(e){return new Promise(t=>setTimeout(t,e))}function nR(e,t){let n=e.layout.span>=0?e.layout.span:function e(t,n){let r=t=>{if(t.span>=0)return t.span;if("function"==typeof t.alloc)return t.alloc(n[t.property]);if("count"in t&&"elementLayout"in t){let e=n[t.property];if(Array.isArray(e))return e.length*r(t.elementLayout)}else if("fields"in t)return e({layout:t},n[t.property]);return 0},i=0;return t.layout.fields.forEach(e=>{i+=r(e)}),i}(e,t),r=a.Buffer.alloc(n),i=Object.assign({instruction:e.index},t);return e.layout.encode(i,r),r}let nL=e2._O("lamportsPerSignature"),nN=e2.n_([e2.Jq("version"),e2.Jq("state"),ns("authorizedPubkey"),ns("nonce"),e2.n_([nL],"feeCalculator")]),nD=nN.span;class nF{constructor(e){this.authorizedPubkey=void 0,this.nonce=void 0,this.feeCalculator=void 0,this.authorizedPubkey=e.authorizedPubkey,this.nonce=e.nonce,this.feeCalculator=e.feeCalculator}static fromAccountData(e){let t=nN.decode(t9(e),0);return new nF({authorizedPubkey:new nn(t.authorizedPubkey),nonce:new nn(t.nonce).toString(),feeCalculator:t.feeCalculator})}}let nq=e=>{let t=e.decode.bind(e),n=e.encode.bind(e);return{decode:t,encode:n}},nj=e=>{let t=(0,e2.Ik)(8,e),{encode:n,decode:r}=nq(t),i=t;return i.decode=(e,t)=>{let n=r(e,t);return(0,e6.oU)(a.Buffer.from(n))},i.encode=(e,t,r)=>{let i=(0,e6.k$)(e,8);return n(i,t,r)},i},nU=Object.freeze({Create:{index:0,layout:e2.n_([e2.Jq("instruction"),e2.gM("lamports"),e2.gM("space"),ns("programId")])},Assign:{index:1,layout:e2.n_([e2.Jq("instruction"),ns("programId")])},Transfer:{index:2,layout:e2.n_([e2.Jq("instruction"),nj("lamports")])},CreateWithSeed:{index:3,layout:e2.n_([e2.Jq("instruction"),ns("base"),nl("seed"),e2.gM("lamports"),e2.gM("space"),ns("programId")])},AdvanceNonceAccount:{index:4,layout:e2.n_([e2.Jq("instruction")])},WithdrawNonceAccount:{index:5,layout:e2.n_([e2.Jq("instruction"),e2.gM("lamports")])},InitializeNonceAccount:{index:6,layout:e2.n_([e2.Jq("instruction"),ns("authorized")])},AuthorizeNonceAccount:{index:7,layout:e2.n_([e2.Jq("instruction"),ns("authorized")])},Allocate:{index:8,layout:e2.n_([e2.Jq("instruction"),e2.gM("space")])},AllocateWithSeed:{index:9,layout:e2.n_([e2.Jq("instruction"),ns("base"),nl("seed"),e2.gM("space"),ns("programId")])},AssignWithSeed:{index:10,layout:e2.n_([e2.Jq("instruction"),ns("base"),nl("seed"),ns("programId")])},TransferWithSeed:{index:11,layout:e2.n_([e2.Jq("instruction"),nj("lamports"),nl("seed"),ns("programId")])},UpgradeNonceAccount:{index:12,layout:e2.n_([e2.Jq("instruction")])}});class nz{constructor(){}static createAccount(e){let t=nU.Create,n=nR(t,{lamports:e.lamports,space:e.space,programId:t9(e.programId.toBuffer())});return new nk({keys:[{pubkey:e.fromPubkey,isSigner:!0,isWritable:!0},{pubkey:e.newAccountPubkey,isSigner:!0,isWritable:!0}],programId:this.programId,data:n})}static transfer(e){let t,n;if("basePubkey"in e){let r=nU.TransferWithSeed;t=nR(r,{lamports:BigInt(e.lamports),seed:e.seed,programId:t9(e.programId.toBuffer())}),n=[{pubkey:e.fromPubkey,isSigner:!1,isWritable:!0},{pubkey:e.basePubkey,isSigner:!0,isWritable:!1},{pubkey:e.toPubkey,isSigner:!1,isWritable:!0}]}else{let r=nU.Transfer;t=nR(r,{lamports:BigInt(e.lamports)}),n=[{pubkey:e.fromPubkey,isSigner:!0,isWritable:!0},{pubkey:e.toPubkey,isSigner:!1,isWritable:!0}]}return new nk({keys:n,programId:this.programId,data:t})}static assign(e){let t,n;if("basePubkey"in e){let r=nU.AssignWithSeed;t=nR(r,{base:t9(e.basePubkey.toBuffer()),seed:e.seed,programId:t9(e.programId.toBuffer())}),n=[{pubkey:e.accountPubkey,isSigner:!1,isWritable:!0},{pubkey:e.basePubkey,isSigner:!0,isWritable:!1}]}else{let r=nU.Assign;t=nR(r,{programId:t9(e.programId.toBuffer())}),n=[{pubkey:e.accountPubkey,isSigner:!0,isWritable:!0}]}return new nk({keys:n,programId:this.programId,data:t})}static createAccountWithSeed(e){let t=nU.CreateWithSeed,n=nR(t,{base:t9(e.basePubkey.toBuffer()),seed:e.seed,lamports:e.lamports,space:e.space,programId:t9(e.programId.toBuffer())}),r=[{pubkey:e.fromPubkey,isSigner:!0,isWritable:!0},{pubkey:e.newAccountPubkey,isSigner:!1,isWritable:!0}];return e.basePubkey.equals(e.fromPubkey)||r.push({pubkey:e.basePubkey,isSigner:!0,isWritable:!1}),new nk({keys:r,programId:this.programId,data:n})}static createNonceAccount(e){let t=new nx;"basePubkey"in e&&"seed"in e?t.add(nz.createAccountWithSeed({fromPubkey:e.fromPubkey,newAccountPubkey:e.noncePubkey,basePubkey:e.basePubkey,seed:e.seed,lamports:e.lamports,space:nD,programId:this.programId})):t.add(nz.createAccount({fromPubkey:e.fromPubkey,newAccountPubkey:e.noncePubkey,lamports:e.lamports,space:nD,programId:this.programId}));let n={noncePubkey:e.noncePubkey,authorizedPubkey:e.authorizedPubkey};return t.add(this.nonceInitialize(n)),t}static nonceInitialize(e){let t=nU.InitializeNonceAccount,n=nR(t,{authorized:t9(e.authorizedPubkey.toBuffer())}),r={keys:[{pubkey:e.noncePubkey,isSigner:!1,isWritable:!0},{pubkey:nT,isSigner:!1,isWritable:!1},{pubkey:nE,isSigner:!1,isWritable:!1}],programId:this.programId,data:n};return new nk(r)}static nonceAdvance(e){let t=nU.AdvanceNonceAccount,n=nR(t),r={keys:[{pubkey:e.noncePubkey,isSigner:!1,isWritable:!0},{pubkey:nT,isSigner:!1,isWritable:!1},{pubkey:e.authorizedPubkey,isSigner:!0,isWritable:!1}],programId:this.programId,data:n};return new nk(r)}static nonceWithdraw(e){let t=nU.WithdrawNonceAccount,n=nR(t,{lamports:e.lamports});return new nk({keys:[{pubkey:e.noncePubkey,isSigner:!1,isWritable:!0},{pubkey:e.toPubkey,isSigner:!1,isWritable:!0},{pubkey:nT,isSigner:!1,isWritable:!1},{pubkey:nE,isSigner:!1,isWritable:!1},{pubkey:e.authorizedPubkey,isSigner:!0,isWritable:!1}],programId:this.programId,data:n})}static nonceAuthorize(e){let t=nU.AuthorizeNonceAccount,n=nR(t,{authorized:t9(e.newAuthorizedPubkey.toBuffer())});return new nk({keys:[{pubkey:e.noncePubkey,isSigner:!1,isWritable:!0},{pubkey:e.authorizedPubkey,isSigner:!0,isWritable:!1}],programId:this.programId,data:n})}static allocate(e){let t,n;if("basePubkey"in e){let r=nU.AllocateWithSeed;t=nR(r,{base:t9(e.basePubkey.toBuffer()),seed:e.seed,space:e.space,programId:t9(e.programId.toBuffer())}),n=[{pubkey:e.accountPubkey,isSigner:!1,isWritable:!0},{pubkey:e.basePubkey,isSigner:!0,isWritable:!1}]}else{let r=nU.Allocate;t=nR(r,{space:e.space}),n=[{pubkey:e.accountPubkey,isSigner:!0,isWritable:!0}]}return new nk({keys:n,programId:this.programId,data:t})}}nz.programId=new nn("11111111111111111111111111111111");class nV{constructor(){}static getMinNumSignatures(e){return 2*(Math.ceil(e/nV.chunkSize)+1+1)}static async load(e,t,n,r,i){{let o=await e.getMinimumBalanceForRentExemption(i.length),a=await e.getAccountInfo(n.publicKey,"confirmed"),s=null;if(null!==a){if(a.executable)return console.error("Program load failed, account is already executable"),!1;a.data.length!==i.length&&(s=s||new nx).add(nz.allocate({accountPubkey:n.publicKey,space:i.length})),a.owner.equals(r)||(s=s||new nx).add(nz.assign({accountPubkey:n.publicKey,programId:r})),a.lamports0?o:1,space:i.length,programId:r}));null!==s&&await nB(e,s,[t,n],{commitment:"confirmed"})}let o=e2.n_([e2.Jq("instruction"),e2.Jq("offset"),e2.Jq("bytesLength"),e2.Jq("bytesLengthPadding"),e2.A9(e2.u8("byte"),e2.cv(e2.Jq(),-8),"bytes")]),s=nV.chunkSize,u=0,l=i,c=[];for(;l.length>0;){let i=l.slice(0,s),d=a.Buffer.alloc(s+16);o.encode({instruction:0,offset:u,bytes:i,bytesLength:0,bytesLengthPadding:0},d);let p=new nx().add({keys:[{pubkey:n.publicKey,isSigner:!0,isWritable:!0}],programId:r,data:d});c.push(nB(e,p,[t,n],{commitment:"confirmed"})),e._rpcEndpoint.includes("solana.com")&&await nM(250),u+=s,l=l.slice(s)}await Promise.all(c);{let i=e2.n_([e2.Jq("instruction")]),o=a.Buffer.alloc(i.span);i.encode({instruction:1},o);let s=new nx().add({keys:[{pubkey:n.publicKey,isSigner:!0,isWritable:!0},{pubkey:nE,isSigner:!1,isWritable:!1}],programId:r,data:o}),u="processed",l=await e.sendTransaction(s,[t,n],{preflightCommitment:u}),{context:c,value:d}=await e.confirmTransaction({signature:l,lastValidBlockHeight:s.lastValidBlockHeight,blockhash:s.recentBlockhash},u);if(d.err)throw Error(`Transaction ${l} failed (${JSON.stringify(d)})`);for(;;){try{let t=await e.getSlot({commitment:u});if(t>c.slot)break}catch{}await new Promise(e=>setTimeout(e,Math.round(200)))}}return!0}}nV.chunkSize=932,new nn("BPFLoader2111111111111111111111111111111111");var nW=Object.prototype.toString,n$=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t},nK=(i=function(e){var t=function e(t,n){var r,i,o,a,s,u,l;if(!0===t)return"true";if(!1===t)return"false";switch(typeof t){case"object":if(null===t)return null;if(t.toJSON&&"function"==typeof t.toJSON)return e(t.toJSON(),n);if("[object Array]"===(l=nW.call(t))){for(r=0,o="[",i=t.length-1;r-1&&(o+=e(t[r],!0)),o+"]"}if("[object Object]"!==l)return JSON.stringify(t);for(i=(a=n$(t).sort()).length,o="",r=0;r1;)e/=2,t++;return t}class nG{constructor(e,t,n,r,i){this.slotsPerEpoch=void 0,this.leaderScheduleSlotOffset=void 0,this.warmup=void 0,this.firstNormalEpoch=void 0,this.firstNormalSlot=void 0,this.slotsPerEpoch=e,this.leaderScheduleSlotOffset=t,this.warmup=n,this.firstNormalEpoch=r,this.firstNormalSlot=i}getEpoch(e){return this.getEpochAndSlotIndex(e)[0]}getEpochAndSlotIndex(e){if(e>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,(t|=t>>32)+1))-nH(32)-1,r=this.getSlotsInEpoch(n);return[n,e-(r-32)]}{let t=e-this.firstNormalSlot,n=Math.floor(t/this.slotsPerEpoch),r=this.firstNormalEpoch+n,i=t%this.slotsPerEpoch;return[r,i]}}getFirstSlotInEpoch(e){return e<=this.firstNormalEpoch?(Math.pow(2,e)-1)*32:(e-this.firstNormalEpoch)*this.slotsPerEpoch+this.firstNormalSlot}getLastSlotInEpoch(e){return this.getFirstSlotInEpoch(e)+this.getSlotsInEpoch(e)-1}getSlotsInEpoch(e){return e{var n;let r=(n={autoconnect:!0,max_reconnects:5,reconnect:!0,reconnect_interval:1e3,...t},new tk(e,n));return"socket"in r?this.underlyingSocket=r.socket:this.underlyingSocket=r,r};super(r,e,t,n),this.underlyingSocket=void 0}call(...e){let t=this.underlyingSocket?.readyState;return 1===t?super.call(...e):Promise.reject(Error("Tried to call a JSON-RPC method `"+e[0]+"` but the socket was not `CONNECTING` or `OPEN` (`readyState` was "+t+")"))}notify(...e){let t=this.underlyingSocket?.readyState;return 1===t?super.notify(...e):Promise.reject(Error("Tried to send a JSON-RPC notification `"+e[0]+"` but the socket was not `CONNECTING` or `OPEN` (`readyState` was "+t+")"))}}class nX{constructor(e){this.key=void 0,this.state=void 0,this.key=e.key,this.state=e.state}isActive(){let e=BigInt("0xffffffffffffffff");return this.state.deactivationSlot===e}static deserialize(e){let t=function(e,t){let n;try{n=e.layout.decode(t)}catch(e){throw Error("invalid instruction; "+e)}if(n.typeIndex!==e.index)throw Error(`invalid account data; account type mismatch ${n.typeIndex} != ${e.index}`);return n}(nQ,e),n=e.length-56;np(n>=0,"lookup table is invalid"),np(n%32==0,"lookup table is invalid");let{addresses:r}=e2.n_([e2.A9(ns(),n/32,"addresses")]).decode(e.slice(56));return{deactivationSlot:t.deactivationSlot,lastExtendedSlot:t.lastExtendedSlot,lastExtendedSlotStartIndex:t.lastExtendedStartIndex,authority:0!==t.authority.length?new nn(t.authority[0]):void 0,addresses:r.map(e=>new nn(e))}}}let nQ={index:1,layout:e2.n_([e2.Jq("typeIndex"),nj("deactivationSlot"),e2._O("lastExtendedSlot"),e2.u8("lastExtendedStartIndex"),e2.u8(),e2.A9(ns(),e2.cv(e2.u8(),-1),"authority")])},nJ=/^[^:]+:\/\/([^:[]+|\[[^\]]+\])(:\d+)?(.*)/i,n0=tb(ts(nn),tf(),e=>new nn(e)),n1=th([tf(),tu("base64")]),n2=tb(ts(a.Buffer),n1,e=>a.Buffer.from(e[0],"base64"));function n6(e){let t,n;if("string"==typeof e)t=e;else if(e){let{commitment:r,...i}=e;t=r,n=i}return{commitment:t,config:n}}function n3(e){return e.map(e=>"memcmp"in e?{...e,memcmp:{...e.memcmp,encoding:e.memcmp.encoding??"base58"}}:e)}function n4(e){return tg([tm({jsonrpc:tu("2.0"),id:tf(),result:e}),tm({jsonrpc:tu("2.0"),id:tf(),error:tm({code:ty(),message:tf(),data:td(ti("any",()=>!0))})})])}let n5=n4(ty());function n8(e){return tb(n4(e),n5,t=>"error"in t?t:{...t,result:tt(t.result,e)})}function n9(e){return n8(tm({context:tm({slot:tc()}),value:e}))}function n7(e){return tm({context:tm({slot:tc()}),value:e})}function re(e,t){return 0===e?new nb({header:t.header,staticAccountKeys:t.accountKeys.map(e=>new nn(e)),recentBlockhash:t.recentBlockhash,compiledInstructions:t.instructions.map(e=>({programIdIndex:e.programIdIndex,accountKeyIndexes:e.accounts,data:eJ().decode(e.data)})),addressTableLookups:t.addressTableLookups}):new ny(t)}let rt=tm({foundation:tc(),foundationTerm:tc(),initial:tc(),taper:tc(),terminal:tc()}),rn=n8(to(tl(tm({epoch:tc(),effectiveSlot:tc(),amount:tc(),postBalance:tc(),commission:td(tl(tc()))})))),rr=to(tm({slot:tc(),prioritizationFee:tc()})),ri=tm({total:tc(),validator:tc(),foundation:tc(),epoch:tc()}),ro=tm({epoch:tc(),slotIndex:tc(),slotsInEpoch:tc(),absoluteSlot:tc(),blockHeight:td(tc()),transactionCount:td(tc())}),ra=tm({slotsPerEpoch:tc(),leaderScheduleSlotOffset:tc(),warmup:ta(),firstNormalEpoch:tc(),firstNormalSlot:tc()}),rs=tp(tf(),to(tc())),ru=tl(tg([tm({}),tf()])),rl=tm({err:ru}),rc=tu("receivedSignature"),rd=tm({"solana-core":tf(),"feature-set":td(tc())}),rp=tm({program:tf(),programId:n0,parsed:ty()}),rf=tm({programId:n0,accounts:to(n0),data:tf()}),rh=n9(tm({err:tl(tg([tm({}),tf()])),logs:tl(to(tf())),accounts:td(tl(to(tl(tm({executable:ta(),owner:tf(),lamports:tc(),data:to(tf()),rentEpoch:td(tc())}))))),unitsConsumed:td(tc()),returnData:td(tl(tm({programId:tf(),data:th([tf(),tu("base64")])}))),innerInstructions:td(tl(to(tm({index:tc(),instructions:to(tg([rp,rf]))}))))})),rm=n9(tm({byIdentity:tp(tf(),to(tc())),range:tm({firstSlot:tc(),lastSlot:tc()})})),rg=n8(rt),ry=n8(ri),rb=n8(rr),r_=n8(ro),rv=n8(ra),rw=n8(rs),rk=n8(tc()),rx=n9(tm({total:tc(),circulating:tc(),nonCirculating:tc(),nonCirculatingAccounts:to(n0)})),rA=tm({amount:tf(),uiAmount:tl(tc()),decimals:tc(),uiAmountString:td(tf())}),rS=n9(to(tm({address:n0,amount:tf(),uiAmount:tl(tc()),decimals:tc(),uiAmountString:td(tf())}))),rI=n9(to(tm({pubkey:n0,account:tm({executable:ta(),owner:n0,lamports:tc(),data:n2,rentEpoch:tc()})}))),rT=tm({program:tf(),parsed:ty(),space:tc()}),rE=n9(to(tm({pubkey:n0,account:tm({executable:ta(),owner:n0,lamports:tc(),data:rT,rentEpoch:tc()})}))),rP=n9(to(tm({lamports:tc(),address:n0}))),rC=tm({executable:ta(),owner:n0,lamports:tc(),data:n2,rentEpoch:tc()}),rO=tm({pubkey:n0,account:rC}),rB=tb(tg([ts(a.Buffer),rT]),tg([n1,rT]),e=>Array.isArray(e)?tt(e,n2):e),rM=tm({executable:ta(),owner:n0,lamports:tc(),data:rB,rentEpoch:tc()}),rR=tm({pubkey:n0,account:rM}),rL=tm({state:tg([tu("active"),tu("inactive"),tu("activating"),tu("deactivating")]),active:tc(),inactive:tc()}),rN=n8(to(tm({signature:tf(),slot:tc(),err:ru,memo:tl(tf()),blockTime:td(tl(tc()))}))),rD=n8(to(tm({signature:tf(),slot:tc(),err:ru,memo:tl(tf()),blockTime:td(tl(tc()))}))),rF=tm({subscription:tc(),result:n7(rC)}),rq=tm({pubkey:n0,account:rC}),rj=tm({subscription:tc(),result:n7(rq)}),rU=tm({parent:tc(),slot:tc(),root:tc()}),rz=tm({subscription:tc(),result:rU}),rV=tg([tm({type:tg([tu("firstShredReceived"),tu("completed"),tu("optimisticConfirmation"),tu("root")]),slot:tc(),timestamp:tc()}),tm({type:tu("createdBank"),parent:tc(),slot:tc(),timestamp:tc()}),tm({type:tu("frozen"),slot:tc(),timestamp:tc(),stats:tm({numTransactionEntries:tc(),numSuccessfulTransactions:tc(),numFailedTransactions:tc(),maxTransactionsPerEntry:tc()})}),tm({type:tu("dead"),slot:tc(),timestamp:tc(),err:tf()})]),rW=tm({subscription:tc(),result:rV}),r$=tm({subscription:tc(),result:n7(tg([rl,rc]))}),rK=tm({subscription:tc(),result:tc()}),rH=tm({pubkey:tf(),gossip:tl(tf()),tpu:tl(tf()),rpc:tl(tf()),version:tl(tf())}),rG=tm({votePubkey:tf(),nodePubkey:tf(),activatedStake:tc(),epochVoteAccount:ta(),epochCredits:to(th([tc(),tc(),tc()])),commission:tc(),lastVote:tc(),rootSlot:tl(tc())}),rZ=n8(tm({current:to(rG),delinquent:to(rG)})),rY=tg([tu("processed"),tu("confirmed"),tu("finalized")]),rX=tm({slot:tc(),confirmations:tl(tc()),err:ru,confirmationStatus:td(rY)}),rQ=n9(to(tl(rX))),rJ=n8(tc()),r0=tm({accountKey:n0,writableIndexes:to(tc()),readonlyIndexes:to(tc())}),r1=tm({signatures:to(tf()),message:tm({accountKeys:to(tf()),header:tm({numRequiredSignatures:tc(),numReadonlySignedAccounts:tc(),numReadonlyUnsignedAccounts:tc()}),instructions:to(tm({accounts:to(tc()),data:tf(),programIdIndex:tc()})),recentBlockhash:tf(),addressTableLookups:td(to(r0))})}),r2=tm({pubkey:n0,signer:ta(),writable:ta(),source:td(tg([tu("transaction"),tu("lookupTable")]))}),r6=tm({accountKeys:to(r2),signatures:to(tf())}),r3=tm({parsed:ty(),program:tf(),programId:n0}),r4=tm({accounts:to(n0),data:tf(),programId:n0}),r5=tg([r4,r3]),r8=tg([tm({parsed:ty(),program:tf(),programId:tf()}),tm({accounts:to(tf()),data:tf(),programId:tf()})]),r9=tb(r5,r8,e=>"accounts"in e?tt(e,r4):tt(e,r3)),r7=tm({signatures:to(tf()),message:tm({accountKeys:to(r2),instructions:to(r9),recentBlockhash:tf(),addressTableLookups:td(tl(to(r0)))})}),ie=tm({accountIndex:tc(),mint:tf(),owner:td(tf()),uiTokenAmount:rA}),it=tm({writable:to(n0),readonly:to(n0)}),ir=tm({err:ru,fee:tc(),innerInstructions:td(tl(to(tm({index:tc(),instructions:to(tm({accounts:to(tc()),data:tf(),programIdIndex:tc()}))})))),preBalances:to(tc()),postBalances:to(tc()),logMessages:td(tl(to(tf()))),preTokenBalances:td(tl(to(ie))),postTokenBalances:td(tl(to(ie))),loadedAddresses:td(it),computeUnitsConsumed:td(tc())}),ii=tm({err:ru,fee:tc(),innerInstructions:td(tl(to(tm({index:tc(),instructions:to(r9)})))),preBalances:to(tc()),postBalances:to(tc()),logMessages:td(tl(to(tf()))),preTokenBalances:td(tl(to(ie))),postTokenBalances:td(tl(to(ie))),loadedAddresses:td(it),computeUnitsConsumed:td(tc())}),io=tg([tu(0),tu("legacy")]),ia=tm({pubkey:tf(),lamports:tc(),postBalance:tl(tc()),rewardType:tl(tf()),commission:td(tl(tc()))}),is=n8(tl(tm({blockhash:tf(),previousBlockhash:tf(),parentSlot:tc(),transactions:to(tm({transaction:r1,meta:tl(ir),version:td(io)})),rewards:td(to(ia)),blockTime:tl(tc()),blockHeight:tl(tc())}))),iu=n8(tl(tm({blockhash:tf(),previousBlockhash:tf(),parentSlot:tc(),rewards:td(to(ia)),blockTime:tl(tc()),blockHeight:tl(tc())}))),il=n8(tl(tm({blockhash:tf(),previousBlockhash:tf(),parentSlot:tc(),transactions:to(tm({transaction:r6,meta:tl(ir),version:td(io)})),rewards:td(to(ia)),blockTime:tl(tc()),blockHeight:tl(tc())}))),ic=n8(tl(tm({blockhash:tf(),previousBlockhash:tf(),parentSlot:tc(),transactions:to(tm({transaction:r7,meta:tl(ii),version:td(io)})),rewards:td(to(ia)),blockTime:tl(tc()),blockHeight:tl(tc())}))),id=n8(tl(tm({blockhash:tf(),previousBlockhash:tf(),parentSlot:tc(),transactions:to(tm({transaction:r6,meta:tl(ii),version:td(io)})),rewards:td(to(ia)),blockTime:tl(tc()),blockHeight:tl(tc())}))),ip=n8(tl(tm({blockhash:tf(),previousBlockhash:tf(),parentSlot:tc(),rewards:td(to(ia)),blockTime:tl(tc()),blockHeight:tl(tc())}))),ih=n8(tl(tm({blockhash:tf(),previousBlockhash:tf(),parentSlot:tc(),transactions:to(tm({transaction:r1,meta:tl(ir)})),rewards:td(to(ia)),blockTime:tl(tc())}))),im=n8(tl(tm({blockhash:tf(),previousBlockhash:tf(),parentSlot:tc(),signatures:to(tf()),blockTime:tl(tc())}))),ig=n8(tl(tm({slot:tc(),meta:tl(ir),blockTime:td(tl(tc())),transaction:r1,version:td(io)}))),iy=n8(tl(tm({slot:tc(),transaction:r7,meta:tl(ii),blockTime:td(tl(tc())),version:td(io)}))),ib=n9(tm({blockhash:tf(),feeCalculator:tm({lamportsPerSignature:tc()})})),i_=n9(tm({blockhash:tf(),lastValidBlockHeight:tc()})),iv=n9(ta()),iw=tm({slot:tc(),numTransactions:tc(),numSlots:tc(),samplePeriodSecs:tc()}),ik=n8(to(iw)),ix=n9(tl(tm({feeCalculator:tm({lamportsPerSignature:tc()})}))),iA=n8(tf()),iS=n8(tf()),iI=tm({err:ru,logs:to(tf()),signature:tf()}),iT=tm({result:n7(iI),subscription:tc()}),iE={"solana-client":"js/1.0.0-maintenance"};class iP{constructor(e,t){var n,r;let i,o,a,s,u,l;this._commitment=void 0,this._confirmTransactionInitialTimeout=void 0,this._rpcEndpoint=void 0,this._rpcWsEndpoint=void 0,this._rpcClient=void 0,this._rpcRequest=void 0,this._rpcBatchRequest=void 0,this._rpcWebSocket=void 0,this._rpcWebSocketConnected=!1,this._rpcWebSocketHeartbeat=null,this._rpcWebSocketIdleTimeout=null,this._rpcWebSocketGeneration=0,this._disableBlockhashCaching=!1,this._pollingBlockhash=!1,this._blockhashInfo={latestBlockhash:null,lastFetch:0,transactionSignatures:[],simulatedSignatures:[]},this._nextClientSubscriptionId=0,this._subscriptionDisposeFunctionsByClientSubscriptionId={},this._subscriptionHashByClientSubscriptionId={},this._subscriptionStateChangeCallbacksByHash={},this._subscriptionCallbacksByServerSubscriptionId={},this._subscriptionsByHash={},this._subscriptionsAutoDisposedByRpc=new Set,this.getBlockHeight=(()=>{let e={};return async t=>{let{commitment:n,config:r}=n6(t),i=this._buildArgs([],n,void 0,r),o=nK(i);return e[o]=e[o]??(async()=>{try{let e=await this._rpcRequest("getBlockHeight",i),t=tt(e,n8(tc()));if("error"in t)throw new nO(t.error,"failed to get block height information");return t.result}finally{delete e[o]}})(),await e[o]}})(),t&&"string"==typeof t?this._commitment=t:t&&(this._commitment=t.commitment,this._confirmTransactionInitialTimeout=t.confirmTransactionInitialTimeout,i=t.wsEndpoint,o=t.httpHeaders,a=t.fetch,s=t.fetchMiddleware,u=t.disableRetryOnRateLimit,l=t.httpAgent),this._rpcEndpoint=function(e){if(!1===/^https?:/.test(e))throw TypeError("Endpoint URL must start with `http:` or `https:`.");return e}(e),this._rpcWsEndpoint=i||function(e){let t=e.match(nJ);if(null==t)throw TypeError(`Failed to validate endpoint URL \`${e}\``);let[n,r,i,o]=t,a=e.startsWith("https:")?"wss:":"ws:",s=null==i?null:parseInt(i.slice(1),10),u=null==s?"":`:${s+1}`;return`${a}//${r}${u}${o}`}(e),this._rpcClient=function(e,t,n,r,i,o){let a,s;let u=n||nZ;null!=o&&console.warn("You have supplied an `httpAgent` when creating a `Connection` in a browser environment.It has been ignored; `httpAgent` is only used in Node environments."),r&&(s=async(e,t)=>{let n=await new Promise((n,i)=>{try{r(e,t,(e,t)=>n([e,t]))}catch(e){i(e)}});return await u(...n)});let l=new(tv())(async(n,r)=>{let o={method:"POST",body:n,agent:a,headers:Object.assign({"Content-Type":"application/json"},t||{},iE)};try{let t,n=5,a=500;for(;t=s?await s(e,o):await u(e,o),429===t.status&&!0!==i&&(n-=1,0!==n);)console.error(`Server responded with ${t.status} ${t.statusText}. Retrying after ${a}ms delay...`),await nM(a),a*=2;let l=await t.text();t.ok?r(null,l):r(Error(`${t.status} ${t.statusText}: ${l}`))}catch(e){e instanceof Error&&r(e)}},{});return l}(e,o,a,s,u,l),this._rpcRequest=(n=this._rpcClient,(e,t)=>new Promise((r,i)=>{n.request(e,t,(e,t)=>{if(e){i(e);return}r(t)})})),this._rpcBatchRequest=(r=this._rpcClient,e=>new Promise((t,n)=>{0===e.length&&t([]);let i=e.map(e=>r.request(e.methodName,e.args));r.request(i,(e,r)=>{if(e){n(e);return}t(r)})})),this._rpcWebSocket=new nY(this._rpcWsEndpoint,{autoconnect:!1,max_reconnects:1/0}),this._rpcWebSocket.on("open",this._wsOnOpen.bind(this)),this._rpcWebSocket.on("error",this._wsOnError.bind(this)),this._rpcWebSocket.on("close",this._wsOnClose.bind(this)),this._rpcWebSocket.on("accountNotification",this._wsOnAccountNotification.bind(this)),this._rpcWebSocket.on("programNotification",this._wsOnProgramAccountNotification.bind(this)),this._rpcWebSocket.on("slotNotification",this._wsOnSlotNotification.bind(this)),this._rpcWebSocket.on("slotsUpdatesNotification",this._wsOnSlotUpdatesNotification.bind(this)),this._rpcWebSocket.on("signatureNotification",this._wsOnSignatureNotification.bind(this)),this._rpcWebSocket.on("rootNotification",this._wsOnRootNotification.bind(this)),this._rpcWebSocket.on("logsNotification",this._wsOnLogsNotification.bind(this))}get commitment(){return this._commitment}get rpcEndpoint(){return this._rpcEndpoint}async getBalanceAndContext(e,t){let{commitment:n,config:r}=n6(t),i=this._buildArgs([e.toBase58()],n,void 0,r),o=await this._rpcRequest("getBalance",i),a=tt(o,n9(tc()));if("error"in a)throw new nO(a.error,`failed to get balance for ${e.toBase58()}`);return a.result}async getBalance(e,t){return await this.getBalanceAndContext(e,t).then(e=>e.value).catch(t=>{throw Error("failed to get balance of account "+e.toBase58()+": "+t)})}async getBlockTime(e){let t=await this._rpcRequest("getBlockTime",[e]),n=tt(t,n8(tl(tc())));if("error"in n)throw new nO(n.error,`failed to get block time for slot ${e}`);return n.result}async getMinimumLedgerSlot(){let e=await this._rpcRequest("minimumLedgerSlot",[]),t=tt(e,n8(tc()));if("error"in t)throw new nO(t.error,"failed to get minimum ledger slot");return t.result}async getFirstAvailableBlock(){let e=await this._rpcRequest("getFirstAvailableBlock",[]),t=tt(e,rk);if("error"in t)throw new nO(t.error,"failed to get first available block");return t.result}async getSupply(e){let t={};t="string"==typeof e?{commitment:e}:e?{...e,commitment:e&&e.commitment||this.commitment}:{commitment:this.commitment};let n=await this._rpcRequest("getSupply",[t]),r=tt(n,rx);if("error"in r)throw new nO(r.error,"failed to get supply");return r.result}async getTokenSupply(e,t){let n=this._buildArgs([e.toBase58()],t),r=await this._rpcRequest("getTokenSupply",n),i=tt(r,n9(rA));if("error"in i)throw new nO(i.error,"failed to get token supply");return i.result}async getTokenAccountBalance(e,t){let n=this._buildArgs([e.toBase58()],t),r=await this._rpcRequest("getTokenAccountBalance",n),i=tt(r,n9(rA));if("error"in i)throw new nO(i.error,"failed to get token account balance");return i.result}async getTokenAccountsByOwner(e,t,n){let{commitment:r,config:i}=n6(n),o=[e.toBase58()];"mint"in t?o.push({mint:t.mint.toBase58()}):o.push({programId:t.programId.toBase58()});let a=this._buildArgs(o,r,"base64",i),s=await this._rpcRequest("getTokenAccountsByOwner",a),u=tt(s,rI);if("error"in u)throw new nO(u.error,`failed to get token accounts owned by account ${e.toBase58()}`);return u.result}async getParsedTokenAccountsByOwner(e,t,n){let r=[e.toBase58()];"mint"in t?r.push({mint:t.mint.toBase58()}):r.push({programId:t.programId.toBase58()});let i=this._buildArgs(r,n,"jsonParsed"),o=await this._rpcRequest("getTokenAccountsByOwner",i),a=tt(o,rE);if("error"in a)throw new nO(a.error,`failed to get token accounts owned by account ${e.toBase58()}`);return a.result}async getLargestAccounts(e){let t={...e,commitment:e&&e.commitment||this.commitment},n=t.filter||t.commitment?[t]:[],r=await this._rpcRequest("getLargestAccounts",n),i=tt(r,rP);if("error"in i)throw new nO(i.error,"failed to get largest accounts");return i.result}async getTokenLargestAccounts(e,t){let n=this._buildArgs([e.toBase58()],t),r=await this._rpcRequest("getTokenLargestAccounts",n),i=tt(r,rS);if("error"in i)throw new nO(i.error,"failed to get token largest accounts");return i.result}async getAccountInfoAndContext(e,t){let{commitment:n,config:r}=n6(t),i=this._buildArgs([e.toBase58()],n,"base64",r),o=await this._rpcRequest("getAccountInfo",i),a=tt(o,n9(tl(rC)));if("error"in a)throw new nO(a.error,`failed to get info about account ${e.toBase58()}`);return a.result}async getParsedAccountInfo(e,t){let{commitment:n,config:r}=n6(t),i=this._buildArgs([e.toBase58()],n,"jsonParsed",r),o=await this._rpcRequest("getAccountInfo",i),a=tt(o,n9(tl(rM)));if("error"in a)throw new nO(a.error,`failed to get info about account ${e.toBase58()}`);return a.result}async getAccountInfo(e,t){try{let n=await this.getAccountInfoAndContext(e,t);return n.value}catch(t){throw Error("failed to get info about account "+e.toBase58()+": "+t)}}async getMultipleParsedAccounts(e,t){let{commitment:n,config:r}=n6(t),i=e.map(e=>e.toBase58()),o=this._buildArgs([i],n,"jsonParsed",r),a=await this._rpcRequest("getMultipleAccounts",o),s=tt(a,n9(to(tl(rM))));if("error"in s)throw new nO(s.error,`failed to get info for accounts ${i}`);return s.result}async getMultipleAccountsInfoAndContext(e,t){let{commitment:n,config:r}=n6(t),i=e.map(e=>e.toBase58()),o=this._buildArgs([i],n,"base64",r),a=await this._rpcRequest("getMultipleAccounts",o),s=tt(a,n9(to(tl(rC))));if("error"in s)throw new nO(s.error,`failed to get info for accounts ${i}`);return s.result}async getMultipleAccountsInfo(e,t){let n=await this.getMultipleAccountsInfoAndContext(e,t);return n.value}async getStakeActivation(e,t,n){let{commitment:r,config:i}=n6(t),o=this._buildArgs([e.toBase58()],r,void 0,{...i,epoch:null!=n?n:i?.epoch}),a=await this._rpcRequest("getStakeActivation",o),s=tt(a,n8(rL));if("error"in s)throw new nO(s.error,`failed to get Stake Activation ${e.toBase58()}`);return s.result}async getProgramAccounts(e,t){let{commitment:n,config:r}=n6(t),{encoding:i,...o}=r||{},a=this._buildArgs([e.toBase58()],n,i||"base64",{...o,...o.filters?{filters:n3(o.filters)}:null}),s=await this._rpcRequest("getProgramAccounts",a),u=to(rO),l=!0===o.withContext?tt(s,n9(u)):tt(s,n8(u));if("error"in l)throw new nO(l.error,`failed to get accounts owned by program ${e.toBase58()}`);return l.result}async getParsedProgramAccounts(e,t){let{commitment:n,config:r}=n6(t),i=this._buildArgs([e.toBase58()],n,"jsonParsed",r),o=await this._rpcRequest("getProgramAccounts",i),a=tt(o,n8(to(rR)));if("error"in a)throw new nO(a.error,`failed to get accounts owned by program ${e.toBase58()}`);return a.result}async confirmTransaction(e,t){let n,r;if("string"==typeof e)n=e;else{if(e.abortSignal?.aborted)return Promise.reject(e.abortSignal.reason);n=e.signature}try{r=eJ().decode(n)}catch(e){throw Error("signature must be base58 encoded: "+n)}return(np(64===r.length,"signature has invalid length"),"string"==typeof e)?await this.confirmTransactionUsingLegacyTimeoutStrategy({commitment:t||this.commitment,signature:n}):"lastValidBlockHeight"in e?await this.confirmTransactionUsingBlockHeightExceedanceStrategy({commitment:t||this.commitment,strategy:e}):await this.confirmTransactionUsingDurableNonceStrategy({commitment:t||this.commitment,strategy:e})}getCancellationPromise(e){return new Promise((t,n)=>{null!=e&&(e.aborted?n(e.reason):e.addEventListener("abort",()=>{n(e.reason)}))})}getTransactionConfirmationPromise({commitment:e,signature:t}){let n,r;let i=!1,o=new Promise((o,a)=>{try{n=this.onSignature(t,(e,t)=>{n=void 0,o({__type:nv.PROCESSED,response:{context:t,value:e}})},e);let s=new Promise(e=>{null==n?e():r=this._onSubscriptionStateChange(n,t=>{"subscribed"===t&&e()})});(async()=>{if(await s,i)return;let n=await this.getSignatureStatus(t);if(i||null==n)return;let{context:r,value:u}=n;if(null!=u){if(u?.err)a(u.err);else{switch(e){case"confirmed":case"single":case"singleGossip":if("processed"===u.confirmationStatus)return;break;case"finalized":case"max":case"root":if("processed"===u.confirmationStatus||"confirmed"===u.confirmationStatus)return}i=!0,o({__type:nv.PROCESSED,response:{context:r,value:u}})}}})()}catch(e){a(e)}}),a=()=>{r&&(r(),r=void 0),null!=n&&(this.removeSignatureListener(n),n=void 0)};return{abortConfirmation:a,confirmationPromise:o}}async confirmTransactionUsingBlockHeightExceedanceStrategy({commitment:e,strategy:{abortSignal:t,lastValidBlockHeight:n,signature:r}}){let i,o=!1,a=new Promise(t=>{let r=async()=>{try{let t=await this.getBlockHeight(e);return t}catch(e){return -1}};(async()=>{let e=await r();if(!o){for(;e<=n;)if(await nM(1e3),o||(e=await r(),o))return;t({__type:nv.BLOCKHEIGHT_EXCEEDED})}})()}),{abortConfirmation:s,confirmationPromise:u}=this.getTransactionConfirmationPromise({commitment:e,signature:r}),l=this.getCancellationPromise(t);try{let e=await Promise.race([l,u,a]);if(e.__type===nv.PROCESSED)i=e.response;else throw new nr(r)}finally{o=!0,s()}return i}async confirmTransactionUsingDurableNonceStrategy({commitment:e,strategy:{abortSignal:t,minContextSlot:n,nonceAccountPubkey:r,nonceValue:i,signature:o}}){let a,s=!1,u=new Promise(t=>{let o=i,a=null,u=async()=>{try{let{context:t,value:i}=await this.getNonceAndContext(r,{commitment:e,minContextSlot:n});return a=t.slot,i?.nonce}catch(e){return o}};(async()=>{if(o=await u(),!s)for(;;){if(i!==o){t({__type:nv.NONCE_INVALID,slotInWhichNonceDidAdvance:a});return}if(await nM(2e3),s||(o=await u(),s))return}})()}),{abortConfirmation:l,confirmationPromise:c}=this.getTransactionConfirmationPromise({commitment:e,signature:o}),d=this.getCancellationPromise(t);try{let t=await Promise.race([d,c,u]);if(t.__type===nv.PROCESSED)a=t.response;else{let r;for(;;){let e=await this.getSignatureStatus(o);if(null==e)break;if(e.context.slot<(t.slotInWhichNonceDidAdvance??n)){await nM(400);continue}r=e;break}if(r?.value){let{confirmationStatus:t}=r.value;switch(e||"finalized"){case"processed":case"recent":if("processed"!==t&&"confirmed"!==t&&"finalized"!==t)throw new no(o);break;case"confirmed":case"single":case"singleGossip":if("confirmed"!==t&&"finalized"!==t)throw new no(o);break;case"finalized":case"max":case"root":if("finalized"!==t)throw new no(o)}a={context:r.context,value:{err:r.value.err}}}else throw new no(o)}}finally{s=!0,l()}return a}async confirmTransactionUsingLegacyTimeoutStrategy({commitment:e,signature:t}){let n,r;let i=new Promise(t=>{let r=this._confirmTransactionInitialTimeout||6e4;switch(e){case"processed":case"recent":case"single":case"confirmed":case"singleGossip":r=this._confirmTransactionInitialTimeout||3e4}n=setTimeout(()=>t({__type:nv.TIMED_OUT,timeoutMs:r}),r)}),{abortConfirmation:o,confirmationPromise:a}=this.getTransactionConfirmationPromise({commitment:e,signature:t});try{let e=await Promise.race([a,i]);if(e.__type===nv.PROCESSED)r=e.response;else throw new ni(t,e.timeoutMs/1e3)}finally{clearTimeout(n),o()}return r}async getClusterNodes(){let e=await this._rpcRequest("getClusterNodes",[]),t=tt(e,n8(to(rH)));if("error"in t)throw new nO(t.error,"failed to get cluster nodes");return t.result}async getVoteAccounts(e){let t=this._buildArgs([],e),n=await this._rpcRequest("getVoteAccounts",t),r=tt(n,rZ);if("error"in r)throw new nO(r.error,"failed to get vote accounts");return r.result}async getSlot(e){let{commitment:t,config:n}=n6(e),r=this._buildArgs([],t,void 0,n),i=await this._rpcRequest("getSlot",r),o=tt(i,n8(tc()));if("error"in o)throw new nO(o.error,"failed to get slot");return o.result}async getSlotLeader(e){let{commitment:t,config:n}=n6(e),r=this._buildArgs([],t,void 0,n),i=await this._rpcRequest("getSlotLeader",r),o=tt(i,n8(tf()));if("error"in o)throw new nO(o.error,"failed to get slot leader");return o.result}async getSlotLeaders(e,t){let n=await this._rpcRequest("getSlotLeaders",[e,t]),r=tt(n,n8(to(n0)));if("error"in r)throw new nO(r.error,"failed to get slot leaders");return r.result}async getSignatureStatus(e,t){let{context:n,value:r}=await this.getSignatureStatuses([e],t);np(1===r.length);let i=r[0];return{context:n,value:i}}async getSignatureStatuses(e,t){let n=[e];t&&n.push(t);let r=await this._rpcRequest("getSignatureStatuses",n),i=tt(r,rQ);if("error"in i)throw new nO(i.error,"failed to get signature status");return i.result}async getTransactionCount(e){let{commitment:t,config:n}=n6(e),r=this._buildArgs([],t,void 0,n),i=await this._rpcRequest("getTransactionCount",r),o=tt(i,n8(tc()));if("error"in o)throw new nO(o.error,"failed to get transaction count");return o.result}async getTotalSupply(e){let t=await this.getSupply({commitment:e,excludeNonCirculatingAccountsList:!0});return t.value.total}async getInflationGovernor(e){let t=this._buildArgs([],e),n=await this._rpcRequest("getInflationGovernor",t),r=tt(n,rg);if("error"in r)throw new nO(r.error,"failed to get inflation");return r.result}async getInflationReward(e,t,n){let{commitment:r,config:i}=n6(n),o=this._buildArgs([e.map(e=>e.toBase58())],r,void 0,{...i,epoch:null!=t?t:i?.epoch}),a=await this._rpcRequest("getInflationReward",o),s=tt(a,rn);if("error"in s)throw new nO(s.error,"failed to get inflation reward");return s.result}async getInflationRate(){let e=await this._rpcRequest("getInflationRate",[]),t=tt(e,ry);if("error"in t)throw new nO(t.error,"failed to get inflation rate");return t.result}async getEpochInfo(e){let{commitment:t,config:n}=n6(e),r=this._buildArgs([],t,void 0,n),i=await this._rpcRequest("getEpochInfo",r),o=tt(i,r_);if("error"in o)throw new nO(o.error,"failed to get epoch info");return o.result}async getEpochSchedule(){let e=await this._rpcRequest("getEpochSchedule",[]),t=tt(e,rv);if("error"in t)throw new nO(t.error,"failed to get epoch schedule");let n=t.result;return new nG(n.slotsPerEpoch,n.leaderScheduleSlotOffset,n.warmup,n.firstNormalEpoch,n.firstNormalSlot)}async getLeaderSchedule(){let e=await this._rpcRequest("getLeaderSchedule",[]),t=tt(e,rw);if("error"in t)throw new nO(t.error,"failed to get leader schedule");return t.result}async getMinimumBalanceForRentExemption(e,t){let n=this._buildArgs([e],t),r=await this._rpcRequest("getMinimumBalanceForRentExemption",n),i=tt(r,rJ);return"error"in i?(console.warn("Unable to fetch minimum balance for rent exemption"),0):i.result}async getRecentBlockhashAndContext(e){let t=this._buildArgs([],e),n=await this._rpcRequest("getRecentBlockhash",t),r=tt(n,ib);if("error"in r)throw new nO(r.error,"failed to get recent blockhash");return r.result}async getRecentPerformanceSamples(e){let t=await this._rpcRequest("getRecentPerformanceSamples",e?[e]:[]),n=tt(t,ik);if("error"in n)throw new nO(n.error,"failed to get recent performance samples");return n.result}async getFeeCalculatorForBlockhash(e,t){let n=this._buildArgs([e],t),r=await this._rpcRequest("getFeeCalculatorForBlockhash",n),i=tt(r,ix);if("error"in i)throw new nO(i.error,"failed to get fee calculator");let{context:o,value:a}=i.result;return{context:o,value:null!==a?a.feeCalculator:null}}async getFeeForMessage(e,t){let n=t9(e.serialize()).toString("base64"),r=this._buildArgs([n],t),i=await this._rpcRequest("getFeeForMessage",r),o=tt(i,n9(tl(tc())));if("error"in o)throw new nO(o.error,"failed to get fee for message");if(null===o.result)throw Error("invalid blockhash");return o.result}async getRecentPrioritizationFees(e){let t=e?.lockedWritableAccounts?.map(e=>e.toBase58()),n=t?.length?[t]:[],r=await this._rpcRequest("getRecentPrioritizationFees",n),i=tt(r,rb);if("error"in i)throw new nO(i.error,"failed to get recent prioritization fees");return i.result}async getRecentBlockhash(e){try{let t=await this.getRecentBlockhashAndContext(e);return t.value}catch(e){throw Error("failed to get recent blockhash: "+e)}}async getLatestBlockhash(e){try{let t=await this.getLatestBlockhashAndContext(e);return t.value}catch(e){throw Error("failed to get recent blockhash: "+e)}}async getLatestBlockhashAndContext(e){let{commitment:t,config:n}=n6(e),r=this._buildArgs([],t,void 0,n),i=await this._rpcRequest("getLatestBlockhash",r),o=tt(i,i_);if("error"in o)throw new nO(o.error,"failed to get latest blockhash");return o.result}async isBlockhashValid(e,t){let{commitment:n,config:r}=n6(t),i=this._buildArgs([e],n,void 0,r),o=await this._rpcRequest("isBlockhashValid",i),a=tt(o,iv);if("error"in a)throw new nO(a.error,"failed to determine if the blockhash `"+e+"`is valid");return a.result}async getVersion(){let e=await this._rpcRequest("getVersion",[]),t=tt(e,n8(rd));if("error"in t)throw new nO(t.error,"failed to get version");return t.result}async getGenesisHash(){let e=await this._rpcRequest("getGenesisHash",[]),t=tt(e,n8(tf()));if("error"in t)throw new nO(t.error,"failed to get genesis hash");return t.result}async getBlock(e,t){let{commitment:n,config:r}=n6(t),i=this._buildArgsAtLeastConfirmed([e],n,void 0,r),o=await this._rpcRequest("getBlock",i);try{switch(r?.transactionDetails){case"accounts":{let e=tt(o,il);if("error"in e)throw e.error;return e.result}case"none":{let e=tt(o,iu);if("error"in e)throw e.error;return e.result}default:{let e=tt(o,is);if("error"in e)throw e.error;let{result:t}=e;return t?{...t,transactions:t.transactions.map(({transaction:e,meta:t,version:n})=>({meta:t,transaction:{...e,message:re(n,e.message)},version:n}))}:null}}}catch(e){throw new nO(e,"failed to get confirmed block")}}async getParsedBlock(e,t){let{commitment:n,config:r}=n6(t),i=this._buildArgsAtLeastConfirmed([e],n,"jsonParsed",r),o=await this._rpcRequest("getBlock",i);try{switch(r?.transactionDetails){case"accounts":{let e=tt(o,id);if("error"in e)throw e.error;return e.result}case"none":{let e=tt(o,ip);if("error"in e)throw e.error;return e.result}default:{let e=tt(o,ic);if("error"in e)throw e.error;return e.result}}}catch(e){throw new nO(e,"failed to get block")}}async getBlockProduction(e){let t,n;if("string"==typeof e)n=e;else if(e){let{commitment:r,...i}=e;n=r,t=i}let r=this._buildArgs([],n,"base64",t),i=await this._rpcRequest("getBlockProduction",r),o=tt(i,rm);if("error"in o)throw new nO(o.error,"failed to get block production information");return o.result}async getTransaction(e,t){let{commitment:n,config:r}=n6(t),i=this._buildArgsAtLeastConfirmed([e],n,void 0,r),o=await this._rpcRequest("getTransaction",i),a=tt(o,ig);if("error"in a)throw new nO(a.error,"failed to get transaction");let s=a.result;return s?{...s,transaction:{...s.transaction,message:re(s.version,s.transaction.message)}}:s}async getParsedTransaction(e,t){let{commitment:n,config:r}=n6(t),i=this._buildArgsAtLeastConfirmed([e],n,"jsonParsed",r),o=await this._rpcRequest("getTransaction",i),a=tt(o,iy);if("error"in a)throw new nO(a.error,"failed to get transaction");return a.result}async getParsedTransactions(e,t){let{commitment:n,config:r}=n6(t),i=e.map(e=>{let t=this._buildArgsAtLeastConfirmed([e],n,"jsonParsed",r);return{methodName:"getTransaction",args:t}}),o=await this._rpcBatchRequest(i),a=o.map(e=>{let t=tt(e,iy);if("error"in t)throw new nO(t.error,"failed to get transactions");return t.result});return a}async getTransactions(e,t){let{commitment:n,config:r}=n6(t),i=e.map(e=>{let t=this._buildArgsAtLeastConfirmed([e],n,void 0,r);return{methodName:"getTransaction",args:t}}),o=await this._rpcBatchRequest(i),a=o.map(e=>{let t=tt(e,ig);if("error"in t)throw new nO(t.error,"failed to get transactions");let n=t.result;return n?{...n,transaction:{...n.transaction,message:re(n.version,n.transaction.message)}}:n});return a}async getConfirmedBlock(e,t){let n=this._buildArgsAtLeastConfirmed([e],t),r=await this._rpcRequest("getConfirmedBlock",n),i=tt(r,ih);if("error"in i)throw new nO(i.error,"failed to get confirmed block");let o=i.result;if(!o)throw Error("Confirmed block "+e+" not found");let a={...o,transactions:o.transactions.map(({transaction:e,meta:t})=>{let n=new ny(e.message);return{meta:t,transaction:{...e,message:n}}})};return{...a,transactions:a.transactions.map(({transaction:e,meta:t})=>({meta:t,transaction:nx.populate(e.message,e.signatures)}))}}async getBlocks(e,t,n){let r=this._buildArgsAtLeastConfirmed(void 0!==t?[e,t]:[e],n),i=await this._rpcRequest("getBlocks",r),o=tt(i,n8(to(tc())));if("error"in o)throw new nO(o.error,"failed to get blocks");return o.result}async getBlockSignatures(e,t){let n=this._buildArgsAtLeastConfirmed([e],t,void 0,{transactionDetails:"signatures",rewards:!1}),r=await this._rpcRequest("getBlock",n),i=tt(r,im);if("error"in i)throw new nO(i.error,"failed to get block");let o=i.result;if(!o)throw Error("Block "+e+" not found");return o}async getConfirmedBlockSignatures(e,t){let n=this._buildArgsAtLeastConfirmed([e],t,void 0,{transactionDetails:"signatures",rewards:!1}),r=await this._rpcRequest("getConfirmedBlock",n),i=tt(r,im);if("error"in i)throw new nO(i.error,"failed to get confirmed block");let o=i.result;if(!o)throw Error("Confirmed block "+e+" not found");return o}async getConfirmedTransaction(e,t){let n=this._buildArgsAtLeastConfirmed([e],t),r=await this._rpcRequest("getConfirmedTransaction",n),i=tt(r,ig);if("error"in i)throw new nO(i.error,"failed to get transaction");let o=i.result;if(!o)return o;let a=new ny(o.transaction.message),s=o.transaction.signatures;return{...o,transaction:nx.populate(a,s)}}async getParsedConfirmedTransaction(e,t){let n=this._buildArgsAtLeastConfirmed([e],t,"jsonParsed"),r=await this._rpcRequest("getConfirmedTransaction",n),i=tt(r,iy);if("error"in i)throw new nO(i.error,"failed to get confirmed transaction");return i.result}async getParsedConfirmedTransactions(e,t){let n=e.map(e=>{let n=this._buildArgsAtLeastConfirmed([e],t,"jsonParsed");return{methodName:"getConfirmedTransaction",args:n}}),r=await this._rpcBatchRequest(n),i=r.map(e=>{let t=tt(e,iy);if("error"in t)throw new nO(t.error,"failed to get confirmed transactions");return t.result});return i}async getConfirmedSignaturesForAddress(e,t,n){let r={},i=await this.getFirstAvailableBlock();for(;!("until"in r)&&!(--t<=0)&&!(t0&&(r.until=e.signatures[e.signatures.length-1].toString())}catch(e){if(e instanceof Error&&e.message.includes("skipped"))continue;throw e}let o=await this.getSlot("finalized");for(;!("before"in r)&&!(++n>o);)try{let e=await this.getConfirmedBlockSignatures(n);e.signatures.length>0&&(r.before=e.signatures[e.signatures.length-1].toString())}catch(e){if(e instanceof Error&&e.message.includes("skipped"))continue;throw e}let a=await this.getConfirmedSignaturesForAddress2(e,r);return a.map(e=>e.signature)}async getConfirmedSignaturesForAddress2(e,t,n){let r=this._buildArgsAtLeastConfirmed([e.toBase58()],n,void 0,t),i=await this._rpcRequest("getConfirmedSignaturesForAddress2",r),o=tt(i,rN);if("error"in o)throw new nO(o.error,"failed to get confirmed signatures for address");return o.result}async getSignaturesForAddress(e,t,n){let r=this._buildArgsAtLeastConfirmed([e.toBase58()],n,void 0,t),i=await this._rpcRequest("getSignaturesForAddress",r),o=tt(i,rD);if("error"in o)throw new nO(o.error,"failed to get signatures for address");return o.result}async getAddressLookupTable(e,t){let{context:n,value:r}=await this.getAccountInfoAndContext(e,t),i=null;return null!==r&&(i=new nX({key:e,state:nX.deserialize(r.data)})),{context:n,value:i}}async getNonceAndContext(e,t){let{context:n,value:r}=await this.getAccountInfoAndContext(e,t),i=null;return null!==r&&(i=nF.fromAccountData(r.data)),{context:n,value:i}}async getNonce(e,t){return await this.getNonceAndContext(e,t).then(e=>e.value).catch(t=>{throw Error("failed to get nonce for account "+e.toBase58()+": "+t)})}async requestAirdrop(e,t){let n=await this._rpcRequest("requestAirdrop",[e.toBase58(),t]),r=tt(n,iA);if("error"in r)throw new nO(r.error,`airdrop to ${e.toBase58()} failed`);return r.result}async _blockhashWithExpiryBlockHeight(e){if(!e){for(;this._pollingBlockhash;)await nM(100);let e=Date.now()-this._blockhashInfo.lastFetch;if(null!==this._blockhashInfo.latestBlockhash&&!(e>=3e4))return this._blockhashInfo.latestBlockhash}return await this._pollNewBlockhash()}async _pollNewBlockhash(){this._pollingBlockhash=!0;try{let e=Date.now(),t=this._blockhashInfo.latestBlockhash,n=t?t.blockhash:null;for(let e=0;e<50;e++){let e=await this.getLatestBlockhash("finalized");if(n!==e.blockhash)return this._blockhashInfo={latestBlockhash:e,lastFetch:Date.now(),transactionSignatures:[],simulatedSignatures:[]},e;await nM(200)}throw Error(`Unable to obtain a new blockhash after ${Date.now()-e}ms`)}finally{this._pollingBlockhash=!1}}async getStakeMinimumDelegation(e){let{commitment:t,config:n}=n6(e),r=this._buildArgs([],t,"base64",n),i=await this._rpcRequest("getStakeMinimumDelegation",r),o=tt(i,n9(tc()));if("error"in o)throw new nO(o.error,"failed to get stake minimum delegation");return o.result}async simulateTransaction(e,t,n){let r;if("message"in e){let r=e.serialize(),i=a.Buffer.from(r).toString("base64");if(Array.isArray(t)||void 0!==n)throw Error("Invalid arguments");let o=t||{};o.encoding="base64","commitment"in o||(o.commitment=this.commitment),t&&"object"==typeof t&&"innerInstructions"in t&&(o.innerInstructions=t.innerInstructions);let s=[i,o],u=await this._rpcRequest("simulateTransaction",s),l=tt(u,rh);if("error"in l)throw Error("failed to simulate transaction: "+l.error.message);return l.result}if(e instanceof nx?((r=new nx).feePayer=e.feePayer,r.instructions=e.instructions,r.nonceInfo=e.nonceInfo,r.signatures=e.signatures):(r=nx.populate(e))._message=r._json=void 0,void 0!==t&&!Array.isArray(t))throw Error("Invalid arguments");if(r.nonceInfo&&t)r.sign(...t);else{let e=this._disableBlockhashCaching;for(;;){let n=await this._blockhashWithExpiryBlockHeight(e);if(r.lastValidBlockHeight=n.lastValidBlockHeight,r.recentBlockhash=n.blockhash,!t)break;if(r.sign(...t),!r.signature)throw Error("!signature");let i=r.signature.toString("base64");if(this._blockhashInfo.simulatedSignatures.includes(i)||this._blockhashInfo.transactionSignatures.includes(i))e=!0;else{this._blockhashInfo.simulatedSignatures.push(i);break}}}let i=r._compile(),o=i.serialize(),s=r._serialize(o),u=s.toString("base64"),l={encoding:"base64",commitment:this.commitment};if(n){let e=(Array.isArray(n)?n:i.nonProgramIds()).map(e=>e.toBase58());l.accounts={encoding:"base64",addresses:e}}t&&(l.sigVerify=!0),t&&"object"==typeof t&&"innerInstructions"in t&&(l.innerInstructions=t.innerInstructions);let c=[u,l],d=await this._rpcRequest("simulateTransaction",c),p=tt(d,rh);if("error"in p){let e;if("data"in p.error&&(e=p.error.data.logs)&&Array.isArray(e)){let t="\n ",n=t+e.join(t);console.error(p.error.message,n)}throw new nC({action:"simulate",signature:"",transactionMessage:p.error.message,logs:e})}return p.result}async sendTransaction(e,t,n){if("version"in e){if(t&&Array.isArray(t))throw Error("Invalid arguments");let n=e.serialize();return await this.sendRawTransaction(n,t)}if(void 0===t||!Array.isArray(t))throw Error("Invalid arguments");if(e.nonceInfo)e.sign(...t);else{let n=this._disableBlockhashCaching;for(;;){let r=await this._blockhashWithExpiryBlockHeight(n);if(e.lastValidBlockHeight=r.lastValidBlockHeight,e.recentBlockhash=r.blockhash,e.sign(...t),!e.signature)throw Error("!signature");let i=e.signature.toString("base64");if(this._blockhashInfo.transactionSignatures.includes(i))n=!0;else{this._blockhashInfo.transactionSignatures.push(i);break}}}let r=e.serialize();return await this.sendRawTransaction(r,n)}async sendRawTransaction(e,t){let n=t9(e).toString("base64"),r=await this.sendEncodedTransaction(n,t);return r}async sendEncodedTransaction(e,t){let n={encoding:"base64"},r=t&&t.skipPreflight,i=!0===r?"processed":t&&t.preflightCommitment||this.commitment;t&&null!=t.maxRetries&&(n.maxRetries=t.maxRetries),t&&null!=t.minContextSlot&&(n.minContextSlot=t.minContextSlot),r&&(n.skipPreflight=r),i&&(n.preflightCommitment=i);let o=[e,n],a=await this._rpcRequest("sendTransaction",o),s=tt(a,iS);if("error"in s){let e;throw"data"in s.error&&(e=s.error.data.logs),new nC({action:r?"send":"simulate",signature:"",transactionMessage:s.error.message,logs:e})}return s.result}_wsOnOpen(){this._rpcWebSocketConnected=!0,this._rpcWebSocketHeartbeat=setInterval(()=>{(async()=>{try{await this._rpcWebSocket.notify("ping")}catch{}})()},5e3),this._updateSubscriptions()}_wsOnError(e){this._rpcWebSocketConnected=!1,console.error("ws error:",e.message)}_wsOnClose(e){if(this._rpcWebSocketConnected=!1,this._rpcWebSocketGeneration=(this._rpcWebSocketGeneration+1)%Number.MAX_SAFE_INTEGER,this._rpcWebSocketIdleTimeout&&(clearTimeout(this._rpcWebSocketIdleTimeout),this._rpcWebSocketIdleTimeout=null),this._rpcWebSocketHeartbeat&&(clearInterval(this._rpcWebSocketHeartbeat),this._rpcWebSocketHeartbeat=null),1e3===e){this._updateSubscriptions();return}this._subscriptionCallbacksByServerSubscriptionId={},Object.entries(this._subscriptionsByHash).forEach(([e,t])=>{this._setSubscription(e,{...t,state:"pending"})})}_setSubscription(e,t){let n=this._subscriptionsByHash[e]?.state;if(this._subscriptionsByHash[e]=t,n!==t.state){let n=this._subscriptionStateChangeCallbacksByHash[e];n&&n.forEach(e=>{try{e(t.state)}catch{}})}}_onSubscriptionStateChange(e,t){let n=this._subscriptionHashByClientSubscriptionId[e];if(null==n)return()=>{};let r=this._subscriptionStateChangeCallbacksByHash[n]||=new Set;return r.add(t),()=>{r.delete(t),0===r.size&&delete this._subscriptionStateChangeCallbacksByHash[n]}}async _updateSubscriptions(){if(0===Object.keys(this._subscriptionsByHash).length){this._rpcWebSocketConnected&&(this._rpcWebSocketConnected=!1,this._rpcWebSocketIdleTimeout=setTimeout(()=>{this._rpcWebSocketIdleTimeout=null;try{this._rpcWebSocket.close()}catch(e){e instanceof Error&&console.log(`Error when closing socket connection: ${e.message}`)}},500));return}if(null!==this._rpcWebSocketIdleTimeout&&(clearTimeout(this._rpcWebSocketIdleTimeout),this._rpcWebSocketIdleTimeout=null,this._rpcWebSocketConnected=!0),!this._rpcWebSocketConnected){this._rpcWebSocket.connect();return}let e=this._rpcWebSocketGeneration,t=()=>e===this._rpcWebSocketGeneration;await Promise.all(Object.keys(this._subscriptionsByHash).map(async e=>{let n=this._subscriptionsByHash[e];if(void 0!==n)switch(n.state){case"pending":case"unsubscribed":if(0===n.callbacks.size){delete this._subscriptionsByHash[e],"unsubscribed"===n.state&&delete this._subscriptionCallbacksByServerSubscriptionId[n.serverSubscriptionId],await this._updateSubscriptions();return}await (async()=>{let{args:r,method:i}=n;try{this._setSubscription(e,{...n,state:"subscribing"});let t=await this._rpcWebSocket.call(i,r);this._setSubscription(e,{...n,serverSubscriptionId:t,state:"subscribed"}),this._subscriptionCallbacksByServerSubscriptionId[t]=n.callbacks,await this._updateSubscriptions()}catch(o){if(o instanceof Error&&console.error(`${i} error for argument`,r,o.message),!t())return;this._setSubscription(e,{...n,state:"pending"}),await this._updateSubscriptions()}})();break;case"subscribed":0===n.callbacks.size&&await (async()=>{let{serverSubscriptionId:r,unsubscribeMethod:i}=n;if(this._subscriptionsAutoDisposedByRpc.has(r))this._subscriptionsAutoDisposedByRpc.delete(r);else{this._setSubscription(e,{...n,state:"unsubscribing"}),this._setSubscription(e,{...n,state:"unsubscribing"});try{await this._rpcWebSocket.call(i,[r])}catch(r){if(r instanceof Error&&console.error(`${i} error:`,r.message),!t())return;this._setSubscription(e,{...n,state:"subscribed"}),await this._updateSubscriptions();return}}this._setSubscription(e,{...n,state:"unsubscribed"}),await this._updateSubscriptions()})()}}))}_handleServerNotification(e,t){let n=this._subscriptionCallbacksByServerSubscriptionId[e];void 0!==n&&n.forEach(e=>{try{e(...t)}catch(e){console.error(e)}})}_wsOnAccountNotification(e){let{result:t,subscription:n}=tt(e,rF);this._handleServerNotification(n,[t.value,t.context])}_makeSubscription(e,t){let n=this._nextClientSubscriptionId++,r=nK([e.method,t]),i=this._subscriptionsByHash[r];return void 0===i?this._subscriptionsByHash[r]={...e,args:t,callbacks:new Set([e.callback]),state:"pending"}:i.callbacks.add(e.callback),this._subscriptionHashByClientSubscriptionId[n]=r,this._subscriptionDisposeFunctionsByClientSubscriptionId[n]=async()=>{delete this._subscriptionDisposeFunctionsByClientSubscriptionId[n],delete this._subscriptionHashByClientSubscriptionId[n];let t=this._subscriptionsByHash[r];np(void 0!==t,`Could not find a \`Subscription\` when tearing down client subscription #${n}`),t.callbacks.delete(e.callback),await this._updateSubscriptions()},this._updateSubscriptions(),n}onAccountChange(e,t,n){let{commitment:r,config:i}=n6(n),o=this._buildArgs([e.toBase58()],r||this._commitment||"finalized","base64",i);return this._makeSubscription({callback:t,method:"accountSubscribe",unsubscribeMethod:"accountUnsubscribe"},o)}async removeAccountChangeListener(e){await this._unsubscribeClientSubscription(e,"account change")}_wsOnProgramAccountNotification(e){let{result:t,subscription:n}=tt(e,rj);this._handleServerNotification(n,[{accountId:t.value.pubkey,accountInfo:t.value.account},t.context])}onProgramAccountChange(e,t,n,r){let{commitment:i,config:o}=n6(n),a=this._buildArgs([e.toBase58()],i||this._commitment||"finalized","base64",o||(r?{filters:n3(r)}:void 0));return this._makeSubscription({callback:t,method:"programSubscribe",unsubscribeMethod:"programUnsubscribe"},a)}async removeProgramAccountChangeListener(e){await this._unsubscribeClientSubscription(e,"program account change")}onLogs(e,t,n){let r=this._buildArgs(["object"==typeof e?{mentions:[e.toString()]}:e],n||this._commitment||"finalized");return this._makeSubscription({callback:t,method:"logsSubscribe",unsubscribeMethod:"logsUnsubscribe"},r)}async removeOnLogsListener(e){await this._unsubscribeClientSubscription(e,"logs")}_wsOnLogsNotification(e){let{result:t,subscription:n}=tt(e,iT);this._handleServerNotification(n,[t.value,t.context])}_wsOnSlotNotification(e){let{result:t,subscription:n}=tt(e,rz);this._handleServerNotification(n,[t])}onSlotChange(e){return this._makeSubscription({callback:e,method:"slotSubscribe",unsubscribeMethod:"slotUnsubscribe"},[])}async removeSlotChangeListener(e){await this._unsubscribeClientSubscription(e,"slot change")}_wsOnSlotUpdatesNotification(e){let{result:t,subscription:n}=tt(e,rW);this._handleServerNotification(n,[t])}onSlotUpdate(e){return this._makeSubscription({callback:e,method:"slotsUpdatesSubscribe",unsubscribeMethod:"slotsUpdatesUnsubscribe"},[])}async removeSlotUpdateListener(e){await this._unsubscribeClientSubscription(e,"slot update")}async _unsubscribeClientSubscription(e,t){let n=this._subscriptionDisposeFunctionsByClientSubscriptionId[e];n?await n():console.warn(`Ignored unsubscribe request because an active subscription with id \`${e}\` for '${t}' events could not be found.`)}_buildArgs(e,t,n,r){let i=t||this._commitment;if(i||n||r){let t={};n&&(t.encoding=n),i&&(t.commitment=i),r&&(t=Object.assign(t,r)),e.push(t)}return e}_buildArgsAtLeastConfirmed(e,t,n,r){let i=t||this._commitment;if(i&&!["confirmed","finalized"].includes(i))throw Error("Using Connection with default commitment: `"+this._commitment+"`, but method requires at least `confirmed`");return this._buildArgs(e,t,n,r)}_wsOnSignatureNotification(e){let{result:t,subscription:n}=tt(e,r$);"receivedSignature"!==t.value&&this._subscriptionsAutoDisposedByRpc.add(n),this._handleServerNotification(n,"receivedSignature"===t.value?[{type:"received"},t.context]:[{type:"status",result:t.value},t.context])}onSignature(e,t,n){let r=this._buildArgs([e],n||this._commitment||"finalized"),i=this._makeSubscription({callback:(e,n)=>{if("status"===e.type){t(e.result,n);try{this.removeSignatureListener(i)}catch(e){}}},method:"signatureSubscribe",unsubscribeMethod:"signatureUnsubscribe"},r);return i}onSignatureWithOptions(e,t,n){let{commitment:r,...i}={...n,commitment:n&&n.commitment||this._commitment||"finalized"},o=this._buildArgs([e],r,void 0,i),a=this._makeSubscription({callback:(e,n)=>{t(e,n);try{this.removeSignatureListener(a)}catch(e){}},method:"signatureSubscribe",unsubscribeMethod:"signatureUnsubscribe"},o);return a}async removeSignatureListener(e){await this._unsubscribeClientSubscription(e,"signature result")}_wsOnRootNotification(e){let{result:t,subscription:n}=tt(e,rK);this._handleServerNotification(n,[t])}onRootChange(e){return this._makeSubscription({callback:e,method:"rootSubscribe",unsubscribeMethod:"rootUnsubscribe"},[])}async removeRootChangeListener(e){await this._unsubscribeClientSubscription(e,"root change")}}class iC{constructor(e){this._keypair=void 0,this._keypair=e??t6()}static generate(){return new iC(t6())}static fromSecretKey(e,t){if(64!==e.byteLength)throw Error("bad secret key size");let n=e.slice(32,64);if(!t||!t.skipValidation){let t=e.slice(0,32),r=t3(t);for(let e=0;e<32;e++)if(n[e]!==r[e])throw Error("provided secretKey is invalid")}return new iC({publicKey:n,secretKey:e})}static fromSeed(e){let t=t3(e),n=new Uint8Array(64);return n.set(e),n.set(t,32),new iC({publicKey:t,secretKey:n})}get publicKey(){return new nn(this._keypair.publicKey)}get secretKey(){return new Uint8Array(this._keypair.secretKey)}}Object.freeze({CreateLookupTable:{index:0,layout:e2.n_([e2.Jq("instruction"),nj("recentSlot"),e2.u8("bumpSeed")])},FreezeLookupTable:{index:1,layout:e2.n_([e2.Jq("instruction")])},ExtendLookupTable:{index:2,layout:e2.n_([e2.Jq("instruction"),nj(),e2.A9(ns(),e2.cv(e2.Jq(),-8),"addresses")])},DeactivateLookupTable:{index:3,layout:e2.n_([e2.Jq("instruction")])},CloseLookupTable:{index:4,layout:e2.n_([e2.Jq("instruction")])}}),new nn("AddressLookupTab1e1111111111111111111111111");let iO=Object.freeze({RequestUnits:{index:0,layout:e2.n_([e2.u8("instruction"),e2.Jq("units"),e2.Jq("additionalFee")])},RequestHeapFrame:{index:1,layout:e2.n_([e2.u8("instruction"),e2.Jq("bytes")])},SetComputeUnitLimit:{index:2,layout:e2.n_([e2.u8("instruction"),e2.Jq("units")])},SetComputeUnitPrice:{index:3,layout:e2.n_([e2.u8("instruction"),nj("microLamports")])}});class iB{constructor(){}static requestUnits(e){let t=iO.RequestUnits,n=nR(t,e);return new nk({keys:[],programId:this.programId,data:n})}static requestHeapFrame(e){let t=iO.RequestHeapFrame,n=nR(t,e);return new nk({keys:[],programId:this.programId,data:n})}static setComputeUnitLimit(e){let t=iO.SetComputeUnitLimit,n=nR(t,e);return new nk({keys:[],programId:this.programId,data:n})}static setComputeUnitPrice(e){let t=iO.SetComputeUnitPrice,n=nR(t,{microLamports:BigInt(e.microLamports)});return new nk({keys:[],programId:this.programId,data:n})}}iB.programId=new nn("ComputeBudget111111111111111111111111111111");let iM=e2.n_([e2.u8("numSignatures"),e2.u8("padding"),e2.KB("signatureOffset"),e2.KB("signatureInstructionIndex"),e2.KB("publicKeyOffset"),e2.KB("publicKeyInstructionIndex"),e2.KB("messageDataOffset"),e2.KB("messageDataSize"),e2.KB("messageInstructionIndex")]);class iR{constructor(){}static createInstructionWithPublicKey(e){let{publicKey:t,message:n,signature:r,instructionIndex:i}=e;np(32===t.length,`Public Key must be 32 bytes but received ${t.length} bytes`),np(64===r.length,`Signature must be 64 bytes but received ${r.length} bytes`);let o=iM.span,s=o+t.length,u=s+r.length,l=a.Buffer.alloc(u+n.length),c=null==i?65535:i;return iM.encode({numSignatures:1,padding:0,signatureOffset:s,signatureInstructionIndex:c,publicKeyOffset:o,publicKeyInstructionIndex:c,messageDataOffset:u,messageDataSize:n.length,messageInstructionIndex:c},l),l.fill(t,o),l.fill(r,s),l.fill(n,u),new nk({keys:[],programId:iR.programId,data:l})}static createInstructionWithPrivateKey(e){let{privateKey:t,message:n,instructionIndex:r}=e;np(64===t.length,`Private key must be 64 bytes but received ${t.length} bytes`);try{let e=iC.fromSecretKey(t),i=e.publicKey.toBytes(),o=t5(n,e.secretKey);return this.createInstructionWithPublicKey({publicKey:i,message:n,signature:o,instructionIndex:r})}catch(e){throw Error(`Error creating instruction; ${e}`)}}}iR.programId=new nn("Ed25519SigVerify111111111111111111111111111");let iL=(e,t)=>{let n=t2.sign(e,t);return[n.toCompactRawBytes(),n.recovery]};t2.utils.isValidPrivateKey;let iN=t2.getPublicKey,iD=e2.n_([e2.u8("numSignatures"),e2.KB("signatureOffset"),e2.u8("signatureInstructionIndex"),e2.KB("ethAddressOffset"),e2.u8("ethAddressInstructionIndex"),e2.KB("messageDataOffset"),e2.KB("messageDataSize"),e2.u8("messageInstructionIndex"),e2.Ik(20,"ethAddress"),e2.Ik(64,"signature"),e2.u8("recoveryId")]);class iF{constructor(){}static publicKeyToEthAddress(e){np(64===e.length,`Public key must be 64 bytes but received ${e.length} bytes`);try{return a.Buffer.from(tj(t9(e))).slice(-20)}catch(e){throw Error(`Error constructing Ethereum address: ${e}`)}}static createInstructionWithPublicKey(e){let{publicKey:t,message:n,signature:r,recoveryId:i,instructionIndex:o}=e;return iF.createInstructionWithEthAddress({ethAddress:iF.publicKeyToEthAddress(t),message:n,signature:r,recoveryId:i,instructionIndex:o})}static createInstructionWithEthAddress(e){let t;let{ethAddress:n,message:r,signature:i,recoveryId:o,instructionIndex:s=0}=e;np(20===(t="string"==typeof n?n.startsWith("0x")?a.Buffer.from(n.substr(2),"hex"):a.Buffer.from(n,"hex"):n).length,`Address must be 20 bytes but received ${t.length} bytes`);let u=12+t.length,l=u+i.length+1,c=a.Buffer.alloc(iD.span+r.length);return iD.encode({numSignatures:1,signatureOffset:u,signatureInstructionIndex:s,ethAddressOffset:12,ethAddressInstructionIndex:s,messageDataOffset:l,messageDataSize:r.length,messageInstructionIndex:s,signature:t9(i),ethAddress:t9(t),recoveryId:o},c),c.fill(t9(r),iD.span),new nk({keys:[],programId:iF.programId,data:c})}static createInstructionWithPrivateKey(e){let{privateKey:t,message:n,instructionIndex:r}=e;np(32===t.length,`Private key must be 32 bytes but received ${t.length} bytes`);try{let e=t9(t),i=iN(e,!1).slice(1),o=a.Buffer.from(tj(t9(n))),[s,u]=iL(o,e);return this.createInstructionWithPublicKey({publicKey:i,message:n,signature:s,recoveryId:u,instructionIndex:r})}catch(e){throw Error(`Error creating instruction; ${e}`)}}}iF.programId=new nn("KeccakSecp256k11111111111111111111111111111");let iq=new nn("StakeConfig11111111111111111111111111111111");class ij{constructor(e,t,n){this.unixTimestamp=void 0,this.epoch=void 0,this.custodian=void 0,this.unixTimestamp=e,this.epoch=t,this.custodian=n}}ij.default=new ij(0,0,nn.default);let iU=Object.freeze({Initialize:{index:0,layout:e2.n_([e2.Jq("instruction"),((e="authorized")=>e2.n_([ns("staker"),ns("withdrawer")],e))(),((e="lockup")=>e2.n_([e2.gM("unixTimestamp"),e2.gM("epoch"),ns("custodian")],e))()])},Authorize:{index:1,layout:e2.n_([e2.Jq("instruction"),ns("newAuthorized"),e2.Jq("stakeAuthorizationType")])},Delegate:{index:2,layout:e2.n_([e2.Jq("instruction")])},Split:{index:3,layout:e2.n_([e2.Jq("instruction"),e2.gM("lamports")])},Withdraw:{index:4,layout:e2.n_([e2.Jq("instruction"),e2.gM("lamports")])},Deactivate:{index:5,layout:e2.n_([e2.Jq("instruction")])},Merge:{index:7,layout:e2.n_([e2.Jq("instruction")])},AuthorizeWithSeed:{index:8,layout:e2.n_([e2.Jq("instruction"),ns("newAuthorized"),e2.Jq("stakeAuthorizationType"),nl("authoritySeed"),ns("authorityOwner")])}});Object.freeze({Staker:{index:0},Withdrawer:{index:1}});class iz{constructor(){}static initialize(e){let{stakePubkey:t,authorized:n,lockup:r}=e,i=r||ij.default,o=iU.Initialize,a=nR(o,{authorized:{staker:t9(n.staker.toBuffer()),withdrawer:t9(n.withdrawer.toBuffer())},lockup:{unixTimestamp:i.unixTimestamp,epoch:i.epoch,custodian:t9(i.custodian.toBuffer())}}),s={keys:[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:nE,isSigner:!1,isWritable:!1}],programId:this.programId,data:a};return new nk(s)}static createAccountWithSeed(e){let t=new nx;t.add(nz.createAccountWithSeed({fromPubkey:e.fromPubkey,newAccountPubkey:e.stakePubkey,basePubkey:e.basePubkey,seed:e.seed,lamports:e.lamports,space:this.space,programId:this.programId}));let{stakePubkey:n,authorized:r,lockup:i}=e;return t.add(this.initialize({stakePubkey:n,authorized:r,lockup:i}))}static createAccount(e){let t=new nx;t.add(nz.createAccount({fromPubkey:e.fromPubkey,newAccountPubkey:e.stakePubkey,lamports:e.lamports,space:this.space,programId:this.programId}));let{stakePubkey:n,authorized:r,lockup:i}=e;return t.add(this.initialize({stakePubkey:n,authorized:r,lockup:i}))}static delegate(e){let{stakePubkey:t,authorizedPubkey:n,votePubkey:r}=e,i=iU.Delegate,o=nR(i);return new nx().add({keys:[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!1,isWritable:!1},{pubkey:nI,isSigner:!1,isWritable:!1},{pubkey:nP,isSigner:!1,isWritable:!1},{pubkey:iq,isSigner:!1,isWritable:!1},{pubkey:n,isSigner:!0,isWritable:!1}],programId:this.programId,data:o})}static authorize(e){let{stakePubkey:t,authorizedPubkey:n,newAuthorizedPubkey:r,stakeAuthorizationType:i,custodianPubkey:o}=e,a=iU.Authorize,s=nR(a,{newAuthorized:t9(r.toBuffer()),stakeAuthorizationType:i.index}),u=[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:nI,isSigner:!1,isWritable:!0},{pubkey:n,isSigner:!0,isWritable:!1}];return o&&u.push({pubkey:o,isSigner:!0,isWritable:!1}),new nx().add({keys:u,programId:this.programId,data:s})}static authorizeWithSeed(e){let{stakePubkey:t,authorityBase:n,authoritySeed:r,authorityOwner:i,newAuthorizedPubkey:o,stakeAuthorizationType:a,custodianPubkey:s}=e,u=iU.AuthorizeWithSeed,l=nR(u,{newAuthorized:t9(o.toBuffer()),stakeAuthorizationType:a.index,authoritySeed:r,authorityOwner:t9(i.toBuffer())}),c=[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:n,isSigner:!0,isWritable:!1},{pubkey:nI,isSigner:!1,isWritable:!1}];return s&&c.push({pubkey:s,isSigner:!0,isWritable:!1}),new nx().add({keys:c,programId:this.programId,data:l})}static splitInstruction(e){let{stakePubkey:t,authorizedPubkey:n,splitStakePubkey:r,lamports:i}=e,o=iU.Split,a=nR(o,{lamports:i});return new nk({keys:[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!1,isWritable:!0},{pubkey:n,isSigner:!0,isWritable:!1}],programId:this.programId,data:a})}static split(e,t){let n=new nx;return n.add(nz.createAccount({fromPubkey:e.authorizedPubkey,newAccountPubkey:e.splitStakePubkey,lamports:t,space:this.space,programId:this.programId})),n.add(this.splitInstruction(e))}static splitWithSeed(e,t){let{stakePubkey:n,authorizedPubkey:r,splitStakePubkey:i,basePubkey:o,seed:a,lamports:s}=e,u=new nx;return u.add(nz.allocate({accountPubkey:i,basePubkey:o,seed:a,space:this.space,programId:this.programId})),t&&t>0&&u.add(nz.transfer({fromPubkey:e.authorizedPubkey,toPubkey:i,lamports:t})),u.add(this.splitInstruction({stakePubkey:n,authorizedPubkey:r,splitStakePubkey:i,lamports:s}))}static merge(e){let{stakePubkey:t,sourceStakePubKey:n,authorizedPubkey:r}=e,i=iU.Merge,o=nR(i);return new nx().add({keys:[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:nI,isSigner:!1,isWritable:!1},{pubkey:nP,isSigner:!1,isWritable:!1},{pubkey:r,isSigner:!0,isWritable:!1}],programId:this.programId,data:o})}static withdraw(e){let{stakePubkey:t,authorizedPubkey:n,toPubkey:r,lamports:i,custodianPubkey:o}=e,a=iU.Withdraw,s=nR(a,{lamports:i}),u=[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!1,isWritable:!0},{pubkey:nI,isSigner:!1,isWritable:!1},{pubkey:nP,isSigner:!1,isWritable:!1},{pubkey:n,isSigner:!0,isWritable:!1}];return o&&u.push({pubkey:o,isSigner:!0,isWritable:!1}),new nx().add({keys:u,programId:this.programId,data:s})}static deactivate(e){let{stakePubkey:t,authorizedPubkey:n}=e,r=iU.Deactivate,i=nR(r);return new nx().add({keys:[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:nI,isSigner:!1,isWritable:!1},{pubkey:n,isSigner:!0,isWritable:!1}],programId:this.programId,data:i})}}iz.programId=new nn("Stake11111111111111111111111111111111111111"),iz.space=200;let iV=Object.freeze({InitializeAccount:{index:0,layout:e2.n_([e2.Jq("instruction"),((e="voteInit")=>e2.n_([ns("nodePubkey"),ns("authorizedVoter"),ns("authorizedWithdrawer"),e2.u8("commission")],e))()])},Authorize:{index:1,layout:e2.n_([e2.Jq("instruction"),ns("newAuthorized"),e2.Jq("voteAuthorizationType")])},Withdraw:{index:3,layout:e2.n_([e2.Jq("instruction"),e2.gM("lamports")])},UpdateValidatorIdentity:{index:4,layout:e2.n_([e2.Jq("instruction")])},AuthorizeWithSeed:{index:10,layout:e2.n_([e2.Jq("instruction"),((e="voteAuthorizeWithSeedArgs")=>e2.n_([e2.Jq("voteAuthorizationType"),ns("currentAuthorityDerivedKeyOwnerPubkey"),nl("currentAuthorityDerivedKeySeed"),ns("newAuthorized")],e))()])}});Object.freeze({Voter:{index:0},Withdrawer:{index:1}});class iW{constructor(){}static initializeAccount(e){let{votePubkey:t,nodePubkey:n,voteInit:r}=e,i=iV.InitializeAccount,o=nR(i,{voteInit:{nodePubkey:t9(r.nodePubkey.toBuffer()),authorizedVoter:t9(r.authorizedVoter.toBuffer()),authorizedWithdrawer:t9(r.authorizedWithdrawer.toBuffer()),commission:r.commission}}),a={keys:[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:nE,isSigner:!1,isWritable:!1},{pubkey:nI,isSigner:!1,isWritable:!1},{pubkey:n,isSigner:!0,isWritable:!1}],programId:this.programId,data:o};return new nk(a)}static createAccount(e){let t=new nx;return t.add(nz.createAccount({fromPubkey:e.fromPubkey,newAccountPubkey:e.votePubkey,lamports:e.lamports,space:this.space,programId:this.programId})),t.add(this.initializeAccount({votePubkey:e.votePubkey,nodePubkey:e.voteInit.nodePubkey,voteInit:e.voteInit}))}static authorize(e){let{votePubkey:t,authorizedPubkey:n,newAuthorizedPubkey:r,voteAuthorizationType:i}=e,o=iV.Authorize,a=nR(o,{newAuthorized:t9(r.toBuffer()),voteAuthorizationType:i.index});return new nx().add({keys:[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:nI,isSigner:!1,isWritable:!1},{pubkey:n,isSigner:!0,isWritable:!1}],programId:this.programId,data:a})}static authorizeWithSeed(e){let{currentAuthorityDerivedKeyBasePubkey:t,currentAuthorityDerivedKeyOwnerPubkey:n,currentAuthorityDerivedKeySeed:r,newAuthorizedPubkey:i,voteAuthorizationType:o,votePubkey:a}=e,s=iV.AuthorizeWithSeed,u=nR(s,{voteAuthorizeWithSeedArgs:{currentAuthorityDerivedKeyOwnerPubkey:t9(n.toBuffer()),currentAuthorityDerivedKeySeed:r,newAuthorized:t9(i.toBuffer()),voteAuthorizationType:o.index}});return new nx().add({keys:[{pubkey:a,isSigner:!1,isWritable:!0},{pubkey:nI,isSigner:!1,isWritable:!1},{pubkey:t,isSigner:!0,isWritable:!1}],programId:this.programId,data:u})}static withdraw(e){let{votePubkey:t,authorizedWithdrawerPubkey:n,lamports:r,toPubkey:i}=e,o=iV.Withdraw,a=nR(o,{lamports:r});return new nx().add({keys:[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:i,isSigner:!1,isWritable:!0},{pubkey:n,isSigner:!0,isWritable:!1}],programId:this.programId,data:a})}static safeWithdraw(e,t,n){if(e.lamports>t-n)throw Error("Withdraw will leave vote account with insufficient funds.");return iW.withdraw(e)}static updateValidatorIdentity(e){let{votePubkey:t,authorizedWithdrawerPubkey:n,nodePubkey:r}=e,i=iV.UpdateValidatorIdentity,o=nR(i);return new nx().add({keys:[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!0,isWritable:!1},{pubkey:n,isSigner:!0,isWritable:!1}],programId:this.programId,data:o})}}iW.programId=new nn("Vote111111111111111111111111111111111111111"),iW.space=3762,new nn("Va1idator1nfo111111111111111111111111111111"),tm({name:tf(),website:td(tf()),details:td(tf()),iconUrl:td(tf()),keybaseUsername:td(tf())}),new nn("Vote111111111111111111111111111111111111111"),e2.n_([ns("nodePubkey"),ns("authorizedWithdrawer"),e2.u8("commission"),e2._O(),e2.A9(e2.n_([e2._O("slot"),e2.Jq("confirmationCount")]),e2.cv(e2.Jq(),-8),"votes"),e2.u8("rootSlotValid"),e2._O("rootSlot"),e2._O(),e2.A9(e2.n_([e2._O("epoch"),ns("authorizedVoter")]),e2.cv(e2.Jq(),-8),"authorizedVoters"),e2.n_([e2.A9(e2.n_([ns("authorizedPubkey"),e2._O("epochOfLastAuthorizedSwitch"),e2._O("targetEpoch")]),32,"buf"),e2._O("idx"),e2.u8("isEmpty")],"priorVoters"),e2._O(),e2.A9(e2.n_([e2._O("epoch"),e2._O("credits"),e2._O("prevCredits")]),e2.cv(e2.Jq(),-8),"epochCredits"),e2.n_([e2._O("slot"),e2._O("timestamp")],"lastTimestamp")]);let i$={http:{devnet:"http://api.devnet.solana.com",testnet:"http://api.testnet.solana.com","mainnet-beta":"http://api.mainnet-beta.solana.com/"},https:{devnet:"https://api.devnet.solana.com",testnet:"https://api.testnet.solana.com","mainnet-beta":"https://api.mainnet-beta.solana.com/"}};function iK(e,t){let n=!1===t?"http":"https";if(!e)return i$[n].devnet;let r=i$[n][e];if(!r)throw Error(`Unknown ${n} cluster: ${e}`);return r}},10011:function(e,t,n){var r=n(58162);e.exports=r("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},36971:function(e,t,n){"use strict";function r(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}n.d(t,{_:function(){return r}})},98260:function(e,t,n){"use strict";n.d(t,{Bz:function(){return j},WU:function(){return en},YL:function(){return p},Yp:function(){return J},_b:function(){return ec},a_:function(){return s},cW:function(){return eo},fr:function(){return ei},gG:function(){return Y},iA:function(){return $},ih:function(){return H},qn:function(){return ee},tA:function(){return X}});var r,i,o,a,s,u,l,c,d,p,f,h,m,g=n(39499),y=n.n(g),b=n(92600),_=n(29887),v=n.n(_),w=n(93302),k=n.n(w),x=n(12447),A=n.n(x),S=n(6731),I=n(19485),T=n(16441),E=n(38197),P=n(29251);function C(e,t){for(var n=0;n0||(0,b.Z)(!1),U.set({precision:e+1,rounding:V[n]});var r=new U(this.numerator.toString()).div(this.denominator.toString()).toSignificantDigits(e);return r.toFormat(r.decimalPlaces(),t)},t.toFixed=function(e,t,n){return void 0===t&&(t={groupSeparator:""}),void 0===n&&(n=f.ROUND_HALF_UP),Number.isInteger(e)||(0,b.Z)(!1),e>=0||(0,b.Z)(!1),z.DP=e,z.RM=W[n],new z(this.numerator.toString()).div(this.denominator.toString()).toFormat(e,t)},O(e,[{key:"quotient",get:function(){return y().divide(this.numerator,this.denominator)}},{key:"remainder",get:function(){return new e(y().remainder(this.numerator,this.denominator),this.denominator)}},{key:"asFraction",get:function(){return new e(this.numerator,this.denominator)}}]),e}(),K=A()(k()),H=function(e){function t(t,n,r){var i;return i=e.call(this,n,r)||this,y().lessThanOrEqual(i.quotient,j)||(0,b.Z)(!1),i.currency=t,i.decimalScale=y().exponentiate(y().BigInt(10),y().BigInt(t.decimals)),i}M(t,e),t.fromRawAmount=function(e,n){return new t(e,n)},t.fromFractionalAmount=function(e,n,r){return new t(e,n,r)};var n=t.prototype;return n.add=function(n){this.currency.equals(n.currency)||(0,b.Z)(!1);var r=e.prototype.add.call(this,n);return t.fromFractionalAmount(this.currency,r.numerator,r.denominator)},n.subtract=function(n){this.currency.equals(n.currency)||(0,b.Z)(!1);var r=e.prototype.subtract.call(this,n);return t.fromFractionalAmount(this.currency,r.numerator,r.denominator)},n.multiply=function(n){var r=e.prototype.multiply.call(this,n);return t.fromFractionalAmount(this.currency,r.numerator,r.denominator)},n.divide=function(n){var r=e.prototype.divide.call(this,n);return t.fromFractionalAmount(this.currency,r.numerator,r.denominator)},n.toSignificant=function(t,n,r){return void 0===t&&(t=6),void 0===r&&(r=f.ROUND_DOWN),e.prototype.divide.call(this,this.decimalScale).toSignificant(t,n,r)},n.toFixed=function(t,n,r){return void 0===t&&(t=this.currency.decimals),void 0===r&&(r=f.ROUND_DOWN),t<=this.currency.decimals||(0,b.Z)(!1),e.prototype.divide.call(this,this.decimalScale).toFixed(t,n,r)},n.toExact=function(e){return void 0===e&&(e={groupSeparator:""}),K.DP=this.currency.decimals,new K(this.quotient.toString()).div(this.decimalScale.toString()).toFormat(e)},O(t,[{key:"wrapped",get:function(){return this.currency.isToken?this:t.fromFractionalAmount(this.currency.wrapped,this.numerator,this.denominator)}}]),t}($),G=new $(y().BigInt(100));function Z(e){return new Y(e.numerator,e.denominator)}var Y=function(e){function t(){var t;return t=e.apply(this,arguments)||this,t.isPercent=!0,t}M(t,e);var n=t.prototype;return n.add=function(t){return Z(e.prototype.add.call(this,t))},n.subtract=function(t){return Z(e.prototype.subtract.call(this,t))},n.multiply=function(t){return Z(e.prototype.multiply.call(this,t))},n.divide=function(t){return Z(e.prototype.divide.call(this,t))},n.toSignificant=function(t,n,r){return void 0===t&&(t=5),e.prototype.multiply.call(this,G).toSignificant(t,n,r)},n.toFixed=function(t,n,r){return void 0===t&&(t=2),e.prototype.multiply.call(this,G).toFixed(t,n,r)},t}($),X=function(e){function t(){for(var t,n,r,i,o,a=arguments.length,s=Array(a),u=0;u=0&&t<255&&Number.isInteger(t)||(0,b.Z)(!1),this.chainId=e,this.decimals=t,this.symbol=n,this.name=r},J=function(e){function t(){var t;return t=e.apply(this,arguments)||this,t.isNative=!0,t.isToken=!1,t}return M(t,e),t}(Q);function ee(e){try{return(0,I.Kn)(e)}catch(t){throw Error(e+" is not a valid address.")}}var et=/^0x[0-9a-fA-F]{40}$/,en=function(e){function t(t,n,r,i,o,a,s,u){var l;return(l=e.call(this,t,r,i,o)||this).isNative=!1,l.isToken=!0,a?l.address=function(e){if(et.test(e))return e;throw Error(e+" is not a valid address.")}(n):l.address=ee(n),s&&(s.gte(S.O$.from(0))||(0,b.Z)(!1)),u&&(u.gte(S.O$.from(0))||(0,b.Z)(!1)),l.buyFeeBps=s,l.sellFeeBps=u,l}M(t,e);var n=t.prototype;return n.equals=function(e){return e.isToken&&this.chainId===e.chainId&&this.address.toLowerCase()===e.address.toLowerCase()},n.sortsBefore=function(e){return this.chainId!==e.chainId&&(0,b.Z)(!1),this.address.toLowerCase()!==e.address.toLowerCase()||(0,b.Z)(!1),this.address.toLowerCase()0||(0,b.Z)(!1),e.length<=n||(0,b.Z)(!1),0===e.length)return e.push(t),null;var i=e.length===n;if(i&&0>=r(e[e.length-1],t))return t;for(var o=0,a=e.length;o>>1;0>=r(e[s],t)?o=s+1:a=s}return e.splice(o,0,t),i?e.pop():null}(function(e){function t(t){return e.call(this,t,18,"ETH","Ether")||this}return M(t,e),t.onChain=function(e){var n;return null!=(n=this._etherCache[e])?n:this._etherCache[e]=new t(e)},t.prototype.equals=function(e){return e.isNative&&e.chainId===this.chainId},O(t,[{key:"wrapped",get:function(){var e=er[this.chainId];return e||(0,b.Z)(!1),e}}]),t})(J)._etherCache={};var ea=y().BigInt(Number.MAX_SAFE_INTEGER),es=y().BigInt(0),eu=y().BigInt(1),el=y().BigInt(2);function ec(e){var t,n;if(y().greaterThanOrEqual(e,es)||(0,b.Z)(!1),y().lessThan(e,ea))return y().BigInt(Math.floor(Math.sqrt(y().toNumber(e))));for(t=e,n=y().add(y().divide(e,el),eu);y().lessThan(n,t);)t=n,n=y().divide(y().add(y().divide(e,n),n),el);return t}},145:function(e,t,n){"use strict";n.d(t,{lk:function(){return o},cK:function(){return eM},Kg:function(){return ew},Ly:function(){return ek},AW:function(){return ex},wh:function(){return eR},cH:function(){return eN},pk:function(){return ei},ho:function(){return eS},d_:function(){return K},Gp:function(){return em},Vm:function(){return ey},zz:function(){return eg},_s:function(){return el}});var r,i,o,a=n(98260),s=n(39499),u=n.n(s),l=n(92600),c=n(84243),d=n(8198),p=n(19485),f=n(6731),h=n(16441),m=n(38197),g=n(29251),y=n(1581);let b=RegExp("^bytes([0-9]+)$"),_=RegExp("^(u?int)([0-9]*)$"),v=RegExp("^(.*)\\[([0-9]*)\\]$"),w=new y.Yd("solidity/5.7.0");function k(e,t){e.length!=t.length&&w.throwArgumentError("wrong number of values; expected ${ types.length }","values",t);let n=[];return e.forEach(function(e,r){n.push(function e(t,n,r){switch(t){case"address":if(r)return(0,h.Bu)(n,32);return(0,h.lE)(n);case"string":return(0,g.Y0)(n);case"bytes":return(0,h.lE)(n);case"bool":if(n=n?"0x01":"0x00",r)return(0,h.Bu)(n,32);return(0,h.lE)(n)}let i=t.match(_);if(i){let e=parseInt(i[2]||"256");return(i[2]&&String(e)!==i[2]||e%8!=0||0===e||e>256)&&w.throwArgumentError("invalid number type","type",t),r&&(e=256),n=f.O$.from(n).toTwos(e),(0,h.Bu)(n,e/8)}if(i=t.match(b)){let e=parseInt(i[1]);return((String(e)!==i[1]||0===e||e>32)&&w.throwArgumentError("invalid bytes type","type",t),(0,h.lE)(n).byteLength!==e&&w.throwArgumentError(`invalid value for ${t}`,"value",n),r)?(0,h.lE)((n+"0000000000000000000000000000000000000000000000000000000000000000").substring(0,66)):n}if((i=t.match(v))&&Array.isArray(n)){let r=i[1],o=parseInt(i[2]||String(n.length));o!=n.length&&w.throwArgumentError(`invalid array length for ${t}`,"value",n);let a=[];return n.forEach(function(t){a.push(e(r,t,!0))}),(0,h.zo)(a)}return w.throwArgumentError("invalid type","type",t)}(e,t[r]))}),(0,h.Dv)((0,h.zo)(n))}var x=JSON.parse('{"Mt":[{"inputs":[{"internalType":"bytes[]","name":"data","type":"bytes[]"}],"name":"multicall","outputs":[{"internalType":"bytes[]","name":"results","type":"bytes[]"}],"stateMutability":"payable","type":"function"}]}'),A=JSON.parse('{"Mt":[{"inputs":[{"internalType":"address","name":"_factory","type":"address"},{"internalType":"address","name":"_WETH9","type":"address"},{"internalType":"address","name":"_tokenDescriptor_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount0","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1","type":"uint256"}],"name":"Collect","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint128","name":"liquidity","type":"uint128"},{"indexed":false,"internalType":"uint256","name":"amount0","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1","type":"uint256"}],"name":"DecreaseLiquidity","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint128","name":"liquidity","type":"uint128"},{"indexed":false,"internalType":"uint256","name":"amount0","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1","type":"uint256"}],"name":"IncreaseLiquidity","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PERMIT_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WETH9","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint128","name":"amount0Max","type":"uint128"},{"internalType":"uint128","name":"amount1Max","type":"uint128"}],"internalType":"struct INonfungiblePositionManager.CollectParams","name":"params","type":"tuple"}],"name":"collect","outputs":[{"internalType":"uint256","name":"amount0","type":"uint256"},{"internalType":"uint256","name":"amount1","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"token0","type":"address"},{"internalType":"address","name":"token1","type":"address"},{"internalType":"uint24","name":"fee","type":"uint24"},{"internalType":"uint160","name":"sqrtPriceX96","type":"uint160"}],"name":"createAndInitializePoolIfNecessary","outputs":[{"internalType":"address","name":"pool","type":"address"}],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint128","name":"liquidity","type":"uint128"},{"internalType":"uint256","name":"amount0Min","type":"uint256"},{"internalType":"uint256","name":"amount1Min","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"internalType":"struct INonfungiblePositionManager.DecreaseLiquidityParams","name":"params","type":"tuple"}],"name":"decreaseLiquidity","outputs":[{"internalType":"uint256","name":"amount0","type":"uint256"},{"internalType":"uint256","name":"amount1","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"factory","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"amount0Desired","type":"uint256"},{"internalType":"uint256","name":"amount1Desired","type":"uint256"},{"internalType":"uint256","name":"amount0Min","type":"uint256"},{"internalType":"uint256","name":"amount1Min","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"internalType":"struct INonfungiblePositionManager.IncreaseLiquidityParams","name":"params","type":"tuple"}],"name":"increaseLiquidity","outputs":[{"internalType":"uint128","name":"liquidity","type":"uint128"},{"internalType":"uint256","name":"amount0","type":"uint256"},{"internalType":"uint256","name":"amount1","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"token0","type":"address"},{"internalType":"address","name":"token1","type":"address"},{"internalType":"uint24","name":"fee","type":"uint24"},{"internalType":"int24","name":"tickLower","type":"int24"},{"internalType":"int24","name":"tickUpper","type":"int24"},{"internalType":"uint256","name":"amount0Desired","type":"uint256"},{"internalType":"uint256","name":"amount1Desired","type":"uint256"},{"internalType":"uint256","name":"amount0Min","type":"uint256"},{"internalType":"uint256","name":"amount1Min","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"internalType":"struct INonfungiblePositionManager.MintParams","name":"params","type":"tuple"}],"name":"mint","outputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint128","name":"liquidity","type":"uint128"},{"internalType":"uint256","name":"amount0","type":"uint256"},{"internalType":"uint256","name":"amount1","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes[]","name":"data","type":"bytes[]"}],"name":"multicall","outputs":[{"internalType":"bytes[]","name":"results","type":"bytes[]"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"permit","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"positions","outputs":[{"internalType":"uint96","name":"nonce","type":"uint96"},{"internalType":"address","name":"operator","type":"address"},{"internalType":"address","name":"token0","type":"address"},{"internalType":"address","name":"token1","type":"address"},{"internalType":"uint24","name":"fee","type":"uint24"},{"internalType":"int24","name":"tickLower","type":"int24"},{"internalType":"int24","name":"tickUpper","type":"int24"},{"internalType":"uint128","name":"liquidity","type":"uint128"},{"internalType":"uint256","name":"feeGrowthInside0LastX128","type":"uint256"},{"internalType":"uint256","name":"feeGrowthInside1LastX128","type":"uint256"},{"internalType":"uint128","name":"tokensOwed0","type":"uint128"},{"internalType":"uint128","name":"tokensOwed1","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"refundETH","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"selfPermit","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"expiry","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"selfPermitAllowed","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"expiry","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"selfPermitAllowedIfNecessary","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"selfPermitIfNecessary","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amountMinimum","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"}],"name":"sweepToken","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount0Owed","type":"uint256"},{"internalType":"uint256","name":"amount1Owed","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"uniswapV3MintCallback","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountMinimum","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"}],"name":"unwrapWETH9","outputs":[],"stateMutability":"payable","type":"function"},{"stateMutability":"payable","type":"receive"}]}'),S=JSON.parse('{"Mt":[{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"selfPermit","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"expiry","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"selfPermitAllowed","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"expiry","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"selfPermitAllowedIfNecessary","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"selfPermitIfNecessary","outputs":[],"stateMutability":"payable","type":"function"}]}'),I=JSON.parse('{"Mt":[{"inputs":[],"name":"refundETH","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amountMinimum","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"}],"name":"sweepToken","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amountMinimum","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"feeBips","type":"uint256"},{"internalType":"address","name":"feeRecipient","type":"address"}],"name":"sweepTokenWithFee","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountMinimum","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"}],"name":"unwrapWETH9","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountMinimum","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"feeBips","type":"uint256"},{"internalType":"address","name":"feeRecipient","type":"address"}],"name":"unwrapWETH9WithFee","outputs":[],"stateMutability":"payable","type":"function"}]}'),T=JSON.parse('{"Mt":[{"inputs":[{"internalType":"address","name":"_factory","type":"address"},{"internalType":"address","name":"_WETH9","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"WETH9","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"factory","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"path","type":"bytes"},{"internalType":"uint256","name":"amountIn","type":"uint256"}],"name":"quoteExactInput","outputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"address","name":"tokenOut","type":"address"},{"internalType":"uint24","name":"fee","type":"uint24"},{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint160","name":"sqrtPriceLimitX96","type":"uint160"}],"name":"quoteExactInputSingle","outputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"path","type":"bytes"},{"internalType":"uint256","name":"amountOut","type":"uint256"}],"name":"quoteExactOutput","outputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"address","name":"tokenOut","type":"address"},{"internalType":"uint24","name":"fee","type":"uint24"},{"internalType":"uint256","name":"amountOut","type":"uint256"},{"internalType":"uint160","name":"sqrtPriceLimitX96","type":"uint160"}],"name":"quoteExactOutputSingle","outputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"int256","name":"amount0Delta","type":"int256"},{"internalType":"int256","name":"amount1Delta","type":"int256"},{"internalType":"bytes","name":"path","type":"bytes"}],"name":"uniswapV3SwapCallback","outputs":[],"stateMutability":"view","type":"function"}]}'),E=JSON.parse('{"Mt":[{"inputs":[{"internalType":"address","name":"_factory","type":"address"},{"internalType":"address","name":"_WETH9","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"WETH9","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"factory","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"path","type":"bytes"},{"internalType":"uint256","name":"amountIn","type":"uint256"}],"name":"quoteExactInput","outputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"},{"internalType":"uint160[]","name":"sqrtPriceX96AfterList","type":"uint160[]"},{"internalType":"uint32[]","name":"initializedTicksCrossedList","type":"uint32[]"},{"internalType":"uint256","name":"gasEstimate","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"address","name":"tokenOut","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint24","name":"fee","type":"uint24"},{"internalType":"uint160","name":"sqrtPriceLimitX96","type":"uint160"}],"internalType":"struct IQuoterV2.QuoteExactInputSingleParams","name":"params","type":"tuple"}],"name":"quoteExactInputSingle","outputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"},{"internalType":"uint160","name":"sqrtPriceX96After","type":"uint160"},{"internalType":"uint32","name":"initializedTicksCrossed","type":"uint32"},{"internalType":"uint256","name":"gasEstimate","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"path","type":"bytes"},{"internalType":"uint256","name":"amountOut","type":"uint256"}],"name":"quoteExactOutput","outputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint160[]","name":"sqrtPriceX96AfterList","type":"uint160[]"},{"internalType":"uint32[]","name":"initializedTicksCrossedList","type":"uint32[]"},{"internalType":"uint256","name":"gasEstimate","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"address","name":"tokenOut","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint24","name":"fee","type":"uint24"},{"internalType":"uint160","name":"sqrtPriceLimitX96","type":"uint160"}],"internalType":"struct IQuoterV2.QuoteExactOutputSingleParams","name":"params","type":"tuple"}],"name":"quoteExactOutputSingle","outputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint160","name":"sqrtPriceX96After","type":"uint160"},{"internalType":"uint32","name":"initializedTicksCrossed","type":"uint32"},{"internalType":"uint256","name":"gasEstimate","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"int256","name":"amount0Delta","type":"int256"},{"internalType":"int256","name":"amount1Delta","type":"int256"},{"internalType":"bytes","name":"path","type":"bytes"}],"name":"uniswapV3SwapCallback","outputs":[],"stateMutability":"view","type":"function"}]}'),P=JSON.parse('{"Mt":[{"inputs":[{"internalType":"contract IUniswapV3Factory","name":"_factory","type":"address"},{"internalType":"contract INonfungiblePositionManager","name":"_nonfungiblePositionManager","type":"address"},{"internalType":"uint256","name":"_maxIncentiveStartLeadTime","type":"uint256"},{"internalType":"uint256","name":"_maxIncentiveDuration","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"oldOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"DepositTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract IERC20Minimal","name":"rewardToken","type":"address"},{"indexed":true,"internalType":"contract IUniswapV3Pool","name":"pool","type":"address"},{"indexed":false,"internalType":"uint256","name":"startTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"endTime","type":"uint256"},{"indexed":false,"internalType":"address","name":"refundee","type":"address"},{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"IncentiveCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"incentiveId","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"refund","type":"uint256"}],"name":"IncentiveEnded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"RewardClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"bytes32","name":"incentiveId","type":"bytes32"},{"indexed":false,"internalType":"uint128","name":"liquidity","type":"uint128"}],"name":"TokenStaked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"bytes32","name":"incentiveId","type":"bytes32"}],"name":"TokenUnstaked","type":"event"},{"inputs":[{"internalType":"contract IERC20Minimal","name":"rewardToken","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amountRequested","type":"uint256"}],"name":"claimReward","outputs":[{"internalType":"uint256","name":"reward","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"contract IERC20Minimal","name":"rewardToken","type":"address"},{"internalType":"contract IUniswapV3Pool","name":"pool","type":"address"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"address","name":"refundee","type":"address"}],"internalType":"struct IUniswapV3Staker.IncentiveKey","name":"key","type":"tuple"},{"internalType":"uint256","name":"reward","type":"uint256"}],"name":"createIncentive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"deposits","outputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint48","name":"numberOfStakes","type":"uint48"},{"internalType":"int24","name":"tickLower","type":"int24"},{"internalType":"int24","name":"tickUpper","type":"int24"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"contract IERC20Minimal","name":"rewardToken","type":"address"},{"internalType":"contract IUniswapV3Pool","name":"pool","type":"address"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"address","name":"refundee","type":"address"}],"internalType":"struct IUniswapV3Staker.IncentiveKey","name":"key","type":"tuple"}],"name":"endIncentive","outputs":[{"internalType":"uint256","name":"refund","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"factory","outputs":[{"internalType":"contract IUniswapV3Factory","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"contract IERC20Minimal","name":"rewardToken","type":"address"},{"internalType":"contract IUniswapV3Pool","name":"pool","type":"address"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"address","name":"refundee","type":"address"}],"internalType":"struct IUniswapV3Staker.IncentiveKey","name":"key","type":"tuple"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getRewardInfo","outputs":[{"internalType":"uint256","name":"reward","type":"uint256"},{"internalType":"uint160","name":"secondsInsideX128","type":"uint160"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"incentives","outputs":[{"internalType":"uint256","name":"totalRewardUnclaimed","type":"uint256"},{"internalType":"uint160","name":"totalSecondsClaimedX128","type":"uint160"},{"internalType":"uint96","name":"numberOfStakes","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxIncentiveDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxIncentiveStartLeadTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes[]","name":"data","type":"bytes[]"}],"name":"multicall","outputs":[{"internalType":"bytes[]","name":"results","type":"bytes[]"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"nonfungiblePositionManager","outputs":[{"internalType":"contract INonfungiblePositionManager","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20Minimal","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"rewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"contract IERC20Minimal","name":"rewardToken","type":"address"},{"internalType":"contract IUniswapV3Pool","name":"pool","type":"address"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"address","name":"refundee","type":"address"}],"internalType":"struct IUniswapV3Staker.IncentiveKey","name":"key","type":"tuple"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"stakeToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes32","name":"incentiveId","type":"bytes32"}],"name":"stakes","outputs":[{"internalType":"uint160","name":"secondsPerLiquidityInsideInitialX128","type":"uint160"},{"internalType":"uint128","name":"liquidity","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"to","type":"address"}],"name":"transferDeposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"contract IERC20Minimal","name":"rewardToken","type":"address"},{"internalType":"contract IUniswapV3Pool","name":"pool","type":"address"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"address","name":"refundee","type":"address"}],"internalType":"struct IUniswapV3Staker.IncentiveKey","name":"key","type":"tuple"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"unstakeToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"withdrawToken","outputs":[],"stateMutability":"nonpayable","type":"function"}]}'),C=JSON.parse('{"Mt":[{"inputs":[{"internalType":"address","name":"_factory","type":"address"},{"internalType":"address","name":"_WETH9","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"WETH9","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"bytes","name":"path","type":"bytes"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountOutMinimum","type":"uint256"}],"internalType":"struct ISwapRouter.ExactInputParams","name":"params","type":"tuple"}],"name":"exactInput","outputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"address","name":"tokenOut","type":"address"},{"internalType":"uint24","name":"fee","type":"uint24"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountOutMinimum","type":"uint256"},{"internalType":"uint160","name":"sqrtPriceLimitX96","type":"uint160"}],"internalType":"struct ISwapRouter.ExactInputSingleParams","name":"params","type":"tuple"}],"name":"exactInputSingle","outputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"internalType":"bytes","name":"path","type":"bytes"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint256","name":"amountOut","type":"uint256"},{"internalType":"uint256","name":"amountInMaximum","type":"uint256"}],"internalType":"struct ISwapRouter.ExactOutputParams","name":"params","type":"tuple"}],"name":"exactOutput","outputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"address","name":"tokenOut","type":"address"},{"internalType":"uint24","name":"fee","type":"uint24"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint256","name":"amountOut","type":"uint256"},{"internalType":"uint256","name":"amountInMaximum","type":"uint256"},{"internalType":"uint160","name":"sqrtPriceLimitX96","type":"uint160"}],"internalType":"struct ISwapRouter.ExactOutputSingleParams","name":"params","type":"tuple"}],"name":"exactOutputSingle","outputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"factory","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes[]","name":"data","type":"bytes[]"}],"name":"multicall","outputs":[{"internalType":"bytes[]","name":"results","type":"bytes[]"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"refundETH","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"selfPermit","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"expiry","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"selfPermitAllowed","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"expiry","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"selfPermitAllowedIfNecessary","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"selfPermitIfNecessary","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amountMinimum","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"}],"name":"sweepToken","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amountMinimum","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"feeBips","type":"uint256"},{"internalType":"address","name":"feeRecipient","type":"address"}],"name":"sweepTokenWithFee","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"int256","name":"amount0Delta","type":"int256"},{"internalType":"int256","name":"amount1Delta","type":"int256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"uniswapV3SwapCallback","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountMinimum","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"}],"name":"unwrapWETH9","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountMinimum","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"feeBips","type":"uint256"},{"internalType":"address","name":"feeRecipient","type":"address"}],"name":"unwrapWETH9WithFee","outputs":[],"stateMutability":"payable","type":"function"},{"stateMutability":"payable","type":"receive"}]}');function O(){O=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function c(t,n,r,o){var a,s,u=Object.create((n&&n.prototype instanceof g?n:g).prototype);return i(u,"_invoke",{value:(a=new T(o||[]),s=p,function(n,i){if(s===f)throw Error("Generator is already running");if(s===h){if("throw"===n)throw i;return{value:e,done:!0}}for(a.method=n,a.arg=i;;){var o=a.delegate;if(o){var u=function t(n,r){var i=r.method,o=n.iterator[i];if(o===e)return r.delegate=null,"throw"===i&&n.iterator.return&&(r.method="return",r.arg=e,t(n,r),"throw"===r.method)||"return"!==i&&(r.method="throw",r.arg=TypeError("The iterator does not provide a '"+i+"' method")),m;var a=d(o,n.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;var s=a.arg;return s?s.done?(r[n.resultName]=s.value,r.next=n.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):s:(r.method="throw",r.arg=TypeError("iterator result is not an object"),r.delegate=null,m)}(o,a);if(u){if(u===m)continue;return u}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if(s===p)throw s=h,a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);s=f;var l=d(t,r,a);if("normal"===l.type){if(s=a.done?h:"suspendedYield",l.arg===m)continue;return{value:l.arg,done:a.done}}"throw"===l.type&&(s=h,a.method="throw",a.arg=l.arg)}})}),u}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=c;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function y(){}function b(){}var _={};l(_,a,function(){return this});var v=Object.getPrototypeOf,w=v&&v(v(E([])));w&&w!==n&&r.call(w,a)&&(_=w);var k=b.prototype=g.prototype=Object.create(_);function x(e){["next","throw","return"].forEach(function(t){l(e,t,function(e){return this._invoke(t,e)})})}function A(e,t){var n;i(this,"_invoke",{value:function(i,o){function a(){return new t(function(n,a){!function n(i,o,a,s){var u=d(e[i],e,o);if("throw"!==u.type){var l=u.arg,c=l.value;return c&&"object"==typeof c&&r.call(c,"__await")?t.resolve(c.__await).then(function(e){n("next",e,a,s)},function(e){n("throw",e,a,s)}):t.resolve(c).then(function(e){l.value=e,a(l)},function(e){return n("throw",e,a,s)})}s(u.arg)}(i,o,n,a)})}return n=n?n.then(a,a):a()}})}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function I(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function E(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(u&&l){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),I(n),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;I(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:E(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),m}},t}function B(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(e){n(e);return}s.done?t(u):Promise.resolve(u).then(r,i)}function M(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var o=e.apply(t,n);function a(e){B(o,r,i,a,s,"next",e)}function s(e){B(o,r,i,a,s,"throw",e)}a(void 0)})}}function R(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var q="0x0000000000000000000000000000000000000000";(r=o||(o={}))[r.LOWEST=100]="LOWEST",r[r.LOW_200=200]="LOW_200",r[r.LOW_300=300]="LOW_300",r[r.LOW_400=400]="LOW_400",r[r.LOW=500]="LOW",r[r.MEDIUM=3e3]="MEDIUM",r[r.HIGH=1e4]="HIGH";var j=((i={})[o.LOWEST]=1,i[o.LOW_200]=4,i[o.LOW_300]=6,i[o.LOW_400]=8,i[o.LOW]=10,i[o.MEDIUM]=60,i[o.HIGH]=200,i),U=u().BigInt(-1),z=u().BigInt(0),V=u().BigInt(1),W=u().exponentiate(u().BigInt(2),u().BigInt(96)),$=u().exponentiate(W,u().BigInt(2));function K(e){var t,n=e.factoryAddress,r=e.tokenA,i=e.tokenB,o=e.fee,s=e.initCodeHashManualOverride,u=e.chainId,l=r.sortsBefore(i)?[r,i]:[i,r],d=l[0],f=l[1],h=(t=[c.$.encode(["address","address","uint24"],[d.address,f.address,o])],(0,m.w)(k(["bytes"],t))),g=null!=s?s:u===a.a_.ZKSYNC?"0x010013f177ea1fcbc4520f9a3ca7cd2d1d77959e05aa66484027cb38e712aeed":"0xe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b54";return u===a.a_.ZKSYNC?(0,a.fr)(n,g,h):(0,p.hB)(n,h,g)}var H=function(){function e(){}return e.mulDivRoundingUp=function(e,t,n){var r=u().multiply(e,t),i=u().divide(r,n);return u().notEqual(u().remainder(r,n),z)&&(i=u().add(i,V)),i},e}(),G=u().subtract(u().exponentiate(u().BigInt(2),u().BigInt(160)),V);function Z(e,t){var n=u().multiply(e,t);return u().bitwiseAnd(n,a.Bz)}var Y=function(){function e(){}return e.getAmount0Delta=function(e,t,n,r){if(u().greaterThan(e,t)){var i=[t,e];e=i[0],t=i[1]}var o=u().leftShift(n,u().BigInt(96)),a=u().subtract(t,e);return r?H.mulDivRoundingUp(H.mulDivRoundingUp(o,a,t),V,e):u().divide(u().divide(u().multiply(o,a),t),e)},e.getAmount1Delta=function(e,t,n,r){if(u().greaterThan(e,t)){var i=[t,e];e=i[0],t=i[1]}return r?H.mulDivRoundingUp(n,u().subtract(t,e),W):u().divide(u().multiply(n,u().subtract(t,e)),W)},e.getNextSqrtPriceFromInput=function(e,t,n,r){return u().greaterThan(e,z)||(0,l.Z)(!1),u().greaterThan(t,z)||(0,l.Z)(!1),r?this.getNextSqrtPriceFromAmount0RoundingUp(e,t,n,!0):this.getNextSqrtPriceFromAmount1RoundingDown(e,t,n,!0)},e.getNextSqrtPriceFromOutput=function(e,t,n,r){return u().greaterThan(e,z)||(0,l.Z)(!1),u().greaterThan(t,z)||(0,l.Z)(!1),r?this.getNextSqrtPriceFromAmount1RoundingDown(e,t,n,!1):this.getNextSqrtPriceFromAmount0RoundingUp(e,t,n,!1)},e.getNextSqrtPriceFromAmount0RoundingUp=function(e,t,n,r){if(u().equal(n,z))return e;var i=u().leftShift(t,u().BigInt(96));if(r){var o=Z(n,e);if(u().equal(u().divide(o,n),e)){var s,c=(s=u().add(i,o),u().bitwiseAnd(s,a.Bz));if(u().greaterThanOrEqual(c,i))return H.mulDivRoundingUp(i,e,c)}return H.mulDivRoundingUp(i,V,u().add(u().divide(i,e),n))}var d=Z(n,e);u().equal(u().divide(d,n),e)||(0,l.Z)(!1),u().greaterThan(i,d)||(0,l.Z)(!1);var p=u().subtract(i,d);return H.mulDivRoundingUp(i,e,p)},e.getNextSqrtPriceFromAmount1RoundingDown=function(e,t,n,r){if(r){var i=u().lessThanOrEqual(n,G)?u().divide(u().leftShift(n,u().BigInt(96)),t):u().divide(u().multiply(n,W),t);return u().add(e,i)}var o=H.mulDivRoundingUp(n,W,t);return u().greaterThan(e,o)||(0,l.Z)(!1),u().subtract(e,o)},e}(),X=u().exponentiate(u().BigInt(10),u().BigInt(6)),Q=function(){function e(){}return e.computeSwapStep=function(e,t,n,r,i){var o={};i=u().BigInt(i);var a=u().greaterThanOrEqual(e,t),s=u().greaterThanOrEqual(r,z);if(s){var l=u().divide(u().multiply(r,u().subtract(X,i)),X);o.amountIn=a?Y.getAmount0Delta(t,e,n,!0):Y.getAmount1Delta(e,t,n,!0),u().greaterThanOrEqual(l,o.amountIn)?o.sqrtRatioNextX96=t:o.sqrtRatioNextX96=Y.getNextSqrtPriceFromInput(e,n,l,a)}else o.amountOut=a?Y.getAmount1Delta(t,e,n,!1):Y.getAmount0Delta(e,t,n,!1),u().greaterThanOrEqual(u().multiply(r,U),o.amountOut)?o.sqrtRatioNextX96=t:o.sqrtRatioNextX96=Y.getNextSqrtPriceFromOutput(e,n,u().multiply(r,U),a);var c=u().equal(t,o.sqrtRatioNextX96);return a?(o.amountIn=c&&s?o.amountIn:Y.getAmount0Delta(o.sqrtRatioNextX96,e,n,!0),o.amountOut=c&&!s?o.amountOut:Y.getAmount1Delta(o.sqrtRatioNextX96,e,n,!1)):(o.amountIn=c&&s?o.amountIn:Y.getAmount1Delta(e,o.sqrtRatioNextX96,n,!0),o.amountOut=c&&!s?o.amountOut:Y.getAmount0Delta(e,o.sqrtRatioNextX96,n,!1)),!s&&u().greaterThan(o.amountOut,u().multiply(r,U))&&(o.amountOut=u().multiply(r,U)),s&&u().notEqual(o.sqrtRatioNextX96,t)?o.feeAmount=u().subtract(r,o.amountIn):o.feeAmount=H.mulDivRoundingUp(o.amountIn,i,u().subtract(X,i)),[o.sqrtRatioNextX96,o.amountIn,o.amountOut,o.feeAmount]},e}(),J=function(){function e(){}return e.addDelta=function(e,t){return u().lessThan(t,z)?u().subtract(e,u().multiply(t,U)):u().add(e,t)},e}(),ee=u().BigInt(2),et=[128,64,32,16,8,4,2,1].map(function(e){return[e,u().exponentiate(ee,u().BigInt(e))]});function en(e,t){return u().signedRightShift(u().multiply(e,u().BigInt(t)),u().BigInt(128))}var er=u().exponentiate(u().BigInt(2),u().BigInt(32)),ei=function(){function e(){}return e.getSqrtRatioAtTick=function(t){t>=e.MIN_TICK&&t<=e.MAX_TICK&&Number.isInteger(t)||(0,l.Z)(!1);var n=t<0?-1*t:t,r=(1&n)!=0?u().BigInt("0xfffcb933bd6fad37aa2d162d1a594001"):u().BigInt("0x100000000000000000000000000000000");return(2&n)!=0&&(r=en(r,"0xfff97272373d413259a46990580e213a")),(4&n)!=0&&(r=en(r,"0xfff2e50f5f656932ef12357cf3c7fdcc")),(8&n)!=0&&(r=en(r,"0xffe5caca7e10e4e61c3624eaa0941cd0")),(16&n)!=0&&(r=en(r,"0xffcb9843d60f6159c9db58835c926644")),(32&n)!=0&&(r=en(r,"0xff973b41fa98c081472e6896dfb254c0")),(64&n)!=0&&(r=en(r,"0xff2ea16466c96a3843ec78b326b52861")),(128&n)!=0&&(r=en(r,"0xfe5dee046a99a2a811c461f1969c3053")),(256&n)!=0&&(r=en(r,"0xfcbe86c7900a88aedcffc83b479aa3a4")),(512&n)!=0&&(r=en(r,"0xf987a7253ac413176f2b074cf7815e54")),(1024&n)!=0&&(r=en(r,"0xf3392b0822b70005940c7a398e4b70f3")),(2048&n)!=0&&(r=en(r,"0xe7159475a2c29b7443b29c7fa6e889d9")),(4096&n)!=0&&(r=en(r,"0xd097f3bdfd2022b8845ad8f792aa5825")),(8192&n)!=0&&(r=en(r,"0xa9f746462d870fdf8a65dc1f90e061e5")),(16384&n)!=0&&(r=en(r,"0x70d869a156d2a1b890bb3df62baf32f7")),(32768&n)!=0&&(r=en(r,"0x31be135f97d08fd981231505542fcfa6")),(65536&n)!=0&&(r=en(r,"0x9aa508b5b7a84e1c677de54f3e99bc9")),(131072&n)!=0&&(r=en(r,"0x5d6af8dedb81196699c329225ee604")),(262144&n)!=0&&(r=en(r,"0x2216e584f5fa1ea926041bedfe98")),(524288&n)!=0&&(r=en(r,"0x48a170391f7dc42444e8fa2")),t>0&&(r=u().divide(a.Bz,r)),u().greaterThan(u().remainder(r,er),z)?u().add(u().divide(r,er),V):u().divide(r,er)},e.getTickAtSqrtRatio=function(t){u().greaterThanOrEqual(t,e.MIN_SQRT_RATIO)&&u().lessThan(t,e.MAX_SQRT_RATIO)||(0,l.Z)(!1);var n,r=u().leftShift(t,u().BigInt(32)),i=function(e){u().greaterThan(e,z)||(0,l.Z)(!1),u().lessThanOrEqual(e,a.Bz)||(0,l.Z)(!1);for(var t,n=0,r=F(et);!(t=r()).done;){var i=t.value,o=i[0],s=i[1];u().greaterThanOrEqual(e,s)&&(e=u().signedRightShift(e,u().BigInt(o)),n+=o)}return n}(r);n=u().greaterThanOrEqual(u().BigInt(i),u().BigInt(128))?u().signedRightShift(r,u().BigInt(i-127)):u().leftShift(r,u().BigInt(127-i));for(var o=u().leftShift(u().subtract(u().BigInt(i),u().BigInt(128)),u().BigInt(64)),s=0;s<14;s++){n=u().signedRightShift(u().multiply(n,n),u().BigInt(127));var c=u().signedRightShift(n,u().BigInt(128));o=u().bitwiseOr(o,u().leftShift(c,u().BigInt(63-s))),n=u().signedRightShift(n,c)}var d=u().multiply(o,u().BigInt("255738958999603826347141")),p=u().toNumber(u().signedRightShift(u().subtract(d,u().BigInt("3402992956809132418596140100660247210")),u().BigInt(128))),f=u().toNumber(u().signedRightShift(u().add(d,u().BigInt("291339464771989622907027621153398088495")),u().BigInt(128)));return p===f?p:u().lessThanOrEqual(e.getSqrtRatioAtTick(f),t)?f:p},e}();function eo(){return(eo=M(O().mark(function e(t,n,r,i,o,a,s,c,d){var p,f,h,m,g,y;return O().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:d||(d=s?u().add(ei.MIN_SQRT_RATIO,V):u().subtract(ei.MAX_SQRT_RATIO,V)),s?(u().greaterThan(d,ei.MIN_SQRT_RATIO)||(0,l.Z)(!1),u().lessThan(d,n)||(0,l.Z)(!1)):(u().lessThan(d,ei.MAX_SQRT_RATIO)||(0,l.Z)(!1),u().greaterThan(d,n)||(0,l.Z)(!1)),p=u().greaterThanOrEqual(c,z),f={amountSpecifiedRemaining:c,amountCalculated:z,sqrtPriceX96:n,tick:r,liquidity:i};case 4:if(!(u().notEqual(f.amountSpecifiedRemaining,z)&&f.sqrtPriceX96!==d)){e.next=35;break}return(h={}).sqrtPriceStartX96=f.sqrtPriceX96,e.next=9,a.nextInitializedTickWithinOneWord(f.tick,s,o);case 9:if(m=e.sent,h.tickNext=m[0],h.initialized=m[1],h.tickNextei.MAX_TICK&&(h.tickNext=ei.MAX_TICK),h.sqrtPriceNextX96=ei.getSqrtRatioAtTick(h.tickNext),g=Q.computeSwapStep(f.sqrtPriceX96,(s?u().lessThan(h.sqrtPriceNextX96,d):u().greaterThan(h.sqrtPriceNextX96,d))?d:h.sqrtPriceNextX96,f.liquidity,f.amountSpecifiedRemaining,t),f.sqrtPriceX96=g[0],h.amountIn=g[1],h.amountOut=g[2],h.feeAmount=g[3],p?(f.amountSpecifiedRemaining=u().subtract(f.amountSpecifiedRemaining,u().add(h.amountIn,h.feeAmount)),f.amountCalculated=u().subtract(f.amountCalculated,h.amountOut)):(f.amountSpecifiedRemaining=u().add(f.amountSpecifiedRemaining,h.amountOut),f.amountCalculated=u().add(f.amountCalculated,u().add(h.amountIn,h.feeAmount))),!u().equal(f.sqrtPriceX96,h.sqrtPriceNextX96)){e.next=32;break}if(!h.initialized){e.next=29;break}return e.t0=u(),e.next=25,a.getTick(h.tickNext);case 25:e.t1=e.sent.liquidityNet,y=e.t0.BigInt.call(e.t0,e.t1),s&&(y=u().multiply(y,U)),f.liquidity=J.addDelta(f.liquidity,y);case 29:f.tick=s?h.tickNext-1:h.tickNext,e.next=33;break;case 32:u().notEqual(f.sqrtPriceX96,h.sqrtPriceStartX96)&&(f.tick=ei.getTickAtSqrtRatio(f.sqrtPriceX96));case 33:e.next=4;break;case 35:return e.abrupt("return",{amountCalculated:f.amountCalculated,sqrtRatioX96:f.sqrtPriceX96,liquidity:f.liquidity,tickCurrent:f.tick});case 36:case"end":return e.stop()}},e)}))).apply(this,arguments)}ei.MIN_TICK=-887272,ei.MAX_TICK=-ei.MIN_TICK,ei.MIN_SQRT_RATIO=u().BigInt("4295128739"),ei.MAX_SQRT_RATIO=u().BigInt("1461446703485210103287273052203988822378723970342");var ea=function(){function e(){}var t,n,r=e.prototype;return r.getTick=(t=M(O().mark(function t(n){return O().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:throw Error(e.ERROR_MESSAGE);case 1:case"end":return t.stop()}},t)})),function(e){return t.apply(this,arguments)}),r.nextInitializedTickWithinOneWord=(n=M(O().mark(function t(n,r,i){return O().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:throw Error(e.ERROR_MESSAGE);case 1:case"end":return t.stop()}},t)})),function(e,t,r){return n.apply(this,arguments)}),e}();function es(e,t){return e.index-t.index}ea.ERROR_MESSAGE="No tick data provider was given";var eu=function(){function e(){}return e.validateList=function(e,t){t>0||(0,l.Z)(!1),e.every(function(e){return e.index%t==0})||(0,l.Z)(!1),u().equal(e.reduce(function(e,t){var n=t.liquidityNet;return u().add(e,n)},z),z)||(0,l.Z)(!1),!function(e,t){for(var n=0;n0)return!1;return!0}(e,es)&&(0,l.Z)(!1)},e.isBelowSmallest=function(e,t){return e.length>0||(0,l.Z)(!1),t0||(0,l.Z)(!1),t>=e[e.length-1].index},e.getTick=function(e,t){var n=e[this.binarySearch(e,t)];return n.index!==t&&(0,l.Z)(!1),n},e.binarySearch=function(e,t){this.isBelowSmallest(e,t)&&(0,l.Z)(!1);for(var n,r=0,i=e.length-1;;){if(e[n=Math.floor((r+i)/2)].index<=t&&(n===e.length-1||e[n+1].index>t))return n;e[n].index>8<<8)*i;if(e.isBelowSmallest(t,n))return[a,!1];var s=e.nextInitializedTick(t,n,r).index,u=Math.max(a,s);return[u,u===s]}var l=(((o+1>>8)+1<<8)-1)*i;if(this.isAtOrAboveLargest(t,n))return[l,!1];var c=this.nextInitializedTick(t,n,r).index,d=Math.min(l,c);return[d,d===c]},e}();function el(e){var t=u().BigInt(e).toString(16);return t.length%2!=0&&(t="0"+t),"0x"+t}function ec(e,t){var n=e.input.wrapped,r=e.pools.reduce(function(e,t,n){var r=e.inputToken,i=e.path,o=e.types,a=t.token0.equals(r)?t.token1:t.token0;return 0===n?{inputToken:a,types:["address","uint24","address"],path:[r.address,t.fee,a.address]}:{inputToken:a,types:[].concat(o,["uint24","address"]),path:[].concat(i,[t.fee,a.address])}},{inputToken:n,path:[],types:[]}),i=r.path,o=r.types;return t?k(o.reverse(),i.reverse()):k(o,i)}function ed(e,t){var n=u().leftShift(u().BigInt(e),u().BigInt(192)),r=u().BigInt(t),i=u().divide(n,r);return(0,a._b)(i)}function ep(e,t,n){if(u().greaterThan(e,t)){var r=[t,e];e=r[0],t=r[1]}var i=u().divide(u().multiply(e,t),W);return u().divide(u().multiply(u().BigInt(n),i),u().subtract(t,e))}function ef(e,t,n){if(u().greaterThan(e,t)){var r=[t,e];e=r[0],t=r[1]}var i=u().multiply(u().multiply(u().BigInt(n),e),t),o=u().multiply(W,u().subtract(t,e));return u().divide(i,o)}function eh(e,t,n){if(u().greaterThan(e,t)){var r=[t,e];e=r[0],t=r[1]}return u().divide(u().multiply(u().BigInt(n),W),u().subtract(t,e))}function em(e,t){Number.isInteger(e)&&Number.isInteger(t)||(0,l.Z)(!1),t>0||(0,l.Z)(!1),e>=ei.MIN_TICK&&e<=ei.MAX_TICK||(0,l.Z)(!1);var n=Math.round(e/t)*t;return nei.MAX_TICK?n-t:n}function eg(e,t,n){var r=ei.getSqrtRatioAtTick(n),i=u().multiply(r,r);return e.sortsBefore(t)?new a.tA(e,t,$,i):new a.tA(e,t,i,$)}function ey(e){var t=e.baseCurrency.sortsBefore(e.quoteCurrency),n=t?ed(e.numerator,e.denominator):ed(e.denominator,e.numerator),r=ei.getTickAtSqrtRatio(n),i=eg(e.baseCurrency,e.quoteCurrency,r+1);return t?!e.lessThan(i)&&r++:!e.greaterThan(i)&&r++,r}var eb=function(e){var t=e.index,n=e.liquidityGross,r=e.liquidityNet;t>=ei.MIN_TICK&&t<=ei.MAX_TICK||(0,l.Z)(!1),this.index=t,this.liquidityGross=u().BigInt(n),this.liquidityNet=u().BigInt(r)},e_=function(){function e(e,t){var n=e.map(function(e){return e instanceof eb?e:new eb(e)});eu.validateList(n,t),this.ticks=n}var t,n,r=e.prototype;return r.getTick=(t=M(O().mark(function e(t){return O().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",eu.getTick(this.ticks,t));case 1:case"end":return e.stop()}},e,this)})),function(e){return t.apply(this,arguments)}),r.nextInitializedTickWithinOneWord=(n=M(O().mark(function e(t,n,r){return O().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",eu.nextInitializedTickWithinOneWord(this.ticks,t,n,r));case 1:case"end":return e.stop()}},e,this)})),function(e,t,r){return n.apply(this,arguments)}),e}(),ev=new ea,ew=function(){function e(e,t,n,r,i,o,a){void 0===a&&(a=ev),Number.isInteger(n)&&n<1e6||(0,l.Z)(!1);var s=ei.getSqrtRatioAtTick(o),c=ei.getSqrtRatioAtTick(o+1);u().greaterThanOrEqual(u().BigInt(r),s)&&u().lessThanOrEqual(u().BigInt(r),c)||(0,l.Z)(!1);var d=e.sortsBefore(t)?[e,t]:[t,e];this.token0=d[0],this.token1=d[1],this.fee=n,this.sqrtRatioX96=u().BigInt(r),this.liquidity=u().BigInt(i),this.tickCurrent=o,this.tickDataProvider=Array.isArray(a)?new e_(a,j[n]):a}e.getAddress=function(e,t,n,r,i){return K({factoryAddress:null!=i?i:"0x1F98431c8aD98523631AE4a59f267346ea31F984",fee:n,tokenA:e,tokenB:t,initCodeHashManualOverride:r})};var t,n,r,i=e.prototype;return i.involvesToken=function(e){return e.equals(this.token0)||e.equals(this.token1)},i.priceOf=function(e){return this.involvesToken(e)||(0,l.Z)(!1),e.equals(this.token0)?this.token0Price:this.token1Price},i.getOutputAmount=(t=M(O().mark(function t(n,r){var i,o,s,c,d,p,f;return O().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return this.involvesToken(n.currency)||(0,l.Z)(!1),i=n.currency.equals(this.token0),t.next=4,this.swap(i,n.quotient,r);case 4:return s=(o=t.sent).amountCalculated,c=o.sqrtRatioX96,d=o.liquidity,p=o.tickCurrent,f=i?this.token1:this.token0,t.abrupt("return",[a.ih.fromRawAmount(f,u().multiply(s,U)),new e(this.token0,this.token1,this.fee,c,d,p,this.tickDataProvider)]);case 11:case"end":return t.stop()}},t,this)})),function(e,n){return t.apply(this,arguments)}),i.getInputAmount=(n=M(O().mark(function t(n,r){var i,o,s,c,d,p,f;return O().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n.currency.isToken&&this.involvesToken(n.currency)||(0,l.Z)(!1),i=n.currency.equals(this.token1),t.next=4,this.swap(i,u().multiply(n.quotient,U),r);case 4:return s=(o=t.sent).amountCalculated,c=o.sqrtRatioX96,d=o.liquidity,p=o.tickCurrent,f=i?this.token0:this.token1,t.abrupt("return",[a.ih.fromRawAmount(f,s),new e(this.token0,this.token1,this.fee,c,d,p,this.tickDataProvider)]);case 11:case"end":return t.stop()}},t,this)})),function(e,t){return n.apply(this,arguments)}),i.swap=(r=M(O().mark(function e(t,n,r){return O().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",function(e,t,n,r,i,o,a,s,u){return eo.apply(this,arguments)}(u().BigInt(this.fee),this.sqrtRatioX96,this.tickCurrent,this.liquidity,this.tickSpacing,this.tickDataProvider,t,n,r));case 1:case"end":return e.stop()}},e,this)})),function(e,t,n){return r.apply(this,arguments)}),L(e,[{key:"token0Price",get:function(){var e;return null!=(e=this._token0Price)?e:this._token0Price=new a.tA(this.token0,this.token1,$,u().multiply(this.sqrtRatioX96,this.sqrtRatioX96))}},{key:"token1Price",get:function(){var e;return null!=(e=this._token1Price)?e:this._token1Price=new a.tA(this.token1,this.token0,u().multiply(this.sqrtRatioX96,this.sqrtRatioX96),$)}},{key:"chainId",get:function(){return this.token0.chainId}},{key:"tickSpacing",get:function(){return j[this.fee]}}]),e}(),ek=function(){function e(e){var t=e.pool,n=e.liquidity,r=e.tickLower,i=e.tickUpper;this._token0Amount=null,this._token1Amount=null,this._mintAmounts=null,r=ei.MIN_TICK&&r%t.tickSpacing==0||(0,l.Z)(!1),i<=ei.MAX_TICK&&i%t.tickSpacing==0||(0,l.Z)(!1),this.pool=t,this.tickLower=r,this.tickUpper=i,this.liquidity=u().BigInt(n)}var t=e.prototype;return t.ratiosAfterSlippage=function(e){var t=this.pool.token0Price.asFraction.multiply(new a.gG(1).subtract(e)),n=this.pool.token0Price.asFraction.multiply(e.add(1)),r=ed(t.numerator,t.denominator);u().lessThanOrEqual(r,ei.MIN_SQRT_RATIO)&&(r=u().add(ei.MIN_SQRT_RATIO,u().BigInt(1)));var i=ed(n.numerator,n.denominator);return u().greaterThanOrEqual(i,ei.MAX_SQRT_RATIO)&&(i=u().subtract(ei.MAX_SQRT_RATIO,u().BigInt(1))),{sqrtRatioX96Lower:r,sqrtRatioX96Upper:i}},t.mintAmountsWithSlippage=function(t){var n=this.ratiosAfterSlippage(t),r=n.sqrtRatioX96Upper,i=n.sqrtRatioX96Lower,o=new ew(this.pool.token0,this.pool.token1,this.pool.fee,i,0,ei.getTickAtSqrtRatio(i)),a=new ew(this.pool.token0,this.pool.token1,this.pool.fee,r,0,ei.getTickAtSqrtRatio(r)),s=e.fromAmounts(N({pool:this.pool,tickLower:this.tickLower,tickUpper:this.tickUpper},this.mintAmounts,{useFullPrecision:!1}));return{amount0:new e({pool:a,liquidity:s.liquidity,tickLower:this.tickLower,tickUpper:this.tickUpper}).mintAmounts.amount0,amount1:new e({pool:o,liquidity:s.liquidity,tickLower:this.tickLower,tickUpper:this.tickUpper}).mintAmounts.amount1}},t.burnAmountsWithSlippage=function(t){var n=this.ratiosAfterSlippage(t),r=n.sqrtRatioX96Upper,i=n.sqrtRatioX96Lower,o=new ew(this.pool.token0,this.pool.token1,this.pool.fee,i,0,ei.getTickAtSqrtRatio(i)),a=new ew(this.pool.token0,this.pool.token1,this.pool.fee,r,0,ei.getTickAtSqrtRatio(r)),s=new e({pool:a,liquidity:this.liquidity,tickLower:this.tickLower,tickUpper:this.tickUpper}).amount0,u=new e({pool:o,liquidity:this.liquidity,tickLower:this.tickLower,tickUpper:this.tickUpper}).amount1;return{amount0:s.quotient,amount1:u.quotient}},e.fromAmounts=function(t){var n=t.pool,r=t.tickLower,i=t.tickUpper,o=t.amount0,a=t.amount1,s=t.useFullPrecision,l=ei.getSqrtRatioAtTick(r),c=ei.getSqrtRatioAtTick(i);return new e({pool:n,tickLower:r,tickUpper:i,liquidity:function(e,t,n,r,i,o){if(u().greaterThan(t,n)){var a=[n,t];t=a[0],n=a[1]}var s=o?ef:ep;if(u().lessThanOrEqual(e,t))return s(t,n,r);if(!u().lessThan(e,n))return eh(t,n,i);var l=s(e,n,r),c=eh(t,e,i);return u().lessThan(l,c)?l:c}(n.sqrtRatioX96,l,c,o,a,s)})},e.fromAmount0=function(t){var n=t.pool,r=t.tickLower,i=t.tickUpper,o=t.amount0,s=t.useFullPrecision;return e.fromAmounts({pool:n,tickLower:r,tickUpper:i,amount0:o,amount1:a.Bz,useFullPrecision:s})},e.fromAmount1=function(t){var n=t.pool,r=t.tickLower,i=t.tickUpper,o=t.amount1;return e.fromAmounts({pool:n,tickLower:r,tickUpper:i,amount0:a.Bz,amount1:o,useFullPrecision:!0})},L(e,[{key:"token0PriceLower",get:function(){return eg(this.pool.token0,this.pool.token1,this.tickLower)}},{key:"token0PriceUpper",get:function(){return eg(this.pool.token0,this.pool.token1,this.tickUpper)}},{key:"amount0",get:function(){return null===this._token0Amount&&(this.pool.tickCurrent0||(0,l.Z)(!1);var r=e[0].chainId;e.every(function(e){return e.chainId===r})||(0,l.Z)(!1);var i=t.wrapped;e[0].involvesToken(i)||(0,l.Z)(!1),e[e.length-1].involvesToken(n.wrapped)||(0,l.Z)(!1);for(var o,a=[i],s=F(e.entries());!(o=s()).done;){var u=o.value,c=u[0],d=u[1],p=a[c];p.equals(d.token0)||p.equals(d.token1)||(0,l.Z)(!1);var f=p.equals(d.token0)?d.token1:d.token0;a.push(f)}this.pools=e,this.tokenPath=a,this.input=t,this.output=null!=n?n:a[a.length-1]}return L(e,[{key:"chainId",get:function(){return this.pools[0].chainId}},{key:"midPrice",get:function(){if(null!==this._midPrice)return this._midPrice;var e=this.pools.slice(1).reduce(function(e,t){var n=e.nextInput,r=e.price;return n.equals(t.token0)?{nextInput:t.token1,price:r.multiply(t.token0Price)}:{nextInput:t.token0,price:r.multiply(t.token1Price)}},this.pools[0].token0.equals(this.input.wrapped)?{nextInput:this.pools[0].token1,price:this.pools[0].token0Price}:{nextInput:this.pools[0].token0,price:this.pools[0].token1Price}).price;return this._midPrice=new a.tA(this.input,this.output,e.denominator,e.numerator)}}]),e}();function eA(e,t){return(e.inputAmount.currency.equals(t.inputAmount.currency)||(0,l.Z)(!1),e.outputAmount.currency.equals(t.outputAmount.currency)||(0,l.Z)(!1),e.outputAmount.equalTo(t.outputAmount))?e.inputAmount.equalTo(t.inputAmount)?e.swaps.reduce(function(e,t){return e+t.route.tokenPath.length},0)-t.swaps.reduce(function(e,t){return e+t.route.tokenPath.length},0):e.inputAmount.lessThan(t.inputAmount)?-1:1:e.outputAmount.lessThan(t.outputAmount)?1:-1}var eS=function(){function e(e){var t=e.routes,n=e.tradeType,r=t[0].inputAmount.currency,i=t[0].outputAmount.currency;t.every(function(e){var t=e.route;return r.wrapped.equals(t.input.wrapped)})||(0,l.Z)(!1),t.every(function(e){var t=e.route;return i.wrapped.equals(t.output.wrapped)})||(0,l.Z)(!1);for(var o,a=t.map(function(e){return e.route.pools.length}).reduce(function(e,t){return e+t},0),s=new Set,u=F(t);!(o=u()).done;)for(var c,d=o.value.route,p=F(d.pools);!(c=p()).done;){var f=c.value;s.add(ew.getAddress(f.token0,f.token1,f.fee))}a!==s.size&&(0,l.Z)(!1),this.swaps=t,this.tradeType=n}e.exactIn=(t=M(O().mark(function t(n,r){return O().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",e.fromRoute(n,r,a.YL.EXACT_INPUT));case 1:case"end":return t.stop()}},t)})),function(e,n){return t.apply(this,arguments)}),e.exactOut=(n=M(O().mark(function t(n,r){return O().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",e.fromRoute(n,r,a.YL.EXACT_OUTPUT));case 1:case"end":return t.stop()}},t)})),function(e,t){return n.apply(this,arguments)}),e.fromRoute=(r=M(O().mark(function t(n,r,i){var o,s,u,c,d,p,f,h,m;return O().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(o=Array(n.tokenPath.length),i!==a.YL.EXACT_INPUT){t.next=19;break}r.currency.equals(n.input)||(0,l.Z)(!1),o[0]=r.wrapped,c=0;case 5:if(!(c0)){t.next=32;break}return h=n.pools[f-1],t.next=26,h.getInputAmount(o[f]);case 26:m=t.sent[0],o[f-1]=m;case 29:f--,t.next=22;break;case 32:s=a.ih.fromFractionalAmount(n.input,o[0].numerator,o[0].denominator),u=a.ih.fromFractionalAmount(n.output,r.numerator,r.denominator);case 34:return t.abrupt("return",new e({routes:[{inputAmount:s,outputAmount:u,route:n}],tradeType:i}));case 35:case"end":return t.stop()}},t)})),function(e,t,n){return r.apply(this,arguments)}),e.fromRoutes=(i=M(O().mark(function t(n,r){var i,o,s,u,c,d,p,f,h,m,g,y,b,_,v;return O().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:i=[],o=F(n);case 2:if((s=o()).done){t.next=43;break}if(c=(u=s.value).route,d=u.amount,p=Array(c.tokenPath.length),f=void 0,h=void 0,r!==a.YL.EXACT_INPUT){t.next=25;break}d.currency.equals(c.input)||(0,l.Z)(!1),f=a.ih.fromFractionalAmount(c.input,d.numerator,d.denominator),p[0]=a.ih.fromFractionalAmount(c.input.wrapped,d.numerator,d.denominator),m=0;case 12:if(!(m0)){t.next=39;break}return _=c.pools[b-1],t.next=33,_.getInputAmount(p[b]);case 33:v=t.sent[0],p[b-1]=v;case 36:b--,t.next=29;break;case 39:f=a.ih.fromFractionalAmount(c.input,p[0].numerator,p[0].denominator);case 40:i.push({route:c,inputAmount:f,outputAmount:h});case 41:t.next=2;break;case 43:return t.abrupt("return",new e({routes:i,tradeType:r}));case 44:case"end":return t.stop()}},t)})),function(e,t){return i.apply(this,arguments)}),e.createUncheckedTrade=function(t){return new e(N({},t,{routes:[{inputAmount:t.inputAmount,outputAmount:t.outputAmount,route:t.route}]}))},e.createUncheckedTradeWithMultipleRoutes=function(t){return new e(t)};var t,n,r,i,o,s,u=e.prototype;return u.minimumAmountOut=function(e,t){if(void 0===t&&(t=this.outputAmount),e.lessThan(z)&&(0,l.Z)(!1),this.tradeType===a.YL.EXACT_OUTPUT)return t;var n=new a.iA(V).add(e).invert().multiply(t.quotient).quotient;return a.ih.fromRawAmount(t.currency,n)},u.maximumAmountIn=function(e,t){if(void 0===t&&(t=this.inputAmount),e.lessThan(z)&&(0,l.Z)(!1),this.tradeType===a.YL.EXACT_INPUT)return t;var n=new a.iA(V).add(e).multiply(t.quotient).quotient;return a.ih.fromRawAmount(t.currency,n)},u.worstExecutionPrice=function(e){return new a.tA(this.inputAmount.currency,this.outputAmount.currency,this.maximumAmountIn(e).quotient,this.minimumAmountOut(e).quotient)},e.bestTradeExactIn=(o=M(O().mark(function t(n,r,i,o,s,u,c){var d,p,f,h,m,g,y,b,_,v,w;return O().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:f=void 0===(p=(d=void 0===o?{}:o).maxNumResults)?3:p,m=void 0===(h=d.maxHops)?3:h,void 0===s&&(s=[]),void 0===u&&(u=r),void 0===c&&(c=[]),n.length>0||(0,l.Z)(!1),m>0||(0,l.Z)(!1),r===u||s.length>0||(0,l.Z)(!1),g=u.wrapped,y=i.wrapped,b=0;case 10:if(!(b1&&n.length>1)){t.next=43;break}return w=n.slice(0,b).concat(n.slice(b+1,n.length)),t.next=43,e.bestTradeExactIn(w,r,i,{maxNumResults:f,maxHops:m-1},[].concat(s,[_]),v,c);case 43:b++,t.next=10;break;case 46:return t.abrupt("return",c);case 47:case"end":return t.stop()}},t,null,[[15,23]])})),function(e,t,n,r,i,a,s){return o.apply(this,arguments)}),e.bestTradeExactOut=(s=M(O().mark(function t(n,r,i,o,s,u,c){var d,p,f,h,m,g,y,b,_,v,w;return O().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:f=void 0===(p=(d=void 0===o?{}:o).maxNumResults)?3:p,m=void 0===(h=d.maxHops)?3:h,void 0===s&&(s=[]),void 0===u&&(u=i),void 0===c&&(c=[]),n.length>0||(0,l.Z)(!1),m>0||(0,l.Z)(!1),i===u||s.length>0||(0,l.Z)(!1),g=u.wrapped,y=r.wrapped,b=0;case 10:if(!(b1&&n.length>1)){t.next=43;break}return w=n.slice(0,b).concat(n.slice(b+1,n.length)),t.next=43,e.bestTradeExactOut(w,r,i,{maxNumResults:f,maxHops:m-1},[_].concat(s),v,c);case 43:b++,t.next=10;break;case 46:return t.abrupt("return",c);case 47:case"end":return t.stop()}},t,null,[[15,23]])})),function(e,t,n,r,i,o,a){return s.apply(this,arguments)}),L(e,[{key:"route",get:function(){return 1!==this.swaps.length&&(0,l.Z)(!1),this.swaps[0].route}},{key:"inputAmount",get:function(){if(this._inputAmount)return this._inputAmount;var e=this.swaps[0].inputAmount.currency,t=this.swaps.map(function(e){return e.inputAmount}).reduce(function(e,t){return e.add(t)},a.ih.fromRawAmount(e,0));return this._inputAmount=t,this._inputAmount}},{key:"outputAmount",get:function(){if(this._outputAmount)return this._outputAmount;var e=this.swaps[0].outputAmount.currency,t=this.swaps.map(function(e){return e.outputAmount}).reduce(function(e,t){return e.add(t)},a.ih.fromRawAmount(e,0));return this._outputAmount=t,this._outputAmount}},{key:"executionPrice",get:function(){var e;return null!=(e=this._executionPrice)?e:this._executionPrice=new a.tA(this.inputAmount.currency,this.outputAmount.currency,this.inputAmount.quotient,this.outputAmount.quotient)}},{key:"priceImpact",get:function(){if(this._priceImpact)return this._priceImpact;for(var e,t=a.ih.fromRawAmount(this.outputAmount.currency,0),n=F(this.swaps);!(e=n()).done;){var r=e.value,i=r.route,o=r.inputAmount,s=i.midPrice;t=t.add(s.quote(o))}var u=t.subtract(this.outputAmount).divide(t);return this._priceImpact=new a.gG(u.numerator,u.denominator),this._priceImpact}}]),e}(),eI=function(){function e(){}return e.encodeMulticall=function(t){return Array.isArray(t)||(t=[t]),1===t.length?t[0]:e.INTERFACE.encodeFunctionData("multicall",[t])},e.decodeMulticall=function(t){return e.INTERFACE.decodeFunctionData("multicall",t).data},e}();eI.INTERFACE=new d.vU(x.Mt);var eT=function(){function e(){}return e.encodePermit=function(t,n){return"nonce"in n?e.INTERFACE.encodeFunctionData("selfPermitAllowed",[t.address,el(n.nonce),el(n.expiry),n.v,n.r,n.s]):e.INTERFACE.encodeFunctionData("selfPermit",[t.address,el(n.amount),el(n.deadline),n.v,n.r,n.s])},e}();eT.INTERFACE=new d.vU(S.Mt);var eE=function(){function e(){}return e.encodeFeeBips=function(e){return el(e.multiply(1e4).quotient)},e.encodeUnwrapWETH9=function(t,n,r){if(n=(0,a.qn)(n),!r)return e.INTERFACE.encodeFunctionData("unwrapWETH9",[el(t),n]);var i=this.encodeFeeBips(r.fee),o=(0,a.qn)(r.recipient);return e.INTERFACE.encodeFunctionData("unwrapWETH9WithFee",[el(t),n,i,o])},e.encodeSweepToken=function(t,n,r,i){if(r=(0,a.qn)(r),!i)return e.INTERFACE.encodeFunctionData("sweepToken",[t.address,el(n),r]);var o=this.encodeFeeBips(i.fee),s=(0,a.qn)(i.recipient);return e.INTERFACE.encodeFunctionData("sweepTokenWithFee",[t.address,el(n),r,o,s])},e.encodeRefundETH=function(){return e.INTERFACE.encodeFunctionData("refundETH")},e}();eE.INTERFACE=new d.vU(I.Mt);var eP=["expectedCurrencyOwed0","expectedCurrencyOwed1"],eC=el(u().subtract(u().exponentiate(u().BigInt(2),u().BigInt(128)),u().BigInt(1)));function eO(e){return Object.keys(e).some(function(e){return"recipient"===e})}var eB={Permit:[{name:"spender",type:"address"},{name:"tokenId",type:"uint256"},{name:"nonce",type:"uint256"},{name:"deadline",type:"uint256"}]},eM=function(){function e(){}return e.encodeCreate=function(t){return e.INTERFACE.encodeFunctionData("createAndInitializePoolIfNecessary",[t.token0.address,t.token1.address,t.fee,el(t.sqrtRatioX96)])},e.createCallParameters=function(e){return{calldata:this.encodeCreate(e),value:el(0)}},e.addCallParameters=function(t,n){u().greaterThan(t.liquidity,z)||(0,l.Z)(!1);var r=[],i=t.mintAmounts,o=i.amount0,s=i.amount1,c=t.mintAmountsWithSlippage(n.slippageTolerance),d=el(c.amount0),p=el(c.amount1),f=el(n.deadline);if(eO(n)&&n.createPool&&r.push(this.encodeCreate(t.pool)),n.token0Permit&&r.push(eT.encodePermit(t.pool.token0,n.token0Permit)),n.token1Permit&&r.push(eT.encodePermit(t.pool.token1,n.token1Permit)),eO(n)){var h=(0,a.qn)(n.recipient);r.push(e.INTERFACE.encodeFunctionData("mint",[{token0:t.pool.token0.address,token1:t.pool.token1.address,fee:t.pool.fee,tickLower:t.tickLower,tickUpper:t.tickUpper,amount0Desired:el(o),amount1Desired:el(s),amount0Min:d,amount1Min:p,recipient:h,deadline:f}]))}else r.push(e.INTERFACE.encodeFunctionData("increaseLiquidity",[{tokenId:el(n.tokenId),amount0Desired:el(o),amount1Desired:el(s),amount0Min:d,amount1Min:p,deadline:f}]));var m=el(0);if(n.useNative){var g=n.useNative.wrapped;t.pool.token0.equals(g)||t.pool.token1.equals(g)||(0,l.Z)(!1);var y=t.pool.token0.equals(g)?o:s;u().greaterThan(y,z)&&r.push(eE.encodeRefundETH()),m=el(y)}return{calldata:eI.encodeMulticall(r),value:m}},e.encodeCollect=function(t){var n=[],r=el(t.tokenId),i=t.expectedCurrencyOwed0.currency.isNative||t.expectedCurrencyOwed1.currency.isNative,o=(0,a.qn)(t.recipient);if(n.push(e.INTERFACE.encodeFunctionData("collect",[{tokenId:r,recipient:i?q:o,amount0Max:eC,amount1Max:eC}])),i){var s=t.expectedCurrencyOwed0.currency.isNative?t.expectedCurrencyOwed0.quotient:t.expectedCurrencyOwed1.quotient,u=t.expectedCurrencyOwed0.currency.isNative?t.expectedCurrencyOwed1.currency:t.expectedCurrencyOwed0.currency,l=t.expectedCurrencyOwed0.currency.isNative?t.expectedCurrencyOwed1.quotient:t.expectedCurrencyOwed0.quotient;n.push(eE.encodeUnwrapWETH9(s,o)),n.push(eE.encodeSweepToken(u,l,o))}return n},e.collectCallParameters=function(t){var n=e.encodeCollect(t);return{calldata:eI.encodeMulticall(n),value:el(0)}},e.removeCallParameters=function(t,n){var r=[],i=el(n.deadline),o=el(n.tokenId),s=new ek({pool:t.pool,liquidity:n.liquidityPercentage.multiply(t.liquidity).quotient,tickLower:t.tickLower,tickUpper:t.tickUpper});u().greaterThan(s.liquidity,z)||(0,l.Z)(!1);var c=s.burnAmountsWithSlippage(n.slippageTolerance),d=c.amount0,p=c.amount1;n.permit&&r.push(e.INTERFACE.encodeFunctionData("permit",[(0,a.qn)(n.permit.spender),o,el(n.permit.deadline),n.permit.v,n.permit.r,n.permit.s])),r.push(e.INTERFACE.encodeFunctionData("decreaseLiquidity",[{tokenId:o,liquidity:el(s.liquidity),amount0Min:el(d),amount1Min:el(p),deadline:i}]));var f=n.collectOptions,h=f.expectedCurrencyOwed0,m=f.expectedCurrencyOwed1,g=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(f,eP);return r.push.apply(r,e.encodeCollect(N({tokenId:el(n.tokenId),expectedCurrencyOwed0:h.add(a.ih.fromRawAmount(h.currency,d)),expectedCurrencyOwed1:m.add(a.ih.fromRawAmount(m.currency,p))},g))),n.liquidityPercentage.equalTo(V)?n.burnToken&&r.push(e.INTERFACE.encodeFunctionData("burn",[o])):!0!==n.burnToken||(0,l.Z)(!1),{calldata:eI.encodeMulticall(r),value:el(0)}},e.safeTransferFromParameters=function(t){var n=(0,a.qn)(t.recipient),r=(0,a.qn)(t.sender);return{calldata:t.data?e.INTERFACE.encodeFunctionData("safeTransferFrom(address,address,uint256,bytes)",[r,n,el(t.tokenId),t.data]):e.INTERFACE.encodeFunctionData("safeTransferFrom(address,address,uint256)",[r,n,el(t.tokenId)]),value:el(0)}},e.getPermitData=function(e,t,n){return{domain:{name:"Uniswap V3 Positions NFT-V1",chainId:n,version:"1",verifyingContract:t},types:eB,values:e}},e}();eM.INTERFACE=new d.vU(A.Mt);var eR=function(){function e(){}return e.quoteCallParameters=function(e,t,n,r){void 0===r&&(r={});var i=1===e.pools.length,o=el(t.quotient),s=r.useQuoterV2?this.V2INTERFACE:this.V1INTERFACE;if(i){var u,c,d,p={tokenIn:e.tokenPath[0].address,tokenOut:e.tokenPath[1].address,fee:e.pools[0].fee,sqrtPriceLimitX96:el(null!=(c=null==(d=r)?void 0:d.sqrtPriceLimitX96)?c:0)},f=N({},p,n===a.YL.EXACT_INPUT?{amountIn:o}:{amount:o}),h=[p.tokenIn,p.tokenOut,p.fee,o,p.sqrtPriceLimitX96],m=n===a.YL.EXACT_INPUT?"quoteExactInputSingle":"quoteExactOutputSingle";u=s.encodeFunctionData(m,r.useQuoterV2?[f]:h)}else{(null==(g=r)?void 0:g.sqrtPriceLimitX96)!==void 0&&(0,l.Z)(!1);var g,y=ec(e,n===a.YL.EXACT_OUTPUT),b=n===a.YL.EXACT_INPUT?"quoteExactInput":"quoteExactOutput";u=s.encodeFunctionData(b,[y,o])}return{calldata:u,value:el(0)}},e}();eR.V1INTERFACE=new d.vU(T.Mt),eR.V2INTERFACE=new d.vU(E.Mt);var eL=function(){function e(){}return e.encodeClaim=function(t,n){var r,i=[];i.push(e.INTERFACE.encodeFunctionData("unstakeToken",[this._encodeIncentiveKey(t),el(n.tokenId)]));var o=(0,a.qn)(n.recipient),s=null!=(r=n.amount)?r:0;return i.push(e.INTERFACE.encodeFunctionData("claimReward",[t.rewardToken.address,o,el(s)])),i},e.collectRewards=function(t,n){t=Array.isArray(t)?t:[t];for(var r=[],i=0;i1){for(var n,r=[],i=0;i0&&x>_&&w[k].length>0&&(k++,x=(e.length-2)/2,w[k]=[]),w[k]=[...w[k],{allowFailure:!0,callData:e,target:r}]}catch(a){let e=(0,c.S)(a,{abi:t,address:r,args:i,docsPath:"/docs/contract/multicall",functionName:o});if(!n)throw e;w[k]=[...w[k],{allowFailure:!0,callData:"0x",target:r}]}}let A=await Promise.allSettled(w.map(t=>(0,d.s)(e,p.L,"readContract")({abi:r.F8,address:v,args:[t],blockNumber:h,blockTag:m,functionName:"aggregate3",stateOverride:y}))),S=[];for(let e=0;e(0,i.A)(e,{...u,allowFailure:n,blockNumber:a,blockTag:s,chainId:Number.parseInt(t),contracts:r.map(({contract:e})=>e)})))).flat(),o=Object.values(t).flatMap(e=>e.map(({index:e})=>e));return r.reduce((e,t,n)=>(e&&(e[o[n]]=t),e),[])}catch(i){if(i instanceof r.uq)throw i;let t=()=>l.map(t=>(0,o.L)(e,{...t,blockNumber:a,blockTag:s}));if(n)return(await Promise.allSettled(t())).map(e=>"fulfilled"===e.status?{result:e.value,status:"success"}:{error:e.reason,result:void 0,status:"failure"});return await Promise.all(t())}}},93298:function(e,t,n){"use strict";n.d(t,{G:function(){return u}});var r,i,o=n(36922);let a=()=>`@wagmi/core@${o.i}`;var s=function(e,t,n,r){if("a"===n&&!r)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};class u extends Error{get docsBaseUrl(){return"https://wagmi.sh/core"}get version(){return a()}constructor(e,t={}){super(),r.add(this),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WagmiCoreError"});let n=t.cause instanceof u?t.cause.details:t.cause?.message?t.cause.message:t.details,i=t.cause instanceof u&&t.cause.docsPath||t.docsPath;this.message=[e||"An error occurred.","",...t.metaMessages?[...t.metaMessages,""]:[],...i?[`Docs: ${this.docsBaseUrl}${i}.html${t.docsSlug?`#${t.docsSlug}`:""}`]:[],...n?[`Details: ${n}`]:[],`Version: ${this.version}`].join("\n"),t.cause&&(this.cause=t.cause),this.details=n,this.docsPath=i,this.metaMessages=t.metaMessages,this.shortMessage=e}walk(e){return s(this,r,"m",i).call(this,this,e)}}r=new WeakSet,i=function e(t,n){return n?.(t)?t:t.cause?s(this,r,"m",e).call(this,t.cause,n):t}},31800:function(e,t,n){"use strict";n.d(t,{$S:function(){return l},JK:function(){return s},X4:function(){return i},XZ:function(){return u},aH:function(){return a},wi:function(){return o}});var r=n(93298);class i extends r.G{constructor(){super("Chain not configured."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainNotConfiguredError"})}}class o extends r.G{constructor(){super("Connector already connected."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorAlreadyConnectedError"})}}class a extends r.G{constructor(){super("Connector not connected."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorNotConnectedError"})}}class s extends r.G{constructor({address:e,connector:t}){super(`Account "${e}" not found for connector "${t.name}".`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorAccountNotFoundError"})}}class u extends r.G{constructor({connectionChainId:e,connectorChainId:t}){super(`The current chain of the connector (id: ${t}) does not match the connection's chain (id: ${e}).`,{metaMessages:[`Current Chain ID: ${t}`,`Expected Chain ID: ${e}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorChainMismatchError"})}}class l extends r.G{constructor({connector:e}){super(`Connector "${e.name}" unavailable while reconnecting.`,{details:"During the reconnection step, the only connector methods guaranteed to be available are: `id`, `name`, `type`, `uid`. All other methods are not guaranteed to be available until reconnection completes and connectors are fully restored. This error commonly occurs for connectors that asynchronously inject after reconnection has already started."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorUnavailableReconnectingError"})}}},28095:function(e,t,n){"use strict";n.d(t,{M:function(){return i},O:function(){return o}});var r=n(93298);class i extends r.G{constructor(){super("Provider not found."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ProviderNotFoundError"})}}class o extends r.G{constructor({connector:e}){super(`"${e.name}" does not support programmatic chain switching.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SwitchChainNotSupportedError"})}}},6591:function(e,t,n){"use strict";function r(e,t,n){let r=e[t.name];if("function"==typeof r)return r;let i=e[n];return"function"==typeof i?i:n=>t(e,n)}n.d(t,{s:function(){return r}})},36922:function(e,t,n){"use strict";n.d(t,{i:function(){return r}});let r="2.16.7"},46278:function(e,t,n){"use strict";let r;function i(e,t){return function(){return e.apply(t,arguments)}}n.d(t,{Z:function(){return e2}});let{toString:o}=Object.prototype,{getPrototypeOf:a}=Object,s=(Z=Object.create(null),e=>{let t=o.call(e);return Z[t]||(Z[t]=t.slice(8,-1).toLowerCase())}),u=e=>(e=e.toLowerCase(),t=>s(t)===e),l=e=>t=>typeof t===e,{isArray:c}=Array,d=l("undefined"),p=u("ArrayBuffer"),f=l("string"),h=l("function"),m=l("number"),g=e=>null!==e&&"object"==typeof e,y=e=>{if("object"!==s(e))return!1;let t=a(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},b=u("Date"),_=u("File"),v=u("Blob"),w=u("FileList"),k=e=>g(e)&&h(e.pipe),x=e=>{let t="[object FormData]";return e&&("function"==typeof FormData&&e instanceof FormData||o.call(e)===t||h(e.toString)&&e.toString()===t)},A=u("URLSearchParams"),S=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function I(e,t,{allOwnKeys:n=!1}={}){let r,i;if(null!=e){if("object"!=typeof e&&(e=[e]),c(e))for(r=0,i=e.length;r0;)if(t===(n=r[i]).toLowerCase())return n;return null}let E="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:n.g,P=e=>!d(e)&&e!==E,C=(e,t,n,{allOwnKeys:r}={})=>(I(t,(t,r)=>{n&&h(t)?e[r]=i(t,n):e[r]=t},{allOwnKeys:r}),e),O=e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),B=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},M=(e,t,n,r)=>{let i,o,s;let u={};if(t=t||{},null==e)return t;do{for(o=(i=Object.getOwnPropertyNames(e)).length;o-- >0;)s=i[o],(!r||r(s,e,t))&&!u[s]&&(t[s]=e[s],u[s]=!0);e=!1!==n&&a(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},R=(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;let r=e.indexOf(t,n);return -1!==r&&r===n},L=e=>{if(!e)return null;if(c(e))return e;let t=e.length;if(!m(t))return null;let n=Array(t);for(;t-- >0;)n[t]=e[t];return n},N=(Y="undefined"!=typeof Uint8Array&&a(Uint8Array),e=>Y&&e instanceof Y),D=(e,t)=>{let n;let r=e&&e[Symbol.iterator],i=r.call(e);for(;(n=i.next())&&!n.done;){let r=n.value;t.call(e,r[0],r[1])}},F=(e,t)=>{let n;let r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},q=u("HTMLFormElement"),j=e=>e.toLowerCase().replace(/[_-\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),U=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),z=u("RegExp"),V=(e,t)=>{let n=Object.getOwnPropertyDescriptors(e),r={};I(n,(n,i)=>{!1!==t(n,i,e)&&(r[i]=n)}),Object.defineProperties(e,r)},W=e=>{V(e,(t,n)=>{if(h(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;let r=e[n];if(h(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},$=(e,t)=>{let n={};return(e=>{e.forEach(e=>{n[e]=!0})})(c(e)?e:String(e).split(t)),n},K=()=>{},H=(e,t)=>Number.isFinite(e=+e)?e:t,G=e=>{let t=Array(10),n=(e,r)=>{if(g(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;let i=c(e)?[]:{};return I(e,(e,t)=>{let o=n(e,r+1);d(o)||(i[t]=o)}),t[r]=void 0,i}}return e};return n(e,0)};var Z,Y,X={isArray:c,isArrayBuffer:p,isBuffer:function(e){return null!==e&&!d(e)&&null!==e.constructor&&!d(e.constructor)&&h(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:x,isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&p(e.buffer)},isString:f,isNumber:m,isBoolean:e=>!0===e||!1===e,isObject:g,isPlainObject:y,isUndefined:d,isDate:b,isFile:_,isBlob:v,isRegExp:z,isFunction:h,isStream:k,isURLSearchParams:A,isTypedArray:N,isFileList:w,forEach:I,merge:function e(){let{caseless:t}=P(this)&&this||{},n={},r=(r,i)=>{let o=t&&T(n,i)||i;y(n[o])&&y(r)?n[o]=e(n[o],r):y(r)?n[o]=e({},r):c(r)?n[o]=r.slice():n[o]=r};for(let e=0,t=arguments.length;e{ee[e]={value:e}}),Object.defineProperties(Q,ee),Object.defineProperty(J,"isAxiosError",{value:!0}),Q.from=(e,t,n,r,i,o)=>{let a=Object.create(J);return X.toFlatObject(e,a,function(e){return e!==Error.prototype},e=>"isAxiosError"!==e),Q.call(a,e.message,t,n,r,i),a.cause=e,a.name=e.name,o&&Object.assign(a,o),a};var et=n(6230),en=n.n(et)(),er=n(48764).Buffer;function ei(e){return X.isPlainObject(e)||X.isArray(e)}function eo(e){return X.endsWith(e,"[]")?e.slice(0,-2):e}function ea(e,t,n){return e?e.concat(t).map(function(e,t){return e=eo(e),!n&&t?"["+e+"]":e}).join(n?".":""):t}let es=X.toFlatObject(X,{},null,function(e){return/^is[A-Z]/.test(e)});var eu=function(e,t,n){var r;if(!X.isObject(e))throw TypeError("target must be an object");t=t||new(en||FormData),n=X.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!X.isUndefined(t[e])});let i=n.metaTokens,o=n.visitor||d,a=n.dots,s=n.indexes,u=n.Blob||"undefined"!=typeof Blob&&Blob,l=u&&(r=t)&&X.isFunction(r.append)&&"FormData"===r[Symbol.toStringTag]&&r[Symbol.iterator];if(!X.isFunction(o))throw TypeError("visitor must be a function");function c(e){if(null===e)return"";if(X.isDate(e))return e.toISOString();if(!l&&X.isBlob(e))throw new Q("Blob is not supported. Use a Buffer instead.");return X.isArrayBuffer(e)||X.isTypedArray(e)?l&&"function"==typeof Blob?new Blob([e]):er.from(e):e}function d(e,n,r){let o=e;if(e&&!r&&"object"==typeof e){if(X.endsWith(n,"{}"))n=i?n:n.slice(0,-2),e=JSON.stringify(e);else{var u;if(X.isArray(e)&&(u=e,X.isArray(u)&&!u.some(ei))||X.isFileList(e)||X.endsWith(n,"[]")&&(o=X.toArray(e)))return n=eo(n),o.forEach(function(e,r){X.isUndefined(e)||null===e||t.append(!0===s?ea([n],r,a):null===s?n:n+"[]",c(e))}),!1}}return!!ei(e)||(t.append(ea(r,n,a),c(e)),!1)}let p=[],f=Object.assign(es,{defaultVisitor:d,convertValue:c,isVisitable:ei});if(!X.isObject(e))throw TypeError("data must be an object");return!function e(n,r){if(!X.isUndefined(n)){if(-1!==p.indexOf(n))throw Error("Circular reference detected in "+r.join("."));p.push(n),X.forEach(n,function(n,i){let a=!(X.isUndefined(n)||null===n)&&o.call(t,n,X.isString(i)?i.trim():i,r,f);!0===a&&e(n,r?r.concat(i):[i])}),p.pop()}}(e),t};function el(e){let t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\x00"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function ec(e,t){this._pairs=[],e&&eu(e,this,t)}let ed=ec.prototype;function ep(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ef(e,t,n){let r;if(!t)return e;let i=n&&n.encode||ep,o=n&&n.serialize;if(r=o?o(t,n):X.isURLSearchParams(t)?t.toString():new ec(t,n).toString(i)){let t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+r}return e}ed.append=function(e,t){this._pairs.push([e,t])},ed.toString=function(e){let t=e?function(t){return e.call(this,t,el)}:el;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};var eh=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){X.forEach(this.handlers,function(t){null!==t&&e(t)})}},em={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},eg="undefined"!=typeof URLSearchParams?URLSearchParams:ec,ey=FormData;let eb=("undefined"==typeof navigator||"ReactNative"!==(r=navigator.product)&&"NativeScript"!==r&&"NS"!==r)&&"undefined"!=typeof window&&"undefined"!=typeof document,e_="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts;var ev={isBrowser:!0,classes:{URLSearchParams:eg,FormData:ey,Blob},isStandardBrowserEnv:eb,isStandardBrowserWebWorkerEnv:e_,protocols:["http","https","file","blob","url","data"]},ew=function(e){if(X.isFormData(e)&&X.isFunction(e.entries)){let t={};return X.forEachEntry(e,(e,n)=>{!function e(t,n,r,i){let o=t[i++],a=Number.isFinite(+o),s=i>=t.length;if(o=!o&&X.isArray(r)?r.length:o,s)return X.hasOwnProp(r,o)?r[o]=[r[o],n]:r[o]=n,!a;r[o]&&X.isObject(r[o])||(r[o]=[]);let u=e(t,n,r[o],i);return u&&X.isArray(r[o])&&(r[o]=function(e){let t,n;let r={},i=Object.keys(e),o=i.length;for(t=0;t"[]"===e[0]?"":e[1]||e[0]),n,t,0)}),t}return null};let ek={"Content-Type":void 0},ex={transitional:em,adapter:["xhr","http"],transformRequest:[function(e,t){let n;let r=t.getContentType()||"",i=r.indexOf("application/json")>-1,o=X.isObject(e);o&&X.isHTMLForm(e)&&(e=new FormData(e));let a=X.isFormData(e);if(a)return i&&i?JSON.stringify(ew(e)):e;if(X.isArrayBuffer(e)||X.isBuffer(e)||X.isStream(e)||X.isFile(e)||X.isBlob(e))return e;if(X.isArrayBufferView(e))return e.buffer;if(X.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1){var s,u;return(s=e,u=this.formSerializer,eu(s,new ev.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return ev.isNode&&X.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},u))).toString()}if((n=X.isFileList(e))||r.indexOf("multipart/form-data")>-1){let t=this.env&&this.env.FormData;return eu(n?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||i?(t.setContentType("application/json",!1),function(e,t,n){if(X.isString(e))try{return(0,JSON.parse)(e),X.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){let t=this.transitional||ex.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(e&&X.isString(e)&&(n&&!this.responseType||r)){let n=t&&t.silentJSONParsing;try{return JSON.parse(e)}catch(e){if(!n&&r){if("SyntaxError"===e.name)throw Q.from(e,Q.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ev.classes.FormData,Blob:ev.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};X.forEach(["delete","get","head"],function(e){ex.headers[e]={}}),X.forEach(["post","put","patch"],function(e){ex.headers[e]=X.merge(ek)});let eA=X.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);var eS=e=>{let t,n,r;let i={};return e&&e.split("\n").forEach(function(e){r=e.indexOf(":"),t=e.substring(0,r).trim().toLowerCase(),n=e.substring(r+1).trim(),!t||i[t]&&eA[t]||("set-cookie"===t?i[t]?i[t].push(n):i[t]=[n]:i[t]=i[t]?i[t]+", "+n:n)}),i};let eI=Symbol("internals");function eT(e){return e&&String(e).trim().toLowerCase()}function eE(e){return!1===e||null==e?e:X.isArray(e)?e.map(eE):String(e)}function eP(e,t,n,r){if(X.isFunction(r))return r.call(this,t,n);if(X.isString(t)){if(X.isString(r))return -1!==t.indexOf(r);if(X.isRegExp(r))return r.test(t)}}class eC{constructor(e){e&&this.set(e)}set(e,t,n){let r=this;function i(e,t,n){let i=eT(t);if(!i)throw Error("header name must be a non-empty string");let o=X.findKey(r,i);o&&void 0!==r[o]&&!0!==n&&(void 0!==n||!1===r[o])||(r[o||t]=eE(e))}let o=(e,t)=>X.forEach(e,(e,n)=>i(e,n,t));if(X.isPlainObject(e)||e instanceof this.constructor)o(e,t);else{var a;X.isString(e)&&(e=e.trim())&&(a=e,!/^[-_a-zA-Z]+$/.test(a.trim()))?o(eS(e),t):null!=e&&i(t,e,n)}return this}get(e,t){if(e=eT(e)){let n=X.findKey(this,e);if(n){let e=this[n];if(!t)return e;if(!0===t)return function(e){let t;let n=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;for(;t=r.exec(e);)n[t[1]]=t[2];return n}(e);if(X.isFunction(t))return t.call(this,e,n);if(X.isRegExp(t))return t.exec(e);throw TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=eT(e)){let n=X.findKey(this,e);return!!(n&&(!t||eP(this,this[n],n,t)))}return!1}delete(e,t){let n=this,r=!1;function i(e){if(e=eT(e)){let i=X.findKey(n,e);i&&(!t||eP(n,n[i],i,t))&&(delete n[i],r=!0)}}return X.isArray(e)?e.forEach(i):i(e),r}clear(){return Object.keys(this).forEach(this.delete.bind(this))}normalize(e){let t=this,n={};return X.forEach(this,(r,i)=>{let o=X.findKey(n,i);if(o){t[o]=eE(r),delete t[i];return}let a=e?i.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n):String(i).trim();a!==i&&delete t[i],t[a]=eE(r),n[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let t=Object.create(null);return X.forEach(this,(n,r)=>{null!=n&&!1!==n&&(t[r]=e&&X.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){let n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){let t=this[eI]=this[eI]={accessors:{}},n=t.accessors,r=this.prototype;function i(e){let t=eT(e);n[t]||(!function(e,t){let n=X.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(e,n,i){return this[r].call(this,t,e,n,i)},configurable:!0})})}(r,e),n[t]=!0)}return X.isArray(e)?e.forEach(i):i(e),this}}function eO(e,t){let n=this||ex,r=t||n,i=eC.from(r.headers),o=r.data;return X.forEach(e,function(e){o=e.call(n,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function eB(e){return!!(e&&e.__CANCEL__)}function eM(e,t,n){Q.call(this,null==e?"canceled":e,Q.ERR_CANCELED,t,n),this.name="CanceledError"}eC.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),X.freezeMethods(eC.prototype),X.freezeMethods(eC),X.inherits(eM,Q,{__CANCEL__:!0});var eR=ev.isStandardBrowserEnv?{write:function(e,t,n,r,i,o){let a=[];a.push(e+"="+encodeURIComponent(t)),X.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),X.isString(r)&&a.push("path="+r),X.isString(i)&&a.push("domain="+i),!0===o&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){let t=document.cookie.match(RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function eL(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e:t}var eN=ev.isStandardBrowserEnv?function(){let e;let t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function r(e){let r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=r(window.location.href),function(t){let n=X.isString(t)?r(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0},eD=function(e,t){let n;e=e||10;let r=Array(e),i=Array(e),o=0,a=0;return t=void 0!==t?t:1e3,function(s){let u=Date.now(),l=i[a];n||(n=u),r[o]=s,i[o]=u;let c=a,d=0;for(;c!==o;)d+=r[c++],c%=e;if((o=(o+1)%e)===a&&(a=(a+1)%e),u-n{let o=i.loaded,a=i.lengthComputable?i.total:void 0,s=o-n,u=r(s);n=o;let l={loaded:o,total:a,progress:a?o/a:void 0,bytes:s,rate:u||void 0,estimated:u&&a&&o<=a?(a-o)/u:void 0,event:i};l[t?"download":"upload"]=!0,e(l)}}let eq="undefined"!=typeof XMLHttpRequest;var ej=eq&&function(e){return new Promise(function(t,n){let r,i=e.data,o=eC.from(e.headers).normalize(),a=e.responseType;function s(){e.cancelToken&&e.cancelToken.unsubscribe(r),e.signal&&e.signal.removeEventListener("abort",r)}X.isFormData(i)&&(ev.isStandardBrowserEnv||ev.isStandardBrowserWebWorkerEnv)&&o.setContentType(!1);let u=new XMLHttpRequest;if(e.auth){let t=e.auth.username||"",n=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(t+":"+n))}let l=eL(e.baseURL,e.url);function c(){if(!u)return;let r=eC.from("getAllResponseHeaders"in u&&u.getAllResponseHeaders()),i=a&&"text"!==a&&"json"!==a?u.response:u.responseText,o={data:i,status:u.status,statusText:u.statusText,headers:r,config:e,request:u};!function(e,t,n){let r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Q("Request failed with status code "+n.status,[Q.ERR_BAD_REQUEST,Q.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}(function(e){t(e),s()},function(e){n(e),s()},o),u=null}if(u.open(e.method.toUpperCase(),ef(l,e.params,e.paramsSerializer),!0),u.timeout=e.timeout,"onloadend"in u?u.onloadend=c:u.onreadystatechange=function(){u&&4===u.readyState&&(0!==u.status||u.responseURL&&0===u.responseURL.indexOf("file:"))&&setTimeout(c)},u.onabort=function(){u&&(n(new Q("Request aborted",Q.ECONNABORTED,e,u)),u=null)},u.onerror=function(){n(new Q("Network Error",Q.ERR_NETWORK,e,u)),u=null},u.ontimeout=function(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",r=e.transitional||em;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new Q(t,r.clarifyTimeoutError?Q.ETIMEDOUT:Q.ECONNABORTED,e,u)),u=null},ev.isStandardBrowserEnv){let t=(e.withCredentials||eN(l))&&e.xsrfCookieName&&eR.read(e.xsrfCookieName);t&&o.set(e.xsrfHeaderName,t)}void 0===i&&o.setContentType(null),"setRequestHeader"in u&&X.forEach(o.toJSON(),function(e,t){u.setRequestHeader(t,e)}),X.isUndefined(e.withCredentials)||(u.withCredentials=!!e.withCredentials),a&&"json"!==a&&(u.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&u.addEventListener("progress",eF(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&u.upload&&u.upload.addEventListener("progress",eF(e.onUploadProgress)),(e.cancelToken||e.signal)&&(r=t=>{u&&(n(!t||t.type?new eM(null,e,u):t),u.abort(),u=null)},e.cancelToken&&e.cancelToken.subscribe(r),e.signal&&(e.signal.aborted?r():e.signal.addEventListener("abort",r)));let d=function(e){let t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(l);if(d&&-1===ev.protocols.indexOf(d)){n(new Q("Unsupported protocol "+d+":",Q.ERR_BAD_REQUEST,e));return}u.send(i||null)})};let eU={http:null,xhr:ej};X.forEach(eU,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});var ez={getAdapter:e=>{let t,n;e=X.isArray(e)?e:[e];let{length:r}=e;for(let i=0;ie instanceof eC?e.toJSON():e;function eK(e,t){t=t||{};let n={};function r(e,t,n){return X.isPlainObject(e)&&X.isPlainObject(t)?X.merge.call({caseless:n},e,t):X.isPlainObject(t)?X.merge({},t):X.isArray(t)?t.slice():t}function i(e,t,n){return X.isUndefined(t)?X.isUndefined(e)?void 0:r(void 0,e,n):r(e,t,n)}function o(e,t){if(!X.isUndefined(t))return r(void 0,t)}function a(e,t){return X.isUndefined(t)?X.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function s(n,i,o){return o in t?r(n,i):o in e?r(void 0,n):void 0}let u={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(e,t)=>i(e$(e),e$(t),!0)};return X.forEach(Object.keys(e).concat(Object.keys(t)),function(r){let o=u[r]||i,a=o(e[r],t[r],r);X.isUndefined(a)&&o!==s||(n[r]=a)}),n}let eH="1.2.6",eG={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{eG[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});let eZ={};eG.transitional=function(e,t,n){function r(e,t){return"[Axios v"+eH+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,i,o)=>{if(!1===e)throw new Q(r(i," has been removed"+(t?" in "+t:"")),Q.ERR_DEPRECATED);return t&&!eZ[i]&&(eZ[i]=!0,console.warn(r(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,i,o)}};var eY={assertOptions:function(e,t,n){if("object"!=typeof e)throw new Q("options must be an object",Q.ERR_BAD_OPTION_VALUE);let r=Object.keys(e),i=r.length;for(;i-- >0;){let o=r[i],a=t[o];if(a){let t=e[o],n=void 0===t||a(t,o,e);if(!0!==n)throw new Q("option "+o+" must be "+n,Q.ERR_BAD_OPTION_VALUE);continue}if(!0!==n)throw new Q("Unknown option "+o,Q.ERR_BAD_OPTION)}},validators:eG};let eX=eY.validators;class eQ{constructor(e){this.defaults=e,this.interceptors={request:new eh,response:new eh}}request(e,t){let n,r,i;"string"==typeof e?(t=t||{}).url=e:t=e||{},t=eK(this.defaults,t);let{transitional:o,paramsSerializer:a,headers:s}=t;void 0!==o&&eY.assertOptions(o,{silentJSONParsing:eX.transitional(eX.boolean),forcedJSONParsing:eX.transitional(eX.boolean),clarifyTimeoutError:eX.transitional(eX.boolean)},!1),void 0!==a&&eY.assertOptions(a,{encode:eX.function,serialize:eX.function},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase(),(n=s&&X.merge(s.common,s[t.method]))&&X.forEach(["delete","get","head","post","put","patch","common"],e=>{delete s[e]}),t.headers=eC.concat(n,s);let u=[],l=!0;this.interceptors.request.forEach(function(e){("function"!=typeof e.runWhen||!1!==e.runWhen(t))&&(l=l&&e.synchronous,u.unshift(e.fulfilled,e.rejected))});let c=[];this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let d=0;if(!l){let e=[eW.bind(this),void 0];for(e.unshift.apply(e,u),e.push.apply(e,c),i=e.length,r=Promise.resolve(t);d{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t;let r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,i){n.reason||(n.reason=new eM(e,r,i),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;let t=new eJ(function(t){e=t});return{token:t,cancel:e}}}let e0={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(e0).forEach(([e,t])=>{e0[t]=e});let e1=function e(t){let n=new eQ(t),r=i(eQ.prototype.request,n);return X.extend(r,eQ.prototype,n,{allOwnKeys:!0}),X.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(eK(t,n))},r}(ex);e1.Axios=eQ,e1.CanceledError=eM,e1.CancelToken=eJ,e1.isCancel=eB,e1.VERSION=eH,e1.toFormData=eu,e1.AxiosError=Q,e1.Cancel=e1.CanceledError,e1.all=function(e){return Promise.all(e)},e1.spread=function(e){return function(t){return e.apply(null,t)}},e1.isAxiosError=function(e){return X.isObject(e)&&!0===e.isAxiosError},e1.mergeConfig=eK,e1.AxiosHeaders=eC,e1.formToJSON=e=>ew(X.isHTMLForm(e)?new FormData(e):e),e1.HttpStatusCode=e0,e1.default=e1;var e2=e1},58162:function(e,t,n){"use strict";var r=n(89509).Buffer;e.exports=function(e){if(e.length>=255)throw TypeError("Alphabet too long");for(var t=new Uint8Array(256),n=0;n>>0,c=new Uint8Array(a);e[n];){var d=t[e.charCodeAt(n)];if(255===d)return;for(var p=0,f=a-1;(0!==d||p>>0,c[f]=d%256>>>0,d=d/256>>>0;if(0!==d)throw Error("Non-zero carry");o=p,n++}for(var h=a-o;h!==a&&0===c[h];)h++;var m=r.allocUnsafe(i+(a-h));m.fill(0,0,i);for(var g=i;h!==a;)m[g++]=c[h++];return m}return{encode:function(t){if((Array.isArray(t)||t instanceof Uint8Array)&&(t=r.from(t)),!r.isBuffer(t))throw TypeError("Expected Buffer");if(0===t.length)return"";for(var n=0,i=0,o=0,a=t.length;o!==a&&0===t[o];)o++,n++;for(var l=(a-o)*c+1>>>0,d=new Uint8Array(l);o!==a;){for(var p=t[o],f=0,h=l-1;(0!==p||f>>0,d[h]=p%s>>>0,p=p/s>>>0;if(0!==p)throw Error("Non-zero carry");i=f,o++}for(var m=l-i;m!==l&&0===d[m];)m++;for(var g=u.repeat(n);m0?a-4:a;for(n=0;n>16&255,l[c++]=t>>8&255,l[c++]=255&t;return 2===s&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,l[c++]=255&t),1===s&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,l[c++]=t>>8&255,l[c++]=255&t),l},t.fromByteArray=function(e){for(var t,r=e.length,i=r%3,o=[],a=0,s=r-i;a>18&63]+n[i>>12&63]+n[i>>6&63]+n[63&i]);return o.join("")}(e,a,a+16383>s?s:a+16383));return 1===i?o.push(n[(t=e[r-1])>>2]+n[t<<4&63]+"=="):2===i&&o.push(n[(t=(e[r-2]<<8)+e[r-1])>>10]+n[t>>4&63]+n[t<<2&63]+"="),o.join("")};for(var n=[],r=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,s=o.length;a0)throw Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");-1===n&&(n=t);var r=n===t?0:4-n%4;return[n,r]}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},93302:function(e,t,n){var r;!function(i){"use strict";var o,a="[big.js] ",s=a+"Invalid ",u=s+"decimal places",l=s+"rounding mode",c=a+"Division by zero",d={},p=void 0,f=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;function h(e,t,n,r){var i=e.c,o=e.e+t+1;if(o=5;else if(2===n)r=i[o]>5||5==i[o]&&(r||o<0||i[o+1]!==p||1&i[o-1]);else if(3===n)r=r||!!i[0];else if(r=!1,0!==n)throw Error(l);if(o<1)i.length=1,r?(e.e=-t,i[0]=1):i[0]=e.e=0;else{if(i.length=o--,r)for(;++i[o]>9;)i[o]=0,o--||(++e.e,i.unshift(1));for(o=i.length;!i[--o];)i.pop()}}else if(n<0||n>3||n!==~~n)throw Error(l);return e}function m(e,t,n,r){var i,o,a=e.constructor,l=!e.c[0];if(n!==p){if(n!==~~n||n<(3==t)||n>1e6)throw Error(3==t?s+"precision":u);for(n=r-(e=new a(e)).e,e.c.length>++r&&h(e,n,a.RM),2==t&&(r=e.e+n+1);e.c.length=a.PE))o=o.charAt(0)+(n>1?"."+o.slice(1):"")+(i<0?"e":"e+")+i;else if(i<0){for(;++i;)o="0"+o;o="0."+o}else if(i>0){if(++i>n)for(i-=n;i--;)o+="0";else i1&&(o=o.charAt(0)+"."+o.slice(1));return e.s<0&&(!l||4==t)?"-"+o:o}d.abs=function(){var e=new this.constructor(this);return e.s=1,e},d.cmp=function(e){var t,n=this.c,r=(e=new this.constructor(e)).c,i=this.s,o=e.s,a=this.e,s=e.e;if(!n[0]||!r[0])return n[0]?i:r[0]?-o:0;if(i!=o)return i;if(t=i<0,a!=s)return a>s^t?1:-1;for(i=-1,o=(a=n.length)<(s=r.length)?a:s;++ir[i]^t?1:-1;return a==s?0:a>s^t?1:-1},d.div=function(e){var t=this.constructor,n=this.c,r=(e=new t(e)).c,i=this.s==e.s?1:-1,o=t.DP;if(o!==~~o||o<0||o>1e6)throw Error(u);if(!r[0])throw Error(c);if(!n[0])return new t(0*i);var a,s,l,d,f,m=r.slice(),g=a=r.length,y=n.length,b=n.slice(0,a),_=b.length,v=e,w=v.c=[],k=0,x=o+(v.e=this.e-e.e)+1;for(v.s=i,i=x<0?0:x,m.unshift(0);_++_?1:-1;else for(f=-1,d=0;++fb[f]?1:-1;break}if(d<0){for(s=_==a?r:m;_;){if(b[--_]x&&h(v,o,t.RM,b[0]!==p),v},d.eq=function(e){return!this.cmp(e)},d.gt=function(e){return this.cmp(e)>0},d.gte=function(e){return this.cmp(e)>-1},d.lt=function(e){return 0>this.cmp(e)},d.lte=function(e){return 1>this.cmp(e)},d.minus=d.sub=function(e){var t,n,r,i,o=this.constructor,a=this.s,s=(e=new o(e)).s;if(a!=s)return e.s=-s,this.plus(e);var u=this.c.slice(),l=this.e,c=e.c,d=e.e;if(!u[0]||!c[0])return c[0]?(e.s=-s,e):new o(u[0]?this:0);if(a=l-d){for((i=a<0)?(a=-a,r=u):(d=l,r=c),r.reverse(),s=a;s--;)r.push(0);r.reverse()}else for(n=((i=u.length0)for(;s--;)u[t++]=0;for(s=t;n>a;){if(u[--n]0?(s=o,t=u):(r=-r,t=a),t.reverse();r--;)t.push(0);t.reverse()}for(a.length-u.length<0&&(t=u,u=a,a=t),r=u.length,i=0;r;a[r]%=10)i=(a[--r]=a[r]+u[r]+i)/10|0;for(i&&(a.unshift(i),++s),r=a.length;0===a[--r];)a.pop();return e.c=a,e.e=s,e},d.pow=function(e){var t=this,n=new t.constructor(1),r=n,i=e<0;if(e!==~~e||e<-1e6||e>1e6)throw Error(s+"exponent");for(i&&(e=-e);1&e&&(r=r.times(t)),e>>=1;)t=t.times(t);return i?n.div(r):r},d.round=function(e,t){var n=this.constructor;if(e===p)e=0;else if(e!==~~e||e<-1e6||e>1e6)throw Error(u);return h(new n(this),e,t===p?n.RM:t)},d.sqrt=function(){var e,t,n,r=this.constructor,i=this.s,o=this.e,s=new r(.5);if(!this.c[0])return new r(this);if(i<0)throw Error(a+"No square root");0===(i=Math.sqrt(this+""))||i===1/0?((t=this.c.join("")).length+o&1||(t+="0"),i=Math.sqrt(t),o=((o+1)/2|0)-(o<0||1&o),e=new r((i==1/0?"1e":(i=i.toExponential()).slice(0,i.indexOf("e")+1))+o)):e=new r(i),o=e.e+(r.DP+=4);do n=e,e=s.times(n.plus(this.div(n)));while(n.c.slice(0,o).join("")!==e.c.slice(0,o).join(""));return h(e,r.DP-=4,r.RM)},d.times=d.mul=function(e){var t,n=this.constructor,r=this.c,i=(e=new n(e)).c,o=r.length,a=i.length,s=this.e,u=e.e;if(e.s=this.s==e.s?1:-1,!r[0]||!i[0])return new n(0*e.s);for(e.e=s+u,os;)a=t[u]+i[s]*r[u-s-1]+a,t[u--]=a%10,a=a/10|0;t[u]=(t[u]+a)%10}for(a?++e.e:t.shift(),s=t.length;!t[--s];)t.pop();return e.c=t,e},d.toExponential=function(e){return m(this,1,e,e)},d.toFixed=function(e){return m(this,2,e,this.e+e)},d.toPrecision=function(e){return m(this,3,e,e-1)},d.toString=function(){return m(this)},d.valueOf=d.toJSON=function(){return m(this,4)},(o=function e(){function t(n){var r=this;if(!(r instanceof t))return n===p?e():new t(n);n instanceof t?(r.s=n.s,r.e=n.e,r.c=n.c.slice()):function(e,t){var n,r,i;if(0===t&&1/t<0)t="-0";else if(!f.test(t+=""))throw Error(s+"number");for(e.s="-"==t.charAt(0)?(t=t.slice(1),-1):1,(n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),i=t.length,r=0;r0&&"0"==t.charAt(--i););for(e.e=n-r-1,e.c=[],n=0;r<=i;)e.c[n++]=+t.charAt(r++)}return e}(r,n),r.constructor=t}return t.prototype=d,t.DP=20,t.RM=1,t.NE=-7,t.PE=21,t.version="5.2.2",t}()).default=o.Big=o,void 0!==(r=(function(){return o}).call(t,n,t,e))&&(e.exports=r)}(0)},40475:function(e,t,n){"use strict";var r=n(48764).Buffer;t.oU=function(e){{let t=r.from(e);t.reverse();let n=t.toString("hex");return 0===n.length?BigInt(0):BigInt(`0x${n}`)}},t.Q5=function(e){{let t=e.toString("hex");return 0===t.length?BigInt(0):BigInt(`0x${t}`)}},t.k$=function(e,t){{let n=e.toString(16),i=r.from(n.padStart(2*t,"0").slice(0,2*t),"hex");return i.reverse(),i}},t.zP=function(e,t){{let n=e.toString(16);return r.from(n.padStart(2*t,"0").slice(0,2*t),"hex")}}},13550:function(e,t,n){!function(e,t){"use strict";function r(e,t){if(!e)throw Error(t||"Assertion failed")}function i(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function o(e,t,n){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&(("le"===t||"be"===t)&&(n=t,t=10),this._init(e||0,t||10,n||"be"))}"object"==typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{d="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:n(46601).Buffer}catch(e){}function a(e,t){var n=e.charCodeAt(t);return n>=48&&n<=57?n-48:n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:void r(!1,"Invalid character in "+e)}function s(e,t,n){var r=a(e,n);return n-1>=t&&(r|=a(e,n-1)<<4),r}function u(e,t,n,i){for(var o=0,a=0,s=Math.min(e.length,n),u=t;u=49?l-49+10:l>=17?l-17+10:l,r(l>=0&&a0?e:t},o.min=function(e,t){return 0>e.cmp(t)?e:t},o.prototype._init=function(e,t,n){if("number"==typeof e)return this._initNumber(e,t,n);if("object"==typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;a-=3)o=e[a]|e[a-1]<<8|e[a-2]<<16,this.words[i]|=o<>>26-s&67108863,(s+=24)>=26&&(s-=26,i++);else if("le"===n)for(a=0,i=0;a>>26-s&67108863,(s+=24)>=26&&(s-=26,i++);return this._strip()},o.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=Array(this.length);for(var r,i=0;i=t;i-=2)r=s(e,t,i)<=18?(o-=18,a+=1,this.words[a]|=r>>>26):o+=8;else for(i=(e.length-t)%2==0?t+1:t;i=18?(o-=18,a+=1,this.words[a]|=r>>>26):o+=8;this._strip()},o.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=t)r++;r--,i=i/t|0;for(var o=e.length-n,a=o%r,s=Math.min(o,o-a)+n,l=0,c=n;c1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=c}catch(e){o.prototype.inspect=c}else o.prototype.inspect=c;function c(){return(this.red?""}var d,p=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],h=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function m(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var i=0|e.words[0],o=0|t.words[0],a=i*o,s=67108863&a,u=a/67108864|0;n.words[0]=s;for(var l=1;l>>26,d=67108863&u,p=Math.min(l,t.length-1),f=Math.max(0,l-e.length+1);f<=p;f++){var h=l-f|0;c+=(a=(i=0|e.words[h])*(o=0|t.words[f])+d)/67108864|0,d=67108863&a}n.words[l]=0|d,u=0|c}return 0!==u?n.words[l]=0|u:n.length--,n._strip()}o.prototype.toString=function(e,t){if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var n,i=0,o=0,a=0;a>>24-i&16777215,(i+=2)>=26&&(i-=26,a--),n=0!==o||a!==this.length-1?p[6-u.length]+u+n:u+n}for(0!==o&&(n=o.toString(16)+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var l=f[e],c=h[e];n="";var d=this.clone();for(d.negative=0;!d.isZero();){var m=d.modrn(c).toString(e);n=(d=d.idivn(c)).isZero()?m+n:p[l-m.length]+m+n}for(this.isZero()&&(n="0"+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16,2)},d&&(o.prototype.toBuffer=function(e,t){return this.toArrayLike(d,e,t)}),o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,n){this._strip();var i=this.byteLength(),o=n||Math.max(1,i);r(i<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0");var a=e.allocUnsafe?e.allocUnsafe(o):new e(o);return this["_toArrayLike"+("le"===t?"LE":"BE")](a,i),a},o.prototype._toArrayLikeLE=function(e,t){for(var n=0,r=0,i=0,o=0;i>8&255),n>16&255),6===o?(n>24&255),r=0,o=0):(r=a>>>24,o+=2)}if(n=0&&(e[n--]=a>>8&255),n>=0&&(e[n--]=a>>16&255),6===o?(n>=0&&(e[n--]=a>>24&255),r=0,o=0):(r=a>>>24,o+=2)}if(n>=0)for(e[n--]=r;n>=0;)e[n--]=0},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return(8191&t)==0&&(n+=13,t>>>=13),(127&t)==0&&(n+=7,t>>>=7),(15&t)==0&&(n+=4,t>>>=4),(3&t)==0&&(n+=2,t>>>=2),(1&t)==0&&n++,n},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return(this.length-1)*26+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;ne.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){this.length>e.length?(t=this,n=e):(t=e,n=this);for(var t,n,r=0;re.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){r("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-n),this._strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);var n=e/26|0,i=e%26;return this._expand(n+1),t?this.words[n]=this.words[n]|1<e.length?(n=this,r=e):(n=e,r=this);for(var t,n,r,i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;oe.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t,n,r=this.iadd(e);return e.negative=1,r._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(t=this,n=e):(t=e,n=this);for(var o=0,a=0;a>26,this.words[a]=67108863&r;for(;0!==o&&a>26,this.words[a]=67108863&r;if(0===o&&a>>13,f=0|a[1],h=8191&f,m=f>>>13,g=0|a[2],y=8191&g,b=g>>>13,_=0|a[3],v=8191&_,w=_>>>13,k=0|a[4],x=8191&k,A=k>>>13,S=0|a[5],I=8191&S,T=S>>>13,E=0|a[6],P=8191&E,C=E>>>13,O=0|a[7],B=8191&O,M=O>>>13,R=0|a[8],L=8191&R,N=R>>>13,D=0|a[9],F=8191&D,q=D>>>13,j=0|s[0],U=8191&j,z=j>>>13,V=0|s[1],W=8191&V,$=V>>>13,K=0|s[2],H=8191&K,G=K>>>13,Z=0|s[3],Y=8191&Z,X=Z>>>13,Q=0|s[4],J=8191&Q,ee=Q>>>13,et=0|s[5],en=8191&et,er=et>>>13,ei=0|s[6],eo=8191&ei,ea=ei>>>13,es=0|s[7],eu=8191&es,el=es>>>13,ec=0|s[8],ed=8191&ec,ep=ec>>>13,ef=0|s[9],eh=8191&ef,em=ef>>>13;n.negative=e.negative^t.negative,n.length=19;var eg=(l+(r=Math.imul(d,U))|0)+((8191&(i=(i=Math.imul(d,z))+Math.imul(p,U)|0))<<13)|0;l=((o=Math.imul(p,z))+(i>>>13)|0)+(eg>>>26)|0,eg&=67108863,r=Math.imul(h,U),i=(i=Math.imul(h,z))+Math.imul(m,U)|0,o=Math.imul(m,z);var ey=(l+(r=r+Math.imul(d,W)|0)|0)+((8191&(i=(i=i+Math.imul(d,$)|0)+Math.imul(p,W)|0))<<13)|0;l=((o=o+Math.imul(p,$)|0)+(i>>>13)|0)+(ey>>>26)|0,ey&=67108863,r=Math.imul(y,U),i=(i=Math.imul(y,z))+Math.imul(b,U)|0,o=Math.imul(b,z),r=r+Math.imul(h,W)|0,i=(i=i+Math.imul(h,$)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,$)|0;var eb=(l+(r=r+Math.imul(d,H)|0)|0)+((8191&(i=(i=i+Math.imul(d,G)|0)+Math.imul(p,H)|0))<<13)|0;l=((o=o+Math.imul(p,G)|0)+(i>>>13)|0)+(eb>>>26)|0,eb&=67108863,r=Math.imul(v,U),i=(i=Math.imul(v,z))+Math.imul(w,U)|0,o=Math.imul(w,z),r=r+Math.imul(y,W)|0,i=(i=i+Math.imul(y,$)|0)+Math.imul(b,W)|0,o=o+Math.imul(b,$)|0,r=r+Math.imul(h,H)|0,i=(i=i+Math.imul(h,G)|0)+Math.imul(m,H)|0,o=o+Math.imul(m,G)|0;var e_=(l+(r=r+Math.imul(d,Y)|0)|0)+((8191&(i=(i=i+Math.imul(d,X)|0)+Math.imul(p,Y)|0))<<13)|0;l=((o=o+Math.imul(p,X)|0)+(i>>>13)|0)+(e_>>>26)|0,e_&=67108863,r=Math.imul(x,U),i=(i=Math.imul(x,z))+Math.imul(A,U)|0,o=Math.imul(A,z),r=r+Math.imul(v,W)|0,i=(i=i+Math.imul(v,$)|0)+Math.imul(w,W)|0,o=o+Math.imul(w,$)|0,r=r+Math.imul(y,H)|0,i=(i=i+Math.imul(y,G)|0)+Math.imul(b,H)|0,o=o+Math.imul(b,G)|0,r=r+Math.imul(h,Y)|0,i=(i=i+Math.imul(h,X)|0)+Math.imul(m,Y)|0,o=o+Math.imul(m,X)|0;var ev=(l+(r=r+Math.imul(d,J)|0)|0)+((8191&(i=(i=i+Math.imul(d,ee)|0)+Math.imul(p,J)|0))<<13)|0;l=((o=o+Math.imul(p,ee)|0)+(i>>>13)|0)+(ev>>>26)|0,ev&=67108863,r=Math.imul(I,U),i=(i=Math.imul(I,z))+Math.imul(T,U)|0,o=Math.imul(T,z),r=r+Math.imul(x,W)|0,i=(i=i+Math.imul(x,$)|0)+Math.imul(A,W)|0,o=o+Math.imul(A,$)|0,r=r+Math.imul(v,H)|0,i=(i=i+Math.imul(v,G)|0)+Math.imul(w,H)|0,o=o+Math.imul(w,G)|0,r=r+Math.imul(y,Y)|0,i=(i=i+Math.imul(y,X)|0)+Math.imul(b,Y)|0,o=o+Math.imul(b,X)|0,r=r+Math.imul(h,J)|0,i=(i=i+Math.imul(h,ee)|0)+Math.imul(m,J)|0,o=o+Math.imul(m,ee)|0;var ew=(l+(r=r+Math.imul(d,en)|0)|0)+((8191&(i=(i=i+Math.imul(d,er)|0)+Math.imul(p,en)|0))<<13)|0;l=((o=o+Math.imul(p,er)|0)+(i>>>13)|0)+(ew>>>26)|0,ew&=67108863,r=Math.imul(P,U),i=(i=Math.imul(P,z))+Math.imul(C,U)|0,o=Math.imul(C,z),r=r+Math.imul(I,W)|0,i=(i=i+Math.imul(I,$)|0)+Math.imul(T,W)|0,o=o+Math.imul(T,$)|0,r=r+Math.imul(x,H)|0,i=(i=i+Math.imul(x,G)|0)+Math.imul(A,H)|0,o=o+Math.imul(A,G)|0,r=r+Math.imul(v,Y)|0,i=(i=i+Math.imul(v,X)|0)+Math.imul(w,Y)|0,o=o+Math.imul(w,X)|0,r=r+Math.imul(y,J)|0,i=(i=i+Math.imul(y,ee)|0)+Math.imul(b,J)|0,o=o+Math.imul(b,ee)|0,r=r+Math.imul(h,en)|0,i=(i=i+Math.imul(h,er)|0)+Math.imul(m,en)|0,o=o+Math.imul(m,er)|0;var ek=(l+(r=r+Math.imul(d,eo)|0)|0)+((8191&(i=(i=i+Math.imul(d,ea)|0)+Math.imul(p,eo)|0))<<13)|0;l=((o=o+Math.imul(p,ea)|0)+(i>>>13)|0)+(ek>>>26)|0,ek&=67108863,r=Math.imul(B,U),i=(i=Math.imul(B,z))+Math.imul(M,U)|0,o=Math.imul(M,z),r=r+Math.imul(P,W)|0,i=(i=i+Math.imul(P,$)|0)+Math.imul(C,W)|0,o=o+Math.imul(C,$)|0,r=r+Math.imul(I,H)|0,i=(i=i+Math.imul(I,G)|0)+Math.imul(T,H)|0,o=o+Math.imul(T,G)|0,r=r+Math.imul(x,Y)|0,i=(i=i+Math.imul(x,X)|0)+Math.imul(A,Y)|0,o=o+Math.imul(A,X)|0,r=r+Math.imul(v,J)|0,i=(i=i+Math.imul(v,ee)|0)+Math.imul(w,J)|0,o=o+Math.imul(w,ee)|0,r=r+Math.imul(y,en)|0,i=(i=i+Math.imul(y,er)|0)+Math.imul(b,en)|0,o=o+Math.imul(b,er)|0,r=r+Math.imul(h,eo)|0,i=(i=i+Math.imul(h,ea)|0)+Math.imul(m,eo)|0,o=o+Math.imul(m,ea)|0;var ex=(l+(r=r+Math.imul(d,eu)|0)|0)+((8191&(i=(i=i+Math.imul(d,el)|0)+Math.imul(p,eu)|0))<<13)|0;l=((o=o+Math.imul(p,el)|0)+(i>>>13)|0)+(ex>>>26)|0,ex&=67108863,r=Math.imul(L,U),i=(i=Math.imul(L,z))+Math.imul(N,U)|0,o=Math.imul(N,z),r=r+Math.imul(B,W)|0,i=(i=i+Math.imul(B,$)|0)+Math.imul(M,W)|0,o=o+Math.imul(M,$)|0,r=r+Math.imul(P,H)|0,i=(i=i+Math.imul(P,G)|0)+Math.imul(C,H)|0,o=o+Math.imul(C,G)|0,r=r+Math.imul(I,Y)|0,i=(i=i+Math.imul(I,X)|0)+Math.imul(T,Y)|0,o=o+Math.imul(T,X)|0,r=r+Math.imul(x,J)|0,i=(i=i+Math.imul(x,ee)|0)+Math.imul(A,J)|0,o=o+Math.imul(A,ee)|0,r=r+Math.imul(v,en)|0,i=(i=i+Math.imul(v,er)|0)+Math.imul(w,en)|0,o=o+Math.imul(w,er)|0,r=r+Math.imul(y,eo)|0,i=(i=i+Math.imul(y,ea)|0)+Math.imul(b,eo)|0,o=o+Math.imul(b,ea)|0,r=r+Math.imul(h,eu)|0,i=(i=i+Math.imul(h,el)|0)+Math.imul(m,eu)|0,o=o+Math.imul(m,el)|0;var eA=(l+(r=r+Math.imul(d,ed)|0)|0)+((8191&(i=(i=i+Math.imul(d,ep)|0)+Math.imul(p,ed)|0))<<13)|0;l=((o=o+Math.imul(p,ep)|0)+(i>>>13)|0)+(eA>>>26)|0,eA&=67108863,r=Math.imul(F,U),i=(i=Math.imul(F,z))+Math.imul(q,U)|0,o=Math.imul(q,z),r=r+Math.imul(L,W)|0,i=(i=i+Math.imul(L,$)|0)+Math.imul(N,W)|0,o=o+Math.imul(N,$)|0,r=r+Math.imul(B,H)|0,i=(i=i+Math.imul(B,G)|0)+Math.imul(M,H)|0,o=o+Math.imul(M,G)|0,r=r+Math.imul(P,Y)|0,i=(i=i+Math.imul(P,X)|0)+Math.imul(C,Y)|0,o=o+Math.imul(C,X)|0,r=r+Math.imul(I,J)|0,i=(i=i+Math.imul(I,ee)|0)+Math.imul(T,J)|0,o=o+Math.imul(T,ee)|0,r=r+Math.imul(x,en)|0,i=(i=i+Math.imul(x,er)|0)+Math.imul(A,en)|0,o=o+Math.imul(A,er)|0,r=r+Math.imul(v,eo)|0,i=(i=i+Math.imul(v,ea)|0)+Math.imul(w,eo)|0,o=o+Math.imul(w,ea)|0,r=r+Math.imul(y,eu)|0,i=(i=i+Math.imul(y,el)|0)+Math.imul(b,eu)|0,o=o+Math.imul(b,el)|0,r=r+Math.imul(h,ed)|0,i=(i=i+Math.imul(h,ep)|0)+Math.imul(m,ed)|0,o=o+Math.imul(m,ep)|0;var eS=(l+(r=r+Math.imul(d,eh)|0)|0)+((8191&(i=(i=i+Math.imul(d,em)|0)+Math.imul(p,eh)|0))<<13)|0;l=((o=o+Math.imul(p,em)|0)+(i>>>13)|0)+(eS>>>26)|0,eS&=67108863,r=Math.imul(F,W),i=(i=Math.imul(F,$))+Math.imul(q,W)|0,o=Math.imul(q,$),r=r+Math.imul(L,H)|0,i=(i=i+Math.imul(L,G)|0)+Math.imul(N,H)|0,o=o+Math.imul(N,G)|0,r=r+Math.imul(B,Y)|0,i=(i=i+Math.imul(B,X)|0)+Math.imul(M,Y)|0,o=o+Math.imul(M,X)|0,r=r+Math.imul(P,J)|0,i=(i=i+Math.imul(P,ee)|0)+Math.imul(C,J)|0,o=o+Math.imul(C,ee)|0,r=r+Math.imul(I,en)|0,i=(i=i+Math.imul(I,er)|0)+Math.imul(T,en)|0,o=o+Math.imul(T,er)|0,r=r+Math.imul(x,eo)|0,i=(i=i+Math.imul(x,ea)|0)+Math.imul(A,eo)|0,o=o+Math.imul(A,ea)|0,r=r+Math.imul(v,eu)|0,i=(i=i+Math.imul(v,el)|0)+Math.imul(w,eu)|0,o=o+Math.imul(w,el)|0,r=r+Math.imul(y,ed)|0,i=(i=i+Math.imul(y,ep)|0)+Math.imul(b,ed)|0,o=o+Math.imul(b,ep)|0;var eI=(l+(r=r+Math.imul(h,eh)|0)|0)+((8191&(i=(i=i+Math.imul(h,em)|0)+Math.imul(m,eh)|0))<<13)|0;l=((o=o+Math.imul(m,em)|0)+(i>>>13)|0)+(eI>>>26)|0,eI&=67108863,r=Math.imul(F,H),i=(i=Math.imul(F,G))+Math.imul(q,H)|0,o=Math.imul(q,G),r=r+Math.imul(L,Y)|0,i=(i=i+Math.imul(L,X)|0)+Math.imul(N,Y)|0,o=o+Math.imul(N,X)|0,r=r+Math.imul(B,J)|0,i=(i=i+Math.imul(B,ee)|0)+Math.imul(M,J)|0,o=o+Math.imul(M,ee)|0,r=r+Math.imul(P,en)|0,i=(i=i+Math.imul(P,er)|0)+Math.imul(C,en)|0,o=o+Math.imul(C,er)|0,r=r+Math.imul(I,eo)|0,i=(i=i+Math.imul(I,ea)|0)+Math.imul(T,eo)|0,o=o+Math.imul(T,ea)|0,r=r+Math.imul(x,eu)|0,i=(i=i+Math.imul(x,el)|0)+Math.imul(A,eu)|0,o=o+Math.imul(A,el)|0,r=r+Math.imul(v,ed)|0,i=(i=i+Math.imul(v,ep)|0)+Math.imul(w,ed)|0,o=o+Math.imul(w,ep)|0;var eT=(l+(r=r+Math.imul(y,eh)|0)|0)+((8191&(i=(i=i+Math.imul(y,em)|0)+Math.imul(b,eh)|0))<<13)|0;l=((o=o+Math.imul(b,em)|0)+(i>>>13)|0)+(eT>>>26)|0,eT&=67108863,r=Math.imul(F,Y),i=(i=Math.imul(F,X))+Math.imul(q,Y)|0,o=Math.imul(q,X),r=r+Math.imul(L,J)|0,i=(i=i+Math.imul(L,ee)|0)+Math.imul(N,J)|0,o=o+Math.imul(N,ee)|0,r=r+Math.imul(B,en)|0,i=(i=i+Math.imul(B,er)|0)+Math.imul(M,en)|0,o=o+Math.imul(M,er)|0,r=r+Math.imul(P,eo)|0,i=(i=i+Math.imul(P,ea)|0)+Math.imul(C,eo)|0,o=o+Math.imul(C,ea)|0,r=r+Math.imul(I,eu)|0,i=(i=i+Math.imul(I,el)|0)+Math.imul(T,eu)|0,o=o+Math.imul(T,el)|0,r=r+Math.imul(x,ed)|0,i=(i=i+Math.imul(x,ep)|0)+Math.imul(A,ed)|0,o=o+Math.imul(A,ep)|0;var eE=(l+(r=r+Math.imul(v,eh)|0)|0)+((8191&(i=(i=i+Math.imul(v,em)|0)+Math.imul(w,eh)|0))<<13)|0;l=((o=o+Math.imul(w,em)|0)+(i>>>13)|0)+(eE>>>26)|0,eE&=67108863,r=Math.imul(F,J),i=(i=Math.imul(F,ee))+Math.imul(q,J)|0,o=Math.imul(q,ee),r=r+Math.imul(L,en)|0,i=(i=i+Math.imul(L,er)|0)+Math.imul(N,en)|0,o=o+Math.imul(N,er)|0,r=r+Math.imul(B,eo)|0,i=(i=i+Math.imul(B,ea)|0)+Math.imul(M,eo)|0,o=o+Math.imul(M,ea)|0,r=r+Math.imul(P,eu)|0,i=(i=i+Math.imul(P,el)|0)+Math.imul(C,eu)|0,o=o+Math.imul(C,el)|0,r=r+Math.imul(I,ed)|0,i=(i=i+Math.imul(I,ep)|0)+Math.imul(T,ed)|0,o=o+Math.imul(T,ep)|0;var eP=(l+(r=r+Math.imul(x,eh)|0)|0)+((8191&(i=(i=i+Math.imul(x,em)|0)+Math.imul(A,eh)|0))<<13)|0;l=((o=o+Math.imul(A,em)|0)+(i>>>13)|0)+(eP>>>26)|0,eP&=67108863,r=Math.imul(F,en),i=(i=Math.imul(F,er))+Math.imul(q,en)|0,o=Math.imul(q,er),r=r+Math.imul(L,eo)|0,i=(i=i+Math.imul(L,ea)|0)+Math.imul(N,eo)|0,o=o+Math.imul(N,ea)|0,r=r+Math.imul(B,eu)|0,i=(i=i+Math.imul(B,el)|0)+Math.imul(M,eu)|0,o=o+Math.imul(M,el)|0,r=r+Math.imul(P,ed)|0,i=(i=i+Math.imul(P,ep)|0)+Math.imul(C,ed)|0,o=o+Math.imul(C,ep)|0;var eC=(l+(r=r+Math.imul(I,eh)|0)|0)+((8191&(i=(i=i+Math.imul(I,em)|0)+Math.imul(T,eh)|0))<<13)|0;l=((o=o+Math.imul(T,em)|0)+(i>>>13)|0)+(eC>>>26)|0,eC&=67108863,r=Math.imul(F,eo),i=(i=Math.imul(F,ea))+Math.imul(q,eo)|0,o=Math.imul(q,ea),r=r+Math.imul(L,eu)|0,i=(i=i+Math.imul(L,el)|0)+Math.imul(N,eu)|0,o=o+Math.imul(N,el)|0,r=r+Math.imul(B,ed)|0,i=(i=i+Math.imul(B,ep)|0)+Math.imul(M,ed)|0,o=o+Math.imul(M,ep)|0;var eO=(l+(r=r+Math.imul(P,eh)|0)|0)+((8191&(i=(i=i+Math.imul(P,em)|0)+Math.imul(C,eh)|0))<<13)|0;l=((o=o+Math.imul(C,em)|0)+(i>>>13)|0)+(eO>>>26)|0,eO&=67108863,r=Math.imul(F,eu),i=(i=Math.imul(F,el))+Math.imul(q,eu)|0,o=Math.imul(q,el),r=r+Math.imul(L,ed)|0,i=(i=i+Math.imul(L,ep)|0)+Math.imul(N,ed)|0,o=o+Math.imul(N,ep)|0;var eB=(l+(r=r+Math.imul(B,eh)|0)|0)+((8191&(i=(i=i+Math.imul(B,em)|0)+Math.imul(M,eh)|0))<<13)|0;l=((o=o+Math.imul(M,em)|0)+(i>>>13)|0)+(eB>>>26)|0,eB&=67108863,r=Math.imul(F,ed),i=(i=Math.imul(F,ep))+Math.imul(q,ed)|0,o=Math.imul(q,ep);var eM=(l+(r=r+Math.imul(L,eh)|0)|0)+((8191&(i=(i=i+Math.imul(L,em)|0)+Math.imul(N,eh)|0))<<13)|0;l=((o=o+Math.imul(N,em)|0)+(i>>>13)|0)+(eM>>>26)|0,eM&=67108863;var eR=(l+(r=Math.imul(F,eh))|0)+((8191&(i=(i=Math.imul(F,em))+Math.imul(q,eh)|0))<<13)|0;return l=((o=Math.imul(q,em))+(i>>>13)|0)+(eR>>>26)|0,eR&=67108863,u[0]=eg,u[1]=ey,u[2]=eb,u[3]=e_,u[4]=ev,u[5]=ew,u[6]=ek,u[7]=ex,u[8]=eA,u[9]=eS,u[10]=eI,u[11]=eT,u[12]=eE,u[13]=eP,u[14]=eC,u[15]=eO,u[16]=eB,u[17]=eM,u[18]=eR,0!==l&&(u[19]=l,n.length++),n};function y(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}n.words[o]=s,r=a,a=i}return 0!==r?n.words[o]=r:n.length--,n._strip()}function b(e,t){this.x=e,this.y=t}Math.imul||(g=m),o.prototype.mulTo=function(e,t){var n,r=this.length+e.length;return 10===this.length&&10===e.length?g(this,e,t):r<63?m(this,e,t):y(this,e,t)},b.prototype.makeRBT=function(e){for(var t=Array(e),n=o.prototype._countBits(e)-1,r=0;r>=1;return r},b.prototype.permute=function(e,t,n,r,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,n[2*a+1]=8191&o,o>>>=13;for(a=2*t;a>=26,n+=(o/67108864|0)+(a>>>26),this.words[i]=67108863&a}return 0!==n&&(this.words[i]=n,this.length++),t?this.ineg():this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=Array(e.bitLength()),n=0;n>>i&1}return t}(e);if(0===t.length)return new o(1);for(var n=this,r=0;r=0);var t,n=e%26,i=(e-n)/26,o=67108863>>>26-n<<26-n;if(0!==n){var a=0;for(t=0;t>>26-n}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var i,o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,l=0;l=0&&(0!==c||l>=i);l--){var d=0|this.words[l];this.words[l]=c<<26-o|d>>>o,c=d&s}return u&&0!==c&&(u.words[u.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(e,t,n){return r(0===this.negative),this.iushrn(e,t,n)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26;return!(this.length<=n)&&!!(this.words[n]&1<=0);var t=e%26,n=(e-t)/26;return(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)?this:(0!==t&&n++,this.length=Math.min(n,this.length),0!==t&&(this.words[this.length-1]&=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(r("number"==typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(u/67108864|0),this.words[i+n]=67108863&o}for(;i>26,this.words[i+n]=67108863&o;if(0===s)return this._strip();for(r(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(e,t){var n,r=this.length-e.length,i=this.clone(),a=e,s=0|a.words[a.length-1];0!=(r=26-this._countBits(s))&&(a=a.ushln(r),i.iushln(r),s=0|a.words[a.length-1]);var u=i.length-a.length;if("mod"!==t){(n=new o(null)).length=u+1,n.words=Array(n.length);for(var l=0;l=0;d--){var p=(0|i.words[a.length+d])*67108864+(0|i.words[a.length+d-1]);for(p=Math.min(p/s|0,67108863),i._ishlnsubmul(a,p,d);0!==i.negative;)p--,i.negative=0,i._ishlnsubmul(a,1,d),i.isZero()||(i.negative^=1);n&&(n.words[d]=p)}return n&&n._strip(),i._strip(),"div"!==t&&0!==r&&i.iushrn(r),{div:n||null,mod:i}},o.prototype.divmod=function(e,t,n){var i,a,s;return(r(!e.isZero()),this.isZero())?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(a=s.mod.neg(),n&&0!==a.negative&&a.iadd(e)),{div:i,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):(this.negative&e.negative)!=0?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),n&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||0>this.cmp(e)?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modrn(e.words[0]))}:this._wordDiv(e,t)},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),i=e.andln(1),o=n.cmp(r);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modrn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var n=67108864%e,i=0,o=this.length-1;o>=0;o--)i=(n*i+(0|this.words[o]))%e;return t?-i:i},o.prototype.modn=function(e){return this.modrn(e)},o.prototype.idivn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var n=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*n;this.words[i]=o/e|0,n=o%e}return this._strip(),t?this.ineg():this},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),a=new o(0),s=new o(0),u=new o(1),l=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++l;for(var c=n.clone(),d=t.clone();!t.isZero();){for(var p=0,f=1;(t.words[0]&f)==0&&p<26;++p,f<<=1);if(p>0)for(t.iushrn(p);p-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(c),a.isub(d)),i.iushrn(1),a.iushrn(1);for(var h=0,m=1;(n.words[0]&m)==0&&h<26;++h,m<<=1);if(h>0)for(n.iushrn(h);h-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(c),u.isub(d)),s.iushrn(1),u.iushrn(1);t.cmp(n)>=0?(t.isub(n),i.isub(s),a.isub(u)):(n.isub(t),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:n.iushln(l)}},o.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t,n=this,i=e.clone();n=0!==n.negative?n.umod(e):n.clone();for(var a=new o(1),s=new o(0),u=i.clone();n.cmpn(1)>0&&i.cmpn(1)>0;){for(var l=0,c=1;(n.words[0]&c)==0&&l<26;++l,c<<=1);if(l>0)for(n.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var d=0,p=1;(i.words[0]&p)==0&&d<26;++d,p<<=1);if(d>0)for(i.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);n.cmp(i)>=0?(n.isub(i),a.isub(s)):(i.isub(n),s.isub(a))}return 0>(t=0===n.cmpn(1)?a:s).cmpn(0)&&t.iadd(e),t},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var r=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=t.cmp(n);if(i<0){var o=t;t=n,n=o}else if(0===i||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return(1&this.words[0])==0},o.prototype.isOdd=function(){return(1&this.words[0])==1},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){r("number"==typeof e);var t=e%26,n=(e-t)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return -1;if(0===this.negative&&n)return 1;if(this._strip(),this.length>1)t=1;else{n&&(e=-e),r(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:ie.length)return 1;if(this.length=0;n--){var r=0|this.words[n],i=0|e.words[n];if(r!==i){ri&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return -1===this.cmpn(e)},o.prototype.lt=function(e){return -1===this.cmp(e)},o.prototype.lten=function(e){return 0>=this.cmpn(e)},o.prototype.lte=function(e){return 0>=this.cmp(e)},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new S(e)},o.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var _={k256:null,p224:null,p192:null,p25519:null};function v(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function w(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function k(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function x(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function A(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function I(e){S.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var e=new o(null);return e.words=Array(Math.ceil(this.n/13)),e},v.prototype.ireduce=function(e){var t,n=e;do this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength();while(t>this.n);var r=t0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},v.prototype.split=function(e,t){e.iushrn(this.n,0,t)},v.prototype.imulK=function(e){return e.imul(this.k)},i(w,v),w.prototype.split=function(e,t){for(var n=Math.min(e.length,9),r=0;r>>22,i=o}i>>>=22,e.words[r-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},w.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n>>=26,e.words[n]=i,t=r}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){var t;if(_[e])return _[e];if("k256"===e)t=new w;else if("p224"===e)t=new k;else if("p192"===e)t=new x;else if("p25519"===e)t=new A;else throw Error("Unknown prime "+e);return _[e]=t,t},S.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},S.prototype._verify2=function(e,t){r((e.negative|t.negative)==0,"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},S.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(l(e,e.umod(this.m)._forceRed(this)),e)},S.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},S.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},S.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},S.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return 0>n.cmpn(0)&&n.iadd(this.m),n._forceRed(this)},S.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return 0>n.cmpn(0)&&n.iadd(this.m),n},S.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},S.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},S.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},S.prototype.isqr=function(e){return this.imul(e,e.clone())},S.prototype.sqr=function(e){return this.mul(e,e)},S.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2==1),3===t){var n=this.m.add(new o(1)).iushrn(2);return this.pow(e,n)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);r(!i.isZero());var s=new o(1).toRed(this),u=s.redNeg(),l=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);0!==this.pow(c,l).cmp(u);)c.redIAdd(u);for(var d=this.pow(c,i),p=this.pow(e,i.addn(1).iushrn(1)),f=this.pow(e,i),h=a;0!==f.cmp(s);){for(var m=f,g=0;0!==m.cmp(s);g++)m=m.redSqr();r(g=0;r--){for(var l=t.words[r],c=u-1;c>=0;c--){var d=l>>c&1;if(i!==n[0]&&(i=this.sqr(i)),0===d&&0===a){s=0;continue}a<<=1,a|=d,(4==++s||0===r&&0===c)&&(i=this.mul(i,n[a]),s=0,a=0)}u=26}return i},S.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},S.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new I(e)},i(I,S),I.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},I.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},I.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):0>i.cmpn(0)&&(o=i.iadd(this.m)),o._forceRed(this)},I.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):0>i.cmpn(0)&&(a=i.iadd(this.m)),a._forceRed(this)},I.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=n.nmd(e),this)},25532:function(e,t,n){"use strict";var r=n(48764).Buffer,i=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.hasOwnProperty.call(e,n)&&i(t,e,n);return o(t,e),t},u=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.deserializeUnchecked=t.deserialize=t.serialize=t.BinaryReader=t.BinaryWriter=t.BorshError=t.baseDecode=t.baseEncode=void 0;let l=u(n(13550)),c=u(n(97304)),d=s(n(8467)),p="function"!=typeof TextDecoder?d.TextDecoder:TextDecoder,f=new p("utf-8",{fatal:!0});t.baseEncode=function(e){return"string"==typeof e&&(e=r.from(e,"utf8")),c.default.encode(r.from(e))},t.baseDecode=function(e){return r.from(c.default.decode(e))};class h extends Error{constructor(e){super(e),this.fieldPath=[],this.originalMessage=e}addToFieldPath(e){this.fieldPath.splice(0,0,e),this.message=this.originalMessage+": "+this.fieldPath.join(".")}}t.BorshError=h;class m{constructor(){this.buf=r.alloc(1024),this.length=0}maybeResize(){this.buf.length<16+this.length&&(this.buf=r.concat([this.buf,r.alloc(1024)]))}writeU8(e){this.maybeResize(),this.buf.writeUInt8(e,this.length),this.length+=1}writeU16(e){this.maybeResize(),this.buf.writeUInt16LE(e,this.length),this.length+=2}writeU32(e){this.maybeResize(),this.buf.writeUInt32LE(e,this.length),this.length+=4}writeU64(e){this.maybeResize(),this.writeBuffer(r.from(new l.default(e).toArray("le",8)))}writeU128(e){this.maybeResize(),this.writeBuffer(r.from(new l.default(e).toArray("le",16)))}writeU256(e){this.maybeResize(),this.writeBuffer(r.from(new l.default(e).toArray("le",32)))}writeU512(e){this.maybeResize(),this.writeBuffer(r.from(new l.default(e).toArray("le",64)))}writeBuffer(e){this.buf=r.concat([r.from(this.buf.subarray(0,this.length)),e,r.alloc(1024)]),this.length+=e.length}writeString(e){this.maybeResize();let t=r.from(e,"utf8");this.writeU32(t.length),this.writeBuffer(t)}writeFixedArray(e){this.writeBuffer(r.from(e))}writeArray(e,t){for(let n of(this.maybeResize(),this.writeU32(e.length),e))this.maybeResize(),t(n)}toArray(){return this.buf.subarray(0,this.length)}}function g(e,t,n){let r=n.value;n.value=function(...e){try{return r.apply(this,e)}catch(e){if(e instanceof RangeError){let t=e.code;if(["ERR_BUFFER_OUT_OF_BOUNDS","ERR_OUT_OF_RANGE"].indexOf(t)>=0)throw new h("Reached the end of buffer when deserializing")}throw e}}}t.BinaryWriter=m;class y{constructor(e){this.buf=e,this.offset=0}readU8(){let e=this.buf.readUInt8(this.offset);return this.offset+=1,e}readU16(){let e=this.buf.readUInt16LE(this.offset);return this.offset+=2,e}readU32(){let e=this.buf.readUInt32LE(this.offset);return this.offset+=4,e}readU64(){let e=this.readBuffer(8);return new l.default(e,"le")}readU128(){let e=this.readBuffer(16);return new l.default(e,"le")}readU256(){let e=this.readBuffer(32);return new l.default(e,"le")}readU512(){let e=this.readBuffer(64);return new l.default(e,"le")}readBuffer(e){if(this.offset+e>this.buf.length)throw new h(`Expected buffer length ${e} isn't within bounds`);let t=this.buf.slice(this.offset,this.offset+e);return this.offset+=e,t}readString(){let e=this.readU32(),t=this.readBuffer(e);try{return f.decode(t)}catch(e){throw new h(`Error decoding UTF-8 string: ${e}`)}}readFixedArray(e){return new Uint8Array(this.readBuffer(e))}readArray(e){let t=this.readU32(),n=[];for(let r=0;r{_(e,t,n,r[0],i)})}else if(void 0!==r.kind)switch(r.kind){case"option":null==n?i.writeU8(0):(i.writeU8(1),_(e,t,n,r.type,i));break;case"map":i.writeU32(n.size),n.forEach((n,o)=>{_(e,t,o,r.key,i),_(e,t,n,r.value,i)});break;default:throw new h(`FieldType ${r} unrecognized`)}else v(e,n,i)}catch(e){throw e instanceof h&&e.addToFieldPath(t),e}}function v(e,t,n){if("function"==typeof t.borshSerialize){t.borshSerialize(n);return}let r=e.get(t.constructor);if(!r)throw new h(`Class ${t.constructor.name} is missing in schema`);if("struct"===r.kind)r.fields.map(([r,i])=>{_(e,r,t[r],i,n)});else if("enum"===r.kind){let i=t[r.field];for(let o=0;ow(e,t,n[0],r));{let t=[];for(let i=0;i=r.values.length)throw new h(`Enum index: ${i} is out of range`);let[o,a]=r.values[i],s=w(e,o,a,n);return new t({[o]:s})}throw new h(`Unexpected schema kind: ${r.kind} for ${t.constructor.name}`)}a([g],y.prototype,"readU8",null),a([g],y.prototype,"readU16",null),a([g],y.prototype,"readU32",null),a([g],y.prototype,"readU64",null),a([g],y.prototype,"readU128",null),a([g],y.prototype,"readU256",null),a([g],y.prototype,"readU512",null),a([g],y.prototype,"readString",null),a([g],y.prototype,"readFixedArray",null),a([g],y.prototype,"readArray",null),t.BinaryReader=y,t.serialize=function(e,t,n=m){let r=new n;return v(e,t,r),r.toArray()},t.deserialize=function(e,t,n,r=y){let i=new r(n),o=k(e,t,i);if(i.offset * @license MIT */let r=n(79742),i=n(80645),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function a(e){if(e>2147483647)throw RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,s.prototype),t}function s(e,t,n){if("number"==typeof e){if("string"==typeof t)throw TypeError('The "string" argument must be of type string. Received type number');return c(e)}return u(e,t,n)}function u(e,t,n){if("string"==typeof e)return function(e,t){if(("string"!=typeof t||""===t)&&(t="utf8"),!s.isEncoding(t))throw TypeError("Unknown encoding: "+t);let n=0|h(e,t),r=a(n),i=r.write(e,t);return i!==n&&(r=r.slice(0,i)),r}(e,t);if(ArrayBuffer.isView(e))return function(e){if(D(e,Uint8Array)){let t=new Uint8Array(e);return p(t.buffer,t.byteOffset,t.byteLength)}return d(e)}(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(D(e,ArrayBuffer)||e&&D(e.buffer,ArrayBuffer)||"undefined"!=typeof SharedArrayBuffer&&(D(e,SharedArrayBuffer)||e&&D(e.buffer,SharedArrayBuffer)))return p(e,t,n);if("number"==typeof e)throw TypeError('The "value" argument must not be of type number. Received type number');let r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return s.from(r,t,n);let i=function(e){var t;if(s.isBuffer(e)){let t=0|f(e.length),n=a(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||(t=e.length)!=t?a(0):d(e):"Buffer"===e.type&&Array.isArray(e.data)?d(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return s.from(e[Symbol.toPrimitive]("string"),t,n);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function l(e){if("number"!=typeof e)throw TypeError('"size" argument must be of type number');if(e<0)throw RangeError('The value "'+e+'" is invalid for option "size"')}function c(e){return l(e),a(e<0?0:0|f(e))}function d(e){let t=e.length<0?0:0|f(e.length),n=a(t);for(let r=0;r=2147483647)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|e}function h(e,t){if(s.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||D(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return R(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return L(e).length;default:if(i)return r?-1:R(e).length;t=(""+t).toLowerCase(),i=!0}}function m(e,t,n){let i=!1;if((void 0===t||t<0)&&(t=0),t>this.length||((void 0===n||n>this.length)&&(n=this.length),n<=0||(n>>>=0)<=(t>>>=0)))return"";for(e||(e="utf8");;)switch(e){case"hex":return function(e,t,n){let r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);let i="";for(let r=t;r2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),(o=n=+n)!=o&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return -1;n=e.length-1}else if(n<0){if(!i)return -1;n=0}if("string"==typeof t&&(t=s.from(t,r)),s.isBuffer(t))return 0===t.length?-1:b(e,t,n,r,i);if("number"==typeof t)return(t&=255,"function"==typeof Uint8Array.prototype.indexOf)?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):b(e,[t],n,r,i);throw TypeError("val must be string, number or Buffer")}function b(e,t,n,r,i){let o,a=1,s=e.length,u=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return -1;a=2,s/=2,u/=2,n/=2}function l(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){let r=-1;for(o=n;os&&(n=s-u),o=n;o>=0;o--){let n=!0;for(let r=0;r239?4:t>223?3:t>191?2:1;if(i+a<=n){let n,r,s,u;switch(a){case 1:t<128&&(o=t);break;case 2:(192&(n=e[i+1]))==128&&(u=(31&t)<<6|63&n)>127&&(o=u);break;case 3:n=e[i+1],r=e[i+2],(192&n)==128&&(192&r)==128&&(u=(15&t)<<12|(63&n)<<6|63&r)>2047&&(u<55296||u>57343)&&(o=u);break;case 4:n=e[i+1],r=e[i+2],s=e[i+3],(192&n)==128&&(192&r)==128&&(192&s)==128&&(u=(15&t)<<18|(63&n)<<12|(63&r)<<6|63&s)>65535&&u<1114112&&(o=u)}}null===o?(o=65533,a=1):o>65535&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|1023&o),r.push(o),i+=a}return function(e){let t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);let n="",r=0;for(;rn)throw RangeError("Trying to access beyond buffer length")}function w(e,t,n,r,i,o){if(!s.isBuffer(e))throw TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw RangeError("Index out of range")}function k(e,t,n,r,i){C(t,r,i,e,n,7);let o=Number(t&BigInt(4294967295));e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,n}function x(e,t,n,r,i){C(t,r,i,e,n,7);let o=Number(t&BigInt(4294967295));e[n+7]=o,o>>=8,e[n+6]=o,o>>=8,e[n+5]=o,o>>=8,e[n+4]=o;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=a,a>>=8,e[n+2]=a,a>>=8,e[n+1]=a,a>>=8,e[n]=a,n+8}function A(e,t,n,r,i,o){if(n+r>e.length||n<0)throw RangeError("Index out of range")}function S(e,t,n,r,o){return t=+t,n>>>=0,o||A(e,t,n,4,34028234663852886e22,-34028234663852886e22),i.write(e,t,n,r,23,4),n+4}function I(e,t,n,r,o){return t=+t,n>>>=0,o||A(e,t,n,8,17976931348623157e292,-17976931348623157e292),i.write(e,t,n,r,52,8),n+8}t.Buffer=s,t.SlowBuffer=function(e){return+e!=e&&(e=0),s.alloc(+e)},t.INSPECT_MAX_BYTES=50,t.kMaxLength=2147483647,s.TYPED_ARRAY_SUPPORT=function(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),s.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}}),s.poolSize=8192,s.from=function(e,t,n){return u(e,t,n)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array),s.alloc=function(e,t,n){return(l(e),e<=0)?a(e):void 0!==t?"string"==typeof n?a(e).fill(t,n):a(e).fill(t):a(e)},s.allocUnsafe=function(e){return c(e)},s.allocUnsafeSlow=function(e){return c(e)},s.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==s.prototype},s.compare=function(e,t){if(D(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),D(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(e)||!s.isBuffer(t))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let n=e.length,r=t.length;for(let i=0,o=Math.min(n,r);ir.length?(s.isBuffer(t)||(t=s.from(t)),t.copy(r,i)):Uint8Array.prototype.set.call(r,t,i);else if(s.isBuffer(t))t.copy(r,i);else throw TypeError('"list" argument must be an Array of Buffers');i+=t.length}return r},s.byteLength=h,s.prototype._isBuffer=!0,s.prototype.swap16=function(){let e=this.length;if(e%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tn&&(e+=" ... "),""},o&&(s.prototype[o]=s.prototype.inspect),s.prototype.compare=function(e,t,n,r,i){if(D(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(e))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return -1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,i>>>=0,this===e)return 0;let o=i-r,a=n-t,u=Math.min(o,a),l=this.slice(r,i),c=e.slice(t,n);for(let e=0;e>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let p=this.length-t;if((void 0===n||n>p)&&(n=p),e.length>0&&(n<0||t<0)||t>this.length)throw RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let f=!1;for(;;)switch(r){case"hex":return function(e,t,n,r){let i;n=Number(n)||0;let o=e.length-n;r?(r=Number(r))>o&&(r=o):r=o;let a=t.length;for(r>a/2&&(r=a/2),i=0;i>8,i.push(n%256),i.push(r);return i}(e,this.length-c),this,c,d);default:if(f)throw TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),f=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},s.prototype.slice=function(e,t){let n=this.length;e=~~e,t=void 0===t?n:~~t,e<0?(e+=n)<0&&(e=0):e>n&&(e=n),t<0?(t+=n)<0&&(t=0):t>n&&(t=n),t>>=0,t>>>=0,n||v(e,t,this.length);let r=this[e],i=1,o=0;for(;++o>>=0,t>>>=0,n||v(e,t,this.length);let r=this[e+--t],i=1;for(;t>0&&(i*=256);)r+=this[e+--t]*i;return r},s.prototype.readUint8=s.prototype.readUInt8=function(e,t){return e>>>=0,t||v(e,1,this.length),this[e]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(e,t){return e>>>=0,t||v(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(e,t){return e>>>=0,t||v(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(e,t){return e>>>=0,t||v(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(e,t){return e>>>=0,t||v(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readBigUInt64LE=q(function(e){O(e>>>=0,"offset");let t=this[e],n=this[e+7];(void 0===t||void 0===n)&&B(e,this.length-8);let r=t+256*this[++e]+65536*this[++e]+16777216*this[++e],i=this[++e]+256*this[++e]+65536*this[++e]+16777216*n;return BigInt(r)+(BigInt(i)<>>=0,"offset");let t=this[e],n=this[e+7];(void 0===t||void 0===n)&&B(e,this.length-8);let r=16777216*t+65536*this[++e]+256*this[++e]+this[++e],i=16777216*this[++e]+65536*this[++e]+256*this[++e]+n;return(BigInt(r)<>>=0,t>>>=0,n||v(e,t,this.length);let r=this[e],i=1,o=0;for(;++o=(i*=128)&&(r-=Math.pow(2,8*t)),r},s.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||v(e,t,this.length);let r=t,i=1,o=this[e+--r];for(;r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},s.prototype.readInt8=function(e,t){return(e>>>=0,t||v(e,1,this.length),128&this[e])?-((255-this[e]+1)*1):this[e]},s.prototype.readInt16LE=function(e,t){e>>>=0,t||v(e,2,this.length);let n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt16BE=function(e,t){e>>>=0,t||v(e,2,this.length);let n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt32LE=function(e,t){return e>>>=0,t||v(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return e>>>=0,t||v(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readBigInt64LE=q(function(e){O(e>>>=0,"offset");let t=this[e],n=this[e+7];(void 0===t||void 0===n)&&B(e,this.length-8);let r=this[e+4]+256*this[e+5]+65536*this[e+6]+(n<<24);return(BigInt(r)<>>=0,"offset");let t=this[e],n=this[e+7];(void 0===t||void 0===n)&&B(e,this.length-8);let r=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(r)<>>=0,t||v(e,4,this.length),i.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return e>>>=0,t||v(e,4,this.length),i.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return e>>>=0,t||v(e,8,this.length),i.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return e>>>=0,t||v(e,8,this.length),i.read(this,e,!1,52,8)},s.prototype.writeUintLE=s.prototype.writeUIntLE=function(e,t,n,r){if(e=+e,t>>>=0,n>>>=0,!r){let r=Math.pow(2,8*n)-1;w(this,e,t,n,r,0)}let i=1,o=0;for(this[t]=255&e;++o>>=0,n>>>=0,!r){let r=Math.pow(2,8*n)-1;w(this,e,t,n,r,0)}let i=n-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+n},s.prototype.writeUint8=s.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||w(this,e,t,1,255,0),this[t]=255&e,t+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||w(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||w(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||w(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||w(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeBigUInt64LE=q(function(e,t=0){return k(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeBigUInt64BE=q(function(e,t=0){return x(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){let r=Math.pow(2,8*n-1);w(this,e,t,n,r-1,-r)}let i=0,o=1,a=0;for(this[t]=255&e;++i>0)-a&255;return t+n},s.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){let r=Math.pow(2,8*n-1);w(this,e,t,n,r-1,-r)}let i=n-1,o=1,a=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/o>>0)-a&255;return t+n},s.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||w(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},s.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||w(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||w(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||w(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},s.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||w(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeBigInt64LE=q(function(e,t=0){return k(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),s.prototype.writeBigInt64BE=q(function(e,t=0){return x(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),s.prototype.writeFloatLE=function(e,t,n){return S(this,e,t,!0,n)},s.prototype.writeFloatBE=function(e,t,n){return S(this,e,t,!1,n)},s.prototype.writeDoubleLE=function(e,t,n){return I(this,e,t,!0,n)},s.prototype.writeDoubleBE=function(e,t,n){return I(this,e,t,!1,n)},s.prototype.copy=function(e,t,n,r){if(!s.isBuffer(e))throw TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw RangeError("Index out of range");if(r<0)throw RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;i=r+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function C(e,t,n,r,i,o){if(e>n||e3?0===t||t===BigInt(0)?`>= 0${i} and < 2${i} ** ${(o+1)*8}${i}`:`>= -(2${i} ** ${(o+1)*8-1}${i}) and < 2 ** ${(o+1)*8-1}${i}`:`>= ${t}${i} and <= ${n}${i}`,new T.ERR_OUT_OF_RANGE("value",r,e)}O(i,"offset"),(void 0===r[i]||void 0===r[i+o])&&B(i,r.length-(o+1))}function O(e,t){if("number"!=typeof e)throw new T.ERR_INVALID_ARG_TYPE(t,"number",e)}function B(e,t,n){if(Math.floor(e)!==e)throw O(e,n),new T.ERR_OUT_OF_RANGE(n||"offset","an integer",e);if(t<0)throw new T.ERR_BUFFER_OUT_OF_BOUNDS;throw new T.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${t}`,e)}E("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),E("ERR_INVALID_ARG_TYPE",function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError),E("ERR_OUT_OF_RANGE",function(e,t,n){let r=`The value of "${e}" is out of range.`,i=n;return Number.isInteger(n)&&Math.abs(n)>4294967296?i=P(String(n)):"bigint"==typeof n&&(i=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(i=P(i)),i+="n"),r+=` It must be ${t}. Received ${i}`},RangeError);let M=/[^+/0-9A-Za-z-_]/g;function R(e,t){let n;t=t||1/0;let r=e.length,i=null,o=[];for(let a=0;a55295&&n<57344){if(!i){if(n>56319||a+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=(i-55296<<10|n-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else if(n<1114112){if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}else throw Error("Invalid code point")}return o}function L(e){return r.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(M,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function N(e,t,n,r){let i;for(i=0;i=t.length)&&!(i>=e.length);++i)t[i+n]=e[i];return i}function D(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}let F=function(){let e="0123456789abcdef",t=Array(256);for(let n=0;n<16;++n){let r=16*n;for(let i=0;i<16;++i)t[r+i]=e[n]+e[i]}return t}();function q(e){return"undefined"==typeof BigInt?j:e}function j(){throw Error("BigInt not supported")}},76489:function(e,t){"use strict";/*! * cookie * Copyright(c) 2012-2014 Roman Shtylman * Copyright(c) 2015 Douglas Christopher Wilson * MIT Licensed */t.parse=function(e,t){if("string"!=typeof e)throw TypeError("argument str must be a string");for(var r={},i=e.split(";"),o=(t||{}).decode||n,a=0;at.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);it.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};Object.defineProperty(t,"__esModule",{value:!0}),t.checkCookies=t.hasCookie=t.removeCookies=t.deleteCookie=t.setCookies=t.setCookie=t.getCookie=t.getCookies=void 0;var o=n(76489),a=function(){return"undefined"!=typeof window},s=function(e){void 0===e&&(e="");try{var t=JSON.stringify(e);return/^[\{\[]/.test(t)?t:e}catch(t){return e}};t.getCookies=function(e){if(e&&(t=e.req),!a())return t&&t.cookies?t.cookies:t&&t.headers&&t.headers.cookie?(0,o.parse)(t.headers.cookie):{};for(var t,n={},r=document.cookie?document.cookie.split("; "):[],i=0,s=r.length;i=t?e:""+Array(t+1-r.length).join(n)+e},(m={})[h="en"]={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},g=function(e){return e instanceof v},y=function e(t,n,r){var i;if(!t)return h;if("string"==typeof t){var o=t.toLowerCase();m[o]&&(i=o),n&&(m[o]=n,i=o);var a=t.split("-");if(!i&&a.length>1)return e(a[0])}else{var s=t.name;m[s]=t,i=s}return!r&&i&&(h=i),i||!r&&h},b=function(e,t){if(g(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new v(n)},(_={s:f,z:function(e){var t=-e.utcOffset(),n=Math.abs(t);return(t<=0?"+":"-")+f(Math.floor(n/60),2,"0")+":"+f(n%60,2,"0")},m:function e(t,n){if(t.date()=Math.abs(e)?60*e:e,s=this;if(i)return s.$offset=a,s.$u=0===e,s;if(0!==e){var u=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(s=this.local().add(a+u,t)).$offset=a,s.$x.$localOffset=u}else s=this.utc();return s};var c=a.format;a.format=function(e){var t=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return c.call(this,t)},a.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},a.isUTC=function(){return!!this.$u},a.toISOString=function(){return this.toDate().toISOString()},a.toString=function(){return this.toDate().toUTCString()};var d=a.toDate;a.toDate=function(e){return"s"===e&&this.$offset?o(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():d.call(this)};var p=a.diff;a.diff=function(e,t,n){if(e&&this.$u===e.$u)return p.call(this,e,t,n);var r=this.local(),i=o(e).local();return p.call(r,i,t,n)}})},29887:function(e,t,n){var r;/*! decimal.js-light v2.5.1 https://github.com/MikeMcl/decimal.js-light/LICENCE */!function(i){"use strict";var o,a={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},s=!0,u="[DecimalError] ",l=u+"Invalid argument: ",c=u+"Exponent out of range: ",d=Math.floor,p=Math.pow,f=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,h=d(1286742750677284.5),m={};function g(e,t){var n,r,i,o,a,u,l,c,d=e.constructor,p=d.precision;if(!e.s||!t.s)return t.s||(t=new d(e)),s?I(t,p):t;if(l=e.d,c=t.d,a=e.e,i=t.e,l=l.slice(),o=a-i){for(o<0?(r=l,o=-o,u=c.length):(r=c,i=a,u=l.length),o>(u=(a=Math.ceil(p/7))>u?a+1:u+1)&&(o=u,r.length=1),r.reverse();o--;)r.push(0);r.reverse()}for((u=l.length)-(o=c.length)<0&&(o=u,r=c,c=l,l=r),n=0;o;)n=(l[--o]=l[o]+c[o]+n)/1e7|0,l[o]%=1e7;for(n&&(l.unshift(n),++i),u=l.length;0==l[--u];)l.pop();return t.d=l,t.e=i,s?I(t,p):t}function y(e,t,n){if(e!==~~e||en)throw Error(l+e)}function b(e){var t,n,r,i=e.length-1,o="",a=e[0];if(i>0){for(o+=a,t=1;te.e^this.s<0?1:-1;for(t=0,n=(r=this.d.length)<(i=e.d.length)?r:i;te.d[t]^this.s<0?1:-1;return r===i?0:r>i^this.s<0?1:-1},m.decimalPlaces=m.dp=function(){var e=this.d.length-1,t=(e-this.e)*7;if(e=this.d[e])for(;e%10==0;e/=10)t--;return t<0?0:t},m.dividedBy=m.div=function(e){return _(this,new this.constructor(e))},m.dividedToIntegerBy=m.idiv=function(e){var t=this.constructor;return I(_(this,new t(e),0,1),t.precision)},m.equals=m.eq=function(e){return!this.cmp(e)},m.exponent=function(){return w(this)},m.greaterThan=m.gt=function(e){return this.cmp(e)>0},m.greaterThanOrEqualTo=m.gte=function(e){return this.cmp(e)>=0},m.isInteger=m.isint=function(){return this.e>this.d.length-2},m.isNegative=m.isneg=function(){return this.s<0},m.isPositive=m.ispos=function(){return this.s>0},m.isZero=function(){return 0===this.s},m.lessThan=m.lt=function(e){return 0>this.cmp(e)},m.lessThanOrEqualTo=m.lte=function(e){return 1>this.cmp(e)},m.logarithm=m.log=function(e){var t,n=this.constructor,r=n.precision,i=r+5;if(void 0===e)e=new n(10);else if((e=new n(e)).s<1||e.eq(o))throw Error(u+"NaN");if(this.s<1)throw Error(u+(this.s?"NaN":"-Infinity"));return this.eq(o)?new n(0):(s=!1,t=_(A(this,i),A(e,i),i),s=!0,I(t,r))},m.minus=m.sub=function(e){return e=new this.constructor(e),this.s==e.s?T(this,e):g(this,(e.s=-e.s,e))},m.modulo=m.mod=function(e){var t,n=this.constructor,r=n.precision;if(!(e=new n(e)).s)throw Error(u+"NaN");return this.s?(s=!1,t=_(this,e,0,1).times(e),s=!0,this.minus(t)):I(new n(this),r)},m.naturalExponential=m.exp=function(){return v(this)},m.naturalLogarithm=m.ln=function(){return A(this)},m.negated=m.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e},m.plus=m.add=function(e){return e=new this.constructor(e),this.s==e.s?g(this,e):T(this,(e.s=-e.s,e))},m.precision=m.sd=function(e){var t,n,r;if(void 0!==e&&!!e!==e&&1!==e&&0!==e)throw Error(l+e);if(t=w(this)+1,n=7*(r=this.d.length-1)+1,r=this.d[r]){for(;r%10==0;r/=10)n--;for(r=this.d[0];r>=10;r/=10)n++}return e&&t>n?t:n},m.squareRoot=m.sqrt=function(){var e,t,n,r,i,o,a,l=this.constructor;if(this.s<1){if(!this.s)return new l(0);throw Error(u+"NaN")}for(e=w(this),s=!1,0==(i=Math.sqrt(+this))||i==1/0?(((t=b(this.d)).length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=d((e+1)/2)-(e<0||e%2),t=i==1/0?"5e"+e:(t=i.toExponential()).slice(0,t.indexOf("e")+1)+e,r=new l(t)):r=new l(i.toString()),i=a=(n=l.precision)+3;;)if(r=(o=r).plus(_(this,o,a+2)).times(.5),b(o.d).slice(0,a)===(t=b(r.d)).slice(0,a)){if(t=t.slice(a-3,a+1),i==a&&"4999"==t){if(I(o,n+1,0),o.times(o).eq(this)){r=o;break}}else if("9999"!=t)break;a+=4}return s=!0,I(r,n)},m.times=m.mul=function(e){var t,n,r,i,o,a,u,l,c,d=this.constructor,p=this.d,f=(e=new d(e)).d;if(!this.s||!e.s)return new d(0);for(e.s*=this.s,n=this.e+e.e,(l=p.length)<(c=f.length)&&(o=p,p=f,f=o,a=l,l=c,c=a),o=[],r=a=l+c;r--;)o.push(0);for(r=c;--r>=0;){for(t=0,i=l+r;i>r;)u=o[i]+f[r]*p[i-r-1]+t,o[i--]=u%1e7|0,t=u/1e7|0;o[i]=(o[i]+t)%1e7|0}for(;!o[--a];)o.pop();return t?++n:o.shift(),e.d=o,e.e=n,s?I(e,d.precision):e},m.toDecimalPlaces=m.todp=function(e,t){var n=this,r=n.constructor;return(n=new r(n),void 0===e)?n:(y(e,0,1e9),void 0===t?t=r.rounding:y(t,0,8),I(n,e+w(n)+1,t))},m.toExponential=function(e,t){var n,r=this,i=r.constructor;return void 0===e?n=E(r,!0):(y(e,0,1e9),void 0===t?t=i.rounding:y(t,0,8),n=E(r=I(new i(r),e+1,t),!0,e+1)),n},m.toFixed=function(e,t){var n,r,i=this.constructor;return void 0===e?E(this):(y(e,0,1e9),void 0===t?t=i.rounding:y(t,0,8),n=E((r=I(new i(this),e+w(this)+1,t)).abs(),!1,e+w(r)+1),this.isneg()&&!this.isZero()?"-"+n:n)},m.toInteger=m.toint=function(){var e=this.constructor;return I(new e(this),w(this)+1,e.rounding)},m.toNumber=function(){return+this},m.toPower=m.pow=function(e){var t,n,r,i,a,l,c=this,p=c.constructor,f=+(e=new p(e));if(!e.s)return new p(o);if(!(c=new p(c)).s){if(e.s<1)throw Error(u+"Infinity");return c}if(c.eq(o))return c;if(r=p.precision,e.eq(o))return I(c,r);if(l=(t=e.e)>=(n=e.d.length-1),a=c.s,l){if((n=f<0?-f:f)<=9007199254740991){for(i=new p(o),t=Math.ceil(r/7+4),s=!1;n%2&&P((i=i.times(c)).d,t),0!==(n=d(n/2));)P((c=c.times(c)).d,t);return s=!0,e.s<0?new p(o).div(i):I(i,r)}}else if(a<0)throw Error(u+"NaN");return a=a<0&&1&e.d[Math.max(t,n)]?-1:1,c.s=1,s=!1,i=e.times(A(c,r+12)),s=!0,(i=v(i)).s=a,i},m.toPrecision=function(e,t){var n,r,i=this,o=i.constructor;return void 0===e?(n=w(i),r=E(i,n<=o.toExpNeg||n>=o.toExpPos)):(y(e,1,1e9),void 0===t?t=o.rounding:y(t,0,8),n=w(i=I(new o(i),e,t)),r=E(i,e<=n||n<=o.toExpNeg,e)),r},m.toSignificantDigits=m.tosd=function(e,t){var n=this.constructor;return void 0===e?(e=n.precision,t=n.rounding):(y(e,1,1e9),void 0===t?t=n.rounding:y(t,0,8)),I(new n(this),e,t)},m.toString=m.valueOf=m.val=m.toJSON=function(){var e=w(this),t=this.constructor;return E(this,e<=t.toExpNeg||e>=t.toExpPos)};var _=function(){function e(e,t){var n,r=0,i=e.length;for(e=e.slice();i--;)n=e[i]*t+r,e[i]=n%1e7|0,r=n/1e7|0;return r&&e.unshift(r),e}function t(e,t,n,r){var i,o;if(n!=r)o=n>r?1:-1;else for(i=o=0;it[i]?1:-1;break}return o}function n(e,t,n){for(var r=0;n--;)e[n]-=r,r=e[n]1;)e.shift()}return function(r,i,o,a){var s,l,c,d,p,f,h,m,g,y,b,_,v,k,x,A,S,T,E=r.constructor,P=r.s==i.s?1:-1,C=r.d,O=i.d;if(!r.s)return new E(r);if(!i.s)throw Error(u+"Division by zero");for(c=0,l=r.e-i.e,S=O.length,x=C.length,m=(h=new E(P)).d=[];O[c]==(C[c]||0);)++c;if(O[c]>(C[c]||0)&&--l,(_=null==o?o=E.precision:a?o+(w(r)-w(i))+1:o)<0)return new E(0);if(_=_/7+2|0,c=0,1==S)for(d=0,O=O[0],_++;(c1&&(O=e(O,d),C=e(C,d),S=O.length,x=C.length),k=S,y=(g=C.slice(0,S)).length;y=1e7/2&&++A;do d=0,(s=t(O,g,S,y))<0?(b=g[0],S!=y&&(b=1e7*b+(g[1]||0)),(d=b/A|0)>1?(d>=1e7&&(d=1e7-1),f=(p=e(O,d)).length,y=g.length,1==(s=t(p,g,f,y))&&(d--,n(p,S16)throw Error(c+w(e));if(!e.s)return new f(o);for(null==t?(s=!1,u=h):u=t,a=new f(.03125);e.abs().gte(.1);)e=e.times(a),d+=5;for(u+=Math.log(p(2,d))/Math.LN10*2+5|0,n=r=i=new f(o),f.precision=u;;){if(r=I(r.times(e),u),n=n.times(++l),b((a=i.plus(_(r,n,u))).d).slice(0,u)===b(i.d).slice(0,u)){for(;d--;)i=I(i.times(i),u);return f.precision=h,null==t?(s=!0,I(i,h)):i}i=a}}function w(e){for(var t=7*e.e,n=e.d[0];n>=10;n/=10)t++;return t}function k(e,t,n){if(t>e.LN10.sd())throw s=!0,n&&(e.precision=n),Error(u+"LN10 precision limit exceeded");return I(new e(e.LN10),t)}function x(e){for(var t="";e--;)t+="0";return t}function A(e,t){var n,r,i,a,l,c,d,p,f,h=1,m=e,g=m.d,y=m.constructor,v=y.precision;if(m.s<1)throw Error(u+(m.s?"NaN":"-Infinity"));if(m.eq(o))return new y(0);if(null==t?(s=!1,p=v):p=t,m.eq(10))return null==t&&(s=!0),k(y,p);if(p+=10,y.precision=p,r=(n=b(g)).charAt(0),!(15e14>Math.abs(a=w(m))))return d=k(y,p+2,v).times(a+""),m=A(new y(r+"."+n.slice(1)),p-10).plus(d),y.precision=v,null==t?(s=!0,I(m,v)):m;for(;r<7&&1!=r||1==r&&n.charAt(1)>3;)r=(n=b((m=m.times(e)).d)).charAt(0),h++;for(a=w(m),r>1?(m=new y("0."+n),a++):m=new y(r+"."+n.slice(1)),c=l=m=_(m.minus(o),m.plus(o),p),f=I(m.times(m),p),i=3;;){if(l=I(l.times(f),p),b((d=c.plus(_(l,new y(i),p))).d).slice(0,p)===b(c.d).slice(0,p))return c=c.times(2),0!==a&&(c=c.plus(k(y,p+2,v).times(a+""))),c=_(c,new y(h),p),y.precision=v,null==t?(s=!0,I(c,v)):c;c=d,i+=2}}function S(e,t){var n,r,i;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;48===t.charCodeAt(r);)++r;for(i=t.length;48===t.charCodeAt(i-1);)--i;if(t=t.slice(r,i)){if(i-=r,n=n-r-1,e.e=d(n/7),e.d=[],r=(n+1)%7,n<0&&(r+=7),rh||e.e<-h))throw Error(c+n)}else e.s=0,e.e=0,e.d=[0];return e}function I(e,t,n){var r,i,o,a,u,l,f,m,g=e.d;for(a=1,o=g[0];o>=10;o/=10)a++;if((r=t-a)<0)r+=7,i=t,f=g[m=0];else{if(m=Math.ceil((r+1)/7),o=g.length,m>=o)return e;for(a=1,f=o=g[m];o>=10;o/=10)a++;r%=7,i=r-7+a}if(void 0!==n&&(u=f/(o=p(10,a-i-1))%10|0,l=t<0||void 0!==g[m+1]||f%o,l=n<4?(u||l)&&(0==n||n==(e.s<0?3:2)):u>5||5==u&&(4==n||l||6==n&&(r>0?i>0?f/p(10,a-i):0:g[m-1])%10&1||n==(e.s<0?8:7))),t<1||!g[0])return l?(o=w(e),g.length=1,t=t-o-1,g[0]=p(10,(7-t%7)%7),e.e=d(-t/7)||0):(g.length=1,g[0]=e.e=e.s=0),e;if(0==r?(g.length=m,o=1,m--):(g.length=m+1,o=p(10,7-r),g[m]=i>0?(f/p(10,a-i)%p(10,i)|0)*o:0),l)for(;;){if(0==m){1e7==(g[0]+=o)&&(g[0]=1,++e.e);break}if(g[m]+=o,1e7!=g[m])break;g[m--]=0,o=1}for(r=g.length;0===g[--r];)g.pop();if(s&&(e.e>h||e.e<-h))throw Error(c+w(e));return e}function T(e,t){var n,r,i,o,a,u,l,c,d,p,f=e.constructor,h=f.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new f(e),s?I(t,h):t;if(l=e.d,p=t.d,r=t.e,c=e.e,l=l.slice(),a=c-r){for((d=a<0)?(n=l,a=-a,u=p.length):(n=p,r=c,u=l.length),i=Math.max(Math.ceil(h/7),u)+2,a>i&&(a=i,n.length=1),n.reverse(),i=a;i--;)n.push(0);n.reverse()}else{for((d=(i=l.length)<(u=p.length))&&(u=i),i=0;i0;--i)l[u++]=0;for(i=p.length;i>a;){if(l[--i]0?o=o.charAt(0)+"."+o.slice(1)+x(r):a>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+x(-i-1)+o,n&&(r=n-a)>0&&(o+=x(r))):i>=a?(o+=x(i+1-a),n&&(r=n-i-1)>0&&(o=o+"."+x(r))):((r=i+1)0&&(i+1===a&&(o+="."),o+=x(r))),e.s<0?"-"+o:o}function P(e,t){if(e.length>t)return e.length=t,!0}function C(e){if(!e||"object"!=typeof e)throw Error(u+"Object expected");var t,n,r,i=["precision",1,1e9,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t=i[t+1]&&r<=i[t+2])this[n]=r;else throw Error(l+n+": "+r)}if(void 0!==(r=e[n="LN10"])){if(r==Math.LN10)this[n]=new this(r);else throw Error(l+n+": "+r)}return this}(a=function e(t){var n,r,i;function o(e){var t=this;if(!(t instanceof o))return new o(e);if(t.constructor=o,e instanceof o){t.s=e.s,t.e=e.e,t.d=(e=e.d)?e.slice():e;return}if("number"==typeof e){if(0*e!=0)throw Error(l+e);if(e>0)t.s=1;else if(e<0)e=-e,t.s=-1;else{t.s=0,t.e=0,t.d=[0];return}if(e===~~e&&e<1e7){t.e=0,t.d=[e];return}return S(t,e.toString())}if("string"!=typeof e)throw Error(l+e);if(45===e.charCodeAt(0)?(e=e.slice(1),t.s=-1):t.s=1,f.test(e))S(t,e);else throw Error(l+e)}if(o.prototype=m,o.ROUND_UP=0,o.ROUND_DOWN=1,o.ROUND_CEIL=2,o.ROUND_FLOOR=3,o.ROUND_HALF_UP=4,o.ROUND_HALF_DOWN=5,o.ROUND_HALF_EVEN=6,o.ROUND_HALF_CEIL=7,o.ROUND_HALF_FLOOR=8,o.clone=e,o.config=o.set=C,void 0===t&&(t={}),t)for(n=0,i=["precision","rounding","toExpNeg","toExpPos","LN10"];n * MIT Licence */var r,i,o="0123456789abcdef",a="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",s="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",u={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-9e15,maxE:9e15,crypto:!1},l=!0,c="[DecimalError] ",d=c+"Invalid argument: ",p=c+"Precision limit exceeded",f=c+"crypto unavailable",h="[object Decimal]",m=Math.floor,g=Math.pow,y=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,b=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,_=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,v=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,w=a.length-1,k=s.length-1,x={toStringTag:h};function A(e){var t,n,r,i=e.length-1,o="",a=e[0];if(i>0){for(o+=a,t=1;tn)throw Error(d+e)}function I(e,t,n,r){var i,o,a,s;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=7,i=0):(i=Math.ceil((t+1)/7),t%=7),o=g(10,7-t),s=e[i]%o|0,null==r?t<3?(0==t?s=s/100|0:1==t&&(s=s/10|0),a=n<4&&99999==s||n>3&&49999==s||5e4==s||0==s):a=(n<4&&s+1==o||n>3&&s+1==o/2)&&(e[i+1]/o/100|0)==g(10,t-2)-1||(s==o/2||0==s)&&(e[i+1]/o/100|0)==0:t<4?(0==t?s=s/1e3|0:1==t?s=s/100|0:2==t&&(s=s/10|0),a=(r||n<4)&&9999==s||!r&&n>3&&4999==s):a=((r||n<4)&&s+1==o||!r&&n>3&&s+1==o/2)&&(e[i+1]/o/1e3|0)==g(10,t-3)-1,a}function T(e,t,n){for(var r,i,a=[0],s=0,u=e.length;sn-1&&(void 0===a[r+1]&&(a[r+1]=0),a[r+1]+=a[r]/n|0,a[r]%=n)}return a.reverse()}x.absoluteValue=x.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),P(e)},x.ceil=function(){return P(new this.constructor(this),this.e+1,2)},x.clampedTo=x.clamp=function(e,t){var n=this.constructor;if(e=new n(e),t=new n(t),!e.s||!t.s)return new n(NaN);if(e.gt(t))throw Error(d+t);return 0>this.cmp(e)?e:this.cmp(t)>0?t:new n(this)},x.comparedTo=x.cmp=function(e){var t,n,r,i,o=this.d,a=(e=new this.constructor(e)).d,s=this.s,u=e.s;if(!o||!a)return s&&u?s!==u?s:o===a?0:!o^s<0?1:-1:NaN;if(!o[0]||!a[0])return o[0]?s:a[0]?-u:0;if(s!==u)return s;if(this.e!==e.e)return this.e>e.e^s<0?1:-1;for(t=0,n=(r=o.length)<(i=a.length)?r:i;ta[t]^s<0?1:-1;return r===i?0:r>i^s<0?1:-1},x.cosine=x.cos=function(){var e,t,n=this,r=n.constructor;return n.d?n.d[0]?(e=r.precision,t=r.rounding,r.precision=e+Math.max(n.e,n.sd())+7,r.rounding=1,n=function(e,t){var n,r,i;if(t.isZero())return t;(r=t.d.length)<32?i=(1/W(4,n=Math.ceil(r/3))).toString():(n=16,i="2.3283064365386962890625e-10"),e.precision+=n,t=V(e,1,t.times(i),new e(1));for(var o=n;o--;){var a=t.times(t);t=a.times(a).minus(a).times(8).plus(1)}return e.precision-=n,t}(r,$(r,n)),r.precision=e,r.rounding=t,P(2==i||3==i?n.neg():n,e,t,!0)):new r(1):new r(NaN)},x.cubeRoot=x.cbrt=function(){var e,t,n,r,i,o,a,s,u,c,d=this.constructor;if(!this.isFinite()||this.isZero())return new d(this);for(l=!1,(o=this.s*g(this.s*this,1/3))&&Math.abs(o)!=1/0?r=new d(o.toString()):(n=A(this.d),(o=((e=this.e)-n.length+1)%3)&&(n+=1==o||-2==o?"0":"00"),o=g(n,1/3),e=m((e+1)/3)-(e%3==(e<0?-1:2)),n=o==1/0?"5e"+e:(n=o.toExponential()).slice(0,n.indexOf("e")+1)+e,(r=new d(n)).s=this.s),a=(e=d.precision)+3;;)if(c=(u=(s=r).times(s).times(s)).plus(this),r=E(c.plus(this).times(s),c.plus(u),a+2,1),A(s.d).slice(0,a)===(n=A(r.d)).slice(0,a)){if("9999"!=(n=n.slice(a-3,a+1))&&(i||"4999"!=n)){+n&&(+n.slice(1)||"5"!=n.charAt(0))||(P(r,e+1,1),t=!r.times(r).times(r).eq(this));break}if(!i&&(P(s,e+1,0),s.times(s).times(s).eq(this))){r=s;break}a+=4,i=1}return l=!0,P(r,e,d.rounding,t)},x.decimalPlaces=x.dp=function(){var e,t=this.d,n=NaN;if(t){if(n=((e=t.length-1)-m(this.e/7))*7,e=t[e])for(;e%10==0;e/=10)n--;n<0&&(n=0)}return n},x.dividedBy=x.div=function(e){return E(this,new this.constructor(e))},x.dividedToIntegerBy=x.divToInt=function(e){var t=this.constructor;return P(E(this,new t(e),0,1,1),t.precision,t.rounding)},x.equals=x.eq=function(e){return 0===this.cmp(e)},x.floor=function(){return P(new this.constructor(this),this.e+1,3)},x.greaterThan=x.gt=function(e){return this.cmp(e)>0},x.greaterThanOrEqualTo=x.gte=function(e){var t=this.cmp(e);return 1==t||0===t},x.hyperbolicCosine=x.cosh=function(){var e,t,n,r,i,o=this,a=o.constructor,s=new a(1);if(!o.isFinite())return new a(o.s?1/0:NaN);if(o.isZero())return s;n=a.precision,r=a.rounding,a.precision=n+Math.max(o.e,o.sd())+4,a.rounding=1,(i=o.d.length)<32?t=(1/W(4,e=Math.ceil(i/3))).toString():(e=16,t="2.3283064365386962890625e-10"),o=V(a,1,o.times(t),new a(1),!0);for(var u,l=e,c=new a(8);l--;)u=o.times(o),o=s.minus(u.times(c.minus(u.times(c))));return P(o,a.precision=n,a.rounding=r,!0)},x.hyperbolicSine=x.sinh=function(){var e,t,n,r,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(t=o.precision,n=o.rounding,o.precision=t+Math.max(i.e,i.sd())+4,o.rounding=1,(r=i.d.length)<3)i=V(o,2,i,i,!0);else{e=(e=1.4*Math.sqrt(r))>16?16:0|e,i=i.times(1/W(5,e)),i=V(o,2,i,i,!0);for(var a,s=new o(5),u=new o(16),l=new o(20);e--;)a=i.times(i),i=i.times(s.plus(a.times(u.times(a).plus(l))))}return o.precision=t,o.rounding=n,P(i,t,n,!0)},x.hyperbolicTangent=x.tanh=function(){var e,t,n=this.constructor;return this.isFinite()?this.isZero()?new n(this):(e=n.precision,t=n.rounding,n.precision=e+7,n.rounding=1,E(this.sinh(),this.cosh(),n.precision=e,n.rounding=t)):new n(this.s)},x.inverseCosine=x.acos=function(){var e,t=this,n=t.constructor,r=t.abs().cmp(1),i=n.precision,o=n.rounding;return -1!==r?0===r?t.isNeg()?M(n,i,o):new n(0):new n(NaN):t.isZero()?M(n,i+4,o).times(.5):(n.precision=i+6,n.rounding=1,t=t.asin(),e=M(n,i+4,o).times(.5),n.precision=i,n.rounding=o,e.minus(t))},x.inverseHyperbolicCosine=x.acosh=function(){var e,t,n=this,r=n.constructor;return n.lte(1)?new r(n.eq(1)?0:NaN):n.isFinite()?(e=r.precision,t=r.rounding,r.precision=e+Math.max(Math.abs(n.e),n.sd())+4,r.rounding=1,l=!1,n=n.times(n).minus(1).sqrt().plus(n),l=!0,r.precision=e,r.rounding=t,n.ln()):new r(n)},x.inverseHyperbolicSine=x.asinh=function(){var e,t,n=this,r=n.constructor;return!n.isFinite()||n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+2*Math.max(Math.abs(n.e),n.sd())+6,r.rounding=1,l=!1,n=n.times(n).plus(1).sqrt().plus(n),l=!0,r.precision=e,r.rounding=t,n.ln())},x.inverseHyperbolicTangent=x.atanh=function(){var e,t,n,r,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=o.precision,t=o.rounding,Math.max(r=i.sd(),e)<-(2*i.e)-1)?P(new o(i),e,t,!0):(o.precision=n=r-i.e,i=E(i.plus(1),new o(1).minus(i),n+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=t,i.times(.5)):new o(NaN)},x.inverseSine=x.asin=function(){var e,t,n,r,i=this,o=i.constructor;return i.isZero()?new o(i):(t=i.abs().cmp(1),n=o.precision,r=o.rounding,-1!==t)?0===t?((e=M(o,n+4,r).times(.5)).s=i.s,e):new o(NaN):(o.precision=n+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=n,o.rounding=r,i.times(2))},x.inverseTangent=x.atan=function(){var e,t,n,r,i,o,a,s,u,c=this,d=c.constructor,p=d.precision,f=d.rounding;if(c.isFinite()){if(c.isZero())return new d(c);if(c.abs().eq(1)&&p+4<=k)return(a=M(d,p+4,f).times(.25)).s=c.s,a}else{if(!c.s)return new d(NaN);if(p+4<=k)return(a=M(d,p+4,f).times(.5)).s=c.s,a}for(d.precision=s=p+10,d.rounding=1,e=n=Math.min(28,s/7+2|0);e;--e)c=c.div(c.times(c).plus(1).sqrt().plus(1));for(l=!1,t=Math.ceil(s/7),r=1,u=c.times(c),a=new d(c),i=c;-1!==e;)if(i=i.times(u),o=a.minus(i.div(r+=2)),i=i.times(u),void 0!==(a=o.plus(i.div(r+=2))).d[t])for(e=t;a.d[e]===o.d[e]&&e--;);return n&&(a=a.times(2<this.d.length-2},x.isNaN=function(){return!this.s},x.isNegative=x.isNeg=function(){return this.s<0},x.isPositive=x.isPos=function(){return this.s>0},x.isZero=function(){return!!this.d&&0===this.d[0]},x.lessThan=x.lt=function(e){return 0>this.cmp(e)},x.lessThanOrEqualTo=x.lte=function(e){return 1>this.cmp(e)},x.logarithm=x.log=function(e){var t,n,r,i,o,a,s,u=this.constructor,c=u.precision,d=u.rounding;if(null==e)e=new u(10),t=!0;else{if(n=(e=new u(e)).d,e.s<0||!n||!n[0]||e.eq(1))return new u(NaN);t=e.eq(10)}if(n=this.d,this.s<0||!n||!n[0]||this.eq(1))return new u(n&&!n[0]?-1/0:1!=this.s?NaN:n?0:1/0);if(t){if(n.length>1)i=!0;else{for(r=n[0];r%10==0;)r/=10;i=1!==r}}if(l=!1,I((s=E(j(this,a=c+5),t?B(u,a+10):j(e,a),a,1)).d,r=c,d))do if(a+=10,s=E(j(this,a),t?B(u,a+10):j(e,a),a,1),!i){+A(s.d).slice(r+1,r+15)+1==1e14&&(s=P(s,c+1,0));break}while(I(s.d,r+=10,d));return l=!0,P(s,c,d)},x.minus=x.sub=function(e){var t,n,r,i,o,a,s,u,c,d,p,f,h=this.constructor;if(e=new h(e),!this.d||!e.d)return this.s&&e.s?this.d?e.s=-e.s:e=new h(e.d||this.s!==e.s?this:NaN):e=new h(NaN),e;if(this.s!=e.s)return e.s=-e.s,this.plus(e);if(c=this.d,f=e.d,s=h.precision,u=h.rounding,!c[0]||!f[0]){if(f[0])e.s=-e.s;else{if(!c[0])return new h(3===u?-0:0);e=new h(this)}return l?P(e,s,u):e}if(n=m(e.e/7),d=m(this.e/7),c=c.slice(),o=d-n){for((p=o<0)?(t=c,o=-o,a=f.length):(t=f,n=d,a=c.length),r=Math.max(Math.ceil(s/7),a)+2,o>r&&(o=r,t.length=1),t.reverse(),r=o;r--;)t.push(0);t.reverse()}else{for((p=(r=c.length)<(a=f.length))&&(a=r),r=0;r0;--r)c[a++]=0;for(r=f.length;r>o;){if(c[--r](a=(o=Math.ceil(s/7))>a?o+1:a+1)&&(i=a,n.length=1),n.reverse();i--;)n.push(0);n.reverse()}for((a=c.length)-(i=d.length)<0&&(i=a,n=d,d=c,c=n),t=0;i;)t=(c[--i]=c[i]+d[i]+t)/1e7|0,c[i]%=1e7;for(t&&(c.unshift(t),++r),a=c.length;0==c[--a];)c.pop();return e.d=c,e.e=O(c,r),l?P(e,s,u):e},x.precision=x.sd=function(e){var t;if(void 0!==e&&!!e!==e&&1!==e&&0!==e)throw Error(d+e);return this.d?(t=R(this.d),e&&this.e+1>t&&(t=this.e+1)):t=NaN,t},x.round=function(){var e=this.constructor;return P(new e(this),this.e+1,e.rounding)},x.sine=x.sin=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+Math.max(n.e,n.sd())+7,r.rounding=1,n=function(e,t){var n,r=t.d.length;if(r<3)return t.isZero()?t:V(e,2,t,t);n=(n=1.4*Math.sqrt(r))>16?16:0|n,t=t.times(1/W(5,n)),t=V(e,2,t,t);for(var i,o=new e(5),a=new e(16),s=new e(20);n--;)i=t.times(t),t=t.times(o.plus(i.times(a.times(i).minus(s))));return t}(r,$(r,n)),r.precision=e,r.rounding=t,P(i>2?n.neg():n,e,t,!0)):new r(NaN)},x.squareRoot=x.sqrt=function(){var e,t,n,r,i,o,a=this.d,s=this.e,u=this.s,c=this.constructor;if(1!==u||!a||!a[0])return new c(!u||u<0&&(!a||a[0])?NaN:a?this:1/0);for(l=!1,0==(u=Math.sqrt(+this))||u==1/0?(((t=A(a)).length+s)%2==0&&(t+="0"),u=Math.sqrt(t),s=m((s+1)/2)-(s<0||s%2),t=u==1/0?"5e"+s:(t=u.toExponential()).slice(0,t.indexOf("e")+1)+s,r=new c(t)):r=new c(u.toString()),n=(s=c.precision)+3;;)if(r=(o=r).plus(E(this,o,n+2,1)).times(.5),A(o.d).slice(0,n)===(t=A(r.d)).slice(0,n)){if("9999"!=(t=t.slice(n-3,n+1))&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(P(r,s+1,1),e=!r.times(r).eq(this));break}if(!i&&(P(o,s+1,0),o.times(o).eq(this))){r=o;break}n+=4,i=1}return l=!0,P(r,s,c.rounding,e)},x.tangent=x.tan=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+10,r.rounding=1,(n=n.sin()).s=1,n=E(n,new r(1).minus(n.times(n)).sqrt(),e+10,0),r.precision=e,r.rounding=t,P(2==i||4==i?n.neg():n,e,t,!0)):new r(NaN)},x.times=x.mul=function(e){var t,n,r,i,o,a,s,u,c,d=this.constructor,p=this.d,f=(e=new d(e)).d;if(e.s*=this.s,!p||!p[0]||!f||!f[0])return new d(e.s&&(!p||p[0]||f)&&(!f||f[0]||p)?p&&f?0*e.s:e.s/0:NaN);for(n=m(this.e/7)+m(e.e/7),(u=p.length)<(c=f.length)&&(o=p,p=f,f=o,a=u,u=c,c=a),o=[],r=a=u+c;r--;)o.push(0);for(r=c;--r>=0;){for(t=0,i=u+r;i>r;)s=o[i]+f[r]*p[i-r-1]+t,o[i--]=s%1e7|0,t=s/1e7|0;o[i]=(o[i]+t)%1e7|0}for(;!o[--a];)o.pop();return t?++n:o.shift(),e.d=o,e.e=O(o,n),l?P(e,d.precision,d.rounding):e},x.toBinary=function(e,t){return K(this,2,e,t)},x.toDecimalPlaces=x.toDP=function(e,t){var n=this,r=n.constructor;return(n=new r(n),void 0===e)?n:(S(e,0,1e9),void 0===t?t=r.rounding:S(t,0,8),P(n,e+n.e+1,t))},x.toExponential=function(e,t){var n,r=this,i=r.constructor;return void 0===e?n=C(r,!0):(S(e,0,1e9),void 0===t?t=i.rounding:S(t,0,8),n=C(r=P(new i(r),e+1,t),!0,e+1)),r.isNeg()&&!r.isZero()?"-"+n:n},x.toFixed=function(e,t){var n,r,i=this.constructor;return void 0===e?n=C(this):(S(e,0,1e9),void 0===t?t=i.rounding:S(t,0,8),n=C(r=P(new i(this),e+this.e+1,t),!1,e+r.e+1)),this.isNeg()&&!this.isZero()?"-"+n:n},x.toFraction=function(e){var t,n,r,i,o,a,s,u,c,p,f,h,m=this.d,y=this.constructor;if(!m)return new y(this);if(c=n=new y(1),r=u=new y(0),a=(o=(t=new y(r)).e=R(m)-this.e-1)%7,t.d[0]=g(10,a<0?7+a:a),null==e)e=o>0?t:c;else{if(!(s=new y(e)).isInt()||s.lt(c))throw Error(d+s);e=s.gt(t)?o>0?t:c:s}for(l=!1,s=new y(A(m)),p=y.precision,y.precision=o=14*m.length;f=E(s,t,0,1,1),1!=(i=n.plus(f.times(r))).cmp(e);)n=r,r=i,i=c,c=u.plus(f.times(i)),u=i,i=t,t=s.minus(f.times(i)),s=i;return i=E(e.minus(n),r,0,1,1),u=u.plus(i.times(c)),n=n.plus(i.times(r)),u.s=c.s=this.s,h=1>E(c,r,o,1).minus(this).abs().cmp(E(u,n,o,1).minus(this).abs())?[c,r]:[u,n],y.precision=p,l=!0,h},x.toHexadecimal=x.toHex=function(e,t){return K(this,16,e,t)},x.toNearest=function(e,t){var n=this,r=n.constructor;if(n=new r(n),null==e){if(!n.d)return n;e=new r(1),t=r.rounding}else{if(e=new r(e),void 0===t?t=r.rounding:S(t,0,8),!n.d)return e.s?n:e;if(!e.d)return e.s&&(e.s=n.s),e}return e.d[0]?(l=!1,n=E(n,e,0,t,1).times(e),l=!0,P(n)):(e.s=n.s,n=e),n},x.toNumber=function(){return+this},x.toOctal=function(e,t){return K(this,8,e,t)},x.toPower=x.pow=function(e){var t,n,r,i,o,a,s=this,u=s.constructor,c=+(e=new u(e));if(!s.d||!e.d||!s.d[0]||!e.d[0])return new u(g(+s,c));if((s=new u(s)).eq(1))return s;if(r=u.precision,o=u.rounding,e.eq(1))return P(s,r,o);if((t=m(e.e/7))>=e.d.length-1&&(n=c<0?-c:c)<=9007199254740991)return i=N(u,s,n,r),e.s<0?new u(1).div(i):P(i,r,o);if((a=s.s)<0){if(tu.maxE+1||t0?a/0:0):(l=!1,u.rounding=s.s=1,n=Math.min(12,(t+"").length),(i=q(e.times(j(s,r+n)),r)).d&&I((i=P(i,r+5,1)).d,r,o)&&(t=r+10,+A((i=P(q(e.times(j(s,t+n)),t),t+5,1)).d).slice(r+1,r+15)+1==1e14&&(i=P(i,r+1,0))),i.s=a,l=!0,u.rounding=o,P(i,r,o))},x.toPrecision=function(e,t){var n,r=this,i=r.constructor;return void 0===e?n=C(r,r.e<=i.toExpNeg||r.e>=i.toExpPos):(S(e,1,1e9),void 0===t?t=i.rounding:S(t,0,8),n=C(r=P(new i(r),e,t),e<=r.e||r.e<=i.toExpNeg,e)),r.isNeg()&&!r.isZero()?"-"+n:n},x.toSignificantDigits=x.toSD=function(e,t){var n=this.constructor;return void 0===e?(e=n.precision,t=n.rounding):(S(e,1,1e9),void 0===t?t=n.rounding:S(t,0,8)),P(new n(this),e,t)},x.toString=function(){var e=this.constructor,t=C(this,this.e<=e.toExpNeg||this.e>=e.toExpPos);return this.isNeg()&&!this.isZero()?"-"+t:t},x.truncated=x.trunc=function(){return P(new this.constructor(this),this.e+1,1)},x.valueOf=x.toJSON=function(){var e=this.constructor,t=C(this,this.e<=e.toExpNeg||this.e>=e.toExpPos);return this.isNeg()?"-"+t:t};var E=function(){function e(e,t,n){var r,i=0,o=e.length;for(e=e.slice();o--;)r=e[o]*t+i,e[o]=r%n|0,i=r/n|0;return i&&e.unshift(i),e}function t(e,t,n,r){var i,o;if(n!=r)o=n>r?1:-1;else for(i=o=0;it[i]?1:-1;break}return o}function n(e,t,n,r){for(var i=0;n--;)e[n]-=i,i=e[n]1;)e.shift()}return function(i,o,a,s,u,l){var c,d,p,f,h,g,y,b,_,v,w,k,x,A,S,I,T,E,C,O,B=i.constructor,M=i.s==o.s?1:-1,R=i.d,L=o.d;if(!R||!R[0]||!L||!L[0])return new B(i.s&&o.s&&(R?!L||R[0]!=L[0]:L)?R&&0==R[0]||!L?0*M:M/0:NaN);for(l?(h=1,d=i.e-o.e):(l=1e7,h=7,d=m(i.e/h)-m(o.e/h)),C=L.length,T=R.length,v=(_=new B(M)).d=[],p=0;L[p]==(R[p]||0);p++);if(L[p]>(R[p]||0)&&d--,null==a?(A=a=B.precision,s=B.rounding):A=u?a+(i.e-o.e)+1:a,A<0)v.push(1),g=!0;else{if(A=A/h+2|0,p=0,1==C){for(f=0,L=L[0],A++;(p1&&(L=e(L,f,l),R=e(R,f,l),C=L.length,T=R.length),I=C,k=(w=R.slice(0,C)).length;k=l/2&&++E;do f=0,(c=t(L,w,C,k))<0?(x=w[0],C!=k&&(x=x*l+(w[1]||0)),(f=x/E|0)>1?(f>=l&&(f=l-1),b=(y=e(L,f,l)).length,k=w.length,1==(c=t(y,w,b,k))&&(f--,n(y,C=10;f/=10)p++;_.e=p+d*h-1,P(_,u?a+_.e+1:a,s,g)}return _}}();function P(e,t,n,r){var i,o,a,s,u,c,d,p,f,h=e.constructor;t:if(null!=t){if(!(p=e.d))return e;for(i=1,s=p[0];s>=10;s/=10)i++;if((o=t-i)<0)o+=7,a=t,u=(d=p[f=0])/g(10,i-a-1)%10|0;else if(f=Math.ceil((o+1)/7),s=p.length,f>=s){if(r){for(;s++<=f;)p.push(0);d=u=0,i=1,o%=7,a=o-7+1}else break t}else{for(i=1,d=s=p[f];s>=10;s/=10)i++;o%=7,u=(a=o-7+i)<0?0:d/g(10,i-a-1)%10|0}if(r=r||t<0||void 0!==p[f+1]||(a<0?d:d%g(10,i-a-1)),c=n<4?(u||r)&&(0==n||n==(e.s<0?3:2)):u>5||5==u&&(4==n||r||6==n&&(o>0?a>0?d/g(10,i-a):0:p[f-1])%10&1||n==(e.s<0?8:7)),t<1||!p[0])return p.length=0,c?(t-=e.e+1,p[0]=g(10,(7-t%7)%7),e.e=-t||0):p[0]=e.e=0,e;if(0==o?(p.length=f,s=1,f--):(p.length=f+1,s=g(10,7-o),p[f]=a>0?(d/g(10,i-a)%g(10,a)|0)*s:0),c)for(;;){if(0==f){for(o=1,a=p[0];a>=10;a/=10)o++;for(a=p[0]+=s,s=1;a>=10;a/=10)s++;o!=s&&(e.e++,1e7==p[0]&&(p[0]=1));break}if(p[f]+=s,1e7!=p[f])break;p[f--]=0,s=1}for(o=p.length;0===p[--o];)p.pop()}return l&&(e.e>h.maxE?(e.d=null,e.e=NaN):e.e0?o=o.charAt(0)+"."+o.slice(1)+L(r):a>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+L(-i-1)+o,n&&(r=n-a)>0&&(o+=L(r))):i>=a?(o+=L(i+1-a),n&&(r=n-i-1)>0&&(o=o+"."+L(r))):((r=i+1)0&&(i+1===a&&(o+="."),o+=L(r))),o}function O(e,t){var n=e[0];for(t*=7;n>=10;n/=10)t++;return t}function B(e,t,n){if(t>w)throw l=!0,n&&(e.precision=n),Error(p);return P(new e(a),t,1,!0)}function M(e,t,n){if(t>k)throw Error(p);return P(new e(s),t,n,!0)}function R(e){var t=e.length-1,n=7*t+1;if(t=e[t]){for(;t%10==0;t/=10)n--;for(t=e[0];t>=10;t/=10)n++}return n}function L(e){for(var t="";e--;)t+="0";return t}function N(e,t,n,r){var i,o=new e(1),a=Math.ceil(r/7+4);for(l=!1;;){if(n%2&&H((o=o.times(t)).d,a)&&(i=!0),0===(n=m(n/2))){n=o.d.length-1,i&&0===o.d[n]&&++o.d[n];break}H((t=t.times(t)).d,a)}return l=!0,o}function D(e){return 1&e.d[e.d.length-1]}function F(e,t,n){for(var r,i=new e(t[0]),o=0;++o17)return new f(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:0/0);for(null==t?(l=!1,u=m):u=t,s=new f(.03125);e.e>-2;)e=e.times(s),p+=5;for(u+=r=Math.log(g(2,p))/Math.LN10*2+5|0,n=o=a=new f(1),f.precision=u;;){if(o=P(o.times(e),u,1),n=n.times(++d),A((s=a.plus(E(o,n,u,1))).d).slice(0,u)===A(a.d).slice(0,u)){for(i=p;i--;)a=P(a.times(a),u,1);if(null!=t)return f.precision=m,a;if(!(c<3&&I(a.d,u-r,h,c)))return P(a,f.precision=m,h,l=!0);f.precision=u+=10,n=o=s=new f(1),d=0,c++}a=s}}function j(e,t){var n,r,i,o,a,s,u,c,d,p,f,h=1,m=e,g=m.d,y=m.constructor,b=y.rounding,_=y.precision;if(m.s<0||!g||!g[0]||!m.e&&1==g[0]&&1==g.length)return new y(g&&!g[0]?-1/0:1!=m.s?NaN:g?0:m);if(null==t?(l=!1,d=_):d=t,y.precision=d+=10,r=(n=A(g)).charAt(0),!(15e14>Math.abs(o=m.e)))return c=B(y,d+2,_).times(o+""),m=j(new y(r+"."+n.slice(1)),d-10).plus(c),y.precision=_,null==t?P(m,_,b,l=!0):m;for(;r<7&&1!=r||1==r&&n.charAt(1)>3;)r=(n=A((m=m.times(e)).d)).charAt(0),h++;for(o=m.e,r>1?(m=new y("0."+n),o++):m=new y(r+"."+n.slice(1)),p=m,u=a=m=E(m.minus(1),m.plus(1),d,1),f=P(m.times(m),d,1),i=3;;){if(a=P(a.times(f),d,1),A((c=u.plus(E(a,new y(i),d,1))).d).slice(0,d)===A(u.d).slice(0,d)){if(u=u.times(2),0!==o&&(u=u.plus(B(y,d+2,_).times(o+""))),u=E(u,new y(h),d,1),null!=t)return y.precision=_,u;if(!I(u.d,d-10,b,s))return P(u,y.precision=_,b,l=!0);y.precision=d+=10,c=a=m=E(p.minus(1),p.plus(1),d,1),f=P(m.times(m),d,1),i=s=1}u=c,i+=2}}function U(e){return String(e.s*e.s/0)}function z(e,t){var n,r,i;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;48===t.charCodeAt(r);r++);for(i=t.length;48===t.charCodeAt(i-1);--i);if(t=t.slice(r,i)){if(i-=r,e.e=n=n-r-1,e.d=[],r=(n+1)%7,n<0&&(r+=7),re.constructor.maxE?(e.d=null,e.e=NaN):e.e=0&&(p=p.replace(".",""),(h=new m(1)).e=p.length-u,h.d=T(C(h),10,a),h.e=h.d.length),s=c=(f=T(p,10,a)).length;0==f[--c];)f.pop();if(f[0]){if(u<0?s--:((e=new m(e)).d=f,e.e=s,f=(e=E(e,h,n,i,0,a)).d,s=e.e,d=r),u=f[n],l=a/2,d=d||void 0!==f[n+1],d=i<4?(void 0!==u||d)&&(0===i||i===(e.s<0?3:2)):u>l||u===l&&(4===i||d||6===i&&1&f[n-1]||i===(e.s<0?8:7)),f.length=n,d)for(;++f[--n]>a-1;)f[n]=0,n||(++s,f.unshift(1));for(c=f.length;!f[c-1];--c);for(u=0,p="";u1){if(16==t||8==t){for(u=16==t?4:3,--c;c%u;c++)p+="0";for(c=(f=T(p,a,t)).length;!f[c-1];--c);for(u=1,p="1.";uc)for(s-=c;s--;)p+="0";else st)return e.length=t,!0}function G(e){return new this(e).abs()}function Z(e){return new this(e).acos()}function Y(e){return new this(e).acosh()}function X(e,t){return new this(e).plus(t)}function Q(e){return new this(e).asin()}function J(e){return new this(e).asinh()}function ee(e){return new this(e).atan()}function et(e){return new this(e).atanh()}function en(e,t){e=new this(e),t=new this(t);var n,r=this.precision,i=this.rounding,o=r+4;return e.s&&t.s?e.d||t.d?!t.d||e.isZero()?(n=t.s<0?M(this,r,i):new this(0)).s=e.s:!e.d||t.isZero()?(n=M(this,o,1).times(.5)).s=e.s:t.s<0?(this.precision=o,this.rounding=1,n=this.atan(E(e,t,o,1)),t=M(this,o,1),this.precision=r,this.rounding=i,n=e.s<0?n.minus(t):n.plus(t)):n=this.atan(E(e,t,o,1)):(n=M(this,o,1).times(t.s>0?.25:.75)).s=e.s:n=new this(NaN),n}function er(e){return new this(e).cbrt()}function ei(e){return P(e=new this(e),e.e+1,2)}function eo(e,t,n){return new this(e).clamp(t,n)}function ea(e){if(!e||"object"!=typeof e)throw Error(c+"Object expected");var t,n,r,i=!0===e.defaults,o=["precision",1,1e9,"rounding",0,8,"toExpNeg",-9e15,0,"toExpPos",0,9e15,"maxE",0,9e15,"minE",-9e15,0,"modulo",0,9];for(t=0;t=o[t+1]&&r<=o[t+2])this[n]=r;else throw Error(d+n+": "+r)}if(n="crypto",i&&(this[n]=u[n]),void 0!==(r=e[n])){if(!0===r||!1===r||0===r||1===r){if(r){if("undefined"!=typeof crypto&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[n]=!0;else throw Error(f)}else this[n]=!1}else throw Error(d+n+": "+r)}return this}function es(e){return new this(e).cos()}function eu(e){return new this(e).cosh()}function el(e,t){return new this(e).div(t)}function ec(e){return new this(e).exp()}function ed(e){return P(e=new this(e),e.e+1,3)}function ep(){var e,t,n=new this(0);for(e=0,l=!1;e=429e7?t[o]=crypto.getRandomValues(new Uint32Array(1))[0]:s[o++]=i%1e7;else if(crypto.randomBytes){for(t=crypto.randomBytes(r*=4);o=214e7?crypto.randomBytes(4).copy(t,o):(s.push(i%1e7),o+=4);o=r/4}else throw Error(f)}else for(;o=10;i/=10)r++;r<7&&(n-=7-r)}return a.e=n,a.d=s,a}function eA(e){return P(e=new this(e),e.e+1,this.rounding)}function eS(e){return(e=new this(e)).d?e.d[0]?e.s:0*e.s:e.s||NaN}function eI(e){return new this(e).sin()}function eT(e){return new this(e).sinh()}function eE(e){return new this(e).sqrt()}function eP(e,t){return new this(e).sub(t)}function eC(){var e=0,t=arguments,n=new this(t[e]);for(l=!1;n.s&&++eo.maxE?(i.e=NaN,i.d=null):e.e=10;n/=10)t++;l?t>o.maxE?(i.e=NaN,i.d=null):t-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),v.test(t))return z(e,t)}else if("Infinity"===t||"NaN"===t)return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(b.test(t))n=16,t=t.toLowerCase();else if(y.test(t))n=2;else if(_.test(t))n=8;else throw Error(d+t);for((o=t.search(/p/i))>0?(u=+t.slice(o+1),t=t.substring(2,o)):t=t.slice(2),a=(o=t.indexOf("."))>=0,r=e.constructor,a&&(o=(s=(t=t.replace(".","")).length)-o,i=N(r,new r(n),o,2*o)),o=p=(c=T(t,n,1e7)).length-1;0===c[o];--o)c.pop();return o<0?new r(0*e.s):(e.e=O(c,p),e.d=c,l=!1,a&&(e=E(e,i,4*s)),u&&(e=e.times(54>Math.abs(u)?g(2,u):eR.pow(2,u))),l=!0,e)}(i,e)}if(o.prototype=x,o.ROUND_UP=0,o.ROUND_DOWN=1,o.ROUND_CEIL=2,o.ROUND_FLOOR=3,o.ROUND_HALF_UP=4,o.ROUND_HALF_DOWN=5,o.ROUND_HALF_EVEN=6,o.ROUND_HALF_CEIL=7,o.ROUND_HALF_FLOOR=8,o.EUCLID=9,o.config=o.set=ea,o.clone=e,o.isDecimal=ef,o.abs=G,o.acos=Z,o.acosh=Y,o.add=X,o.asin=Q,o.asinh=J,o.atan=ee,o.atanh=et,o.atan2=en,o.cbrt=er,o.ceil=ei,o.clamp=eo,o.cos=es,o.cosh=eu,o.div=el,o.exp=ec,o.floor=ed,o.hypot=ep,o.ln=eh,o.log=em,o.log10=ey,o.log2=eg,o.max=eb,o.min=e_,o.mod=ev,o.mul=ew,o.pow=ek,o.random=ex,o.round=eA,o.sign=eS,o.sin=eI,o.sinh=eT,o.sqrt=eE,o.sub=eP,o.sum=eC,o.tan=eO,o.tanh=eB,o.trunc=eM,void 0===t&&(t={}),t&&!0!==t.defaults)for(n=0,i=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"];n{let{width:e,height:r,top:i,left:s}=a.current;if(t||!o.current||!e||!r)return;o.current.dataset.motionPopId=n;let u=document.createElement("style");return l&&(u.nonce=l),document.head.appendChild(u),u.sheet&&u.sheet.insertRule(` [data-motion-pop-id="${n}"] { position: absolute !important; width: ${e}px !important; height: ${r}px !important; top: ${i}px !important; left: ${s}px !important; } `),()=>{document.head.removeChild(u)}},[t]),(0,r.jsx)(u,{isPresent:t,childRef:o,sizeRef:a,children:i.cloneElement(e,{ref:o})})}let c=({children:e,initial:t,isPresent:n,onExitComplete:s,custom:u,presenceAffectsLayout:c,mode:p})=>{let f=(0,a.h)(d),h=(0,i.useId)(),m=(0,i.useCallback)(e=>{for(let t of(f.set(e,!0),f.values()))if(!t)return;s&&s()},[f,s]),g=(0,i.useMemo)(()=>({id:h,initial:t,isPresent:n,custom:u,onExitComplete:m,register:e=>(f.set(e,!1),()=>f.delete(e))}),c?[Math.random(),m]:[n,m]);return(0,i.useMemo)(()=>{f.forEach((e,t)=>f.set(t,!1))},[n]),i.useEffect(()=>{n||f.size||!s||s()},[n]),"popLayout"===p&&(e=(0,r.jsx)(l,{isPresent:n,children:e})),(0,r.jsx)(o.O.Provider,{value:g,children:e})};function d(){return new Map}var p=n(96179),f=n(71456);let h=e=>e.key||"";function m(e){let t=[];return i.Children.forEach(e,e=>{(0,i.isValidElement)(e)&&t.push(e)}),t}var g=n(54283);let y=({children:e,exitBeforeEnter:t,custom:n,initial:o=!0,onExitComplete:s,presenceAffectsLayout:u=!0,mode:l="sync"})=>{(0,f.k)(!t,"Replace exitBeforeEnter with mode='wait'");let d=(0,i.useMemo)(()=>m(e),[e]),y=d.map(h),b=(0,i.useRef)(!0),_=(0,i.useRef)(d),v=(0,a.h)(()=>new Map),[w,k]=(0,i.useState)(d),[x,A]=(0,i.useState)(d);(0,g.L)(()=>{b.current=!1,_.current=d;for(let e=0;e{let t=h(e),i=d===x||y.includes(t),a=()=>{if(!v.has(t))return;v.set(t,!0);let e=!0;v.forEach(t=>{t||(e=!1)}),e&&(null==I||I(),A(_.current),s&&s())};return(0,r.jsx)(c,{isPresent:i,initial:(!b.current||!!o)&&void 0,custom:i?void 0:n,presenceAffectsLayout:u,mode:l,onExitComplete:i?void 0:a,children:e},t)})})}},85128:function(e,t,n){"use strict";n.d(t,{hO:function(){return a},oO:function(){return o}});var r=n(67294),i=n(38168);function o(){let e=(0,r.useContext)(i.O);if(null===e)return[!0,null];let{isPresent:t,onExitComplete:n,register:o}=e,a=(0,r.useId)();(0,r.useEffect)(()=>o(a),[]);let s=(0,r.useCallback)(()=>n&&n(a),[a,n]);return!t&&n?[!1,s]:[!0]}function a(){var e;return null===(e=(0,r.useContext)(i.O))||e.isPresent}},96179:function(e,t,n){"use strict";n.d(t,{p:function(){return i}});var r=n(67294);let i=(0,r.createContext)({})},87649:function(e,t,n){"use strict";n.d(t,{_:function(){return i}});var r=n(67294);let i=(0,r.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"})},38168:function(e,t,n){"use strict";n.d(t,{O:function(){return i}});var r=n(67294);let i=(0,r.createContext)(null)},92036:function(e,t,n){"use strict";let r;function i(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}n.d(t,{E:function(){return oc}});let o=e=>Array.isArray(e);function a(e,t){if(!Array.isArray(t))return!1;let n=t.length;if(n!==e.length)return!1;for(let r=0;r{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function l(e,t,n,r){if("function"==typeof t){let[i,o]=u(r);t=t(void 0!==n?n:e.custom,i,o)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){let[i,o]=u(r);t=t(void 0!==n?n:e.custom,i,o)}return t}function c(e,t,n){let r=e.getProps();return l(r,t,void 0!==n?n:r.custom,e)}let d=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],p=["initial",...d],f=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],h=new Set(f),m=e=>1e3*e,g=e=>e/1e3,y={type:"spring",stiffness:500,damping:25,restSpeed:10},b=e=>({type:"spring",stiffness:550,damping:0===e?2*Math.sqrt(550):30,restSpeed:10}),_={type:"keyframes",duration:.8},v={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},w=(e,{keyframes:t})=>t.length>2?_:h.has(e)?e.startsWith("scale")?b(t[1]):y:v;function k(e,t){return e?e[t]||e.default||e:void 0}let x={skipAnimations:!1,useManualTiming:!1},A={current:!1},S=e=>null!==e;function I(e,{repeat:t,repeatType:n="loop"},r){let i=e.filter(S),o=t&&"loop"!==n&&t%2==1?0:i.length-1;return o&&void 0!==r?r:i[o]}var T,E,P=n(47382);let C=["read","resolveKeyframes","update","preRender","render","postRender"];function O(e,t){let n=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,a=C.reduce((e,t)=>(e[t]=function(e){let t=new Set,n=new Set,r=!1,i=!1,o=new WeakSet,a={delta:0,timestamp:0,isProcessing:!1};function s(t){o.has(t)&&(u.schedule(t),e()),t(a)}let u={schedule:(e,i=!1,a=!1)=>{let s=a&&r,u=s?t:n;return i&&o.add(e),u.has(e)||u.add(e),e},cancel:e=>{n.delete(e),o.delete(e)},process:e=>{if(a=e,r){i=!0;return}r=!0,[t,n]=[n,t],t.forEach(s),t.clear(),r=!1,i&&(i=!1,u.process(e))}};return u}(o),e),{}),{read:s,resolveKeyframes:u,update:l,preRender:c,render:d,postRender:p}=a,f=()=>{let o=x.useManualTiming?i.timestamp:performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(o-i.timestamp,40),1),i.timestamp=o,i.isProcessing=!0,s.process(i),u.process(i),l.process(i),c.process(i),d.process(i),p.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(f))},h=()=>{n=!0,r=!0,i.isProcessing||e(f)},m=C.reduce((e,t)=>{let r=a[t];return e[t]=(e,t=!1,i=!1)=>(n||h(),r.schedule(e,t,i)),e},{}),g=e=>{for(let t=0;t(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e;function D(e,t,n,r){if(e===t&&n===r)return P.Z;let i=t=>(function(e,t,n,r,i){let o,a;let s=0;do(o=N(a=t+(n-t)/2,r,i)-e)>0?n=a:t=a;while(Math.abs(o)>1e-7&&++s<12);return a})(t,0,1,e,n);return e=>0===e||1===e?e:N(i(e),t,r)}let F=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,q=e=>t=>1-e(1-t),j=D(.33,1.53,.69,.99),U=q(j),z=F(U),V=e=>(e*=2)<1?.5*U(e):.5*(2-Math.pow(2,-10*(e-1))),W=e=>1-Math.sin(Math.acos(e)),$=q(W),K=F(W),H=e=>/^0[^.\s]+$/u.test(e);var G=n(71456);let Z=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),Y=e=>t=>"string"==typeof t&&t.startsWith(e),X=Y("--"),Q=Y("var(--"),J=e=>{let t=Q(e);return!!t&&ee.test(e.split("/*")[0].trim())},ee=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,et=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u,en=(e,t,n)=>n>t?t:n"number"==typeof e,parse:parseFloat,transform:e=>e},ei={...er,transform:e=>en(0,1,e)},eo={...er,default:1},ea=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),es=ea("deg"),eu=ea("%"),el=ea("px"),ec=ea("vh"),ed=ea("vw"),ep={...eu,parse:e=>eu.parse(e)/100,transform:e=>eu.transform(100*e)},ef=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),eh=e=>e===er||e===el,em=(e,t)=>parseFloat(e.split(", ")[t]),eg=(e,t)=>(n,{transform:r})=>{if("none"===r||!r)return 0;let i=r.match(/^matrix3d\((.+)\)$/u);if(i)return em(i[1],t);{let t=r.match(/^matrix\((.+)\)$/u);return t?em(t[1],e):0}},ey=new Set(["x","y","z"]),eb=f.filter(e=>!ey.has(e)),e_={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:eg(4,13),y:eg(5,14)};e_.translateX=e_.x,e_.translateY=e_.y;let ev=e=>t=>t.test(e),ew=[er,el,eu,es,ed,ec,{test:e=>"auto"===e,parse:e=>e}],ek=e=>ew.find(ev(e)),ex=new Set,eA=!1,eS=!1;function eI(){if(eS){let e=Array.from(ex).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{let t=function(e){let t=[];return eb.forEach(n=>{let r=e.getValue(n);void 0!==r&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=n.get(e);t&&t.forEach(([t,n])=>{var r;null===(r=e.getValue(t))||void 0===r||r.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)})}eS=!1,eA=!1,ex.forEach(e=>e.complete()),ex.clear()}function eT(){ex.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(eS=!0)})}class eE{constructor(e,t,n,r,i,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(ex.add(this),eA||(eA=!0,B.read(eT),B.resolveKeyframes(eI))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;for(let i=0;iMath.round(1e5*e)/1e5,eC=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,eO=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,eB=(e,t)=>n=>!!("string"==typeof n&&eO.test(n)&&n.startsWith(e)||t&&null!=n&&Object.prototype.hasOwnProperty.call(n,t)),eM=(e,t,n)=>r=>{if("string"!=typeof r)return r;let[i,o,a,s]=r.match(eC);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(a),alpha:void 0!==s?parseFloat(s):1}},eR=e=>en(0,255,e),eL={...er,transform:e=>Math.round(eR(e))},eN={test:eB("rgb","red"),parse:eM("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+eL.transform(e)+", "+eL.transform(t)+", "+eL.transform(n)+", "+eP(ei.transform(r))+")"},eD={test:eB("#"),parse:function(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}},transform:eN.transform},eF={test:eB("hsl","hue"),parse:eM("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+eu.transform(eP(t))+", "+eu.transform(eP(n))+", "+eP(ei.transform(r))+")"},eq={test:e=>eN.test(e)||eD.test(e)||eF.test(e),parse:e=>eN.test(e)?eN.parse(e):eF.test(e)?eF.parse(e):eD.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?eN.transform(e):eF.transform(e)},ej=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,eU="number",ez="color",eV=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function eW(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],o=0,a=t.replace(eV,e=>(eq.test(e)?(r.color.push(o),i.push(ez),n.push(eq.parse(e))):e.startsWith("var(")?(r.var.push(o),i.push("var"),n.push(e)):(r.number.push(o),i.push(eU),n.push(parseFloat(e))),++o,"${}")),s=a.split("${}");return{values:n,split:s,indexes:r,types:i}}function e$(e){return eW(e).values}function eK(e){let{split:t,types:n}=eW(e),r=t.length;return e=>{let i="";for(let o=0;o"number"==typeof e?0:e,eG={test:function(e){var t,n;return isNaN(e)&&"string"==typeof e&&((null===(t=e.match(eC))||void 0===t?void 0:t.length)||0)+((null===(n=e.match(ej))||void 0===n?void 0:n.length)||0)>0},parse:e$,createTransformer:eK,getAnimatableNone:function(e){let t=e$(e),n=eK(e);return n(t.map(eH))}},eZ=new Set(["brightness","contrast","saturate","opacity"]);function eY(e){let[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;let[r]=n.match(eC)||[];if(!r)return e;let i=n.replace(r,""),o=eZ.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}let eX=/\b([a-z-]*)\(.*?\)/gu,eQ={...eG,getAnimatableNone:e=>{let t=e.match(eX);return t?t.map(eY).join(" "):e}},eJ={...er,transform:Math.round},e0={borderWidth:el,borderTopWidth:el,borderRightWidth:el,borderBottomWidth:el,borderLeftWidth:el,borderRadius:el,radius:el,borderTopLeftRadius:el,borderTopRightRadius:el,borderBottomRightRadius:el,borderBottomLeftRadius:el,width:el,maxWidth:el,height:el,maxHeight:el,top:el,right:el,bottom:el,left:el,padding:el,paddingTop:el,paddingRight:el,paddingBottom:el,paddingLeft:el,margin:el,marginTop:el,marginRight:el,marginBottom:el,marginLeft:el,backgroundPositionX:el,backgroundPositionY:el,rotate:es,rotateX:es,rotateY:es,rotateZ:es,scale:eo,scaleX:eo,scaleY:eo,scaleZ:eo,skew:es,skewX:es,skewY:es,distance:el,translateX:el,translateY:el,translateZ:el,x:el,y:el,z:el,perspective:el,transformPerspective:el,opacity:ei,originX:ep,originY:ep,originZ:el,zIndex:eJ,size:el,fillOpacity:ei,strokeOpacity:ei,numOctaves:eJ},e1={...e0,color:eq,backgroundColor:eq,outlineColor:eq,fill:eq,stroke:eq,borderColor:eq,borderTopColor:eq,borderRightColor:eq,borderBottomColor:eq,borderLeftColor:eq,filter:eQ,WebkitFilter:eQ},e2=e=>e1[e];function e6(e,t){let n=e2(e);return n!==eQ&&(n=eG),n.getAnimatableNone?n.getAnimatableNone(t):void 0}let e3=new Set(["auto","none","0"]);class e4 extends eE{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n{t.getValue(e).set(n)}),this.resolveNoneKeyframes()}}function e5(e){return"function"==typeof e}function e8(){r=void 0}let e9={now:()=>(void 0===r&&e9.set(R.isProcessing||x.useManualTiming?R.timestamp:performance.now()),r),set:e=>{r=e,queueMicrotask(e8)}},e7=(e,t)=>"zIndex"!==t&&!!("number"==typeof e||Array.isArray(e)||"string"==typeof e&&(eG.test(e)||"0"===e)&&!e.startsWith("url("));class te{constructor({autoplay:e=!0,delay:t=0,type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:o="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=e9.now(),this.options={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:i,repeatType:o,...a},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt}get resolved(){return this._resolved||this.hasAttemptedResolve||(eT(),eI()),this._resolved}onKeyframesResolved(e,t){this.resolvedAt=e9.now(),this.hasAttemptedResolve=!0;let{name:n,type:r,velocity:i,delay:o,onComplete:a,onUpdate:s,isGenerator:u}=this.options;if(!u&&!function(e,t,n,r){let i=e[0];if(null===i)return!1;if("display"===t||"visibility"===t)return!0;let o=e[e.length-1],a=e7(i,t),s=e7(o,t);return(0,G.K)(a===s,`You are trying to animate ${t} from "${i}" to "${o}". ${i} is not an animatable value - to enable this animation set ${i} to a value animatable to ${o} via the \`style\` property.`),!!a&&!!s&&(function(e){let t=e[0];if(1===e.length)return!0;for(let n=0;n{this.resolveFinishedPromise=e})}}let tt=(e,t,n)=>{let r=t-e;return 0===r?1:(n-e)/r},tn=(e,t,n=10)=>{let r="",i=Math.max(Math.round(t/n),2);for(let t=0;t=2e4?1/0:t}let ts=["duration","bounce"],tu=["stiffness","damping","mass"];function tl(e,t){return t.some(t=>void 0!==e[t])}function tc(e=ti.visualDuration,t=ti.bounce){let n;let r="object"!=typeof e?{visualDuration:e,keyframes:[0,1],bounce:t}:e,{restSpeed:i,restDelta:o}=r,a=r.keyframes[0],s=r.keyframes[r.keyframes.length-1],u={done:!1,value:a},{stiffness:l,damping:c,mass:d,duration:p,velocity:f,isResolvedFromDuration:h}=function(e){let t={velocity:ti.velocity,stiffness:ti.stiffness,damping:ti.damping,mass:ti.mass,isResolvedFromDuration:!1,...e};if(!tl(e,tu)&&tl(e,ts)){if(e.visualDuration){let n=e.visualDuration,r=2*Math.PI/(1.2*n),i=r*r,o=2*en(.05,1,1-e.bounce)*Math.sqrt(i);t={...t,mass:ti.mass,stiffness:i,damping:o}}else{let n=function({duration:e=ti.duration,bounce:t=ti.bounce,velocity:n=ti.velocity,mass:r=ti.mass}){let i,o;(0,G.K)(e<=m(ti.maxDuration),"Spring duration must be 10 seconds or less");let a=1-t;a=en(ti.minDamping,ti.maxDamping,a),e=en(ti.minDuration,ti.maxDuration,g(e)),a<1?(i=t=>{let r=t*a,i=r*e,o=to(t,a);return .001-(r-n)/o*Math.exp(-i)},o=t=>{let r=t*a,o=r*e,s=Math.pow(a,2)*Math.pow(t,2)*e,u=to(Math.pow(t,2),a),l=-i(t)+.001>0?-1:1;return l*((o*n+n-s)*Math.exp(-o))/u}):(i=t=>{let r=Math.exp(-t*e),i=(t-n)*e+1;return -.001+r*i},o=t=>{let r=Math.exp(-t*e),i=(n-t)*(e*e);return r*i});let s=5/e,u=function(e,t,n){let r=n;for(let n=1;n<12;n++)r-=e(r)/t(r);return r}(i,o,s);if(e=m(e),isNaN(u))return{stiffness:ti.stiffness,damping:ti.damping,duration:e};{let t=Math.pow(u,2)*r;return{stiffness:t,damping:2*a*Math.sqrt(r*t),duration:e}}}(e);(t={...t,...n,mass:ti.mass}).isResolvedFromDuration=!0}}return t}({...r,velocity:-g(r.velocity||0)}),y=f||0,b=c/(2*Math.sqrt(l*d)),_=s-a,v=g(Math.sqrt(l/d)),w=5>Math.abs(_);if(i||(i=w?ti.restSpeed.granular:ti.restSpeed.default),o||(o=w?ti.restDelta.granular:ti.restDelta.default),b<1){let e=to(v,b);n=t=>s-Math.exp(-b*v*t)*((y+b*v*_)/e*Math.sin(e*t)+_*Math.cos(e*t))}else if(1===b)n=e=>s-Math.exp(-v*e)*(_+(y+v*_)*e);else{let e=v*Math.sqrt(b*b-1);n=t=>{let n=Math.min(e*t,300);return s-Math.exp(-b*v*t)*((y+b*v*_)*Math.sinh(n)+e*_*Math.cosh(n))/e}}let k={calculatedDuration:h&&p||null,next:e=>{let t=n(e);if(h)u.done=e>=p;else{let r=0;b<1&&(r=0===e?m(y):tr(n,e,t));let a=Math.abs(r)<=i,l=Math.abs(s-t)<=o;u.done=a&&l}return u.value=u.done?s:t,u},toString:()=>{let e=Math.min(ta(k),2e4),t=tn(t=>k.next(e*t).value,e,30);return e+"ms "+t}};return k}function td({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:a,min:s,max:u,restDelta:l=.5,restSpeed:c}){let d,p;let f=e[0],h={done:!1,value:f},m=e=>void 0!==s&&eu,g=e=>void 0===s?u:void 0===u?s:Math.abs(s-e)-y*Math.exp(-e/r),w=e=>_+v(e),k=e=>{let t=v(e),n=w(e);h.done=Math.abs(t)<=l,h.value=h.done?_:n},x=e=>{m(h.value)&&(d=e,p=tc({keyframes:[h.value,g(h.value)],velocity:tr(w,e,h.value),damping:i,stiffness:o,restDelta:l,restSpeed:c}))};return x(0),{calculatedDuration:null,next:e=>{let t=!1;return(p||void 0!==d||(t=!0,k(e),x(e)),void 0!==d&&e>=d)?p.next(e-d):(t||k(e),h)}}}let tp=D(.42,0,1,1),tf=D(0,0,.58,1),th=D(.42,0,.58,1),tm=e=>Array.isArray(e)&&"number"!=typeof e[0],tg=e=>Array.isArray(e)&&"number"==typeof e[0],ty={linear:P.Z,easeIn:tp,easeInOut:th,easeOut:tf,circIn:W,circInOut:K,circOut:$,backIn:U,backInOut:z,backOut:j,anticipate:V},tb=e=>{if(tg(e)){(0,G.k)(4===e.length,"Cubic bezier arrays must contain four numerical values.");let[t,n,r,i]=e;return D(t,n,r,i)}return"string"==typeof e?((0,G.k)(void 0!==ty[e],`Invalid easing type '${e}'`),ty[e]):e},t_=(e,t)=>n=>t(e(n)),tv=(...e)=>e.reduce(t_),tw=(e,t,n)=>e+(t-e)*n;function tk(e,t,n){return(n<0&&(n+=1),n>1&&(n-=1),n<1/6)?e+(t-e)*6*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function tx(e,t){return n=>n>0?t:e}let tA=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},tS=[eD,eN,eF],tI=e=>tS.find(t=>t.test(e));function tT(e){let t=tI(e);if((0,G.K)(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===eF&&(n=function({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,n/=100;let i=0,o=0,a=0;if(t/=100){let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=tk(s,r,e+1/3),o=tk(s,r,e),a=tk(s,r,e-1/3)}else i=o=a=n;return{red:Math.round(255*i),green:Math.round(255*o),blue:Math.round(255*a),alpha:r}}(n)),n}let tE=(e,t)=>{let n=tT(e),r=tT(t);if(!n||!r)return tx(e,t);let i={...n};return e=>(i.red=tA(n.red,r.red,e),i.green=tA(n.green,r.green,e),i.blue=tA(n.blue,r.blue,e),i.alpha=tw(n.alpha,r.alpha,e),eN.transform(i))},tP=new Set(["none","hidden"]);function tC(e,t){return n=>tw(e,t,n)}function tO(e){return"number"==typeof e?tC:"string"==typeof e?J(e)?tx:eq.test(e)?tE:tR:Array.isArray(e)?tB:"object"==typeof e?eq.test(e)?tE:tM:tx}function tB(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>tO(e)(e,t[n]));return e=>{for(let t=0;t{for(let t in r)n[t]=r[t](e);return n}}let tR=(e,t)=>{let n=eG.createTransformer(t),r=eW(e),i=eW(t),o=r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length;return o?tP.has(e)&&!i.values.length||tP.has(t)&&!r.values.length?tP.has(e)?n=>n<=0?e:t:n=>n>=1?t:e:tv(tB(function(e,t){var n;let r=[],i={color:0,var:0,number:0};for(let o=0;ot*e),s=function(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let o=e.length;if((0,G.k)(o===t.length,"Both input and output ranges must be the same length"),1===o)return()=>t[0];if(2===o&&e[0]===e[1])return()=>t[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());let a=function(e,t,n){let r=[],i=n||tL,o=e.length-1;for(let n=0;n{let n=0;if(s>1)for(;nu(en(e[0],e[o-1],t)):u}(a,t,{ease:Array.isArray(i)?i:t.map(()=>i||th).splice(0,t.length-1)});return{calculatedDuration:e,next:t=>(o.value=s(t),o.done=t>=e,o)}}let tD=e=>{let t=({timestamp:t})=>e(t);return{start:()=>B.update(t,!0),stop:()=>M(t),now:()=>R.isProcessing?R.timestamp:e9.now()}},tF={decay:td,inertia:td,tween:tN,keyframes:tN,spring:tc},tq=e=>e/100;class tj extends te{constructor(e){super(e),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.teardown();let{onStop:e}=this.options;e&&e()};let{name:t,motionValue:n,element:r,keyframes:i}=this.options,o=(null==r?void 0:r.KeyframeResolver)||eE,a=(e,t)=>this.onKeyframesResolved(e,t);this.resolver=new o(i,a,t,n,r),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(e){let t,n;let{type:r="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:a,velocity:s=0}=this.options,u=e5(r)?r:tF[r]||tN;u!==tN&&"number"!=typeof e[0]&&(t=tv(tq,tL(e[0],e[1])),e=[0,100]);let l=u({...this.options,keyframes:e});"mirror"===a&&(n=u({...this.options,keyframes:[...e].reverse(),velocity:-s})),null===l.calculatedDuration&&(l.calculatedDuration=ta(l));let{calculatedDuration:c}=l,d=c+o;return{generator:l,mirroredGenerator:n,mapPercentToKeyframes:t,calculatedDuration:c,resolvedDuration:d,totalDuration:d*(i+1)-o}}onPostResolved(){let{autoplay:e=!0}=this.options;this.play(),"paused"!==this.pendingPlayState&&e?this.state=this.pendingPlayState:this.pause()}tick(e,t=!1){let{resolved:n}=this;if(!n){let{keyframes:e}=this.options;return{done:!0,value:e[e.length-1]}}let{finalKeyframe:r,generator:i,mirroredGenerator:o,mapPercentToKeyframes:a,keyframes:s,calculatedDuration:u,totalDuration:l,resolvedDuration:c}=n;if(null===this.startTime)return i.next(0);let{delay:d,repeat:p,repeatType:f,repeatDelay:h,onUpdate:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-l/this.speed,this.startTime)),t?this.currentTime=e:null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=Math.round(e-this.startTime)*this.speed;let g=this.currentTime-d*(this.speed>=0?1:-1),y=this.speed>=0?g<0:g>l;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=l);let b=this.currentTime,_=i;if(p){let e=Math.min(this.currentTime,l)/c,t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),1===n&&t--,t=Math.min(t,p+1);let r=!!(t%2);r&&("reverse"===f?(n=1-n,h&&(n-=h/c)):"mirror"===f&&(_=o)),b=en(0,1,n)*c}let v=y?{done:!1,value:s[0]}:_.next(b);a&&(v.value=a(v.value));let{done:w}=v;y||null===u||(w=this.speed>=0?this.currentTime>=l:this.currentTime<=0);let k=null===this.holdTime&&("finished"===this.state||"running"===this.state&&w);return k&&void 0!==r&&(v.value=I(s,this.options,r)),m&&m(v.value),k&&this.finish(),v}get duration(){let{resolved:e}=this;return e?g(e.calculatedDuration):0}get time(){return g(this.currentTime)}set time(e){e=m(e),this.currentTime=e,null!==this.holdTime||0===this.speed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=g(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;let{driver:e=tD,onPlay:t,startTime:n}=this.options;this.driver||(this.driver=e(e=>this.tick(e))),t&&t();let r=this.driver.now();null!==this.holdTime?this.startTime=r-this.holdTime:this.startTime?"finished"===this.state&&(this.startTime=r):this.startTime=null!=n?n:this.calcStartTime(),"finished"===this.state&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var e;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=null!==(e=this.currentTime)&&void 0!==e?e:0}complete(){"running"!==this.state&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";let{onComplete:e}=this.options;e&&e()}cancel(){null!==this.cancelTime&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}}let tU=new Set(["opacity","clipPath","filter","transform"]);function tz(e){let t;return()=>(void 0===t&&(t=e()),t)}let tV={linearEasing:void 0},tW=function(e,t){let n=tz(e);return()=>{var e;return null!==(e=tV[t])&&void 0!==e?e:n()}}(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(e){return!1}return!0},"linearEasing"),t$=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,tK={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:t$([0,.65,.55,1]),circOut:t$([.55,0,1,.45]),backIn:t$([.31,.01,.66,-.59]),backOut:t$([.33,1.53,.69,.99])};function tH(e,t){e.timeline=t,e.onfinish=null}let tG=tz(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),tZ={anticipate:V,backInOut:z,circInOut:K};class tY extends te{constructor(e){super(e);let{name:t,motionValue:n,element:r,keyframes:i}=this.options;this.resolver=new e4(i,(e,t)=>this.onKeyframesResolved(e,t),t,n,r),this.resolver.scheduleResolve()}initPlayback(e,t){var n,r;let{duration:i=300,times:o,ease:a,type:s,motionValue:u,name:l,startTime:c}=this.options;if(!(null===(n=u.owner)||void 0===n?void 0:n.current))return!1;if("string"==typeof a&&tW()&&a in tZ&&(a=tZ[a]),e5((r=this.options).type)||"spring"===r.type||!function e(t){return!!("function"==typeof t&&tW()||!t||"string"==typeof t&&(t in tK||tW())||tg(t)||Array.isArray(t)&&t.every(e))}(r.ease)){let{onComplete:t,onUpdate:n,motionValue:r,element:u,...l}=this.options,c=function(e,t){let n=new tj({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0}),r={done:!1,value:e[0]},i=[],o=0;for(;!r.done&&o<2e4;)i.push((r=n.sample(o)).value),o+=10;return{times:void 0,keyframes:i,duration:o-10,ease:"linear"}}(e,l);1===(e=c.keyframes).length&&(e[1]=e[0]),i=c.duration,o=c.times,a=c.ease,s="keyframes"}let d=function(e,t,n,{delay:r=0,duration:i=300,repeat:o=0,repeatType:a="loop",ease:s="easeInOut",times:u}={}){let l={[t]:n};u&&(l.offset=u);let c=function e(t,n){if(t)return"function"==typeof t&&tW()?tn(t,n):tg(t)?t$(t):Array.isArray(t)?t.map(t=>e(t,n)||tK.easeOut):tK[t]}(s,i);return Array.isArray(c)&&(l.easing=c),e.animate(l,{delay:r,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:o+1,direction:"reverse"===a?"alternate":"normal"})}(u.owner.current,l,e,{...this.options,duration:i,times:o,ease:a});return d.startTime=null!=c?c:this.calcStartTime(),this.pendingTimeline?(tH(d,this.pendingTimeline),this.pendingTimeline=void 0):d.onfinish=()=>{let{onComplete:n}=this.options;u.set(I(e,this.options,t)),n&&n(),this.cancel(),this.resolveFinishedPromise()},{animation:d,duration:i,times:o,type:s,ease:a,keyframes:e}}get duration(){let{resolved:e}=this;if(!e)return 0;let{duration:t}=e;return g(t)}get time(){let{resolved:e}=this;if(!e)return 0;let{animation:t}=e;return g(t.currentTime||0)}set time(e){let{resolved:t}=this;if(!t)return;let{animation:n}=t;n.currentTime=m(e)}get speed(){let{resolved:e}=this;if(!e)return 1;let{animation:t}=e;return t.playbackRate}set speed(e){let{resolved:t}=this;if(!t)return;let{animation:n}=t;n.playbackRate=e}get state(){let{resolved:e}=this;if(!e)return"idle";let{animation:t}=e;return t.playState}get startTime(){let{resolved:e}=this;if(!e)return null;let{animation:t}=e;return t.startTime}attachTimeline(e){if(this._resolved){let{resolved:t}=this;if(!t)return P.Z;let{animation:n}=t;tH(n,e)}else this.pendingTimeline=e;return P.Z}play(){if(this.isStopped)return;let{resolved:e}=this;if(!e)return;let{animation:t}=e;"finished"===t.playState&&this.updateFinishedPromise(),t.play()}pause(){let{resolved:e}=this;if(!e)return;let{animation:t}=e;t.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.resolveFinishedPromise(),this.updateFinishedPromise();let{resolved:e}=this;if(!e)return;let{animation:t,keyframes:n,duration:r,type:i,ease:o,times:a}=e;if("idle"===t.playState||"finished"===t.playState)return;if(this.time){let{motionValue:e,onUpdate:t,onComplete:s,element:u,...l}=this.options,c=new tj({...l,keyframes:n,duration:r,type:i,ease:o,times:a,isGenerator:!0}),d=m(this.time);e.setWithVelocity(c.sample(d-10).value,c.sample(d).value,10)}let{onStop:s}=this.options;s&&s(),this.cancel()}complete(){let{resolved:e}=this;e&&e.animation.finish()}cancel(){let{resolved:e}=this;e&&e.animation.cancel()}static supports(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:o,type:a}=e;return tG()&&n&&tU.has(n)&&t&&t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate&&!r&&"mirror"!==i&&0!==o&&"inertia"!==a}}let tX=tz(()=>void 0!==window.ScrollTimeline);class tQ{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}then(e,t){return Promise.all(this.animations).then(e).catch(t)}getAll(e){return this.animations[0][e]}setAll(e,t){for(let n=0;ntX()&&n.attachTimeline?n.attachTimeline(e):t(n));return()=>{n.forEach((e,t)=>{e&&e(),this.animations[t].stop()})}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get startTime(){return this.getAll("startTime")}get duration(){let e=0;for(let t=0;tt[e]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}let tJ=(e,t,n,r={},i,o)=>a=>{let s=k(r,e)||{},u=s.delay||r.delay||0,{elapsed:l=0}=r;l-=m(u);let c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-l,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{a(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:o?void 0:i};!function({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:a,repeatDelay:s,from:u,elapsed:l,...c}){return!!Object.keys(c).length}(s)&&(c={...c,...w(e,c)}),c.duration&&(c.duration=m(c.duration)),c.repeatDelay&&(c.repeatDelay=m(c.repeatDelay)),void 0!==c.from&&(c.keyframes[0]=c.from);let d=!1;if(!1!==c.type&&(0!==c.duration||c.repeatDelay)||(c.duration=0,0!==c.delay||(d=!0)),(A.current||x.skipAnimations)&&(d=!0,c.duration=0,c.delay=0),d&&!o&&void 0!==t.get()){let e=I(c.keyframes,s);if(void 0!==e)return B.update(()=>{c.onUpdate(e),c.onComplete()}),new tQ([])}return!o&&tY.supports(c)?new tY(c):new tj(c)},t0=e=>!!(e&&"object"==typeof e&&e.mix&&e.toValue),t1=e=>o(e)?e[e.length-1]||0:e;function t2(e,t){-1===e.indexOf(t)&&e.push(t)}function t6(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}class t3{constructor(){this.subscriptions=[]}add(e){return t2(this.subscriptions,e),()=>t6(this.subscriptions,e)}notify(e,t,n){let r=this.subscriptions.length;if(r){if(1===r)this.subscriptions[0](e,t,n);else for(let i=0;i!isNaN(parseFloat(e)),t5={current:void 0};class t8{constructor(e,t={}){this.version="11.15.0",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(e,t=!0)=>{let n=e9.now();this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),t&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=e9.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=t4(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new t3);let n=this.events[e].add(t);return"change"===e?()=>{n(),B.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e,t=!0){t&&this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e,t)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return t5.current&&t5.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){var e;let t=e9.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;let n=Math.min(this.updatedAt-this.prevUpdatedAt,30);return e=parseFloat(this.current)-parseFloat(this.prevFrameValue),n?e*(1e3/n):0}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function t9(e,t){return new t8(e,t)}let t7=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),ne="data-"+t7("framerAppearId"),nt=e=>!!(e&&e.getVelocity);function nn(e,t){let n=e.getValue("willChange");if(nt(n)&&n.add)return n.add(t)}function nr(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var o;let{transition:a=e.getDefaultTransition(),transitionEnd:s,...u}=t;r&&(a=r);let l=[],d=i&&e.animationState&&e.animationState.getState()[i];for(let t in u){let r=e.getValue(t,null!==(o=e.latestValues[t])&&void 0!==o?o:null),i=u[t];if(void 0===i||d&&function({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,r}(d,t))continue;let s={delay:n,...k(a||{},t)},c=!1;if(window.MotionHandoffAnimation){let n=e.props[ne];if(n){let e=window.MotionHandoffAnimation(n,t,B);null!==e&&(s.startTime=e,c=!0)}}nn(e,t),r.start(tJ(t,r,i,e.shouldReduceMotion&&h.has(t)?{type:!1}:s,e,c));let p=r.animation;p&&l.push(p)}return s&&Promise.all(l).then(()=>{B.update(()=>{s&&function(e,t){let n=c(e,t),{transitionEnd:r={},transition:i={},...o}=n||{};for(let t in o={...o,...r}){var a;let n=t1(o[t]);a=t,e.hasValue(a)?e.getValue(a).set(n):e.addValue(a,t9(n))}}(e,s)})}),l}function ni(e,t,n={}){var r;let i=c(e,t,"exit"===n.type?null===(r=e.presenceContext)||void 0===r?void 0:r.custom:void 0),{transition:o=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);let a=i?()=>Promise.all(nr(e,i,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(r=0)=>{let{delayChildren:i=0,staggerChildren:a,staggerDirection:s}=o;return function(e,t,n=0,r=0,i=1,o){let a=[],s=(e.variantChildren.size-1)*r,u=1===i?(e=0)=>e*r:(e=0)=>s-e*r;return Array.from(e.variantChildren).sort(no).forEach((e,r)=>{e.notify("AnimationStart",t),a.push(ni(e,t,{...o,delay:n+u(r)}).then(()=>e.notify("AnimationComplete",t)))}),Promise.all(a)}(e,t,i+r,a,s,n)}:()=>Promise.resolve(),{when:u}=o;if(!u)return Promise.all([a(),s(n.delay)]);{let[e,t]="beforeChildren"===u?[a,s]:[s,a];return e().then(()=>t())}}function no(e,t){return e.sortNodePosition(t)}let na=p.length,ns=[...d].reverse(),nu=d.length;function nl(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function nc(){return{animate:nl(!0),whileInView:nl(),whileHover:nl(),whileTap:nl(),whileDrag:nl(),whileFocus:nl(),exit:nl()}}class nd{constructor(e){this.isMounted=!1,this.node=e}update(){}}let np=0,nf={x:!1,y:!1};function nh(e,t){let n=function(e,t,n){var r;if(e instanceof Element)return[e];if("string"==typeof e){let i=document;t&&(i=t.current);let o=null!==(r=null==n?void 0:n[e])&&void 0!==r?r:i.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e)}(e),r=new AbortController,i={passive:!0,...t,signal:r.signal},o=()=>r.abort();return[n,i,o]}function nm(e){return t=>{"touch"===t.pointerType||nf.x||nf.y||e(t)}}let ng=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary,ny=new WeakSet;function nb(e){return t=>{"Enter"===t.key&&e(t)}}function n_(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}let nv=(e,t)=>{let n=e.currentTarget;if(!n)return;let r=nb(()=>{if(ny.has(n))return;n_(n,"down");let e=nb(()=>{n_(n,"up")}),r=()=>n_(n,"cancel");n.addEventListener("keyup",e,t),n.addEventListener("blur",r,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)},nw=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]),nk=(e,t)=>!!t&&(e===t||nk(e,t.parentElement));function nx(e){return ng(e)&&!(nf.x||nf.y)}function nA(e){return{point:{x:e.pageX,y:e.pageY}}}let nS=e=>t=>ng(t)&&e(t,nA(t));function nI(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function nT(e,t,n,r){return nI(e,t,nS(n),r)}let nE=(e,t)=>Math.abs(e-t);class nP{constructor(e,t,{transformPagePoint:n,contextWindow:r,dragSnapToOrigin:i=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let e=nB(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,n=function(e,t){let n=nE(e.x,t.x),r=nE(e.y,t.y);return Math.sqrt(n**2+r**2)}(e.offset,{x:0,y:0})>=3;if(!t&&!n)return;let{point:r}=e,{timestamp:i}=R;this.history.push({...r,timestamp:i});let{onStart:o,onMove:a}=this.handlers;t||(o&&o(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),a&&a(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=nC(t,this.transformPagePoint),B.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();let{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if(this.dragSnapToOrigin&&i&&i(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let o=nB("pointercancel"===e.type?this.lastMoveEventInfo:nC(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,o),r&&r(e,o)},!ng(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.contextWindow=r||window;let o=nA(e),a=nC(o,this.transformPagePoint),{point:s}=a,{timestamp:u}=R;this.history=[{...s,timestamp:u}];let{onSessionStart:l}=t;l&&l(e,nB(a,this.history)),this.removeListeners=tv(nT(this.contextWindow,"pointermove",this.handlePointerMove),nT(this.contextWindow,"pointerup",this.handlePointerUp),nT(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),M(this.updatePoint)}}function nC(e,t){return t?{point:t(e.point)}:e}function nO(e,t){return{x:e.x-t.x,y:e.y-t.y}}function nB({point:e},t){return{point:e,delta:nO(e,nM(t)),offset:nO(e,t[0]),velocity:function(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=nM(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>m(.1)));)n--;if(!r)return{x:0,y:0};let o=g(i.timestamp-r.timestamp);if(0===o)return{x:0,y:0};let a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}(t,0)}}function nM(e){return e[e.length-1]}function nR(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function nL(e){return e.max-e.min}function nN(e,t,n,r=.5){e.origin=r,e.originPoint=tw(t.min,t.max,e.origin),e.scale=nL(n)/nL(t),e.translate=tw(n.min,n.max,e.origin)-e.originPoint,(e.scale>=.9999&&e.scale<=1.0001||isNaN(e.scale))&&(e.scale=1),(e.translate>=-.01&&e.translate<=.01||isNaN(e.translate))&&(e.translate=0)}function nD(e,t,n,r){nN(e.x,t.x,n.x,r?r.originX:void 0),nN(e.y,t.y,n.y,r?r.originY:void 0)}function nF(e,t,n){e.min=n.min+t.min,e.max=e.min+nL(t)}function nq(e,t,n){e.min=t.min-n.min,e.max=e.min+nL(t)}function nj(e,t,n){nq(e.x,t.x,n.x),nq(e.y,t.y,n.y)}function nU(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function nz(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min({translate:0,scale:1,origin:0,originPoint:0}),nK=()=>({x:n$(),y:n$()}),nH=()=>({min:0,max:0}),nG=()=>({x:nH(),y:nH()});function nZ(e){return[e("x"),e("y")]}function nY({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function nX(e){return void 0===e||1===e}function nQ({scale:e,scaleX:t,scaleY:n}){return!nX(e)||!nX(t)||!nX(n)}function nJ(e){return nQ(e)||n0(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function n0(e){var t,n;return(t=e.x)&&"0%"!==t||(n=e.y)&&"0%"!==n}function n1(e,t,n,r,i){return void 0!==i&&(e=r+i*(e-r)),r+n*(e-r)+t}function n2(e,t=0,n=1,r,i){e.min=n1(e.min,t,n,r,i),e.max=n1(e.max,t,n,r,i)}function n6(e,{x:t,y:n}){n2(e.x,t.translate,t.scale,t.originPoint),n2(e.y,n.translate,n.scale,n.originPoint)}function n3(e,t){e.min=e.min+t,e.max=e.max+t}function n4(e,t,n,r,i=.5){let o=tw(e.min,e.max,i);n2(e,t,n,o,r)}function n5(e,t){n4(e.x,t.x,t.scaleX,t.scale,t.originX),n4(e.y,t.y,t.scaleY,t.scale,t.originY)}function n8(e,t){return nY(function(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}(e.getBoundingClientRect(),t))}let n9=({current:e})=>e?e.ownerDocument.defaultView:null,n7=new WeakMap;class re{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=nG(),this.visualElement=e}start(e,{snapToCursor:t=!1}={}){let{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;let r=e=>{let{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),t&&this.snapToCursor(nA(e).point)},i=(e,t)=>{let{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock="x"===n||"y"===n?nf[n]?null:(nf[n]=!0,()=>{nf[n]=!1}):nf.x||nf.y?null:(nf.x=nf.y=!0,()=>{nf.x=nf.y=!1}),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),nZ(e=>{let t=this.getAxisMotionValue(e).get()||0;if(eu.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];if(r){let e=nL(r);t=e*(parseFloat(t)/100)}}}this.originPoint[e]=t}),i&&B.postRender(()=>i(e,t)),nn(this.visualElement,"transform");let{animationState:o}=this.visualElement;o&&o.setActive("whileDrag",!0)},o=(e,t)=>{let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:o}=this.getProps();if(!n&&!this.openDragLock)return;let{offset:a}=t;if(r&&null===this.currentDirection){this.currentDirection=function(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}(a),null!==this.currentDirection&&i&&i(this.currentDirection);return}this.updateAxis("x",t.point,a),this.updateAxis("y",t.point,a),this.visualElement.render(),o&&o(e,t)},a=(e,t)=>this.stop(e,t),s=()=>nZ(e=>{var t;return"paused"===this.getAnimationState(e)&&(null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new nP(e,{onSessionStart:r,onStart:i,onMove:o,onSessionEnd:a,resumeAnimation:s},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:n9(this.visualElement)})}stop(e,t){let n=this.isDragging;if(this.cancel(),!n)return;let{velocity:r}=t;this.startAnimation(r);let{onDragEnd:i}=this.getProps();i&&B.postRender(()=>i(e,t))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;let{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive("whileDrag",!1)}updateAxis(e,t,n){let{drag:r}=this.getProps();if(!n||!rt(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),o=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(o=function(e,{min:t,max:n},r){return void 0!==t&&en&&(e=r?tw(n,e,r.max):Math.min(e,n)),e}(o,this.constraints[e],this.elastic[e])),i.set(o)}resolveConstraints(){var e;let{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):null===(e=this.visualElement.projection)||void 0===e?void 0:e.layout,i=this.constraints;t&&nR(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=function(e,{top:t,left:n,bottom:r,right:i}){return{x:nU(e.x,n,i),y:nU(e.y,t,r)}}(r.layoutBox,t):this.constraints=!1,this.elastic=function(e=.35){return!1===e?e=0:!0===e&&(e=.35),{x:nV(e,"left","right"),y:nV(e,"top","bottom")}}(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&nZ(e=>{!1!==this.constraints&&this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){let n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(r.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){var e;let{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!nR(t))return!1;let r=t.current;(0,G.k)(null!==r,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");let{projection:i}=this.visualElement;if(!i||!i.layout)return!1;let o=function(e,t,n){let r=n8(e,n),{scroll:i}=t;return i&&(n3(r.x,i.offset.x),n3(r.y,i.offset.y)),r}(r,i.root,this.visualElement.getTransformPagePoint()),a={x:nz((e=i.layout.layoutBox).x,o.x),y:nz(e.y,o.y)};if(n){let e=n(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(a));this.hasMutatedConstraints=!!e,e&&(a=nY(e))}return a}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),s=this.constraints||{},u=nZ(a=>{if(!rt(a,t,this.currentDirection))return;let u=s&&s[a]||{};o&&(u={min:0,max:0});let l={type:"inertia",velocity:n?e[a]:0,bounceStiffness:r?200:1e6,bounceDamping:r?40:1e7,timeConstant:750,restDelta:1,restSpeed:10,...i,...u};return this.startAxisValueAnimation(a,l)});return Promise.all(u).then(a)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return nn(this.visualElement,e),n.start(tJ(e,n,0,t,this.visualElement,!1))}stopAnimation(){nZ(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){nZ(e=>{var t;return null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.pause()})}getAnimationState(e){var t;return null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.state}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps(),r=n[t];return r||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){nZ(t=>{let{drag:n}=this.getProps();if(!rt(t,n,this.currentDirection))return;let{projection:r}=this.visualElement,i=this.getAxisMotionValue(t);if(r&&r.layout){let{min:n,max:o}=r.layout.layoutBox[t];i.set(e[t]-tw(n,o,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!nR(t)||!n||!this.constraints)return;this.stopAnimation();let r={x:0,y:0};nZ(e=>{let t=this.getAxisMotionValue(e);if(t&&!1!==this.constraints){let n=t.get();r[e]=function(e,t){let n=.5,r=nL(e),i=nL(t);return i>r?n=tt(t.min,t.max-r,e.min):r>i&&(n=tt(e.min,e.max-i,t.min)),en(0,1,n)}({min:n,max:n},this.constraints[e])}});let{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),nZ(t=>{if(!rt(t,e,null))return;let n=this.getAxisMotionValue(t),{min:i,max:o}=this.constraints[t];n.set(tw(i,o,r[t]))})}addListeners(){if(!this.visualElement.current)return;n7.set(this.visualElement,this);let e=this.visualElement.current,t=nT(e,"pointerdown",e=>{let{drag:t,dragListener:n=!0}=this.getProps();t&&n&&this.start(e)}),n=()=>{let{dragConstraints:e}=this.getProps();nR(e)&&e.current&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,i=r.addEventListener("measure",n);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),B.read(n);let o=nI(window,"resize",()=>this.scalePositionWithinConstraints()),a=r.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(nZ(t=>{let n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())});return()=>{o(),t(),i(),a&&a()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:o=.35,dragMomentum:a=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:o,dragMomentum:a}}}function rt(e,t,n){return(!0===t||t===e)&&(null===n||n===e)}let rn=e=>(t,n)=>{e&&B.postRender(()=>e(t,n))};var rr=n(85893),ri=n(67294),ro=n(85128),ra=n(96179);let rs=(0,ri.createContext)({}),ru={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function rl(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}let rc={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!el.test(e))return e;e=parseFloat(e)}let n=rl(e,t.target.x),r=rl(e,t.target.y);return`${n}% ${r}%`}},rd={},{schedule:rp,cancel:rf}=O(queueMicrotask,!1);class rh extends ri.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;Object.assign(rd,rg),i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),ru.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,o=n.projection;return o&&(o.isPresent=i,r||e.layoutDependency!==t||void 0===t?o.willUpdate():this.safeToRemove(),e.isPresent===i||(i?o.promote():o.relegate()||B.postRender(()=>{let e=o.getStack();e&&e.members.length||this.safeToRemove()}))),null}componentDidUpdate(){let{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),rp.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}}function rm(e){let[t,n]=(0,ro.oO)(),r=(0,ri.useContext)(ra.p);return(0,rr.jsx)(rh,{...e,layoutGroup:r,switchLayoutGroup:(0,ri.useContext)(rs),isPresent:t,safeToRemove:n})}let rg={borderRadius:{...rc,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:rc,borderTopRightRadius:rc,borderBottomLeftRadius:rc,borderBottomRightRadius:rc,boxShadow:{correct:(e,{treeScale:t,projectionDelta:n})=>{let r=eG.parse(e);if(r.length>5)return e;let i=eG.createTransformer(e),o="number"!=typeof r[0]?1:0,a=n.x.scale*t.x,s=n.y.scale*t.y;r[0+o]/=a,r[1+o]/=s;let u=tw(a,s,.5);return"number"==typeof r[2+o]&&(r[2+o]/=u),"number"==typeof r[3+o]&&(r[3+o]/=u),i(r)}}},ry=["TopLeft","TopRight","BottomLeft","BottomRight"],rb=ry.length,r_=e=>"string"==typeof e?parseFloat(e):e,rv=e=>"number"==typeof e||el.test(e);function rw(e,t){return void 0!==e[t]?e[t]:e.borderRadius}let rk=rA(0,.5,$),rx=rA(.5,.95,P.Z);function rA(e,t,n){return r=>rt?1:n(tt(e,t,r))}function rS(e,t){e.min=t.min,e.max=t.max}function rI(e,t){rS(e.x,t.x),rS(e.y,t.y)}function rT(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function rE(e,t,n,r,i){return e-=t,e=r+1/n*(e-r),void 0!==i&&(e=r+1/i*(e-r)),e}function rP(e,t,[n,r,i],o,a){!function(e,t=0,n=1,r=.5,i,o=e,a=e){if(eu.test(t)){t=parseFloat(t);let e=tw(a.min,a.max,t/100);t=e-a.min}if("number"!=typeof t)return;let s=tw(o.min,o.max,r);e===o&&(s-=t),e.min=rE(e.min,t,n,s,i),e.max=rE(e.max,t,n,s,i)}(e,t[n],t[r],t[i],t.scale,o,a)}let rC=["x","scaleX","originX"],rO=["y","scaleY","originY"];function rB(e,t,n,r){rP(e.x,t,rC,n?n.x:void 0,r?r.x:void 0),rP(e.y,t,rO,n?n.y:void 0,r?r.y:void 0)}function rM(e){return 0===e.translate&&1===e.scale}function rR(e){return rM(e.x)&&rM(e.y)}function rL(e,t){return e.min===t.min&&e.max===t.max}function rN(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function rD(e,t){return rN(e.x,t.x)&&rN(e.y,t.y)}function rF(e){return nL(e.x)/nL(e.y)}function rq(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class rj{constructor(){this.members=[]}add(e){t2(this.members,e),e.scheduleRender()}remove(e){if(t6(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){let t;let n=this.members.findIndex(t=>e===t);if(0===n)return!1;for(let e=n;e>=0;e--){let n=this.members[e];if(!1!==n.isPresent){t=n;break}}return!!t&&(this.promote(t),!0)}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender(),e.resumeFrom=n,t&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);let{crossfade:r}=e.options;!1===r&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{let{options:t,resumingFrom:n}=e;t.onExitComplete&&t.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}let rU=(e,t)=>e.depth-t.depth;class rz{constructor(){this.children=[],this.isDirty=!1}add(e){t2(this.children,e),this.isDirty=!0}remove(e){t6(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(rU),this.isDirty=!1,this.children.forEach(e)}}function rV(e){let t=nt(e)?e.get():e;return t0(t)?t.toValue():t}let rW={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},r$="undefined"!=typeof window&&void 0!==window.MotionDebug,rK=["","X","Y","Z"],rH={visibility:"hidden"},rG=0;function rZ(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function rY({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=null==t?void 0:t()){this.id=rG++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,r$&&(rW.totalNodes=rW.resolvedTargetDeltas=rW.recalculatedProjection=0),this.nodes.forEach(rJ),this.nodes.forEach(r5),this.nodes.forEach(r8),this.nodes.forEach(r0),r$&&window.MotionDebug.record(rW)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;ethis.root.updateBlockedByResize=!1;e(t,()=>{this.root.updateBlockedByResize=!0,n&&n(),n=function(e,t){let n=e9.now(),r=({timestamp:i})=>{let o=i-n;o>=t&&(M(r),e(o-t))};return B.read(r,!0),()=>M(r)}(r,250),ru.hasAnimatedSinceResize&&(ru.hasAnimatedSinceResize=!1,this.nodes.forEach(r4))})}r&&this.root.registerSharedNode(r,this),!1!==this.options.animate&&o&&(r||i)&&this.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t,hasRelativeTargetChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let i=this.options.transition||o.getDefaultTransition()||ii,{onLayoutAnimationStart:a,onLayoutAnimationComplete:s}=o.getProps(),u=!this.targetLayout||!rD(this.targetLayout,r)||n,l=!t&&n;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||l||t&&(u||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(e,l);let t={...k(i,"layout"),onPlay:a,onComplete:s};(o.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t)}else t||r4(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,M(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){!this.isUpdateBlocked()&&(this.isUpdating=!0,this.nodes&&this.nodes.forEach(r9),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&function e(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;let{visualElement:n}=t.options;if(!n)return;let r=n.props[ne];if(window.MotionHasOptimisedAnimation(r,"transform")){let{layout:e,layoutId:n}=t.options;window.MotionCancelOptimisedAnimation(r,"transform",B,!(e||n))}let{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&e(i)}(this),this.root.isUpdating||this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e.999999999999&&(t.x=1),t.y<1.0000000000001&&t.y>.999999999999&&(t.y=1)}}(this.layoutCorrected,this.treeScale,this.path,n),t.layout&&!t.target&&(1!==this.treeScale.x||1!==this.treeScale.y)&&(t.target=t.layout.layoutBox,t.targetWithTransforms=nG());let{target:u}=t;if(!u){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}this.projectionDelta&&this.prevProjectionDelta?(rT(this.prevProjectionDelta.x,this.projectionDelta.x),rT(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),nD(this.projectionDelta,this.layoutCorrected,u,this.latestValues),this.treeScale.x===a&&this.treeScale.y===s&&rq(this.projectionDelta.x,this.prevProjectionDelta.x)&&rq(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",u)),r$&&rW.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){var t;if(null===(t=this.options.visualElement)||void 0===t||t.scheduleRender(),e){let e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=nK(),this.projectionDelta=nK(),this.projectionDeltaWithTransform=nK()}setAnimationOrigin(e,t=!1){let n;let r=this.snapshot,i=r?r.latestValues:{},o={...this.latestValues},a=nK();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let s=nG(),u=r?r.source:void 0,l=this.layout?this.layout.source:void 0,c=u!==l,d=this.getStack(),p=!d||d.members.length<=1,f=!!(c&&!p&&!0===this.options.crossfade&&!this.path.some(ir));this.animationProgress=0,this.mixTargetDelta=t=>{let r=t/1e3;if(ie(a.x,e.x,r),ie(a.y,e.y,r),this.setTargetDelta(a),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout){var u,l,d,h;nj(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox),d=this.relativeTarget,h=this.relativeTargetOrigin,it(d.x,h.x,s.x,r),it(d.y,h.y,s.y,r),n&&(u=this.relativeTarget,l=n,rL(u.x,l.x)&&rL(u.y,l.y))&&(this.isProjectionDirty=!1),n||(n=nG()),rI(n,this.relativeTarget)}c&&(this.animationValues=o,function(e,t,n,r,i,o){i?(e.opacity=tw(0,void 0!==n.opacity?n.opacity:1,rk(r)),e.opacityExit=tw(void 0!==t.opacity?t.opacity:1,0,rx(r))):o&&(e.opacity=tw(void 0!==t.opacity?t.opacity:1,void 0!==n.opacity?n.opacity:1,r));for(let i=0;i{ru.hasAnimatedSinceResize=!0,this.currentAnimation=function(e,t,n){let r=nt(e)?e:t9(e);return r.start(tJ("",r,1e3,n)),r.animation}(0,0,{...e,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,target:n,layout:r,latestValues:i}=e;if(t&&n&&r){if(this!==e&&this.layout&&r&&iu(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||nG();let t=nL(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;let r=nL(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}rI(t,n),n5(t,i),nD(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new rj);let n=this.sharedNodes.get(e);n.add(t);let r=t.options.initialPromotionConfig;t.promote({transition:r?r.transition:void 0,preserveFollowOpacity:r&&r.shouldPreserveFollowOpacity?r.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return!e||e.lead===this}getLead(){var e;let{layoutId:t}=this.options;return t&&(null===(e=this.getStack())||void 0===e?void 0:e.lead)||this}getPrevLead(){var e;let{layoutId:t}=this.options;return t?null===(e=this.getStack())||void 0===e?void 0:e.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){let r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return!!e&&e.relegate(this)}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;let r={};n.z&&rZ("z",e,r,this.animationValues);for(let t=0;t{var t;return null===(t=e.currentAnimation)||void 0===t?void 0:t.stop()}),this.root.nodes.forEach(r2),this.root.sharedNodes.clear()}}}function rX(e){e.updateLayout()}function rQ(e){var t;let n=(null===(t=e.resumeFrom)||void 0===t?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){let{layoutBox:t,measuredBox:r}=e.layout,{animationType:i}=e.options,o=n.source!==e.layout.source;"size"===i?nZ(e=>{let r=o?n.measuredBox[e]:n.layoutBox[e],i=nL(r);r.min=t[e].min,r.max=r.min+i}):iu(i,n.layoutBox,t)&&nZ(r=>{let i=o?n.measuredBox[r]:n.layoutBox[r],a=nL(t[r]);i.max=i.min+a,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+a)});let a=nK();nD(a,t,n.layoutBox);let s=nK();o?nD(s,e.applyTransform(r,!0),n.measuredBox):nD(s,t,n.layoutBox);let u=!rR(a),l=!1;if(!e.resumeFrom){let r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){let{snapshot:i,layout:o}=r;if(i&&o){let a=nG();nj(a,n.layoutBox,i.layoutBox);let s=nG();nj(s,t,o.layoutBox),rD(a,s)||(l=!0),r.options.layoutRoot&&(e.relativeTarget=s,e.relativeTargetOrigin=a,e.relativeParent=r)}}}e.notifyListeners("didUpdate",{layout:t,snapshot:n,delta:s,layoutDelta:a,hasLayoutChanged:u,hasRelativeTargetChanged:l})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function rJ(e){r$&&rW.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function r0(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function r1(e){e.clearSnapshot()}function r2(e){e.clearMeasurements()}function r6(e){e.isLayoutDirty=!1}function r3(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function r4(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function r5(e){e.resolveTargetDelta()}function r8(e){e.calcProjection()}function r9(e){e.resetSkewAndRotation()}function r7(e){e.removeLeadSnapshot()}function ie(e,t,n){e.translate=tw(t.translate,0,n),e.scale=tw(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function it(e,t,n,r){e.min=tw(t.min,n.min,r),e.max=tw(t.max,n.max,r)}function ir(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}let ii={duration:.45,ease:[.4,0,.1,1]},io=e=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),ia=io("applewebkit/")&&!io("chrome/")?Math.round:P.Z;function is(e){e.min=ia(e.min),e.max=ia(e.max)}function iu(e,t,n){return"position"===e||"preserve-aspect"===e&&!(.2>=Math.abs(rF(t)-rF(n)))}function il(e){var t;return e!==e.root&&(null===(t=e.scroll)||void 0===t?void 0:t.wasRoot)}let ic=rY({attachResizeListener:(e,t)=>nI(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),id={current:void 0},ip=rY({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!id.current){let e=new ic({});e.mount(window),e.setOptions({layoutScroll:!0}),id.current=e}return id.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>"fixed"===window.getComputedStyle(e).position});function ih(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover","Start"===n);let i=r["onHover"+n];i&&B.postRender(()=>i(t,nA(t)))}function im(e,t,n){let{props:r}=e;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap","Start"===n);let i=r["onTap"+("End"===n?"":n)];i&&B.postRender(()=>i(t,nA(t)))}let ig=new WeakMap,iy=new WeakMap,ib=e=>{let t=ig.get(e.target);t&&t(e)},i_=e=>{e.forEach(ib)},iv={some:0,all:1};var iw=n(87649);let ik=(0,ri.createContext)({});var ix=n(38168),iA=n(54283);let iS=(0,ri.createContext)({strict:!1});function iI(e){return i(e.animate)||p.some(t=>s(e[t]))}function iT(e){return!!(iI(e)||e.variants)}function iE(e){return Array.isArray(e)?e.join(" "):e}let iP={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},iC={};for(let e in iP)iC[e]={isEnabled:t=>iP[e].some(e=>!!t[e])};var iO=n(47976);let iB=Symbol.for("motionComponentSymbol"),iM=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function iR(e){if("string"!=typeof e||e.includes("-"));else if(iM.indexOf(e)>-1||/[A-Z]/u.test(e))return!0;return!1}function iL(e,{style:t,vars:n},r,i){for(let o in Object.assign(e.style,t,i&&i.getProjectionStyles(r)),n)e.style.setProperty(o,n[o])}let iN=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function iD(e,t,n,r){for(let n in iL(e,t,void 0,r),t.attrs)e.setAttribute(iN.has(n)?n:t7(n),t.attrs[n])}function iF(e,{layout:t,layoutId:n}){return h.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!rd[e]||"opacity"===e)}function iq(e,t,n){var r;let{style:i}=e,o={};for(let a in i)(nt(i[a])||t.style&&nt(t.style[a])||iF(a,e)||(null===(r=null==n?void 0:n.getValue(a))||void 0===r?void 0:r.liveStyle)!==void 0)&&(o[a]=i[a]);return o}function ij(e,t,n){let r=iq(e,t,n);for(let n in e)if(nt(e[n])||nt(t[n])){let t=-1!==f.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n;r[t]=e[n]}return r}var iU=n(16770);let iz=e=>(t,n)=>{let r=(0,ri.useContext)(ik),o=(0,ri.useContext)(ix.O),a=()=>(function({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,o,a){let s={latestValues:function(e,t,n,r){let o={},a=r(e,{});for(let e in a)o[e]=rV(a[e]);let{initial:s,animate:u}=e,c=iI(e),d=iT(e);t&&d&&!c&&!1!==e.inherit&&(void 0===s&&(s=t.initial),void 0===u&&(u=t.animate));let p=!!n&&!1===n.initial;p=p||!1===s;let f=p?u:s;if(f&&"boolean"!=typeof f&&!i(f)){let t=Array.isArray(f)?f:[f];for(let n=0;nn(r,e,s)),s})(e,t,r,o);return n?a():(0,iU.h)(a)},iV=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),iW=()=>({...iV(),attrs:{}}),i$=(e,t)=>t&&"number"==typeof e?t.transform(e):e,iK={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},iH=f.length;function iG(e,t,n){let{style:r,vars:i,transformOrigin:o}=e,a=!1,s=!1;for(let e in t){let n=t[e];if(h.has(e)){a=!0;continue}if(X(e)){i[e]=n;continue}{let t=i$(n,e0[e]);e.startsWith("origin")?(s=!0,o[e]=t):r[e]=t}}if(!t.transform&&(a||n?r.transform=function(e,t,n){let r="",i=!0;for(let o=0;o"string"==typeof e&&"svg"===e.toLowerCase(),i0={useVisualState:iz({scrapeMotionValuesFromProps:ij,createRenderState:iW,onMount:(e,t,{renderState:n,latestValues:r})=>{B.read(()=>{try{n.dimensions="function"==typeof t.getBBox?t.getBBox():t.getBoundingClientRect()}catch(e){n.dimensions={x:0,y:0,width:0,height:0}}}),B.render(()=>{iQ(n,r,iJ(t.tagName),e.transformTemplate),iD(t,n)})}})},i1={useVisualState:iz({scrapeMotionValuesFromProps:iq,createRenderState:iV})};function i2(e,t,n){for(let r in t)nt(t[r])||iF(r,n)||(e[r]=t[r])}function i6(e,t){let n={},r=function(e,t){let n=e.style||{},r={};return i2(r,n,e),Object.assign(r,function({transformTemplate:e},t){return(0,ri.useMemo)(()=>{let n=iV();return iG(n,t,e),Object.assign({},n.vars,n.style)},[t])}(e,t)),r}(e,t);return e.drag&&!1!==e.dragListener&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=!0===e.drag?"none":`pan-${"x"===e.drag?"y":"x"}`),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}let i3=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function i4(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||i3.has(e)}let i5=e=>!i4(e);try{(T=n(71068).Z)&&(i5=e=>e.startsWith("on")?!i4(e):T(e))}catch(e){}function i8(e,t,n,r){let i=(0,ri.useMemo)(()=>{let n=iW();return iQ(n,t,iJ(r),e.transformTemplate),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};i2(t,e.style,e),i.style={...t,...i.style}}return i}let i9={current:null},i7={current:!1},oe=new WeakMap,ot=[...ew,eq,eG],on=e=>ot.find(ev(e)),or=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class oi{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,blockInitialAnimation:i,visualState:o},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=eE,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let e=e9.now();this.renderScheduledAtthis.bindToMotionValue(t,e)),i7.current||function(){if(i7.current=!0,iO.j){if(window.matchMedia){let e=window.matchMedia("(prefers-reduced-motion)"),t=()=>i9.current=e.matches;e.addListener(t),t()}else i9.current=!1}}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||i9.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){for(let e in oe.delete(this.current),this.projection&&this.projection.unmount(),M(this.notifyUpdate),M(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this),this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}bindToMotionValue(e,t){let n;this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();let r=h.has(e),i=t.on("change",t=>{this.latestValues[e]=t,this.props.onUpdate&&B.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),o=t.on("renderRequest",this.scheduleRender);window.MotionCheckAppearSync&&(n=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{i(),o(),n&&n(),t.owner&&t.stop()})}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in iC){let t=iC[e];if(!t)continue;let{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):nG()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;tt.variantChildren.delete(e)}addValue(e,t){let n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return void 0===n&&void 0!==t&&(n=t9(null===t?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){var n;let r=void 0===this.latestValues[e]&&this.current?null!==(n=this.getBaseTargetFromProps(this.props,e))&&void 0!==n?n:this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];return null!=r&&("string"==typeof r&&(Z(r)||H(r))?r=parseFloat(r):!on(r)&&eG.test(t)&&(r=e6(e,t)),this.setBaseTarget(e,nt(r)?r.get():r)),nt(r)?r.get():r}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var t;let n;let{initial:r}=this.props;if("string"==typeof r||"object"==typeof r){let i=l(this.props,r,null===(t=this.presenceContext)||void 0===t?void 0:t.custom);i&&(n=i[e])}if(r&&void 0!==n)return n;let i=this.getBaseTargetFromProps(this.props,e);return void 0===i||nt(i)?void 0!==this.initialValues[e]&&void 0===n?void 0:this.baseTarget[e]:i}on(e,t){return this.events[e]||(this.events[e]=new t3),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}}class oo extends oi{constructor(){super(...arguments),this.KeyframeResolver=e4}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;nt(e)&&(this.childSubscription=e.on("change",e=>{this.current&&(this.current.textContent=`${e}`)}))}}class oa extends oo{constructor(){super(...arguments),this.type="html",this.renderInstance=iL}readValueFromInstance(e,t){if(h.has(t)){let e=e2(t);return e&&e.default||0}{let n=window.getComputedStyle(e),r=(X(t)?n.getPropertyValue(t):n[t])||0;return"string"==typeof r?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return n8(e,t)}build(e,t,n){iG(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return iq(e,t,n)}}class os extends oo{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=nG}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(h.has(t)){let e=e2(t);return e&&e.default||0}return t=iN.has(t)?t:t7(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return ij(e,t,n)}build(e,t,n){iQ(e,t,this.isSVGTag,n.transformTemplate)}renderInstance(e,t,n,r){iD(e,t,n,r)}mount(e){this.isSVGTag=iJ(e.tagName),super.mount(e)}}let ou=(e,t)=>iR(e)?new os(t):new oa(t,{allowProjection:e!==ri.Fragment}),ol=(E={animation:{Feature:class extends nd{constructor(e){super(e),e.animationState||(e.animationState=function(e){let t=t=>Promise.all(t.map(({animation:t,options:n})=>(function(e,t,n={}){let r;if(e.notify("AnimationStart",t),Array.isArray(t)){let i=t.map(t=>ni(e,t,n));r=Promise.all(i)}else if("string"==typeof t)r=ni(e,t,n);else{let i="function"==typeof t?c(e,t,n.custom):t;r=Promise.all(nr(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})})(e,t,n))),n=nc(),r=!0,u=t=>(n,r)=>{var i;let o=c(e,r,"exit"===t?null===(i=e.presenceContext)||void 0===i?void 0:i.custom:void 0);if(o){let{transition:e,transitionEnd:t,...r}=o;n={...n,...r,...t}}return n};function l(l){let{props:c}=e,d=function e(t){if(!t)return;if(!t.isControllingVariants){let n=t.parent&&e(t.parent)||{};return void 0!==t.props.initial&&(n.initial=t.props.initial),n}let n={};for(let e=0;eg&&v,S=!1,I=Array.isArray(_)?_:[_],T=I.reduce(u(p),{});!1===w&&(T={});let{prevResolvedValues:E={}}=b,P={...E,...T},C=t=>{A=!0,h.has(t)&&(S=!0,h.delete(t)),b.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)};for(let e in P){let t=T[e],n=E[e];if(!m.hasOwnProperty(e))(o(t)&&o(n)?a(t,n):t===n)?void 0!==t&&h.has(e)?C(e):b.protectedKeys[e]=!0:null!=t?C(e):h.add(e)}b.prevProp=_,b.prevResolvedValues=T,b.isActive&&(m={...m,...T}),r&&e.blockInitialAnimation&&(A=!1);let O=k&&x,B=!O||S;A&&B&&f.push(...I.map(e=>({animation:e,options:{type:p}})))}if(h.size){let t={};h.forEach(n=>{let r=e.getBaseTarget(n),i=e.getValue(n);i&&(i.liveStyle=!0),t[n]=null!=r?r:null}),f.push({animation:t})}let b=!!f.length;return r&&(!1===c.initial||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(b=!1),r=!1,b?t(f):Promise.resolve()}return{animateChanges:l,setActive:function(t,r){var i;if(n[t].isActive===r)return Promise.resolve();null===(i=e.variantChildren)||void 0===i||i.forEach(e=>{var n;return null===(n=e.animationState)||void 0===n?void 0:n.setActive(t,r)}),n[t].isActive=r;let o=l(t);for(let e in n)n[e].protectedKeys={};return o},setAnimateFunction:function(n){t=n(e)},getState:()=>n,reset:()=>{n=nc(),r=!0}}}(e))}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();i(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),null===(e=this.unmountControls)||void 0===e||e.call(this)}}},exit:{Feature:class extends nd{constructor(){super(...arguments),this.id=np++}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;let r=this.node.animationState.setActive("exit",!e);t&&!e&&r.then(()=>t(this.id))}mount(){let{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}},inView:{Feature:class extends nd{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r="some",once:i}=e,o={root:t?t.current:void 0,rootMargin:n,threshold:"number"==typeof r?r:iv[r]},a=e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),o=t?n:r;o&&o(e)};return function(e,t,n){let r=function({root:e,...t}){let n=e||document;iy.has(n)||iy.set(n,{});let r=iy.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(i_,{root:e,...t})),r[i]}(t);return ig.set(e,n),r.observe(e),()=>{ig.delete(e),r.unobserve(e)}}(this.node.current,o,a)}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;let{props:e,prevProps:t}=this.node,n=["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}(e,t));n&&this.startObserver()}unmount(){}}},tap:{Feature:class extends nd{mount(){let{current:e}=this.node;e&&(this.unmount=function(e,t,n={}){let[r,i,o]=nh(e,n),a=e=>{let r=e.currentTarget;if(!nx(e)||ny.has(r))return;ny.add(r);let o=t(e),a=(e,t)=>{window.removeEventListener("pointerup",s),window.removeEventListener("pointercancel",u),nx(e)&&ny.has(r)&&(ny.delete(r),o&&o(e,{success:t}))},s=e=>{a(e,n.useGlobalTarget||nk(r,e.target))},u=e=>{a(e,!1)};window.addEventListener("pointerup",s,i),window.addEventListener("pointercancel",u,i)};return r.forEach(e=>{nw.has(e.tagName)||-1!==e.tabIndex||(e.tabIndex=0);let t=n.useGlobalTarget?window:e;t.addEventListener("pointerdown",a,i),e.addEventListener("focus",e=>nv(e,i),i)}),o}(e,e=>(im(this.node,e,"Start"),(e,{success:t})=>im(this.node,e,t?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}},focus:{Feature:class extends nd{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(t){e=!0}e&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=tv(nI(this.node.current,"focus",()=>this.onFocus()),nI(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends nd{mount(){let{current:e}=this.node;e&&(this.unmount=function(e,t,n={}){let[r,i,o]=nh(e,n),a=nm(e=>{let{target:n}=e,r=t(e);if(!r||!n)return;let o=nm(e=>{r(e),n.removeEventListener("pointerleave",o)});n.addEventListener("pointerleave",o,i)});return r.forEach(e=>{e.addEventListener("pointerenter",a,i)}),o}(e,e=>(ih(this.node,e,"Start"),e=>ih(this.node,e,"End"))))}unmount(){}}},pan:{Feature:class extends nd{constructor(){super(...arguments),this.removePointerDownListener=P.Z}onPointerDown(e){this.session=new nP(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:n9(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:rn(e),onStart:rn(t),onMove:n,onEnd:(e,t)=>{delete this.session,r&&B.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=nT(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends nd{constructor(e){super(e),this.removeGroupControls=P.Z,this.removeListeners=P.Z,this.controls=new re(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||P.Z}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:ip,MeasureLayout:rm},layout:{ProjectionNode:ip,MeasureLayout:rm}},function(e,{forwardMotionProps:t}={forwardMotionProps:!1}){let n=iR(e)?i0:i1,r={...n,preloadedFeatures:E,useRender:function(e=!1){let t=(t,n,r,{latestValues:i},o)=>{let a=iR(t)?i8:i6,s=a(n,i,o,t),u=function(e,t,n){let r={};for(let i in e)("values"!==i||"object"!=typeof e.values)&&(i5(i)||!0===n&&i4(i)||!t&&!i4(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}(n,"string"==typeof t,e),l=t!==ri.Fragment?{...u,...s,ref:r}:{},{children:c}=n,d=(0,ri.useMemo)(()=>nt(c)?c.get():c,[c]);return(0,ri.createElement)(t,{...l,children:d})};return t}(t),createVisualElement:ou,Component:e};return function({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&function(e){for(let t in e)iC[t]={...iC[t],...e[t]}}(e);let o=(0,ri.forwardRef)(function(e,o){var a,u;let l;let c={...(0,ri.useContext)(iw._),...e,layoutId:function({layoutId:e}){let t=(0,ri.useContext)(ra.p).id;return t&&void 0!==e?t+"-"+e:e}(e)},{isStatic:d}=c,p=function(e){let{initial:t,animate:n}=function(e,t){if(iI(e)){let{initial:t,animate:n}=e;return{initial:!1===t||s(t)?t:void 0,animate:s(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,(0,ri.useContext)(ik));return(0,ri.useMemo)(()=>({initial:t,animate:n}),[iE(t),iE(n)])}(e),f=r(e,d);if(!d&&iO.j){(0,ri.useContext)(iS).strict;let e=function(e){let{drag:t,layout:n}=iC;if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:(null==t?void 0:t.isEnabled(e))||(null==n?void 0:n.isEnabled(e))?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}(c);l=e.MeasureLayout,p.visualElement=function(e,t,n,r,i){var o,a;let{visualElement:s}=(0,ri.useContext)(ik),u=(0,ri.useContext)(iS),l=(0,ri.useContext)(ix.O),c=(0,ri.useContext)(iw._).reducedMotion,d=(0,ri.useRef)(null);r=r||u.renderer,!d.current&&r&&(d.current=r(e,{visualState:t,parent:s,props:n,presenceContext:l,blockInitialAnimation:!!l&&!1===l.initial,reducedMotionConfig:c}));let p=d.current,f=(0,ri.useContext)(rs);p&&!p.projection&&i&&("html"===p.type||"svg"===p.type)&&function(e,t,n,r){let{layoutId:i,layout:o,drag:a,dragConstraints:s,layoutScroll:u,layoutRoot:l}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:function e(t){if(t)return!1!==t.options.allowProjection?t.projection:e(t.parent)}(e.parent)),e.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!a||s&&nR(s),visualElement:e,animationType:"string"==typeof o?o:"both",initialPromotionConfig:r,layoutScroll:u,layoutRoot:l})}(d.current,n,i,f);let h=(0,ri.useRef)(!1);(0,ri.useInsertionEffect)(()=>{p&&h.current&&p.update(n,l)});let m=n[ne],g=(0,ri.useRef)(!!m&&!(null===(o=window.MotionHandoffIsComplete)||void 0===o?void 0:o.call(window,m))&&(null===(a=window.MotionHasOptimisedAnimation)||void 0===a?void 0:a.call(window,m)));return(0,iA.L)(()=>{p&&(h.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),rp.render(p.render),g.current&&p.animationState&&p.animationState.animateChanges())}),(0,ri.useEffect)(()=>{p&&(!g.current&&p.animationState&&p.animationState.animateChanges(),g.current&&(queueMicrotask(()=>{var e;null===(e=window.MotionHandoffMarkAsComplete)||void 0===e||e.call(window,m)}),g.current=!1))}),p}(i,f,c,t,e.ProjectionNode)}return(0,rr.jsxs)(ik.Provider,{value:p,children:[l&&p.visualElement?(0,rr.jsx)(l,{visualElement:p.visualElement,...c}):null,n(i,e,(a=p.visualElement,u=o,(0,ri.useCallback)(e=>{e&&f.mount&&f.mount(e),a&&(e?a.mount(e):a.unmount()),u&&("function"==typeof u?u(e):nR(u)&&(u.current=e))},[a])),f,d,p.visualElement)]})});return o[iB]=i,o}(r)}),oc=function(e){if("undefined"==typeof Proxy)return e;let t=new Map,n=(...t)=>e(...t);return new Proxy(n,{get:(n,r)=>"create"===r?e:(t.has(r)||t.set(r,e(r)),t.get(r))})}(ol)},47976:function(e,t,n){"use strict";n.d(t,{j:function(){return r}});let r="undefined"!=typeof window},16770:function(e,t,n){"use strict";n.d(t,{h:function(){return i}});var r=n(67294);function i(e){let t=(0,r.useRef)(null);return null===t.current&&(t.current=e()),t.current}},54283:function(e,t,n){"use strict";n.d(t,{L:function(){return o}});var r=n(67294),i=n(47976);let o=i.j?r.useLayoutEffect:r.useEffect},53767:function(e,t,n){"use strict";function r(e,t){if(!e)throw Error(t)}n.d(t,{a:function(){return r}})},6589:function(e,t,n){"use strict";function r(e){return function e(t,n){switch(typeof t){case"string":return JSON.stringify(t);case"function":return t.name?`[function ${t.name}]`:"[function]";case"object":return function(t,n){if(null===t)return"null";if(n.includes(t))return"[Circular]";let r=[...n,t];if("function"==typeof t.toJSON){let n=t.toJSON();if(n!==t)return"string"==typeof n?n:e(n,r)}else if(Array.isArray(t))return function(t,n){if(0===t.length)return"[]";if(n.length>2)return"[Array]";let r=Math.min(10,t.length),i=t.length-r,o=[];for(let i=0;i1&&o.push(`... ${i} more items`),"["+o.join(", ")+"]"}(t,r);return function(t,n){let r=Object.entries(t);if(0===r.length)return"{}";if(n.length>2)return"["+function(e){let t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){let t=e.constructor.name;if("string"==typeof t&&""!==t)return t}return t}(t)+"]";let i=r.map(([t,r])=>t+": "+e(r,n));return"{ "+i.join(", ")+" }"}(t,r)}(t,n);default:return String(t)}}(e,[])}n.d(t,{X:function(){return r}})},2387:function(e,t,n){"use strict";var r,i;n.d(t,{UG:function(){return l},WU:function(){return a},Ye:function(){return o},h8:function(){return s},ku:function(){return r}});class o{constructor(e,t,n){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=n}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}}class a{constructor(e,t,n,r,i,o){this.kind=e,this.start=t,this.end=n,this.line=r,this.column=i,this.value=o,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}}let s={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},u=new Set(Object.keys(s));function l(e){let t=null==e?void 0:e.kind;return"string"==typeof t&&u.has(t)}(i=r||(r={})).QUERY="query",i.MUTATION="mutation",i.SUBSCRIPTION="subscription"},7420:function(e,t,n){"use strict";n.d(t,{LZ:function(){return o},wv:function(){return i}});var r=n(91022);function i(e){var t,n;let i=Number.MAX_SAFE_INTEGER,o=null,a=-1;for(let t=0;t0===t?e:e.slice(i)).slice(null!==(t=o)&&void 0!==t?t:0,a+1)}function o(e,t){let n=e.replace(/"""/g,'\\"""'),i=n.split(/\r\n|[\n\r]/g),o=1===i.length,a=i.length>1&&i.slice(1).every(e=>0===e.length||(0,r.FD)(e.charCodeAt(0))),s=n.endsWith('\\"""'),u=e.endsWith('"')&&!s,l=e.endsWith("\\"),c=u||l,d=!(null!=t&&t.minimize)&&(!o||e.length>70||c||a||s),p="",f=o&&(0,r.FD)(e.charCodeAt(0));return(d&&!f||a)&&(p+="\n"),p+=n,(d||c)&&(p+="\n"),'"""'+p+'"""'}},91022:function(e,t,n){"use strict";function r(e){return 9===e||32===e}function i(e){return e>=48&&e<=57}function o(e){return e>=97&&e<=122||e>=65&&e<=90}function a(e){return o(e)||95===e}function s(e){return o(e)||i(e)||95===e}n.d(t,{FD:function(){return r},HQ:function(){return s},LQ:function(){return a},X1:function(){return i}})},6450:function(e,t,n){"use strict";var r,i;n.d(t,{h:function(){return r}}),(i=r||(r={})).NAME="Name",i.DOCUMENT="Document",i.OPERATION_DEFINITION="OperationDefinition",i.VARIABLE_DEFINITION="VariableDefinition",i.SELECTION_SET="SelectionSet",i.FIELD="Field",i.ARGUMENT="Argument",i.FRAGMENT_SPREAD="FragmentSpread",i.INLINE_FRAGMENT="InlineFragment",i.FRAGMENT_DEFINITION="FragmentDefinition",i.VARIABLE="Variable",i.INT="IntValue",i.FLOAT="FloatValue",i.STRING="StringValue",i.BOOLEAN="BooleanValue",i.NULL="NullValue",i.ENUM="EnumValue",i.LIST="ListValue",i.OBJECT="ObjectValue",i.OBJECT_FIELD="ObjectField",i.DIRECTIVE="Directive",i.NAMED_TYPE="NamedType",i.LIST_TYPE="ListType",i.NON_NULL_TYPE="NonNullType",i.SCHEMA_DEFINITION="SchemaDefinition",i.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",i.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",i.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",i.FIELD_DEFINITION="FieldDefinition",i.INPUT_VALUE_DEFINITION="InputValueDefinition",i.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",i.UNION_TYPE_DEFINITION="UnionTypeDefinition",i.ENUM_TYPE_DEFINITION="EnumTypeDefinition",i.ENUM_VALUE_DEFINITION="EnumValueDefinition",i.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",i.DIRECTIVE_DEFINITION="DirectiveDefinition",i.SCHEMA_EXTENSION="SchemaExtension",i.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",i.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",i.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",i.UNION_TYPE_EXTENSION="UnionTypeExtension",i.ENUM_TYPE_EXTENSION="EnumTypeExtension",i.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"},8679:function(e,t,n){"use strict";var r=n(59864),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function u(e){return r.isMemo(e)?a:s[e.$$typeof]||i}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var l=Object.defineProperty,c=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(h){var i=f(n);i&&i!==h&&e(t,i,r)}var a=c(n);d&&(a=a.concat(d(n)));for(var s=u(t),m=u(n),g=0;g<]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;function a(e){var t={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},n=e.match(/<\/?([^\s]+?)[/\s>]/);if(n&&(t.name=n[1],(i()[n[1]]||"/"===e.charAt(e.length-2))&&(t.voidElement=!0),t.name.startsWith("!--"))){var r=e.indexOf("-->");return{type:"comment",comment:-1!==r?e.slice(4,r):""}}for(var a=new RegExp(o),s=null;null!==(s=a.exec(e));)if(s[0].trim()){if(s[1]){var u=s[1].trim(),l=[u,""];u.indexOf("=")>-1&&(l=u.split("=")),t.attrs[l[0]]=l[1],a.lastIndex--}else s[2]&&(t.attrs[s[2]]=s[3].trim().substring(1,s[3].length-1))}return t}var s=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,u=/^\s*$/,l=Object.create(null);t.Z={parse:function(e,t){t||(t={}),t.components||(t.components=l);var n,r=[],i=[],o=-1,c=!1;if(0!==e.indexOf("<")){var d=e.indexOf("<");r.push({type:"text",content:-1===d?e:e.substring(0,d)})}return e.replace(s,function(s,l){if(c){if(s!=="")return;c=!1}var d,p="/"!==s.charAt(1),f=s.startsWith(""}}("",t)},"")}}},31928:function(e,t,n){"use strict";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 i(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function o(e){var t=function(e,t){if("object"!==r(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!==r(i))return i;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===r(t)?t:String(t)}function a(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=Array(t);n1&&void 0!==arguments[1]?arguments[1]:{};i(this,e),this.init(t,n)}return s(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||y,this.options=t,this.debug=t.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,t=Array(e),n=0;n1?t-1:0),r=1;r-1?e.replace(/###/g,"."):e}function i(){return!e||"string"==typeof e}for(var o="string"!=typeof t?[].concat(t):t.split(".");o.length>1;){if(i())return{};var a=r(o.shift());!e[a]&&n&&(e[a]=new n),e=Object.prototype.hasOwnProperty.call(e,a)?e[a]:{}}return i()?{}:{obj:e,k:r(o.shift())}}function x(e,t,n){var r=k(e,t,Object);r.obj[r.k]=n}function A(e,t){var n=k(e,t),r=n.obj,i=n.k;if(r)return r[i]}function S(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var I={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function T(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,function(e){return I[e]}):e}var E="undefined"!=typeof window&&window.navigator&&void 0===window.navigator.userAgentData&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,P=[" ",",","?","!",";"];function C(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(e){if(e[t])return e[t];for(var r=t.split(n),i=e,o=0;oo+a;)a++,u=i[s=r.slice(o,o+a).join(n)];if(void 0===u)return;if(null===u)return null;if(t.endsWith(s)){if("string"==typeof u)return u;if(s&&"string"==typeof u[s])return u[s]}var l=r.slice(o+a).join(n);if(l)return C(u,l,n);return}i=i[r[o]]}return i}}function O(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function B(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return i(this,r),t=n.call(this),E&&_.call(u(t)),t.data=e||{},t.options=o,void 0===t.options.keySeparator&&(t.options.keySeparator="."),void 0===t.options.ignoreJSONStructure&&(t.options.ignoreJSONStructure=!0),t}return s(r,[{key:"addNamespaces",value:function(e){0>this.options.ns.indexOf(e)&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,o=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure,a=[e,t];n&&"string"!=typeof n&&(a=a.concat(n)),n&&"string"==typeof n&&(a=a.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(a=e.split("."));var s=A(this.data,a);return s||!o||"string"!=typeof n?s:C(this.data&&this.data[e]&&this.data[e][t],n,i)}},{key:"addResource",value:function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},o=this.options.keySeparator;void 0===o&&(o=".");var a=[e,t];n&&(a=a.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(a=e.split("."),r=t,t=a[1]),this.addNamespaces(t),x(this.data,a,r),i.silent||this.emit("added",e,t,n,r)}},{key:"addResources",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var i in n)("string"==typeof n[i]||"[object Array]"===Object.prototype.toString.apply(n[i]))&&this.addResource(e,t,i,n[i],{silent:!0});r.silent||this.emit("added",e,t,n)}},{key:"addResourceBundle",value:function(e,t,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},a=[e,t];e.indexOf(".")>-1&&(a=e.split("."),r=n,n=t,t=a[1]),this.addNamespaces(t);var s=A(this.data,a)||{};r?function e(t,n,r){for(var i in n)"__proto__"!==i&&"constructor"!==i&&(i in t?"string"==typeof t[i]||t[i]instanceof String||"string"==typeof n[i]||n[i]instanceof String?r&&(t[i]=n[i]):e(t[i],n[i],r):t[i]=n[i]);return t}(s,n,i):s=B(B({},s),n),x(this.data,a,s),o.silent||this.emit("added",e,t,n)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return(t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI)?B(B({},{}),this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"hasLanguageSomeTranslations",value:function(e){var t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(function(e){return t[e]&&Object.keys(t[e]).length>0})}},{key:"toJSON",value:function(){return this.data}}]),r}(_),R={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,n,r,i){var o=this;return e.forEach(function(e){o.processors[e]&&(t=o.processors[e].process(t,n,r,i))}),t}};function L(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function N(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{};return i(this,o),t=n.call(this),E&&_.call(u(t)),!function(e,t,n){e.forEach(function(e){t[e]&&(n[e]=t[e])})}(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,u(t)),t.options=r,void 0===t.options.keySeparator&&(t.options.keySeparator="."),t.logger=b.create("translator"),t}return s(o,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;var n=this.resolve(e,t);return n&&void 0!==n.res}},{key:"extractFromKey",value:function(e,t){var n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");var r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,i=t.ns||this.options.defaultNS||[],o=n&&e.indexOf(n)>-1,a=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!function(e,t,n){t=t||"",n=n||"";var r=P.filter(function(e){return 0>t.indexOf(e)&&0>n.indexOf(e)});if(0===r.length)return!0;var i=new RegExp("(".concat(r.map(function(e){return"?"===e?"\\?":e}).join("|"),")")),o=!i.test(e);if(!o){var a=e.indexOf(n);a>0&&!i.test(e.substring(0,a))&&(o=!0)}return o}(e,n,r);if(o&&!a){var s=e.match(this.interpolator.nestingRegexp);if(s&&s.length>0)return{key:e,namespaces:i};var u=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(u[0])>-1)&&(i=u.shift()),e=u.join(r)}return"string"==typeof i&&(i=[i]),{key:e,namespaces:i}}},{key:"translate",value:function(e,t,n){var i=this;if("object"!==r(t)&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),"object"===r(t)&&(t=N({},t)),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var a=void 0!==t.returnDetails?t.returnDetails:this.options.returnDetails,s=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,u=this.extractFromKey(e[e.length-1],t),l=u.key,c=u.namespaces,d=c[c.length-1],p=t.lng||this.language,f=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(p&&"cimode"===p.toLowerCase()){if(f){var h=t.nsSeparator||this.options.nsSeparator;return a?{res:"".concat(d).concat(h).concat(l),usedKey:l,exactUsedKey:l,usedLng:p,usedNS:d}:"".concat(d).concat(h).concat(l)}return a?{res:l,usedKey:l,exactUsedKey:l,usedLng:p,usedNS:d}:l}var m=this.resolve(e,t),g=m&&m.res,y=m&&m.usedKey||l,b=m&&m.exactUsedKey||l,_=Object.prototype.toString.apply(g),v=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,w=!this.i18nFormat||this.i18nFormat.handleAsObject,k="string"!=typeof g&&"boolean"!=typeof g&&"number"!=typeof g;if(w&&g&&k&&0>["[object Number]","[object Function]","[object RegExp]"].indexOf(_)&&!("string"==typeof v&&"[object Array]"===_)){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var x=this.options.returnedObjectHandler?this.options.returnedObjectHandler(y,g,N(N({},t),{},{ns:c})):"key '".concat(l," (").concat(this.language,")' returned an object instead of string.");return a?(m.res=x,m):x}if(s){var A="[object Array]"===_,S=A?[]:{},I=A?b:y;for(var T in g)if(Object.prototype.hasOwnProperty.call(g,T)){var E="".concat(I).concat(s).concat(T);S[T]=this.translate(E,N(N({},t),{joinArrays:!1,ns:c})),S[T]===E&&(S[T]=g[T])}g=S}}else if(w&&"string"==typeof v&&"[object Array]"===_)(g=g.join(v))&&(g=this.extendTranslation(g,e,t,n));else{var P=!1,C=!1,O=void 0!==t.count&&"string"!=typeof t.count,B=o.hasDefaultValue(t),M=O?this.pluralResolver.getSuffix(p,t.count,t):"",R=t["defaultValue".concat(M)]||t.defaultValue;!this.isValidLookup(g)&&B&&(P=!0,g=R),this.isValidLookup(g)||(C=!0,g=l);var L=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&C?void 0:g,D=B&&R!==g&&this.options.updateMissing;if(C||P||D){if(this.logger.log(D?"updateKey":"missingKey",p,d,l,D?R:g),s){var F=this.resolve(l,N(N({},t),{},{keySeparator:!1}));F&&F.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var q=[],j=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&j&&j[0])for(var U=0;U1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach(function(e){if(!a.isValidLookup(t)){var u=a.extractFromKey(e,s),l=u.key;n=l;var c=u.namespaces;a.options.fallbackNS&&(c=c.concat(a.options.fallbackNS));var d=void 0!==s.count&&"string"!=typeof s.count,p=d&&!s.ordinal&&0===s.count&&a.pluralResolver.shouldUseIntlApi(),f=void 0!==s.context&&("string"==typeof s.context||"number"==typeof s.context)&&""!==s.context,h=s.lngs?s.lngs:a.languageUtils.toResolveHierarchy(s.lng||a.language,s.fallbackLng);c.forEach(function(e){a.isValidLookup(t)||(o=e,!D["".concat(h[0],"-").concat(e)]&&a.utils&&a.utils.hasLoadedNamespace&&!a.utils.hasLoadedNamespace(o)&&(D["".concat(h[0],"-").concat(e)]=!0,a.logger.warn('key "'.concat(n,'" for languages "').concat(h.join(", "),'" won\'t get resolved as namespace "').concat(o,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),h.forEach(function(n){if(!a.isValidLookup(t)){i=n;var o,u=[l];if(a.i18nFormat&&a.i18nFormat.addLookupKeys)a.i18nFormat.addLookupKeys(u,l,n,e,s);else{d&&(c=a.pluralResolver.getSuffix(n,s.count,s));var c,h="".concat(a.options.pluralSeparator,"zero");if(d&&(u.push(l+c),p&&u.push(l+h)),f){var m="".concat(l).concat(a.options.contextSeparator).concat(s.context);u.push(m),d&&(u.push(m+c),p&&u.push(m+h))}}for(;o=u.pop();)a.isValidLookup(t)||(r=o,t=a.getResource(n,e,o,s))}}))})}}),{res:t,usedKey:n,exactUsedKey:r,usedLng:i,usedNS:o}}},{key:"isValidLookup",value:function(e){return void 0!==e&&!(!this.options.returnNull&&null===e)&&!(!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}}],[{key:"hasDefaultValue",value:function(e){var t="defaultValue";for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,t.length)&&void 0!==e[n])return!0;return!1}}]),o}(_);function q(e){return e.charAt(0).toUpperCase()+e.slice(1)}var j=function(){function e(t){i(this,e),this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=b.create("languageUtils")}return s(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||0>e.indexOf("-"))return null;var t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase())?null:this.formatLanguageCode(t.join("-"))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||0>e.indexOf("-"))return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if("string"==typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],n=e.split("-");return this.options.lowerCaseLng?n=n.map(function(e){return e.toLowerCase()}):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=q(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=q(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=q(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isSupportedCode",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}},{key:"getBestMatchFromCodes",value:function(e){var t,n=this;return e?(e.forEach(function(e){if(!t){var r=n.formatLanguageCode(e);(!n.options.supportedLngs||n.isSupportedCode(r))&&(t=r)}}),!t&&this.options.supportedLngs&&e.forEach(function(e){if(!t){var r=n.getLanguagePartFromCode(e);if(n.isSupportedCode(r))return t=r;t=n.options.supportedLngs.find(function(e){if(e===r||!(0>e.indexOf("-")&&0>r.indexOf("-"))&&0===e.indexOf(r))return e})}}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];var n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}},{key:"toResolveHierarchy",value:function(e,t){var n=this,r=this.getFallbackCodes(t||this.options.fallbackLng||[],e),i=[],o=function(e){e&&(n.isSupportedCode(e)?i.push(e):n.logger.warn("rejecting language code not found in supportedLngs: ".concat(e)))};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):"string"==typeof e&&o(this.formatLanguageCode(e)),r.forEach(function(e){0>i.indexOf(e)&&o(n.formatLanguageCode(e))}),i}}]),e}(),U=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],z={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1&&e%100!=11?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0==e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}},V=["v1","v2","v3"],W={zero:0,one:1,two:2,few:3,many:4,other:5},$=function(){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};i(this,e),this.languageUtils=t,this.options=r,this.logger=b.create("pluralResolver"),this.options.compatibilityJSON&&"v4"!==this.options.compatibilityJSON||"undefined"!=typeof Intl&&Intl.PluralRules||(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=(n={},U.forEach(function(e){e.lngs.forEach(function(t){n[t]={numbers:e.nr,plurals:z[e.fc]}})}),n)}return s(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(e,{type:t.ordinal?"ordinal":"cardinal"})}catch(e){return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getRule(e,t);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,n).map(function(e){return"".concat(t).concat(e)})}},{key:"getSuffixes",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.getRule(e,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort(function(e,t){return W[e]-W[t]}).map(function(e){return"".concat(t.options.prepend).concat(e)}):r.numbers.map(function(r){return t.getSuffix(e,r,n)}):[]}},{key:"getSuffix",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.getRule(e,n);return r?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(r.select(t)):this.getSuffixRetroCompatible(r,t):(this.logger.warn("no plural rule found for: ".concat(e)),"")}},{key:"getSuffixRetroCompatible",value:function(e,t){var n=this,r=e.noAbs?e.plurals(t):e.plurals(Math.abs(t)),i=e.numbers[r];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]&&(2===i?i="plural":1===i&&(i=""));var o=function(){return n.options.prepend&&i.toString()?n.options.prepend+i.toString():i.toString()};return"v1"===this.options.compatibilityJSON?1===i?"":"number"==typeof i?"_plural_".concat(i.toString()):o():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]?o():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}},{key:"shouldUseIntlApi",value:function(){return!V.includes(this.options.compatibilityJSON)}}]),e}();function K(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function H(e){for(var t=1;t3&&void 0!==arguments[3]?arguments[3]:".",o=!(arguments.length>4)||void 0===arguments[4]||arguments[4],a=void 0!==(r=A(e,n))?r:A(t,n);return!a&&o&&"string"==typeof n&&void 0===(a=C(e,n,i))&&(a=C(t,n,i)),a}var Z=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,e),this.logger=b.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return s(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var t=e.interpolation;this.escape=void 0!==t.escape?t.escape:T,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?S(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?S(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?S(t.nestingPrefix):t.nestingPrefixEscaped||S("$t("),this.nestingSuffix=t.nestingSuffix?S(t.nestingSuffix):t.nestingSuffixEscaped||S(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=RegExp(t,"g");var n="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=RegExp(n,"g")}},{key:"interpolate",value:function(e,t,n,r){var i,o,a,s=this,u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function l(e){return e.replace(/\$/g,"$$$$")}var c=function(e){if(0>e.indexOf(s.formatSeparator)){var i=G(t,u,e,s.options.keySeparator,s.options.ignoreJSONStructure);return s.alwaysFormat?s.format(i,void 0,n,H(H(H({},r),t),{},{interpolationkey:e})):i}var o=e.split(s.formatSeparator),a=o.shift().trim(),l=o.join(s.formatSeparator).trim();return s.format(G(t,u,a,s.options.keySeparator,s.options.ignoreJSONStructure),l,n,H(H(H({},r),t),{},{interpolationkey:a}))};this.resetRegExp();var d=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,p=r&&r.interpolation&&void 0!==r.interpolation.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:function(e){return l(e)}},{regex:this.regexp,safeValue:function(e){return s.escapeValue?l(s.escape(e)):l(e)}}].forEach(function(t){for(a=0;i=t.regex.exec(e);){var n=i[1].trim();if(void 0===(o=c(n))){if("function"==typeof d){var u=d(e,i,r);o="string"==typeof u?u:""}else if(r&&Object.prototype.hasOwnProperty.call(r,n))o="";else if(p){o=i[0];continue}else s.logger.warn("missed to pass in variable ".concat(n," for interpolating ").concat(e)),o=""}else"string"==typeof o||s.useRawValueToEscape||(o=w(o));var l=t.safeValue(o);if(e=e.replace(i[0],l),p?(t.regex.lastIndex+=o.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,++a>=s.maxReplaces)break}}),e}},{key:"nest",value:function(e,t){var n,r,i,o=this,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};function s(e,t){var n=this.nestingOptionsSeparator;if(0>e.indexOf(n))return e;var r=e.split(new RegExp("".concat(n,"[ ]*{"))),o="{".concat(r[1]);e=r[0];var a=(o=this.interpolate(o,i)).match(/'/g),s=o.match(/"/g);(a&&a.length%2==0&&!s||s.length%2!=0)&&(o=o.replace(/'/g,'"'));try{i=JSON.parse(o),t&&(i=H(H({},t),i))}catch(t){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),t),"".concat(e).concat(n).concat(o)}return delete i.defaultValue,e}for(;n=this.nestingRegexp.exec(e);){var u=[];(i=(i=H({},a)).replace&&"string"!=typeof i.replace?i.replace:i).applyPostProcessor=!1,delete i.defaultValue;var l=!1;if(-1!==n[0].indexOf(this.formatSeparator)&&!/{.*}/.test(n[1])){var c=n[1].split(this.formatSeparator).map(function(e){return e.trim()});n[1]=c.shift(),u=c,l=!0}if((r=t(s.call(this,n[1].trim(),i),i))&&n[0]===e&&"string"!=typeof r)return r;"string"!=typeof r&&(r=w(r)),r||(this.logger.warn("missed to resolve ".concat(n[1]," for nesting ").concat(e)),r=""),l&&(r=u.reduce(function(e,t){return o.format(e,t,a.lng,H(H({},a),{},{interpolationkey:n[1].trim()}))},r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}]),e}();function Y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function X(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};i(this,e),this.logger=b.create("formatter"),this.options=t,this.formats={number:Q(function(e,t){var n=new Intl.NumberFormat(e,X({},t));return function(e){return n.format(e)}}),currency:Q(function(e,t){var n=new Intl.NumberFormat(e,X(X({},t),{},{style:"currency"}));return function(e){return n.format(e)}}),datetime:Q(function(e,t){var n=new Intl.DateTimeFormat(e,X({},t));return function(e){return n.format(e)}}),relativetime:Q(function(e,t){var n=new Intl.RelativeTimeFormat(e,X({},t));return function(e){return n.format(e,t.range||"day")}}),list:Q(function(e,t){var n=new Intl.ListFormat(e,X({},t));return function(e){return n.format(e)}})},this.init(t)}return s(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},n=t.interpolation;this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||","}},{key:"add",value:function(e,t){this.formats[e.toLowerCase().trim()]=t}},{key:"addCached",value:function(e,t){this.formats[e.toLowerCase().trim()]=Q(t)}},{key:"format",value:function(e,t,n){var r=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return t.split(this.formatSeparator).reduce(function(e,t){var o=function(e){var t=e.toLowerCase().trim(),n={};if(e.indexOf("(")>-1){var r=e.split("(");t=r[0].toLowerCase().trim();var i=r[1].substring(0,r[1].length-1);"currency"===t&&0>i.indexOf(":")?n.currency||(n.currency=i.trim()):"relativetime"===t&&0>i.indexOf(":")?n.range||(n.range=i.trim()):i.split(";").forEach(function(e){if(e){var t,r=function(e){if(Array.isArray(e))return e}(t=e.split(":"))||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return h(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return h(e,t)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),i=r[0],o=r.slice(1).join(":").trim().replace(/^'+|'+$/g,"");n[i.trim()]||(n[i.trim()]=o),"false"===o&&(n[i.trim()]=!1),"true"===o&&(n[i.trim()]=!0),isNaN(o)||(n[i.trim()]=parseInt(o,10))}})}return{formatName:t,formatOptions:n}}(t),a=o.formatName,s=o.formatOptions;if(r.formats[a]){var u=e;try{var l=i&&i.formatParams&&i.formatParams[i.interpolationkey]||{},c=l.locale||l.lng||i.locale||i.lng||n;u=r.formats[a](e,c,X(X(X({},s),i),l))}catch(e){r.logger.warn(e)}return u}return r.logger.warn("there was no format function for ".concat(a)),e},e)}}]),e}();function ee(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function et(e){for(var t=1;t3&&void 0!==arguments[3]?arguments[3]:{};return i(this,r),a=n.call(this),E&&_.call(u(a)),a.backend=e,a.store=t,a.services=o,a.languageUtils=o.languageUtils,a.options=s,a.logger=b.create("backendConnector"),a.waitingReads=[],a.maxParallelReads=s.maxParallelReads||10,a.readingCalls=0,a.maxRetries=s.maxRetries>=0?s.maxRetries:5,a.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,a.state={},a.queue=[],a.backend&&a.backend.init&&a.backend.init(o,s.backend,s),a}return s(r,[{key:"queueLoad",value:function(e,t,n,r){var i=this,o={},a={},s={},u={};return e.forEach(function(e){var r=!0;t.forEach(function(t){var s="".concat(e,"|").concat(t);!n.reload&&i.store.hasResourceBundle(e,t)?i.state[s]=2:i.state[s]<0||(1===i.state[s]?void 0===a[s]&&(a[s]=!0):(i.state[s]=1,r=!1,void 0===a[s]&&(a[s]=!0),void 0===o[s]&&(o[s]=!0),void 0===u[t]&&(u[t]=!0)))}),r||(s[e]=!0)}),(Object.keys(o).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(o),pending:Object.keys(a),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(u)}}},{key:"loaded",value:function(e,t,n){var r=e.split("|"),i=r[0],o=r[1];t&&this.emit("failedLoading",i,o,t),n&&this.store.addResourceBundle(i,o,n),this.state[e]=t?-1:2;var a={};this.queue.forEach(function(n){var r,s,u,l,c;(u=(s=k(n.loaded,[i],Object)).obj)[l=s.k]=u[l]||[],r&&(u[l]=u[l].concat(o)),r||u[l].push(o),void 0!==(c=n).pending[e]&&(delete c.pending[e],c.pendingCount--),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach(function(e){a[e]||(a[e]={});var t=n.loaded[e];t.length&&t.forEach(function(t){void 0===a[e][t]&&(a[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(function(e){return!e.done})}},{key:"read",value:function(e,t,n){var r=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:i,wait:o,callback:a});return}this.readingCalls++;var s=function(s,u){if(r.readingCalls--,r.waitingReads.length>0){var l=r.waitingReads.shift();r.read(l.lng,l.ns,l.fcName,l.tried,l.wait,l.callback)}if(s&&u&&i2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var o=this.queueLoad(e,t,r,i);if(!o.toLoad.length)return o.pending.length||i(),null;o.toLoad.forEach(function(e){n.loadOne(e)})}},{key:"load",value:function(e,t,n){this.prepareLoading(e,t,{},n)}},{key:"reload",value:function(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}},{key:"loadOne",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=e.split("|"),i=r[0],o=r[1];this.read(i,o,"read",void 0,void 0,function(r,a){r&&t.logger.warn("".concat(n,"loading namespace ").concat(o," for language ").concat(i," failed"),r),!r&&a&&t.logger.log("".concat(n,"loaded namespace ").concat(o," for language ").concat(i),a),t.loaded(e,r,a)})}},{key:"saveMissing",value:function(e,t,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:function(){};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)){this.logger.warn('did not save key "'.concat(n,'" as the namespace "').concat(t,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(null!=n&&""!==n){if(this.backend&&this.backend.create){var s,u=et(et({},o),{},{isUpdate:i}),l=this.backend.create.bind(this.backend);if(l.length<6)try{(s=5===l.length?l(e,t,n,r,u):l(e,t,n,r))&&"function"==typeof s.then?s.then(function(e){return a(null,e)}).catch(a):a(null,s)}catch(e){a(e)}else l(e,t,n,r,a,u)}e&&e[0]&&this.store.addResource(e[0],t,n,r)}}}]),r}(_);function er(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if("object"===r(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===r(e[2])||"object"===r(e[3])){var n=e[3]||e[2];Object.keys(n).forEach(function(e){t[e]=n[e]})}return t},interpolation:{escapeValue:!0,format:function(e,t,n,r){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function ei(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&0>e.supportedLngs.indexOf("cimode")&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function eo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ea(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;if(i(this,o),e=n.call(this),E&&_.call(u(e)),e.options=ei(t),e.services={},e.logger=b,e.modules={external:[]},!function(e){Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(function(t){"function"==typeof e[t]&&(e[t]=e[t].bind(e))})}(u(e)),r&&!e.isInitialized&&!t.isClone){if(!e.options.initImmediate)return e.init(t,r),d(e,u(e));setTimeout(function(){e.init(t,r)},0)}return e}return s(o,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;"function"==typeof t&&(n=t,t={}),!t.defaultNS&&!1!==t.defaultNS&&t.ns&&("string"==typeof t.ns?t.defaultNS=t.ns:0>t.ns.indexOf("translation")&&(t.defaultNS=t.ns[0]));var r=er();function i(e){return e?"function"==typeof e?new e:e:null}if(this.options=ea(ea(ea({},r),this.options),ei(t)),"v1"!==this.options.compatibilityAPI&&(this.options.interpolation=ea(ea({},r.interpolation),this.options.interpolation)),void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator),!this.options.isClone){this.modules.logger?b.init(i(this.modules.logger),this.options):b.init(null,this.options),this.modules.formatter?o=this.modules.formatter:"undefined"!=typeof Intl&&(o=J);var o,a=new j(this.options);this.store=new M(this.options.resources,this.options);var s=this.services;s.logger=b,s.resourceStore=this.store,s.languageUtils=a,s.pluralResolver=new $(a,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),o&&(!this.options.interpolation.format||this.options.interpolation.format===r.interpolation.format)&&(s.formatter=i(o),s.formatter.init(s,this.options),this.options.interpolation.format=s.formatter.format.bind(s.formatter)),s.interpolator=new Z(this.options),s.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},s.backendConnector=new en(i(this.modules.backend),s.resourceStore,s,this.options),s.backendConnector.on("*",function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i1?n-1:0),i=1;i0&&"dev"!==u[0]&&(this.options.lng=u[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments),e}});var l=v(),c=function(){var t=function(t,r){e.isInitialized&&!e.initializedStoreOnce&&e.logger.warn("init: i18next is already initialized. You should call init just once!"),e.isInitialized=!0,e.options.isClone||e.logger.log("initialized",e.options),e.emit("initialized",e.options),l.resolve(r),n(t,r)};if(e.languages&&"v1"!==e.options.compatibilityAPI&&!e.isInitialized)return t(null,e.t.bind(e));e.changeLanguage(e.options.lng,t)};return this.options.resources||!this.options.initImmediate?c():setTimeout(c,0),l}},{key:"loadResources",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:es,r=n,i="string"==typeof e?e:this.language;if("function"==typeof e&&(r=e),!this.options.resources||this.options.partialBundledLanguages){if(i&&"cimode"===i.toLowerCase())return r();var o=[],a=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach(function(e){0>o.indexOf(e)&&o.push(e)})};i?a(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(function(e){return a(e)}),this.options.preload&&this.options.preload.forEach(function(e){return a(e)}),this.services.backendConnector.load(o,this.options.ns,function(e){e||t.resolvedLanguage||!t.language||t.setResolvedLanguage(t.language),r(e)})}else r(null)}},{key:"reloadResources",value:function(e,t,n){var r=v();return e||(e=this.languages),t||(t=this.options.ns),n||(n=es),this.services.backendConnector.reload(e,t,function(e){r.resolve(),n(e)}),r}},{key:"use",value:function(e){if(!e)throw Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&R.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"setResolvedLanguage",value:function(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1))for(var t=0;t-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}}},{key:"changeLanguage",value:function(e,t){var n=this;this.isLanguageChangingTo=e;var r=v();this.emit("languageChanging",e);var i=function(e){n.language=e,n.languages=n.services.languageUtils.toResolveHierarchy(e),n.resolvedLanguage=void 0,n.setResolvedLanguage(e)},o=function(e,o){o?(i(o),n.translator.changeLanguage(o),n.isLanguageChangingTo=void 0,n.emit("languageChanged",o),n.logger.log("languageChanged",o)):n.isLanguageChangingTo=void 0,r.resolve(function(){return n.t.apply(n,arguments)}),t&&t(e,function(){return n.t.apply(n,arguments)})},a=function(t){e||t||!n.services.languageDetector||(t=[]);var r="string"==typeof t?t:n.services.languageUtils.getBestMatchFromCodes(t);r&&(n.language||i(r),n.translator.language||n.translator.changeLanguage(r),n.services.languageDetector&&n.services.languageDetector.cacheUserLanguage&&n.services.languageDetector.cacheUserLanguage(r)),n.loadResources(r,function(e){o(e,r)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e):a(this.services.languageDetector.detect()),r}},{key:"getFixedT",value:function(e,t,n){var i=this,o=function e(t,o){if("object"!==r(o)){for(var a,s,u=arguments.length,l=Array(u>2?u-2:0),c=2;c1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var r=this.resolvedLanguage||this.languages[0],i=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===r.toLowerCase())return!0;var a=function(e,n){var r=t.services.backendConnector.state["".concat(e,"|").concat(n)];return -1===r||2===r};if(n.precheck){var s=n.precheck(this,a);if(void 0!==s)return s}return!!(this.hasResourceBundle(r,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(r,e)&&(!i||a(o,e)))}},{key:"loadNamespaces",value:function(e,t){var n=this,r=v();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach(function(e){0>n.options.ns.indexOf(e)&&n.options.ns.push(e)}),this.loadResources(function(e){r.resolve(),t&&t(e)}),r):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var n=v();"string"==typeof e&&(e=[e]);var r=this.options.preload||[],i=e.filter(function(e){return 0>r.indexOf(e)});return i.length?(this.options.preload=r.concat(i),this.loadResources(function(e){n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){return(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),e)?["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf((this.services&&this.services.languageUtils||new j(er())).getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr":"rtl"}},{key:"cloneInstance",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:es,r=ea(ea(ea({},this.options),t),{isClone:!0}),i=new o(r);return(void 0!==t.debug||void 0!==t.prefix)&&(i.logger=i.logger.clone(t)),["store","services","language"].forEach(function(t){i[t]=e[t]}),i.services=ea({},this.services),i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i.translator=new F(i.services,i.options),i.translator.on("*",function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new eu(e,t)});var el=eu.createInstance();el.createInstance=eu.createInstance,el.createInstance,el.dir,el.init,el.loadResources,el.reloadResources,el.use,el.changeLanguage,el.getFixedT;var ec=el.t;el.exists,el.setDefaultNamespace,el.hasLoadedNamespace,el.loadNamespaces,el.loadLanguages},80645:function(e,t){/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */t.read=function(e,t,n,r,i){var o,a,s=8*i-r-1,u=(1<>1,c=-7,d=n?i-1:0,p=n?-1:1,f=e[t+d];for(d+=p,o=f&(1<<-c)-1,f>>=-c,c+=s;c>0;o=256*o+e[t+d],d+=p,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=r;c>0;a=256*a+e[t+d],d+=p,c-=8);if(0===o)o=1-l;else{if(o===u)return a?NaN:(f?-1:1)*(1/0);a+=Math.pow(2,r),o-=l}return(f?-1:1)*a*Math.pow(2,o-r)},t.write=function(e,t,n,r,i,o){var a,s,u,l=8*o-i-1,c=(1<>1,p=23===i?5960464477539062e-23:0,f=r?0:o-1,h=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(isNaN(t=Math.abs(t))||t===1/0?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),a+d>=1?t+=p/u:t+=p*Math.pow(2,1-d),t*u>=2&&(a++,u/=2),a+d>=c?(s=0,a=c):a+d>=1?(s=(t*u-1)*Math.pow(2,i),a+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,i),a=0));i>=8;e[n+f]=255&s,f+=h,s/=256,i-=8);for(a=a<0;e[n+f]=255&a,f+=h,a/=256,l-=8);e[n+f-h]|=128*m}},31198:function(e,t,n){"use strict";let r=n(64667).v4,i=n(17741),o=function(e,t){if(!(this instanceof o))return new o(e,t);t||(t={}),this.options={reviver:void 0!==t.reviver?t.reviver:null,replacer:void 0!==t.replacer?t.replacer:null,generator:void 0!==t.generator?t.generator:function(){return r()},version:void 0!==t.version?t.version:2,notificationIdNull:"boolean"==typeof t.notificationIdNull&&t.notificationIdNull},this.callServer=e};e.exports=o,o.prototype.request=function(e,t,n,r){let o;let a=this,s=null,u=Array.isArray(e)&&"function"==typeof t;if(1===this.options.version&&u)throw TypeError("JSON-RPC 1.0 does not support batching");if(u||!u&&e&&"object"==typeof e&&"function"==typeof t)r=t,s=e;else{"function"==typeof n&&(r=n,n=void 0);let o="function"==typeof r;try{s=i(e,t,n,{generator:this.options.generator,version:this.options.version,notificationIdNull:this.options.notificationIdNull})}catch(e){if(o)return r(e);throw e}if(!o)return s}try{o=JSON.stringify(s,this.options.replacer)}catch(e){return r(e)}return this.callServer(o,function(e,t){a._parseResponse(e,t,r)}),s},o.prototype._parseResponse=function(e,t,n){let r;if(e){n(e);return}if(!t)return n();try{r=JSON.parse(t,this.options.reviver)}catch(e){return n(e)}if(3===n.length){if(!Array.isArray(r))return n(null,r.error,r.result);{let e=function(e){return void 0!==e.error};return n(null,r.filter(e),r.filter(function(t){return!e(t)}))}}n(null,r)}},17741:function(e,t,n){"use strict";let r=n(64667).v4;e.exports=function(e,t,n,i){if("string"!=typeof e)throw TypeError(e+" must be a string");i=i||{};let o="number"==typeof i.version?i.version:2;if(1!==o&&2!==o)throw TypeError(o+" must be 1 or 2");let a={method:e};if(2===o&&(a.jsonrpc="2.0"),t){if("object"!=typeof t&&!Array.isArray(t))throw TypeError(t+" must be an object, array or omitted");a.params=t}if(void 0===n){let e="function"==typeof i.generator?i.generator:function(){return r()};a.id=e(a,i)}else 2===o&&null===n?i.notificationIdNull&&(a.id=null):a.id=n;return a}},64667:function(e,t,n){"use strict";n.d(t,{v4:function(){return c}});var r,i=new Uint8Array(16);function o(){if(!r&&!(r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(i)}for(var a=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,s=[],u=0;u<256;++u)s.push((u+256).toString(16).substr(1));var l=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(s[e[t+0]]+s[e[t+1]]+s[e[t+2]]+s[e[t+3]]+"-"+s[e[t+4]]+s[e[t+5]]+"-"+s[e[t+6]]+s[e[t+7]]+"-"+s[e[t+8]]+s[e[t+9]]+"-"+s[e[t+10]]+s[e[t+11]]+s[e[t+12]]+s[e[t+13]]+s[e[t+14]]+s[e[t+15]]).toLowerCase();if(!("string"==typeof n&&a.test(n)))throw TypeError("Stringified UUID is invalid");return n},c=function(e,t,n){var r=(e=e||{}).random||(e.rng||o)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=r[i];return t}return l(r)}},91094:function(e,t,n){var r,i=n(34155);!function(){"use strict";var o="input is invalid type",a="object"==typeof window,s=a?window:{};s.JS_SHA3_NO_WINDOW&&(a=!1);var u=!a&&"object"==typeof self;!s.JS_SHA3_NO_NODE_JS&&"object"==typeof i&&i.versions&&i.versions.node?s=n.g:u&&(s=self);var l=!s.JS_SHA3_NO_COMMON_JS&&e.exports,c=n.amdO,d=!s.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,p="0123456789abcdef".split(""),f=[4,1024,262144,67108864],h=[0,8,16,24],m=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],g=[224,256,384,512],y=[128,256],b=["hex","buffer","arrayBuffer","array","digest"],_={128:168,256:136};(s.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),d&&(s.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(e){return"object"==typeof e&&e.buffer&&e.buffer.constructor===ArrayBuffer});for(var v=function(e,t,n){return function(r){return new L(e,t,e).update(r)[n]()}},w=function(e,t,n){return function(r,i){return new L(e,t,i).update(r)[n]()}},k=function(e,t,n){return function(t,r,i,o){return T["cshake"+e].update(t,r,i,o)[n]()}},x=function(e,t,n){return function(t,r,i,o){return T["kmac"+e].update(t,r,i,o)[n]()}},A=function(e,t,n,r){for(var i=0;i>5,this.byteCount=this.blockCount<<2,this.outputBlocks=n>>5,this.extraBytes=(31&n)>>3;for(var r=0;r<50;++r)this.s[r]=0}function N(e,t,n){L.call(this,e,t,n)}L.prototype.update=function(e){if(this.finalized)throw Error("finalize already called");var t,n=typeof e;if("string"!==n){if("object"===n){if(null===e)throw Error(o);if(d&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!d||!ArrayBuffer.isView(e)))throw Error(o)}else throw Error(o);t=!0}for(var r,i,a=this.blocks,s=this.byteCount,u=e.length,l=this.blockCount,c=0,p=this.s;c>2]|=e[c]<>2]|=i<>2]|=(192|i>>6)<>2]|=(128|63&i)<=57344?(a[r>>2]|=(224|i>>12)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<>2]|=(240|i>>18)<>2]|=(128|i>>12&63)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<=s){for(this.start=r-s,this.block=a[l],r=0;r>=8,n=255&e;n>0;)i.unshift(n),e>>=8,n=255&e,++r;return t?i.push(r):i.unshift(r),this.update(i),i.length},L.prototype.encodeString=function(e){var t,n=typeof e;if("string"!==n){if("object"===n){if(null===e)throw Error(o);if(d&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!d||!ArrayBuffer.isView(e)))throw Error(o)}else throw Error(o);t=!0}var r=0,i=e.length;if(t)r=i;else for(var a=0;a=57344?r+=3:(s=65536+((1023&s)<<10|1023&e.charCodeAt(++a)),r+=4)}return r+=this.encode(8*r),this.update(e),r},L.prototype.bytepad=function(e,t){for(var n=this.encode(t),r=0;r>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(t=1,e[0]=e[n];t>4&15]+p[15&e]+p[e>>12&15]+p[e>>8&15]+p[e>>20&15]+p[e>>16&15]+p[e>>28&15]+p[e>>24&15];a%t==0&&(D(n),o=0)}return i&&(s+=p[(e=n[o])>>4&15]+p[15&e],i>1&&(s+=p[e>>12&15]+p[e>>8&15]),i>2&&(s+=p[e>>20&15]+p[e>>16&15])),s},L.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,n=this.s,r=this.outputBlocks,i=this.extraBytes,o=0,a=0,s=this.outputBits>>3;e=new ArrayBuffer(i?r+1<<2:s);for(var u=new Uint32Array(e);a>8&255,u[e+2]=t>>16&255,u[e+3]=t>>24&255;s%n==0&&D(r)}return o&&(e=s<<2,t=r[a],u[e]=255&t,o>1&&(u[e+1]=t>>8&255),o>2&&(u[e+2]=t>>16&255)),u},N.prototype=new L,N.prototype.finalize=function(){return this.encode(this.outputBits,!0),L.prototype.finalize.call(this)};var D=function(e){var t,n,r,i,o,a,s,u,l,c,d,p,f,h,g,y,b,_,v,w,k,x,A,S,I,T,E,P,C,O,B,M,R,L,N,D,F,q,j,U,z,V,W,$,K,H,G,Z,Y,X,Q,J,ee,et,en,er,ei,eo,ea,es,eu,el,ec;for(r=0;r<48;r+=2)i=e[0]^e[10]^e[20]^e[30]^e[40],o=e[1]^e[11]^e[21]^e[31]^e[41],a=e[2]^e[12]^e[22]^e[32]^e[42],s=e[3]^e[13]^e[23]^e[33]^e[43],u=e[4]^e[14]^e[24]^e[34]^e[44],l=e[5]^e[15]^e[25]^e[35]^e[45],c=e[6]^e[16]^e[26]^e[36]^e[46],d=e[7]^e[17]^e[27]^e[37]^e[47],p=e[8]^e[18]^e[28]^e[38]^e[48],f=e[9]^e[19]^e[29]^e[39]^e[49],t=p^(a<<1|s>>>31),n=f^(s<<1|a>>>31),e[0]^=t,e[1]^=n,e[10]^=t,e[11]^=n,e[20]^=t,e[21]^=n,e[30]^=t,e[31]^=n,e[40]^=t,e[41]^=n,t=i^(u<<1|l>>>31),n=o^(l<<1|u>>>31),e[2]^=t,e[3]^=n,e[12]^=t,e[13]^=n,e[22]^=t,e[23]^=n,e[32]^=t,e[33]^=n,e[42]^=t,e[43]^=n,t=a^(c<<1|d>>>31),n=s^(d<<1|c>>>31),e[4]^=t,e[5]^=n,e[14]^=t,e[15]^=n,e[24]^=t,e[25]^=n,e[34]^=t,e[35]^=n,e[44]^=t,e[45]^=n,t=u^(p<<1|f>>>31),n=l^(f<<1|p>>>31),e[6]^=t,e[7]^=n,e[16]^=t,e[17]^=n,e[26]^=t,e[27]^=n,e[36]^=t,e[37]^=n,e[46]^=t,e[47]^=n,t=c^(i<<1|o>>>31),n=d^(o<<1|i>>>31),e[8]^=t,e[9]^=n,e[18]^=t,e[19]^=n,e[28]^=t,e[29]^=n,e[38]^=t,e[39]^=n,e[48]^=t,e[49]^=n,h=e[0],g=e[1],H=e[11]<<4|e[10]>>>28,G=e[10]<<4|e[11]>>>28,P=e[20]<<3|e[21]>>>29,C=e[21]<<3|e[20]>>>29,es=e[31]<<9|e[30]>>>23,eu=e[30]<<9|e[31]>>>23,V=e[40]<<18|e[41]>>>14,W=e[41]<<18|e[40]>>>14,L=e[2]<<1|e[3]>>>31,N=e[3]<<1|e[2]>>>31,y=e[13]<<12|e[12]>>>20,b=e[12]<<12|e[13]>>>20,Z=e[22]<<10|e[23]>>>22,Y=e[23]<<10|e[22]>>>22,O=e[33]<<13|e[32]>>>19,B=e[32]<<13|e[33]>>>19,el=e[42]<<2|e[43]>>>30,ec=e[43]<<2|e[42]>>>30,et=e[5]<<30|e[4]>>>2,en=e[4]<<30|e[5]>>>2,D=e[14]<<6|e[15]>>>26,F=e[15]<<6|e[14]>>>26,_=e[25]<<11|e[24]>>>21,v=e[24]<<11|e[25]>>>21,X=e[34]<<15|e[35]>>>17,Q=e[35]<<15|e[34]>>>17,M=e[45]<<29|e[44]>>>3,R=e[44]<<29|e[45]>>>3,S=e[6]<<28|e[7]>>>4,I=e[7]<<28|e[6]>>>4,er=e[17]<<23|e[16]>>>9,ei=e[16]<<23|e[17]>>>9,q=e[26]<<25|e[27]>>>7,j=e[27]<<25|e[26]>>>7,w=e[36]<<21|e[37]>>>11,k=e[37]<<21|e[36]>>>11,J=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,$=e[8]<<27|e[9]>>>5,K=e[9]<<27|e[8]>>>5,T=e[18]<<20|e[19]>>>12,E=e[19]<<20|e[18]>>>12,eo=e[29]<<7|e[28]>>>25,ea=e[28]<<7|e[29]>>>25,U=e[38]<<8|e[39]>>>24,z=e[39]<<8|e[38]>>>24,x=e[48]<<14|e[49]>>>18,A=e[49]<<14|e[48]>>>18,e[0]=h^~y&_,e[1]=g^~b&v,e[10]=S^~T&P,e[11]=I^~E&C,e[20]=L^~D&q,e[21]=N^~F&j,e[30]=$^~H&Z,e[31]=K^~G&Y,e[40]=et^~er&eo,e[41]=en^~ei&ea,e[2]=y^~_&w,e[3]=b^~v&k,e[12]=T^~P&O,e[13]=E^~C&B,e[22]=D^~q&U,e[23]=F^~j&z,e[32]=H^~Z&X,e[33]=G^~Y&Q,e[42]=er^~eo&es,e[43]=ei^~ea&eu,e[4]=_^~w&x,e[5]=v^~k&A,e[14]=P^~O&M,e[15]=C^~B&R,e[24]=q^~U&V,e[25]=j^~z&W,e[34]=Z^~X&J,e[35]=Y^~Q&ee,e[44]=eo^~es&el,e[45]=ea^~eu&ec,e[6]=w^~x&h,e[7]=k^~A&g,e[16]=O^~M&S,e[17]=B^~R&I,e[26]=U^~V&L,e[27]=z^~W&N,e[36]=X^~J&$,e[37]=Q^~ee&K,e[46]=es^~el&et,e[47]=eu^~ec&en,e[8]=x^~h&y,e[9]=A^~g&b,e[18]=M^~S&T,e[19]=R^~I&E,e[28]=V^~L&D,e[29]=W^~N&F,e[38]=J^~$&H,e[39]=ee^~K&G,e[48]=el^~et&er,e[49]=ec^~en&ei,e[0]^=m[r],e[1]^=m[r+1]};if(l)e.exports=T;else{for(P=0;Pi.__kMaxLength)throw RangeError("Maximum BigInt size exceeded")}static BigInt(e){var t=Number.isFinite;if("number"==typeof e){if(0===e)return i.__zero();if(i.__isOneDigitInt(e))return 0>e?i.__oneDigit(-e,!0):i.__oneDigit(e,!1);if(!t(e)||r(e)!==e)throw RangeError("The number "+e+" cannot be converted to BigInt because it is not an integer");return i.__fromDouble(e)}if("string"==typeof e){let t=i.__fromString(e);if(null===t)throw SyntaxError("Cannot convert "+e+" to a BigInt");return t}if("boolean"==typeof e)return!0===e?i.__oneDigit(1,!1):i.__zero();if("object"==typeof e){if(e.constructor===i)return e;let t=i.__toPrimitive(e);return i.BigInt(t)}throw TypeError("Cannot convert "+e+" to a BigInt")}toDebugString(){let e=["BigInt["];for(let t of this)e.push((t?(t>>>0).toString(16):t)+", ");return e.push("]"),e.join("")}toString(e=10){if(2>e||36>>=12;let d=l-12,p=12<=l?0:s<<20+l,f=20+l;for(0>>30-d,p=s<>>30-f,f-=30;let h=i.__decideRounding(e,f,u,s);if((1===h||0===h&&1==(1&p))&&0==(p=p+1>>>0)&&0!=++c>>>20&&(c=0,1023<++a))return e.sign?-1/0:1/0;let m=e.sign?-2147483648:0;return a=a+1023<<20,i.__kBitConversionInts[1]=m|a|c,i.__kBitConversionInts[0]=p,i.__kBitConversionDouble[0]}static unaryMinus(e){if(0===e.length)return e;let t=e.__copy();return t.sign=!e.sign,t}static bitwiseNot(e){return e.sign?i.__absoluteSubOne(e).__trim():i.__absoluteAddOne(e,!0)}static exponentiate(e,t){if(t.sign)throw RangeError("Exponent must be positive");if(0===t.length)return i.__oneDigit(1,!1);if(0===e.length)return e;if(1===e.length&&1===e.__digit(0))return e.sign&&0==(1&t.__digit(0))?i.unaryMinus(e):e;if(1=i.__kMaxLengthBits)throw RangeError("BigInt too big");if(1===e.length&&2===e.__digit(0)){let t=1+(0|n/30),r=e.sign&&0!=(1&n),o=new i(t,r);o.__initializeDigits();let a=1<>=1;0!==n;n>>=1)o=i.multiply(o,o),0!=(1&n)&&(r=null===r?o:i.multiply(r,o));return r}static multiply(e,t){if(0===e.length)return e;if(0===t.length)return t;let n=e.length+t.length;30<=e.__clzmsd()+t.__clzmsd()&&n--;let r=new i(n,e.sign!==t.sign);r.__initializeDigits();for(let n=0;ni.__absoluteCompare(e,t))return i.__zero();let r=e.sign!==t.sign,o=t.__unsignedDigit(0);if(1===t.length&&32767>=o){if(1===o)return r===e.sign?e:i.unaryMinus(e);n=i.__absoluteDivSmall(e,o,null)}else n=i.__absoluteDivLarge(e,t,!0,!1);return n.sign=r,n.__trim()}static remainder(e,t){if(0===t.length)throw RangeError("Division by zero");if(0>i.__absoluteCompare(e,t))return e;let n=t.__unsignedDigit(0);if(1===t.length&&32767>=n){if(1===n)return i.__zero();let t=i.__absoluteModSmall(e,n);return 0===t?i.__zero():i.__oneDigit(t,e.sign)}let r=i.__absoluteDivLarge(e,t,!1,!0);return r.sign=e.sign,r.__trim()}static add(e,t){let n=e.sign;return n===t.sign?i.__absoluteAdd(e,t,n):0<=i.__absoluteCompare(e,t)?i.__absoluteSub(e,t,n):i.__absoluteSub(t,e,!n)}static subtract(e,t){let n=e.sign;return n===t.sign?0<=i.__absoluteCompare(e,t)?i.__absoluteSub(e,t,n):i.__absoluteSub(t,e,!n):i.__absoluteAdd(e,t,n)}static leftShift(e,t){return 0===t.length||0===e.length?e:t.sign?i.__rightShiftByAbsolute(e,t):i.__leftShiftByAbsolute(e,t)}static signedRightShift(e,t){return 0===t.length||0===e.length?e:t.sign?i.__leftShiftByAbsolute(e,t):i.__rightShiftByAbsolute(e,t)}static unsignedRightShift(){throw TypeError("BigInts have no unsigned right shift; use >> instead")}static lessThan(e,t){return 0>i.__compareToBigInt(e,t)}static lessThanOrEqual(e,t){return 0>=i.__compareToBigInt(e,t)}static greaterThan(e,t){return 0(e=r(e)))throw RangeError("Invalid value: not (convertible to) a safe integer");if(0===e)return i.__zero();if(e>=i.__kMaxLengthBits)return t;let n=0|(e+29)/30;if(t.length(e=r(e)))throw RangeError("Invalid value: not (convertible to) a safe integer");if(0===e)return i.__zero();if(t.sign){if(e>i.__kMaxLengthBits)throw RangeError("BigInt too big");return i.__truncateAndSubFromPowerOfTwo(e,t,!1)}if(e>=i.__kMaxLengthBits)return t;let n=0|(e+29)/30;if(t.length>>o)return t}return i.__truncateToNBits(e,t)}static ADD(e,t){if(e=i.__toPrimitive(e),t=i.__toPrimitive(t),"string"==typeof e)return"string"!=typeof t&&(t=t.toString()),e+t;if("string"==typeof t)return e.toString()+t;if(e=i.__toNumeric(e),t=i.__toNumeric(t),i.__isBigInt(e)&&i.__isBigInt(t))return i.add(e,t);if("number"==typeof e&&"number"==typeof t)return e+t;throw TypeError("Cannot mix BigInt and other types, use explicit conversions")}static LT(e,t){return i.__compare(e,t,0)}static LE(e,t){return i.__compare(e,t,1)}static GT(e,t){return i.__compare(e,t,2)}static GE(e,t){return i.__compare(e,t,3)}static EQ(e,t){for(;;){if(i.__isBigInt(e))return i.__isBigInt(t)?i.equal(e,t):i.EQ(t,e);if("number"==typeof e){if(i.__isBigInt(t))return i.__equalToNumber(t,e);if("object"!=typeof t)return e==t;t=i.__toPrimitive(t)}else if("string"==typeof e){if(i.__isBigInt(t))return null!==(e=i.__fromString(e))&&i.equal(e,t);if("object"!=typeof t)return e==t;t=i.__toPrimitive(t)}else if("boolean"==typeof e){if(i.__isBigInt(t))return i.__equalToNumber(t,+e);if("object"!=typeof t)return e==t;t=i.__toPrimitive(t)}else if("symbol"==typeof e){if(i.__isBigInt(t))return!1;if("object"!=typeof t)return e==t;t=i.__toPrimitive(t)}else{if("object"!=typeof e||"object"==typeof t&&t.constructor!==i)return e==t;e=i.__toPrimitive(e)}}}static NE(e,t){return!i.EQ(e,t)}static __zero(){return new i(0,!1)}static __oneDigit(e,t){let n=new i(1,t);return n.__setDigit(0,e),n}__copy(){let e=new i(this.length,this.sign);for(let t=0;tt)i=-t-1;else{if(0===n)return -1;n--,r=e.__digit(n),i=29}let o=1<>>20,n=t-1023,r=(0|n/30)+1,o=new i(r,0>e),a=1048575&i.__kBitConversionInts[1]|1048576,s=i.__kBitConversionInts[0],u=n%30,l,c=0;if(20>u){let e=20-u;c=e+32,l=a>>>e,a=a<<32-e|s>>>e,s<<=32-e}else if(20===u)c=32,l=a,a=s,s=0;else{let e=u-20;c=32-e,l=a<>>32-e,a=s<>>2,a=a<<30|s>>>2,s<<=30):l=0,o.__setDigit(e,l);return o.__trim()}static __isWhitespace(e){return!!(13>=e&&9<=e)||(159>=e?32==e:131071>=e?160==e||5760==e:196607>=e?10>=(e&=131071)||40==e||41==e||47==e||95==e||4096==e:65279==e)}static __fromString(e,t=0){let n=0,r=e.length,o=0;if(0===r)return i.__zero();let a=e.charCodeAt(o);for(;i.__isWhitespace(a);){if(++o===r)return i.__zero();a=e.charCodeAt(o)}if(43===a){if(++o===r)return null;a=e.charCodeAt(o),n=1}else if(45===a){if(++o===r)return null;a=e.charCodeAt(o),n=-1}if(0===t){if(t=10,48===a){if(++o===r)return i.__zero();if(88===(a=e.charCodeAt(o))||120===a){if(t=16,++o===r)return null;a=e.charCodeAt(o)}else if(79===a||111===a){if(t=8,++o===r)return null;a=e.charCodeAt(o)}else if(66===a||98===a){if(t=2,++o===r)return null;a=e.charCodeAt(o)}}}else if(16===t&&48===a){if(++o===r)return i.__zero();if(88===(a=e.charCodeAt(o))||120===a){if(++o===r)return null;a=e.charCodeAt(o)}}if(0!=n&&10!==t)return null;for(;48===a;){if(++o===r)return i.__zero();a=e.charCodeAt(o)}let s=r-o,u=i.__kMaxBitsPerChar[t],l=i.__kBitsPerCharTableMultiplier-1;if(s>1073741824/u)return null;let c=u*s+l>>>i.__kBitsPerCharTableShift,d=new i(0|(c+29)/30,!1),p=10>t?t:10,f=10>=i.__kBitsPerCharTableShift;let t=[],n=[],s=!1;do{let i=0,l=0;for(;;){let t;if(a-48>>>0>>0>>0>>0>>i.__kBitsPerCharTableShift)/30;d.__inplaceMultiplyAdd(h,c,m)}while(!n)}if(o!==r){if(!i.__isWhitespace(a))return null;for(o++;o>>u-o)}if(0!==i){if(r>=e.length)throw Error("implementation bug");e.__setDigit(r++,i)}for(;r>>1)+(85&r))>>>2)+(51&r))>>>4)+(15&r);let o=r,a=t-1,s=e.__digit(n-1),u=i.__clz30(s),l=0|(30*n-u+o-1)/o;if(e.sign&&l++,268435456>>s,f=30-s;f>=o;)c[d--]=i.__kConversionChars[p&a],p>>>=o,f-=o}let h=(p|s<>>o-f;0!==p;)c[d--]=i.__kConversionChars[p&a],p>>>=o;if(e.sign&&(c[d--]="-"),-1!=d)throw Error("implementation bug");return c.join("")}static __toStringGeneric(e,t,n){let r,o;let a=e.length;if(0===a)return"";if(1===a){let r=e.__unsignedDigit(0).toString(t);return!1===n&&e.sign&&(r="-"+r),r}let s=30*a-i.__clz30(e.__digit(a-1)),u=i.__kMaxBitsPerChar[t],l=u-1,c=s*i.__kBitsPerCharTableMultiplier;c+=l-1,c=0|c/l;let d=c+1>>1,p=i.exponentiate(i.__oneDigit(t,!1),i.__oneDigit(d,!1)),f=p.__unsignedDigit(0);if(1===p.length&&32767>=f){(r=new i(e.length,!1)).__initializeDigits();let n=0;for(let t=2*e.length-1;0<=t;t--){let i=n<<15|e.__halfDigit(t);r.__setHalfDigit(t,0|i/f),n=0|i%f}o=n.toString(t)}else{let n=i.__absoluteDivLarge(e,p,!0,!0);r=n.quotient;let a=n.remainder.__trim();o=i.__toStringGeneric(a,t,!0)}r.__trim();let h=i.__toStringGeneric(r,t,!0);for(;o.lengthr?i.__absoluteLess(n):0}static __compareToNumber(e,n){if(i.__isOneDigitInt(n)){let r=e.sign,o=0>n;if(r!==o)return i.__unequalSign(r);if(0===e.length){if(o)throw Error("implementation bug");return 0===n?0:-1}if(1a?i.__absoluteGreater(r):st)return i.__unequalSign(n);if(0===t)throw Error("implementation bug: should be handled elsewhere");if(0===e.length)return -1;i.__kBitConversionDouble[0]=t;let r=2047&i.__kBitConversionInts[1]>>>20;if(2047==r)throw Error("implementation bug: handled elsewhere");let o=r-1023;if(0>o)return i.__absoluteGreater(n);let a=e.length,s=e.__digit(a-1),u=i.__clz30(s),l=30*a-u,c=o+1;if(lc)return i.__absoluteGreater(n);let d=1048576|1048575&i.__kBitConversionInts[1],p=i.__kBitConversionInts[0],f=29-u;if(f!==(0|(l-1)%30))throw Error("implementation bug");let h,m=0;if(20>f){let e=20-f;m=e+32,h=d>>>e,d=d<<32-e|p>>>e,p<<=32-e}else if(20===f)m=32,h=d,d=p,p=0;else{let e=f-20;m=32-e,h=d<>>32-e,d=p<>>=0)>(h>>>=0))return i.__absoluteGreater(n);if(s>>2,d=d<<30|p>>>2,p<<=30):h=0;let r=e.__unsignedDigit(t);if(r>h)return i.__absoluteGreater(n);if(rn&&e.__unsignedDigit(0)===t(n):0===i.__compareToDouble(e,n)}static __comparisonResultToBool(e,t){return 0===t?0>e:1===t?0>=e:2===t?0t;case 3:return e>=t}if(i.__isBigInt(e)&&"string"==typeof t)return null!==(t=i.__fromString(t))&&i.__comparisonResultToBool(i.__compareToBigInt(e,t),n);if("string"==typeof e&&i.__isBigInt(t))return null!==(e=i.__fromString(e))&&i.__comparisonResultToBool(i.__compareToBigInt(e,t),n);if(e=i.__toNumeric(e),t=i.__toNumeric(t),i.__isBigInt(e)){if(i.__isBigInt(t))return i.__comparisonResultToBool(i.__compareToBigInt(e,t),n);if("number"!=typeof t)throw Error("implementation bug");return i.__comparisonResultToBool(i.__compareToNumber(e,t),n)}if("number"!=typeof e)throw Error("implementation bug");if(i.__isBigInt(t))return i.__comparisonResultToBool(i.__compareToNumber(t,e),2^n);if("number"!=typeof t)throw Error("implementation bug");return 0===n?et:3===n?e>=t:void 0}__clzmsd(){return i.__clz30(this.__digit(this.length-1))}static __absoluteAdd(e,t,n){if(e.length>>30,o.__setDigit(s,1073741823&n)}for(;s>>30,o.__setDigit(s,1073741823&t)}return s>>30,r.__setDigit(a,1073741823&n)}for(;a>>30,r.__setDigit(a,1073741823&t)}return r.__trim()}static __absoluteAddOne(e,t,n=null){let r=e.length;null===n?n=new i(r,t):n.sign=t;let o=1;for(let t=0;t>>30,n.__setDigit(t,1073741823&r)}return 0!=o&&n.__setDigitGrow(r,1),n}static __absoluteSubOne(e,t){let n=e.length;t=t||n;let r=new i(t,!1),o=1;for(let t=0;t>>30,r.__setDigit(t,1073741823&n)}if(0!=o)throw Error("implementation bug");for(let e=n;er?0:e.__unsignedDigit(r)>t.__unsignedDigit(r)?1:-1}static __multiplyAccumulate(e,t,n,r){if(0===t)return;let o=32767&t,a=t>>>15,s=0,u=0;for(let t,l=0;l>>15,f=i.__imul(d,o),h=i.__imul(d,a),m=i.__imul(p,o),g=i.__imul(p,a);t+=u+f+s,s=t>>>30,t&=1073741823,t+=((32767&h)<<15)+((32767&m)<<15),s+=t>>>30,u=g+(h>>>15)+(m>>>15),n.__setDigit(r,1073741823&t)}for(;0!=s||0!==u;r++){let e=n.__digit(r);e+=s+u,u=0,s=e>>>30,n.__setDigit(r,1073741823&e)}}static __internalMultiplyAdd(e,t,n,r,o){let a=n,s=0;for(let n=0;n>>15,t),c=u+((32767&l)<<15)+s+a;a=c>>>30,s=l>>>15,o.__setDigit(n,1073741823&c)}if(o.length>r)for(o.__setDigit(r++,a+s);rthis.length&&(n=this.length);let r=32767&e,o=e>>>15,a=0,s=t;for(let e=0;e>>15,l=i.__imul(n,r),c=i.__imul(n,o),d=i.__imul(u,r),p=i.__imul(u,o),f=s+l+a;a=f>>>30,f&=1073741823,f+=((32767&c)<<15)+((32767&d)<<15),a+=f>>>30,s=p+(c>>>15)+(d>>>15),this.__setDigit(e,1073741823&f)}if(0!=a||0!==s)throw Error("implementation bug")}static __absoluteDivSmall(e,t,n=null){null===n&&(n=new i(e.length,!1));let r=0;for(let i,o=2*e.length-1;0<=o;o-=2){i=(r<<15|e.__halfDigit(o))>>>0;let a=0|i/t;i=((r=0|i%t)<<15|e.__halfDigit(o-1))>>>0;let s=0|i/t;r=0|i%t,n.__setDigit(o>>>1,a<<15|s)}return n}static __absoluteModSmall(e,t){let n=0;for(let r=2*e.length-1;0<=r;r--){let i=(n<<15|e.__halfDigit(r))>>>0;n=0|i%t}return n}static __absoluteDivLarge(e,t,n,r){let o=t.__halfDigitLength(),a=t.length,s=e.__halfDigitLength()-o,u=null;n&&(u=new i(s+2>>>1,!1)).__initializeDigits();let l=new i(o+2>>>1,!1);l.__initializeDigits();let c=i.__clz15(t.__halfDigit(o-1));0>>0;e=0|n/p;let a=0|n%p,u=t.__halfDigit(o-2),l=d.__halfDigit(r+o-2);for(;i.__imul(e,u)>>>0>(a<<16|l)>>>0&&(e--,!(32767<(a+=p))););}i.__internalMultiplyAdd(t,e,0,a,l);let c=d.__inplaceSub(l,r,o+1);0!==c&&(c=d.__inplaceAdd(t,r,o),d.__setHalfDigit(r+o,32767&d.__halfDigit(r+o)+c),e--),n&&(1&r?f=e<<15:u.__setDigit(r>>>1,f|e))}if(r)return d.__inplaceRightShift(c),n?{quotient:u,remainder:d}:d;if(n)return u;throw Error("unreachable")}static __clz15(e){return i.__clz30(e)-15}__inplaceAdd(e,t,n){let r=0;for(let i=0;i>>15,this.__setHalfDigit(t+i,32767&n)}return r}__inplaceSub(e,t,n){let r=0;if(1&t){t>>=1;let i=this.__digit(t),o=32767&i,a=0;for(;a>>1;a++){let n=e.__digit(a),s=(i>>>15)-(32767&n)-r;r=1&s>>>15,this.__setDigit(t+a,(32767&s)<<15|32767&o),r=1&(o=(32767&(i=this.__digit(t+a+1)))-(n>>>15)-r)>>>15}let s=e.__digit(a),u=(i>>>15)-(32767&s)-r;if(r=1&u>>>15,this.__setDigit(t+a,(32767&u)<<15|32767&o),t+a+1>=this.length)throw RangeError("out of bounds");0==(1&n)&&(r=1&(o=(32767&(i=this.__digit(t+a+1)))-(s>>>15)-r)>>>15,this.__setDigit(t+e.length,1073709056&i|32767&o))}else{t>>=1;let i=0;for(;i>>15;let s=(n>>>15)-(o>>>15)-r;r=1&s>>>15,this.__setDigit(t+i,(32767&s)<<15|32767&a)}let o=this.__digit(t+i),a=e.__digit(i),s=(32767&o)-(32767&a)-r;r=1&s>>>15;let u=0;0==(1&n)&&(r=1&(u=(o>>>15)-(a>>>15)-r)>>>15),this.__setDigit(t+i,(32767&u)<<15|32767&s)}return r}__inplaceRightShift(e){if(0===e)return;let t=this.__digit(0)>>>e,n=this.length-1;for(let r=0;r>>e}this.__setDigit(n,t)}static __specialLeftShift(e,t,n){let r=e.length,o=new i(r+n,!1);if(0===t){for(let t=0;t>>30-t}return 0n)throw RangeError("BigInt too big");let r=0|n/30,o=n%30,a=e.length,s=0!==o&&0!=e.__digit(a-1)>>>30-o,u=a+r+(s?1:0),l=new i(u,e.sign);if(0===o){let t=0;for(;t>>30-o}if(s)l.__setDigit(a+r,t);else if(0!==t)throw Error("implementation bug")}return l.__trim()}static __rightShiftByAbsolute(e,t){let n=e.length,r=e.sign,o=i.__toShiftAmount(t);if(0>o)return i.__rightShiftByMaximum(r);let a=0|o/30,s=o%30,u=n-a;if(0>=u)return i.__rightShiftByMaximum(r);let l=!1;if(r){if(0!=(e.__digit(a)&(1<>>s,r=n-a-1;for(let n=0;n>>s}c.__setDigit(r,t)}return l&&(c=i.__absoluteAddOne(c,!0,c)),c.__trim()}static __rightShiftByMaximum(e){return e?i.__oneDigit(1,!0):i.__zero()}static __toShiftAmount(e){if(1i.__kMaxLengthBits?-1:t}static __toPrimitive(e,t="default"){if("object"!=typeof e||e.constructor===i)return e;if("undefined"!=typeof Symbol&&"symbol"==typeof Symbol.toPrimitive){let n=e[Symbol.toPrimitive];if(n){let e=n(t);if("object"!=typeof e)return e;throw TypeError("Cannot convert object to primitive value")}}let n=e.valueOf;if(n){let t=n.call(e);if("object"!=typeof t)return t}let r=e.toString;if(r){let t=r.call(e);if("object"!=typeof t)return t}throw TypeError("Cannot convert object to primitive value")}static __toNumeric(e){return i.__isBigInt(e)?e:+e}static __isBigInt(e){return"object"==typeof e&&null!==e&&e.constructor===i}static __truncateToNBits(e,t){let n=0|(e+29)/30,r=new i(n,t.sign),o=n-1;for(let e=0;e>>t}return r.__setDigit(o,a),r.__trim()}static __truncateAndSubFromPowerOfTwo(e,t,n){let r;let o=0|(e+29)/30,a=new i(o,n),s=0,u=o-1,l=0;for(let e=(0,Math.min)(u,t.length);s>>30,a.__setDigit(s,1073741823&e)}for(;s>>e;let t=1<<32-e;r=t-c-l&t-1}return a.__setDigit(u,r),a.__trim()}__digit(e){return this[e]}__unsignedDigit(e){return this[e]>>>0}__setDigit(e,t){this[e]=0|t}__setDigitGrow(e,t){this[e]=0|t}__halfDigitLength(){let e=this.length;return 32767>=this.__unsignedDigit(e-1)?2*e-1:2*e}__halfDigit(e){return 32767&this[e>>>1]>>>15*(1&e)}__setHalfDigit(e,t){let n=e>>>1,r=this.__digit(n);this.__setDigit(n,1&e?32767&r|t<<15:1073709056&r|32767&t)}static __digitPow(e,t){let n=1;for(;0>>=1,e*=e;return n}static __isOneDigitInt(e){return(1073741823&e)===e}}return i.__kMaxLength=33554432,i.__kMaxLengthBits=i.__kMaxLength<<5,i.__kMaxBitsPerChar=[0,0,32,51,64,75,83,90,96,102,107,111,115,119,122,126,128,131,134,136,139,141,143,145,147,149,151,153,154,156,158,159,160,162,163,165,166],i.__kBitsPerCharTableShift=5,i.__kBitsPerCharTableMultiplier=1<>>0)/Math.LN2)},i.__imul=Math.imul||function(e,t){return 0|e*t},i}()},38554:function(e,t,n){e=n.nmd(e);var r,i,o,a,s,u,l,c,d,p,f="__lodash_hash_undefined__",h="[object Arguments]",m="[object Function]",g="[object Object]",y=/^\[object .+?Constructor\]$/,b=/^(?:0|[1-9]\d*)$/,_={};_["[object Float32Array]"]=_["[object Float64Array]"]=_["[object Int8Array]"]=_["[object Int16Array]"]=_["[object Int32Array]"]=_["[object Uint8Array]"]=_["[object Uint8ClampedArray]"]=_["[object Uint16Array]"]=_["[object Uint32Array]"]=!0,_[h]=_["[object Array]"]=_["[object ArrayBuffer]"]=_["[object Boolean]"]=_["[object DataView]"]=_["[object Date]"]=_["[object Error]"]=_[m]=_["[object Map]"]=_["[object Number]"]=_[g]=_["[object RegExp]"]=_["[object Set]"]=_["[object String]"]=_["[object WeakMap]"]=!1;var v="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,w="object"==typeof self&&self&&self.Object===Object&&self,k=v||w||Function("return this")(),x=t&&!t.nodeType&&t,A=x&&e&&!e.nodeType&&e,S=A&&A.exports===x,I=S&&v.process,T=function(){try{var e=A&&A.require&&A.require("util").types;if(e)return e;return I&&I.binding&&I.binding("util")}catch(e){}}(),E=T&&T.isTypedArray,P=Array.prototype,C=Function.prototype,O=Object.prototype,B=k["__core-js_shared__"],M=C.toString,R=O.hasOwnProperty,L=(u=/[^.]+$/.exec(B&&B.keys&&B.keys.IE_PROTO||""))?"Symbol(src)_1."+u:"",N=O.toString,D=M.call(Object),F=RegExp("^"+M.call(R).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),q=S?k.Buffer:void 0,j=k.Symbol,U=k.Uint8Array,z=q?q.allocUnsafe:void 0,V=(l=Object.getPrototypeOf,c=Object,function(e){return l(c(e))}),W=Object.create,$=O.propertyIsEnumerable,K=P.splice,H=j?j.toStringTag:void 0,G=function(){try{var e=ep(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),Z=q?q.isBuffer:void 0,Y=Math.max,X=Date.now,Q=ep(k,"Map"),J=ep(Object,"create"),ee=function(){function e(){}return function(t){if(!eA(t))return{};if(W)return W(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function et(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1},en.prototype.set=function(e,t){var n=this.__data__,r=ea(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},er.prototype.clear=function(){this.size=0,this.__data__={hash:new et,map:new(Q||en),string:new et}},er.prototype.delete=function(e){var t=ed(this,e).delete(e);return this.size-=t?1:0,t},er.prototype.get=function(e){return ed(this,e).get(e)},er.prototype.has=function(e){return ed(this,e).has(e)},er.prototype.set=function(e,t){var n=ed(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},ei.prototype.clear=function(){this.__data__=new en,this.size=0},ei.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},ei.prototype.get=function(e){return this.__data__.get(e)},ei.prototype.has=function(e){return this.__data__.has(e)},ei.prototype.set=function(e,t){var n=this.__data__;if(n instanceof en){var r=n.__data__;if(!Q||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new er(r)}return n.set(e,t),this.size=n.size,this};var eu=function(e,t,n){for(var r=-1,i=Object(e),o=n(e),a=o.length;a--;){var s=o[++r];if(!1===t(i[s],s,i))break}return e};function el(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":H&&H in Object(e)?function(e){var t=R.call(e,H),n=e[H];try{e[H]=void 0;var r=!0}catch(e){}var i=N.call(e);return r&&(t?e[H]=n:delete e[H]),i}(e):N.call(e)}function ec(e){return eS(e)&&el(e)==h}function ed(e,t){var n,r=e.__data__;return("string"==(n=typeof t)||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==t:null===t)?r["string"==typeof t?"string":"hash"]:r.map}function ep(e,t){var n=null==e?void 0:e[t];return!(!eA(n)||L&&L in n)&&(ek(n)?F:y).test(function(e){if(null!=e){try{return M.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(n))?n:void 0}function ef(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&b.test(e))&&e>-1&&e%1==0&&e0){if(++i>=800)return arguments[0]}else i=0;return r.apply(void 0,arguments)});function ey(e,t){return e===t||e!=e&&t!=t}var eb=ec(function(){return arguments}())?ec:function(e){return eS(e)&&R.call(e,"callee")&&!$.call(e,"callee")},e_=Array.isArray;function ev(e){return null!=e&&ex(e.length)&&!ek(e)}var ew=Z||function(){return!1};function ek(e){if(!eA(e))return!1;var t=el(e);return t==m||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function ex(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function eA(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function eS(e){return null!=e&&"object"==typeof e}var eI=E?function(e){return E(e)}:function(e){return eS(e)&&ex(e.length)&&!!_[el(e)]};function eT(e){return ev(e)?function(e,t){var n=e_(e),r=!n&&eb(e),i=!n&&!r&&ew(e),o=!n&&!r&&!i&&eI(e),a=n||r||i||o,s=a?function(e,t){for(var n=-1,r=Array(e);++n1?t[r-1]:void 0,o=r>2?t[2]:void 0;for(i=d.length>3&&"function"==typeof i?(r--,i):void 0,o&&function(e,t,n){if(!eA(n))return!1;var r=typeof t;return("number"==r?!!(ev(n)&&ef(t,n.length)):"string"==r&&(t in n))&&ey(n[t],e)}(t[0],t[1],o)&&(i=r<3?void 0:i,r=1),e=Object(e);++n"']/g,V=RegExp(U.source),W=RegExp(z.source),$=/<%-([\s\S]+?)%>/g,K=/<%([\s\S]+?)%>/g,H=/<%=([\s\S]+?)%>/g,G=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Z=/^\w*$/,Y=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,X=/[\\^$.*+?()[\]{}|]/g,Q=RegExp(X.source),J=/^\s+/,ee=/\s/,et=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,en=/\{\n\/\* \[wrapped with (.+)\] \*/,er=/,? & /,ei=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,eo=/[()=,{}\[\]\/\s]/,ea=/\\(\\)?/g,es=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,eu=/\w*$/,el=/^[-+]0x[0-9a-f]+$/i,ec=/^0b[01]+$/i,ed=/^\[object .+?Constructor\]$/,ep=/^0o[0-7]+$/i,ef=/^(?:0|[1-9]\d*)$/,eh=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,em=/($^)/,eg=/['\n\r\u2028\u2029\\]/g,ey="\ud800-\udfff",eb="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",e_="\\u2700-\\u27bf",ev="a-z\\xdf-\\xf6\\xf8-\\xff",ew="A-Z\\xc0-\\xd6\\xd8-\\xde",ek="\\ufe0e\\ufe0f",ex="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",eA="['’]",eS="["+ex+"]",eI="["+eb+"]",eT="["+ev+"]",eE="[^"+ey+ex+"\\d+"+e_+ev+ew+"]",eP="\ud83c[\udffb-\udfff]",eC="[^"+ey+"]",eO="(?:\ud83c[\udde6-\uddff]){2}",eB="[\ud800-\udbff][\udc00-\udfff]",eM="["+ew+"]",eR="\\u200d",eL="(?:"+eT+"|"+eE+")",eN="(?:"+eA+"(?:d|ll|m|re|s|t|ve))?",eD="(?:"+eA+"(?:D|LL|M|RE|S|T|VE))?",eF="(?:"+eI+"|"+eP+")?",eq="["+ek+"]?",ej="(?:"+eR+"(?:"+[eC,eO,eB].join("|")+")"+eq+eF+")*",eU=eq+eF+ej,ez="(?:"+["["+e_+"]",eO,eB].join("|")+")"+eU,eV="(?:"+[eC+eI+"?",eI,eO,eB,"["+ey+"]"].join("|")+")",eW=RegExp(eA,"g"),e$=RegExp(eI,"g"),eK=RegExp(eP+"(?="+eP+")|"+eV+eU,"g"),eH=RegExp([eM+"?"+eT+"+"+eN+"(?="+[eS,eM,"$"].join("|")+")","(?:"+eM+"|"+eE+")+"+eD+"(?="+[eS,eM+eL,"$"].join("|")+")",eM+"?"+eL+"+"+eN,eM+"+"+eD,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])","\\d+",ez].join("|"),"g"),eG=RegExp("["+eR+ey+eb+ek+"]"),eZ=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,eY=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],eX=-1,eQ={};eQ[P]=eQ[C]=eQ[O]=eQ[B]=eQ[M]=eQ[R]=eQ[L]=eQ[N]=eQ[D]=!0,eQ[d]=eQ[p]=eQ[T]=eQ[f]=eQ[E]=eQ[h]=eQ[m]=eQ[g]=eQ[b]=eQ[_]=eQ[v]=eQ[k]=eQ[x]=eQ[A]=eQ[I]=!1;var eJ={};eJ[d]=eJ[p]=eJ[T]=eJ[E]=eJ[f]=eJ[h]=eJ[P]=eJ[C]=eJ[O]=eJ[B]=eJ[M]=eJ[b]=eJ[_]=eJ[v]=eJ[k]=eJ[x]=eJ[A]=eJ[S]=eJ[R]=eJ[L]=eJ[N]=eJ[D]=!0,eJ[m]=eJ[g]=eJ[I]=!1;var e0={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},e1=parseFloat,e2=parseInt,e6="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,e3="object"==typeof self&&self&&self.Object===Object&&self,e4=e6||e3||Function("return this")(),e5=t&&!t.nodeType&&t,e8=e5&&e&&!e.nodeType&&e,e9=e8&&e8.exports===e5,e7=e9&&e6.process,te=function(){try{var e=e8&&e8.require&&e8.require("util").types;if(e)return e;return e7&&e7.binding&&e7.binding("util")}catch(e){}}(),tt=te&&te.isArrayBuffer,tn=te&&te.isDate,tr=te&&te.isMap,ti=te&&te.isRegExp,to=te&&te.isSet,ta=te&&te.isTypedArray;function ts(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function tu(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i-1}function th(e,t,n){for(var r=-1,i=null==e?0:e.length;++r-1;);return n}function tD(e,t){for(var n=e.length;n--&&tx(t,e[n],0)>-1;);return n}var tF=tE({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),tq=tE({"&":"&","<":"<",">":">",'"':""","'":"'"});function tj(e){return"\\"+e0[e]}function tU(e){return eG.test(e)}function tz(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function tV(e,t){return function(n){return e(t(n))}}function tW(e,t){for(var n=-1,r=e.length,i=0,o=[];++n",""":'"',"'":"'"}),tY=function e(t){var n,r,ee,ey,eb=(t=null==t?e4:tY.defaults(e4.Object(),t,tY.pick(e4,eY))).Array,e_=t.Date,ev=t.Error,ew=t.Function,ek=t.Math,ex=t.Object,eA=t.RegExp,eS=t.String,eI=t.TypeError,eT=eb.prototype,eE=ew.prototype,eP=ex.prototype,eC=t["__core-js_shared__"],eO=eE.toString,eB=eP.hasOwnProperty,eM=0,eR=(n=/[^.]+$/.exec(eC&&eC.keys&&eC.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",eL=eP.toString,eN=eO.call(ex),eD=e4._,eF=eA("^"+eO.call(eB).replace(X,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),eq=e9?t.Buffer:i,ej=t.Symbol,eU=t.Uint8Array,ez=eq?eq.allocUnsafe:i,eV=tV(ex.getPrototypeOf,ex),eK=ex.create,eG=eP.propertyIsEnumerable,e0=eT.splice,e6=ej?ej.isConcatSpreadable:i,e3=ej?ej.iterator:i,e5=ej?ej.toStringTag:i,e8=function(){try{var e=i_(ex,"defineProperty");return e({},"",{}),e}catch(e){}}(),e7=t.clearTimeout!==e4.clearTimeout&&t.clearTimeout,te=e_&&e_.now!==e4.Date.now&&e_.now,tv=t.setTimeout!==e4.setTimeout&&t.setTimeout,tE=ek.ceil,tX=ek.floor,tQ=ex.getOwnPropertySymbols,tJ=eq?eq.isBuffer:i,t0=t.isFinite,t1=eT.join,t2=tV(ex.keys,ex),t6=ek.max,t3=ek.min,t4=e_.now,t5=t.parseInt,t8=ek.random,t9=eT.reverse,t7=i_(t,"DataView"),ne=i_(t,"Map"),nt=i_(t,"Promise"),nn=i_(t,"Set"),nr=i_(t,"WeakMap"),ni=i_(ex,"create"),no=nr&&new nr,na={},ns=iW(t7),nu=iW(ne),nl=iW(nt),nc=iW(nn),nd=iW(nr),np=ej?ej.prototype:i,nf=np?np.valueOf:i,nh=np?np.toString:i;function nm(e){if(oX(e)&&!oj(e)&&!(e instanceof n_)){if(e instanceof nb)return e;if(eB.call(e,"__wrapped__"))return i$(e)}return new nb(e)}var ng=function(){function e(){}return function(t){if(!oY(t))return{};if(eK)return eK(t);e.prototype=t;var n=new e;return e.prototype=i,n}}();function ny(){}function nb(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=i}function n_(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function nv(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t=t?e:t)),e}function nD(e,t,n,r,o,a){var s,u=1&t,l=2&t;if(n&&(s=o?n(e,r,o,a):n(e)),i!==s)return s;if(!oY(e))return e;var c=oj(e);if(c){if(p=e.length,m=new e.constructor(p),p&&"string"==typeof e[0]&&eB.call(e,"index")&&(m.index=e.index,m.input=e.input),s=m,!u)return r$(e,s)}else{var p,m,w,I,F,q=ik(e),j=q==g||q==y;if(oW(e))return rq(e,u);if(q==v||q==d||j&&!o){if(s=l||j?{}:iA(e),!u)return l?(w=(F=s)&&rK(e,ab(e),F),rK(e,iw(e),w)):(I=nM(s,e),rK(e,iv(e),I))}else{if(!eJ[q])return o?e:{};s=function(e,t,n){var r,i,o=e.constructor;switch(t){case T:return rj(e);case f:case h:return new o(+e);case E:return r=n?rj(e.buffer):e.buffer,new e.constructor(r,e.byteOffset,e.byteLength);case P:case C:case O:case B:case M:case R:case L:case N:case D:return rU(e,n);case b:return new o;case _:case A:return new o(e);case k:return(i=new e.constructor(e.source,eu.exec(e))).lastIndex=e.lastIndex,i;case x:return new o;case S:return nf?ex(nf.call(e)):{}}}(e,q,u)}}a||(a=new nA);var U=a.get(e);if(U)return U;a.set(e,s),o2(e)?e.forEach(function(r){s.add(nD(r,t,n,r,e,a))}):oQ(e)&&e.forEach(function(r,i){s.set(i,nD(r,t,n,i,e,a))});var z=c?i:(4&t?l?id:ic:l?ab:ay)(e);return tl(z||e,function(r,i){z&&(r=e[i=r]),nC(s,i,nD(r,t,n,i,e,a))}),s}function nF(e,t,n){var r=n.length;if(null==e)return!r;for(e=ex(e);r--;){var o=n[r],a=t[o],s=e[o];if(i===s&&!(o in e)||!a(s))return!1}return!0}function nq(e,t,n){if("function"!=typeof e)throw new eI(o);return iD(function(){e.apply(i,n)},t)}function nj(e,t,n,r){var i=-1,o=tf,a=!0,s=e.length,u=[],l=t.length;if(!s)return u;n&&(t=tm(t,tM(n))),r?(o=th,a=!1):t.length>=200&&(o=tL,a=!1,t=new nx(t));n:for(;++i-1},nw.prototype.set=function(e,t){var n=this.__data__,r=nO(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},nk.prototype.clear=function(){this.size=0,this.__data__={hash:new nv,map:new(ne||nw),string:new nv}},nk.prototype.delete=function(e){var t=iy(this,e).delete(e);return this.size-=t?1:0,t},nk.prototype.get=function(e){return iy(this,e).get(e)},nk.prototype.has=function(e){return iy(this,e).has(e)},nk.prototype.set=function(e,t){var n=iy(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},nx.prototype.add=nx.prototype.push=function(e){return this.__data__.set(e,a),this},nx.prototype.has=function(e){return this.__data__.has(e)},nA.prototype.clear=function(){this.__data__=new nw,this.size=0},nA.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},nA.prototype.get=function(e){return this.__data__.get(e)},nA.prototype.has=function(e){return this.__data__.has(e)},nA.prototype.set=function(e,t){var n=this.__data__;if(n instanceof nw){var r=n.__data__;if(!ne||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new nk(r)}return n.set(e,t),this.size=n.size,this};var nU=rZ(nZ),nz=rZ(nY,!0);function nV(e,t){var n=!0;return nU(e,function(e,r,i){return n=!!t(e,r,i)}),n}function nW(e,t,n){for(var r=-1,o=e.length;++r0&&n(s)?t>1?nK(s,t-1,n,r,i):tg(i,s):r||(i[i.length]=s)}return i}var nH=rY(),nG=rY(!0);function nZ(e,t){return e&&nH(e,t,ay)}function nY(e,t){return e&&nG(e,t,ay)}function nX(e,t){return tp(t,function(t){return oH(e[t])})}function nQ(e,t){t=rN(t,e);for(var n=0,r=t.length;null!=e&&nt}function n2(e,t){return null!=e&&eB.call(e,t)}function n6(e,t){return null!=e&&t in ex(e)}function n3(e,t,n){for(var r=n?th:tf,o=e[0].length,a=e.length,s=a,u=eb(a),l=1/0,c=[];s--;){var d=e[s];s&&t&&(d=tm(d,tM(t))),l=t3(d.length,l),u[s]=!n&&(t||o>=120&&d.length>=120)?new nx(s&&d):i}d=e[0];var p=-1,f=u[0];n:for(;++p=s)return u;return u*("desc"==n[r]?-1:1)}}return e.index-t.index}(e,t,n)})}function rl(e,t,n){for(var r=-1,i=t.length,o={};++r-1;)s!==e&&e0.call(s,u,1),e0.call(e,u,1);return e}function rd(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;iI(i)?e0.call(e,i,1):rE(e,i)}}return e}function rp(e,t){return e+tX(t8()*(t-e+1))}function rf(e,t){var n="";if(!e||t<1||t>9007199254740991)return n;do t%2&&(n+=e),(t=tX(t/2))&&(e+=e);while(t);return n}function rh(e,t){return iF(iM(e,t,aV),e+"")}function rm(e){return nI(aI(e))}function rg(e,t){var n=aI(e);return iU(n,nN(t,0,n.length))}function ry(e,t,n,r){if(!oY(e))return e;t=rN(t,e);for(var o=-1,a=t.length,s=a-1,u=e;null!=u&&++oi?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=eb(i);++r>>1,a=e[o];null!==a&&!o3(a)&&(n?a<=t:a=200){var l=t?null:it(e);if(l)return t$(l);a=!1,i=tL,u=new nx}else u=t?[]:s;n:for(;++r=r?e:rv(e,t,n)}var rF=e7||function(e){return e4.clearTimeout(e)};function rq(e,t){if(t)return e.slice();var n=e.length,r=ez?ez(n):new e.constructor(n);return e.copy(r),r}function rj(e){var t=new e.constructor(e.byteLength);return new eU(t).set(new eU(e)),t}function rU(e,t){var n=t?rj(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function rz(e,t){if(e!==t){var n=i!==e,r=null===e,o=e==e,a=o3(e),s=i!==t,u=null===t,l=t==t,c=o3(t);if(!u&&!c&&!a&&e>t||a&&s&&l&&!u&&!c||r&&s&&l||!n&&l||!o)return 1;if(!r&&!a&&!c&&e1?n[o-1]:i,s=o>2?n[2]:i;for(a=e.length>3&&"function"==typeof a?(o--,a):i,s&&iT(n[0],n[1],s)&&(a=o<3?i:a,o=1),t=ex(t);++r-1?o[a?t[s]:s]:i}}function r1(e){return il(function(t){var n=t.length,r=n,a=nb.prototype.thru;for(e&&t.reverse();r--;){var s=t[r];if("function"!=typeof s)throw new eI(o);if(a&&!u&&"wrapper"==ih(s))var u=new nb([],!0)}for(r=u?r:n;++r1&&_.reverse(),d&&lu))return!1;var c=a.get(e),d=a.get(t);if(c&&d)return c==t&&d==e;var p=-1,f=!0,h=2&n?new nx:i;for(a.set(e,t),a.set(t,e);++p-1&&e%1==0&&e1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(et,"{\n/* [wrapped with "+t+"] */\n")}(o,(r=(i=o.match(en))?i[1].split(er):[],tl(c,function(e){var t="_."+e[0];n&e[1]&&!tf(r,t)&&r.push(t)}),r.sort())))}function ij(e){var t=0,n=0;return function(){var r=t4(),o=16-(r-n);if(n=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(i,arguments)}}function iU(e,t){var n=-1,r=e.length,o=r-1;for(t=i===t?r:t;++n1?e[t-1]:i;return n="function"==typeof n?(e.pop(),n):i,ot(e,n)});function ou(e){var t=nm(e);return t.__chain__=!0,t}function ol(e,t){return t(e)}var oc=il(function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,o=function(t){return nL(t,e)};return!(t>1)&&!this.__actions__.length&&r instanceof n_&&iI(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:ol,args:[o],thisArg:i}),new nb(r,this.__chain__).thru(function(e){return t&&!e.length&&e.push(i),e})):this.thru(o)}),od=rH(function(e,t,n){eB.call(e,n)?++e[n]:nR(e,n,1)}),op=r0(iZ),of=r0(iY);function oh(e,t){return(oj(e)?tl:nU)(e,ig(t,3))}function om(e,t){return(oj(e)?tc:nz)(e,ig(t,3))}var og=rH(function(e,t,n){eB.call(e,n)?e[n].push(t):nR(e,n,[t])}),oy=rh(function(e,t,n){var r=-1,i="function"==typeof t,o=oz(e)?eb(e.length):[];return nU(e,function(e){o[++r]=i?ts(t,e,n):n4(e,t,n)}),o}),ob=rH(function(e,t,n){nR(e,n,t)});function o_(e,t){return(oj(e)?tm:rr)(e,ig(t,3))}var ov=rH(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]}),ow=rh(function(e,t){if(null==e)return[];var n=t.length;return n>1&&iT(e,t[0],t[1])?t=[]:n>2&&iT(t[0],t[1],t[2])&&(t=[t[0]]),ru(e,nK(t,1),[])}),ok=te||function(){return e4.Date.now()};function ox(e,t,n){return t=n?i:t,t=e&&null==t?e.length:t,ii(e,128,i,i,i,i,t)}function oA(e,t){var n;if("function"!=typeof t)throw new eI(o);return e=ae(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=i),n}}var oS=rh(function(e,t,n){var r=1;if(n.length){var i=tW(n,im(oS));r|=32}return ii(e,r,t,n,i)}),oI=rh(function(e,t,n){var r=3;if(n.length){var i=tW(n,im(oI));r|=32}return ii(t,r,e,n,i)});function oT(e,t,n){var r,a,s,u,l,c,d=0,p=!1,f=!1,h=!0;if("function"!=typeof e)throw new eI(o);function m(t){var n=r,o=a;return r=a=i,d=t,u=e.apply(o,n)}function g(e){var n=e-c,r=e-d;return i===c||n>=t||n<0||f&&r>=s}function y(){var e,n,r,i=ok();if(g(i))return b(i);l=iD(y,(e=i-c,n=i-d,r=t-e,f?t3(r,s-n):r))}function b(e){return(l=i,h&&r)?m(e):(r=a=i,u)}function _(){var e,n=ok(),o=g(n);if(r=arguments,a=this,c=n,o){if(i===l)return d=e=c,l=iD(y,t),p?m(e):u;if(f)return rF(l),l=iD(y,t),m(c)}return i===l&&(l=iD(y,t)),u}return t=an(t)||0,oY(n)&&(p=!!n.leading,s=(f="maxWait"in n)?t6(an(n.maxWait)||0,t):s,h="trailing"in n?!!n.trailing:h),_.cancel=function(){i!==l&&rF(l),d=0,r=c=a=l=i},_.flush=function(){return i===l?u:b(ok())},_}var oE=rh(function(e,t){return nq(e,1,t)}),oP=rh(function(e,t,n){return nq(e,an(t)||0,n)});function oC(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new eI(o);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(oC.Cache||nk),n}function oO(e){if("function"!=typeof e)throw new eI(o);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}oC.Cache=nk;var oB=rh(function(e,t){var n=(t=1==t.length&&oj(t[0])?tm(t[0],tM(ig())):tm(nK(t,1),tM(ig()))).length;return rh(function(r){for(var i=-1,o=t3(r.length,n);++i=t}),oq=n5(function(){return arguments}())?n5:function(e){return oX(e)&&eB.call(e,"callee")&&!eG.call(e,"callee")},oj=eb.isArray,oU=tt?tM(tt):function(e){return oX(e)&&n0(e)==T};function oz(e){return null!=e&&oZ(e.length)&&!oH(e)}function oV(e){return oX(e)&&oz(e)}var oW=tJ||a2,o$=tn?tM(tn):function(e){return oX(e)&&n0(e)==h};function oK(e){if(!oX(e))return!1;var t=n0(e);return t==m||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!o0(e)}function oH(e){if(!oY(e))return!1;var t=n0(e);return t==g||t==y||"[object AsyncFunction]"==t||"[object Proxy]"==t}function oG(e){return"number"==typeof e&&e==ae(e)}function oZ(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function oY(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function oX(e){return null!=e&&"object"==typeof e}var oQ=tr?tM(tr):function(e){return oX(e)&&ik(e)==b};function oJ(e){return"number"==typeof e||oX(e)&&n0(e)==_}function o0(e){if(!oX(e)||n0(e)!=v)return!1;var t=eV(e);if(null===t)return!0;var n=eB.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&eO.call(n)==eN}var o1=ti?tM(ti):function(e){return oX(e)&&n0(e)==k},o2=to?tM(to):function(e){return oX(e)&&ik(e)==x};function o6(e){return"string"==typeof e||!oj(e)&&oX(e)&&n0(e)==A}function o3(e){return"symbol"==typeof e||oX(e)&&n0(e)==S}var o4=ta?tM(ta):function(e){return oX(e)&&oZ(e.length)&&!!eQ[n0(e)]},o5=r9(rn),o8=r9(function(e,t){return e<=t});function o9(e){if(!e)return[];if(oz(e))return o6(e)?tH(e):r$(e);if(e3&&e[e3])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[e3]());var t=ik(e);return(t==b?tz:t==x?t$:aI)(e)}function o7(e){return e?(e=an(e))===u||e===-u?(e<0?-1:1)*17976931348623157e292:e==e?e:0:0===e?e:0}function ae(e){var t=o7(e),n=t%1;return t==t?n?t-n:t:0}function at(e){return e?nN(ae(e),0,4294967295):0}function an(e){if("number"==typeof e)return e;if(o3(e))return l;if(oY(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=oY(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=tB(e);var n=ec.test(e);return n||ep.test(e)?e2(e.slice(2),n?2:8):el.test(e)?l:+e}function ar(e){return rK(e,ab(e))}function ai(e){return null==e?"":rI(e)}var ao=rG(function(e,t){if(iO(t)||oz(t)){rK(t,ay(t),e);return}for(var n in t)eB.call(t,n)&&nC(e,n,t[n])}),aa=rG(function(e,t){rK(t,ab(t),e)}),as=rG(function(e,t,n,r){rK(t,ab(t),e,r)}),au=rG(function(e,t,n,r){rK(t,ay(t),e,r)}),al=il(nL),ac=rh(function(e,t){e=ex(e);var n=-1,r=t.length,o=r>2?t[2]:i;for(o&&iT(t[0],t[1],o)&&(r=1);++n1),t}),rK(e,id(e),n),r&&(n=nD(n,7,is));for(var i=t.length;i--;)rE(n,t[i]);return n}),ak=il(function(e,t){return null==e?{}:rl(e,t,function(t,n){return af(e,n)})});function ax(e,t){if(null==e)return{};var n=tm(id(e),function(e){return[e]});return t=ig(t),rl(e,n,function(e,n){return t(e,n[0])})}var aA=ir(ay),aS=ir(ab);function aI(e){return null==e?[]:tR(e,ay(e))}var aT=rQ(function(e,t,n){return t=t.toLowerCase(),e+(n?aE(t):t)});function aE(e){return aN(ai(e).toLowerCase())}function aP(e){return(e=ai(e))&&e.replace(eh,tF).replace(e$,"")}var aC=rQ(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),aO=rQ(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()}),aB=rX("toLowerCase"),aM=rQ(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}),aR=rQ(function(e,t,n){return e+(n?" ":"")+aN(t)}),aL=rQ(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),aN=rX("toUpperCase");function aD(e,t,n){if(e=ai(e),t=n?i:t,i===t){var r;return(r=e,eZ.test(r))?e.match(eH)||[]:e.match(ei)||[]}return e.match(t)||[]}var aF=rh(function(e,t){try{return ts(e,i,t)}catch(e){return oK(e)?e:new ev(e)}}),aq=il(function(e,t){return tl(t,function(t){nR(e,t=iV(t),oS(e[t],e))}),e});function aj(e){return function(){return e}}var aU=r1(),az=r1(!0);function aV(e){return e}function aW(e){return re("function"==typeof e?e:nD(e,1))}var a$=rh(function(e,t){return function(n){return n4(n,e,t)}}),aK=rh(function(e,t){return function(n){return n4(e,n,t)}});function aH(e,t,n){var r=ay(t),i=nX(t,r);null!=n||oY(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=nX(t,ay(t)));var o=!(oY(n)&&"chain"in n)||!!n.chain,a=oH(e);return tl(i,function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__);return(n.__actions__=r$(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,tg([this.value()],arguments))})}),e}function aG(){}var aZ=r4(tm),aY=r4(td),aX=r4(t_);function aQ(e){return iE(e)?tT(iV(e)):function(t){return nQ(t,e)}}var aJ=r8(),a0=r8(!0);function a1(){return[]}function a2(){return!1}var a6=r3(function(e,t){return e+t},0),a3=ie("ceil"),a4=r3(function(e,t){return e/t},1),a5=ie("floor"),a8=r3(function(e,t){return e*t},1),a9=ie("round"),a7=r3(function(e,t){return e-t},0);return nm.after=function(e,t){if("function"!=typeof t)throw new eI(o);return e=ae(e),function(){if(--e<1)return t.apply(this,arguments)}},nm.ary=ox,nm.assign=ao,nm.assignIn=aa,nm.assignInWith=as,nm.assignWith=au,nm.at=al,nm.before=oA,nm.bind=oS,nm.bindAll=aq,nm.bindKey=oI,nm.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return oj(e)?e:[e]},nm.chain=ou,nm.chunk=function(e,t,n){t=(n?iT(e,t,n):i===t)?1:t6(ae(t),0);var r=null==e?0:e.length;if(!r||t<1)return[];for(var o=0,a=0,s=eb(tE(r/t));oo?0:o+n),(r=i===r||r>o?o:ae(r))<0&&(r+=o),r=n>r?0:at(r);n>>0)?(e=ai(e))&&("string"==typeof t||null!=t&&!o1(t))&&!(t=rI(t))&&tU(e)?rD(tH(e),0,n):e.split(t,n):[]},nm.spread=function(e,t){if("function"!=typeof e)throw new eI(o);return t=null==t?0:t6(ae(t),0),rh(function(n){var r=n[t],i=rD(n,0,t);return r&&tg(i,r),ts(e,this,i)})},nm.tail=function(e){var t=null==e?0:e.length;return t?rv(e,1,t):[]},nm.take=function(e,t,n){return e&&e.length?rv(e,0,(t=n||i===t?1:ae(t))<0?0:t):[]},nm.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?rv(e,(t=r-(t=n||i===t?1:ae(t)))<0?0:t,r):[]},nm.takeRightWhile=function(e,t){return e&&e.length?rC(e,ig(t,3),!1,!0):[]},nm.takeWhile=function(e,t){return e&&e.length?rC(e,ig(t,3)):[]},nm.tap=function(e,t){return t(e),e},nm.throttle=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new eI(o);return oY(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),oT(e,t,{leading:r,maxWait:t,trailing:i})},nm.thru=ol,nm.toArray=o9,nm.toPairs=aA,nm.toPairsIn=aS,nm.toPath=function(e){return oj(e)?tm(e,iV):o3(e)?[e]:r$(iz(ai(e)))},nm.toPlainObject=ar,nm.transform=function(e,t,n){var r=oj(e),i=r||oW(e)||o4(e);if(t=ig(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:oY(e)&&oH(o)?ng(eV(e)):{}}return(i?tl:nZ)(e,function(e,r,i){return t(n,e,r,i)}),n},nm.unary=function(e){return ox(e,1)},nm.union=i8,nm.unionBy=i9,nm.unionWith=i7,nm.uniq=function(e){return e&&e.length?rT(e):[]},nm.uniqBy=function(e,t){return e&&e.length?rT(e,ig(t,2)):[]},nm.uniqWith=function(e,t){return t="function"==typeof t?t:i,e&&e.length?rT(e,i,t):[]},nm.unset=function(e,t){return null==e||rE(e,t)},nm.unzip=oe,nm.unzipWith=ot,nm.update=function(e,t,n){return null==e?e:rP(e,t,rL(n))},nm.updateWith=function(e,t,n,r){return r="function"==typeof r?r:i,null==e?e:rP(e,t,rL(n),r)},nm.values=aI,nm.valuesIn=function(e){return null==e?[]:tR(e,ab(e))},nm.without=on,nm.words=aD,nm.wrap=function(e,t){return oM(rL(t),e)},nm.xor=or,nm.xorBy=oi,nm.xorWith=oo,nm.zip=oa,nm.zipObject=function(e,t){return rM(e||[],t||[],nC)},nm.zipObjectDeep=function(e,t){return rM(e||[],t||[],ry)},nm.zipWith=os,nm.entries=aA,nm.entriesIn=aS,nm.extend=aa,nm.extendWith=as,aH(nm,nm),nm.add=a6,nm.attempt=aF,nm.camelCase=aT,nm.capitalize=aE,nm.ceil=a3,nm.clamp=function(e,t,n){return i===n&&(n=t,t=i),i!==n&&(n=(n=an(n))==n?n:0),i!==t&&(t=(t=an(t))==t?t:0),nN(an(e),t,n)},nm.clone=function(e){return nD(e,4)},nm.cloneDeep=function(e){return nD(e,5)},nm.cloneDeepWith=function(e,t){return nD(e,5,t="function"==typeof t?t:i)},nm.cloneWith=function(e,t){return nD(e,4,t="function"==typeof t?t:i)},nm.conformsTo=function(e,t){return null==t||nF(e,t,ay(t))},nm.deburr=aP,nm.defaultTo=function(e,t){return null==e||e!=e?t:e},nm.divide=a4,nm.endsWith=function(e,t,n){e=ai(e),t=rI(t);var r=e.length,o=n=i===n?r:nN(ae(n),0,r);return(n-=t.length)>=0&&e.slice(n,o)==t},nm.eq=oN,nm.escape=function(e){return(e=ai(e))&&W.test(e)?e.replace(z,tq):e},nm.escapeRegExp=function(e){return(e=ai(e))&&Q.test(e)?e.replace(X,"\\$&"):e},nm.every=function(e,t,n){var r=oj(e)?td:nV;return n&&iT(e,t,n)&&(t=i),r(e,ig(t,3))},nm.find=op,nm.findIndex=iZ,nm.findKey=function(e,t){return tw(e,ig(t,3),nZ)},nm.findLast=of,nm.findLastIndex=iY,nm.findLastKey=function(e,t){return tw(e,ig(t,3),nY)},nm.floor=a5,nm.forEach=oh,nm.forEachRight=om,nm.forIn=function(e,t){return null==e?e:nH(e,ig(t,3),ab)},nm.forInRight=function(e,t){return null==e?e:nG(e,ig(t,3),ab)},nm.forOwn=function(e,t){return e&&nZ(e,ig(t,3))},nm.forOwnRight=function(e,t){return e&&nY(e,ig(t,3))},nm.get=ap,nm.gt=oD,nm.gte=oF,nm.has=function(e,t){return null!=e&&ix(e,t,n2)},nm.hasIn=af,nm.head=iQ,nm.identity=aV,nm.includes=function(e,t,n,r){e=oz(e)?e:aI(e),n=n&&!r?ae(n):0;var i=e.length;return n<0&&(n=t6(i+n,0)),o6(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&tx(e,t,n)>-1},nm.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return -1;var i=null==n?0:ae(n);return i<0&&(i=t6(r+i,0)),tx(e,t,i)},nm.inRange=function(e,t,n){var r,o,a;return t=o7(t),i===n?(n=t,t=0):n=o7(n),(r=e=an(e))>=t3(o=t,a=n)&&r=-9007199254740991&&e<=9007199254740991},nm.isSet=o2,nm.isString=o6,nm.isSymbol=o3,nm.isTypedArray=o4,nm.isUndefined=function(e){return i===e},nm.isWeakMap=function(e){return oX(e)&&ik(e)==I},nm.isWeakSet=function(e){return oX(e)&&"[object WeakSet]"==n0(e)},nm.join=function(e,t){return null==e?"":t1.call(e,t)},nm.kebabCase=aC,nm.last=i2,nm.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return -1;var o=r;return i!==n&&(o=(o=ae(n))<0?t6(r+o,0):t3(o,r-1)),t==t?function(e,t,n){for(var r=n+1;r--&&e[r]!==t;);return r}(e,t,o):tk(e,tS,o,!0)},nm.lowerCase=aO,nm.lowerFirst=aB,nm.lt=o5,nm.lte=o8,nm.max=function(e){return e&&e.length?nW(e,aV,n1):i},nm.maxBy=function(e,t){return e&&e.length?nW(e,ig(t,2),n1):i},nm.mean=function(e){return tI(e,aV)},nm.meanBy=function(e,t){return tI(e,ig(t,2))},nm.min=function(e){return e&&e.length?nW(e,aV,rn):i},nm.minBy=function(e,t){return e&&e.length?nW(e,ig(t,2),rn):i},nm.stubArray=a1,nm.stubFalse=a2,nm.stubObject=function(){return{}},nm.stubString=function(){return""},nm.stubTrue=function(){return!0},nm.multiply=a8,nm.nth=function(e,t){return e&&e.length?rs(e,ae(t)):i},nm.noConflict=function(){return e4._===this&&(e4._=eD),this},nm.noop=aG,nm.now=ok,nm.pad=function(e,t,n){e=ai(e);var r=(t=ae(t))?tK(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return r5(tX(i),n)+e+r5(tE(i),n)},nm.padEnd=function(e,t,n){e=ai(e);var r=(t=ae(t))?tK(e):0;return t&&rt){var r=e;e=t,t=r}if(n||e%1||t%1){var o=t8();return t3(e+o*(t-e+e1("1e-"+((o+"").length-1))),t)}return rp(e,t)},nm.reduce=function(e,t,n){var r=oj(e)?ty:tP,i=arguments.length<3;return r(e,ig(t,4),n,i,nU)},nm.reduceRight=function(e,t,n){var r=oj(e)?tb:tP,i=arguments.length<3;return r(e,ig(t,4),n,i,nz)},nm.repeat=function(e,t,n){return t=(n?iT(e,t,n):i===t)?1:ae(t),rf(ai(e),t)},nm.replace=function(){var e=arguments,t=ai(e[0]);return e.length<3?t:t.replace(e[1],e[2])},nm.result=function(e,t,n){t=rN(t,e);var r=-1,o=t.length;for(o||(o=1,e=i);++r9007199254740991)return[];var n=4294967295,r=t3(e,4294967295);t=ig(t),e-=4294967295;for(var i=tO(r,t);++n=a)return e;var u=n-tK(r);if(u<1)return r;var l=s?rD(s,0,u).join(""):e.slice(0,u);if(i===o)return l+r;if(s&&(u+=l.length-u),o1(o)){if(e.slice(u).search(o)){var c,d=l;for(o.global||(o=eA(o.source,ai(eu.exec(o))+"g")),o.lastIndex=0;c=o.exec(d);)var p=c.index;l=l.slice(0,i===p?u:p)}}else if(e.indexOf(rI(o),u)!=u){var f=l.lastIndexOf(o);f>-1&&(l=l.slice(0,f))}return l+r},nm.unescape=function(e){return(e=ai(e))&&V.test(e)?e.replace(U,tZ):e},nm.uniqueId=function(e){var t=++eM;return ai(e)+t},nm.upperCase=aL,nm.upperFirst=aN,nm.each=oh,nm.eachRight=om,nm.first=iQ,aH(nm,(ey={},nZ(nm,function(e,t){eB.call(nm.prototype,t)||(ey[t]=e)}),ey),{chain:!1}),nm.VERSION="4.17.21",tl(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){nm[e].placeholder=nm}),tl(["drop","take"],function(e,t){n_.prototype[e]=function(n){n=i===n?1:t6(ae(n),0);var r=this.__filtered__&&!t?new n_(this):this.clone();return r.__filtered__?r.__takeCount__=t3(n,r.__takeCount__):r.__views__.push({size:t3(n,4294967295),type:e+(r.__dir__<0?"Right":"")}),r},n_.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),tl(["filter","map","takeWhile"],function(e,t){var n=t+1,r=1==n||3==n;n_.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:ig(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}}),tl(["head","last"],function(e,t){var n="take"+(t?"Right":"");n_.prototype[e]=function(){return this[n](1).value()[0]}}),tl(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");n_.prototype[e]=function(){return this.__filtered__?new n_(this):this[n](1)}}),n_.prototype.compact=function(){return this.filter(aV)},n_.prototype.find=function(e){return this.filter(e).head()},n_.prototype.findLast=function(e){return this.reverse().find(e)},n_.prototype.invokeMap=rh(function(e,t){return"function"==typeof e?new n_(this):this.map(function(n){return n4(n,e,t)})}),n_.prototype.reject=function(e){return this.filter(oO(ig(e)))},n_.prototype.slice=function(e,t){e=ae(e);var n=this;return n.__filtered__&&(e>0||t<0)?new n_(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),i!==t&&(n=(t=ae(t))<0?n.dropRight(-t):n.take(t-e)),n)},n_.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},n_.prototype.toArray=function(){return this.take(4294967295)},nZ(n_.prototype,function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),o=nm[r?"take"+("last"==t?"Right":""):t],a=r||/^find/.test(t);o&&(nm.prototype[t]=function(){var t=this.__wrapped__,s=r?[1]:arguments,u=t instanceof n_,l=s[0],c=u||oj(t),d=function(e){var t=o.apply(nm,tg([e],s));return r&&p?t[0]:t};c&&n&&"function"==typeof l&&1!=l.length&&(u=c=!1);var p=this.__chain__,f=!!this.__actions__.length,h=a&&!p,m=u&&!f;if(!a&&c){t=m?t:new n_(this);var g=e.apply(t,s);return g.__actions__.push({func:ol,args:[d],thisArg:i}),new nb(g,p)}return h&&m?e.apply(this,s):(g=this.thru(d),h?r?g.value()[0]:g.value():g)})}),tl(["pop","push","shift","sort","splice","unshift"],function(e){var t=eT[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);nm.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(oj(i)?i:[],e)}return this[n](function(n){return t.apply(oj(n)?n:[],e)})}}),nZ(n_.prototype,function(e,t){var n=nm[t];if(n){var r=n.name+"";eB.call(na,r)||(na[r]=[]),na[r].push({name:t,func:n})}}),na[r2(i,2).name]=[{name:"wrapper",func:i}],n_.prototype.clone=function(){var e=new n_(this.__wrapped__);return e.__actions__=r$(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=r$(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=r$(this.__views__),e},n_.prototype.reverse=function(){if(this.__filtered__){var e=new n_(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e},n_.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=oj(e),r=t<0,i=n?e.length:0,o=function(e,t,n){for(var r=-1,i=n.length;++r=this.__values__.length,t=e?i:this.__values__[this.__index__++];return{done:e,value:t}},nm.prototype.plant=function(e){for(var t,n=this;n instanceof ny;){var r=i$(n);r.__index__=0,r.__values__=i,t?o.__wrapped__=r:t=r;var o=r;n=n.__wrapped__}return o.__wrapped__=e,t},nm.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof n_){var t=e;return this.__actions__.length&&(t=new n_(this)),(t=t.reverse()).__actions__.push({func:ol,args:[i5],thisArg:i}),new nb(t,this.__chain__)}return this.thru(i5)},nm.prototype.toJSON=nm.prototype.valueOf=nm.prototype.value=function(){return rO(this.__wrapped__,this.__actions__)},nm.prototype.first=nm.prototype.head,e3&&(nm.prototype[e3]=function(){return this}),nm}();e4._=tY,r=(function(){return tY}).call(t,n,t,e),i!==r&&(e.exports=r)}).call(this)},71456:function(e,t,n){"use strict";n.d(t,{K:function(){return i},k:function(){return o}});var r=n(47382);let i=r.Z,o=r.Z},47382:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=e=>e},7544:function(e,t,n){e.exports=n(65035)},6840:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_app",function(){return n(9212)}])},95677:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{noSSR:function(){return s},default:function(){return u}});let r=n(58106),i=n(2575),o=(n(67294),i._(n(8976)));function a(e){return{default:(null==e?void 0:e.default)||e}}function s(e,t){return delete t.webpack,delete t.modules,e(t)}function u(e,t){let n=o.default,i={loading:e=>{let{error:t,isLoading:n,pastDelay:r}=e;return null}};e instanceof Promise?i.loader=()=>e:"function"==typeof e?i.loader=e:"object"==typeof e&&(i=r._({},i,e)),i=r._({},i,t);let u=i.loader,l=()=>null!=u?u().then(a):Promise.resolve(a(()=>null));return(i.loadableGenerated&&(i=r._({},i,i.loadableGenerated),delete i.loadableGenerated),"boolean"!=typeof i.ssr||i.ssr)?n(r._({},i,{loader:l})):(delete i.webpack,delete i.modules,s(n,i))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},92254:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"LoadableContext",{enumerable:!0,get:function(){return o}});let r=n(2575),i=r._(n(67294)),o=i.default.createContext(null)},8976:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return h}});let r=n(58106),i=n(2575),o=i._(n(67294)),a=n(92254),s=[],u=[],l=!1;function c(e){let t=e(),n={loading:!0,loaded:null,error:null};return n.promise=t.then(e=>(n.loading=!1,n.loaded=e,e)).catch(e=>{throw n.loading=!1,n.error=e,e}),n}class d{promise(){return this._res.promise}retry(){this._clearTimeouts(),this._res=this._loadFn(this._opts.loader),this._state={pastDelay:!1,timedOut:!1};let{_res:e,_opts:t}=this;e.loading&&("number"==typeof t.delay&&(0===t.delay?this._state.pastDelay=!0:this._delay=setTimeout(()=>{this._update({pastDelay:!0})},t.delay)),"number"==typeof t.timeout&&(this._timeout=setTimeout(()=>{this._update({timedOut:!0})},t.timeout))),this._res.promise.then(()=>{this._update({}),this._clearTimeouts()}).catch(e=>{this._update({}),this._clearTimeouts()}),this._update({})}_update(e){this._state=r._({},this._state,{error:this._res.error,loaded:this._res.loaded,loading:this._res.loading},e),this._callbacks.forEach(e=>e())}_clearTimeouts(){clearTimeout(this._delay),clearTimeout(this._timeout)}getCurrentValue(){return this._state}subscribe(e){return this._callbacks.add(e),()=>{this._callbacks.delete(e)}}constructor(e,t){this._loadFn=e,this._opts=t,this._callbacks=new Set,this._delay=null,this._timeout=null,this.retry()}}function p(e){return function(e,t){let n=Object.assign({loader:null,loading:null,delay:200,timeout:null,webpack:null,modules:null},t),r=null;function i(){if(!r){let t=new d(e,n);r={getCurrentValue:t.getCurrentValue.bind(t),subscribe:t.subscribe.bind(t),retry:t.retry.bind(t),promise:t.promise.bind(t)}}return r.promise()}if(!l){let e=n.webpack?n.webpack():n.modules;e&&u.push(t=>{for(let n of e)if(-1!==t.indexOf(n))return i()})}function s(e,t){!function(){i();let e=o.default.useContext(a.LoadableContext);e&&Array.isArray(n.modules)&&n.modules.forEach(t=>{e(t)})}();let s=o.default.useSyncExternalStore(r.subscribe,r.getCurrentValue,r.getCurrentValue);return o.default.useImperativeHandle(t,()=>({retry:r.retry}),[]),o.default.useMemo(()=>{var t;return s.loading||s.error?o.default.createElement(n.loading,{isLoading:s.loading,pastDelay:s.pastDelay,timedOut:s.timedOut,error:s.error,retry:r.retry}):s.loaded?o.default.createElement((t=s.loaded)&&t.default?t.default:t,e):null},[e,s])}return s.preload=()=>i(),s.displayName="LoadableComponent",o.default.forwardRef(s)}(c,e)}function f(e,t){let n=[];for(;e.length;){let r=e.pop();n.push(r(t))}return Promise.all(n).then(()=>{if(e.length)return f(e,t)})}p.preloadAll=()=>new Promise((e,t)=>{f(s).then(e,t)}),p.preloadReady=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return new Promise(t=>{let n=()=>(l=!0,t());f(u,e).then(n,n)})},window.__NEXT_PRELOADREADY=p.preloadReady;let h=p},41266:function(e,t,n){"use strict";n.d(t,{wH:function(){return u}});var r=n(61034),i=n(4156),o=n(51204),a=n(46278);let s=a.Z.create({timeout:6e4}),u=new Set([400,403,404,500]),l=e=>null==e?void 0:e.includes("birdeye");s.interceptors.response.use(e=>{let{config:t,data:n,status:i}=e,{url:o}=t;if(!l(o))try{(0,r.XRi)({status:i,url:o||"",params:t.params,data:{id:n.id,success:n.success},logCount:800})}catch(e){}return n},e=>{let{config:t,response:n={}}=e,{status:a}=n,{url:s}=t;if(!l(s))try{var u;(0,r.XRi)({status:a,url:s,params:t.params,data:{id:null===(u=n.data)||void 0===u?void 0:u.id,success:e.message},logCount:800})}catch(e){}return t.skipError||i.w.next({title:o.ZP.t("error.api_error"),description:a||e.message,status:"error"}),Promise.reject(e)}),t.ZP=s},28147:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(85893),i=n(38751),o=n(67294);function a(){let{run:e=!0,initPercent:t=0,componentRef:n,duration:a=6e4,strokeWidth:s=3,updateDelay:u=1e3,svgWidth:l=36,loop:c=!0,trackStrokeColor:d="#ffffff2e",trackStrokeOpacity:p,filledTrackStrokeColor:f="#92e1ffd9",onEnd:h,onClick:m}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},g=.85*l/2,y=2*g*Math.PI,[b,_]=(0,o.useState)(t),v=(0,o.useRef)(null);return(0,o.useEffect)(()=>{let t=globalThis.setInterval(()=>{e&&_(e=>e+1/a*u)},u);return()=>globalThis.clearInterval(t)},[a,u,e]),(0,o.useEffect)(()=>{0!==b&&Math.round(100*b)/100%1==0&&(0,o.startTransition)(()=>{null==h||h()})},[h,b]),(0,o.useImperativeHandle)(n,()=>({currentProgressPercent:b%1,restart(){_(0)}})),(0,r.jsx)(i.xu,{cursor:m?"pointer":"default",onClick:m,children:(0,r.jsxs)("svg",{ref:v,width:l,height:l,viewBox:"0 0 ".concat(l," ").concat(l),children:[(0,r.jsx)("circle",{r:g,cx:"50%",cy:"50%",fill:"transparent",style:{strokeWidth:s,stroke:d,strokeOpacity:p}}),(0,r.jsx)("circle",{id:"bar",r:g,cx:"50%",cy:"50%",fill:"transparent",strokeDasharray:y,strokeDashoffset:y-(c?b%1:Math.min(b,1))*y,style:{strokeWidth:s,stroke:f,transform:"rotate(-90deg)",transformOrigin:"center",strokeLinecap:"round",transition:"200ms"}})]})})}},62258:function(e,t,n){"use strict";n.d(t,{Pp:function(){return i},fd:function(){return o}});var r=n(30162);let i=r.bI.Sepolia,o={address:"0xE30feDd158A2e3b13e9badaeABaFc5516e95e8C7",decimals:18,name:"Wrapped SEI",symbol:"WSEI"}},90992:function(e,t,n){"use strict";n.d(t,{Bs:function(){return p},Sw:function(){return c},gq:function(){return d},k_:function(){return l},uc:function(){return u}});var r=n(6093);n(81292);var i=n(46552),o=n(76953);let a="_ray_favorite_pool_",s=new Set(JSON.parse(localStorage.getItem(a)||"[]")),u=()=>s,l=e=>{if((0,r.C5)())return Array.isArray(e)?e.forEach(e=>{s.has(e)?s.delete(e):s.add(e)}):s.has(e)?s.delete(e):s.add(e),localStorage.setItem(a,JSON.stringify(Array.from(s))),s},c=e=>(0,o.a)([e.mintA,e.mintB]),d=(e,t)=>e>999.99?">999.99%":(0,i.ZP)(e,{decimals:2,...t}),p={default:"default",liquidity:"liquidity",volume:"volume",fee:"fee",apr:"apr"}},98349:function(e,t,n){"use strict";n.d(t,{ZP:function(){return h},bf:function(){return p}});var r,i,o=n(67294),a=n(36667),s=n(60374),u=n(41266),l=n(15061),c=n(34497);(r=i||(i={})).Clmm="concentrated",r.Standard="standard",r.All="all";let d=Date.now(),p=()=>d=Date.now(),f=e=>{let[t]=e;return u.ZP.get(t,{skipError:!0})};function h(e){let{owner:t,shouldFetch:n=!0,refreshInterval:r=18e4}=e||{},u=!!t&&(0,c.g)(t),[p,h]=(0,l.qr)(e=>[e.urlConfigs.OWNER_BASE_HOST,e.urlConfigs.OWNER_CREATED_FARM],s.Z),m=u&&n?p+h.replace("{owner}",t.toString()):null,{data:g,isLoading:y,error:b,..._}=(0,a.ZP)(m?[m,d]:m,f,{dedupingInterval:r,focusThrottleInterval:r,refreshInterval:r}),v=(0,o.useMemo)(()=>{let e=(null==g?void 0:g.data)||{clmm:[],farm:[]};return e.clmm.map(e=>({...e,type:i.Clmm})).concat(e.farm.map(e=>({...e,type:i.Standard})))},[g]);return{data:(null==g?void 0:g.data)||{farm:[],clmm:[]},formattedData:v,isLoading:y,error:b,isEmptyResult:!y&&!(g&&!b),..._}}},35214:function(e,t,n){"use strict";n.d(t,{Yi:function(){return l},r4:function(){return c},xl:function(){return u}});var r=n(51204),i=n(38479),o=n(57632);let a=new Set(["success","error","info"]),s=e=>Array(e).fill({txId:"",status:"info"}),u=e=>{let{txLength:t,...n}=e;return{processedId:s(t),toastId:(0,o.Z)(),handler:d({transactionLength:t,...n})}},l=e=>{let{data:t,processedId:n}=e;return n.map((e,n)=>{var r;return{txId:(null===(r=t[n])||void 0===r?void 0:r.txId)||e.txId,status:t[n]&&a.has(t[n].status)?t[n].status:"info"}})},c=e=>{var t;let{toastId:n,txLength:o,processedId:a,meta:s,skipWatchSignature:u,isSwap:l,getSubTxTitle:c,handler:d,...p}=e;if(o<=1){a[0].txId&&(i.aV.next({status:a[0].status,skipWatchSignature:u,txId:a[0].txId,update:!0,isSwap:l,...s,onSent:p.onSent,onError:p.onError,onConfirmed:p.onConfirmed,onClose:p.onCloseToast}),d(a));return}let f=a.some(e=>"error"===e.status),h=a.filter(e=>"success"===e.status).length>=(null!==(t=e.txLength)&&void 0!==t?t:e.processedId.length);i.my.next({toastId:n,skipWatchSignature:!0,update:!0,status:f?"error":h?"success":"info",...s,isSwap:l,title:s.title+(f&&!l?" ".concat(r.ZP.t("transaction.failed")):""),duration:f||h?8e3:void 0,subTxIds:a.map((e,t)=>{let n=c(t);return{txId:e.txId,status:e.status,title:r.ZP.t(n),txHistoryTitle:n}})}),d(a)},d=e=>{let{transactionLength:t,...n}=e,[r,i,o,a]=[!1,!1,!1,!1];return e=>{var s,u,l,c,d;if(e.some(e=>"error"===e.status)){i||null==n||null===(s=n.onError)||void 0===s||s.call(n),o||null==n||null===(u=n.onFinally)||void 0===u||u.call(n),i=!0,o=!0;return}e.length===t&&(r||null==n||null===(l=n.onSent)||void 0===l||l.call(n),o||null==n||null===(c=n.onFinally)||void 0===c||c.call(n),r=!0,o=!0),e.filter(e=>"success"===e.status).length===t&&(a||null==n||null===(d=n.onConfirmed)||void 0===d||d.call(n),a=!0)}}},41178:function(e,t,n){"use strict";n.d(t,{WH:function(){return d}});var r=n(64174),i=n(85518),o=n(6093),a=n(15061),s=n(41266),u=n(61034);let l=new Map,c=e=>{(0,o._u)(o.Ok.get(e)),l.set(e,{done:!0})},d=e=>{e.forEach(e=>{if("sent"===e.status&&e.txId){!function(e){let{tx:t,id:n}=e,{connection:c,urlConfigs:d}=a.qr.getState();if(l.has(n))return;let p=(0,i.rQ)(window.navigator.userAgent),f=()=>{try{var e;s.ZP.post("".concat(d.SERVICE_1_BASE_HOST,"/send-tx"),{data:(0,u.Lj)(t),walletName:(null===(e=a.qr.getState().wallet)||void 0===e?void 0:e.adapter.name)||"",deviceType:p.device.type||"pc"},{skipError:!0}).catch(e=>{console.error("send tx to be error",e.message)})}catch(e){console.error("send tx to be error")}};f(),c&&(l.set(n,{done:!1}),(0,o.XD)(async()=>{if(l.get(n).done)return!0;try{t instanceof r.YW?await c.sendRawTransaction(t.serialize(),{skipPreflight:!0,maxRetries:0}):await c.sendTransaction(t,{skipPreflight:!0,maxRetries:0})}catch(e){console.error("send tx to rpc error")}throw f(),Error("sending")},{id:n,retryCount:60,interval:2e3,sleepTime:2e3}).catch(e=>{console.error("retry failed",e.message)}))}({tx:e.signedTx,id:e.txId});return}c(e.txId)})}},4156:function(e,t,n){"use strict";n.d(t,{Z:function(){return E},w:function(){return S}});var r=n(85893),i=n(34876),o=n(84863),a=n(27404),s=n(67294),u=n(95033),l=n(28189),c=n(8653),d=n(38751),p=n(29196),f=n(28147),h=n(2837),m=n(16605),g=n(90449),y=n(80325),b=n(47679),_=n(94142);let v={duration:5e3,position:"bottom-right"};function w(e){var t,n,i,o;let{state:a,onClose:l}=e,[c,w]=(0,s.useState)({isCountDown:!0,remainTime:null!==(t=a.duration)&&void 0!==t?t:v.duration,endTime:new Date().getTime()+(null!==(n=a.duration)&&void 0!==n?n:0)}),k=a&&"error"===a.status?{mainColor:_.O9.semanticError,icon:(0,r.jsx)(g.Z,{width:24,height:24,color:_.O9.semanticError})}:"warning"===a.status?{mainColor:_.O9.semanticWarning,icon:(0,r.jsx)(y.Z,{width:24,height:24,color:_.O9.semanticWarning})}:"info"===a.status?{mainColor:_.O9.semanticNeutral,icon:(0,r.jsx)(b.Z,{width:24,height:24,color:_.O9.semanticNeutral})}:{mainColor:_.O9.secondary,icon:(0,r.jsx)(h.Z,{width:24,height:24,color:_.O9.secondary})};return(0,s.useEffect)(()=>{var e,t;w({isCountDown:!0,remainTime:null!==(e=a.duration)&&void 0!==e?e:v.duration,endTime:new Date().getTime()+(null!==(t=a.duration)&&void 0!==t?t:0)})},[a.duration]),(0,s.useEffect)(()=>{if(c.isCountDown&&c.remainTime){let e=setTimeout(()=>{l()},c.remainTime);return()=>clearTimeout(e)}},[c.isCountDown,c.remainTime,l]),(0,r.jsxs)(d.xu,{bg:_.O9.backgroundLight,borderRadius:"12px",border:"1px solid ".concat(k.mainColor),py:5,px:6,maxW:[340,384],overflow:"hidden",position:"relative",onMouseEnter:()=>{w(e=>({...e,isCountDown:!1,remainTime:e.endTime-new Date().getTime()}))},onMouseLeave:()=>{w(e=>({...e,isCountDown:!0,endTime:new Date().getTime()+e.remainTime}))},children:[a.isClosable?(0,r.jsxs)(d.xu,{style:{height:4,position:"absolute",top:0,left:0,right:0},children:[(0,r.jsx)(d.xu,{style:{backgroundColor:"transparent",position:"absolute",inset:0}}),(0,r.jsx)(d.xu,{style:{backgroundColor:k.mainColor,position:"absolute",inset:0,animation:"".concat(a.duration,"ms linear 0s 1 normal forwards running shrink"),animationPlayState:c.isCountDown?"running":"paused"}},a.duration)]}):null,(0,r.jsxs)(u.k,{children:[(0,r.jsx)(u.k,{direction:"column",children:null!==(i=a.icon)&&void 0!==i?i:k.icon}),(0,r.jsxs)(u.k,{direction:"column",grow:1,justify:"center",maxW:a.isClosable?"90%":"100%",gap:2,px:4,children:[(0,r.jsx)(p.X,{fontSize:"md",fontWeight:"600",color:_.O9.textPrimary,lineHeight:6,children:a.title}),(0,r.jsx)(d.xu,{fontSize:14,fontWeight:600,color:_.O9.text6a6a6a,textOverflow:"ellipsis",whiteSpace:"pre-wrap",overflow:"hidden",children:a.description}),!a.fullWidth&&!!a.detail&&(0,r.jsx)(d.xu,{fontSize:12,fontWeight:600,color:_.O9.text6a6a6a,children:a.detail})]}),(0,r.jsx)(u.k,{direction:"column",children:a.isClosable?(0,r.jsx)(m.Z,{style:{cursor:"pointer"},width:12,height:12,onClick:l}):(0,r.jsx)(f.Z,{strokeWidth:2,svgWidth:24,duration:null!==(o=a.duration)&&void 0!==o?o:v.duration,updateDelay:100,run:c.isCountDown})})]}),a.fullWidth&&!!a.detail&&(0,r.jsx)(d.xu,{fontSize:12,fontWeight:600,color:_.O9.text6a6a6a,mt:2,children:a.detail})]})}var k=n(57632),x=n(35154),A=n(15061);let S=new c.x,I={duration:3e3,isClosable:!0,position:"bottom-right",containerStyle:{maxWidth:"300px","& .chakra-alert__desc":{wordBreak:"break-word"}}},T=new Map;var E=function(){let e=function(e){let{theme:t}=(0,a.uP)(),n=(0,i.OX)();return(0,s.useMemo)(()=>(0,o.Cj)(t.direction,{...n,...e}),[e,t.direction,n])}(),{t}=(0,l.$G)(),n=(0,A.qr)(e=>e.explorerUrl);(0,s.useEffect)(()=>{let i=S.asObservable().subscribe(i=>{let{id:o,update:a,close:s,txError:l,noRpc:c,txId:d,...p}=i;if(d){var f;S.next({id:d,title:p.title||"".concat(t("transaction.title")," ").concat(t("transaction.sent")),description:p.description,detail:function(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0],(0,r.jsxs)(u.k,{gap:"1",alignItems:"center",onClick:()=>window.open("".concat(n,"/tx/").concat(d)),cursor:"pointer",opacity:1,children:[t("transaction.view_detail"),(0,r.jsx)(x.Z,{cursor:"pointer"})]})}(),status:p.status||"info",duration:null!==(f=p.duration)&&void 0!==f?f:I.duration,update:a,onClose:p.onClose,containerStyle:{color:_.O9.text6a6a6a,fontWeight:600}});return}o=null!=o?o:(0,k.Z)();let h=t=>{var n;null===(n=p.onClose)||void 0===n||n.call(p),e.close(t.id),T.set(t.id,m)},m="error"===p.status||"success"===p.status||"warning"===p.status?p.status:"info";if(s){o&&(e.close(o),T.set(o,m));return}if(!(o&&T.has(o))||T.get(o)!==m){if(a&&o&&e.isActive(o)){e.update(o,{duration:p.duration||I.duration,position:p.position||I.position,...p,render:e=>(0,r.jsx)(w,{state:{...I,...p,status:m},id:e.id,onClose:()=>h(e)})});return}if(l){let n=l.message.includes("versioned transactions isn't supported")||l.message.includes(".serializeMessage")||l.message.includes("forEach")?"Transaction cancelled\nThis wallet might not support Versioned Transaction, turn it off and try again.":l.message;e({id:o,duration:p.duration||I.duration,position:p.position||I.position,status:"error",...p,render:e=>(0,r.jsx)(w,{state:{...I,...p,title:p.title?"".concat(p.title," ").concat(t("transaction.failed")):t("transaction.failed"),description:n,status:"error"},id:e.id,onClose:()=>h(e)})});return}if(c){e({id:o,duration:p.duration||I.duration,position:p.position||I.position,status:"error",render:e=>(0,r.jsx)(w,{state:{...I,...p,status:"error",title:"Error",description:"No Rpc Connection"},id:e.id,onClose:()=>h(e)})});return}e({id:o,duration:p.duration||I.duration,position:p.position||I.position,...p,render:e=>(0,r.jsx)(w,{state:{...I,...p,status:"error"===p.status||"info"===p.status||"warning"===p.status?p.status:"success"},id:e.id,onClose:()=>h(e)})})}});return()=>i.unsubscribe()},[e])}},38479:function(e,t,n){"use strict";n.d(t,{my:function(){return o},aV:function(){return i}}),n(85893),n(67294),n(28189);var r=n(8653);n(68723),n(35154),n(6093),n(4156),n(9334),n(2837),n(90449),n(47679),n(41178);let i=new r.x,o=new r.x},51204:function(e,t,n){"use strict";n.d(t,{Qr:function(){return g},t4:function(){return _}});var r=n(31928),i=n(28189),o=n(86443),a=n(13262),s=n(41659),u=n(44875),l=n(86163),c=n(55117),d=n(86115),p=n(50482),f=n(65909),h=n(94596),m=n(43903);let g="i18nextLng",y={resources:{en:{translation:o},"zh-TW":{translation:a},"zh-CN":{translation:s},jp:{translation:u},ko:{translation:l},es:{translation:c},fr:{translation:d},ru:{translation:p},pt:{translation:f},tr:{translation:h}},fallbackLng:"en"};r.ZP.use(i.Db).init(y);let b=new Set(Object.keys(y.resources)),_=async(e,t)=>{if(!b.has(e))return;let i=t;return e&&!r.ZP.hasResourceBundle(e,"translation")&&(i=null!=t?t:await n(75407)("./".concat(e,".json")),r.ZP.addResourceBundle(e,"translation",i)),r.ZP.changeLanguage(e),(0,m.Nh)(g,e),i};t.ZP=r.ZP},2837:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(85893);function i(e){let{width:t=16,height:n=16,fill:i="currentColor"}=e;return(0,r.jsxs)("svg",{width:t,height:n,viewBox:"0 0 24 24",fill:i,className:"chakra-icon",...e,children:[(0,r.jsx)("path",{d:"M17.0089 7.74023H15.7526C15.4794 7.74023 15.2196 7.87148 15.0588 8.09648L10.8481 13.9358L8.94099 11.2893C8.78028 11.067 8.52314 10.9331 8.24724 10.9331H6.99099C6.81688 10.9331 6.7151 11.1313 6.81688 11.2733L10.1544 15.9018C10.2332 16.0119 10.3372 16.1016 10.4576 16.1634C10.578 16.2253 10.7114 16.2575 10.8468 16.2575C10.9822 16.2575 11.1156 16.2253 11.236 16.1634C11.3564 16.1016 11.4604 16.0119 11.5392 15.9018L17.1803 8.08041C17.2847 7.93845 17.183 7.74023 17.0089 7.74023Z",fill:i}),(0,r.jsx)("path",{d:"M12 0C5.37321 0 0 5.37321 0 12C0 18.6268 5.37321 24 12 24C18.6268 24 24 18.6268 24 12C24 5.37321 18.6268 0 12 0ZM12 21.9643C6.49821 21.9643 2.03571 17.5018 2.03571 12C2.03571 6.49821 6.49821 2.03571 12 2.03571C17.5018 2.03571 21.9643 6.49821 21.9643 12C21.9643 17.5018 17.5018 21.9643 12 21.9643Z",fill:i})]})}},90449:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(85893),i=n(94142);function o(e){let{width:t=24,height:n=24,color:o=i.O9.semanticError}=e;return(0,r.jsxs)("svg",{width:t,height:n,viewBox:"0 0 24 24",fill:"none",className:"chakra-icon",...e,children:[(0,r.jsx)("path",{d:"M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z",stroke:o,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M15 9L9 15",stroke:o,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M9 9L15 15",stroke:o,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}},47679:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(85893);function i(e){let{width:t=12,height:n=12,fill:i}=e;return(0,r.jsxs)("svg",{width:t,height:n,viewBox:"0 0 12 12",fill:"currentColor",className:"chakra-icon",...e,children:[(0,r.jsx)("path",{d:"M6 0C2.68661 0 0 2.68661 0 6C0 9.31339 2.68661 12 6 12C9.31339 12 12 9.31339 12 6C12 2.68661 9.31339 0 6 0ZM6 10.9821C3.24911 10.9821 1.01786 8.75089 1.01786 6C1.01786 3.24911 3.24911 1.01786 6 1.01786C8.75089 1.01786 10.9821 3.24911 10.9821 6C10.9821 8.75089 8.75089 10.9821 6 10.9821Z",fill:i||"#ABC4FF"}),(0,r.jsx)("path",{d:"M5.35693 3.64286C5.35693 3.81335 5.42466 3.97687 5.54522 4.09743C5.66578 4.21799 5.82929 4.28571 5.99979 4.28571C6.17029 4.28571 6.3338 4.21799 6.45436 4.09743C6.57492 3.97687 6.64265 3.81335 6.64265 3.64286C6.64265 3.47236 6.57492 3.30885 6.45436 3.18829C6.3338 3.06773 6.17029 3 5.99979 3C5.82929 3 5.66578 3.06773 5.54522 3.18829C5.42466 3.30885 5.35693 3.47236 5.35693 3.64286ZM6.32122 5.14286H5.67836C5.61943 5.14286 5.57122 5.19107 5.57122 5.25V8.89286C5.57122 8.95179 5.61943 9 5.67836 9H6.32122C6.38015 9 6.42836 8.95179 6.42836 8.89286V5.25C6.42836 5.19107 6.38015 5.14286 6.32122 5.14286Z",fill:i||"#ABC4FF"})]})}},80325:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(85893),i=n(94142);function o(e){let{width:t=24,height:n=24,color:o=i.O9.semanticWarning}=e;return(0,r.jsxs)("svg",{width:t,height:n,viewBox:"0 0 24 24",fill:"none",className:"chakra-icon",...e,children:[(0,r.jsx)("g",{clipPath:"url(#clip0_31142_16880)",children:(0,r.jsxs)("g",{clipPath:"url(#clip1_31142_16880)",children:[(0,r.jsx)("path",{d:"M12 0C5.37321 0 0 5.37321 0 12C0 18.6268 5.37321 24 12 24C18.6268 24 24 18.6268 24 12C24 5.37321 18.6268 0 12 0ZM12 21.9643C6.49821 21.9643 2.03571 17.5018 2.03571 12C2.03571 6.49821 6.49821 2.03571 12 2.03571C17.5018 2.03571 21.9643 6.49821 21.9643 12C21.9643 17.5018 17.5018 21.9643 12 21.9643Z",fill:o}),(0,r.jsx)("path",{d:"M10.7139 16.7143C10.7139 17.0553 10.8493 17.3823 11.0904 17.6234C11.3316 17.8645 11.6586 18 11.9996 18C12.3406 18 12.6676 17.8645 12.9087 17.6234C13.1498 17.3823 13.2853 17.0553 13.2853 16.7143C13.2853 16.3733 13.1498 16.0463 12.9087 15.8052C12.6676 15.564 12.3406 15.4286 11.9996 15.4286C11.6586 15.4286 11.3316 15.564 11.0904 15.8052C10.8493 16.0463 10.7139 16.3733 10.7139 16.7143ZM11.3567 13.7143H12.6424C12.7603 13.7143 12.8567 13.6179 12.8567 13.5V6.21429C12.8567 6.09643 12.7603 6 12.6424 6H11.3567C11.2389 6 11.1424 6.09643 11.1424 6.21429V13.5C11.1424 13.6179 11.2389 13.7143 11.3567 13.7143Z",fill:o})]})}),(0,r.jsxs)("defs",{children:[(0,r.jsx)("clipPath",{id:"clip0_31142_16880",children:(0,r.jsx)("rect",{width:"24",height:"24",fill:"white"})}),(0,r.jsx)("clipPath",{id:"clip1_31142_16880",children:(0,r.jsx)("rect",{width:"24",height:"24",fill:"white"})})]})]})}},16605:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(85893);function i(e){let{width:t=20,height:n=20}=e;return(0,r.jsx)("svg",{width:t,height:n,viewBox:"0 0 12 12",fill:"currentColor",className:"chakra-icon",...e,children:(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.219668 10.7197C-0.0732226 11.0126 -0.0732226 11.4875 0.219668 11.7803C0.512566 12.0732 0.987436 12.0732 1.28033 11.7803L6.00001 7.06066L10.7197 11.7803C11.0126 12.0732 11.4875 12.0732 11.7803 11.7803C12.0732 11.4875 12.0732 11.0126 11.7803 10.7197L7.06066 6.00001L11.7803 1.28033C12.0732 0.987436 12.0732 0.512566 11.7803 0.219668C11.4875 -0.0732226 11.0126 -0.0732226 10.7197 0.219668L6.00001 4.93936L1.28033 0.219668C0.987436 -0.0732226 0.512566 -0.0732226 0.219668 0.219668C-0.0732226 0.512566 -0.0732226 0.987436 0.219668 1.28033L4.93936 6.00001L0.219668 10.7197Z",fill:"currentColor"})})}},35154:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(85893),i=n(94142);function o(e){let{width:t=14,height:n=14,color:o=i.O9.secondary}=e;return(0,r.jsxs)("svg",{width:t,height:n,viewBox:"0 0 14 14",fill:"none",stroke:o,strokeWidth:"1.16667",strokeLinecap:"round",strokeLinejoin:"round",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("path",{d:"M10.5 7.58333V11.0833C10.5 11.3928 10.3771 11.6895 10.1583 11.9083C9.9395 12.1271 9.64275 12.25 9.33333 12.25H2.91667C2.60725 12.25 2.3105 12.1271 2.09171 11.9083C1.87292 11.6895 1.75 11.3928 1.75 11.0833V4.66667C1.75 4.35725 1.87292 4.0605 2.09171 3.84171C2.3105 3.62292 2.60725 3.5 2.91667 3.5H6.41667"}),(0,r.jsx)("path",{d:"M8.75 1.75H12.25V5.25"}),(0,r.jsx)("path",{d:"M5.83203 8.16667L12.2487 1.75"})]})}},9212:function(e,t,n){"use strict";n.r(t);var r=n(85893),i=n(47041),o=n(7544),a=n.n(o),s=n(9008),u=n.n(s),l=n(5152),c=n.n(l),d=n(11163),p=n(67294),f=n(56139),h=n(51204),m=n(6093);n(37123),n(8107),n(38758),n(14690),n(11021);var g=n(19692),y=n(12562),b=n(15061);let _=c()(()=>Promise.all([n.e(6945),n.e(8860),n.e(6374)]).then(n.bind(n,36833)).then(e=>e.Providers),{loadableGenerated:{webpack:()=>[36833]}}),v=c()(()=>Promise.all([n.e(3715),n.e(5733),n.e(1903),n.e(4934),n.e(3369),n.e(6173),n.e(5043)]).then(n.bind(n,84090)),{loadableGenerated:{webpack:()=>[84090]}}),w=c()(()=>Promise.all([n.e(6685),n.e(6945),n.e(8923),n.e(9172),n.e(4830),n.e(3715),n.e(5733),n.e(1903),n.e(6496),n.e(6849),n.e(5207),n.e(2731),n.e(5227),n.e(3189),n.e(4934),n.e(3369),n.e(6173),n.e(9017)]).then(n.bind(n,69017)),{loadableGenerated:{webpack:()=>[69017]},ssr:!1}),k=["/","404","/moonpay"],x=["/liquidity-pools"];f.Z.set({precision:1e3});let A=e=>{let{Component:t,pageProps:n,...i}=e,{pathname:o,query:a,isReady:s}=(0,d.useRouter)(),l=(0,b.qr)(e=>e.address);(0,p.useEffect)(()=>{if(s&&a.referCode&&"string"==typeof a.referCode){let e=a.referCode;l?(0,y.TM)(l,e):(0,y.WA)(e)}},[s,a,l]);let[c,f]=(0,p.useMemo)(()=>[k.includes(o),x.includes(o)],[o]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(g.GoogleAnalytics,{gaId:"G-SEFEVDZL2D"}),(0,r.jsxs)(u(),{children:[(0,r.jsx)("meta",{name:"viewport",content:"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"}),(0,r.jsx)("meta",{name:"twitter:image",content:"https://sailor.finance/logo.png"}),(0,r.jsx)("meta",{name:"twitter:card",content:"summary_large_image"}),(0,r.jsx)("meta",{name:"twitter:site",content:"@SailorFi"}),(0,r.jsx)("meta",{name:"twitter:creator",content:"@SailorFi"}),(0,r.jsx)("meta",{name:"twitter:title",content:"Sailor"}),(0,r.jsx)("meta",{name:"twitter:description",content:"An on-chain AMM powering the evolution of DeFi on Sei "}),(0,r.jsx)("meta",{property:"og:description",content:"An on-chain AMM powering the evolution of DeFi on Sei "}),(0,r.jsx)("meta",{property:"og:url",content:"https://sailor.finance"}),(0,r.jsx)("meta",{property:"og:type",content:"website"}),(0,r.jsx)("meta",{property:"og:image",content:"https://sailor.finance/logo.png"}),(0,r.jsx)("meta",{property:"og:image:alt",content:"Sailor"}),(0,r.jsx)("meta",{property:"og:locale",content:"en"}),(0,r.jsx)("meta",{property:"og:site_name",content:"Sailor"}),(0,r.jsx)("meta",{property:"og:title",content:"Swap | Sailor"}),(0,r.jsx)("title",{children:(null==n?void 0:n.title)?"".concat(n.title," Sailor"):"Sailor"})]}),(0,r.jsx)(_,{children:(0,r.jsx)(v,{...i,children:c?(0,r.jsx)(t,{...n}):(0,r.jsx)(w,{overflowHidden:f,children:(0,r.jsx)(t,{...n})})})})]})};A.getInitialProps=async e=>{if((0,m.C5)())return{};try{let t=await a().getInitialProps(e),n=(0,i.getCookie)("i18nextLng",{req:e.ctx.req,res:e.ctx.res});return n=n||"en",h.ZP.changeLanguage(n),t}catch(e){return{}}},t.default=A},92128:function(e,t,n){"use strict";let r;n.d(t,{v:function(){return Y}});var i=n(43450);let o=e=>(t,n,r)=>{let i=r.subscribe;r.subscribe=(e,t,n)=>{let o=e;if(t){let i=(null==n?void 0:n.equalityFn)||Object.is,a=e(r.getState());o=n=>{let r=e(n);if(!i(a,r)){let e=a;t(a=r,e)}},(null==n?void 0:n.fireImmediately)&&t(a,a)}return i(o)};let o=e(t,n,r);return o},a=e=>t=>{try{let n=e(t);if(n instanceof Promise)return n;return{then:e=>a(e)(n),catch(e){return this}}}catch(e){return{then(e){return this},catch:t=>a(t)(e)}}},s=(e,t)=>(n,r,i)=>{let o,s={storage:function(e,t){let n;try{n=e()}catch(e){return}return{getItem:e=>{var r;let i=e=>null===e?null:JSON.parse(e,null==t?void 0:t.reviver),o=null!=(r=n.getItem(e))?r:null;return o instanceof Promise?o.then(i):i(o)},setItem:(e,r)=>n.setItem(e,JSON.stringify(r,null==t?void 0:t.replacer)),removeItem:e=>n.removeItem(e)}}(()=>localStorage),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},u=!1,l=new Set,c=new Set,d=s.storage;if(!d)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),n(...e)},r,i);let p=()=>{let e=s.partialize({...r()});return d.setItem(s.name,{state:e,version:s.version})},f=i.setState;i.setState=(e,t)=>{f(e,t),p()};let h=e((...e)=>{n(...e),p()},r,i);i.getInitialState=()=>h;let m=()=>{var e,t;if(!d)return;u=!1,l.forEach(e=>{var t;return e(null!=(t=r())?t:h)});let i=(null==(t=s.onRehydrateStorage)?void 0:t.call(s,null!=(e=r())?e:h))||void 0;return a(d.getItem.bind(d))(s.name).then(e=>{if(e){if("number"!=typeof e.version||e.version===s.version)return[!1,e.state];if(s.migrate)return[!0,s.migrate(e.state,e.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}return[!1,void 0]}).then(e=>{var t;let[i,a]=e;if(n(o=s.merge(a,null!=(t=r())?t:h),!0),i)return p()}).then(()=>{null==i||i(o,void 0),o=r(),u=!0,c.forEach(e=>e(o))}).catch(e=>{null==i||i(void 0,e)})};return i.persist={setOptions:e=>{s={...s,...e},e.storage&&(d=e.storage)},clearStorage:()=>{null==d||d.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>m(),hasHydrated:()=>u,onHydrate:e=>(l.add(e),()=>{l.delete(e)}),onFinishHydration:e=>(c.add(e),()=>{c.delete(e)})},s.skipHydration||m(),o||h},u=e=>{let t;let n=new Set,r=(e,r)=>{let i="function"==typeof e?e(t):e;if(!Object.is(i,t)){let e=t;t=(null!=r?r:"object"!=typeof i||null===i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,o=e=>(n.add(e),()=>n.delete(e)),a={setState:r,getState:i,getInitialState:()=>s,subscribe:o},s=t=e(r,i,a);return a},l=e=>e?u(e):u;var c=n(24883),d=n(66491);function p(e,{errorInstance:t=Error("timed out"),timeout:n,signal:r}){return new Promise((i,o)=>{(async()=>{let a;try{let s=new AbortController;n>0&&(a=setTimeout(()=>{r?s.abort():o(t)},n)),i(await e({signal:s?.signal||null}))}catch(e){e?.name==="AbortError"&&o(t),o(e)}finally{clearTimeout(a)}})()})}var f=n(73984),h=n(26704),m=n(31800),g=n(28095);function y(e={}){let t,n,r,i;let{shimDisconnect:o=!0,unstable_shimAsyncInject:a}=e;function s(){let t=e.target;if("function"==typeof t){let e=t();if(e)return e}return"object"==typeof t?t:"string"==typeof t?{...b[t]??{id:t,name:`${t[0].toUpperCase()}${t.slice(1)}`,provider:`is${t[0].toUpperCase()}${t.slice(1)}`}}:{id:"injected",name:"Injected",provider:e=>e?.ethereum}}return u=>({get icon(){return s().icon},get id(){return s().id},get name(){return s().name},get supportsSimulation(){return!0},type:y.type,async setup(){let n=await this.getProvider();n?.on&&e.target&&(r||(r=this.onConnect.bind(this),n.on("connect",r)),t||(t=this.onAccountsChanged.bind(this),n.on("accountsChanged",t)))},async connect({chainId:a,isReconnecting:s}={}){let l=await this.getProvider();if(!l)throw new g.M;let p=[];if(s)p=await this.getAccounts().catch(()=>[]);else if(o)try{let e=await l.request({method:"wallet_requestPermissions",params:[{eth_accounts:{}}]});if((p=e[0]?.caveats?.[0]?.value?.map(e=>(0,c.K)(e))).length>0){let e=await this.getAccounts();p=e}}catch(e){if(e.code===d.ab.code)throw new d.ab(e);if(e.code===d.pT.code)throw e}try{if(!p?.length&&!s){let e=await l.request({method:"eth_requestAccounts"});p=e.map(e=>(0,c.K)(e))}r&&(l.removeListener("connect",r),r=void 0),t||(t=this.onAccountsChanged.bind(this),l.on("accountsChanged",t)),n||(n=this.onChainChanged.bind(this),l.on("chainChanged",n)),i||(i=this.onDisconnect.bind(this),l.on("disconnect",i));let f=await this.getChainId();if(a&&f!==a){let e=await this.switchChain({chainId:a}).catch(e=>{if(e.code===d.ab.code)throw e;return{id:f}});f=e?.id??f}return o&&await u.storage?.removeItem(`${this.id}.disconnected`),e.target||await u.storage?.setItem("injected.connected",!0),{accounts:p,chainId:f}}catch(e){if(e.code===d.ab.code)throw new d.ab(e);if(e.code===d.pT.code)throw new d.pT(e);throw e}},async disconnect(){let t=await this.getProvider();if(!t)throw new g.M;n&&(t.removeListener("chainChanged",n),n=void 0),i&&(t.removeListener("disconnect",i),i=void 0),r||(r=this.onConnect.bind(this),t.on("connect",r));try{await p(()=>t.request({method:"wallet_revokePermissions",params:[{eth_accounts:{}}]}),{timeout:100})}catch{}o&&await u.storage?.setItem(`${this.id}.disconnected`,!0),e.target||await u.storage?.removeItem("injected.connected")},async getAccounts(){let e=await this.getProvider();if(!e)throw new g.M;let t=await e.request({method:"eth_accounts"});return t.map(e=>(0,c.K)(e))},async getChainId(){let e=await this.getProvider();if(!e)throw new g.M;let t=await e.request({method:"eth_chainId"});return Number(t)},async getProvider(){let e;if("undefined"==typeof window)return;let t=s();return(e="function"==typeof t.provider?t.provider(window):"string"==typeof t.provider?_(window,t.provider):t.provider)&&!e.removeListener&&("off"in e&&"function"==typeof e.off?e.removeListener=e.off:e.removeListener=()=>{}),e},async isAuthorized(){try{let t=o&&await u.storage?.getItem(`${this.id}.disconnected`);if(t)return!1;if(!e.target){let e=await u.storage?.getItem("injected.connected");if(!e)return!1}let n=await this.getProvider();if(!n){if(void 0!==a&&!1!==a){let e=async()=>{"undefined"!=typeof window&&window.removeEventListener("ethereum#initialized",e);let t=await this.getProvider();return!!t},t="number"==typeof a?a:1e3,n=await Promise.race([..."undefined"!=typeof window?[new Promise(t=>window.addEventListener("ethereum#initialized",()=>t(e()),{once:!0}))]:[],new Promise(n=>setTimeout(()=>n(e()),t))]);if(n)return!0}throw new g.M}let r=await (0,f.J)(()=>this.getAccounts());return!!r.length}catch{return!1}},async switchChain({addEthereumChainParameter:e,chainId:t}){let n=await this.getProvider();if(!n)throw new g.M;let r=u.chains.find(e=>e.id===t);if(!r)throw new d.x3(new m.X4);let i=new Promise(e=>{let n=r=>{"chainId"in r&&r.chainId===t&&(u.emitter.off("change",n),e())};u.emitter.on("change",n)});try{return await Promise.all([n.request({method:"wallet_switchEthereumChain",params:[{chainId:(0,h.eC)(t)}]}).then(async()=>{let e=await this.getChainId();e===t&&u.emitter.emit("change",{chainId:t})}),i]),r}catch(o){if(4902===o.code||o?.data?.originalError?.code===4902)try{let o,a;let{default:s,...l}=r.blockExplorers??{};e?.blockExplorerUrls?o=e.blockExplorerUrls:s&&(o=[s.url,...Object.values(l).map(e=>e.url)]),a=e?.rpcUrls?.length?e.rpcUrls:[r.rpcUrls.default?.http[0]??""];let c={blockExplorerUrls:o,chainId:(0,h.eC)(t),chainName:e?.chainName??r.name,iconUrls:e?.iconUrls,nativeCurrency:e?.nativeCurrency??r.nativeCurrency,rpcUrls:a};return await Promise.all([n.request({method:"wallet_addEthereumChain",params:[c]}).then(async()=>{let e=await this.getChainId();if(e===t)u.emitter.emit("change",{chainId:t});else throw new d.ab(Error("User rejected switch after adding network."))}),i]),r}catch(e){throw new d.ab(e)}if(o.code===d.ab.code)throw new d.ab(o);throw new d.x3(o)}},async onAccountsChanged(e){if(0===e.length)this.onDisconnect();else if(u.emitter.listenerCount("connect")){let e=(await this.getChainId()).toString();this.onConnect({chainId:e}),o&&await u.storage?.removeItem(`${this.id}.disconnected`)}else u.emitter.emit("change",{accounts:e.map(e=>(0,c.K)(e))})},onChainChanged(e){let t=Number(e);u.emitter.emit("change",{chainId:t})},async onConnect(e){let o=await this.getAccounts();if(0===o.length)return;let a=Number(e.chainId);u.emitter.emit("connect",{accounts:o,chainId:a});let s=await this.getProvider();s&&(r&&(s.removeListener("connect",r),r=void 0),t||(t=this.onAccountsChanged.bind(this),s.on("accountsChanged",t)),n||(n=this.onChainChanged.bind(this),s.on("chainChanged",n)),i||(i=this.onDisconnect.bind(this),s.on("disconnect",i)))},async onDisconnect(e){let t=await this.getProvider();e&&1013===e.code&&t&&(await this.getAccounts()).length||(u.emitter.emit("disconnect"),t&&(n&&(t.removeListener("chainChanged",n),n=void 0),i&&(t.removeListener("disconnect",i),i=void 0),r||(r=this.onConnect.bind(this),t.on("connect",r))))}})}y.type="injected";let b={coinbaseWallet:{id:"coinbaseWallet",name:"Coinbase Wallet",provider:e=>e?.coinbaseWalletExtension?e.coinbaseWalletExtension:_(e,"isCoinbaseWallet")},metaMask:{id:"metaMask",name:"MetaMask",provider:e=>_(e,e=>{if(!e.isMetaMask||e.isBraveWallet&&!e._events&&!e._state)return!1;for(let t of["isApexWallet","isAvalanche","isBitKeep","isBlockWallet","isKuCoinWallet","isMathWallet","isOkxWallet","isOKExWallet","isOneInchIOSWallet","isOneInchAndroidWallet","isOpera","isPhantom","isPortal","isRabby","isTokenPocket","isTokenary","isUniswapWallet","isZerion"])if(e[t])return!1;return!0})},phantom:{id:"phantom",name:"Phantom",provider:e=>e?.phantom?.ethereum?e.phantom?.ethereum:_(e,"isPhantom")}};function _(e,t){function n(e){return"function"==typeof t?t(e):"string"!=typeof t||e[t]}let r=e.ethereum;return r?.providers?r.providers.find(e=>n(e)):r&&n(r)?r:void 0}var v=n(64714);class w{constructor(e){Object.defineProperty(this,"uid",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"_emitter",{enumerable:!0,configurable:!0,writable:!0,value:new v.v})}on(e,t){this._emitter.on(e,t)}once(e,t){this._emitter.once(e,t)}off(e,t){this._emitter.off(e,t)}emit(e,...t){let n=t[0];this._emitter.emit(e,{uid:this.uid,...n})}listenerCount(e){return this._emitter.listenerCount(e)}}function k(e,t){return JSON.parse(e,(e,n)=>{let r=n;return r?.__type==="bigint"&&(r=BigInt(r.value)),r?.__type==="Map"&&(r=new Map(r.value)),t?.(e,r)??r})}function x(e,t){return e.slice(0,t).join(".")||"."}function A(e,t){let{length:n}=e;for(let r=0;r{let r=n;return"bigint"==typeof r&&(r={__type:"bigint",value:n.toString()}),r instanceof Map&&(r={__type:"Map",value:Array.from(n.entries())}),t?.(e,r)??r},r),n??void 0)}function I(e){let{deserialize:t=k,key:n="wagmi",serialize:r=S,storage:i=T}=e;function o(e){return e instanceof Promise?e.then(e=>e).catch(()=>null):e}return{...i,key:n,async getItem(e,r){let a=i.getItem(`${n}.${e}`),s=await o(a);return s?t(s)??null:r??null},async setItem(e,t){let a=`${n}.${e}`;null===t?await o(i.removeItem(a)):await o(i.setItem(a,r(t)))},async removeItem(e){await o(i.removeItem(`${n}.${e}`))}}}let T={getItem:()=>null,setItem:()=>{},removeItem:()=>{}},E=256;var P=n(36922),C=n(76929),O=n(76382);class B extends O.G{constructor(){super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.",{docsPath:"/docs/clients/intro",name:"UrlRequiredError"})}}var M=n(27525),R=n(91159);let L={current:0,take(){return this.current++},reset(){this.current=0}};var N=n(87514);function D(e,t={}){let{batch:n,fetchOptions:r,key:i="http",name:o="HTTP JSON-RPC",onFetchRequest:a,onFetchResponse:s,retryDelay:u}=t;return({chain:l,retryCount:c,timeout:d})=>{let{batchSize:f=1e3,wait:h=0}="object"==typeof n?n:{},m=t.retryCount??c,g=d??t.timeout??1e4,y=e||l?.rpcUrls.default.http[0];if(!y)throw new B;let b=function(e,t={}){return{async request(n){let{body:r,onRequest:i=t.onRequest,onResponse:o=t.onResponse,timeout:a=t.timeout??1e4}=n,s={...t.fetchOptions??{},...n.fetchOptions??{}},{headers:u,method:l,signal:c}=s;try{let t;let n=await p(async({signal:t})=>{let n={...s,body:Array.isArray(r)?(0,R.P)(r.map(e=>({jsonrpc:"2.0",id:e.id??L.take(),...e}))):(0,R.P)({jsonrpc:"2.0",id:r.id??L.take(),...r}),headers:{"Content-Type":"application/json",...u},method:l||"POST",signal:c||(a>0?t:null)},o=new Request(e,n),d=await i?.(o,n)??{...n,url:e},p=await fetch(d.url??e,d);return p},{errorInstance:new C.W5({body:r,url:e}),timeout:a,signal:!0});if(o&&await o(n),n.headers.get("Content-Type")?.startsWith("application/json"))t=await n.json();else{t=await n.text();try{t=JSON.parse(t||"{}")}catch(e){if(n.ok)throw e;t={error:t}}}if(!n.ok)throw new C.Gg({body:r,details:(0,R.P)(t.error)||n.statusText,headers:n.headers,status:n.status,url:e});return t}catch(t){if(t instanceof C.Gg||t instanceof C.W5)throw t;throw new C.Gg({body:r,cause:t,url:e})}}}}(y,{fetchOptions:r,onRequest:a,onResponse:s,timeout:g});return(0,N.q)({key:i,name:o,async request({method:e,params:t}){let r={method:e,params:t},{schedule:i}=(0,M.S)({id:y,wait:h,shouldSplitBatch:e=>e.length>f,fn:e=>b.request({body:e}),sort:(e,t)=>e.id-t.id}),o=async e=>n?i(e):[await b.request({body:e})],[{error:a,result:s}]=await o(r);if(a)throw new C.bs({body:r,error:a,url:y});return s},retryCount:m,retryDelay:u,timeout:g,type:"http"},{fetchOptions:r,url:y})}}var F=n(18053);let q=(0,F.a)({id:1328,name:"Sei Testnet",nativeCurrency:{name:"Sei",symbol:"SEI",decimals:18},rpcUrls:{default:{http:["https://evm-rpc-testnet.sei-apis.com"],webSocket:["wss://evm-ws-testnet.sei-apis.com"]}},blockExplorers:{default:{name:"Seitrace",url:"https://seitrace.com"}},testnet:!0});var j=n(53116),U=n(93073),z=n(41070);function V(e){let{chain:t}=e,n=t.rpcUrls.default.http[0];if(!e.transports)return[n];let r=e.transports?.[t.id]?.({chain:t}),i=r?.value?.transports||[r];return i.map(({value:e})=>e?.url||n)}function W(e){let t,r,i,o,a,s,u,l;let p=e.isNewChainsStale??!0;return f=>({id:"walletConnect",name:"WalletConnect",type:W.type,async setup(){let e=await this.getProvider().catch(()=>null);e&&(a||(a=this.onConnect.bind(this),e.on("connect",a)),u||(u=this.onSessionDelete.bind(this),e.on("session_delete",u)))},async connect({chainId:e,...t}={}){try{let n=await this.getProvider();if(!n)throw new g.M;s||(s=this.onDisplayUri,n.on("display_uri",s));let r=e;if(!r){let e=await f.storage?.getItem("state")??{},t=f.chains.some(t=>t.id===e.chainId);r=t?e.chainId:f.chains[0]?.id}if(!r)throw Error("No chains found on connector.");let d=await this.isChainsStale();if(n.session&&d&&await n.disconnect(),!n.session||d){let e=f.chains.filter(e=>e.id!==r).map(e=>e.id);await n.connect({optionalChains:[r,...e],..."pairingTopic"in t?{pairingTopic:t.pairingTopic}:{}}),this.setRequestedChainsIds(f.chains.map(e=>e.id))}let p=(await n.enable()).map(e=>(0,c.K)(e)),h=await this.getChainId();return s&&(n.removeListener("display_uri",s),s=void 0),a&&(n.removeListener("connect",a),a=void 0),i||(i=this.onAccountsChanged.bind(this),n.on("accountsChanged",i)),o||(o=this.onChainChanged.bind(this),n.on("chainChanged",o)),l||(l=this.onDisconnect.bind(this),n.on("disconnect",l)),u||(u=this.onSessionDelete.bind(this),n.on("session_delete",u)),{accounts:p,chainId:h}}catch(e){if(/(user rejected|connection request reset)/i.test(e?.message))throw new d.ab(e);throw e}},async disconnect(){let e=await this.getProvider();try{await e?.disconnect()}catch(e){if(!/No matching key/i.test(e.message))throw e}finally{o&&(e?.removeListener("chainChanged",o),o=void 0),l&&(e?.removeListener("disconnect",l),l=void 0),a||(a=this.onConnect.bind(this),e?.on("connect",a)),i&&(e?.removeListener("accountsChanged",i),i=void 0),u&&(e?.removeListener("session_delete",u),u=void 0),this.setRequestedChainsIds([])}},async getAccounts(){let e=await this.getProvider();return e.accounts.map(e=>(0,c.K)(e))},async getProvider({chainId:i}={}){async function o(){let t=f.chains.map(e=>e.id);if(!t.length)return;let{EthereumProvider:r}=await Promise.all([n.e(3715),n.e(5913),n.e(2400),n.e(9214)]).then(n.bind(n,22400));return await r.init({...e,disableProviderPing:!0,optionalChains:t,projectId:e.projectId,rpcMap:Object.fromEntries(f.chains.map(e=>{let[t]=V({chain:e,transports:f.transports});return[e.id,t]})),showQrModal:e.showQrModal??!0})}return t||(r||(r=o()),t=await r,t?.events.setMaxListeners(Number.POSITIVE_INFINITY)),i&&await this.switchChain?.({chainId:i}),t},async getChainId(){let e=await this.getProvider();return e.chainId},async isAuthorized(){try{let[e,t]=await Promise.all([this.getAccounts(),this.getProvider()]);if(!e.length)return!1;let n=await this.isChainsStale();if(n&&t.session)return await t.disconnect().catch(()=>{}),!1;return!0}catch{return!1}},async switchChain({addEthereumChainParameter:e,chainId:t}){let n=await this.getProvider();if(!n)throw new g.M;let r=f.chains.find(e=>e.id===t);if(!r)throw new d.x3(new m.X4);try{await Promise.all([new Promise(e=>{let n=({chainId:r})=>{r===t&&(f.emitter.off("change",n),e())};f.emitter.on("change",n)}),n.request({method:"wallet_switchEthereumChain",params:[{chainId:(0,h.eC)(t)}]})]);let e=await this.getRequestedChainsIds();return this.setRequestedChainsIds([...e,t]),r}catch(i){if(/(user rejected)/i.test(i.message))throw new d.ab(i);try{let i,o;i=e?.blockExplorerUrls?e.blockExplorerUrls:r.blockExplorers?.default.url?[r.blockExplorers?.default.url]:[],o=e?.rpcUrls?.length?e.rpcUrls:[...r.rpcUrls.default.http];let a={blockExplorerUrls:i,chainId:(0,h.eC)(t),chainName:e?.chainName??r.name,iconUrls:e?.iconUrls,nativeCurrency:e?.nativeCurrency??r.nativeCurrency,rpcUrls:o};await n.request({method:"wallet_addEthereumChain",params:[a]});let s=await this.getRequestedChainsIds();return this.setRequestedChainsIds([...s,t]),r}catch(e){throw new d.ab(e)}}},onAccountsChanged(e){0===e.length?this.onDisconnect():f.emitter.emit("change",{accounts:e.map(e=>(0,c.K)(e))})},onChainChanged(e){let t=Number(e);f.emitter.emit("change",{chainId:t})},async onConnect(e){let t=Number(e.chainId),n=await this.getAccounts();f.emitter.emit("connect",{accounts:n,chainId:t})},async onDisconnect(e){this.setRequestedChainsIds([]),f.emitter.emit("disconnect");let t=await this.getProvider();i&&(t.removeListener("accountsChanged",i),i=void 0),o&&(t.removeListener("chainChanged",o),o=void 0),l&&(t.removeListener("disconnect",l),l=void 0),u&&(t.removeListener("session_delete",u),u=void 0),a||(a=this.onConnect.bind(this),t.on("connect",a))},onDisplayUri(e){f.emitter.emit("message",{type:"display_uri",data:e})},onSessionDelete(){this.onDisconnect()},getNamespaceChainsIds(){if(!t)return[];let e=t.session?.namespaces.eip155?.accounts?.map(e=>Number.parseInt(e.split(":")[1]||""));return e??[]},async getRequestedChainsIds(){return await f.storage?.getItem(this.requestedChainsStorageKey)??[]},async isChainsStale(){if(!p)return!1;let e=f.chains.map(e=>e.id),t=this.getNamespaceChainsIds();if(t.length&&!t.some(t=>e.includes(t)))return!1;let n=await this.getRequestedChainsIds();return!e.every(e=>n.includes(e))},async setRequestedChainsIds(e){await f.storage?.setItem(this.requestedChainsStorageKey,e)},get requestedChainsStorageKey(){return`${this.id}.requestedChains`}})}function $(e={}){let t,r,i,o,a,s,u,l,p;return"3"===e.version||e.headlessMode?s=>({id:"coinbaseWalletSDK",name:"Coinbase Wallet",type:$.type,async connect({chainId:e}={}){try{let t=await this.getProvider(),n=(await t.request({method:"eth_requestAccounts"})).map(e=>(0,c.K)(e));i||(i=this.onAccountsChanged.bind(this),t.on("accountsChanged",i)),o||(o=this.onChainChanged.bind(this),t.on("chainChanged",o)),a||(a=this.onDisconnect.bind(this),t.on("disconnect",a));let r=await this.getChainId();if(e&&r!==e){let t=await this.switchChain({chainId:e}).catch(e=>{if(e.code===d.ab.code)throw e;return{id:r}});r=t?.id??r}return{accounts:n,chainId:r}}catch(e){if(/(user closed modal|accounts received is empty|user denied account)/i.test(e.message))throw new d.ab(e);throw e}},async disconnect(){let e=await this.getProvider();i&&(e.removeListener("accountsChanged",i),i=void 0),o&&(e.removeListener("chainChanged",o),o=void 0),a&&(e.removeListener("disconnect",a),a=void 0),e.disconnect(),e.close()},async getAccounts(){let e=await this.getProvider();return(await e.request({method:"eth_accounts"})).map(e=>(0,c.K)(e))},async getChainId(){let e=await this.getProvider(),t=await e.request({method:"eth_chainId"});return Number(t)},async getProvider(){if(!r){let i=await (async()=>{let{default:e}=await Promise.all([n.e(9826),n.e(9635),n.e(4726)]).then(n.bind(n,89635));return"function"!=typeof e&&"function"==typeof e.default?e.default:e})();t=new i({...e,reloadOnDisconnect:!1});let o=t.walletExtension?.getChainId(),a=s.chains.find(t=>e.chainId?t.id===e.chainId:t.id===o)||s.chains[0],u=e.chainId||a?.id,l=e.jsonRpcUrl||a?.rpcUrls.default.http[0];r=t.makeWeb3Provider(l,u)}return r},async isAuthorized(){try{let e=await this.getAccounts();return!!e.length}catch{return!1}},async switchChain({addEthereumChainParameter:e,chainId:t}){let n=s.chains.find(e=>e.id===t);if(!n)throw new d.x3(new m.X4);let r=await this.getProvider();try{return await r.request({method:"wallet_switchEthereumChain",params:[{chainId:(0,h.eC)(n.id)}]}),n}catch(i){if(4902===i.code)try{let i,o;i=e?.blockExplorerUrls?e.blockExplorerUrls:n.blockExplorers?.default.url?[n.blockExplorers?.default.url]:[],o=e?.rpcUrls?.length?e.rpcUrls:[n.rpcUrls.default?.http[0]??""];let a={blockExplorerUrls:i,chainId:(0,h.eC)(t),chainName:e?.chainName??n.name,iconUrls:e?.iconUrls,nativeCurrency:e?.nativeCurrency??n.nativeCurrency,rpcUrls:o};return await r.request({method:"wallet_addEthereumChain",params:[a]}),n}catch(e){throw new d.ab(e)}throw new d.x3(i)}},onAccountsChanged(e){0===e.length?this.onDisconnect():s.emitter.emit("change",{accounts:e.map(e=>(0,c.K)(e))})},onChainChanged(e){let t=Number(e);s.emitter.emit("change",{chainId:t})},async onDisconnect(e){s.emitter.emit("disconnect");let t=await this.getProvider();i&&(t.removeListener("accountsChanged",i),i=void 0),o&&(t.removeListener("chainChanged",o),o=void 0),a&&(t.removeListener("disconnect",a),a=void 0)}}):t=>({id:"coinbaseWalletSDK",name:"Coinbase Wallet",rdns:"com.coinbase.wallet",type:$.type,async connect({chainId:e,...t}={}){try{let n=await this.getProvider(),r=(await n.request({method:"eth_requestAccounts",params:"instantOnboarding"in t&&t.instantOnboarding?[{onboarding:"instant"}]:[]})).map(e=>(0,c.K)(e));u||(u=this.onAccountsChanged.bind(this),n.on("accountsChanged",u)),l||(l=this.onChainChanged.bind(this),n.on("chainChanged",l)),p||(p=this.onDisconnect.bind(this),n.on("disconnect",p));let i=await this.getChainId();if(e&&i!==e){let t=await this.switchChain({chainId:e}).catch(e=>{if(e.code===d.ab.code)throw e;return{id:i}});i=t?.id??i}return{accounts:r,chainId:i}}catch(e){if(/(user closed modal|accounts received is empty|user denied account|request rejected)/i.test(e.message))throw new d.ab(e);throw e}},async disconnect(){let e=await this.getProvider();u&&(e.removeListener("accountsChanged",u),u=void 0),l&&(e.removeListener("chainChanged",l),l=void 0),p&&(e.removeListener("disconnect",p),p=void 0),e.disconnect(),e.close?.()},async getAccounts(){let e=await this.getProvider();return(await e.request({method:"eth_accounts"})).map(e=>(0,c.K)(e))},async getChainId(){let e=await this.getProvider(),t=await e.request({method:"eth_chainId"});return Number(t)},async getProvider(){if(!s){let r="string"==typeof e.preference?{options:e.preference}:{...e.preference,options:e.preference?.options??"all"},{createCoinbaseWalletSDK:i}=await n.e(9825).then(n.bind(n,89825)),o=i({...e,appChainIds:t.chains.map(e=>e.id),preference:r});s=o.getProvider()}return s},async isAuthorized(){try{let e=await this.getAccounts();return!!e.length}catch{return!1}},async switchChain({addEthereumChainParameter:e,chainId:n}){let r=t.chains.find(e=>e.id===n);if(!r)throw new d.x3(new m.X4);let i=await this.getProvider();try{return await i.request({method:"wallet_switchEthereumChain",params:[{chainId:(0,h.eC)(r.id)}]}),r}catch(t){if(4902===t.code)try{let t,o;t=e?.blockExplorerUrls?e.blockExplorerUrls:r.blockExplorers?.default.url?[r.blockExplorers?.default.url]:[],o=e?.rpcUrls?.length?e.rpcUrls:[r.rpcUrls.default?.http[0]??""];let a={blockExplorerUrls:t,chainId:(0,h.eC)(n),chainName:e?.chainName??r.name,iconUrls:e?.iconUrls,nativeCurrency:e?.nativeCurrency??r.nativeCurrency,rpcUrls:o};return await i.request({method:"wallet_addEthereumChain",params:[a]}),r}catch(e){throw new d.ab(e)}throw new d.x3(t)}},onAccountsChanged(e){0===e.length?this.onDisconnect():t.emitter.emit("change",{accounts:e.map(e=>(0,c.K)(e))})},onChainChanged(e){let n=Number(e);t.emitter.emit("change",{chainId:n})},async onDisconnect(e){t.emitter.emit("disconnect");let n=await this.getProvider();u&&(n.removeListener("accountsChanged",u),u=void 0),l&&(n.removeListener("chainChanged",l),l=void 0),p&&(n.removeListener("disconnect",p),p=void 0)}})}W.type="walletConnect",$.type="coinbaseWallet";var K=n(60449);function H(e={}){let t,r,i,o,a,s,u,l;return y=>({id:"metaMaskSDK",name:"MetaMask",rdns:["io.metamask","io.metamask.mobile"],type:H.type,async setup(){let e=await this.getProvider();e?.on&&(s||(s=this.onConnect.bind(this),e.on("connect",s)),o||(o=this.onAccountsChanged.bind(this),e.on("accountsChanged",o)))},async connect({chainId:n,isReconnecting:r}={}){let i=await this.getProvider();u||(u=this.onDisplayUri,i.on("display_uri",u));let p=[];r&&(p=await this.getAccounts().catch(()=>[]));try{let r,f;if(!p?.length){if(e.connectAndSign||e.connectWith)e.connectAndSign?r=await t.connectAndSign({msg:e.connectAndSign}):e.connectWith&&(f=await t.connectWith({method:e.connectWith.method,params:e.connectWith.params})),p=await this.getAccounts();else{let e=await t.connect();p=e.map(e=>(0,c.K)(e))}}let h=await this.getChainId();if(n&&h!==n){let e=await this.switchChain({chainId:n}).catch(e=>{if(e.code===d.ab.code)throw e;return{id:h}});h=e?.id??h}return u&&(i.removeListener("display_uri",u),u=void 0),r?i.emit("connectAndSign",{accounts:p,chainId:h,signResponse:r}):f&&i.emit("connectWith",{accounts:p,chainId:h,connectWithResponse:f}),s&&(i.removeListener("connect",s),s=void 0),o||(o=this.onAccountsChanged.bind(this),i.on("accountsChanged",o)),a||(a=this.onChainChanged.bind(this),i.on("chainChanged",a)),l||(l=this.onDisconnect.bind(this),i.on("disconnect",l)),{accounts:p,chainId:h}}catch(e){if(e.code===d.ab.code)throw new d.ab(e);if(e.code===d.pT.code)throw new d.pT(e);throw e}},async disconnect(){let e=await this.getProvider();a&&(e.removeListener("chainChanged",a),a=void 0),l&&(e.removeListener("disconnect",l),l=void 0),s||(s=this.onConnect.bind(this),e.on("connect",s)),await t.terminate()},async getAccounts(){let e=await this.getProvider(),t=await e.request({method:"eth_accounts"});return t.map(e=>(0,c.K)(e))},async getChainId(){let e=await this.getProvider(),t=e.getChainId()||await e?.request({method:"eth_chainId"});return Number(t)},async getProvider(){async function o(){let r=await (async()=>{let{default:e}=await Promise.all([n.e(5310),n.e(5729)]).then(n.bind(n,47972));return"function"!=typeof e&&"function"==typeof e.default?e.default:e})(),i={};for(let e of y.chains)i[(0,h.eC)(e.id)]=V({chain:e,transports:y.transports})?.[0];t=new r({_source:"wagmi",forceDeleteProvider:!1,forceInjectProvider:!1,injectProvider:!1,...e,readonlyRPCMap:i,dappMetadata:{...e.dappMetadata,name:e.dappMetadata?.name?e.dappMetadata?.name:"wagmi",url:e.dappMetadata?.url?e.dappMetadata?.url:"undefined"!=typeof window?window.location.origin:"https://wagmi.sh"},useDeeplink:e.useDeeplink??!0});let o=await t.init(),a=o?.activeProvider?o.activeProvider:t.getProvider();if(!a)throw new g.M;return a}return r||(i||(i=o()),r=await i),r},async isAuthorized(){try{let e=await (0,f.J)(()=>p(()=>this.getAccounts(),{timeout:200}),{delay:201,retryCount:3});return!!e.length}catch{return!1}},async switchChain({addEthereumChainParameter:e,chainId:t}){let n=await this.getProvider(),r=y.chains.find(e=>e.id===t);if(!r)throw new d.x3(new m.X4);try{return await n.request({method:"wallet_switchEthereumChain",params:[{chainId:(0,h.eC)(t)}]}),await i(),await o(t),r}catch(a){if(a.code===d.ab.code)throw new d.ab(a);if(4902===a.code||a?.data?.originalError?.code===4902)try{return await n.request({method:"wallet_addEthereumChain",params:[{blockExplorerUrls:(()=>{let{default:t,...n}=r.blockExplorers??{};return e?.blockExplorerUrls?e.blockExplorerUrls:t?[t.url,...Object.values(n).map(e=>e.url)]:void 0})(),chainId:(0,h.eC)(t),chainName:e?.chainName??r.name,iconUrls:e?.iconUrls,nativeCurrency:e?.nativeCurrency??r.nativeCurrency,rpcUrls:e?.rpcUrls?.length?e.rpcUrls:[r.rpcUrls.default?.http[0]??""]}]}),await i(),await o(t),r}catch(e){if(e.code===d.ab.code)throw new d.ab(e);throw new d.x3(e)}throw new d.x3(a)}async function i(){await (0,f.J)(async()=>{let e=(0,K.ly)(await n.request({method:"eth_chainId"}));if(e!==t)throw Error("User rejected switch after adding network.");return e},{delay:50,retryCount:20})}async function o(e){await new Promise(t=>{let n=r=>{"chainId"in r&&r.chainId===e&&(y.emitter.off("change",n),t())};y.emitter.on("change",n),y.emitter.emit("change",{chainId:e})})}},async onAccountsChanged(e){if(0===e.length)t.isExtensionActive()&&this.onDisconnect();else if(y.emitter.listenerCount("connect")){let e=(await this.getChainId()).toString();this.onConnect({chainId:e})}else y.emitter.emit("change",{accounts:e.map(e=>(0,c.K)(e))})},onChainChanged(e){let t=Number(e);y.emitter.emit("change",{chainId:t})},async onConnect(e){let t=await this.getAccounts();if(0===t.length)return;let n=Number(e.chainId);y.emitter.emit("connect",{accounts:t,chainId:n});let r=await this.getProvider();s&&(r.removeListener("connect",s),s=void 0),o||(o=this.onAccountsChanged.bind(this),r.on("accountsChanged",o)),a||(a=this.onChainChanged.bind(this),r.on("chainChanged",a)),l||(l=this.onDisconnect.bind(this),r.on("disconnect",l))},async onDisconnect(e){let t=await this.getProvider();e&&1013===e.code&&t&&(await this.getAccounts()).length||(y.emitter.emit("disconnect"),a&&(t.removeListener("chainChanged",a),a=void 0),l&&(t.removeListener("disconnect",l),l=void 0),s||(s=this.onConnect.bind(this),t.on("connect",s)))},onDisplayUri(e){y.emitter.emit("message",{type:"display_uri",data:e})}})}H.type="metaMask";var G=n(6093);let Z=e=>/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(e.userAgent),Y=function(e){let t;let{multiInjectedProviderDiscovery:n=!0,storage:a=I({storage:function(){let e="undefined"!=typeof window&&window.localStorage?window.localStorage:T;return{getItem:t=>e.getItem(t),removeItem(t){e.removeItem(t)},setItem(t,n){try{e.setItem(t,n)}catch{}}}}()}),syncConnectedChain:u=!0,ssr:c=!1,...d}=e,p="undefined"!=typeof window&&n?function(){let e=new Set,t=[],n=()=>(function(e){if("undefined"==typeof window)return;let t=t=>e(t.detail);return window.addEventListener("eip6963:announceProvider",t),window.dispatchEvent(new CustomEvent("eip6963:requestProvider")),()=>window.removeEventListener("eip6963:announceProvider",t)})(n=>{t.some(({info:e})=>e.uuid===n.info.uuid)||(t=[...t,n],e.forEach(e=>e(t,{added:[n]})))}),r=n();return{_listeners:()=>e,clear(){e.forEach(e=>e([],{removed:[...t]})),t=[]},destroy(){this.clear(),e.clear(),r?.()},findProvider:({rdns:e})=>t.find(t=>t.info.rdns===e),getProviders:()=>t,reset(){this.clear(),r?.(),r=n()},subscribe:(n,{emitImmediately:r}={})=>(e.add(n),r&&n(t,{added:t}),()=>e.delete(n))}}():void 0,f=l(()=>d.chains),h=l(()=>{let e=[],t=new Set;for(let n of d.connectors??[]){let r=g(n);if(e.push(r),!c&&r.rdns){let e="string"==typeof r.rdns?[r.rdns]:r.rdns;for(let n of e)t.add(n)}}if(!c&&p){let n=p.getProviders();for(let r of n)t.has(r.info.rdns)||e.push(g(b(r)))}return e});function g(e){var t;let n=(t=function(e=11){if(!r||E+e>512){r="",E=0;for(let e=0;e<256;e++)r+=(256+256*Math.random()|0).toString(16).substring(1)}return r.substring(E,E+++e)}(),new w(t)),i={...e({emitter:n,chains:f.getState(),storage:a,transports:d.transports}),emitter:n,uid:n.uid};return n.on("connect",C),i.setup?.(),i}function b(e){let{info:t}=e,n=e.provider;return y({target:{...t,id:t.rdns,provider:n}})}let _=new Map;function v(){return{chainId:f.getState()[0].id,connections:new Map,current:null,status:"disconnected"}}let k="0.0.0-canary-";t=P.i.startsWith(k)?Number.parseInt(P.i.replace(k,"")):Number.parseInt(P.i.split(".")[0]??"0");let x=l(o(a?s(v,{migrate(e,n){if(n===t)return e;let r=v(),i=A(e,r.chainId);return{...r,chainId:i}},name:"store",partialize:e=>({connections:{__type:"Map",value:Array.from(e.connections.entries()).map(([e,t])=>{let{id:n,name:r,type:i,uid:o}=t.connector;return[e,{...t,connector:{id:n,name:r,type:i,uid:o}}]})},chainId:e.chainId,current:e.current}),merge(e,t){"object"==typeof e&&e&&"status"in e&&delete e.status;let n=A(e,t.chainId);return{...t,...e,chainId:n}},skipHydration:c,storage:a,version:t}):v));function A(e,t){return e&&"object"==typeof e&&"chainId"in e&&"number"==typeof e.chainId&&f.getState().some(t=>t.id===e.chainId)?e.chainId:t}function S(e){x.setState(t=>{let n=t.connections.get(e.uid);return n?{...t,connections:new Map(t.connections).set(e.uid,{accounts:e.accounts??n.accounts,chainId:e.chainId??n.chainId,connector:n.connector})}:t})}function C(e){"connecting"!==x.getState().status&&"reconnecting"!==x.getState().status&&x.setState(t=>{let n=h.getState().find(t=>t.uid===e.uid);return n?(n.emitter.listenerCount("connect")&&n.emitter.off("connect",S),n.emitter.listenerCount("change")||n.emitter.on("change",S),n.emitter.listenerCount("disconnect")||n.emitter.on("disconnect",O),{...t,connections:new Map(t.connections).set(e.uid,{accounts:e.accounts,chainId:e.chainId,connector:n}),current:e.uid,status:"connected"}):t})}function O(e){x.setState(t=>{let n=t.connections.get(e.uid);if(n){let e=n.connector;e.emitter.listenerCount("change")&&n.connector.emitter.off("change",S),e.emitter.listenerCount("disconnect")&&n.connector.emitter.off("disconnect",O),e.emitter.listenerCount("connect")||n.connector.emitter.on("connect",C)}if(t.connections.delete(e.uid),0===t.connections.size)return{...t,connections:new Map,current:null,status:"disconnected"};let r=t.connections.values().next().value;return{...t,connections:new Map(t.connections),current:r.connector.uid}})}return x.setState(v()),u&&x.subscribe(({connections:e,current:t})=>t?e.get(t)?.chainId:void 0,e=>{let t=f.getState().some(t=>t.id===e);if(t)return x.setState(t=>({...t,chainId:e??t.chainId}))}),p?.subscribe(e=>{let t=new Set,n=new Set;for(let e of h.getState())if(t.add(e.id),e.rdns){let t="string"==typeof e.rdns?[e.rdns]:e.rdns;for(let e of t)n.add(e)}let r=[];for(let i of e){if(n.has(i.info.rdns))continue;let e=g(b(i));t.has(e.id)||r.push(e)}(!a||x.persist.hasHydrated())&&h.setState(e=>[...e,...r],!0)}),{get chains(){return f.getState()},get connectors(){return h.getState()},storage:a,getClient:function(e={}){let t;let n=e.chainId??x.getState().chainId,r=f.getState().find(e=>e.id===n);if(e.chainId&&!r)throw new m.X4;{let e=_.get(x.getState().chainId);if(e&&!r)return e;if(!r)throw new m.X4}{let e=_.get(n);if(e)return e}if(d.client)t=d.client({chain:r});else{let e=r.id,n=f.getState().map(e=>e.id),o={},a=Object.entries(d);for(let[t,r]of a)if("chains"!==t&&"client"!==t&&"connectors"!==t&&"transports"!==t){if("object"==typeof r){if(e in r)o[t]=r[e];else{let e=n.some(e=>e in r);if(e)continue;o[t]=r}}else o[t]=r}t=(0,i.e)({...o,chain:r,batch:o.batch??{multicall:!0},transport:t=>d.transports[e]({...t,connectors:h})})}return _.set(n,t),t},get state(){return x.getState()},setState(e){let t;t="function"==typeof e?e(x.getState()):e;let n=v();"object"!=typeof t&&(t=n);let r=Object.keys(n).some(e=>!(e in t));r&&(t=n),x.setState(t,!0)},subscribe:(e,t,n)=>x.subscribe(e,t,n?{...n,fireImmediately:n.emitImmediately}:void 0),_internal:{mipd:p,store:x,ssr:!!c,syncConnectedChain:u,transports:d.transports,chains:{setState(e){let t="function"==typeof e?e(f.getState()):e;if(0!==t.length)return f.setState(t,!0)},subscribe:e=>f.subscribe(e)},connectors:{providerDetailToConnector:b,setup:g,setState:e=>h.setState("function"==typeof e?e(h.getState()):e,!0),subscribe:e=>h.subscribe(e)},events:{change:S,connect:C,disconnect:O}}}}({chains:[q,j.N,U.R,z.v],storage:(0,G.C5)()?I({storage:localStorage}):void 0,connectors:(()=>{let e=[W({projectId:"6693fa0c578ef2ab817cf531094b5656"}),$(),function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t=>{var n;let r;let i=null!==(n=e.chains)&&void 0!==n?n:t.chains;return{id:"com.bitget.web3",name:"BitGet Wallet",type:"injected",icon:"/images/bitget.png",async connect(){let{chainId:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=await this.getProvider();if(!t)throw Error("Provider not found");let n=await t.request({method:"eth_requestAccounts"}),r=await this.getChainId();if(e&&r!==e){let t=i.find(t=>t.id===e);if(!t)throw Error("Chain with id ".concat(e," not configured"));try{await this.switchChain({chainId:e}),r=e}catch(e){console.error("Error switching chain",e)}}return{accounts:n,chainId:r}},async disconnect(){var e;let t=await this.getProvider();(null==t?void 0:t.disconnect)&&(await t.disconnect(),null===(e=t.removeAllListeners)||void 0===e||e.call(t))},async getAccounts(){let e=await this.getProvider();if(!e)throw Error("Provider not found");return e.request({method:"eth_accounts"})},async getChainId(){let e=await this.getProvider();if(!e)throw Error("Provider not found");let t=await e.request({method:"eth_chainId"});return Number(t)},async getProvider(){var e;return r||((null===(e=window.bitkeep)||void 0===e?void 0:e.ethereum)?r=window.bitkeep.ethereum:window.bitget&&(r=window.bitget)),r},async isAuthorized(){try{let e=await this.getAccounts();return!!e.length}catch(e){return!1}},async switchChain(e){let{chainId:n}=e,r=await this.getProvider();if(!r)throw Error("Provider not found");let o=i.find(e=>e.id===n);if(!o)throw Error("Chain with id ".concat(n," not configured"));try{return await r.request({method:"wallet_switchEthereumChain",params:[{chainId:"0x".concat(n.toString(16))}]}),t.emitter.emit("change",{chainId:n}),o}catch(e){if(4902===e.code)return await this.addChain({chainId:n}),o;throw e}},async addChain(e){var t;let{chainId:n}=e,r=await this.getProvider();if(!r)throw Error("Provider not found");let o=i.find(e=>e.id===n);if(!o)throw Error("Chain with id ".concat(n," not configured"));await r.request({method:"wallet_addEthereumChain",params:[{chainId:"0x".concat(n.toString(16)),chainName:o.name,nativeCurrency:o.nativeCurrency,rpcUrls:[o.rpcUrls.default.http[0]],blockExplorerUrls:(null===(t=o.blockExplorers)||void 0===t?void 0:t.default)?[o.blockExplorers.default.url]:void 0}]})},onAccountsChanged(e){0===e.length?t.emitter.emit("disconnect"):t.emitter.emit("change",{accounts:e})},onChainChanged(e){let n=Number(e);t.emitter.emit("change",{chainId:n})},onConnect(){t.emitter.emit("connect",{})},onDisconnect(){t.emitter.emit("disconnect")},onMessage(e){t.emitter.emit("message",e)},setup(){{var e,t,n,r,i,o;let a=(null===(e=window.bitkeep)||void 0===e?void 0:e.ethereum)||window.bitget;a&&(null===(t=a.on)||void 0===t||t.call(a,"accountsChanged",this.onAccountsChanged),null===(n=a.on)||void 0===n||n.call(a,"chainChanged",this.onChainChanged),null===(r=a.on)||void 0===r||r.call(a,"connect",this.onConnect),null===(i=a.on)||void 0===i||i.call(a,"disconnect",this.onDisconnect),null===(o=a.on)||void 0===o||o.call(a,"message",this.onMessage))}}}}}()];return(0,G.C5)()&&Z(window.navigator)?[H({dappMetadata:{name:"Sailor",url:"https://app.sailor.finance"}}),...e]:e})(),transports:{[q.id]:D(),[j.N.id]:D("https://evm-rpc.sei-apis.com",{batch:{wait:800}}),[U.R.id]:D(),[z.v.id]:D()}});q.id,q.blockExplorers.default.url,j.N.id,j.N.blockExplorers.default.url},28172:function(e,t,n){"use strict";n.d(t,{A8:function(){return c},WR:function(){return l},xZ:function(){return p}});var r=n(85893),i=n(28189),o=n(73458),a=n(51204),s=n(9334),u=n(145);let l={"9iFER3bpjf1PTTCQCfTRu17EJgvsxo9pVyA9QWwEuX4x":{id:"9iFER3bpjf1PTTCQCfTRu17EJgvsxo9pVyA9QWwEuX4x",index:4,protocolFeeRate:12e4,tradeFeeRate:100,tickSpacing:1,fundFeeRate:4e4,fundOwner:"FundHfY8oo8J9KYGyfXFFuQCHe7Z1VBNmsj84eMcdYs4",description:"Best for very stable pairs",defaultRange:.1,defaultRangePoint:[.1,.2]},HfERMT5DRA6C1TAqecrJQFpmkf3wsWTMncqnj3RDg5aw:{id:"HfERMT5DRA6C1TAqecrJQFpmkf3wsWTMncqnj3RDg5aw",index:2,protocolFeeRate:12e4,tradeFeeRate:500,tickSpacing:10,fundFeeRate:4e4,fundOwner:"FundHfY8oo8J9KYGyfXFFuQCHe7Z1VBNmsj84eMcdYs4",description:"Best for stable pairs",defaultRange:.1,defaultRangePoint:[.1,.2]},E64NGkDLLCdQ2yFNPcavaKptrEgmiQaNykUuLC1Qgwyp:{id:"E64NGkDLLCdQ2yFNPcavaKptrEgmiQaNykUuLC1Qgwyp",index:1,protocolFeeRate:12e4,tradeFeeRate:3e3,tickSpacing:60,fundFeeRate:4e4,fundOwner:"FundHfY8oo8J9KYGyfXFFuQCHe7Z1VBNmsj84eMcdYs4",description:"Best for most pairs",defaultRange:.1,defaultRangePoint:[.01,.05,.1,.2,.5]},A1BBtTYJd4i3xU8D6Tc2FzU6ZN4oXZWXKZnCxwbHXr8x:{id:"A1BBtTYJd4i3xU8D6Tc2FzU6ZN4oXZWXKZnCxwbHXr8x",index:3,protocolFeeRate:12e4,tradeFeeRate:1e4,tickSpacing:120,fundFeeRate:4e4,fundOwner:"FundHfY8oo8J9KYGyfXFFuQCHe7Z1VBNmsj84eMcdYs4",description:"Best for exotic pairs",defaultRange:.1,defaultRangePoint:[.01,.05,.1,.2,.5,.6,.7,.8,.9]}},c={[u.lk.LOWEST]:{id:u.lk.LOWEST.toString(),index:0,tickSpacing:1,tradeFeeRate:u.lk.LOWEST,description:"Best for very stable pairs",defaultRange:.01,defaultRangePoint:[.01,.05,.1]},[u.lk.LOW]:{id:u.lk.LOW.toString(),index:1,tradeFeeRate:u.lk.LOW,tickSpacing:10,description:"Best for stable pairs",defaultRange:.01,defaultRangePoint:[.01,.05,.1]},[u.lk.MEDIUM]:{id:u.lk.MEDIUM.toString(),index:2,tradeFeeRate:u.lk.MEDIUM,tickSpacing:60,description:"Best for most pairs",defaultRange:.01,defaultRangePoint:[.01,.05,.1]},[u.lk.HIGH]:{id:u.lk.HIGH.toString(),index:3,tradeFeeRate:u.lk.HIGH,tickSpacing:200,description:"Best for exotic pairs",defaultRange:.01,defaultRangePoint:[.01,.05,.1]}},d={harvest:{title:"transaction_history.harvest_rewards",desc:"transaction_history.harvest_clmm_reward_desc",txHistoryTitle:"transaction_history.harvest_rewards",txHistoryDesc:"transaction_history.harvest_clmm_reward_desc",components:{sub:(0,r.jsx)(o.x,{as:"span",color:s.O9.textSecondary,fontWeight:"700"})}},openPosition:{title:"transaction_history.name_add_liquidity",desc:"transaction_history.add_liquidity_desc",txHistoryTitle:"transaction_history.name_add_liquidity",txHistoryDesc:"transaction_history.add_liquidity_desc",components:{sub:(0,r.jsx)(o.x,{as:"span",color:s.O9.textSecondary,fontWeight:"700"})}},closePosition:{title:"clmm.position_closed",desc:"clmm.close_mint_position",txHistoryTitle:"clmm.position_closed",txHistoryDesc:"clmm.close_mint_position",components:{}},increaseLiquidity:{title:"transaction_history.name_add_liquidity",desc:"transaction_history.add_liquidity_desc",txHistoryTitle:"transaction_history.name_add_liquidity",txHistoryDesc:"transaction_history.add_liquidity_desc",components:{sub:(0,r.jsx)(o.x,{as:"span",color:s.O9.textSecondary,fontWeight:"700"})}},removeLiquidity:{title:"transaction_history.name_remove_liquidity",desc:"transaction_history.remove_liquidity_desc",txHistoryTitle:"transaction_history.name_remove_liquidity",txHistoryDesc:"transaction_history.remove_liquidity_desc",components:{sub:(0,r.jsx)(o.x,{as:"span",color:s.O9.textSecondary,fontWeight:"700"})}},updateRewards:{title:"transaction_history.update_reward_title",desc:"transaction_history.update_reward_desc",txHistoryTitle:"transaction_history.update_reward_title",txHistoryDesc:"transaction_history.update_reward_desc",components:{sub:(0,r.jsx)(o.x,{as:"span",color:s.O9.textSecondary,fontWeight:"700"})}},createPool:{title:"transaction_history.create_pool",desc:"transaction_history.create_clmm_pool",txHistoryTitle:"transaction_history.create_pool",txHistoryDesc:"transaction_history.create_clmm_pool",components:{}},createFarm:{title:"transaction_history.create_farm",desc:"transaction_history.create_clmm_farm_desc",txHistoryTitle:"transaction_history.create_farm",txHistoryDesc:"transaction_history.create_clmm_farm_desc",components:{}},harvestAll:{title:"transaction_history.harvest_rewards",desc:"transaction_history.harvest_rewards_desc",txHistoryTitle:"transaction_history.harvest_rewards",txHistoryDesc:"transaction_history.harvest_rewards_desc",components:{sub:(0,r.jsx)(o.x,{as:"span",color:s.O9.textSecondary,fontWeight:"700"})}},lockPosition:{title:"transaction_history.lock_position",desc:"transaction_history.position_locked",txHistoryTitle:"transaction_history.lock_position",txHistoryDesc:"transaction_history.position_locked",components:{sub:(0,r.jsx)(o.x,{as:"span",color:s.O9.textSecondary,fontWeight:"700"})}}},p=e=>{let{action:t,values:n}=e,o=d[t];return{title:a.ZP.t(o.title,n),description:(0,r.jsx)(i.cC,{i18nKey:o.desc,values:n,components:o.components}),txHistoryTitle:o.txHistoryTitle||o.title,txHistoryDesc:o.txHistoryDesc||o.desc,txValues:n}}},61903:function(e,t,n){"use strict";n.d(t,{Z:function(){return el}});let r=e=>{let t;let n=new Set,r=(e,r)=>{let i="function"==typeof e?e(t):e;if(i!==t){let e=t;t=(null!=r?r:"object"!=typeof i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,o=e=>(n.add(e),()=>n.delete(e)),a=()=>n.clear(),s={setState:r,getState:i,subscribe:o,destroy:a};return t=e(r,i,s),s},i=e=>e?r(e):r;var o=n(67294),a=n(52798);let{useSyncExternalStoreWithSelector:s}=a,u=e=>{let t="function"==typeof e?i(e):e,n=(e,n)=>(function(e,t=e.getState,n){let r=s(e.subscribe,e.getState,e.getServerState||e.getState,t,n);return(0,o.useDebugValue)(r),r})(t,e,n);return Object.assign(n,t),n},l=e=>e?u(e):u,c=(e,t={})=>(n,r,i)=>{let o;let{enabled:a,anonymousActionType:s,...u}=t;try{o=(null==a||a)&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!o)return a&&console.warn("[zustand devtools middleware] Please install/enable Redux devtools extension"),e(n,r,i);let l=o.connect(u),c=!0;i.setState=(e,t,i)=>{let o=n(e,t);return c&&l.send(void 0===i?{type:s||"anonymous"}:"string"==typeof i?{type:i}:i,r()),o};let p=(...e)=>{let t=c;c=!1,n(...e),c=t},f=e(i.setState,r,i);if(l.init(f),i.dispatchFromDevtools&&"function"==typeof i.dispatch){let e=!1,t=i.dispatch;i.dispatch=(...n)=>{"__setState"!==n[0].type||e||(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),e=!0),t(...n)}}return l.subscribe(e=>{var t;switch(e.type){case"ACTION":if("string"!=typeof e.payload){console.error("[zustand devtools middleware] Unsupported action format");return}return d(e.payload,e=>{if("__setState"===e.type){p(e.state);return}i.dispatchFromDevtools&&"function"==typeof i.dispatch&&i.dispatch(e)});case"DISPATCH":switch(e.payload.type){case"RESET":return p(f),l.init(i.getState());case"COMMIT":return l.init(i.getState());case"ROLLBACK":return d(e.state,e=>{p(e),l.init(i.getState())});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return d(e.state,e=>{p(e)});case"IMPORT_STATE":{let{nextLiftedState:n}=e.payload,r=null==(t=n.computedStates.slice(-1)[0])?void 0:t.state;if(!r)return;p(r),l.send(null,n);break}case"PAUSE_RECORDING":return c=!c}return}}),f},d=(e,t)=>{let n;try{n=JSON.parse(e)}catch(e){console.error("[zustand devtools middleware] Could not parse the received json",e)}void 0!==n&&t(n)},p=e=>t=>{try{let n=e(t);if(n instanceof Promise)return n;return{then:e=>p(e)(n),catch(e){return this}}}catch(e){return{then(e){return this},catch:t=>p(t)(e)}}};function f(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:v(e)?2:w(e)?3:0}function b(e,t){return 2===y(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function _(e,t,n){var r=y(e);2===r?e.set(t,n):3===r?(e.delete(t),e.add(n)):e[t]=n}function v(e){return K&&e instanceof Map}function w(e){return H&&e instanceof Set}function k(e){return e.o||e.t}function x(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=ee(e);delete t[X];for(var n=J(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=S),Object.freeze(e),t&&g(e,function(e,t){return A(t,!0)},!0)),e}function S(){f(2)}function I(e){return null==e||"object"!=typeof e||Object.isFrozen(e)}function T(e){var t=et[e];return t||f(18,e),t}function E(e,t){t&&(T("Patches"),e.u=[],e.s=[],e.v=t)}function P(e){C(e),e.p.forEach(B),e.p=null}function C(e){e===W&&(W=e.l)}function O(e){return W={p:[],l:W,h:e,m:!0,_:0}}function B(e){var t=e[X];0===t.i||1===t.i?t.j():t.O=!0}function M(e,t){t._=t.p.length;var n=t.p[0],r=void 0!==e&&e!==n;return t.h.g||T("ES5").S(t,e,r),r?(n[X].P&&(P(t),f(4)),m(e)&&(e=R(t,e),t.l||N(t,e)),t.u&&T("Patches").M(n[X].t,e,t.u,t.s)):e=R(t,n,[]),P(t),t.u&&t.v(t.u,t.s),e!==Z?e:void 0}function R(e,t,n){if(I(t))return t;var r=t[X];if(!r)return g(t,function(i,o){return L(e,r,t,i,o,n)},!0),t;if(r.A!==e)return t;if(!r.P)return N(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=4===r.i||5===r.i?r.o=x(r.k):r.o;g(3===r.i?new Set(i):i,function(t,o){return L(e,r,i,t,o,n)}),N(e,i,!1),n&&e.u&&T("Patches").R(r,n,e.u,e.s)}return r.o}function L(e,t,n,r,i,o){if(h(i)){var a=R(e,i,o&&t&&3!==t.i&&!b(t.D,r)?o.concat(r):void 0);if(_(n,r,a),!h(a))return;e.m=!1}if(m(i)&&!I(i)){if(!e.h.F&&e._<1)return;R(e,i),t&&t.A.l||N(e,i)}}function N(e,t,n){void 0===n&&(n=!1),e.h.F&&e.m&&A(t,n)}function D(e,t){var n=e[X];return(n?k(n):e)[t]}function F(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function q(e){e.P||(e.P=!0,e.l&&q(e.l))}function j(e){e.o||(e.o=x(e.t))}function U(e,t,n){var r,i,o,a,s,u,l,c=v(t)?T("MapSet").N(t,n):w(t)?T("MapSet").T(t,n):e.g?(o=i={i:(r=Array.isArray(t))?1:0,A:n?n.A:W,P:!1,I:!1,D:{},l:n,t:t,k:null,o:null,j:null,C:!1},a=en,r&&(o=[i],a=er),u=(s=Proxy.revocable(o,a)).revoke,l=s.proxy,i.k=l,i.j=u,l):T("ES5").J(t,n);return(n?n.A:W).p.push(c),c}function z(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return x(e)}var V,W,$="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),K="undefined"!=typeof Map,H="undefined"!=typeof Set,G="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,Z=$?Symbol.for("immer-nothing"):((V={})["immer-nothing"]=!0,V),Y=$?Symbol.for("immer-draftable"):"__$immer_draftable",X=$?Symbol.for("immer-state"):"__$immer_state",Q=""+Object.prototype.constructor,J="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,ee=Object.getOwnPropertyDescriptors||function(e){var t={};return J(e).forEach(function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)}),t},et={},en={get:function(e,t){if(t===X)return e;var n,r,i=k(e);if(!b(i,t))return(r=F(i,t))?"value"in r?r.value:null===(n=r.get)||void 0===n?void 0:n.call(e.k):void 0;var o=i[t];return e.I||!m(o)?o:o===D(e.t,t)?(j(e),e.o[t]=U(e.A.h,o,e)):o},has:function(e,t){return t in k(e)},ownKeys:function(e){return Reflect.ownKeys(k(e))},set:function(e,t,n){var r=F(k(e),t);if(null==r?void 0:r.set)return r.set.call(e.k,n),!0;if(!e.P){var i=D(k(e),t),o=null==i?void 0:i[X];if(o&&o.t===n)return e.o[t]=n,e.D[t]=!1,!0;if((n===i?0!==n||1/n==1/i:n!=n&&i!=i)&&(void 0!==n||b(e.t,t)))return!0;j(e),q(e)}return e.o[t]===n&&"number"!=typeof n&&(void 0!==n||t in e.o)||(e.o[t]=n,e.D[t]=!0,!0)},deleteProperty:function(e,t){return void 0!==D(e.t,t)||t in e.t?(e.D[t]=!1,j(e),q(e)):delete e.D[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=k(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{writable:!0,configurable:1!==e.i||"length"!==t,enumerable:r.enumerable,value:n[t]}:r},defineProperty:function(){f(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){f(12)}},er={};g(en,function(e,t){er[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),er.deleteProperty=function(e,t){return er.set.call(this,e,t,void 0)},er.set=function(e,t,n){return en.set.call(this,e[0],t,n,e[0])};var ei=new(function(){function e(e){var t=this;this.g=G,this.F=!0,this.produce=function(e,n,r){if("function"==typeof e&&"function"!=typeof n){var i,o=n;return n=e,function(e){var r=this;void 0===e&&(e=o);for(var i=arguments.length,a=Array(i>1?i-1:0),s=1;s1?r-1:0),o=1;o=0;n--){var n,r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));var i=T("Patches").$;return h(e)?i(e,t):this.produce(e,function(e){return i(e,t)})},e}()),eo=ei.produce;ei.produceWithPatches.bind(ei),ei.setAutoFreeze.bind(ei),ei.setUseProxies.bind(ei),ei.applyPatches.bind(ei),ei.createDraft.bind(ei),ei.finishDraft.bind(ei);let ea=e=>(t,n,r)=>(r.setState=(e,n,...r)=>{let i="function"==typeof e?eo(e):e;return t(i,n,...r)},e(r.setState,n,r)),es=[],eu=(e,t)=>{let n=l(c(ea((t,n,r,i)=>{let o=(e,n,r)=>{let i=r||{};return t(e,n,{...(i="string"==typeof i?{type:i}:i)||{type:"unknown"},payload:e})};return e(o,n,r,i)}),t?{name:t}:void 0)),r=n.getState();return es.push({name:t,reset:e=>{n.setState({...r,...e||{}},!0,{type:"reset"})}}),n};var el=eu},15061:function(e,t,n){"use strict";n.d(t,{r0:function(){return i.r},pO:function(){return r.pO},MT:function(){return l.Z},hv:function(){return s.hv},qr:function(){return r.qr},VE:function(){return p.V},Fh:function(){return R},GX:function(){return a.G},HN:function(){return i.H},EN:function(){return s.EN},uM:function(){return o.uM}});var r=n(68723),i=n(12723),o=n(61452),a=n(93427),s=n(95378),u=n(6093),l=n(61903);let c="_ray_chain_id_",d={chainId:Number((0,u.C5)()&&localStorage.getItem(c)||1)};(0,l.Z)(e=>({...d,setChainIdAct:t=>{e({chainId:t},!1,{type:"setChainIdAct"}),(0,u.C5)()&&localStorage.setItem(c,t.toString())},reset:()=>e(d)}),"useEVMStore");var p=n(84509),f=n(61034),h=n(64174),m=n(79127),g=n(4156),y=n(34497),b=n(49895),_=n(85893),v=n(28189),w=n(73458),k=n(51204),x=n(9334);let A={create:{title:"create_market.title",desc:"create_market.desc",txHistoryTitle:"create_market.title",txHistoryDesc:"create_market.desc",components:{sub:(0,_.jsx)(w.x,{as:"span",color:x.O9.textSecondary,fontWeight:"700"})}},createPool:{title:"transaction_history.create_pool",desc:"liquidity.create_pool_tx_desc",txHistoryTitle:"transaction_history.create_pool",txHistoryDesc:"liquidity.create_pool_tx_desc",components:{sub:(0,_.jsx)(w.x,{as:"span",color:x.O9.textSecondary,fontWeight:"700"})}}},S=e=>{let{action:t,values:n}=e,r=A[t];return{title:k.ZP.t(r.title,n),description:(0,_.jsx)(v.cC,{i18nKey:r.desc,values:n,components:r.components}),txHistoryTitle:r.txHistoryTitle||r.title,txHistoryDesc:r.txHistoryDesc||r.desc,txValues:n}};var I=n(35214),T=n(41178),E=n(46578),P=n(43903),C=n(13550),O=n.n(C),B=n(68389),M=n(57632);let R=(0,l.Z)(()=>({checkMarketAct:async e=>{var t;if(!(0,y.g)(e))return g.w.next({status:"error",title:"error",description:"invalid market id: ".concat(e)}),{isValid:!1};let{raydium:n,connection:i,programIdConfig:a}=r.qr.getState(),u=s.EN.getState().getTokenBalanceUiAmount,l=o.uM.getState().tokenMap;if(!n||!i)return{isValid:!1};let{isVerifiedToken:c,getTokenDecimal:d}=o.uM.getState();(0,E.Z)("rpc: get market info");let p=await i.getAccountInfo(new h.nh(e),{commitment:r.qr.getState().commitment});if(!(null==p?void 0:p.data))return g.w.next({status:"error",title:"error",description:"can't find market ".concat(e)}),{isValid:!1};if(!p.owner.equals(a.OPEN_BOOK_PROGRAM))return g.w.next({status:"error",title:"error",description:"market program id is not OpenBook program id"}),{isValid:!1};let{baseMint:m,quoteMint:_,baseLotSize:v,quoteLotSize:w}=f.SsU.decode(p.data),[k,x]=[await d(m),await d(_)],{id:A}=(0,f.u10)({version:4,marketVersion:3,baseMint:m,quoteMint:_,baseDecimals:k,quoteDecimals:x,marketId:new h.nh(e),programId:a.AMM_V4,marketProgramId:a.OPEN_BOOK_PROGRAM});if(!A)return g.w.next({status:"error",title:"error",description:"can't find associated poolKeys for market"}),{isValid:!1};if(!c({mint:m,tokenInfo:l.get(m.toString())}))return g.w.next({status:"error",title:"error",description:"base token freeze authority enabled"}),{isValid:!1};if(!c({mint:_,tokenInfo:l.get(_.toString())}))return g.w.next({status:"error",title:"error",description:"quote token freeze authority enabled"}),{isValid:!1};if(v.isZero())return g.w.next({status:"error",title:"error",description:"Base lot size is zero"}),{isValid:!1};if(w.isZero())return g.w.next({status:"error",title:"error",description:"Quote lot size is zero"}),{isValid:!1};if(u({mint:(0,b.eI)(m.toString()),decimals:k}).isZero)return g.w.next({status:"error",title:"error",description:"user wallet has no base token"}),{isValid:!1};if(u({mint:(0,b.eI)(_.toString()),decimals:x}).isZero)return g.w.next({status:"error",title:"error",description:"user wallet has no quote token"}),{isValid:!1};let S=!!(null===(t=await i.getAccountInfo(new h.nh(A),{commitment:r.qr.getState().commitment}))||void 0===t?void 0:t.data.length);return S?(g.w.next({status:"error",title:"error",description:"has already init this pool"}),{isValid:!1}):{isValid:!0,mintA:m.toString(),mintB:_.toString()}},createMarketAct:async e=>{let{baseToken:t,quoteToken:n,orderSize:i,priceTick:o,...a}=e,{raydium:s,programIdConfig:u,connection:l,txVersion:c}=r.qr.getState();if(!s||!l)return{txId:[],marketId:""};let{execute:d,transactions:p,extInfo:f}=await s.marketV2.create({baseInfo:{mint:new h.nh((0,b.B0)(t.address)),decimals:t.decimals},quoteInfo:{mint:new h.nh((0,b.B0)(n.address)),decimals:n.decimals},lotSize:Number(i),tickSize:Number(o),dexProgramId:u.OPEN_BOOK_PROGRAM,txVersion:c}),m=S({action:"create",values:{pair:"".concat((0,b.l_)(t.symbol)," - ").concat((0,b.l_)(n.symbol))}}),y=p.length,{toastId:_,processedId:v,handler:w}=(0,I.xl)({txLength:y,...a}),k=e=>e!==p.length-1?"transaction_history.set_up":"create_market.create";return d({sequentially:!0,onTxUpdate:e=>{(0,T.WH)(e),(0,I.r4)({toastId:_,processedId:(0,I.Yi)({processedId:v,data:e}),txLength:y,meta:m,handler:w,getSubTxTitle:k})}}).then(e=>((0,I.r4)({toastId:_,processedId:(0,I.Yi)({processedId:v,data:[]}),txLength:y,meta:m,handler:w,getSubTxTitle:k}),{txId:e.txIds,marketId:f.address.marketId.toString()||""})).catch(e=>{var t;return null===(t=a.onError)||void 0===t||t.call(a),g.w.next({txError:e}),{txId:[],marketId:""}}).finally(a.onFinally)},createMarketAndPoolAct:async e=>{let{baseToken:t,quoteToken:n,baseAmount:i,quoteAmount:o,startTime:a,...s}=e,{raydium:u,connection:l,txVersion:c,publicKey:d}=r.qr.getState();if(!u||!l||!d)return{txId:[],marketId:""};if(t.programId===m.nA.toBase58()||n.programId===m.nA.toBase58()){var p,_;return g.w.next({status:"error",title:"error",description:"Create market and Amm V4 pool do not support token 2022"}),null===(p=s.onError)||void 0===p||p.call(s),null===(_=s.onFinally)||void 0===_||_.call(s,{}),{txId:[],marketId:""}}let v="".concat(d.toBase58().slice(0,5),"-").concat(t.address.slice(0,5),"-").concat(n.address.slice(0,5)),w=(0,P.qn)(v);w||(w=(0,M.Z)().slice(0,6),(0,P.Nh)(v,w));let k=await (0,B.u)(),{execute:x,transactions:A,extInfo:E}=await u.liquidity.createMarketAndPoolV4({baseMintInfo:{mint:new h.nh((0,b.B0)(t.address)),decimals:t.decimals},quoteMintInfo:{mint:new h.nh((0,b.B0)(n.address)),decimals:n.decimals},lowestFeeMarket:!0,assignSeed:w,baseAmount:new(O())(i),quoteAmount:new(O())(o),startTime:new(O())((a?Number(a):Date.now()+6e4)/1e3),txVersion:c,ownerInfo:{useSOLBalance:!0},associatedOnly:!1,computeBudgetConfig:k}),C=S({action:"createPool",values:{mintA:(0,b.dJ)(t.symbol),mintB:(0,b.dJ)(n.symbol)}}),R=A.length,{toastId:L,processedId:N,handler:D}=(0,I.xl)({txLength:R,...s,onSent:()=>{var e;null===(e=s.onSent)||void 0===e||e.call(s,E.address)},onConfirmed:()=>{var e;(0,P.vD)(v),null===(e=s.onConfirmed)||void 0===e||e.call(s)}}),F=e=>["create_standard_pool.step_1_name","transaction_history.set_up","transaction_history.create_pool"][e],q=[];q=c===f.eVA.V0?A.map(e=>h.$Z.decompile(e.message,{addressLookupTableAccounts:[f.FTx["2immgwYNHBbyVQKVGCEkgWpi53bLwWNRMB5G2nbgYV17"]]}).instructions.filter(e=>e.programId.equals(h.yc.programId)).map(e=>e.keys.map(e=>e.pubkey.toBase58())[1])):A.map(e=>e.instructions.filter(e=>e.programId.equals(h.yc.programId)).map(e=>e.keys.map(e=>e.pubkey.toBase58())[1]));let j=await u.connection.getMultipleAccountsInfo(q.flat().map(e=>(0,y.Z)(e)),{commitment:"confirmed"}),U=0;return!j.slice(0,q[0].length).some(e=>!e)&&U++,!j.slice(q[0].length-1,-1).some(e=>!e)&&U++,x({sequentially:!0,skipTxCount:U,onTxUpdate:e=>{(0,T.WH)(e),(0,I.r4)({toastId:L,processedId:(0,I.Yi)({processedId:N,data:e}),txLength:R,meta:C,handler:D,getSubTxTitle:F})}}).then(e=>((0,I.r4)({toastId:L,processedId:(0,I.Yi)({processedId:N,data:[]}),txLength:R,meta:C,handler:D,getSubTxTitle:F}),{txId:e.txIds,marketId:E.address.marketId.toString()||""})).catch(e=>{var t;return null===(t=s.onError)||void 0===t||t.call(s),g.w.next({txError:e}),{txId:[],marketId:""}}).finally(()=>{var e;return null===(e=s.onFinally)||void 0===e?void 0:e.call(s,E.address)})}}),"useCreateMarketStore")},68723:function(e,t,n){"use strict";n.d(t,{O9:function(){return B},OX:function(){return M},v:function(){return F},pO:function(){return q},Yb:function(){return R},qr:function(){return V}});var r,i,o,a,s,u,l=n(64174),c=n(61034);(r=a||(a={})).Mainnet="mainnet-beta",r.Testnet="testnet",r.Devnet="devnet";var d=n(61903),p=n(61452),f=n(4156),h=n(41266);let m=e=>{if(!e)return!1;try{return new URL(e),!0}catch(e){return!1}};var g=n(43903),y=n(6093);let b=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,_=e=>{if("string"!=typeof e)throw TypeError("Invalid argument expected string");let t=e.match(b);if(!t)throw Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},v=e=>"*"===e||"x"===e||"X"===e,w=e=>{let t=parseInt(e,10);return isNaN(t)?e:t},k=(e,t)=>typeof e!=typeof t?[String(e),String(t)]:[e,t],x=(e,t)=>{if(v(e)||v(t))return 0;let[n,r]=k(w(e),w(t));return n>r?1:n{for(let n=0;n{let n=_(e),r=_(t),i=n.pop(),o=r.pop(),a=A(n,r);return 0!==a?a:i&&o?A(i.split("."),o.split(".")):i||o?i?-1:1:0},I=(e,t,n)=>{P(n);let r=S(e,t);return T[n].includes(r)},T={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},E=Object.keys(T),P=e=>{if("string"!=typeof e)throw TypeError(`Invalid operator type, expected string but got ${typeof e}`);if(-1===E.indexOf(e))throw Error(`Invalid operator, expected one of ${E.join("|")}`)};var C=n(53116);let O=a.Mainnet;(0,l.Wf)(O);let B="_r_apr_",M="_r_explorer_",R=[{name:"Solscan",icon:"/images/explorer-solscan.png",host:"https://solscan.io"},{name:"Explorer",icon:"/images/explorer-solana.png",host:"https://explorer.solana.com"},{name:"SolanaFM",icon:"/images/explorer-solanaFM.png",host:"https://solana.fm"}],L="_r_rpc_dev_",N="_r_rpc_prod_",D=!1,F="_r_fee_",q="_r_u_added_";(i=s||(s={}))[i.Fast=0]="Fast",i[i.Turbo=1]="Turbo",i[i.Ultra=2]="Ultra",(o=u||(u={}))[o.MaxCap=0]="MaxCap",o[o.Exact=1]="Exact";let j={raydium:void 0,initialing:!1,connected:!1,chainTimeOffset:0,blockSlotCountForSecond:0,explorerUrl:C.N.blockExplorers.default.url,isMobile:!1,isDesktop:!1,aprMode:"M",rpcs:[],urlConfigs:c.Y9z,programIdConfig:c._vi,jupTokenType:c.kol.Strict,displayTokenSettings:{official:!0,jup:!0,userAdded:!0},featureDisabled:{},txVersion:c.eVA.V0,appVersion:"V3.0.2",needRefresh:!1,tokenAccLoaded:!1,commitment:"confirmed",priorityLevel:s.Turbo,priorityMode:u.MaxCap,feeConfig:{},transactionFee:"0.005",address:"",connectModalVisible:!1},U=!1,z={time:0,loading:!1},V=(0,d.Z)((e,t)=>({...j,initRaydiumAct:async n=>{let r={type:"initRaydiumAct"},{initialing:i,urlConfigs:o,rpcNodeUrl:a,jupTokenType:s,displayTokenSettings:u}=t();if(i||!a)return;let d=n.connection||new l.ew(a);e({initialing:!0},!1,r);let f="localhost:3002"===window.location.host,h=await c.kk0.load({...n,connection:d,urlConfigs:{...o,BASE_HOST:(0,y.H0)()?o.BASE_HOST:(0,g.qn)("_r_api_host_")||o.BASE_HOST},jupTokenType:s,logRequests:!f,disableFeatureCheck:!0,blockhashCommitment:"finalized"});p.uM.getState().extraLoadedTokenList.forEach(e=>{let t=h.token.tokenMap.has(e.address);t||(h.token.tokenList.push(e),h.token.tokenMap.set(e.address,e),h.token.mintGroup.official.add(e.address))});let m=new Map(Array.from(h.token.tokenMap)),b=JSON.parse(JSON.stringify(h.token.tokenList)).filter(e=>!p.SI.has(e.address)||(m.delete(e.address),h.token.tokenMap.delete(e.address),h.token.mintGroup.jup.delete(e.address),!1)).map(e=>{if("jupiter"===e.type){let t={...e,logoURI:e.logoURI?"https://wsrv.nl/?w=48&h=48&url=".concat(e.logoURI):e.logoURI};return m.set(e.address,t),t}return e});p.uM.setState({tokenList:b,displayTokenList:b.filter(e=>u.official&&h.token.mintGroup.official.has(e.address)||u.jup&&h.token.mintGroup.jup.has(e.address)),tokenMap:m,mintGroup:h.token.mintGroup,whiteListMap:new Set(Array.from(h.token.whiteListMap))},!1,r),e({raydium:h,initialing:!1,connected:!!(n.owner||t().publicKey)},!1,r),e({featureDisabled:{swap:!1===h.availability.swap,createConcentratedPosition:!1===h.availability.createConcentratedPosition,addConcentratedPosition:!1===h.availability.addConcentratedPosition,addStandardPosition:!1===h.availability.addStandardPosition,removeConcentratedPosition:!1===h.availability.removeConcentratedPosition,removeStandardPosition:!1===h.availability.removeStandardPosition,addFarm:!1===h.availability.addFarm,removeFarm:!1===h.availability.removeFarm}},!1,r),setTimeout(()=>{t().fetchChainTimeAct()},1e3)},fetchChainTimeAct:()=>{let{urlConfigs:n}=t();h.ZP.get("".concat(n.BASE_HOST).concat(n.CHAIN_TIME)).then(t=>{e({chainTimeOffset:isNaN(null==t?void 0:t.data.offset)?0:1e3*t.data.offset},!1,{type:"fetchChainTimeAct"})}).catch(()=>{e({chainTimeOffset:0},!1,{type:"fetchChainTimeAct"})})},fetchBlockSlotCountAct:async()=>{let{raydium:n,connection:r}=t();if(!n||!r)return;let i=await h.ZP.post(r.rpcEndpoint,{id:"getRecentPerformanceSamples",jsonrpc:"2.0",method:"getRecentPerformanceSamples",params:[4]}),o=i.result.map(e=>e.numSlots);e({blockSlotCountForSecond:o.reduce((e,t)=>e+t,0)/o.length/60},!1,{type:"fetchBlockSlotCountAct"})},setUrlConfigAct:n=>{e({urlConfigs:{...t().urlConfigs,...n}},!1,{type:"setUrlConfigAct"})},setProgramIdConfigAct:n=>{e({programIdConfig:{...t().programIdConfig,...n}},!1,{type:"setProgramIdConfigAct"})},fetchRpcsAct:async()=>{let{urlConfigs:n,setRpcUrlAct:r}=t();if(!U){U=!0;try{let{data:{rpcs:t}}=await h.ZP.get(n.BASE_HOST+n.RPCS);e({rpcs:t},!1,{type:"fetchRpcsAct"});let i=JSON.parse((0,g.qn)((0,y.H0)()?N:L)||"{}"),o=0,a=async()=>{let e=[...t];(null==i?void 0:i.rpcNode)&&e.sort((e,t)=>e.name===i.rpcNode.name?-1:1);let n=await r(e[o].url,!0,o!==e.length-1);n||(++o{if(n===t().rpcNodeUrl)return f.w.next({status:"info",title:"Switch Rpc Node",description:"Rpc node already in use"}),!0;try{if(!m(n))throw Error("invalid url");if(D)return f.w.next({status:"warning",title:"Switch Rpc Node",description:"Validating Rpc node.."}),!1;D=!0,await (0,y.XD)(()=>h.ZP.post(n,{method:"getEpochInfo"},{skipError:!0}),{retryCount:3,onError:()=>D=!1}),D=!1;let i=t().rpcs.find(e=>e.url===n);return e({rpcNodeUrl:n,wsNodeUrl:null==i?void 0:i.ws,tokenAccLoaded:!1},!1,{type:"setRpcUrlAct"}),(0,g.Nh)((0,y.H0)()?N:L,JSON.stringify({rpcNode:i?{...i,url:""}:void 0,url:n})),r||f.w.next({status:"success",title:"Switch Rpc Node Success",description:"Rpc node switched"}),!0}catch(e){return i||f.w.next({status:"error",title:"Switch Rpc Node error",description:"Invalid rpc node"}),!1}},setAddress:t=>{e({address:t})},setConnectModalVisible:t=>{e({connectModalVisible:t})},setAprModeAct:t=>{(0,g.Nh)(B,t),e({aprMode:t})},checkAppVersionAct:async()=>{let{urlConfigs:n,appVersion:r}=t(),i=await h.ZP.get("".concat(n.BASE_HOST).concat(n.VERSION));e({needRefresh:I(r,i.data.latest,"<")})},fetchPriorityFeeAct:async()=>{let{urlConfigs:n}=t(),{data:r}=await h.ZP.get("".concat(n.BASE_HOST).concat(n.PRIORITY_FEE));e({feeConfig:{[s.Fast]:r.default.m/1e9,[s.Turbo]:r.default.h/1e9,[s.Ultra]:r.default.vh/1e9}})},getPriorityFee:()=>{var e;let{priorityMode:n,priorityLevel:r,transactionFee:i,feeConfig:o}=t();return n===u.Exact?i?String(i):i:void 0===o[r]||void 0===i?String(null!==(e=o[s.Turbo])&&void 0!==e?e:0):String(Math.min(Number(i),o[r]))},getEpochInfo:async()=>{let[n,r]=[t().connection,t().epochInfo];if(!n)return;if(r&&Date.now()-z.time<=3e4||z.loading)return r;z.loading=!0;let i=await (0,y.XD)(()=>n.getEpochInfo());return z={time:Date.now(),loading:!1},e({epochInfo:i},!1,{type:"useAppStore.getEpochInfo"}),i},reset:()=>e(j)}),"useAppStore")},84509:function(e,t,n){"use strict";n.d(t,{V:function(){return _}});var r=n(61034),i=n(64174),o=n(61903),a=n(15061),s=n(49895),u=n(4156),l=n(38479),c=n(35214),d=n(62330),p=n(28172),f=n(68389),h=n(41178),m=n(13550),g=n.n(m),y=n(56139);let b={positionLoading:!1,currentPoolLoading:!0,clmmFeeConfigs:{},rewardWhiteListMints:[],slippage:.005},_=(0,o.Z)((e,t)=>({...b,harvestAllAct:async e=>{let{allPoolInfo:t,allPositions:n,lockInfo:r,programId:o,execute:s,...l}=e,{raydium:d,txVersion:m}=a.qr.getState();if(!d)return u.w.next({noRpc:!0}),{txId:""};let g=await d.clmm.harvestAllRewards({allPoolInfo:t,allPositions:n,ownerInfo:{useSOLBalance:!0},lockInfo:r,programId:o?new i.nh(o):void 0,txVersion:m,computeBudgetConfig:s?await (0,f.u)():void 0});if(s){let e=(0,p.xZ)({action:"harvest",values:{symbol:"All Clmm"}}),t=g.transactions.length,{toastId:n,processedId:r,handler:i}=(0,c.xl)({txLength:t,...l}),o=()=>e.txHistoryTitle;g.execute({sequentially:!0,onTxUpdate:a=>{(0,h.WH)(a),(0,c.r4)({toastId:n,processedId:(0,c.Yi)({processedId:r,data:a}),txLength:t,meta:e,handler:i,getSubTxTitle:o})}}).then(()=>((0,c.r4)({toastId:n,processedId:(0,c.Yi)({processedId:r,data:[]}),txLength:t,meta:e,handler:i,getSubTxTitle:o}),{txId:"",buildData:g})).catch(t=>{var n;return null===(n=l.onError)||void 0===n||n.call(l),u.w.next({...e,txError:t}),{txId:""}}).finally(l.onFinally)}return{txId:"",buildData:g}},openPositionAct:async e=>{var t,n,r;let{poolInfo:i,poolKeys:o,base:m,tickLower:b,tickUpper:_,baseAmount:v,otherAmountMax:w,createPoolBuildData:k,onCloseToast:x,...A}=e,{raydium:S,wallet:I,txVersion:T}=a.qr.getState();if(!S)return u.w.next({noRpc:!0}),{txId:""};if(!i)return{txId:""};try{let e=await (0,f.u)(),n=await S.clmm.openPositionFromBase({poolInfo:i,poolKeys:o,tickLower:Math.min(b,_),tickUpper:Math.max(b,_),base:m,ownerInfo:{useSOLBalance:(0,s.Th)(i.mintA.address)||(0,s.Th)(i.mintB.address)},baseAmount:new(g())(v),otherAmountMax:new(g())(w),getEphemeralSigners:I?await (0,d.Z)(I):void 0,computeBudgetConfig:k?void 0:e,txVersion:T,nft2022:!0}),[r,a]="MintA"===m?[v,w]:[w,v],E=(0,p.xZ)({action:"openPosition",values:{amountA:new y.Z(r||0).div(10**i.mintA.decimals).toDecimalPlaces(i.mintA.decimals).toString()||0,symbolA:(0,s.h3)({mint:i.mintA,transformSol:!0}),amountB:new y.Z(a||0).div(10**i.mintB.decimals).toDecimalPlaces(i.mintB.decimals).toString()||0,symbolB:(0,s.h3)({mint:i.mintB,transformSol:!0})}}),P=[i.mintA,i.mintB];if(!n)return null===(t=A.onError)||void 0===t||t.call(A),{txId:""};if(k){let t=(0,p.xZ)({action:"createPool",values:{}});k.builder.addInstruction({...n.builder.AllTxData}),k.builder.addCustomComputeBudget(e);let{transactions:r,execute:i}=await k.builder.sizeCheckBuildV0(),o=r.length,{toastId:a,processedId:s,handler:l}=(0,c.xl)({txLength:o,...A}),d=e=>e!==r.length-1?"transaction_history.create_pool":"transaction_history.name_add_liquidity";return i({sequentially:!0,onTxUpdate:e=>{(0,h.WH)(e),(0,c.r4)({toastId:a,processedId:(0,c.Yi)({processedId:s,data:e}),txLength:o,meta:t,handler:l,getSubTxTitle:d})}}).then(()=>((0,c.r4)({toastId:a,processedId:(0,c.Yi)({processedId:s,data:[]}),txLength:o,meta:t,handler:l,getSubTxTitle:d}),{txId:"",buildData:n})).catch(e=>{var n,r;return u.w.next({txError:e,...t}),null===(n=A.onError)||void 0===n||n.call(A),null===(r=A.onFinally)||void 0===r||r.call(A),{txId:""}}).finally(o>1?void 0:A.onFinally)}return n.execute().then(e=>{var t;let{txId:r,signedTx:i}=e;return l.aV.next({txId:r,...E,mintInfo:P,signedTx:i,onClose:x,onError:A.onError,onConfirmed:A.onConfirmed}),null===(t=A.onSent)||void 0===t||t.call(A,{txId:r,buildData:n}),{txId:r,buildData:n}}).catch(e=>{var t;return null===(t=A.onError)||void 0===t||t.call(A),u.w.next({txError:e,...E}),{txId:""}}).finally(A.onFinally)}catch(e){return null===(n=A.onError)||void 0===n||n.call(A),null===(r=A.onFinally)||void 0===r||r.call(A),console.error(e.message),{txId:""}}},removeLiquidityAct:async e=>{let{poolInfo:t,position:n,liquidity:i,amountMinA:o,amountMinB:c,needRefresh:d,closePosition:h,harvest:m,onSent:b,onError:_,onFinally:v,onConfirmed:w}=e,{raydium:k,txVersion:x,getEpochInfo:A}=a.qr.getState(),S=a.HN.getState().slippage;if(!k)return"";let[I,T]=[new(g())(new y.Z(o.toString()).mul(1-S).mul(10**t.mintA.decimals).toFixed(0)),new(g())(new y.Z(c.toString()).mul(1-S).mul(10**t.mintB.decimals).toFixed(0))],E=await A(),{fee:P=new(g())(0)}=(0,r.wfV)(I,t.mintA.extensions.feeConfig,E,!1),{fee:C=new(g())(0)}=(0,r.wfV)(T,t.mintB.extensions.feeConfig,E,!1);try{let e=await (0,f.u)(),{execute:r}=await k.clmm.decreaseLiquidity({poolInfo:t,ownerPosition:n,ownerInfo:{useSOLBalance:!0,closePosition:!!n.liquidity.eq(new(g())(i))&&(null!=h?h:n.liquidity.eq(new(g())(i)))},liquidity:new(g())(i),amountMinA:I.sub(P),amountMinB:T.sub(C),computeBudgetConfig:e,txVersion:x}),y=(0,p.xZ)({action:m?"harvest":"removeLiquidity",values:{amountA:o||0,symbolA:(0,s.h3)({mint:t.mintA,transformSol:!0}),amountB:c||0,symbolB:(0,s.h3)({mint:t.mintB,transformSol:!0})}});return r().then(e=>{let{txId:n,signedTx:r}=e;return l.aV.next({txId:n,...y,mintInfo:[t.mintA,t.mintB],signedTx:r,onError:_,onSent:b,onConfirmed:()=>{null==w||w(),d&&setTimeout(()=>a.EN.setState({refreshClmmPositionTag:Date.now()}),500)}}),n}).catch(e=>(null==_||_(),u.w.next({txError:e,...y}),"")).finally(()=>null==v?void 0:v())}catch(e){return null==_||_(),null==v||v(),""}},closePositionAct:async e=>{let{poolInfo:t,position:n,...r}=e,{raydium:i,txVersion:o}=a.qr.getState();if(!i)return"";try{let{execute:e}=await i.clmm.closePosition({poolInfo:t,ownerPosition:n,txVersion:o}),a=(0,p.xZ)({action:"closePosition",values:{mint:n.nftMint.toBase58().slice(0,6).toUpperCase()}});return e().then(e=>{let{txId:t,signedTx:n}=e;return l.aV.next({txId:t,signedTx:n,...a,...r}),t}).catch(e=>{var t;return null===(t=r.onError)||void 0===t||t.call(r),u.w.next({txError:e,...a}),""}).finally(r.onFinally)}catch(e){var s,c;return null===(s=r.onError)||void 0===s||s.call(r),null===(c=r.onFinally)||void 0===c||c.call(r),""}},increaseLiquidityAct:async e=>{let{poolInfo:t,position:n,liquidity:r,amountMaxA:i,amountMaxB:o,...c}=e,{raydium:d,txVersion:h}=a.qr.getState(),m=a.HN.getState().slippage;if(!d)return"";try{let e=await (0,f.u)(),{execute:b}=await d.clmm.increasePositionFromLiquidity({poolInfo:t,ownerPosition:n,ownerInfo:{useSOLBalance:(0,s.Th)(t.mintA.address)||(0,s.Th)(t.mintB.address)},liquidity:new(g())(new y.Z(r.toString()).mul(1-m).toFixed(0)),amountMaxA:new(g())(i),amountMaxB:new(g())(o),checkCreateATAOwner:!0,computeBudgetConfig:e,txVersion:h}),_=(0,p.xZ)({action:"increaseLiquidity",values:{amountA:new y.Z(i.toString()).div(10**t.mintA.decimals).toDecimalPlaces(t.mintA.decimals).toString(),symbolA:(0,s.h3)({mint:t.mintA,transformSol:!0}),amountB:new y.Z(o.toString()).div(10**t.mintB.decimals).toDecimalPlaces(t.mintB.decimals).toString(),symbolB:(0,s.h3)({mint:t.mintB,transformSol:!0})}});return b().then(e=>{let{txId:n,signedTx:r}=e;return l.aV.next({txId:n,..._,signedTx:r,mintInfo:[t.mintA,t.mintB],onSent:c.onSent,onClose:c.onCloseToast,onConfirmed:()=>{var e;null===(e=c.onConfirmed)||void 0===e||e.call(c),setTimeout(()=>{a.EN.setState({refreshClmmPositionTag:Date.now()})},500)}}),n}).catch(e=>{var t;return null===(t=c.onError)||void 0===t||t.call(c),u.w.next({txError:e,..._}),""}).finally(c.onFinally)}catch(e){var b,_;return null===(b=c.onError)||void 0===b||b.call(c),null===(_=c.onFinally)||void 0===_||_.call(c),""}},collectRewardAct:async e=>{let{poolInfo:t,rewardMint:n,...r}=e,{raydium:i,txVersion:o}=a.qr.getState();if(!i)return"";let s=await (0,f.u)(),{execute:c}=await i.clmm.collectReward({ownerInfo:{useSOLBalance:!0},poolInfo:t,rewardMint:n,txVersion:o,computeBudgetConfig:s}),d=(0,p.xZ)({action:"harvest",values:{}});return c().then(e=>{let{txId:n,signedTx:i}=e;return l.aV.next({txId:n,...d,signedTx:i,mintInfo:[t.mintA,t.mintB],...r}),n}).catch(e=>{var t;return null===(t=r.onError)||void 0===t||t.call(r),u.w.next({txError:e,...d}),""}).finally(()=>{var e;null===(e=r.onFinally)||void 0===e||e.call(r)})},lockPositionAct:async e=>{let{poolInfo:t,position:n,...r}=e,{raydium:i,txVersion:o,wallet:c}=a.qr.getState();if(!i)return"";let h=await (0,f.u)(),{execute:m,extInfo:g}=await i.clmm.lockPosition({ownerPosition:n,txVersion:o,computeBudgetConfig:h,getEphemeralSigners:c?await (0,d.Z)(c):void 0}),y=(0,p.xZ)({action:"lockPosition",values:{position:(0,s.Xn)(n.nftMint.toBase58())}});return m().then(e=>{let{txId:n,signedTx:i}=e;return l.aV.next({txId:n,...y,signedTx:i,mintInfo:[t.mintA,t.mintB],onSent:()=>{var e;null===(e=r.onSent)||void 0===e||e.call(r,g)},onClose:r.onCloseToast,onConfirmed:()=>{var e;null===(e=r.onConfirmed)||void 0===e||e.call(r),setTimeout(()=>{a.EN.setState({refreshClmmPositionTag:Date.now()})},500)}}),n}).catch(e=>{var t;return null===(t=r.onError)||void 0===t||t.call(r),u.w.next({txError:e,...y}),""}).finally(()=>{var e;null===(e=r.onFinally)||void 0===e||e.call(r,g)})},harvestLockPositionAct:async e=>{let{lockData:t,poolInfo:n,needRefresh:r,onConfirmed:i,...o}=e,{raydium:c,txVersion:d}=a.qr.getState();if(!c)return"";let h=await (0,f.u)(),{execute:m}=await c.clmm.harvestLockPosition({lockData:t,txVersion:d,computeBudgetConfig:h}),g=(0,p.xZ)({action:"harvest",values:{symbolA:(0,s.h3)({mint:n.mintA,transformSol:!0}),symbolB:(0,s.h3)({mint:n.mintB,transformSol:!0})}});return m().then(e=>{let{txId:t,signedTx:s}=e;return l.aV.next({txId:t,...g,mintInfo:[n.mintA,n.mintB],signedTx:s,...o,onConfirmed:()=>{null==i||i(),r&&setTimeout(()=>a.EN.setState({refreshClmmPositionTag:Date.now()}),500)}}),t}).catch(e=>{var t;return null===(t=o.onError)||void 0===t||t.call(o),u.w.next({txError:e,...g}),""}).finally(o.onFinally)},setRewardsAct:async e=>{let{poolInfo:t,rewardInfos:n,newRewardInfos:r,onConfirmed:i,...o}=e,{raydium:s,txVersion:c}=a.qr.getState();if(!s||n.length+r.length<1)return"";let d=[],h=(0,p.xZ)({action:"updateRewards",values:{pool:t.id.slice(0,6)}}),m=await (0,f.u)();if(n.length){let e=await s.clmm.setRewards({poolInfo:t,ownerInfo:{useSOLBalance:!0},rewardInfos:n,computeBudgetConfig:m,txVersion:c});if(!r.length)return e.execute().then(e=>{let{txId:t,signedTx:n}=e;return l.aV.next({txId:t,...h,signedTx:n,mintInfo:r.map(e=>e.mint),onConfirmed:i}),t}).catch(e=>{var t;return null===(t=o.onError)||void 0===t||t.call(o),u.w.next({txError:e}),""}).finally(o.onFinally);d.push(e)}if(r.length){let e=await s.clmm.initRewards({poolInfo:t,ownerInfo:{useSOLBalance:!0},checkCreateATAOwner:!0,rewardInfos:r,computeBudgetConfig:m,txVersion:c});if(!n.length)return e.execute().then(e=>{let{txId:t}=e;return l.aV.next({txId:t,...h,mintInfo:n.map(e=>e.mint),onConfirmed:i}),t}).catch(e=>{var t;return null===(t=o.onError)||void 0===t||t.call(o),u.w.next({txError:e}),""}).finally(o.onFinally);d.push(e)}let g=d[0].builder,y=await g.addInstruction(d[1].builder.AllTxData).build();if(!y){var b,_;return null===(b=o.onError)||void 0===b||b.call(o),null===(_=o.onFinally)||void 0===_||_.call(o),""}let v=new Map;return n.forEach(e=>v.set(e.mint.address,e.mint)),r.forEach(e=>v.set(e.mint.address,e.mint)),y.execute().then(e=>{let{txId:t}=e;return l.aV.next({txId:t,...o,...h,mintInfo:Array.from(v.values())}),t}).catch(e=>{var t;return null===(t=o.onError)||void 0===t||t.call(o),u.w.next({txError:e}),""}).finally(o.onFinally)},createClmmPool:async e=>{let{token1:t,token2:n,config:r,price:o,startTime:s,execute:c,forerunCreate:d,getObserveState:h}=e,{raydium:m,publicKey:b,txVersion:_,chainTimeOffset:v,programIdConfig:w}=a.qr.getState();if(!m||!b)return u.w.next({noRpc:!0}),{txId:""};try{let e=d?void 0:await (0,f.u)(),a=await m.clmm.createPool({programId:w.CLMM_PROGRAM_ID,mint1:{...t,address:t.address},mint2:{...n,address:n.address},ammConfig:{...r,id:new i.nh(r.id),fundOwner:"",description:""},initialPrice:new y.Z(o),startTime:new(g())(s||Math.floor((Date.now()+v)/1e3)),computeBudgetConfig:e,forerunCreate:d,getObserveState:h,txVersion:_}),{execute:b}=a;if(c){let e=(0,p.xZ)({action:"createPool",values:{}});return b().then(r=>{let{txId:i,signedTx:o}=r;return l.aV.next({txId:i,...e,signedTx:o,mintInfo:[t,n]}),{txId:i,buildData:a}}).catch(e=>(u.w.next({txError:e}),{txId:""}))}return{txId:"",buildData:a}}catch(e){return u.w.next({status:"error",title:"Error",description:e.message.includes("byte array longer than")?"Current price out of range":e.message}),{txId:""}}},createFarm:async e=>{let{poolInfo:t,rewardInfos:n,onSent:i,onError:o,onFinally:s,onConfirmed:c}=e,{raydium:d,publicKey:f,txVersion:h}=a.qr.getState();if(!d||!f)return"";let{execute:m}=await d.clmm.initRewards({poolInfo:t,rewardInfos:n.map(e=>({...e,mint:(0,r.FRm)(e.mint)})),ownerInfo:{useSOLBalance:!0},checkCreateATAOwner:!0,txVersion:h}),g=(0,p.xZ)({action:"createFarm",values:{poolId:"".concat(t.id.slice(0,4),"...").concat(t.id.slice(-4))}});return m().then(e=>{let{txId:t,signedTx:r}=e;return l.aV.next({txId:t,...g,signedTx:r,mintInfo:n.map(e=>e.mint),onConfirmed:c}),null==i||i(),t}).catch(e=>(u.w.next({txError:e}),null==o||o(),"")).finally(s)},fetchAmmConfigsAct:async()=>{let{raydium:n}=a.qr.getState();if(!Object.keys(t().clmmFeeConfigs).length&&n)try{let t=await n.api.getClmmConfigs(),r=t.reduce((e,t)=>({...e,[t.id]:t}),{});e({clmmFeeConfigs:r||p.WR},!1,{type:"fetchAmmConfigsAct"})}catch(t){e({clmmFeeConfigs:p.WR},!1,{type:"fetchAmmConfigsAct"})}},convertPoolPrice:e=>{var t,n,i,o;let{pool:a,price:s}=e,u=new y.Z(null!=s?s:"0").clamp(1/10**Math.max(null!==(i=null===(t=a.mintA)||void 0===t?void 0:t.decimals)&&void 0!==i?i:0,null!==(o=null===(n=a.mintB)||void 0===n?void 0:n.decimals)&&void 0!==o?o:0,new y.Z(s).decimalPlaces()),Number.MAX_SAFE_INTEGER);return new r.tAG({baseToken:(0,r.MP3)(a.mintA),denominator:new(g())(10).pow(new(g())(20+a.mintA.decimals)),quoteToken:(0,r.MP3)(a.mintB),numerator:u.mul(new y.Z(10**(20+a.mintB.decimals))).toFixed(0)})},getPriceAndTick:e=>{let{pool:t,price:n,baseIn:i}=e;if(t)try{let e=new y.Z(n||"0").clamp(1/10**Math.max(t.mintA.decimals,t.mintB.decimals),Number.MAX_SAFE_INTEGER);return r.gA1.getPriceAndTick({poolInfo:t,price:e,baseIn:i})}catch(e){u.w.next({status:"error",title:"error",description:e.message.includes("not within the supported sqrtPrice range")?"Price for tick overflow":e.message})}},getTickPrice:e=>{let{pool:t,tick:n,baseIn:i}=e;if(t)try{return r.gA1.getTickPrice({poolInfo:t,tick:n,baseIn:i})}catch(e){u.w.next({status:"error",title:"error",description:e.message})}},computePairAmount:async e=>{var t,n,i,o;let{pool:s,inputA:u,tickLower:l,tickUpper:c,amount:d}=e,[p,f]=[a.qr.getState().connection,a.qr.getState().getEpochInfo],h=a.HN.getState().slippage,m=await f();if(!s||!p||void 0===l||void 0===l||!m)return;let[b,_]=[null!==(i=null===(t=s.mintA)||void 0===t?void 0:t.decimals)&&void 0!==i?i:6,null!==(o=null===(n=s.mintB)||void 0===n?void 0:n.decimals)&&void 0!==o?o:6],v=await r.NLW.getLiquidityAmountOutFromAmountIn({poolInfo:s,slippage:0,inputA:u,tickUpper:Math.max(l,c),tickLower:Math.min(l,c),amount:new(g())(new y.Z(d||"0").mul(10**(u?b:_)).toFixed(0)),add:!0,amountHasFee:!0,epochInfo:m});return{amountA:new y.Z(v.amountA.amount.toString()).div(10**b),amountSlippageA:new y.Z(v.amountSlippageA.amount.toString()).mul(1+h).div(10**b),amountB:new y.Z(v.amountB.amount.toString()).div(10**_),amountSlippageB:new y.Z(v.amountSlippageB.amount.toString()).mul(1+h).div(10**_),liquidity:v.liquidity,calResult:v}},loadAddRewardWhiteListAct:async n=>{let r=a.qr.getState().raydium;if(!r)return"";let{checkFetch:i}=n||{};i&&t().rewardWhiteListMints.length>0||r.clmm.getWhiteListMint({programId:a.qr.getState().programIdConfig.CLMM_PROGRAM_ID}).then(t=>{e({rewardWhiteListMints:t},!1,{type:"loadAddRewardWhiteListAct"})})},reset:()=>e(b)}),"useClmmStore")},93427:function(e,t,n){"use strict";n.d(t,{G:function(){return T}});var r=n(61034),i=n(64174),o=n(4156),a=n(38479),s=n(76953),u=n(81292),l=n(61903),c=n(68723),d=n(85893),p=n(28189),f=n(73458),h=n(51204),m=n(9334);let g={deposit:{title:"liquidity.tx_message.staked_successfully",desc:"liquidity.tx_message.staked_desc",txHistoryTitle:"transaction_history.liquidity_staked_title",txHistoryDesc:"transaction_history.liquidity_staked_desc",components:{sub:(0,d.jsx)(f.x,{as:"span",color:m.O9.textSecondary,fontWeight:"700"})}},withdraw:{title:"liquidity.tx_message.unStaked_successfully",desc:"liquidity.tx_message.unStaked_desc",txHistoryTitle:"liquidity.tx_message.unStaked_successfully",txHistoryDesc:"liquidity.tx_message.unStaked_desc",components:{sub:(0,d.jsx)(f.x,{as:"span",color:m.O9.textSecondary,fontWeight:"700"})}},claimIdo:{title:"portfolio.acceleraytor_tx_title",desc:"portfolio.acceleraytor_tx_desc",txHistoryTitle:"portfolio.acceleraytor_tx_title",txHistoryDesc:"portfolio.acceleraytor_tx_desc",components:{sub:(0,d.jsx)(f.x,{as:"span",color:m.O9.textSecondary,fontWeight:"700"})}},claimIdo1:{title:"portfolio.acceleraytor_tx_title",desc:"portfolio.acceleraytor_tx_1_desc",txHistoryTitle:"portfolio.acceleraytor_tx_title",txHistoryDesc:"portfolio.acceleraytor_tx_1_desc",components:{sub:(0,d.jsx)(f.x,{as:"span",color:m.O9.textSecondary,fontWeight:"700"})}},harvest:{title:"transaction_history.harvest_rewards",desc:"transaction_history.harvest_farm_reward_desc",txHistoryTitle:"transaction_history.harvest_reward_title",txHistoryDesc:"transaction_history.harvest_farm_reward_desc",components:{sub:(0,d.jsx)(f.x,{as:"span",color:m.O9.textSecondary,fontWeight:"700"})}},updateRewards:{title:"transaction_history.update_reward_title",desc:"transaction_history.update_reward_desc",txHistoryTitle:"transaction_history.update_reward_title",txHistoryDesc:"transaction_history.update_reward_desc",components:{sub:(0,d.jsx)(f.x,{as:"span",color:m.O9.textSecondary,fontWeight:"700"})}}},y=e=>{let{action:t,values:n}=e,r=g[t];return{title:h.ZP.t(r.title,n),description:(0,d.jsx)(p.cC,{i18nKey:r.desc,values:n,components:r.components}),txHistoryTitle:r.txHistoryTitle||r.title,txHistoryDesc:r.txHistoryDesc||r.desc,txValues:n}};var b=n(49895),_=n(98349),v=n(35214),w=n(68389),k=n(41178),x=n(56139),A=n(13550),S=n.n(A);let I={farmLoading:!1,refreshTag:0,refreshIdoTag:0},T=(0,l.Z)((e,t)=>({...I,harvestAllAct:async e=>{let{farmInfoList:t,execute:n=!0,...r}=e,{raydium:i,txVersion:a}=c.qr.getState();if(!i)return{txIds:[]};let s=await i.farm.harvestAllRewards({txVersion:a,farmInfoList:t.reduce((e,t)=>({...e,[t.id]:t}),{}),computeBudgetConfig:n?await (0,w.u)():void 0});if(n){let e=y({action:"harvest",values:{}}),t=s.transactions.length,{toastId:n,processedId:i,handler:a}=(0,v.xl)({txLength:t,...r}),u=()=>e.title;return s.execute({sequentially:!0,onTxUpdate:r=>{(0,k.WH)(r),(0,v.r4)({toastId:n,processedId:(0,v.Yi)({processedId:i,data:r}),txLength:t,meta:e,handler:a,getSubTxTitle:u})}}).then(r=>{let{txIds:o}=r;return(0,v.r4)({toastId:n,processedId:(0,v.Yi)({processedId:i,data:[]}),txLength:t,meta:e,handler:a,getSubTxTitle:u}),{txIds:o,buildData:s}}).catch(t=>{var n;return o.w.next({txError:t,...e}),null===(n=r.onError)||void 0===n||n.call(r),{txIds:[],buildData:s}}).finally(r.onFinally)}return{txIds:[],buildData:s}},withdrawFarmAct:async e=>{let{farmInfo:n,deposited:r,amount:i,userAuxiliaryLedgers:l,onSent:d,onError:p,onFinally:f}=e,{raydium:h,txVersion:m}=c.qr.getState();if(!h)return"";let g=await (0,w.u)(),{execute:b}=await h.farm.withdraw({farmInfo:n,deposited:r,amount:new(S())(new x.Z(i).mul(10**n.lpMint.decimals).toFixed(0)),userAuxiliaryLedgers:l,computeBudgetConfig:g,txVersion:m}),_=y({action:new x.Z(i).isZero()?"harvest":"withdraw",values:{amount:(0,u.Hk)(i,n.lpMint.decimals),symbol:"".concat((0,s.a)(n.symbolMints)).concat(n.symbolMints.length>1?" LP":"")}});return b().then(e=>{let{txId:n,signedTx:r}=e;return a.aV.next({txId:n,..._,signedTx:r,onSent:d,onError:p}),t().refreshFarmAct(),n}).catch(e=>(null==p||p(),o.w.next({..._,txError:e}),"")).finally(f)},depositFarmAct:async e=>{let{farmInfo:n,amount:r,userAuxiliaryLedgers:i,onSent:l,onError:d,onFinally:p}=e,{raydium:f,txVersion:h}=c.qr.getState();if(!f)return"";let m=new(S())(new x.Z(r).mul(10**n.lpMint.decimals).toFixed(0));try{let e=await (0,w.u)(),{execute:c}=await f.farm.deposit({farmInfo:n,amount:m,userAuxiliaryLedgers:i,computeBudgetConfig:e,txVersion:h}),g=y({action:"deposit",values:{amount:(0,u.Hk)(r,n.lpMint.decimals),symbol:"".concat((0,s.a)(n.symbolMints)).concat(n.symbolMints.length>1?" LP":"")}});return c().then(e=>{let{txId:n,signedTx:r}=e;return a.aV.next({txId:n,...g,signedTx:r,onSent:l,onError:d}),t().refreshFarmAct(),n}).catch(e=>(null==d||d(),o.w.next({...g,txError:e}),"")).finally(()=>null==p?void 0:p())}catch(e){return o.w.next({status:"error",title:"error",detail:e.message}),null==d||d(),null==p||p(),""}},withdrawCreatorFarmRewardAct:async e=>{let{farmInfo:n,withdrawMint:r,onSent:i,onError:s,onFinally:u}=e,{raydium:l,txVersion:d}=c.qr.getState();if(!l)return"";try{let e=await (0,w.u)(),{execute:c}=await l.farm.withdrawFarmReward({farmInfo:n,withdrawMint:r,txVersion:d,computeBudgetConfig:e}),p=y({action:"harvest",values:{}});return c().then(e=>{let{txId:n,signedTx:r}=e;return a.aV.next({txId:n,...p,signedTx:r,onSent:i,onError:s}),t().refreshFarmAct(),n}).catch(e=>(null==s||s(),o.w.next({...p,txError:e}),"")).finally(()=>null==u?void 0:u())}catch(e){return o.w.next({status:"error",title:"error",detail:e.message}),null==s||s(),null==u||u(),""}},createFarmAct:async e=>{let{poolInfo:t,rewardInfos:n,onSent:i,onError:s,onFinally:u,onConfirmed:l}=e,{raydium:d,txVersion:p}=c.qr.getState();if(!d)return"";let{execute:f,extInfo:h}=await d.farm.create({poolInfo:t,rewardInfos:n.map(e=>({...e,rewardMint:(0,r.B0r)(e.mint)})),txVersion:p});return f().then(e=>{let{txId:t,signedTx:n}=e;return a.aV.next({txId:t,signedTx:n,onSent:()=>{null==i||i(h)},onConfirmed:()=>{null==l||l(),(0,_.bf)()},onError:s}),t}).catch(e=>(o.w.next({txError:e}),null==s||s(),"")).finally(u)},withdrawFarmRewardAct:async e=>{let{farmInfo:t,withdrawMint:n,onSent:r,onError:s,onFinally:u}=e,{raydium:l,txVersion:d}=c.qr.getState();if(!l)return"";let{execute:p}=await l.farm.withdrawFarmReward({farmInfo:t,withdrawMint:new i.nh(n),txVersion:d}),f=y({action:"harvest",values:{}});return p().then(e=>{let{txId:t,signedTx:n}=e;return a.aV.next({txId:t,signedTx:n,...f}),null==r||r(),t}).catch(e=>(o.w.next({txError:e,...f}),null==s||s(),"")).finally(u)},editFarmRewardsAct:async e=>{let{farmInfo:t,editedRewards:n,newRewards:r,onConfirmed:s,...u}=e,{raydium:l,connection:d,publicKey:p,txVersion:f}=c.qr.getState();if(!l||!d||!p)return"";let h=[],m=y({action:"updateRewards",values:{pool:t.id.slice(0,6)}});if(n.length){let e=await l.farm.restartRewards({farmInfo:t,newRewardInfos:n.map(e=>({...e,mint:new i.nh((0,b.eI)(e.mint.toBase58()))})),txVersion:f});if(!r.length)return e.execute().then(e=>{let{txId:t,signedTx:n}=e;return a.aV.next({txId:t,signedTx:n,...m,onConfirmed:s}),t}).catch(e=>{var t;return null===(t=u.onError)||void 0===t||t.call(u),o.w.next({txError:e,...m}),""}).finally(u.onFinally);h.push(e)}if(r.length){let e=await l.farm.addNewRewardsToken({farmInfo:t,newRewardInfos:r.map(e=>({...e,mint:new i.nh((0,b.eI)(e.mint.toBase58()))})),txVersion:f});if(!h.length)return e.execute().then(e=>{let{txId:t}=e;return a.aV.next({txId:t,...m,onConfirmed:s}),t}).catch(e=>{var t;return null===(t=u.onError)||void 0===t||t.call(u),o.w.next({txError:e,...m}),""}).finally(u.onFinally);h.push(e)}let g=h[0].builder;g.addInstruction(h[1].builder.AllTxData);let _=await g.versionBuild({txVersion:f});if(!_){var v,w;return null===(v=u.onError)||void 0===v||v.call(u),null===(w=u.onFinally)||void 0===w||w.call(u),""}return _.execute().then(e=>{let{txId:t}=e;return a.aV.next({txId:t,...m,onConfirmed:s}),t}).catch(e=>(o.w.next({txError:e,...m}),""))},claimIdoAct:async e=>{let{onSent:t,onError:n,onFinally:r,...i}=e,{raydium:s,txVersion:l}=c.qr.getState();if(!s)return"";let{execute:d}=await s.ido.claim({...i,txVersion:l}),{ownerInfo:{pc:p,coin:f},idoKeys:{projectInfo:h,buyInfo:m}}=i,[g,_]=[!new x.Z(f).isZero(),!new x.Z(p).isZero()];if(!g&&!_)return o.w.next({description:"no claimable amounts"}),"";let v=g?{amountA:(0,u.Hk)(new x.Z(f).div(10**h.mint.decimals).toString(),h.mint.decimals),symbolA:(0,b.h3)({mint:h.mint,transformSol:!0}),amountB:(0,u.Hk)(new x.Z(p).div(10**m.mint.decimals).toString(),m.mint.decimals),symbolB:(0,b.h3)({mint:m.mint,transformSol:!0})}:{amountA:(0,u.Hk)(new x.Z(p).div(10**m.mint.decimals).toString(),m.mint.decimals),symbolA:(0,b.h3)({mint:m.mint,transformSol:!0})},w=y({action:g&&_?"claimIdo1":"claimIdo",values:v});return d().then(e=>{let{txId:r,signedTx:i}=e;return a.aV.next({...w,signedTx:i,txId:r,onSent:t,onError:n}),r}).catch(e=>(null==n||n(),o.w.next({...w,txError:e}),"")).finally(r)},refreshFarmAct:()=>{e({refreshTag:Date.now()})},refreshIdoAct:()=>{e({refreshIdoTag:Date.now()})}}),"useFarmStore")},12723:function(e,t,n){"use strict";n.d(t,{r:function(){return I},H:function(){return E}});var r=n(61034),i=n(61903),o=n(68723),a=n(4156),s=n(38479),u=n(35214),l=n(81292),c=n(85893),d=n(28189),p=n(73458),f=n(51204),h=n(9334);let m={addLiquidity:{title:"transaction_history.name_add_liquidity",desc:"transaction_history.add_liquidity_desc",txHistoryTitle:"transaction_history.name_add_liquidity",txHistoryDesc:"transaction_history.add_liquidity_desc",components:{sub:(0,c.jsx)(p.x,{as:"span",color:h.O9.textSecondary,fontWeight:"700"})}},removeLiquidity:{title:"transaction_history.name_remove_liquidity",desc:"transaction_history.remove_liquidity_desc",txHistoryTitle:"transaction_history.name_remove_liquidity",txHistoryDesc:"transaction_history.remove_liquidity_desc",components:{sub:(0,c.jsx)(p.x,{as:"span",color:h.O9.textSecondary,fontWeight:"700"})}},createPool:{title:"liquidity.create_pool_tx_title",desc:"liquidity.create_pool_tx_desc",txHistoryTitle:"",txHistoryDesc:"",components:{sub:(0,c.jsx)(p.x,{as:"span",color:h.O9.textSecondary,fontWeight:"700"})}},removeLpBeforeMigrate:{title:"transaction_history.name_remove_liquidity",desc:"transaction_history.name_remove_liquidity",txHistoryTitle:"",txHistoryDesc:"",components:{}},migrateToClmm:{title:"migrate_clmm.migrate_clmm_tx_title",desc:"migrate_clmm.migrate_clmm_tx_desc",txHistoryTitle:"",txHistoryDesc:"",components:{}},lockLp:{title:"transaction_history.lock_position",desc:"transaction_history.position_locked",txHistoryTitle:"transaction_history.lock_position",txHistoryDesc:"transaction_history.position_locked",components:{sub:(0,c.jsx)(p.x,{as:"span",color:h.O9.textSecondary,fontWeight:"700"})}},harvestLock:{title:"transaction_history.harvest_rewards",desc:"transaction_history.harvest_lock_reward_desc",txHistoryTitle:"transaction_history.harvest_rewards",txHistoryDesc:"transaction_history.harvest_lock_reward_desc",components:{}}},g=e=>{let{action:t,values:n={}}=e,r=m[t];return{title:f.ZP.t(r.title,n),description:(0,c.jsx)(d.cC,{i18nKey:r.desc,values:n,components:r.components}),txHistoryTitle:r.txHistoryTitle||r.title,txHistoryDesc:r.txHistoryDesc||r.desc,txValues:n}};var y=n(49895),b=n(62330),_=n(90992),v=n(41178),w=n(13550),k=n.n(w),x=n(56139),A=n(68389),S=n(95378);let I="_r_lqd_slippage_",T={createPoolFee:"",slippage:.025,cpmmFeeConfigs:{}},E=(0,i.Z)((e,t)=>({...T,addCpmmLiquidityAct:async e=>{let{onSent:n,onError:i,onFinally:u,...c}=e,{raydium:d,txVersion:p,getEpochInfo:f}=o.qr.getState();if(!d)return"";let h=c.baseIn,m=await (0,A.u)(),b=new r.gGi((1e4*t().slippage).toFixed(0),1e4),_=await d.cpmm.getRpcPoolInfo(c.poolInfo.id),v=d.cpmm.computePairAmount({baseIn:c.baseIn,amount:c.inputAmount,slippage:new r.gGi(0),epochInfo:await f(),baseReserve:_.baseReserve,quoteReserve:_.quoteReserve,poolInfo:{...c.poolInfo,lpAmount:new x.Z(_.lpAmount.toString()).div(10**_.lpDecimals).toNumber()}}),{execute:w}=await d.cpmm.addLiquidity({...c,inputAmount:new(k())(new x.Z(c.inputAmount).mul(10**c.poolInfo[h?"mintA":"mintB"].decimals).toFixed(0)),slippage:b,computeResult:{...v,liquidity:new r.gGi(new(k())(1)).sub(b).mul(v.liquidity).quotient},txVersion:p,computeBudgetConfig:m}),S=g({action:"addLiquidity",values:{amountA:(0,l.Hk)(h?c.inputAmount:c.anotherAmount,c.poolInfo[h?"mintA":"mintB"].decimals),symbolA:(0,y.h3)({mint:c.poolInfo.mintA,transformSol:!0}),amountB:(0,l.Hk)(h?c.anotherAmount:c.inputAmount,c.poolInfo[h?"mintB":"mintA"].decimals),symbolB:(0,y.h3)({mint:c.poolInfo.mintB,transformSol:!0})}});return w().then(e=>{let{txId:t,signedTx:r}=e;return s.aV.next({txId:t,...S,signedTx:r,mintInfo:[c.poolInfo.mintA,c.poolInfo.mintB],onError:i,onConfirmed:c.onConfirmed}),null==n||n(),t}).catch(e=>(null==i||i(),a.w.next({...S,txError:e}),"")).finally(u)},addLiquidityAct:async e=>{let{onSent:t,onError:n,onFinally:i,...u}=e,{raydium:c,txVersion:d}=o.qr.getState();if(!c)return"";let p="a"===u.fixedSide?"mintB":"mintA",{execute:f}=await c.liquidity.addLiquidity({...u,amountInA:new r.dtM((0,r.MP3)(u.poolInfo.mintA),new x.Z(u.amountA).mul(10**u.poolInfo.mintA.decimals).toFixed(0)),amountInB:new r.dtM((0,r.MP3)(u.poolInfo.mintB),new x.Z(u.amountB).mul(10**u.poolInfo.mintB.decimals).toFixed(0)),otherAmountMin:new r.dtM((0,r.MP3)(u.poolInfo[p]),new x.Z(u.otherAmountMin).mul(10**u.poolInfo[p].decimals).toFixed(0)),txVersion:d,computeBudgetConfig:await (0,A.u)()}),h=g({action:"addLiquidity",values:{amountA:(0,l.Hk)(u.amountA,u.poolInfo.mintA.decimals),symbolA:(0,y.h3)({mint:u.poolInfo.mintA,transformSol:!0}),amountB:(0,l.Hk)(u.amountB,u.poolInfo.mintB.decimals),symbolB:(0,y.h3)({mint:u.poolInfo.mintB,transformSol:!0})}});return f().then(e=>{let{txId:r,signedTx:i}=e;return s.aV.next({txId:r,...h,signedTx:i,mintInfo:[u.poolInfo.mintA,u.poolInfo.mintB],onError:n,onConfirmed:u.onConfirmed}),null==t||t(),r}).catch(e=>(null==n||n(),a.w.next({...h,txError:e}),"")).finally(i)},removeLiquidityAct:async e=>{let{onSent:n,onError:r,onFinally:i,...u}=e,{raydium:c,txVersion:d}=o.qr.getState(),p=t().slippage;if(!c)return"";let f=await (0,A.u)(),{poolInfo:h,lpAmount:m,amountA:b,amountB:_,config:v}=u,{execute:w}=await c.liquidity.removeLiquidity({poolInfo:h,lpAmount:new(k())(m),baseAmountMin:new(k())(new x.Z(b).mul(1-p).toFixed(0)),quoteAmountMin:new(k())(new x.Z(_).mul(1-p).toFixed(0)),config:v,txVersion:d,computeBudgetConfig:f}),S=g({action:"removeLiquidity",values:{amountA:(0,l.Hk)(new x.Z(b).div(10**h.mintA.decimals).toString(),u.poolInfo.mintA.decimals),symbolA:(0,y.h3)({mint:u.poolInfo.mintA,transformSol:!0}),amountB:(0,l.Hk)(new x.Z(_).div(10**h.mintB.decimals).toString(),u.poolInfo.mintB.decimals),symbolB:(0,y.h3)({mint:u.poolInfo.mintB,transformSol:!0})}});return w().then(e=>{let{txId:t,signedTx:i}=e;return s.aV.next({txId:t,...S,signedTx:i,mintInfo:[u.poolInfo.mintA,u.poolInfo.mintB],onError:r}),null==n||n(),t}).catch(e=>(null==r||r(),a.w.next({...S,txError:e}),"")).finally(i)},removeCpmmLiquidityAct:async e=>{let{onSent:n,onError:i,onFinally:u,...c}=e,{raydium:d,txVersion:p}=o.qr.getState();if(!d)return"";let{poolInfo:f,lpAmount:h,amountA:m,amountB:b}=c,_=await (0,A.u)(),{execute:v}=await d.cpmm.withdrawLiquidity({poolInfo:f,lpAmount:new(k())(h),slippage:new r.gGi((1e4*t().slippage).toFixed(0),1e4),txVersion:p,computeBudgetConfig:_}),w=g({action:"removeLiquidity",values:{amountA:(0,l.Hk)(m,c.poolInfo.mintA.decimals),symbolA:(0,y.h3)({mint:c.poolInfo.mintA,transformSol:!0}),amountB:(0,l.Hk)(b,c.poolInfo.mintB.decimals),symbolB:(0,y.h3)({mint:c.poolInfo.mintB,transformSol:!0})}});return v().then(e=>{let{txId:t,signedTx:r}=e;return s.aV.next({txId:t,...w,signedTx:r,mintInfo:[c.poolInfo.mintA,c.poolInfo.mintB],onError:i}),null==n||n(),t}).catch(e=>(null==i||i(),a.w.next({...w,txError:e}),"")).finally(u)},createPoolAct:async t=>{let{pool:n,baseAmount:r,quoteAmount:i,startTime:u,onSent:l,onError:c,onFinally:d,onConfirmed:p}=t,{raydium:f,programIdConfig:h,txVersion:m}=o.qr.getState();if(!f)return"";let b=await (0,A.u)(),{execute:_,extInfo:v}=await f.cpmm.createPool({programId:h.CREATE_CPMM_POOL_PROGRAM,poolFeeAccount:h.CREATE_CPMM_POOL_FEE_ACC,feeConfig:n.feeConfig,mintA:n.mintA,mintB:n.mintB,mintAAmount:new(k())(r),mintBAmount:new(k())(i),startTime:new(k())((u?Number(u):Date.now()+6e4)/1e3),ownerInfo:{useSOLBalance:!0},associatedOnly:!1,txVersion:m,computeBudgetConfig:b}),w=g({action:"createPool",values:{mintA:(0,y.h3)({mint:n.mintA,transformSol:!0}),mintB:(0,y.h3)({mint:n.mintB,transformSol:!0})}}),x=()=>{null==p||p(),e({newCreatedPool:v.address})};return _().then(e=>{let{txId:t,signedTx:r}=e;return s.aV.next({txId:t,...w,signedTx:r,mintInfo:[n.mintA,n.mintB],onSent:l,onError:c,onConfirmed:x}),t}).catch(e=>(null==c||c(),a.w.next({txError:e}),"")).finally(d)},migrateToClmmAct:async e=>{let{onSent:t,onError:n,onFinally:r,onConfirmed:i,...s}=e,{raydium:l,txVersion:c,wallet:d,connection:p}=o.qr.getState();if(!l||!p)return"";let f=await (0,A.u)(),{execute:h,transactions:m}=await l.liquidity.removeAllLpAndCreateClmmPosition({...s,createPositionInfo:{...s.createPositionInfo,tickLower:Math.min(s.createPositionInfo.tickLower,s.createPositionInfo.tickUpper),tickUpper:Math.max(s.createPositionInfo.tickLower,s.createPositionInfo.tickUpper)},computeBudgetConfig:f,getEphemeralSigners:d?await (0,b.Z)(d):void 0,txVersion:c}),y=g({action:"removeLpBeforeMigrate"}),w=g({action:"migrateToClmm",values:{mint:(0,_.Sw)(s.poolInfo)}}),k=m.length,{toastId:x,processedId:S,handler:I}=(0,u.xl)({txLength:k,onSent:t,onError:n,onFinally:r,onConfirmed:i}),T=e=>e===m.length-1?w.title:y.title;return h({sequentially:!0,onTxUpdate:e=>{(0,v.WH)(e),(0,u.r4)({toastId:x,processedId:(0,u.Yi)({processedId:S,data:e}),txLength:k,meta:w,handler:I,getSubTxTitle:T})}}).then(e=>{let{txIds:t}=e;return(0,u.r4)({toastId:x,processedId:(0,u.Yi)({processedId:S,data:[]}),txLength:k,meta:w,handler:I,getSubTxTitle:T}),t[0]}).catch(e=>(null==n||n(),a.w.next({txError:e,...w}),""))},lockCpmmLpAct:async e=>{let{poolInfo:t,lpAmount:n,...r}=e,{raydium:i,txVersion:u,connection:l,wallet:c}=o.qr.getState();if(!i||!l)return"";let{execute:d,extInfo:p}=await i.cpmm.lockLp({poolInfo:t,lpAmount:n,withMetadata:!0,computeBudgetConfig:await (0,A.u)(),getEphemeralSigners:c?await (0,b.Z)(c):void 0,txVersion:u}),f=g({action:"lockLp",values:{position:"".concat(new x.Z(n.toString()).div(10**t.lpMint.decimals).toString()," ").concat((0,y.h3)({mint:t.mintA,transformSol:!0}),"-").concat((0,y.h3)({mint:t.mintB,transformSol:!0})," LP")}});return d().then(e=>{let{txId:n,signedTx:i}=e;return s.aV.next({txId:n,...f,signedTx:i,mintInfo:[t.mintA,t.mintB],...r,onSent:()=>{var e;return null===(e=r.onSent)||void 0===e?void 0:e.call(r,p)}}),n}).catch(e=>{var t;return null===(t=r.onError)||void 0===t||t.call(r),a.w.next({txError:e}),""}).finally(()=>{var e;return null===(e=r.onFinally)||void 0===e?void 0:e.call(r,p)})},harvestLockCpmmLpAct:async e=>{let{poolInfo:t,nftMint:n,lpFeeAmount:r,...i}=e,{raydium:u,txVersion:l,connection:c}=o.qr.getState();if(!u||!c)return"";let{execute:d}=await u.cpmm.harvestLockLp({poolInfo:t,nftMint:n,lpFeeAmount:r,txVersion:l}),p=g({action:"harvestLock",values:{mintA:(0,y.h3)({mint:t.mintA,transformSol:!0}),mintB:(0,y.h3)({mint:t.mintB,transformSol:!0})}});return d().then(e=>{let{txId:n,signedTx:r}=e;return s.aV.next({txId:n,...p,signedTx:r,mintInfo:[t.mintA,t.mintB],...i,onConfirmed:()=>{var e;null===(e=i.onConfirmed)||void 0===e||e.call(i),setTimeout(()=>S.EN.setState({refreshCpmmPositionTag:Date.now()}),500)}}),n}).catch(e=>{var t;return null===(t=i.onError)||void 0===t||t.call(i),a.w.next({txError:e}),""}).finally(i.onFinally)},computePairAmount:async e=>{let{pool:n,amount:i,baseIn:a,baseReserve:s,quoteReserve:u}=e,{raydium:l,programIdConfig:c,getEpochInfo:d}=o.qr.getState();if(!l)return{output:"0",maxOutput:"0",minOutput:"0",liquidity:new(k())(0)};let p=n.programId===c.CREATE_CPMM_POOL_PROGRAM.toBase58(),f={poolInfo:n,amount:i,baseIn:a,slippage:new r.gGi((1e4*t().slippage).toFixed(0),1e4)},h=p?l.cpmm.computePairAmount({...f,slippage:new r.gGi(0),epochInfo:await d(),poolInfo:f.poolInfo,baseReserve:s,quoteReserve:u}):l.liquidity.computePairAmount({...f,poolInfo:{...f.poolInfo,mintAmountA:new x.Z(s.toString()).div(10**n.mintA.decimals).toNumber(),mintAmountB:new x.Z(u.toString()).div(10**n.mintB.decimals).toNumber()}}),m=a?n.mintB:n.mintA;return{output:h.anotherAmount instanceof r.dtM?h.anotherAmount.toExact():new x.Z(h.anotherAmount.amount.toString()).div(10**m.decimals).toDecimalPlaces(m.decimals).toString(),maxOutput:h.maxAnotherAmount instanceof r.dtM?h.maxAnotherAmount.toExact():new x.Z(h.maxAnotherAmount.amount.toString()).div(10**m.decimals).toDecimalPlaces(m.decimals).toString(),minOutput:h.minAnotherAmount instanceof r.dtM?h.minAnotherAmount.toExact():new x.Z(h.minAnotherAmount.amount.toString()).div(10**m.decimals).toDecimalPlaces(m.decimals).toString(),liquidity:h.liquidity}},getCreatePoolFeeAct:async()=>{let{connection:n,programIdConfig:i}=o.qr.getState();if(!n||t().createPoolFee)return;let a=(0,r.RER)(i.CREATE_CPMM_POOL_PROGRAM,0),s=await n.getAccountInfo(a.publicKey,o.qr.getState().commitment);s&&e({createPoolFee:new x.Z(r.Hl7.decode(s.data).createPoolFee.toString()).div(1e9).toString()})},fetchCpmmConfigsAct:async()=>{let{raydium:n}=o.qr.getState();if(!Object.keys(t().cpmmFeeConfigs).length&&n)try{let t=await n.api.getCpmmConfigs(),r=t.reduce((e,t)=>({...e,[t.id]:t}),{});e({cpmmFeeConfigs:r||{}},!1,{type:"fetchCpmmConfigsAct"})}catch(t){e({cpmmFeeConfigs:{}},!1,{type:"fetchCpmmConfigsAct"})}},resetComputeStateAct:()=>{e({},!1,{type:"resetComputeStateAct"})}}),"useLiquidityStore")},95378:function(e,t,n){"use strict";n.d(t,{EN:function(){return g},hv:function(){return d}});var r=n(81292),i=n(61903),o=n(68723),a=n(61452),s=n(4156),u=n(56139),l=n(46578),c=n(22721);let d={tokenAccounts:[],tokenAccountRawInfos:[],tokenAccountMap:new Map,refreshClmmPositionTag:0,refreshCpmmPositionTag:0,refreshTokenAccTime:Date.now()},[p,f,h,m]=[!1,0,"",void 0],g=(0,i.Z)((e,t)=>({...d,fetchTokenAccountAct:async e=>{let{commitment:t,forceFetch:n}=e,{address:r}=o.qr.getState();if(r&&!(!n&&(p||Date.now()-f<3e3&&r===h&&t===m))){m=t,p=!0,h=r;try{(0,l.Z)("rpc: get owner acc info"),(0,l.Z)("rpc: get owner token acc info"),await (0,c.Or)(r,n),f=Date.now(),p=!1,o.qr.setState({tokenAccLoaded:!0})}catch(e){p=!1,s.w.next({status:"error",title:"fetch token account error",detail:e.message})}}},getTokenBalanceUiAmount:e=>{var n,i,s;let{mint:l,decimals:c,isNative:d=!0}=e,p=null==l?void 0:l.toString(),f={rawAmount:new u.Z(0),amount:new u.Z(0),text:"0",localeText:"0",decimals:0,isZero:!0,gt:()=>!1,isLoading:!1},h=o.qr.getState().address;if(!h)return f;let m=a.uM.getState().tokenMap.get(p),g=null!==(s=null!=c?c:null==m?void 0:m.decimals)&&void 0!==s?s:6,y=(null===(n=t().tokenAccountMap.get(p))||void 0===n?void 0:n.find(e=>e.isAssociated||e.isNative===d))||(null===(i=t().tokenAccountMap.get(p))||void 0===i?void 0:i[0]);if(!y)return{...f,isLoading:!0};if(!m&&void 0===c)return f;let b=new u.Z(y.amount.toString()),_=new u.Z(b.toString()).div(10**g);return{rawAmount:b,amount:_,decimals:g,text:(0,r.Lu)(y.amount.toFixed(4)),localeText:(0,r.Hk)(_.toDecimalPlaces(g,u.Z.ROUND_DOWN),g),isZero:b.eq(0),gt:e=>!!e&&b.gt(e)}},reset:()=>{e(d)}}),"useTokenAccountStore")},61452:function(e,t,n){"use strict";n.d(t,{SI:function(){return l},uM:function(){return f},xi:function(){return p}});var r=n(61903),i=n(68723),o=n(43903),a=n(22721);let s="_r_cus_t_",u={tokenList:[],displayTokenList:[],extraLoadedTokenList:[],tokenMap:new Map,tokenPriceRecord:new Map,mintGroup:{official:new Set,jup:new Set},whiteListMap:new Set},l=new Set([]),c=e=>{let t=JSON.parse((0,o.qn)(s)||"[]");if(!t.some(t=>t.address===e.address))try{(0,o.Nh)(s,JSON.stringify(t.concat([{...e,time:Date.now()}])))}catch(e){console.warn("local storage exceed")}},d=e=>{let t=JSON.parse((0,o.qn)(s)||"[]");(0,o.Nh)(s,JSON.stringify(t.filter(t=>t.address!==e.address)))},p=e=>{let t=JSON.parse((0,o.qn)(s)||"[]"),n=t.find(t=>t.address===e);return n},f=(0,r.Z)((e,t)=>({...u,loadTokensAct:()=>{let n=i.qr.getState().raydium;n||(n={token:{tokenList:[],tokenMap:new Map}});let r={type:"loadTokensAct"};(0,a.q6)().then(i=>{let o=new Map;i.forEach(e=>{let t=n.token.tokenMap.has(e.address);t||(n.token.tokenList.push(e),o.set(e.address,e))}),n.token.tokenMap=o;let a=new Map(Array.from(o)),s=n.token.tokenList;e({tokenList:s,tokenMap:a,whiteListMap:new Set},!1,r),t().setDisplayTokenListAct()})},setDisplayTokenListAct:()=>{let{raydium:n,displayTokenSettings:r,jupTokenType:o}=i.qr.getState();n&&e({displayTokenList:t().tokenList},!1,{type:"setDisplayTokenListAct"})},setExtraTokenListAct:n=>{let{token:r,addToStorage:i=!0,update:o}=n,{tokenList:a,tokenMap:s,mintGroup:u,extraLoadedTokenList:l,setDisplayTokenListAct:d}=t();(!s.has(r.address)||o)&&(s.set(r.address,r),e({tokenList:a.some(e=>e.address===r.address)?a.map(e=>e.address===r.address?r:e):[...a,r],tokenMap:new Map(Array.from(s)),extraLoadedTokenList:l.some(e=>e.address===r.address)?l.map(e=>e.address===r.address?r:e):[...l,r]}),d(),i&&"unknown"===r.type&&c(r))},unsetExtraTokenListAct:n=>{let{tokenList:r,tokenMap:i,mintGroup:o,extraLoadedTokenList:a,setDisplayTokenListAct:s}=t();t().tokenMap.has(n.address)&&(i.set(n.address,{...n,userAdded:!1}),e({tokenList:[...r.map(e=>e.address===n.address?{...n,userAdded:!1}:e)],tokenMap:new Map(Array.from(i)),extraLoadedTokenList:a.filter(e=>e.address!==n.address)}),s(),d(n))},getChainTokenInfo:async e=>({}),getTokenDecimal:async(e,n)=>{var r;let{tokenMap:i,getChainTokenInfo:o}=t(),a=i.get(e.toString());if(n)return n.decimals;if(a)return a.decimals;let s=await o(e.toString());return null!==(r=null==s?void 0:s.decimals)&&void 0!==r?r:0},isVerifiedToken:async e=>{let{mint:n,tokenInfo:r,useWhiteList:i=!1}=e,{getChainTokenInfo:o,mintGroup:a}=t(),s=r?void 0:await o(n);return!!s&&null===s.decimals}}),"useTokenStore")},9334:function(e,t,n){"use strict";n.d(t,{C0:function(){return i},O9:function(){return o},_5:function(){return r}});let r={primary:"#abc4ff",secondary:"#22D1F8",secondary10:"rgba(34, 209, 248, 0.1)",secondary15:"#A01F1A26",backgroundLinear:"",backgroundDark:"#0b1022",backgroundDark50:"#0b102280",backgroundMedium:"#161E32",backgroundLight:"#1C243E",backgroundLight50:"#1C243E88",backgroundLight30:"#1C243E4d",backgroundLight100:"#1C243E4d",backgroundTransparent12:"rgba(171, 196, 255, 0.12)",backgroundTransparent07:"rgba(171, 196, 255, 0.07)",backgroundTransparent10:"rgba(171, 196, 255, 0.1)",backgroundLightF7:"#F7F7F7",backgroundThemeLight:"#A01F1A0D",borderLight:"1px solid #ebebeb",borderLightColor:"#ebebeb",borderLightBA:"#bababa",backgroundF9F9F9:"#f9f9f9",backgroundF4F4F4:"#f4f4f4",backgroundLightF4:"#f4f4f4",backgroundFAFAFA:"#fafafa",textPrimary:"#ECF5FF",textSecondary:"#abc4ff",textTertiary:"#abc4ff80",textRevertPrimary:"#181F35",textSecondaryHover:"#821915",textLight:"#999999",textLink:"#22D1F8",text6a6a6a:"#6a6a6a",textQuaternary:"#C4D6FF",textQuinary:"#1C243E",textSenary:"rgba(196, 214, 255, 0.5)",textSeptenary:"#22D1F8",textPurple:"#8C6EEF",textPink:"#FF4EA3",buttonPrimary:"#22D1F8",buttonPrimary__01:"#22D1F8",buttonPrimary__02:"#39D0D8",buttonSolidText:"#0B1022",buttonSecondary:"#8C6EEF",switchOn:"#22D1F8",switchOff:"#ABC4FF",selectActive:"#abc4ff",selectActiveSecondary:"#22D1F8",selectInactive:"#abc4ff1a",chart01:"#abc4ff",chart02:"#39D0D8",chart03:"#8C6EEF",chart04:"#2B6AFF",chart05:"#FF7043",chart06:"#FED33A",chart07:"#4F53F3",chart08:"#22D1F8",chart09:"#8C6EEF33",iconBg:"#8CA7E8",iconEmptyStroke:"#0B1022",semanticSuccess:"#22D1F8",semanticError:"#FF4EA3",semanticWarning:"#FED33A",semanticNeutral:"#ABC4FF",semanticFocus:"#A259FF",semanticFocusShadow:"#A259FF33",tabFolderTabListBg:"var(--background-light-opacity)",stepActiveBg:"var(--background-light)",stepHoofBg:"var(--primary)",priceFloatingUp:"#22D1F8",priceFloatingDown:"#FF4EA3",priceFloatingFlat:"#888888",tooltipBg:"#0D1A3E",popoverBg:"#141f3a",scrollbarThumb:"rgba(255, 255, 255, 0.2)",badgePurple:"rgba(140, 110, 239, 0.5)",badgeBlue:"rgba(34, 209, 248, 0.5)",dividerBg:"rgba(171, 196, 255, 0.12)",inputMask:"#0B102266",backgroundApp:"linear-gradient(29.71deg, #121C34 -18.98%, #050D17 14.6%, #070A15 56.26%, rgba(9, 14, 29, 0.97) 85.27%)",solidButtonBg:"linear-gradient(272.03deg, #39D0D8 2.63%, #22D1F8 95.31%)",solidButtonHoverBg:"linear-gradient(272.03deg, #39D0D8 2.63%, #22D1F8 95.31%)",outlineButtonBg:"linear-gradient(272.03deg, rgba(57, 208, 216, 0.1) 2.63%, rgba(34, 209, 248, 0.1) 95.31%)",filledProgressBg:"linear-gradient(270deg, #8C6EEF 0%, #4F53F3 100%)",transparentContainerBg:"linear-gradient(271.31deg, rgba(96, 59, 200, 0.2) 1.47%, rgba(140, 110, 239, 0.12) 100%)",modalContainerBg:"#ABC4FF12",infoButtonBg:"#ABC4FF33",warnButtonBg:"#FED33A33",warnButtonLightBg:"#FED33A1A",buttonBg01:"#ABC4FF1F",lightPurple:"#BFD2FF",background01:"#090D1D",background02:"rgba(22, 22, 22, 0.5)",background03:"#FF4EA31A",cardBorder01:"#8C6EEF80",text01:"#D6CC56",text02:"#fff",text03:"#b5b7da",brandGradient:"linear-gradient(244deg, #7748FC 8.17%, #39D0D8 101.65%)",dividerDashGradient:"repeating-linear-gradient(to right, currentColor 0 5px, transparent 5px 10px)",tokenAvatarBg:"linear-gradient(127deg, rgba(171, 196, 255, 0.20) 28.69%, rgba(171, 196, 255, 0.00) 100%) #0b102280",panelCardShadow:"0px 8px 24px rgba(79, 83, 243, 0.12)",panelCardBorder:"unset"},i={primary:"rgba(247, 247, 247, 1)",secondary:"#A01F1A",secondary10:"rgba(34, 209, 248, 0.1)",secondary15:"#A01F1A26",backgroundLinear:"linear-gradient(180deg, rgba(241, 241, 241, 0.05) 0%, rgba(241, 241, 241, 0) 27.7%, rgba(241, 241, 241, 0) 50%, rgba(241, 241, 241, 0) 74.46%, rgba(241, 241, 241, 0.05) 100%) rgba(243, 243, 245, 1)",backgroundDark:"#fff",backgroundDark50:"#fff",backgroundMedium:"#f1f1f1",backgroundLight:"rgba(249, 249, 249, 1)",backgroundLight50:"rgba(249, 249, 249, 1)",backgroundLight30:"rgba(249, 249, 249, 1)",backgroundLight100:"rgba(255, 255, 255, 1)",backgroundTransparent12:"rgba(241, 241, 241, 1)",backgroundTransparent07:"rgba(241, 241, 241, 0.07)",backgroundTransparent10:"rgba(171, 196, 255, 0.1)",backgroundLightF7:"#F7F7F7",backgroundThemeLight:"#A01F1A0D",borderLight:"1px solid #EBEBEB",borderLightColor:"#ebebeb",borderLightBA:"#bababa",backgroundF9F9F9:"#f9f9f9",backgroundF4F4F4:"#f4f4f4",backgroundLightF4:"#f4f4f4",backgroundFAFAFA:"#FAFAFA",textPrimary:"#0B1022",textSecondary:"#A01F1A",textLight:"#999999",textTertiary:"#000",textRevertPrimary:"#ECF5FF",textSecondaryHover:"#821915",textLink:"#22D1F8",text6a6a6a:"#6a6a6a",textQuaternary:"#C4D6FF",textQuinary:"#1C243E",textSenary:"rgba(196, 214, 255, 0.5)",textSeptenary:"#22D1F8",textPurple:"#8C6EEF",textPink:"#FF4EA3",buttonPrimary:"#4F53F3",buttonPrimary__01:"#4F53F3",buttonPrimary__02:"#8C6EEF",buttonSolidText:"#ECF5FF",buttonSecondary:"#39D0D8",switchOn:"#f9f9f9",switchOff:"#8C6EEF80",selectActive:"#8C6EEF",selectActiveSecondary:"#8C6EEF",selectInactive:"#abc4ffef",chart01:"#abc4ff",chart02:"#E9251E",chart03:"#481D0C",chart04:"#2B6AFF",chart05:"#FF7043",chart06:"#FED33A",chart07:"#4F53F3",chart08:"#22D1F8",chart09:"#8C6EEF33",iconBg:"#fff",iconEmptyStroke:"#A01F1A",semanticSuccess:"#39D0D8",semanticError:"#FF4EA3",semanticWarning:"#B89900",semanticNeutral:"#ABC4FF",semanticFocus:"#A01F1A",semanticFocusShadow:"#A01F1A33",tabFolderTabListBg:"var(--background-dark)",stepActiveBg:"var(--background-dark-opacity)",stepHoofBg:"var(--secondary)",priceFloatingUp:"#22D1F8",priceFloatingDown:"#FF4EA3",priceFloatingFlat:"#888888",tooltipBg:"#fff",popoverBg:"#fff",scrollbarThumb:"#f9f9f9",badgePurple:"rgba(140, 110, 239, 0.5)",badgeBlue:"rgba(34, 209, 248, 0.5)",dividerBg:"rgba(171, 196, 255, 0.3)",inputMask:"#fff3",backgroundApp:"#fff",solidButtonBg:"#A01F1A",solidButtonHoverBg:"#821915",outlineButtonBg:"rgba(160, 31, 26, 0.7)",filledProgressBg:"#A01F1A",transparentContainerBg:"#F5F8FF",modalContainerBg:"#ABC4FF12",infoButtonBg:"#ABC4FF33",warnButtonBg:"#FED33A33",warnButtonLightBg:"#FED33A1A",buttonBg01:"#ABC4FF1F",lightPurple:"#474ABB",background01:"#EDEDFF",background02:"#ABC4FF33",background03:"#FF4EA31A",cardBorder01:"#f1f1f1",text01:"#D6CC56",text02:"#000",text03:"#474ABB",brandGradient:"linear-gradient(244deg, #7748FC 8.17%, #39D0D8 101.65%)",dividerDashGradient:"repeating-linear-gradient(to right, currentColor 0 5px, transparent 5px 10px)",tokenAvatarBg:"#fffe",panelCardShadow:"0px 20px 60px 0px rgba(0, 0, 0, 0.1)",panelCardBorder:"1px solid rgba(171, 196, 255, 0.50)"},o={primary:"var(--primary)",secondary:"var(--secondary)",secondary10:"var(--secondary10)",secondary15:"var(--secondary15)",backgroundLinear:"var(--backgroundLinear)",backgroundDark:"var(--background-dark)",backgroundDark50:"var(--background-dark50)",backgroundMedium:"var(--background-medium)",backgroundLight:"var(--background-light)",backgroundLight50:"var(--background-light50)",backgroundLight30:"var(--background-light30)",backgroundLight100:"var(--background-light100)",backgroundTransparent12:"var(--background-transparent12)",backgroundTransparent07:"var(--background-transparent07)",backgroundTransparent10:"var(--background-transparent10)",backgroundLightF7:"var(--background-light-f7)",backgroundLightF4:"var(--background-light-f4)",backgroundThemeLight:"var(--background-theme-light)",borderLight:"var(--border-light)",borderLightColor:"var(--border-light-color)",borderLightBA:"var(--border-light-ba)",backgroundF9F9F9:"var(--background-f9f9f9)",backgroundF4F4F4:"var(--background-f4f4f4)",backgroundFAFAFA:"var(--background-fafafa)",textPrimary:"var(--text-primary)",textSecondary:"var(--text-secondary)",textTertiary:"var(--text-tertiary)",textRevertPrimary:"var(--text-revert-primary)",textSecondaryHover:"var(--text-secondary-hover)",textLight:"var(--text-tertiary)",textLink:"var(--text-link)",text6a6a6a:"var(--text-6a6a6a)",textQuaternary:"var(--text-quaternary)",textQuinary:"var(--text-quinary)",textSenary:"var(--text-senary)",textSeptenary:"var(--text-septenary)",textPurple:"var(--text-purple)",textPink:"var(--text-pink)",buttonPrimary:"var(--button-primary)",buttonPrimary__01:"var(--button-primary__01)",buttonPrimary__02:"var(--button-primary__02)",buttonSolidText:"var(--button-solid-text)",buttonSecondary:"var(--button-secondary)",switchOn:"var(--switch-on)",switchOff:"var(--switch-off)",selectActive:"var(--select-active)",selectActiveSecondary:"var(--select-active-secondary)",selectInactive:"var(--select-inactive)",chart01:"var(--chart01)",chart02:"var(--chart02)",chart03:"var(--chart03)",chart04:"var(--chart04)",chart05:"var(--chart05)",chart06:"var(--chart06)",chart07:"var(--chart07)",chart08:"var(--chart08)",chart09:"var(--chart09)",iconBg:"var(--icon-bg)",iconEmptyStroke:"var(--icon-empty-stroke)",semanticSuccess:"var(--semantic-success)",semanticError:"var(--semantic-error)",semanticWarning:"var(--semantic-warning)",semanticNeutral:"var(--semantic-neutral)",semanticFocus:"var(--semantic-focus)",semanticFocusShadow:"var(--semantic-focus-shadow)",tabFolderTabListBg:"var(--tab-folder-tab-list-bg)",stepActiveBg:"var(--step-active-bg)",stepHoofBg:"var(--step-hoof-bg)",priceFloatingUp:"var(--price-floating-up)",priceFloatingDown:"var(--price-floating-down)",priceFloatingFlat:"var(--price-floating-flat)",tooltipBg:"var(--tooltip-bg)",popoverBg:"var(--popover-bg)",scrollbarThumb:"var(--scrollbar-thumb)",badgePurple:"var(--badge-purple)",badgeBlue:"var(--badge-blue)",dividerBg:"var(--divider-bg)",inputMask:"var(--input-mask)",backgroundApp:"var(--background-app)",solidButtonBg:"var(--solid-button-bg)",solidButtonHoverBg:"var(--solid-button-hover-bg)",outlineButtonBg:"var(--outline-button-bg)",filledProgressBg:"var(--filled-progress-bg)",transparentContainerBg:"var(--transparent-container-bg)",modalContainerBg:"var(--modal-container-bg)",infoButtonBg:"var(--info-button-bg)",warnButtonBg:"var(--warn-button-bg)",warnButtonLightBg:"var(--warn-button-light-bg)",buttonBg01:"var(--button-bg-01)",lightPurple:"var(--divider-bg-light-purple)",background01:"var(--background-01)",background02:"var(--background-02)",background03:"var(--background-03)",cardBorder01:"var(--card-border-01)",text01:"var(--text-01)",text02:"var(--text-02)",text03:"var(--text-03)",brandGradient:"var(--brand-gradient)",dividerDashGradient:"var(--divider-dash-gradient)",tokenAvatarBg:"var(--token-avatar-bg)",panelCardShadow:"var(--panel-card-shadow)",panelCardBorder:"var(--panel-card-border)"}},94142:function(e,t,n){"use strict";n.d(t,{Lz:function(){return s},O9:function(){return r.O9},_5:function(){return r._5},C0:function(){return r.C0},s8:function(){return o},q:function(){return i},J7:function(){return a}});var r=n(9334);let i={bigCard:"0px 8px 48px 0px rgba(79, 83, 243, 0.10)",appMask:"0px 8px 0px 100vmax rgba(0, 0, 0, 0.4)",card:"0px 20px 60px 0px #0000001A"},o={textHeroTitle:"36px",text2XL:"28px",textLG:"20px",textSimi:"18px",textMD:"16px",textSM:"14px",textXS:"12px"},a={textHeroTitle:"var(--text-hero-title)",text2XL:"var(--text-2xl)",textLG:"var(--text-lg)",textSimi:"var(--text-simi)",textMD:"var(--text-md)",textSM:"var(--text-sm)",textXS:"var(--text-xs)"},s={normal:"1px solid #f1f1f1",light:"1px solid #f4f4f4",eb:"1px solid #ebebeb",secondary:"1px solid #A01F1A"}},18484:function(e,t,n){"use strict";n.d(t,{qop:function(){return D},bfP:function(){return nj}});var r,i,o,a,s,u,l,c,d,p,f,h,m,g,y,b,_,v,w,k,x,A,S,I,T,E,P,C,O,B,M,R,L,N,D,F,q,j,U,z,V,W,$,K,H,G,Z,Y,X,Q,J,ee,et,en,er,ei,eo,ea,es,eu,el,ec,ed=n(36971),ep=n(70655);let ef=/\r\n|[\n\r]/g;function eh(e,t){let n=0,r=1;for(let i of e.body.matchAll(ef)){if("number"==typeof i.index||function(e,t){if(!e)throw Error(null!=t?t:"Unexpected invariant triggered.")}(!1),i.index>=t)break;n=i.index+i[0].length,r+=1}return{line:r,column:t+1-n}}function em(e,t){let n=e.locationOffset.column-1,r="".padStart(n)+e.body,i=t.line-1,o=e.locationOffset.line-1,a=t.line+o,s=1===t.line?n:0,u=t.column+s,l=`${e.name}:${a}:${u} `,c=r.split(/\r\n|[\n\r]/g),d=c[i];if(d.length>120){let e=Math.floor(u/80),t=[];for(let e=0;e["|",e]),["|","^".padStart(u%80)],["|",t[e+1]]])}return l+eg([[`${a-1} |`,c[i-1]],[`${a} |`,d],["|","^".padStart(u)],[`${a+1} |`,c[i+1]]])}function eg(e){let t=e.filter(([e,t])=>void 0!==t),n=Math.max(...t.map(([e])=>e.length));return t.map(([e,t])=>e.padStart(n)+(t?" "+t:"")).join("\n")}class ey extends Error{constructor(e,...t){var n,r,i,o;let{nodes:a,source:s,positions:u,path:l,originalError:c,extensions:d}=function(e){let t=e[0];return null==t||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}(t);super(e),this.name="GraphQLError",this.path=null!=l?l:void 0,this.originalError=null!=c?c:void 0,this.nodes=eb(Array.isArray(a)?a:a?[a]:void 0);let p=eb(null===(n=this.nodes)||void 0===n?void 0:n.map(e=>e.loc).filter(e=>null!=e));this.source=null!=s?s:null==p?void 0:null===(r=p[0])||void 0===r?void 0:r.source,this.positions=null!=u?u:null==p?void 0:p.map(e=>e.start),this.locations=u&&s?u.map(e=>eh(s,e)):null==p?void 0:p.map(e=>eh(e.source,e.start));let f="object"==typeof(o=null==c?void 0:c.extensions)&&null!==o?null==c?void 0:c.extensions:void 0;this.extensions=null!==(i=null!=d?d:f)&&void 0!==i?i:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),null!=c&&c.stack?Object.defineProperty(this,"stack",{value:c.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,ey):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let e=this.message;if(this.nodes){for(let n of this.nodes)if(n.loc){var t;e+="\n\n"+em((t=n.loc).source,eh(t.source,t.start))}}else if(this.source&&this.locations)for(let t of this.locations)e+="\n\n"+em(this.source,t);return e}toJSON(){let e={message:this.message};return null!=this.locations&&(e.locations=this.locations),null!=this.path&&(e.path=this.path),null!=this.extensions&&Object.keys(this.extensions).length>0&&(e.extensions=this.extensions),e}}function eb(e){return void 0===e||0===e.length?void 0:e}function e_(e,t,n){return new ey(`Syntax Error: ${n}`,{source:e,positions:[t]})}var ev=n(2387);(r=M||(M={})).QUERY="QUERY",r.MUTATION="MUTATION",r.SUBSCRIPTION="SUBSCRIPTION",r.FIELD="FIELD",r.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",r.FRAGMENT_SPREAD="FRAGMENT_SPREAD",r.INLINE_FRAGMENT="INLINE_FRAGMENT",r.VARIABLE_DEFINITION="VARIABLE_DEFINITION",r.SCHEMA="SCHEMA",r.SCALAR="SCALAR",r.OBJECT="OBJECT",r.FIELD_DEFINITION="FIELD_DEFINITION",r.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",r.INTERFACE="INTERFACE",r.UNION="UNION",r.ENUM="ENUM",r.ENUM_VALUE="ENUM_VALUE",r.INPUT_OBJECT="INPUT_OBJECT",r.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION";var ew=n(6450),ek=n(7420),ex=n(91022);(i=R||(R={})).SOF="",i.EOF="",i.BANG="!",i.DOLLAR="$",i.AMP="&",i.PAREN_L="(",i.PAREN_R=")",i.SPREAD="...",i.COLON=":",i.EQUALS="=",i.AT="@",i.BRACKET_L="[",i.BRACKET_R="]",i.BRACE_L="{",i.PIPE="|",i.BRACE_R="}",i.NAME="Name",i.INT="Int",i.FLOAT="Float",i.STRING="String",i.BLOCK_STRING="BlockString",i.COMMENT="Comment";class eA{constructor(e){let t=new ev.WU(R.SOF,0,0,0,0);this.source=e,this.lastToken=t,this.token=t,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){this.lastToken=this.token;let e=this.token=this.lookahead();return e}lookahead(){let e=this.token;if(e.kind!==R.EOF)do if(e.next)e=e.next;else{let t=function(e,t){let n=e.source.body,r=n.length,i=t;for(;i=0&&e<=55295||e>=57344&&e<=1114111}function eI(e,t){return eT(e.charCodeAt(t))&&eE(e.charCodeAt(t+1))}function eT(e){return e>=55296&&e<=56319}function eE(e){return e>=56320&&e<=57343}function eP(e,t){let n=e.source.body.codePointAt(t);if(void 0===n)return R.EOF;if(n>=32&&n<=126){let e=String.fromCodePoint(n);return'"'===e?"'\"'":`"${e}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function eC(e,t,n,r,i){let o=e.line,a=1+n-e.lineStart;return new ev.WU(t,n,r,o,a,i)}function eO(e,t,n){if(!(0,ex.X1)(n))throw e_(e.source,t,`Invalid number, expected digit but got: ${eP(e,t)}.`);let r=e.source.body,i=t+1;for(;(0,ex.X1)(r.charCodeAt(i));)++i;return i}function eB(e,t){return eM(e.charCodeAt(t))<<12|eM(e.charCodeAt(t+1))<<8|eM(e.charCodeAt(t+2))<<4|eM(e.charCodeAt(t+3))}function eM(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}var eR=n(53767),eL=n(6589);let eN=globalThis.process&&!0,eD=eN?function(e,t){return e instanceof t}:function(e,t){if(e instanceof t)return!0;if("object"==typeof e&&null!==e){var n;let r=t.prototype[Symbol.toStringTag],i=Symbol.toStringTag in e?e[Symbol.toStringTag]:null===(n=e.constructor)||void 0===n?void 0:n.name;if(r===i){let t=(0,eL.X)(e);throw Error(`Cannot use ${r} "${t}" from another module or realm. Ensure that there is only one instance of "graphql" in the node_modules directory. If different versions of "graphql" are the dependencies of other relied on modules, use "resolutions" to ensure only one version is installed. https://yarnpkg.com/en/docs/selective-version-resolutions Duplicate "graphql" modules cannot be used at the same time since different versions may have different capabilities and behavior. The data from one version used in the function from another could produce confusing and spurious results.`)}}return!1};class eF{constructor(e,t="GraphQL request",n={line:1,column:1}){"string"==typeof e||(0,eR.a)(!1,`Body must be a string. Received: ${(0,eL.X)(e)}.`),this.body=e,this.name=t,this.locationOffset=n,this.locationOffset.line>0||(0,eR.a)(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||(0,eR.a)(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}class eq{constructor(e,t={}){let n=eD(e,eF)?e:new eF(e);this._lexer=new eA(n),this._options=t,this._tokenCounter=0}parseName(){let e=this.expectToken(R.NAME);return this.node(e,{kind:ew.h.NAME,value:e.value})}parseDocument(){return this.node(this._lexer.token,{kind:ew.h.DOCUMENT,definitions:this.many(R.SOF,this.parseDefinition,R.EOF)})}parseDefinition(){if(this.peek(R.BRACE_L))return this.parseOperationDefinition();let e=this.peekDescription(),t=e?this._lexer.lookahead():this._lexer.token;if(t.kind===R.NAME){switch(t.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}if(e)throw e_(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(t.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(t)}parseOperationDefinition(){let e;let t=this._lexer.token;if(this.peek(R.BRACE_L))return this.node(t,{kind:ew.h.OPERATION_DEFINITION,operation:ev.ku.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});let n=this.parseOperationType();return this.peek(R.NAME)&&(e=this.parseName()),this.node(t,{kind:ew.h.OPERATION_DEFINITION,operation:n,name:e,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){let e=this.expectToken(R.NAME);switch(e.value){case"query":return ev.ku.QUERY;case"mutation":return ev.ku.MUTATION;case"subscription":return ev.ku.SUBSCRIPTION}throw this.unexpected(e)}parseVariableDefinitions(){return this.optionalMany(R.PAREN_L,this.parseVariableDefinition,R.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:ew.h.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(R.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(R.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let e=this._lexer.token;return this.expectToken(R.DOLLAR),this.node(e,{kind:ew.h.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:ew.h.SELECTION_SET,selections:this.many(R.BRACE_L,this.parseSelection,R.BRACE_R)})}parseSelection(){return this.peek(R.SPREAD)?this.parseFragment():this.parseField()}parseField(){let e,t;let n=this._lexer.token,r=this.parseName();return this.expectOptionalToken(R.COLON)?(e=r,t=this.parseName()):t=r,this.node(n,{kind:ew.h.FIELD,alias:e,name:t,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(R.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(e){let t=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(R.PAREN_L,t,R.PAREN_R)}parseArgument(e=!1){let t=this._lexer.token,n=this.parseName();return this.expectToken(R.COLON),this.node(t,{kind:ew.h.ARGUMENT,name:n,value:this.parseValueLiteral(e)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){let e=this._lexer.token;this.expectToken(R.SPREAD);let t=this.expectOptionalKeyword("on");return!t&&this.peek(R.NAME)?this.node(e,{kind:ew.h.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(e,{kind:ew.h.INLINE_FRAGMENT,typeCondition:t?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){let e=this._lexer.token;return(this.expectKeyword("fragment"),!0===this._options.allowLegacyFragmentVariables)?this.node(e,{kind:ew.h.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(e,{kind:ew.h.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if("on"===this._lexer.token.value)throw this.unexpected();return this.parseName()}parseValueLiteral(e){let t=this._lexer.token;switch(t.kind){case R.BRACKET_L:return this.parseList(e);case R.BRACE_L:return this.parseObject(e);case R.INT:return this.advanceLexer(),this.node(t,{kind:ew.h.INT,value:t.value});case R.FLOAT:return this.advanceLexer(),this.node(t,{kind:ew.h.FLOAT,value:t.value});case R.STRING:case R.BLOCK_STRING:return this.parseStringLiteral();case R.NAME:switch(this.advanceLexer(),t.value){case"true":return this.node(t,{kind:ew.h.BOOLEAN,value:!0});case"false":return this.node(t,{kind:ew.h.BOOLEAN,value:!1});case"null":return this.node(t,{kind:ew.h.NULL});default:return this.node(t,{kind:ew.h.ENUM,value:t.value})}case R.DOLLAR:if(e){if(this.expectToken(R.DOLLAR),this._lexer.token.kind===R.NAME){let e=this._lexer.token.value;throw e_(this._lexer.source,t.start,`Unexpected variable "$${e}" in constant value.`)}throw this.unexpected(t)}return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){let e=this._lexer.token;return this.advanceLexer(),this.node(e,{kind:ew.h.STRING,value:e.value,block:e.kind===R.BLOCK_STRING})}parseList(e){let t=()=>this.parseValueLiteral(e);return this.node(this._lexer.token,{kind:ew.h.LIST,values:this.any(R.BRACKET_L,t,R.BRACKET_R)})}parseObject(e){let t=()=>this.parseObjectField(e);return this.node(this._lexer.token,{kind:ew.h.OBJECT,fields:this.any(R.BRACE_L,t,R.BRACE_R)})}parseObjectField(e){let t=this._lexer.token,n=this.parseName();return this.expectToken(R.COLON),this.node(t,{kind:ew.h.OBJECT_FIELD,name:n,value:this.parseValueLiteral(e)})}parseDirectives(e){let t=[];for(;this.peek(R.AT);)t.push(this.parseDirective(e));return t}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(e){let t=this._lexer.token;return this.expectToken(R.AT),this.node(t,{kind:ew.h.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e)})}parseTypeReference(){let e;let t=this._lexer.token;if(this.expectOptionalToken(R.BRACKET_L)){let n=this.parseTypeReference();this.expectToken(R.BRACKET_R),e=this.node(t,{kind:ew.h.LIST_TYPE,type:n})}else e=this.parseNamedType();return this.expectOptionalToken(R.BANG)?this.node(t,{kind:ew.h.NON_NULL_TYPE,type:e}):e}parseNamedType(){return this.node(this._lexer.token,{kind:ew.h.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(R.STRING)||this.peek(R.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("schema");let n=this.parseConstDirectives(),r=this.many(R.BRACE_L,this.parseOperationTypeDefinition,R.BRACE_R);return this.node(e,{kind:ew.h.SCHEMA_DEFINITION,description:t,directives:n,operationTypes:r})}parseOperationTypeDefinition(){let e=this._lexer.token,t=this.parseOperationType();this.expectToken(R.COLON);let n=this.parseNamedType();return this.node(e,{kind:ew.h.OPERATION_TYPE_DEFINITION,operation:t,type:n})}parseScalarTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");let n=this.parseName(),r=this.parseConstDirectives();return this.node(e,{kind:ew.h.SCALAR_TYPE_DEFINITION,description:t,name:n,directives:r})}parseObjectTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");let n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(e,{kind:ew.h.OBJECT_TYPE_DEFINITION,description:t,name:n,interfaces:r,directives:i,fields:o})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(R.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(R.BRACE_L,this.parseFieldDefinition,R.BRACE_R)}parseFieldDefinition(){let e=this._lexer.token,t=this.parseDescription(),n=this.parseName(),r=this.parseArgumentDefs();this.expectToken(R.COLON);let i=this.parseTypeReference(),o=this.parseConstDirectives();return this.node(e,{kind:ew.h.FIELD_DEFINITION,description:t,name:n,arguments:r,type:i,directives:o})}parseArgumentDefs(){return this.optionalMany(R.PAREN_L,this.parseInputValueDef,R.PAREN_R)}parseInputValueDef(){let e;let t=this._lexer.token,n=this.parseDescription(),r=this.parseName();this.expectToken(R.COLON);let i=this.parseTypeReference();this.expectOptionalToken(R.EQUALS)&&(e=this.parseConstValueLiteral());let o=this.parseConstDirectives();return this.node(t,{kind:ew.h.INPUT_VALUE_DEFINITION,description:n,name:r,type:i,defaultValue:e,directives:o})}parseInterfaceTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");let n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(e,{kind:ew.h.INTERFACE_TYPE_DEFINITION,description:t,name:n,interfaces:r,directives:i,fields:o})}parseUnionTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseUnionMemberTypes();return this.node(e,{kind:ew.h.UNION_TYPE_DEFINITION,description:t,name:n,directives:r,types:i})}parseUnionMemberTypes(){return this.expectOptionalToken(R.EQUALS)?this.delimitedMany(R.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();return this.node(e,{kind:ew.h.ENUM_TYPE_DEFINITION,description:t,name:n,directives:r,values:i})}parseEnumValuesDefinition(){return this.optionalMany(R.BRACE_L,this.parseEnumValueDefinition,R.BRACE_R)}parseEnumValueDefinition(){let e=this._lexer.token,t=this.parseDescription(),n=this.parseEnumValueName(),r=this.parseConstDirectives();return this.node(e,{kind:ew.h.ENUM_VALUE_DEFINITION,description:t,name:n,directives:r})}parseEnumValueName(){if("true"===this._lexer.token.value||"false"===this._lexer.token.value||"null"===this._lexer.token.value)throw e_(this._lexer.source,this._lexer.token.start,`${ej(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();return this.node(e,{kind:ew.h.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:n,directives:r,fields:i})}parseInputFieldsDefinition(){return this.optionalMany(R.BRACE_L,this.parseInputValueDef,R.BRACE_R)}parseTypeSystemExtension(){let e=this._lexer.lookahead();if(e.kind===R.NAME)switch(e.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(e)}parseSchemaExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");let t=this.parseConstDirectives(),n=this.optionalMany(R.BRACE_L,this.parseOperationTypeDefinition,R.BRACE_R);if(0===t.length&&0===n.length)throw this.unexpected();return this.node(e,{kind:ew.h.SCHEMA_EXTENSION,directives:t,operationTypes:n})}parseScalarTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");let t=this.parseName(),n=this.parseConstDirectives();if(0===n.length)throw this.unexpected();return this.node(e,{kind:ew.h.SCALAR_TYPE_EXTENSION,name:t,directives:n})}parseObjectTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");let t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(0===n.length&&0===r.length&&0===i.length)throw this.unexpected();return this.node(e,{kind:ew.h.OBJECT_TYPE_EXTENSION,name:t,interfaces:n,directives:r,fields:i})}parseInterfaceTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");let t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(0===n.length&&0===r.length&&0===i.length)throw this.unexpected();return this.node(e,{kind:ew.h.INTERFACE_TYPE_EXTENSION,name:t,interfaces:n,directives:r,fields:i})}parseUnionTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");let t=this.parseName(),n=this.parseConstDirectives(),r=this.parseUnionMemberTypes();if(0===n.length&&0===r.length)throw this.unexpected();return this.node(e,{kind:ew.h.UNION_TYPE_EXTENSION,name:t,directives:n,types:r})}parseEnumTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");let t=this.parseName(),n=this.parseConstDirectives(),r=this.parseEnumValuesDefinition();if(0===n.length&&0===r.length)throw this.unexpected();return this.node(e,{kind:ew.h.ENUM_TYPE_EXTENSION,name:t,directives:n,values:r})}parseInputObjectTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");let t=this.parseName(),n=this.parseConstDirectives(),r=this.parseInputFieldsDefinition();if(0===n.length&&0===r.length)throw this.unexpected();return this.node(e,{kind:ew.h.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:n,fields:r})}parseDirectiveDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(R.AT);let n=this.parseName(),r=this.parseArgumentDefs(),i=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");let o=this.parseDirectiveLocations();return this.node(e,{kind:ew.h.DIRECTIVE_DEFINITION,description:t,name:n,arguments:r,repeatable:i,locations:o})}parseDirectiveLocations(){return this.delimitedMany(R.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){let e=this._lexer.token,t=this.parseName();if(Object.prototype.hasOwnProperty.call(M,t.value))return t;throw this.unexpected(e)}node(e,t){return!0!==this._options.noLocation&&(t.loc=new ev.Ye(e,this._lexer.lastToken,this._lexer.source)),t}peek(e){return this._lexer.token.kind===e}expectToken(e){let t=this._lexer.token;if(t.kind===e)return this.advanceLexer(),t;throw e_(this._lexer.source,t.start,`Expected ${eU(e)}, found ${ej(t)}.`)}expectOptionalToken(e){let t=this._lexer.token;return t.kind===e&&(this.advanceLexer(),!0)}expectKeyword(e){let t=this._lexer.token;if(t.kind===R.NAME&&t.value===e)this.advanceLexer();else throw e_(this._lexer.source,t.start,`Expected "${e}", found ${ej(t)}.`)}expectOptionalKeyword(e){let t=this._lexer.token;return t.kind===R.NAME&&t.value===e&&(this.advanceLexer(),!0)}unexpected(e){let t=null!=e?e:this._lexer.token;return e_(this._lexer.source,t.start,`Unexpected ${ej(t)}.`)}any(e,t,n){this.expectToken(e);let r=[];for(;!this.expectOptionalToken(n);)r.push(t.call(this));return r}optionalMany(e,t,n){if(this.expectOptionalToken(e)){let e=[];do e.push(t.call(this));while(!this.expectOptionalToken(n));return e}return[]}many(e,t,n){this.expectToken(e);let r=[];do r.push(t.call(this));while(!this.expectOptionalToken(n));return r}delimitedMany(e,t){this.expectOptionalToken(e);let n=[];do n.push(t.call(this));while(this.expectOptionalToken(e));return n}advanceLexer(){let{maxTokens:e}=this._options,t=this._lexer.advance();if(void 0!==e&&t.kind!==R.EOF&&(++this._tokenCounter,this._tokenCounter>e))throw e_(this._lexer.source,t.start,`Document contains more that ${e} tokens. Parsing aborted.`)}}function ej(e){let t=e.value;return eU(e.kind)+(null!=t?` "${t}"`:"")}function eU(e){return e===R.BANG||e===R.DOLLAR||e===R.AMP||e===R.PAREN_L||e===R.PAREN_R||e===R.SPREAD||e===R.COLON||e===R.EQUALS||e===R.AT||e===R.BRACKET_L||e===R.BRACKET_R||e===R.BRACE_L||e===R.PIPE||e===R.BRACE_R?`"${e}"`:e}var ez=new Map,eV=new Map,eW=!0,e$=!1;function eK(e){return e.replace(/[\s,]+/g," ").trim()}function eH(e){for(var t=[],n=1;nt.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);it.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function v(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}u((r=r.apply(e,t||[])).next())})}function w(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(u){return function(s){if(n)throw TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]=C)return(console[e]||console.log).apply(console,arguments)}}(i=E||(E={})).debug=O("debug"),i.log=O("log"),i.warn=O("warn"),i.error=O("error");var B="3.12.4";function M(e){try{return e()}catch(e){}}var R=M(function(){return globalThis})||M(function(){return window})||M(function(){return self})||M(function(){return n.g})||M(function(){return M.constructor("return this")()}),L=new Map;function N(e){var t=L.get(e)||1;return L.set(e,t+1),"".concat(e,":").concat(t,":").concat(Math.random().toString(36).slice(2))}function D(e,t){void 0===t&&(t=0);var n=N("stringifyForDisplay");return JSON.stringify(e,function(e,t){return void 0===t?n:t},t).split(JSON.stringify(n)).join("")}function F(e){return function(t){for(var n=[],r=1;r"}}function V(e,t){if(void 0===t&&(t=[]),e)return R[U]&&R[U](e,t.map(z))}function W(e,t){if(void 0===t&&(t=[]),e)return"An error occurred! For more details, see the full error text at https://go.apollo.dev/c/err#".concat(encodeURIComponent(JSON.stringify({version:B,message:e,args:t.map(z)})))}function $(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n1,i=!1,o=arguments[1],a=o;return new n(function(n){return t.subscribe({next:function(t){var o=!i;if(i=!0,!o||r)try{a=e(a,t)}catch(e){return n.error(e)}else a=t},error:function(e){n.error(e)},complete:function(){if(!i&&!r)return n.error(TypeError("Cannot reduce an empty sequence"));n.next(a),n.complete()}})})},t.concat=function(){for(var e=this,t=arguments.length,n=Array(t),r=0;r=0&&i.splice(e,1),a()}});i.push(o)},error:function(e){r.error(e)},complete:function(){a()}});function a(){o.closed&&0===i.length&&r.complete()}return function(){i.forEach(function(e){return e.unsubscribe()}),o.unsubscribe()}})},t[Q]=function(){return this},e.from=function(t){var n="function"==typeof this?this:e;if(null==t)throw TypeError(t+" is not an object");var r=ee(t,Q);if(r){var i=r.call(t);if(Object(i)!==i)throw TypeError(i+" is not an object");return i instanceof ec&&i.constructor===n?i:new n(function(e){return i.subscribe(e)})}if(Z("iterator")&&(r=ee(t,X)))return new n(function(e){er(function(){if(!e.closed){for(var n,i=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return $(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $(e,t)}}(e))){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(r.call(t));!(n=i()).done;){var o=n.value;if(e.next(o),e.closed)return}e.complete()}})});if(Array.isArray(t))return new n(function(e){er(function(){if(!e.closed){for(var n=0;ne}},ex="undefined"!=typeof WeakMap?WeakMap:Map,eA="undefined"!=typeof FinalizationRegistry?FinalizationRegistry:function(){return{register:ew,unregister:ew}};class eS{constructor(e=1/0,t=ew){this.max=e,this.dispose=t,this.map=new ex,this.newest=null,this.oldest=null,this.unfinalizedNodes=new Set,this.finalizationScheduled=!1,this.size=0,this.finalize=()=>{let e=this.unfinalizedNodes.values();for(let t=0;t<10024;t++){let t=e.next().value;if(!t)break;this.unfinalizedNodes.delete(t);let n=t.key;delete t.key,t.keyRef=new ek(n),this.registry.register(n,t,t)}this.unfinalizedNodes.size>0?queueMicrotask(this.finalize):this.finalizationScheduled=!1},this.registry=new eA(this.deleteNode.bind(this))}has(e){return this.map.has(e)}get(e){let t=this.getNode(e);return t&&t.value}getNode(e){let t=this.map.get(e);if(t&&t!==this.newest){let{older:e,newer:n}=t;n&&(n.older=e),e&&(e.newer=n),t.older=this.newest,t.older.newer=t,t.newer=null,this.newest=t,t===this.oldest&&(this.oldest=n)}return t}set(e,t){let n=this.getNode(e);return n?n.value=t:(n={key:e,value:t,newer:null,older:this.newest},this.newest&&(this.newest.newer=n),this.newest=n,this.oldest=this.oldest||n,this.scheduleFinalization(n),this.map.set(e,n),this.size++,n.value)}clean(){for(;this.oldest&&this.size>this.max;)this.deleteNode(this.oldest)}deleteNode(e){e===this.newest&&(this.newest=e.older),e===this.oldest&&(this.oldest=e.newer),e.newer&&(e.newer.older=e.older),e.older&&(e.older.newer=e.newer),this.size--;let t=e.key||e.keyRef&&e.keyRef.deref();this.dispose(e.value,t),e.keyRef?this.registry.unregister(e):this.unfinalizedNodes.delete(e),t&&this.map.delete(t)}delete(e){let t=this.map.get(e);return!!t&&(this.deleteNode(t),!0)}scheduleFinalization(e){this.unfinalizedNodes.add(e),this.finalizationScheduled||(this.finalizationScheduled=!0,queueMicrotask(this.finalize))}}function eI(){}class eT{constructor(e=1/0,t=eI){this.max=e,this.dispose=t,this.map=new Map,this.newest=null,this.oldest=null}has(e){return this.map.has(e)}get(e){let t=this.getNode(e);return t&&t.value}get size(){return this.map.size}getNode(e){let t=this.map.get(e);if(t&&t!==this.newest){let{older:e,newer:n}=t;n&&(n.older=e),e&&(e.newer=n),t.older=this.newest,t.older.newer=t,t.newer=null,this.newest=t,t===this.oldest&&(this.oldest=n)}return t}set(e,t){let n=this.getNode(e);return n?n.value=t:(n={key:e,value:t,newer:null,older:this.newest},this.newest&&(this.newest.newer=n),this.newest=n,this.oldest=this.oldest||n,this.map.set(e,n),n.value)}clean(){for(;this.oldest&&this.map.size>this.max;)this.delete(this.oldest.key)}delete(e){let t=this.map.get(e);return!!t&&(t===this.newest&&(this.newest=t.older),t===this.oldest&&(this.oldest=t.newer),t.newer&&(t.newer.older=t.older),t.older&&(t.older.newer=t.newer),this.map.delete(e),this.dispose(t.value,e),!0)}}var eE=new WeakSet;function eP(e){!(e.size<=(e.max||-1))&&(eE.has(e)||(eE.add(e),setTimeout(function(){e.clean(),eE.delete(e)},100)))}var eC=function(e,t){var n=new eS(e,t);return n.set=function(e,t){var n=eS.prototype.set.call(this,e,t);return eP(this),n},n},eO=function(e,t){var n=new eT(e,t);return n.set=function(e,t){var n=eT.prototype.set.call(this,e,t);return eP(this),n},n},eB=b({},R[Symbol.for("apollo.cacheSize")]),eM={},eR=!1!==globalThis.__DEV__?function(){var e,t,n,r,i;if(!(!1!==globalThis.__DEV__))throw Error("only supported in development mode");return{limits:Object.fromEntries(Object.entries({parser:1e3,canonicalStringify:1e3,print:2e3,"documentTransform.cache":2e3,"queryManager.getDocumentInfo":2e3,"PersistedQueryLink.persistedQueryHashes":2e3,"fragmentRegistry.transform":2e3,"fragmentRegistry.lookup":1e3,"fragmentRegistry.findFragmentSpreads":4e3,"cache.fragmentQueryDocuments":1e3,"removeTypenameFromVariables.getVariableDefinitions":2e3,"inMemoryCache.maybeBroadcastWatch":5e3,"inMemoryCache.executeSelectionSet":5e4,"inMemoryCache.executeSubSelectedArray":1e4}).map(function(e){var t=e[0],n=e[1];return[t,eB[t]||n]})),sizes:b({print:null===(e=eM.print)||void 0===e?void 0:e.call(eM),parser:null===(t=eM.parser)||void 0===t?void 0:t.call(eM),canonicalStringify:null===(n=eM.canonicalStringify)||void 0===n?void 0:n.call(eM),links:function e(t){var n;return t?k(k([null===(n=null==t?void 0:t.getMemoryInternals)||void 0===n?void 0:n.call(t)],e(null==t?void 0:t.left),!0),e(null==t?void 0:t.right),!0).filter(eq):[]}(this.link),queryManager:{getDocumentInfo:this.queryManager.transformCache.size,documentTransforms:ej(this.queryManager.documentTransform)}},null===(i=(r=this.cache).getMemoryInternals)||void 0===i?void 0:i.call(r))}}:void 0,eL=!1!==globalThis.__DEV__?function(){var e=this.config.fragments;return b(b({},eD.apply(this)),{addTypenameDocumentTransform:ej(this.addTypenameTransform),inMemoryCache:{executeSelectionSet:eF(this.storeReader.executeSelectionSet),executeSubSelectedArray:eF(this.storeReader.executeSubSelectedArray),maybeBroadcastWatch:eF(this.maybeBroadcastWatch)},fragmentRegistry:{findFragmentSpreads:eF(null==e?void 0:e.findFragmentSpreads),lookup:eF(null==e?void 0:e.lookup),transform:eF(null==e?void 0:e.transform)}})}:void 0,eN=!1!==globalThis.__DEV__?eD:void 0;function eD(){return{cache:{fragmentQueryDocuments:eF(this.getFragmentDoc)}}}function eF(e){return e&&"dirtyKey"in e?e.size:void 0}function eq(e){return null!=e}function ej(e){return(function e(t){return t?k(k([eF(null==t?void 0:t.performWork)],e(null==t?void 0:t.left),!0),e(null==t?void 0:t.right),!0).filter(eq):[]})(e).map(function(e){return{cache:e}})}var eU=Object.assign(function(e){return JSON.stringify(e,ez)},{reset:function(){l=new eO(eB.canonicalStringify||1e3)}});function ez(e,t){if(t&&"object"==typeof t){var n=Object.getPrototypeOf(t);if(n===Object.prototype||null===n){var r=Object.keys(t);if(r.every(eV))return t;var i=JSON.stringify(r),o=l.get(i);if(!o){r.sort();var a=JSON.stringify(r);o=l.get(a)||r,l.set(i,o),l.set(a,o)}var s=Object.create(n);return o.forEach(function(e){s[e]=t[e]}),s}}return t}function eV(e,t,n){return 0===t||n[t-1]<=e}function eW(e){return{__ref:String(e)}}function e$(e){return!!(e&&"object"==typeof e&&"string"==typeof e.__ref)}function eK(e,t,n,r){if("IntValue"===n.kind||"FloatValue"===n.kind)e[t.value]=Number(n.value);else if("BooleanValue"===n.kind||"StringValue"===n.kind)e[t.value]=n.value;else if("ObjectValue"===n.kind){var i={};n.fields.map(function(e){return eK(i,e.name,e.value,r)}),e[t.value]=i}else if("Variable"===n.kind){var o=(r||{})[n.name.value];e[t.value]=o}else if("ListValue"===n.kind)e[t.value]=n.values.map(function(e){var n={};return eK(n,t,e,r),n[t.value]});else if("EnumValue"===n.kind)e[t.value]=n.value;else if("NullValue"===n.kind)e[t.value]=null;else throw j(96,t.value,n.kind)}!1!==globalThis.__DEV__&&(eM.canonicalStringify=function(){return l.size}),eU.reset();var eH=["connection","include","skip","client","rest","export","nonreactive"],eG=eU,eZ=Object.assign(function(e,t,n){if(t&&n&&n.connection&&n.connection.key){if(!n.connection.filter||!(n.connection.filter.length>0))return n.connection.key;var r=n.connection.filter?n.connection.filter:[];r.sort();var i={};return r.forEach(function(e){i[e]=t[e]}),"".concat(n.connection.key,"(").concat(eG(i),")")}var o=e;if(t){var a=eG(t);o+="(".concat(a,")")}return n&&Object.keys(n).forEach(function(e){-1===eH.indexOf(e)&&(n[e]&&Object.keys(n[e]).length?o+="@".concat(e,"(").concat(eG(n[e]),")"):o+="@".concat(e))}),o},{setStringify:function(e){var t=eG;return eG=e,t}});function eY(e,t){if(e.arguments&&e.arguments.length){var n={};return e.arguments.forEach(function(e){return eK(n,e.name,e.value,t)}),n}return null}function eX(e){return e.alias?e.alias.value:e.name.value}function eQ(e,t,n){for(var r,i=0,o=t.selections;it.indexOf(i))throw j(46,i)}return e}(t)).variables||{},extensions:n.extensions||{},operationName:n.operationName,query:n.query}).operationName||(r.operationName="string"!=typeof r.query?e2(r.query)||void 0:""),o=b({},i),Object.defineProperty(r,"setContext",{enumerable:!1,value:function(e){o="function"==typeof e?b(b({},o),e(o)):b(b({},o),e)}}),Object.defineProperty(r,"getContext",{enumerable:!1,value:function(){return b({},o)}}),r))||ec.of()},e.concat=function(t,n){var r=e7(t);if(te(r))return!1!==globalThis.__DEV__&&q.warn(38,r),r;var i=e7(n);return Object.assign(new e(te(i)?function(e){return r.request(e,function(e){return i.request(e)||ec.of()})||ec.of()}:function(e,t){return r.request(e,function(e){return i.request(e,t)||ec.of()})||ec.of()}),{left:r,right:i})},e.prototype.split=function(t,n,r){return this.concat(e.split(t,n,r||new e(e9)))},e.prototype.concat=function(t){return e.concat(this,t)},e.prototype.request=function(e,t){throw j(39)},e.prototype.onError=function(e,t){if(t&&t.error)return t.error(e),!1;throw e},e.prototype.setOnError=function(e){return this.onError=e,this},e}(),tn=tt.execute;function tr(e,t){var n,r=e.directives;return!r||!r.length||(n=[],r&&r.length&&r.forEach(function(e){var t;if(!("skip"!==(t=e.name.value)&&"include"!==t)){var r=e.arguments,i=e.name.value;q(r&&1===r.length,79,i);var o=r[0];q(o.name&&"if"===o.name.value,80,i);var a=o.value;q(a&&("Variable"===a.kind||"BooleanValue"===a.kind),81,i),n.push({directive:e,ifArgument:o})}}),n).every(function(e){var n=e.directive,r=e.ifArgument,i=!1;return"Variable"===r.value.kind?q(void 0!==(i=t&&t[r.value.name.value]),78,n.name.value):i=r.value.value,"skip"===n.name.value?!i:i})}function ti(e,t,n){var r=new Set(e),i=r.size;return ey(t,{Directive:function(e){if(r.delete(e.name.value)&&(!n||!r.size))return eg}}),n?!r.size:r.size=0});var tp=function(e,t,n){var r=Error(n);throw r.name="ServerError",r.response=e,r.statusCode=e.status,r.result=t,r},tf=Symbol();function th(e){return e.hasOwnProperty("graphQLErrors")}var tm=function(e){var t=k(k(k([],e.graphQLErrors,!0),e.clientErrors,!0),e.protocolErrors,!0);return e.networkError&&t.push(e.networkError),t.map(function(e){return ed(e)&&e.message||"Error message not found."}).join("\n")},tg=function(e){function t(n){var r=n.graphQLErrors,i=n.protocolErrors,o=n.clientErrors,a=n.networkError,s=n.errorMessage,u=n.extraInfo,l=e.call(this,s)||this;return l.name="ApolloError",l.graphQLErrors=r||[],l.protocolErrors=i||[],l.clientErrors=o||[],l.networkError=a||null,l.message=s||tm(l),l.extraInfo=u,l.cause=k(k(k([a],r||[],!0),i||[],!0),o||[],!0).find(function(e){return!!e})||null,l.__proto__=t.prototype,l}return y(t,e),t}(Error),ty=Array.isArray;function tb(e){return Array.isArray(e)&&e.length>0}var t_=Object.prototype.hasOwnProperty;function tv(){for(var e=[],t=0;t1)for(var r=new tx,i=1;i=0;--o){var a=i[o],s=isNaN(+a)?{}:[];s[a]=t,t=s}n=r.merge(n,t)}),n}var tI=Object.prototype.hasOwnProperty;function tT(e,t){e.status>=300&&tp(e,function(){try{return JSON.parse(t)}catch(e){return t}}(),"Response not successful: Received status code ".concat(e.status));try{return JSON.parse(t)}catch(r){var n=r;throw n.name="ServerParseError",n.response=e,n.statusCode=e.status,n.bodyText=t,n}}var tE=function(e){if(!e&&"undefined"==typeof fetch)throw j(40)},tP=n(7420);let tC=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function tO(e){return tB[e.charCodeAt(0)]}let tB=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\u007F","\\u0080","\\u0081","\\u0082","\\u0083","\\u0084","\\u0085","\\u0086","\\u0087","\\u0088","\\u0089","\\u008A","\\u008B","\\u008C","\\u008D","\\u008E","\\u008F","\\u0090","\\u0091","\\u0092","\\u0093","\\u0094","\\u0095","\\u0096","\\u0097","\\u0098","\\u0099","\\u009A","\\u009B","\\u009C","\\u009D","\\u009E","\\u009F"],tM={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>tR(e.definitions,"\n\n")},OperationDefinition:{leave(e){let t=tN("(",tR(e.variableDefinitions,", "),")"),n=tR([e.operation,tR([e.name,t]),tR(e.directives," ")]," ");return("query"===n?"":n+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:n,directives:r})=>e+": "+t+tN(" = ",n)+tN(" ",tR(r," "))},SelectionSet:{leave:({selections:e})=>tL(e)},Field:{leave({alias:e,name:t,arguments:n,directives:r,selectionSet:i}){let o=tN("",e,": ")+t,a=o+tN("(",tR(n,", "),")");return a.length>80&&(a=o+tN("(\n",tD(tR(n,"\n")),"\n)")),tR([a,tR(r," "),i]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+tN(" ",tR(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:n})=>tR(["...",tN("on ",e),tR(t," "),n]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:n,directives:r,selectionSet:i})=>`fragment ${e}${tN("(",tR(n,", "),")")} on ${t} ${tN("",tR(r," ")," ")}`+i},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?(0,tP.LZ)(e):`"${e.replace(tC,tO)}"`},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+tR(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+tR(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+tN("(",tR(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({description:e,directives:t,operationTypes:n})=>tN("",e,"\n")+tR(["schema",tR(t," "),tL(n)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({description:e,name:t,directives:n})=>tN("",e,"\n")+tR(["scalar",t,tR(n," ")]," ")},ObjectTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:i})=>tN("",e,"\n")+tR(["type",t,tN("implements ",tR(n," & ")),tR(r," "),tL(i)]," ")},FieldDefinition:{leave:({description:e,name:t,arguments:n,type:r,directives:i})=>tN("",e,"\n")+t+(tF(n)?tN("(\n",tD(tR(n,"\n")),"\n)"):tN("(",tR(n,", "),")"))+": "+r+tN(" ",tR(i," "))},InputValueDefinition:{leave:({description:e,name:t,type:n,defaultValue:r,directives:i})=>tN("",e,"\n")+tR([t+": "+n,tN("= ",r),tR(i," ")]," ")},InterfaceTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:i})=>tN("",e,"\n")+tR(["interface",t,tN("implements ",tR(n," & ")),tR(r," "),tL(i)]," ")},UnionTypeDefinition:{leave:({description:e,name:t,directives:n,types:r})=>tN("",e,"\n")+tR(["union",t,tR(n," "),tN("= ",tR(r," | "))]," ")},EnumTypeDefinition:{leave:({description:e,name:t,directives:n,values:r})=>tN("",e,"\n")+tR(["enum",t,tR(n," "),tL(r)]," ")},EnumValueDefinition:{leave:({description:e,name:t,directives:n})=>tN("",e,"\n")+tR([t,tR(n," ")]," ")},InputObjectTypeDefinition:{leave:({description:e,name:t,directives:n,fields:r})=>tN("",e,"\n")+tR(["input",t,tR(n," "),tL(r)]," ")},DirectiveDefinition:{leave:({description:e,name:t,arguments:n,repeatable:r,locations:i})=>tN("",e,"\n")+"directive @"+t+(tF(n)?tN("(\n",tD(tR(n,"\n")),"\n)"):tN("(",tR(n,", "),")"))+(r?" repeatable":"")+" on "+tR(i," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>tR(["extend schema",tR(e," "),tL(t)]," ")},ScalarTypeExtension:{leave:({name:e,directives:t})=>tR(["extend scalar",e,tR(t," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>tR(["extend type",e,tN("implements ",tR(t," & ")),tR(n," "),tL(r)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>tR(["extend interface",e,tN("implements ",tR(t," & ")),tR(n," "),tL(r)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:n})=>tR(["extend union",e,tR(t," "),tN("= ",tR(n," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:n})=>tR(["extend enum",e,tR(t," "),tL(n)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:n})=>tR(["extend input",e,tR(t," "),tL(n)]," ")}};function tR(e,t=""){var n;return null!==(n=null==e?void 0:e.filter(e=>e).join(t))&&void 0!==n?n:""}function tL(e){return tN("{\n",tD(tR(e,"\n")),"\n}")}function tN(e,t,n=""){return null!=t&&""!==t?e+t+n:""}function tD(e){return tN(" ",e.replace(/\n/g,"\n "))}function tF(e){var t;return null!==(t=null==e?void 0:e.some(e=>e.includes("\n")))&&void 0!==t&&t}var tq=Object.assign(function(e){var t=c.get(e);return t||(t=ey(e,tM),c.set(e,t)),t},{reset:function(){c=new eC(eB.print||2e3)}});tq.reset(),!1!==globalThis.__DEV__&&(eM.print=function(){return c?c.size:0});var tj={http:{includeQuery:!0,includeExtensions:!1,preserveHeaderCase:!1},headers:{accept:"*/*","content-type":"application/json"},options:{method:"POST"}},tU=function(e,t){return t(e)};function tz(e){return new ec(function(t){t.error(e)})}var tV={kind:em.h.FIELD,name:{kind:em.h.NAME,value:"__typename"}};function tW(e){var t=new Map;return function(n){void 0===n&&(n=e);var r=t.get(n);return r||t.set(n,r={variables:new Set,fragmentSpreads:new Set}),r}}function t$(e,t){e0(t);for(var n,r,i,o=tW(""),a=tW(""),s=function(e){for(var t=0,n=void 0;t=0;--l)t.definitions[l].kind===em.h.OPERATION_DEFINITION&&++u;var c=(n=new Map,r=new Map,e.forEach(function(e){e&&(e.name?n.set(e.name,e):e.test&&r.set(e.test,e))}),function(e){var t=n.get(e.name.value);return!t&&r.size&&r.forEach(function(n,r){r(e)&&(t=n)}),t}),d=function(e){return tb(e)&&e.map(c).some(function(e){return e&&e.remove})},p=new Map,f=!1,h={enter:function(e){if(d(e.directives))return f=!0,null}},m=ey(t,{Field:h,InlineFragment:h,VariableDefinition:{enter:function(){return!1}},Variable:{enter:function(e,t,n,r,i){var o=s(i);o&&o.variables.add(e.name.value)}},FragmentSpread:{enter:function(e,t,n,r,i){if(d(e.directives))return f=!0,null;var o=s(i);o&&o.fragmentSpreads.add(e.name.value)}},FragmentDefinition:{enter:function(e,t,n,r){p.set(JSON.stringify(r),e)},leave:function(e,t,n,r){return e===p.get(JSON.stringify(r))?e:u>0&&e.selectionSet.selections.every(function(e){return e.kind===em.h.FIELD&&"__typename"===e.name.value})?(a(e.name.value).removed=!0,f=!0,null):void 0}},Directive:{leave:function(e){if(c(e))return f=!0,null}}});if(!f)return t;var g=function(e){return e.transitiveVars||(e.transitiveVars=new Set(e.variables),e.removed||e.fragmentSpreads.forEach(function(t){g(a(t)).transitiveVars.forEach(function(t){e.transitiveVars.add(t)})})),e},y=new Set;m.definitions.forEach(function(e){e.kind===em.h.OPERATION_DEFINITION?g(o(e.name&&e.name.value)).fragmentSpreads.forEach(function(e){y.add(e)}):e.kind!==em.h.FRAGMENT_DEFINITION||0!==u||a(e.name.value).removed||y.add(e.name.value)}),y.forEach(function(e){g(a(e)).fragmentSpreads.forEach(function(e){y.add(e)})});var _={enter:function(e){var t;if(t=e.name.value,!y.has(t)||a(t).removed)return null}};return!function e(t,n){return!t||t.selectionSet.selections.every(function(t){return t.kind===em.h.FRAGMENT_SPREAD&&e(n[t.name.value],n)})}(e1(i=ey(m,{FragmentSpread:_,FragmentDefinition:_,OperationDefinition:{leave:function(e){if(e.variableDefinitions){var t=g(o(e.name&&e.name.value)).transitiveVars;if(t.size-1;){if(g=void 0,g=(A=[s.slice(0,m),s.slice(m+a.length)])[0],s=A[1],y=g.indexOf("\r\n\r\n"),(_=function(e){var t={};return e.split("\n").forEach(function(e){var n=e.indexOf(":");if(n>-1){var r=e.slice(0,n).trim().toLowerCase(),i=e.slice(n+1).trim();t[r]=i}}),t}(g.slice(0,y))["content-type"])&&-1===_.toLowerCase().indexOf("application/json"))throw Error("Unsupported patch content type: application/json is required.");if(v=g.slice(y)){if(Object.keys(k=tT(e,v)).length>1||"data"in k||"incremental"in k||"errors"in k||"payload"in k){if(ed(k)&&"payload"in k){if(x={},"payload"in k){if(1===Object.keys(k).length&&null===k.payload)return[2];x=b({},k.payload)}"errors"in k&&(x=b(b({},x),{extensions:b(b({},"extensions"in x?x.extensions:null),((S={})[tf]=k.errors,S))})),t(x)}else t(k)}else if(1===Object.keys(k).length&&"hasNext"in k&&!k.hasNext)return[2]}m=s.indexOf(a)}return[3,1];case 3:return[2]}})})}(t,i):t.text().then(function(e){return tT(t,e)}).then(function(n){return Array.isArray(n)||tI.call(n,"data")||tI.call(n,"errors")||tp(t,n,"Server response was missing for query '".concat(Array.isArray(e)?e.map(function(e){return e.operationName}):e.operationName,"'.")),n}).then(i)}).then(function(){h=void 0,t.complete()}).catch(function(e){h=void 0,e.result&&e.result.errors&&e.result.data&&t.next(e.result),t.error(e)}),function(){h&&h.abort()}})})},tY=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,tZ(t).request)||this;return n.options=t,n}return y(t,e),t}(tt);let{toString:tX,hasOwnProperty:tQ}=Object.prototype,tJ=Function.prototype.toString,t0=new Map;function t1(e,t){try{return function e(t,n){if(t===n)return!0;let r=tX.call(t),i=tX.call(n);if(r!==i)return!1;switch(r){case"[object Array]":if(t.length!==n.length)break;case"[object Object]":{if(t4(t,n))return!0;let r=t2(t),i=t2(n),o=r.length;if(o!==i.length)return!1;for(let e=0;e=0&&e.indexOf(t,n)===n}(e,t3)}}return!1}(e,t)}finally{t0.clear()}}function t2(e){return Object.keys(e).filter(t6,e)}function t6(e){return void 0!==this[e]}let t3="{ [native code] }";function t4(e,t){let n=t0.get(e);if(n){if(n.has(t))return!0}else t0.set(e,n=new Set);return n.add(t),!1}let t5=()=>Object.create(null),{forEach:t8,slice:t9}=Array.prototype,{hasOwnProperty:t7}=Object.prototype;class ne{constructor(e=!0,t=t5){this.weakness=e,this.makeData=t}lookup(){return this.lookupArray(arguments)}lookupArray(e){let t=this;return t8.call(e,e=>t=t.getChildTrie(e)),t7.call(t,"data")?t.data:t.data=this.makeData(t9.call(e))}peek(){return this.peekArray(arguments)}peekArray(e){let t=this;for(let n=0,r=e.length;t&&nObject.create(null),{forEach:nn,slice:nr}=Array.prototype,{hasOwnProperty:ni}=Object.prototype;class no{constructor(e=!0,t=nt){this.weakness=e,this.makeData=t}lookup(...e){return this.lookupArray(e)}lookupArray(e){let t=this;return nn.call(e,e=>t=t.getChildTrie(e)),ni.call(t,"data")?t.data:t.data=this.makeData(nr.call(e))}peek(...e){return this.peekArray(e)}peekArray(e){let t=this;for(let n=0,r=e.length;t&&nglobalThis)||nc(()=>n.g)||Object.create(null),nf=np[nd]||Array[nd]||function(e){try{Object.defineProperty(np,nd,{value:e,enumerable:!1,writable:!1,configurable:!0})}finally{return e}}(class{constructor(){this.id=["slot",nl++,Date.now(),Math.random().toString(36).slice(2)].join(":")}hasValue(){for(let e=ns;e;e=e.parent)if(this.id in e.slots){let t=e.slots[this.id];if(t===nu)break;return e!==ns&&(ns.slots[this.id]=t),!0}return ns&&(ns.slots[this.id]=nu),!1}getValue(){if(this.hasValue())return ns.slots[this.id]}withValue(e,t,n,r){let i={__proto__:null,[this.id]:e},o=ns;ns={parent:o,slots:i};try{return t.apply(r,n)}finally{ns=o}}static bind(e){let t=ns;return function(){let n=ns;try{return ns=t,e.apply(this,arguments)}finally{ns=n}}}static noContext(e,t,n){if(!ns)return e.apply(n,t);{let r=ns;try{return ns=null,e.apply(n,t)}finally{ns=r}}}}),{bind:nh,noContext:nm}=nf,ng=new nf,{hasOwnProperty:ny}=Object.prototype,nb=Array.from||function(e){let t=[];return e.forEach(e=>t.push(e)),t};function n_(e){let{unsubscribe:t}=e;"function"==typeof t&&(e.unsubscribe=void 0,t())}let nv=[];function nw(e,t){if(!e)throw Error(t||"assertion failure")}function nk(e,t){let n=e.length;return n>0&&n===t.length&&e[n-1]===t[n-1]}function nx(e){switch(e.length){case 0:throw Error("unknown value");case 1:return e[0];case 2:throw e[1]}}class nA{constructor(e){this.fn=e,this.parents=new Set,this.childValues=new Map,this.dirtyChildren=null,this.dirty=!0,this.recomputing=!1,this.value=[],this.deps=null,++nA.count}peek(){if(1===this.value.length&&!nT(this))return nS(this),this.value[0]}recompute(e){var t;return nw(!this.recomputing,"already recomputing"),nS(this),nT(this)&&(nB(this),ng.withValue(this,nI,[this,e]),function(e,t){if("function"==typeof e.subscribe)try{n_(e),e.unsubscribe=e.subscribe.apply(null,t)}catch(t){return e.setDirty(),!1}return!0}(this,e)&&(this.dirty=!1,nT(this)||(t=this,nE(t,nC)))),nx(this.value)}setDirty(){this.dirty||(this.dirty=!0,nE(this,nP),n_(this))}dispose(){this.setDirty(),nB(this),nE(this,(e,t)=>{e.setDirty(),nM(e,this)})}forget(){this.dispose()}dependOn(e){e.add(this),this.deps||(this.deps=nv.pop()||new Set),this.deps.add(e)}forgetDeps(){this.deps&&(nb(this.deps).forEach(e=>e.delete(this)),this.deps.clear(),nv.push(this.deps),this.deps=null)}}function nS(e){let t=ng.getValue();if(t)return e.parents.add(t),t.childValues.has(e)||t.childValues.set(e,[]),nT(e)?nP(t,e):nC(t,e),t}function nI(e,t){let n;e.recomputing=!0;let{normalizeResult:r}=e;r&&1===e.value.length&&(n=e.value.slice(0)),e.value.length=0;try{if(e.value[0]=e.fn.apply(null,t),r&&n&&!nk(n,e.value))try{e.value[0]=r(e.value[0],n[0])}catch(e){}}catch(t){e.value[1]=t}e.recomputing=!1}function nT(e){return e.dirty||!!(e.dirtyChildren&&e.dirtyChildren.size)}function nE(e,t){let n=e.parents.size;if(n){let r=nb(e.parents);for(let i=0;i0&&e.childValues.forEach((t,n)=>{nM(e,n)}),e.forgetDeps(),nw(null===e.dirtyChildren)}function nM(e,t){t.parents.delete(e),e.childValues.delete(t),nO(e,t)}nA.count=0;let nR={setDirty:!0,dispose:!0,forget:!0};function nL(e){let t=new Map,n=e&&e.subscribe;function r(e){let r=ng.getValue();if(r){let i=t.get(e);i||t.set(e,i=new Set),r.dependOn(i),"function"==typeof n&&(n_(i),i.unsubscribe=n(e))}}return r.dirty=function(e,n){let r=t.get(e);if(r){let i=n&&ny.call(nR,n)?n:"setDirty";nb(r).forEach(e=>e[i]()),t.delete(e),n_(r)}},r}function nN(...e){let t=r||(r=new no("function"==typeof WeakMap));return t.lookupArray(e)}let nD=new Set;function nF(e,{max:t=65536,keyArgs:n,makeCacheKey:r=nN,normalizeResult:i,subscribe:o,cache:a=eT}=Object.create(null)){let s="function"==typeof a?new a(t,e=>e.dispose()):a,u=function(){let t=r.apply(null,n?n.apply(null,arguments):arguments);if(void 0===t)return e.apply(null,arguments);let a=s.get(t);a||(s.set(t,a=new nA(e)),a.normalizeResult=i,a.subscribe=o,a.forget=()=>s.delete(t));let u=a.recompute(Array.prototype.slice.call(arguments));return s.set(t,a),nD.add(s),ng.hasValue()||(nD.forEach(e=>e.clean()),nD.clear()),u};function l(e){let t=e&&s.get(e);t&&t.setDirty()}function c(e){let t=e&&s.get(e);if(t)return t.peek()}function d(e){return!!e&&s.delete(e)}return Object.defineProperty(u,"size",{get:()=>s.size,configurable:!1,enumerable:!1}),Object.freeze(u.options={max:t,keyArgs:n,makeCacheKey:r,normalizeResult:i,subscribe:o,cache:s}),u.dirtyKey=l,u.dirty=function(){l(r.apply(null,arguments))},u.peekKey=c,u.peek=function(){return c(r.apply(null,arguments))},u.forgetKey=d,u.forget=function(){return d(r.apply(null,arguments))},u.makeCacheKey=r,u.getKey=n?function(){return r.apply(null,n.apply(null,arguments))}:r,Object.freeze(u)}function nq(e){return e}var nj=function(){function e(e,t){void 0===t&&(t=Object.create(null)),this.resultCache=tu?new WeakSet:new Set,this.transform=e,t.getCacheKey&&(this.getCacheKey=t.getCacheKey),this.cached=!1!==t.cache,this.resetCache()}return e.prototype.getCacheKey=function(e){return[e]},e.identity=function(){return new e(nq,{cache:!1})},e.split=function(t,n,r){return void 0===r&&(r=e.identity()),Object.assign(new e(function(e){return(t(e)?n:r).transformDocument(e)},{cache:!1}),{left:n,right:r})},e.prototype.resetCache=function(){var t=this;if(this.cached){var n=new ne(ts);this.performWork=nF(e.prototype.performWork.bind(this),{makeCacheKey:function(e){var r=t.getCacheKey(e);if(r)return q(Array.isArray(r),77),n.lookupArray(r)},max:eB["documentTransform.cache"],cache:eS})}},e.prototype.performWork=function(e){return e0(e),this.transform(e)},e.prototype.transformDocument=function(e){if(this.resultCache.has(e))return e;var t=this.performWork(e);return this.resultCache.add(t),t},e.prototype.concat=function(t){var n=this;return Object.assign(new e(function(e){return t.transformDocument(n.transformDocument(e))},{cache:!1}),{left:this,right:t})},e}();function nU(e,t,n){return new ec(function(r){var i={then:function(e){return new Promise(function(t){return t(e())})}};function o(e,t){return function(n){if(e){var o=function(){return r.closed?0:e(n)};i=i.then(o,o).then(function(e){return r.next(e)},function(e){return r.error(e)})}else r[t](n)}}var a={next:o(t,"next"),error:o(n,"error"),complete:function(){i.then(function(){return r.complete()})}},s=e.subscribe(a);return function(){return s.unsubscribe()}})}function nz(e){var t=tb(e.errors)?e.errors.slice(0):[];return tA(e)&&tb(e.incremental)&&e.incremental.forEach(function(e){e.errors&&t.push.apply(t,e.errors)}),t}function nV(e,t,n){var r=[];e.forEach(function(e){return e[t]&&r.push(e)}),r.forEach(function(e){return e[t](n)})}function nW(e){function t(t){Object.defineProperty(e,t,{value:ec})}return tl&&Symbol.species&&t(Symbol.species),t("@@species"),e}function n$(e){return e&&"function"==typeof e.then}var nK=function(e){function t(t){var n=e.call(this,function(e){return n.addObserver(e),function(){return n.removeObserver(e)}})||this;return n.observers=new Set,n.promise=new Promise(function(e,t){n.resolve=e,n.reject=t}),n.handlers={next:function(e){null!==n.sub&&(n.latest=["next",e],n.notify("next",e),nV(n.observers,"next",e))},error:function(e){var t=n.sub;null!==t&&(t&&setTimeout(function(){return t.unsubscribe()}),n.sub=null,n.latest=["error",e],n.reject(e),n.notify("error",e),nV(n.observers,"error",e))},complete:function(){var e=n.sub,t=n.sources;if(null!==e){var r=(void 0===t?[]:t).shift();r?n$(r)?r.then(function(e){return n.sub=e.subscribe(n.handlers)},n.handlers.error):n.sub=r.subscribe(n.handlers):(e&&setTimeout(function(){return e.unsubscribe()}),n.sub=null,n.latest&&"next"===n.latest[0]?n.resolve(n.latest[1]):n.resolve(),n.notify("complete"),nV(n.observers,"complete"))}}},n.nextResultListeners=new Set,n.cancel=function(e){n.reject(e),n.sources=[],n.handlers.error(e)},n.promise.catch(function(e){}),"function"==typeof t&&(t=[new ec(t)]),n$(t)?t.then(function(e){return n.start(e)},n.handlers.error):n.start(t),n}return y(t,e),t.prototype.start=function(e){void 0===this.sub&&(this.sources=Array.from(e),this.handlers.complete())},t.prototype.deliverLastMessage=function(e){if(this.latest){var t=this.latest[0],n=e[t];n&&n.call(e,this.latest[1]),null===this.sub&&"next"===t&&e.complete&&e.complete()}},t.prototype.addObserver=function(e){this.observers.has(e)||(this.deliverLastMessage(e),this.observers.add(e))},t.prototype.removeObserver=function(e){this.observers.delete(e)&&this.observers.size<1&&this.handlers.complete()},t.prototype.notify=function(e,t){var n=this.nextResultListeners;n.size&&(this.nextResultListeners=new Set,n.forEach(function(n){return n(e,t)}))},t.prototype.beforeNext=function(e){var t=!1;this.nextResultListeners.add(function(n,r){t||(t=!0,e(n,r))})},t}(ec);function nH(e){return!!e&&e<7}function nG(){for(var e=[],t=0;t0},t.prototype.tearDownQuery=function(){this.isTornDown||(this.concast&&this.observer&&(this.concast.removeObserver(this.observer),delete this.concast,delete this.observer),this.stopPolling(),this.subscriptions.forEach(function(e){return e.unsubscribe()}),this.subscriptions.clear(),this.queryManager.stopQuery(this.queryId),this.observers.clear(),this.isTornDown=!0)},t.prototype.transformDocument=function(e){return this.queryManager.transform(e)},t.prototype.maskResult=function(e){return e&&"data"in e?b(b({},e),{data:this.queryManager.maskOperation({document:this.query,data:e.data,fetchPolicy:this.options.fetchPolicy,id:this.queryId})}):e},t}(ec);function n6(e){var t=e.options,n=t.fetchPolicy,r=t.nextFetchPolicy;return"cache-and-network"===n||"network-only"===n?e.reobserve({fetchPolicy:"cache-first",nextFetchPolicy:function(e,t){return(this.nextFetchPolicy=r,"function"==typeof this.nextFetchPolicy)?this.nextFetchPolicy(e,t):n}}):e.reobserve()}function n3(e){!1!==globalThis.__DEV__&&q.error(25,e.message,e.stack)}function n4(e){!1!==globalThis.__DEV__&&e&&!1!==globalThis.__DEV__&&q.debug(26,e)}function n5(e){return"network-only"===e||"no-cache"===e||"standby"===e}nW(n2);var n8=new(ts?WeakMap:Map);function n9(e,t){var n=e[t];"function"==typeof n&&(e[t]=function(){return n8.set(e,(n8.get(e)+1)%1e15),n.apply(this,arguments)})}function n7(e){e.notifyTimeout&&(clearTimeout(e.notifyTimeout),e.notifyTimeout=void 0)}var re=function(){function e(e,t){void 0===t&&(t=e.generateQueryId()),this.queryId=t,this.listeners=new Set,this.document=null,this.lastRequestId=1,this.stopped=!1,this.dirty=!1,this.observableQuery=null;var n=this.cache=e.cache;n8.has(n)||(n8.set(n,0),n9(n,"evict"),n9(n,"modify"),n9(n,"reset"))}return e.prototype.init=function(e){var t=e.networkStatus||d.loading;return this.variables&&this.networkStatus!==d.loading&&!t1(this.variables,e.variables)&&(t=d.setVariables),t1(e.variables,this.variables)||(this.lastDiff=void 0),Object.assign(this,{document:e.document,variables:e.variables,networkError:null,graphQLErrors:this.graphQLErrors||[],networkStatus:t}),e.observableQuery&&this.setObservableQuery(e.observableQuery),e.lastRequestId&&(this.lastRequestId=e.lastRequestId),this},e.prototype.reset=function(){n7(this),this.dirty=!1},e.prototype.resetDiff=function(){this.lastDiff=void 0},e.prototype.getDiff=function(){var e=this.getDiffOptions();if(this.lastDiff&&t1(e,this.lastDiff.options))return this.lastDiff.diff;this.updateWatch(this.variables);var t=this.observableQuery;if(t&&"no-cache"===t.options.fetchPolicy)return{complete:!1};var n=this.cache.diff(e);return this.updateLastDiff(n,e),n},e.prototype.updateLastDiff=function(e,t){this.lastDiff=e?{diff:e,options:t||this.getDiffOptions()}:void 0},e.prototype.getDiffOptions=function(e){var t;return void 0===e&&(e=this.variables),{query:this.document,variables:e,returnPartialData:!0,optimistic:!0,canonizeResults:null===(t=this.observableQuery)||void 0===t?void 0:t.options.canonizeResults}},e.prototype.setDiff=function(e){var t,n=this,r=this.lastDiff&&this.lastDiff.diff;!(e&&!e.complete&&(null===(t=this.observableQuery)||void 0===t?void 0:t.getLastError()))&&(this.updateLastDiff(e),this.dirty||t1(r&&r.result,e&&e.result)||(this.dirty=!0,this.notifyTimeout||(this.notifyTimeout=setTimeout(function(){return n.notify()},0))))},e.prototype.setObservableQuery=function(e){var t=this;e!==this.observableQuery&&(this.oqListener&&this.listeners.delete(this.oqListener),this.observableQuery=e,e?(e.queryInfo=this,this.listeners.add(this.oqListener=function(){t.getDiff().fromOptimisticTransaction?e.observe():n6(e)})):delete this.oqListener)},e.prototype.notify=function(){var e=this;n7(this),this.shouldNotify()&&this.listeners.forEach(function(t){return t(e)}),this.dirty=!1},e.prototype.shouldNotify=function(){if(!this.dirty||!this.listeners.size)return!1;if(nH(this.networkStatus)&&this.observableQuery){var e=this.observableQuery.options.fetchPolicy;if("cache-only"!==e&&"cache-and-network"!==e)return!1}return!0},e.prototype.stop=function(){if(!this.stopped){this.stopped=!0,this.reset(),this.cancel(),this.cancel=e.prototype.cancel;var t=this.observableQuery;t&&t.stopPolling()}},e.prototype.cancel=function(){},e.prototype.updateWatch=function(e){var t=this;void 0===e&&(e=this.variables);var n=this.observableQuery;if(!n||"no-cache"!==n.options.fetchPolicy){var r=b(b({},this.getDiffOptions(e)),{watcher:this,callback:function(e){return t.setDiff(e)}});this.lastWatch&&t1(r,this.lastWatch)||(this.cancel(),this.cancel=this.cache.watch(this.lastWatch=r))}},e.prototype.resetLastWrite=function(){this.lastWrite=void 0},e.prototype.shouldWrite=function(e,t){var n=this.lastWrite;return!(n&&n.dmCount===n8.get(this.cache)&&t1(t,n.variables)&&t1(e.data,n.result.data))},e.prototype.markResult=function(e,t,n,r){var i=this,o=new tx,a=tb(e.errors)?e.errors.slice(0):[];if(this.reset(),"incremental"in e&&tb(e.incremental)){var s=tS(this.getDiff().result,e);e.data=s}else if("hasNext"in e&&e.hasNext){var u=this.getDiff();e.data=o.merge(u.result,e.data)}this.graphQLErrors=a,"no-cache"===n.fetchPolicy?this.updateLastDiff({result:e.data,complete:!0},this.getDiffOptions(n.variables)):0!==r&&(rt(e,n.errorPolicy)?this.cache.performTransaction(function(o){if(i.shouldWrite(e,n.variables))o.writeQuery({query:t,data:e.data,variables:n.variables,overwrite:1===r}),i.lastWrite={result:e,variables:n.variables,dmCount:n8.get(i.cache)};else if(i.lastDiff&&i.lastDiff.diff.complete){e.data=i.lastDiff.diff.result;return}var a=i.getDiffOptions(n.variables),s=o.diff(a);!i.stopped&&t1(i.variables,n.variables)&&i.updateWatch(n.variables),i.updateLastDiff(s,a),s.complete&&(e.data=s.result)}):this.lastWrite=void 0)},e.prototype.markReady=function(){return this.networkError=null,this.networkStatus=d.ready},e.prototype.markError=function(e){return this.networkStatus=d.error,this.lastWrite=void 0,this.reset(),e.graphQLErrors&&(this.graphQLErrors=e.graphQLErrors),e.networkError&&(this.networkError=e.networkError),e},e}();function rt(e,t){void 0===t&&(t="none");var n="ignore"===t||"all"===t,r=!tb(nz(e));return!r&&n&&e.data&&(r=!0),r}function rn(e){if(!1!==globalThis.__DEV__){var t;(t=new Set([e])).forEach(function(e){ed(e)&&function(e){if(!1!==globalThis.__DEV__&&!Object.isFrozen(e))try{Object.freeze(e)}catch(e){if(e instanceof TypeError)return null;throw e}return e}(e)===e&&Object.getOwnPropertyNames(e).forEach(function(n){ed(e[n])&&t.add(e[n])})})}return e}var rr=ts?WeakMap:Map,ri=tu?WeakSet:Set,ro=new nf,ra=!1;function rs(){ra||(ra=!0,!1!==globalThis.__DEV__&&q.warn(52))}function ru(e,t,n){return ro.withValue(!0,function(){var r=function e(t,n,r,i,o){var a,s=r.knownChanged,u=function(e,t){if(t.has(e))return t.get(e);var n=Array.isArray(e)?[]:Object.create(null);return t.set(e,n),n}(t,r.mutableTargets);if(Array.isArray(t)){for(var l=0,c=Array.from(t.entries());l0||(e.refetchQueries||"").length>0||e.update||e.onQueryUpdated||e.removeOptimistic){var l=[];if(this.refetchQueries({updateCache:function(t){o||i.forEach(function(e){return t.write(e)});var a,s=e.update,u=!(tA(a=r)||"hasNext"in a&&"data"in a)||tA(r)&&!r.hasNext;if(s){if(!o){var l=t.diff({id:"ROOT_MUTATION",query:n.getDocumentInfo(e.document).asQuery,variables:e.variables,optimistic:!1,returnPartialData:!0});l.complete&&("incremental"in(r=b(b({},r),{data:l.result}))&&delete r.incremental,"hasNext"in r&&delete r.hasNext)}u&&s(t,r,{context:e.context,variables:e.variables})}o||e.keepRootFields||!u||t.modify({id:"ROOT_MUTATION",fields:function(e,t){var n=t.fieldName,r=t.DELETE;return"__typename"===n?e:r}})},include:e.refetchQueries,optimistic:!1,removeOptimistic:e.removeOptimistic,onQueryUpdated:e.onQueryUpdated||null}).forEach(function(e){return l.push(e)}),e.awaitRefetchQueries||e.onQueryUpdated)return Promise.all(l).then(function(){return r})}return Promise.resolve(r)},e.prototype.markMutationOptimistic=function(e,t){var n=this,r="function"==typeof e?e(t.variables,{IGNORE:rd}):e;return r!==rd&&(this.cache.recordOptimisticTransaction(function(e){try{n.markMutationResult(b(b({},t),{result:{data:r}}),e)}catch(e){!1!==globalThis.__DEV__&&q.error(e)}},t.mutationId),!0)},e.prototype.fetchQuery=function(e,t,n){return this.fetchConcastWithInfo(e,t,n).concast.promise},e.prototype.getQueryStore=function(){var e=Object.create(null);return this.queries.forEach(function(t,n){e[n]={variables:t.variables,networkStatus:t.networkStatus,networkError:t.networkError,graphQLErrors:t.graphQLErrors}}),e},e.prototype.resetErrors=function(e){var t=this.queries.get(e);t&&(t.networkError=void 0,t.graphQLErrors=[])},e.prototype.transform=function(e){return this.documentTransform.transformDocument(e)},e.prototype.getDocumentInfo=function(e){var t=this.transformCache;if(!t.has(e)){var n={hasClientExports:e&&ti(["client","export"],e,!0),hasForcedResolvers:this.localState.shouldForceResolvers(e),hasNonreactiveDirective:ti(["nonreactive"],e),nonReactiveQuery:(e0(e),ey(e,{FragmentSpread:function(e){var t;if(null===(t=e.directives)||void 0===t||!t.some(function(e){return"unmask"===e.name.value}))return b(b({},e),{directives:k(k([],e.directives||[],!0),[{kind:em.h.DIRECTIVE,name:{kind:em.h.NAME,value:"nonreactive"}}],!1)})}})),clientQuery:this.localState.clientQuery(e),serverQuery:t$([{name:"client",remove:!0},{name:"connection"},{name:"nonreactive"},{name:"unmask"}],e),defaultVars:e8(e1(e)),asQuery:b(b({},e),{definitions:e.definitions.map(function(e){return"OperationDefinition"===e.kind&&"query"!==e.operation?b(b({},e),{operation:"query"}):e})})};t.set(e,n)}return t.get(e)},e.prototype.getVariables=function(e,t){return b(b({},this.getDocumentInfo(e).defaultVars),t)},e.prototype.watchQuery=function(e){var t=this.transform(e.query);void 0===(e=b(b({},e),{variables:this.getVariables(t,e.variables)})).notifyOnNetworkStatusChange&&(e.notifyOnNetworkStatusChange=!1);var n=new re(this),r=new n2({queryManager:this,queryInfo:n,options:e});return r.lastQuery=t,this.queries.set(r.queryId,n),n.init({document:t,observableQuery:r,variables:r.variables}),r},e.prototype.query=function(e,t){var n=this;void 0===t&&(t=this.generateQueryId()),q(e.query,30),q("Document"===e.query.kind,31),q(!e.returnPartialData,32),q(!e.pollInterval,33);var r=this.transform(e.query);return this.fetchQuery(t,b(b({},e),{query:r})).then(function(i){return i&&b(b({},i),{data:n.maskOperation({document:r,data:i.data,fetchPolicy:e.fetchPolicy,id:t})})}).finally(function(){return n.stopQuery(t)})},e.prototype.generateQueryId=function(){return String(this.queryIdCounter++)},e.prototype.generateRequestId=function(){return this.requestIdCounter++},e.prototype.generateMutationId=function(){return String(this.mutationIdCounter++)},e.prototype.stopQueryInStore=function(e){this.stopQueryInStoreNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryInStoreNoBroadcast=function(e){var t=this.queries.get(e);t&&t.stop()},e.prototype.clearStore=function(e){return void 0===e&&(e={discardWatches:!0}),this.cancelPendingFetches(j(34)),this.queries.forEach(function(e){e.observableQuery?e.networkStatus=d.loading:e.stop()}),this.mutationStore&&(this.mutationStore=Object.create(null)),this.cache.reset(e)},e.prototype.getObservableQueries=function(e){var t=this;void 0===e&&(e="active");var n=new Map,r=new Map,i=new Map,o=new Set;return Array.isArray(e)&&e.forEach(function(e){if("string"==typeof e)r.set(e,e),i.set(e,!1);else if(ed(e)&&"Document"===e.kind&&Array.isArray(e.definitions)){var n=tq(t.transform(e));r.set(n,e2(e)),i.set(n,!1)}else ed(e)&&e.query&&o.add(e)}),this.queries.forEach(function(t,r){var o=t.observableQuery,a=t.document;if(o){if("all"===e){n.set(r,o);return}var s=o.queryName;if("standby"===o.options.fetchPolicy||"active"===e&&!o.hasObservers())return;("active"===e||s&&i.has(s)||a&&i.has(tq(a)))&&(n.set(r,o),s&&i.set(s,!0),a&&i.set(tq(a),!0))}}),o.size&&o.forEach(function(e){var r=N("legacyOneTimeQuery"),i=t.getQuery(r).init({document:e.query,variables:e.variables}),o=new n2({queryManager:t,queryInfo:i,options:b(b({},e),{fetchPolicy:"network-only"})});q(o.queryId===r),i.setObservableQuery(o),n.set(r,o)}),!1!==globalThis.__DEV__&&i.size&&i.forEach(function(e,t){if(!e){var n=r.get(t);n?!1!==globalThis.__DEV__&&q.warn(35,n):!1!==globalThis.__DEV__&&q.warn(36)}}),n},e.prototype.reFetchObservableQueries=function(e){var t=this;void 0===e&&(e=!1);var n=[];return this.getObservableQueries(e?"all":"active").forEach(function(r,i){var o=r.options.fetchPolicy;r.resetLastResults(),(e||"standby"!==o&&"cache-only"!==o)&&n.push(r.refetch()),t.getQuery(i).setDiff(null)}),this.broadcastQueries(),Promise.all(n)},e.prototype.setObservableQuery=function(e){this.getQuery(e.queryId).setObservableQuery(e)},e.prototype.startGraphQLSubscription=function(e){var t=this,n=e.query,r=e.variables,i=e.fetchPolicy,o=e.errorPolicy,a=void 0===o?"none":o,s=e.context,u=void 0===s?{}:s,l=e.extensions,c=void 0===l?{}:l;n=this.transform(n),r=this.getVariables(n,r);var d=function(e){return t.getObservableFromLink(n,u,e,c).map(function(r){"no-cache"!==i&&(rt(r,a)&&t.cache.write({query:n,result:r.data,dataId:"ROOT_SUBSCRIPTION",variables:e}),t.broadcastQueries());var o=tb(nz(r)),s=!!r.extensions&&Array.isArray(r.extensions[tf]);if(o||s){var u={};if(o&&(u.graphQLErrors=r.errors),s&&(u.protocolErrors=r.extensions[tf]),"none"===a||s)throw new tg(u)}return"ignore"===a&&delete r.errors,r})};if(this.getDocumentInfo(n).hasClientExports){var p=this.localState.addExportedVariables(n,r,u).then(d);return new ec(function(e){var t=null;return p.then(function(n){return t=n.subscribe(e)},e.error),function(){return t&&t.unsubscribe()}})}return d(r)},e.prototype.stopQuery=function(e){this.stopQueryNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryNoBroadcast=function(e){this.stopQueryInStoreNoBroadcast(e),this.removeQuery(e)},e.prototype.removeQuery=function(e){this.fetchCancelFns.delete(e),this.queries.has(e)&&(this.getQuery(e).stop(),this.queries.delete(e))},e.prototype.broadcastQueries=function(){this.onBroadcast&&this.onBroadcast(),this.queries.forEach(function(e){return e.notify()})},e.prototype.getLocalState=function(){return this.localState},e.prototype.getObservableFromLink=function(e,t,n,r,i){var o,a,s=this;void 0===i&&(i=null!==(o=null==t?void 0:t.queryDeduplication)&&void 0!==o?o:this.queryDeduplication);var u=this.getDocumentInfo(e),l=u.serverQuery,c=u.clientQuery;if(l){var d=this.inFlightLinkObservables,p=this.link,f={query:l,variables:n,operationName:e2(l)||void 0,context:this.prepareContext(b(b({},t),{forceFetch:!i})),extensions:r};if(t=f.context,i){var h=tq(l),m=eU(n),g=d.lookup(h,m);if(!(a=g.observable)){var y=new nK([tn(p,f)]);a=g.observable=y,y.beforeNext(function(){d.remove(h,m)})}}else a=new nK([tn(p,f)])}else a=new nK([ec.of({data:{}})]),t=this.prepareContext(t);return c&&(a=nU(a,function(e){return s.localState.runResolvers({document:c,remoteResult:e,context:t,variables:n})})),a},e.prototype.getResultsFromLink=function(e,t,n){var r=e.lastRequestId=this.generateRequestId(),i=this.cache.transformForLink(n.query);return nU(this.getObservableFromLink(i,n.context,n.variables),function(o){var a=nz(o),s=a.length>0,u=n.errorPolicy;if(r>=e.lastRequestId){if(s&&"none"===u)throw e.markError(new tg({graphQLErrors:a}));e.markResult(o,i,n,t),e.markReady()}var l={data:o.data,loading:!1,networkStatus:d.ready};return s&&"none"===u&&(l.data=void 0),s&&"ignore"!==u&&(l.errors=a,l.networkStatus=d.error),l},function(t){var n=th(t)?t:new tg({networkError:t});throw r>=e.lastRequestId&&e.markError(n),n})},e.prototype.fetchConcastWithInfo=function(e,t,n,r){var i,o,a=this;void 0===n&&(n=d.loading),void 0===r&&(r=t.query);var s=this.getVariables(r,t.variables),u=this.getQuery(e),l=this.defaultOptions.watchQuery,c=t.fetchPolicy,p=void 0===c?l&&l.fetchPolicy||"cache-first":c,f=t.errorPolicy,h=void 0===f?l&&l.errorPolicy||"none":f,m=t.returnPartialData,g=t.notifyOnNetworkStatusChange,y=t.context,b=Object.assign({},t,{query:r,variables:s,fetchPolicy:p,errorPolicy:h,returnPartialData:void 0!==m&&m,notifyOnNetworkStatusChange:void 0!==g&&g,context:void 0===y?{}:y}),_=function(e){b.variables=e;var r=a.fetchQueryByPolicy(u,b,n);return"standby"!==b.fetchPolicy&&r.sources.length>0&&u.observableQuery&&u.observableQuery.applyNextFetchPolicy("after-fetch",t),r},v=function(){return a.fetchCancelFns.delete(e)};if(this.fetchCancelFns.set(e,function(e){v(),setTimeout(function(){return i.cancel(e)})}),this.getDocumentInfo(b.query).hasClientExports)i=new nK(this.localState.addExportedVariables(b.query,b.variables,b.context).then(_).then(function(e){return e.sources})),o=!0;else{var w=_(b.variables);o=w.fromLink,i=new nK(w.sources)}return i.promise.then(v,v),{concast:i,fromLink:o}},e.prototype.refetchQueries=function(e){var t=this,n=e.updateCache,r=e.include,i=e.optimistic,o=void 0!==i&&i,a=e.removeOptimistic,s=void 0===a?o?N("refetchQueries"):void 0:a,u=e.onQueryUpdated,l=new Map;r&&this.getObservableQueries(r).forEach(function(e,n){l.set(n,{oq:e,lastDiff:t.getQuery(n).getDiff()})});var c=new Map;return n&&this.cache.batch({update:n,optimistic:o&&s||!1,removeOptimistic:s,onWatchUpdated:function(e,t,n){var r=e.watcher instanceof re&&e.watcher.observableQuery;if(r){if(u){l.delete(r.queryId);var i=u(r,t,n);return!0===i&&(i=r.refetch()),!1!==i&&c.set(r,i),i}null!==u&&l.set(r.queryId,{oq:r,lastDiff:n,diff:t})}}}),l.size&&l.forEach(function(e,n){var r,i=e.oq,o=e.lastDiff,a=e.diff;if(u){if(!a){var s=i.queryInfo;s.reset(),a=s.getDiff()}r=u(i,a,o)}u&&!0!==r||(r=i.refetch()),!1!==r&&c.set(i,r),n.indexOf("legacyOneTimeQuery")>=0&&t.stopQueryNoBroadcast(n)}),s&&this.cache.removeOptimistic(s),c},e.prototype.maskOperation=function(e){var t,n,r,i=e.document,o=e.data;if(!1!==globalThis.__DEV__){var a,s=e.fetchPolicy,u=e.id,l=null===(t=e1(i))||void 0===t?void 0:t.operation,c=(null!==(n=null==l?void 0:l[0])&&void 0!==n?n:"o")+u;!this.dataMasking||"no-cache"!==s||(a=!0,ey(i,{FragmentSpread:function(e){if(!(a=!!e.directives&&e.directives.some(function(e){return"unmask"===e.name.value})))return eg}}),a)||this.noCacheWarningsByQueryId.has(c)||(this.noCacheWarningsByQueryId.add(c),!1!==globalThis.__DEV__&&q.warn(37,null!==(r=e2(i))&&void 0!==r?r:"Unnamed ".concat(null!=l?l:"operation")))}return this.dataMasking?function(e,t,n){if(!n.fragmentMatches)return!1!==globalThis.__DEV__&&rs(),e;var r,i=e1(t);return(q(i,51),null==e)?e:ru(e,i.selectionSet,{operationType:i.operation,operationName:null===(r=i.name)||void 0===r?void 0:r.value,fragmentMap:e_(e6(t)),cache:n,mutableTargets:new rr,knownChanged:new ri})}(o,i,this.cache):o},e.prototype.maskFragment=function(e){var t=e.data,n=e.fragment,r=e.fragmentName;return this.dataMasking?rl(t,n,this.cache,r):t},e.prototype.fetchQueryByPolicy=function(e,t,n){var r=this,i=t.query,o=t.variables,a=t.fetchPolicy,s=t.refetchWritePolicy,u=t.errorPolicy,l=t.returnPartialData,c=t.context,p=t.notifyOnNetworkStatusChange,f=e.networkStatus;e.init({document:i,variables:o,networkStatus:n});var h=function(){return e.getDiff()},m=function(t,n){void 0===n&&(n=e.networkStatus||d.loading);var a=t.result;!1===globalThis.__DEV__||l||t1(a,{})||n4(t.missing);var s=function(e){return ec.of(b({data:e,loading:nH(n),networkStatus:n},t.complete?null:{partial:!0}))};return a&&r.getDocumentInfo(i).hasForcedResolvers?r.localState.runResolvers({document:i,remoteResult:{data:a},context:c,variables:o,onlyRunForcedResolvers:!0}).then(function(e){return s(e.data||void 0)}):"none"===u&&n===d.refetch&&Array.isArray(t.missing)?s(void 0):s(a)},g="no-cache"===a?0:n===d.refetch&&"merge"!==s?1:2,y=function(){return r.getResultsFromLink(e,g,{query:i,variables:o,context:c,fetchPolicy:a,errorPolicy:u})},_=p&&"number"==typeof f&&f!==n&&nH(n);switch(a){default:case"cache-first":var v=h();if(v.complete)return{fromLink:!1,sources:[m(v,e.markReady())]};if(l||_)return{fromLink:!0,sources:[m(v),y()]};return{fromLink:!0,sources:[y()]};case"cache-and-network":var v=h();if(v.complete||l||_)return{fromLink:!0,sources:[m(v),y()]};return{fromLink:!0,sources:[y()]};case"cache-only":return{fromLink:!1,sources:[m(h(),e.markReady())]};case"network-only":if(_)return{fromLink:!0,sources:[m(h()),y()]};return{fromLink:!0,sources:[y()]};case"no-cache":if(_)return{fromLink:!0,sources:[m(e.getDiff()),y()]};return{fromLink:!0,sources:[y()]};case"standby":return{fromLink:!1,sources:[]}}},e.prototype.getQuery=function(e){return e&&!this.queries.has(e)&&this.queries.set(e,new re(this,e)),this.queries.get(e)},e.prototype.prepareContext=function(e){void 0===e&&(e={});var t=this.localState.prepareContext(e);return b(b(b({},this.defaultContext),t),{clientAwareness:this.clientAwareness})},e}();function rf(e){return e.kind===em.h.FIELD||e.kind===em.h.FRAGMENT_SPREAD||e.kind===em.h.INLINE_FRAGMENT}var rh=new nf,rm=new WeakMap;function rg(e){var t=rm.get(e);return t||rm.set(e,t={vars:new Set,dep:nL()}),t}function ry(e){rg(e).vars.forEach(function(t){return t.forgetCache(e)})}function rb(e){var t=new Set,n=new Set,r=function(o){if(arguments.length>0){if(e!==o){e=o,t.forEach(function(e){rg(e).dep.dirty(r),e.broadcastWatches&&e.broadcastWatches()});var a=Array.from(n);n.clear(),a.forEach(function(t){return t(e)})}}else{var s=rh.getValue();s&&(i(s),rg(s).dep(r))}return e};r.onNextChange=function(e){return n.add(e),function(){n.delete(e)}};var i=r.attachCache=function(e){return t.add(e),rg(e).vars.add(r),r};return r.forgetCache=function(e){return t.delete(e)},r}var r_=function(){function e(e){var t=e.cache,n=e.client,r=e.resolvers,i=e.fragmentMatcher;this.selectionsToResolveCache=new WeakMap,this.cache=t,n&&(this.client=n),r&&this.addResolvers(r),i&&this.setFragmentMatcher(i)}return e.prototype.addResolvers=function(e){var t=this;this.resolvers=this.resolvers||{},Array.isArray(e)?e.forEach(function(e){t.resolvers=tv(t.resolvers,e)}):this.resolvers=tv(this.resolvers,e)},e.prototype.setResolvers=function(e){this.resolvers={},this.addResolvers(e)},e.prototype.getResolvers=function(){return this.resolvers||{}},e.prototype.runResolvers=function(e){return v(this,arguments,void 0,function(e){var t=e.document,n=e.remoteResult,r=e.context,i=e.variables,o=e.onlyRunForcedResolvers,a=void 0!==o&&o;return w(this,function(e){return t?[2,this.resolveDocument(t,n.data,r,i,this.fragmentMatcher,a).then(function(e){return b(b({},n),{data:e.result})})]:[2,n]})})},e.prototype.setFragmentMatcher=function(e){this.fragmentMatcher=e},e.prototype.getFragmentMatcher=function(){return this.fragmentMatcher},e.prototype.clientQuery=function(e){return ti(["client"],e)&&this.resolvers?e:null},e.prototype.serverQuery=function(e){return tH(e)},e.prototype.prepareContext=function(e){var t=this.cache;return b(b({},e),{cache:t,getCacheKey:function(e){return t.identify(e)}})},e.prototype.addExportedVariables=function(e){return v(this,arguments,void 0,function(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),w(this,function(r){return e?[2,this.resolveDocument(e,this.buildRootValueFromCache(e,t)||{},this.prepareContext(n),t).then(function(e){return b(b({},t),e.exportedVariables)})]:[2,b({},t)]})})},e.prototype.shouldForceResolvers=function(e){var t=!1;return ey(e,{Directive:{enter:function(e){if("client"===e.name.value&&e.arguments&&(t=e.arguments.some(function(e){return"always"===e.name.value&&"BooleanValue"===e.value.kind&&!0===e.value.value})))return eg}}}),t},e.prototype.buildRootValueFromCache=function(e,t){return this.cache.diff({query:"query"===e5(e).operation?e:ey(e,{OperationDefinition:{enter:function(e){return b(b({},e),{operation:"query"})}}}),variables:t,returnPartialData:!0,optimistic:!1}).result},e.prototype.resolveDocument=function(e,t){return v(this,arguments,void 0,function(e,t,n,r,i,o){var a,s,u,l,c,d,p,f,h;return void 0===n&&(n={}),void 0===r&&(r={}),void 0===i&&(i=function(){return!0}),void 0===o&&(o=!1),w(this,function(m){return a=e5(e),s=e_(e6(e)),u=this.collectSelectionsToResolve(a,s),c=(l=a.operation)?l.charAt(0).toUpperCase()+l.slice(1):"Query",d=this,p=d.cache,f=d.client,h={fragmentMap:s,context:b(b({},n),{cache:p,client:f}),variables:r,fragmentMatcher:i,defaultOperationType:c,exportedVariables:{},selectionsToResolve:u,onlyRunForcedResolvers:o},[2,this.resolveSelectionSet(a.selectionSet,!1,t,h).then(function(e){return{result:e,exportedVariables:h.exportedVariables}})]})})},e.prototype.resolveSelectionSet=function(e,t,n,r){return v(this,void 0,void 0,function(){var i,o,a,s,u,l=this;return w(this,function(c){return i=r.fragmentMap,o=r.context,a=r.variables,s=[n],u=function(e){return v(l,void 0,void 0,function(){var u,l;return w(this,function(c){return(t||r.selectionsToResolve.has(e))&&tr(e,a)?eJ(e)?[2,this.resolveField(e,t,n,r).then(function(t){var n;void 0!==t&&s.push(((n={})[eX(e)]=t,n))})]:("InlineFragment"===e.kind?u=e:q(u=i[e.name.value],19,e.name.value),u&&u.typeCondition&&(l=u.typeCondition.name.value,r.fragmentMatcher(n,l,o))?[2,this.resolveSelectionSet(u.selectionSet,t,n,r).then(function(e){s.push(e)})]:[2]):[2]})})},[2,Promise.all(e.selections.map(u)).then(function(){return tw(s)})]})})},e.prototype.resolveField=function(e,t,n,r){return v(this,void 0,void 0,function(){var i,o,a,s,u,l,c,d,p,f=this;return w(this,function(h){return n?(i=r.variables,s=(o=e.name.value)!==(a=eX(e)),l=Promise.resolve(u=n[a]||n[o]),(!r.onlyRunForcedResolvers||this.shouldForceResolvers(e))&&(c=n.__typename||r.defaultOperationType,(d=this.resolvers&&this.resolvers[c])&&(p=d[s?o:a])&&(l=Promise.resolve(rh.withValue(this.cache,p,[n,eY(e,i),r.context,{field:e,fragmentMap:r.fragmentMap}])))),[2,l.then(function(n){if(void 0===n&&(n=u),e.directives&&e.directives.forEach(function(e){"export"===e.name.value&&e.arguments&&e.arguments.forEach(function(e){"as"===e.name.value&&"StringValue"===e.value.kind&&(r.exportedVariables[e.value.value]=n)})}),!e.selectionSet||null==n)return n;var i,o,a=null!==(o=null===(i=e.directives)||void 0===i?void 0:i.some(function(e){return"client"===e.name.value}))&&void 0!==o&&o;return Array.isArray(n)?f.resolveSubSelectedArray(e,t||a,n,r):e.selectionSet?f.resolveSelectionSet(e.selectionSet,t||a,n,r):void 0})]):[2,null]})})},e.prototype.resolveSubSelectedArray=function(e,t,n,r){var i=this;return Promise.all(n.map(function(n){return null===n?null:Array.isArray(n)?i.resolveSubSelectedArray(e,t,n,r):e.selectionSet?i.resolveSelectionSet(e.selectionSet,t,n,r):void 0}))},e.prototype.collectSelectionsToResolve=function(e,t){var n=function(e){return!Array.isArray(e)},r=this.selectionsToResolveCache;return function e(i){if(!r.has(i)){var o=new Set;r.set(i,o),ey(i,{Directive:function(e,t,r,i,a){"client"===e.name.value&&a.forEach(function(e){n(e)&&rf(e)&&o.add(e)})},FragmentSpread:function(r,i,a,s,u){var l=t[r.name.value];q(l,20,r.name.value);var c=e(l);c.size>0&&(u.forEach(function(e){n(e)&&rf(e)&&o.add(e)}),o.add(r),c.forEach(function(e){o.add(e)}))}})}return r.get(i)}(e)},e}();function rv(e,t){return nG(e,t,t.variables&&{variables:nG(b(b({},e&&e.variables),t.variables))})}var rw=!1,rk=function(){function e(e){var t,n=this;if(this.resetStoreCallbacks=[],this.clearStoreCallbacks=[],!e.cache)throw j(16);var r=e.uri,i=e.credentials,o=e.headers,a=e.cache,s=e.documentTransform,u=e.ssrMode,l=void 0!==u&&u,c=e.ssrForceFetchDelay,d=void 0===c?0:c,p=e.connectToDevTools,f=e.queryDeduplication,h=void 0===f||f,m=e.defaultOptions,g=e.defaultContext,y=e.assumeImmutableResults,_=void 0===y?a.assumeImmutableResults:y,v=e.resolvers,w=e.typeDefs,k=e.fragmentMatcher,x=e.name,A=e.version,S=e.devtools,I=e.dataMasking,T=e.link;T||(T=r?new tY({uri:r,credentials:i,headers:o}):tt.empty()),this.link=T,this.cache=a,this.disableNetworkFetches=l||d>0,this.queryDeduplication=h,this.defaultOptions=m||Object.create(null),this.typeDefs=w,this.devtoolsConfig=b(b({},S),{enabled:null!==(t=null==S?void 0:S.enabled)&&void 0!==t?t:p}),void 0===this.devtoolsConfig.enabled&&(this.devtoolsConfig.enabled=!1!==globalThis.__DEV__),d&&setTimeout(function(){return n.disableNetworkFetches=!1},d),this.watchQuery=this.watchQuery.bind(this),this.query=this.query.bind(this),this.mutate=this.mutate.bind(this),this.watchFragment=this.watchFragment.bind(this),this.resetStore=this.resetStore.bind(this),this.reFetchObservableQueries=this.reFetchObservableQueries.bind(this),this.version=B,this.localState=new r_({cache:a,client:this,resolvers:v,fragmentMatcher:k}),this.queryManager=new rp({cache:this.cache,link:this.link,defaultOptions:this.defaultOptions,defaultContext:g,documentTransform:s,queryDeduplication:h,ssrMode:l,dataMasking:!!I,clientAwareness:{name:x,version:A},localState:this.localState,assumeImmutableResults:_,onBroadcast:this.devtoolsConfig.enabled?function(){n.devToolsHookCb&&n.devToolsHookCb({action:{},state:{queries:n.queryManager.getQueryStore(),mutations:n.queryManager.mutationStore||{}},dataWithOptimisticResults:n.cache.extract(!0)})}:void 0}),this.devtoolsConfig.enabled&&this.connectToDevTools()}return e.prototype.connectToDevTools=function(){if("undefined"!=typeof window){var e=window,t=Symbol.for("apollo.devtools");(e[t]=e[t]||[]).push(this),e.__APOLLO_CLIENT__=this,!rw&&!1!==globalThis.__DEV__&&(rw=!0,window.document&&window.top===window.self&&/^(https?|file):$/.test(window.location.protocol)&&setTimeout(function(){if(!window.__APOLLO_DEVTOOLS_GLOBAL_HOOK__){var e=window.navigator,t=e&&e.userAgent,n=void 0;"string"==typeof t&&(t.indexOf("Chrome/")>-1?n="https://chrome.google.com/webstore/detail/apollo-client-developer-t/jdkknkkbebbapilgoeccciglkfbmbnfm":t.indexOf("Firefox/")>-1&&(n="https://addons.mozilla.org/en-US/firefox/addon/apollo-developer-tools/")),n&&!1!==globalThis.__DEV__&&q.log("Download the Apollo DevTools for a better development experience: %s",n)}},1e4))}},Object.defineProperty(e.prototype,"documentTransform",{get:function(){return this.queryManager.documentTransform},enumerable:!1,configurable:!0}),e.prototype.stop=function(){this.queryManager.stop()},e.prototype.watchQuery=function(e){return this.defaultOptions.watchQuery&&(e=rv(this.defaultOptions.watchQuery,e)),this.disableNetworkFetches&&("network-only"===e.fetchPolicy||"cache-and-network"===e.fetchPolicy)&&(e=b(b({},e),{fetchPolicy:"cache-first"})),this.queryManager.watchQuery(e)},e.prototype.query=function(e){return this.defaultOptions.query&&(e=rv(this.defaultOptions.query,e)),q("cache-and-network"!==e.fetchPolicy,17),this.disableNetworkFetches&&"network-only"===e.fetchPolicy&&(e=b(b({},e),{fetchPolicy:"cache-first"})),this.queryManager.query(e)},e.prototype.mutate=function(e){return this.defaultOptions.mutate&&(e=rv(this.defaultOptions.mutate,e)),this.queryManager.mutate(e)},e.prototype.subscribe=function(e){var t=this,n=this.queryManager.generateQueryId();return this.queryManager.startGraphQLSubscription(e).map(function(r){return b(b({},r),{data:t.queryManager.maskOperation({document:e.query,data:r.data,fetchPolicy:e.fetchPolicy,id:n})})})},e.prototype.readQuery=function(e,t){return void 0===t&&(t=!1),this.cache.readQuery(e,t)},e.prototype.watchFragment=function(e){var t;return this.cache.watchFragment(b(b({},e),((t={})[Symbol.for("apollo.dataMasking")]=this.queryManager.dataMasking,t)))},e.prototype.readFragment=function(e,t){return void 0===t&&(t=!1),this.cache.readFragment(e,t)},e.prototype.writeQuery=function(e){var t=this.cache.writeQuery(e);return!1!==e.broadcast&&this.queryManager.broadcastQueries(),t},e.prototype.writeFragment=function(e){var t=this.cache.writeFragment(e);return!1!==e.broadcast&&this.queryManager.broadcastQueries(),t},e.prototype.__actionHookForDevTools=function(e){this.devToolsHookCb=e},e.prototype.__requestRaw=function(e){return tn(this.link,e)},e.prototype.resetStore=function(){var e=this;return Promise.resolve().then(function(){return e.queryManager.clearStore({discardWatches:!1})}).then(function(){return Promise.all(e.resetStoreCallbacks.map(function(e){return e()}))}).then(function(){return e.reFetchObservableQueries()})},e.prototype.clearStore=function(){var e=this;return Promise.resolve().then(function(){return e.queryManager.clearStore({discardWatches:!0})}).then(function(){return Promise.all(e.clearStoreCallbacks.map(function(e){return e()}))})},e.prototype.onResetStore=function(e){var t=this;return this.resetStoreCallbacks.push(e),function(){t.resetStoreCallbacks=t.resetStoreCallbacks.filter(function(t){return t!==e})}},e.prototype.onClearStore=function(e){var t=this;return this.clearStoreCallbacks.push(e),function(){t.clearStoreCallbacks=t.clearStoreCallbacks.filter(function(t){return t!==e})}},e.prototype.reFetchObservableQueries=function(e){return this.queryManager.reFetchObservableQueries(e)},e.prototype.refetchQueries=function(e){var t=this.queryManager.refetchQueries(e),n=[],r=[];t.forEach(function(e,t){n.push(t),r.push(e)});var i=Promise.all(r);return i.queries=n,i.results=r,i.catch(function(e){!1!==globalThis.__DEV__&&q.debug(18,e)}),i},e.prototype.getObservableQueries=function(e){return void 0===e&&(e="active"),this.queryManager.getObservableQueries(e)},e.prototype.extract=function(e){return this.cache.extract(e)},e.prototype.restore=function(e){return this.cache.restore(e)},e.prototype.addResolvers=function(e){this.localState.addResolvers(e)},e.prototype.setResolvers=function(e){this.localState.setResolvers(e)},e.prototype.getResolvers=function(){return this.localState.getResolvers()},e.prototype.setLocalStateFragmentMatcher=function(e){this.localState.setFragmentMatcher(e)},e.prototype.setLink=function(e){this.link=this.queryManager.link=e},Object.defineProperty(e.prototype,"defaultContext",{get:function(){return this.queryManager.defaultContext},enumerable:!1,configurable:!0}),e}();!1!==globalThis.__DEV__&&(rk.prototype.getMemoryInternals=eR);var rx=function(){function e(){this.assumeImmutableResults=!1,this.getFragmentDoc=nF(eb,{max:eB["cache.fragmentQueryDocuments"]||1e3,cache:eS})}return e.prototype.lookupFragment=function(e){return null},e.prototype.batch=function(e){var t,n=this,r="string"==typeof e.optimistic?e.optimistic:!1===e.optimistic?null:void 0;return this.performTransaction(function(){return t=e.update(n)},r),t},e.prototype.recordOptimisticTransaction=function(e,t){this.performTransaction(e,t)},e.prototype.transformDocument=function(e){return e},e.prototype.transformForLink=function(e){return e},e.prototype.identify=function(e){},e.prototype.gc=function(){return[]},e.prototype.modify=function(e){return!1},e.prototype.readQuery=function(e,t){return void 0===t&&(t=!!e.optimistic),this.read(b(b({},e),{rootId:e.id||"ROOT_QUERY",optimistic:t}))},e.prototype.watchFragment=function(e){var t,n=this,r=e.fragment,i=e.fragmentName,o=e.from,a=e.optimistic,s=_(e,["fragment","fragmentName","from","optimistic"]),u=this.getFragmentDoc(r,i),l=void 0===o||"string"==typeof o?o:this.identify(o),c=!!e[Symbol.for("apollo.dataMasking")];if(!1!==globalThis.__DEV__){var d=i||e4(r).name.value;l||!1===globalThis.__DEV__||q.warn(1,d)}var p=b(b({},s),{returnPartialData:!0,id:l,query:u,optimistic:void 0===a||a});return new ec(function(e){return n.watch(b(b({},p),{immediate:!0,callback:function(o){var a=c?rl(o.result,r,n,i):o.result;if(!(t&&nX(u,{data:null==t?void 0:t.result},{data:a}))){var s={data:a,complete:!!o.complete};o.missing&&(s.missing=tw(o.missing.map(function(e){return e.missing}))),t=b(b({},o),{result:a}),e.next(s)}}}))})},e.prototype.readFragment=function(e,t){return void 0===t&&(t=!!e.optimistic),this.read(b(b({},e),{query:this.getFragmentDoc(e.fragment,e.fragmentName),rootId:e.id,optimistic:t}))},e.prototype.writeQuery=function(e){var t=e.id,n=e.data,r=_(e,["id","data"]);return this.write(Object.assign(r,{dataId:t||"ROOT_QUERY",result:n}))},e.prototype.writeFragment=function(e){var t=e.id,n=e.data,r=e.fragment,i=e.fragmentName,o=_(e,["id","data","fragment","fragmentName"]);return this.write(Object.assign(o,{query:this.getFragmentDoc(r,i),dataId:t,result:n}))},e.prototype.updateQuery=function(e,t){return this.batch({update:function(n){var r=n.readQuery(e),i=t(r);return null==i?r:(n.writeQuery(b(b({},e),{data:i})),i)}})},e.prototype.updateFragment=function(e,t){return this.batch({update:function(n){var r=n.readFragment(e),i=t(r);return null==i?r:(n.writeFragment(b(b({},e),{data:i})),i)}})},e}();!1!==globalThis.__DEV__&&(rx.prototype.getMemoryInternals=eN);var rA=function(e){function t(n,r,i,o){var a,s=e.call(this,n)||this;if(s.message=n,s.path=r,s.query=i,s.variables=o,Array.isArray(s.path)){s.missing=s.message;for(var u=s.path.length-1;u>=0;--u)s.missing=((a={})[s.path[u]]=s.missing,a)}else s.missing=s.path;return s.__proto__=t.prototype,s}return y(t,e),t}(Error),rS=Object.prototype.hasOwnProperty;function rI(e){return null==e}function rT(e,t){var n=e.__typename,r=e.id,i=e._id;if("string"==typeof n&&(t&&(t.keyObject=rI(r)?rI(i)?void 0:{_id:i}:{id:r}),rI(r)&&!rI(i)&&(r=i),!rI(r)))return"".concat(n,":").concat("number"==typeof r||"string"==typeof r?r:JSON.stringify(r))}var rE={dataIdFromObject:rT,addTypename:!0,resultCaching:!0,canonizeResults:!1};function rP(e){var t=e.canonizeResults;return void 0===t?rE.canonizeResults:t}var rC=/^[_a-z][_0-9a-z]*/i;function rO(e){var t=e.match(rC);return t?t[0]:e}function rB(e){return ed(e)&&!e$(e)&&!ty(e)}function rM(e,t){var n=e_(e6(e));return{fragmentMap:n,lookupFragment:function(e){var r=n[e];return!r&&t&&(r=t.lookup(e)),r||null}}}var rR=Object.create(null),rL=function(){return rR},rN=Object.create(null),rD=function(){function e(e,t){var n=this;this.policies=e,this.group=t,this.data=Object.create(null),this.rootIds=Object.create(null),this.refs=Object.create(null),this.getFieldValue=function(e,t){return rn(e$(e)?n.get(e.__ref,t):e&&e[t])},this.canRead=function(e){return e$(e)?n.has(e.__ref):"object"==typeof e},this.toReference=function(e,t){if("string"==typeof e)return eW(e);if(e$(e))return e;var r=n.policies.identify(e)[0];if(r){var i=eW(r);return t&&n.merge(r,e),i}}}return e.prototype.toObject=function(){return b({},this.data)},e.prototype.has=function(e){return void 0!==this.lookup(e,!0)},e.prototype.get=function(e,t){if(this.group.depend(e,t),rS.call(this.data,e)){var n=this.data[e];if(n&&rS.call(n,t))return n[t]}return"__typename"===t&&rS.call(this.policies.rootTypenamesById,e)?this.policies.rootTypenamesById[e]:this instanceof rj?this.parent.get(e,t):void 0},e.prototype.lookup=function(e,t){return(t&&this.group.depend(e,"__exists"),rS.call(this.data,e))?this.data[e]:this instanceof rj?this.parent.lookup(e,t):this.policies.rootTypenamesById[e]?Object.create(null):void 0},e.prototype.merge=function(e,t){var n,r=this;e$(e)&&(e=e.__ref),e$(t)&&(t=t.__ref);var i="string"==typeof e?this.lookup(n=e):e,o="string"==typeof t?this.lookup(n=t):t;if(o){q("string"==typeof n,2);var a=new tx(rz).merge(i,o);if(this.data[n]=a,a!==i&&(delete this.refs[n],this.group.caching)){var s=Object.create(null);i||(s.__exists=1),Object.keys(o).forEach(function(e){if(!i||i[e]!==a[e]){s[e]=1;var t=rO(e);t===e||r.policies.hasKeyArgs(a.__typename,t)||(s[t]=1),void 0!==a[e]||r instanceof rj||delete a[e]}}),s.__typename&&!(i&&i.__typename)&&this.policies.rootTypenamesById[n]===a.__typename&&delete s.__typename,Object.keys(s).forEach(function(e){return r.group.dirty(n,e)})}}},e.prototype.modify=function(e,t){var n=this,r=this.lookup(e);if(r){var i=Object.create(null),o=!1,a=!0,s={DELETE:rR,INVALIDATE:rN,isReference:e$,toReference:this.toReference,canRead:this.canRead,readField:function(t,r){return n.policies.readField("string"==typeof t?{fieldName:t,from:r||eW(e)}:t,{store:n})}};if(Object.keys(r).forEach(function(u){var l=rO(u),c=r[u];if(void 0!==c){var d="function"==typeof t?t:t[u]||t[l];if(d){var p=d===rL?rR:d(rn(c),b(b({},s),{fieldName:l,storeFieldName:u,storage:n.getStorage(e,u)}));if(p===rN)n.group.dirty(e,u);else if(p===rR&&(p=void 0),p!==c&&(i[u]=p,o=!0,c=p,!1!==globalThis.__DEV__)){var f=function(e){if(void 0===n.lookup(e.__ref))return!1!==globalThis.__DEV__&&q.warn(3,e),!0};if(e$(p))f(p);else if(Array.isArray(p))for(var h=!1,m=void 0,g=0,y=p;g0){var t=--this.rootIds[e];return t||delete this.rootIds[e],t}return 0},e.prototype.getRootIdSet=function(e){return void 0===e&&(e=new Set),Object.keys(this.rootIds).forEach(e.add,e),this instanceof rj?this.parent.getRootIdSet(e):Object.keys(this.policies.rootTypenamesById).forEach(e.add,e),e},e.prototype.gc=function(){var e=this,t=this.getRootIdSet(),n=this.toObject();t.forEach(function(r){rS.call(n,r)&&(Object.keys(e.findChildRefIds(r)).forEach(t.add,t),delete n[r])});var r=Object.keys(n);if(r.length){for(var i=this;i instanceof rj;)i=i.parent;r.forEach(function(e){return i.delete(e)})}return r},e.prototype.findChildRefIds=function(e){if(!rS.call(this.refs,e)){var t=this.refs[e]=Object.create(null),n=this.data[e];if(!n)return t;var r=new Set([n]);r.forEach(function(e){e$(e)&&(t[e.__ref]=!0),ed(e)&&Object.keys(e).forEach(function(t){var n=e[t];ed(n)&&r.add(n)})})}return this.refs[e]},e.prototype.makeCacheKey=function(){return this.group.keyMaker.lookupArray(arguments)},e}(),rF=function(){function e(e,t){void 0===t&&(t=null),this.caching=e,this.parent=t,this.d=null,this.resetCaching()}return e.prototype.resetCaching=function(){this.d=this.caching?nL():null,this.keyMaker=new ne(ts)},e.prototype.depend=function(e,t){if(this.d){this.d(t+"#"+e);var n=rO(t);n!==t&&this.d(n+"#"+e),this.parent&&this.parent.depend(e,t)}},e.prototype.dirty=function(e,t){this.d&&this.d.dirty(t+"#"+e,"__exists"===t?"forget":"setDirty")},e}();function rq(e,t){rV(e)&&e.group.depend(t,"__exists")}s=function(e){function t(t){var n=t.policies,r=t.resultCaching,i=t.seed,o=e.call(this,n,new rF(void 0===r||r))||this;return o.stump=new rU(o),o.storageTrie=new ne(ts),i&&o.replace(i),o}return y(t,e),t.prototype.addLayer=function(e,t){return this.stump.addLayer(e,t)},t.prototype.removeLayer=function(){return this},t.prototype.getStorage=function(){return this.storageTrie.lookupArray(arguments)},t}(a=rD||(rD={})),a.Root=s;var rj=function(e){function t(t,n,r,i){var o=e.call(this,n.policies,i)||this;return o.id=t,o.parent=n,o.replay=r,o.group=i,r(o),o}return y(t,e),t.prototype.addLayer=function(e,n){return new t(e,this,n,this.group)},t.prototype.removeLayer=function(e){var t=this,n=this.parent.removeLayer(e);return e===this.id?(this.group.caching&&Object.keys(this.data).forEach(function(e){var r=t.data[e],i=n.lookup(e);i?r?r!==i&&Object.keys(r).forEach(function(n){t1(r[n],i[n])||t.group.dirty(e,n)}):(t.group.dirty(e,"__exists"),Object.keys(i).forEach(function(n){t.group.dirty(e,n)})):t.delete(e)}),n):n===this.parent?this:n.addLayer(this.id,this.replay)},t.prototype.toObject=function(){return b(b({},this.parent.toObject()),this.data)},t.prototype.findChildRefIds=function(t){var n=this.parent.findChildRefIds(t);return rS.call(this.data,t)?b(b({},n),e.prototype.findChildRefIds.call(this,t)):n},t.prototype.getStorage=function(){for(var e=this.parent;e.parent;)e=e.parent;return e.getStorage.apply(e,arguments)},t}(rD),rU=function(e){function t(t){return e.call(this,"EntityStore.Stump",t,function(){},new rF(t.group.caching,t.group))||this}return y(t,e),t.prototype.removeLayer=function(){return this},t.prototype.merge=function(e,t){return this.parent.merge(e,t)},t}(rj);function rz(e,t,n){var r=e[n],i=t[n];return t1(r,i)?r:i}function rV(e){return!!(e instanceof rD&&e.group.caching)}var rW=function(){function e(){this.known=new(tu?WeakSet:Set),this.pool=new ne(ts),this.passes=new WeakMap,this.keysByJSON=new Map,this.empty=this.admit({})}return e.prototype.isKnown=function(e){return ed(e)&&this.known.has(e)},e.prototype.pass=function(e){if(ed(e)){var t=ed(e)?ty(e)?e.slice(0):b({__proto__:Object.getPrototypeOf(e)},e):e;return this.passes.set(t,e),t}return e},e.prototype.admit=function(e){var t=this;if(ed(e)){var n=this.passes.get(e);if(n)return n;switch(Object.getPrototypeOf(e)){case Array.prototype:if(this.known.has(e))break;var r=e.map(this.admit,this),i=this.pool.lookupArray(r);return i.array||(this.known.add(i.array=r),!1!==globalThis.__DEV__&&Object.freeze(r)),i.array;case null:case Object.prototype:if(this.known.has(e))break;var o=Object.getPrototypeOf(e),a=[o],s=this.sortedKeys(e);a.push(s.json);var u=a.length;s.sorted.forEach(function(n){a.push(t.admit(e[n]))});var i=this.pool.lookupArray(a);if(!i.object){var l=i.object=Object.create(o);this.known.add(l),s.sorted.forEach(function(e,t){l[e]=a[u+t]}),!1!==globalThis.__DEV__&&Object.freeze(l)}return i.object}}return e},e.prototype.sortedKeys=function(e){var t=Object.keys(e),n=this.pool.lookupArray(t);if(!n.keys){t.sort();var r=JSON.stringify(t);(n.keys=this.keysByJSON.get(r))||this.keysByJSON.set(r,n.keys={sorted:t,json:r})}return n.keys},e}();function r$(e){return[e.selectionSet,e.objectOrReference,e.context,e.context.canonizeResults]}var rK=function(){function e(e){var t=this;this.knownResults=new(ts?WeakMap:Map),this.config=nG(e,{addTypename:!1!==e.addTypename,canonizeResults:rP(e)}),this.canon=e.canon||new rW,this.executeSelectionSet=nF(function(e){var n,r=e.context.canonizeResults,i=r$(e);i[3]=!r;var o=(n=t.executeSelectionSet).peek.apply(n,i);return o?r?b(b({},o),{result:t.canon.admit(o.result)}):o:(rq(e.context.store,e.enclosingRef.__ref),t.execSelectionSetImpl(e))},{max:this.config.resultCacheMaxSize||eB["inMemoryCache.executeSelectionSet"]||5e4,keyArgs:r$,makeCacheKey:function(e,t,n,r){if(rV(n.store))return n.store.makeCacheKey(e,e$(t)?t.__ref:t,n.varString,r)}}),this.executeSubSelectedArray=nF(function(e){return rq(e.context.store,e.enclosingRef.__ref),t.execSubSelectedArrayImpl(e)},{max:this.config.resultCacheMaxSize||eB["inMemoryCache.executeSubSelectedArray"]||1e4,makeCacheKey:function(e){var t=e.field,n=e.array,r=e.context;if(rV(r.store))return r.store.makeCacheKey(t,n,r.varString)}})}return e.prototype.resetCanon=function(){this.canon=new rW},e.prototype.diffQueryAgainstStore=function(e){var t,n=e.store,r=e.query,i=e.rootId,o=e.variables,a=e.returnPartialData,s=e.canonizeResults,u=void 0===s?this.config.canonizeResults:s,l=this.config.cache.policies;o=b(b({},e8(e3(r))),o);var c=eW(void 0===i?"ROOT_QUERY":i),d=this.executeSelectionSet({selectionSet:e5(r).selectionSet,objectOrReference:c,enclosingRef:c,context:b({store:n,query:r,policies:l,variables:o,varString:eU(o),canonizeResults:u},rM(r,this.config.fragments))});if(d.missing&&(t=[new rA(function(e){try{JSON.stringify(e,function(e,t){if("string"==typeof t)throw t;return t})}catch(e){return e}}(d.missing),d.missing,r,o)],!(void 0===a||a)))throw t[0];return{result:d.result,complete:!t,missing:t}},e.prototype.isFresh=function(e,t,n,r){if(rV(r.store)&&this.knownResults.get(e)===n){var i=this.executeSelectionSet.peek(n,t,r,this.canon.isKnown(e));if(i&&e===i.result)return!0}return!1},e.prototype.execSelectionSetImpl=function(e){var t,n=this,r=e.selectionSet,i=e.objectOrReference,o=e.enclosingRef,a=e.context;if(e$(i)&&!a.policies.rootTypenamesById[i.__ref]&&!a.store.has(i.__ref))return{result:this.canon.empty,missing:"Dangling reference to missing ".concat(i.__ref," object")};var s=a.variables,u=a.policies,l=a.store.getFieldValue(i,"__typename"),c=[],d=new tx;function p(e,n){var r;return e.missing&&(t=d.merge(t,((r={})[n]=e.missing,r))),e.result}this.config.addTypename&&"string"==typeof l&&!u.rootIdsByTypename[l]&&c.push({__typename:l});var f=new Set(r.selections);f.forEach(function(e){var r,h;if(tr(e,s)){if(eJ(e)){var m=u.readField({fieldName:e.name.value,field:e,variables:a.variables,from:i},a),g=eX(e);void 0===m?tK.added(e)||(t=d.merge(t,((r={})[g]="Can't find field '".concat(e.name.value,"' on ").concat(e$(i)?i.__ref+" object":"object "+JSON.stringify(i,null,2)),r))):ty(m)?m.length>0&&(m=p(n.executeSubSelectedArray({field:e,array:m,enclosingRef:o,context:a}),g)):e.selectionSet?null!=m&&(m=p(n.executeSelectionSet({selectionSet:e.selectionSet,objectOrReference:m,enclosingRef:e$(m)?m:o,context:a}),g)):a.canonizeResults&&(m=n.canon.pass(m)),void 0!==m&&c.push(((h={})[g]=m,h))}else{var y=ev(e,a.lookupFragment);if(!y&&e.kind===em.h.FRAGMENT_SPREAD)throw j(10,e.name.value);y&&u.fragmentMatches(y,l)&&y.selectionSet.selections.forEach(f.add,f)}}});var h={result:tw(c),missing:t},m=a.canonizeResults?this.canon.admit(h):rn(h);return m.result&&this.knownResults.set(m.result,r),m},e.prototype.execSubSelectedArrayImpl=function(e){var t,n=this,r=e.field,i=e.array,o=e.enclosingRef,a=e.context,s=new tx;function u(e,n){var r;return e.missing&&(t=s.merge(t,((r={})[n]=e.missing,r))),e.result}return r.selectionSet&&(i=i.filter(a.store.canRead)),i=i.map(function(e,t){return null===e?null:ty(e)?u(n.executeSubSelectedArray({field:r,array:e,enclosingRef:o,context:a}),t):r.selectionSet?u(n.executeSelectionSet({selectionSet:r.selectionSet,objectOrReference:e,enclosingRef:e$(e)?e:o,context:a}),t):(!1!==globalThis.__DEV__&&function(e,t,n){if(!t.selectionSet){var r=new Set([n]);r.forEach(function(n){ed(n)&&(q(!e$(n),11,e$(n)?e.get(n.__ref,"__typename"):n&&n.__typename,t.name.value),Object.values(n).forEach(r.add,r))})}}(a.store,r,e),e)}),{result:a.canonizeResults?this.canon.admit(i):i,missing:t}},e}(),rH=Object.create(null);function rG(e){var t=JSON.stringify(e);return rH[t]||(rH[t]=Object.create(null))}function rZ(e){var t=rG(e);return t.keyFieldsFn||(t.keyFieldsFn=function(t,n){var r=function(e,t){return n.readField(t,e)},i=n.keyObject=rX(e,function(e){var i=rJ(n.storeObject,e,r);return void 0===i&&t!==n.storeObject&&rS.call(t,e[0])&&(i=rJ(t,e,rQ)),q(void 0!==i,5,e.join("."),t),i});return"".concat(n.typename,":").concat(JSON.stringify(i))})}function rY(e){var t=rG(e);return t.keyArgsFn||(t.keyArgsFn=function(t,n){var r=n.field,i=n.variables,o=n.fieldName,a=JSON.stringify(rX(e,function(e){var n=e[0],o=n.charAt(0);if("@"===o){if(r&&tb(r.directives)){var a=n.slice(1),s=r.directives.find(function(e){return e.name.value===a}),u=s&&eY(s,i);return u&&rJ(u,e.slice(1))}return}if("$"===o){var l=n.slice(1);if(i&&rS.call(i,l)){var c=e.slice(0);return c[0]=l,rJ(i,c)}return}if(t)return rJ(t,e)}));return(t||"{}"!==a)&&(o+=":"+a),o})}function rX(e,t){var n=new tx;return(function e(t){var n=rG(t);if(!n.paths){var r=n.paths=[],i=[];t.forEach(function(n,o){ty(n)?(e(n).forEach(function(e){return r.push(i.concat(e))}),i.length=0):(i.push(n),ty(t[o+1])||(r.push(i.slice(0)),i.length=0))})}return n.paths})(e).reduce(function(e,r){var i,o=t(r);if(void 0!==o){for(var a=r.length-1;a>=0;--a)(i={})[r[a]]=o,o=i;e=n.merge(e,o)}return e},Object.create(null))}function rQ(e,t){return e[t]}function rJ(e,t,n){return n=n||rQ,function e(t){return ed(t)?ty(t)?t.map(e):rX(Object.keys(t).sort(),function(e){return rJ(t,e)}):t}(t.reduce(function e(t,r){return ty(t)?t.map(function(t){return e(t,r)}):t&&n(t,r)},e))}function r0(e){return void 0!==e.args?e.args:e.field?eY(e.field,e.variables):null}var r1=function(){},r2=function(e,t){return t.fieldName},r6=function(e,t,n){return(0,n.mergeObjects)(e,t)},r3=function(e,t){return t},r4=function(){function e(e){this.config=e,this.typePolicies=Object.create(null),this.toBeAdded=Object.create(null),this.supertypeMap=new Map,this.fuzzySubtypes=new Map,this.rootIdsByTypename=Object.create(null),this.rootTypenamesById=Object.create(null),this.usingPossibleTypes=!1,this.config=b({dataIdFromObject:rT},e),this.cache=this.config.cache,this.setRootTypename("Query"),this.setRootTypename("Mutation"),this.setRootTypename("Subscription"),e.possibleTypes&&this.addPossibleTypes(e.possibleTypes),e.typePolicies&&this.addTypePolicies(e.typePolicies)}return e.prototype.identify=function(e,t){var n,r,i=this,o=t&&(t.typename||(null===(n=t.storeObject)||void 0===n?void 0:n.__typename))||e.__typename;if(o===this.rootTypenamesById.ROOT_QUERY)return["ROOT_QUERY"];var a=t&&t.storeObject||e,s=b(b({},t),{typename:o,storeObject:a,readField:t&&t.readField||function(){var e=r8(arguments,a);return i.readField(e,{store:i.cache.data,variables:e.variables})}}),u=o&&this.getTypePolicy(o),l=u&&u.keyFn||this.config.dataIdFromObject;return ro.withValue(!0,function(){for(;l;){var t=l(b(b({},e),a),s);if(ty(t))l=rZ(t);else{r=t;break}}}),r=r?String(r):void 0,s.keyObject?[r,s.keyObject]:[r]},e.prototype.addTypePolicies=function(e){var t=this;Object.keys(e).forEach(function(n){var r=e[n],i=r.queryType,o=r.mutationType,a=r.subscriptionType,s=_(r,["queryType","mutationType","subscriptionType"]);i&&t.setRootTypename("Query",n),o&&t.setRootTypename("Mutation",n),a&&t.setRootTypename("Subscription",n),rS.call(t.toBeAdded,n)?t.toBeAdded[n].push(s):t.toBeAdded[n]=[s]})},e.prototype.updateTypePolicy=function(e,t){var n=this,r=this.getTypePolicy(e),i=t.keyFields,o=t.fields;function a(e,t){e.merge="function"==typeof t?t:!0===t?r6:!1===t?r3:e.merge}a(r,t.merge),r.keyFn=!1===i?r1:ty(i)?rZ(i):"function"==typeof i?i:r.keyFn,o&&Object.keys(o).forEach(function(t){var r=n.getFieldPolicy(e,t,!0),i=o[t];if("function"==typeof i)r.read=i;else{var s=i.keyArgs,u=i.read,l=i.merge;r.keyFn=!1===s?r2:ty(s)?rY(s):"function"==typeof s?s:r.keyFn,"function"==typeof u&&(r.read=u),a(r,l)}r.read&&r.merge&&(r.keyFn=r.keyFn||r2)})},e.prototype.setRootTypename=function(e,t){void 0===t&&(t=e);var n="ROOT_"+e.toUpperCase(),r=this.rootTypenamesById[n];t!==r&&(q(!r||r===e,6,e),r&&delete this.rootIdsByTypename[r],this.rootIdsByTypename[t]=n,this.rootTypenamesById[n]=t)},e.prototype.addPossibleTypes=function(e){var t=this;this.usingPossibleTypes=!0,Object.keys(e).forEach(function(n){t.getSupertypeSet(n,!0),e[n].forEach(function(e){t.getSupertypeSet(e,!0).add(n);var r=e.match(rC);r&&r[0]===e||t.fuzzySubtypes.set(e,new RegExp(e))})})},e.prototype.getTypePolicy=function(e){var t=this;if(!rS.call(this.typePolicies,e)){var n=this.typePolicies[e]=Object.create(null);n.fields=Object.create(null);var r=this.supertypeMap.get(e);!r&&this.fuzzySubtypes.size&&(r=this.getSupertypeSet(e,!0),this.fuzzySubtypes.forEach(function(n,i){if(n.test(e)){var o=t.supertypeMap.get(i);o&&o.forEach(function(e){return r.add(e)})}})),r&&r.size&&r.forEach(function(e){var r=t.getTypePolicy(e),i=r.fields;Object.assign(n,_(r,["fields"])),Object.assign(n.fields,i)})}var i=this.toBeAdded[e];return i&&i.length&&i.splice(0).forEach(function(n){t.updateTypePolicy(e,n)}),this.typePolicies[e]},e.prototype.getFieldPolicy=function(e,t,n){if(e){var r=this.getTypePolicy(e).fields;return r[t]||n&&(r[t]=Object.create(null))}},e.prototype.getSupertypeSet=function(e,t){var n=this.supertypeMap.get(e);return!n&&t&&this.supertypeMap.set(e,n=new Set),n},e.prototype.fragmentMatches=function(e,t,n,r){var i=this;if(!e.typeCondition)return!0;if(!t)return!1;var o=e.typeCondition.name.value;if(t===o)return!0;if(this.usingPossibleTypes&&this.supertypeMap.has(o))for(var a=this.getSupertypeSet(t,!0),s=[a],u=function(e){var t=i.getSupertypeSet(e,!1);t&&t.size&&0>s.indexOf(t)&&s.push(t)},l=!!(n&&this.fuzzySubtypes.size),c=!1,d=0;d1?o:t}:(r=b({},i),rS.call(r,"from")||(r.from=t)),!1!==globalThis.__DEV__&&void 0===r.from&&!1!==globalThis.__DEV__&&q.warn(8,D(Array.from(e))),void 0===r.variables&&(r.variables=n),r}function r9(e){return function(t,n){if(ty(t)||ty(n))throw j(9);if(ed(t)&&ed(n)){var r=e.getFieldValue(t,"__typename"),i=e.getFieldValue(n,"__typename");if(r&&i&&r!==i)return n;if(e$(t)&&rB(n))return e.merge(t.__ref,n),t;if(rB(t)&&e$(n))return e.merge(t,n.__ref),n;if(rB(t)&&rB(n))return b(b({},t),n)}return n}}function r7(e,t,n){var r="".concat(t).concat(n),i=e.flavors.get(r);return i||e.flavors.set(r,i=e.clientOnly===t&&e.deferred===n?e:b(b({},e),{clientOnly:t,deferred:n})),i}var ie=function(){function e(e,t,n){this.cache=e,this.reader=t,this.fragments=n}return e.prototype.writeToStore=function(e,t){var n=this,r=t.query,i=t.result,o=t.dataId,a=t.variables,s=t.overwrite,u=e1(r),l=new tx;a=b(b({},e8(u)),a);var c=b(b({store:e,written:Object.create(null),merge:function(e,t){return l.merge(e,t)},variables:a,varString:eU(a)},rM(r,this.fragments)),{overwrite:!!s,incomingById:new Map,clientOnly:!1,deferred:!1,flavors:new Map}),d=this.processSelectionSet({result:i||Object.create(null),dataId:o,selectionSet:u.selectionSet,mergeTree:{map:new Map},context:c});if(!e$(d))throw j(12,i);return c.incomingById.forEach(function(t,r){var i=t.storeObject,o=t.mergeTree,a=t.fieldNodeSet,s=eW(r);if(o&&o.map.size){var u=n.applyMerges(o,s,i,c);if(e$(u))return;i=u}if(!1!==globalThis.__DEV__&&!c.overwrite){var l=Object.create(null);a.forEach(function(e){e.selectionSet&&(l[e.name.value]=!0)});var d=function(e){var t=o&&o.map.get(e);return!!(t&&t.info&&t.info.merge)};Object.keys(i).forEach(function(e){!0!==l[rO(e)]||d(e)||function(e,t,n,r){var i=function(e){var t=r.getFieldValue(e,n);return"object"==typeof t&&t},o=i(e);if(o){var a=i(t);if(!(!a||e$(o)||t1(o,a)||Object.keys(o).every(function(e){return void 0!==r.getFieldValue(a,e)}))){var s=r.getFieldValue(e,"__typename")||r.getFieldValue(t,"__typename"),u=rO(n),l="".concat(s,".").concat(u);if(!ia.has(l)){ia.add(l);var c=[];ty(o)||ty(a)||[o,a].forEach(function(e){var t=r.getFieldValue(e,"__typename");"string"!=typeof t||c.includes(t)||c.push(t)}),!1!==globalThis.__DEV__&&q.warn(15,u,s,c.length?"either ensure all objects of type "+c.join(" and ")+" have an ID or a custom merge function, or ":"",l,b({},o),b({},a))}}}}(s,i,e,c.store)})}e.merge(r,i)}),e.retain(d.__ref),d},e.prototype.processSelectionSet=function(e){var t=this,n=e.dataId,r=e.result,i=e.selectionSet,o=e.context,a=e.mergeTree,s=this.cache.policies,u=Object.create(null),l=n&&s.rootTypenamesById[n]||eQ(r,i,o.fragmentMap)||n&&o.store.get(n,"__typename");"string"==typeof l&&(u.__typename=l);var c=function(){var e=r8(arguments,u,o.variables);if(e$(e.from)){var t=o.incomingById.get(e.from.__ref);if(t){var n=s.readField(b(b({},e),{from:t.storeObject}),o);if(void 0!==n)return n}}return s.readField(e,o)},d=new Set;this.flattenFields(i,r,o,l).forEach(function(e,n){var i,o=r[eX(n)];if(d.add(n),void 0!==o){var p=s.getStoreFieldName({typename:l,fieldName:n.name.value,field:n,variables:e.variables}),f=ir(a,p),h=t.processFieldValue(o,n,n.selectionSet?r7(e,!1,!1):e,f),m=void 0;n.selectionSet&&(e$(h)||rB(h))&&(m=c("__typename",h));var g=s.getMergeFunction(l,n.name.value,m);g?f.info={field:n,typename:l,merge:g}:io(a,p),u=e.merge(u,((i={})[p]=h,i))}else!1===globalThis.__DEV__||e.clientOnly||e.deferred||tK.added(n)||s.getReadFunction(l,n.name.value)||!1===globalThis.__DEV__||q.error(13,eX(n),r)});try{var p=s.identify(r,{typename:l,selectionSet:i,fragmentMap:o.fragmentMap,storeObject:u,readField:c}),f=p[0],h=p[1];n=n||f,h&&(u=o.merge(u,h))}catch(e){if(!n)throw e}if("string"==typeof n){var m=eW(n),g=o.written[n]||(o.written[n]=[]);if(g.indexOf(i)>=0||(g.push(i),this.reader&&this.reader.isFresh(r,m,i,o)))return m;var y=o.incomingById.get(n);return y?(y.storeObject=o.merge(y.storeObject,u),y.mergeTree=function e(t,n){if(t===n||!n||ii(n))return t;if(!t||ii(t))return n;var r=t.info&&n.info?b(b({},t.info),n.info):t.info||n.info,i=t.map.size&&n.map.size,o={info:r,map:i?new Map:t.map.size?t.map:n.map};if(i){var a=new Set(n.map.keys());t.map.forEach(function(t,r){o.map.set(r,e(t,n.map.get(r))),a.delete(r)}),a.forEach(function(r){o.map.set(r,e(n.map.get(r),t.map.get(r)))})}return o}(y.mergeTree,a),d.forEach(function(e){return y.fieldNodeSet.add(e)})):o.incomingById.set(n,{storeObject:u,mergeTree:ii(a)?void 0:a,fieldNodeSet:d}),m}return u},e.prototype.processFieldValue=function(e,t,n,r){var i=this;return t.selectionSet&&null!==e?ty(e)?e.map(function(e,o){var a=i.processFieldValue(e,t,n,ir(r,o));return io(r,o),a}):this.processSelectionSet({result:e,selectionSet:t.selectionSet,context:n,mergeTree:r}):!1!==globalThis.__DEV__?nY(e):e},e.prototype.flattenFields=function(e,t,n,r){void 0===r&&(r=eQ(t,e,n.fragmentMap));var i=new Map,o=this.cache.policies,a=new ne(!1);return function e(s,u){var l=a.lookup(s,u.clientOnly,u.deferred);l.visited||(l.visited=!0,s.selections.forEach(function(a){if(tr(a,n.variables)){var s=u.clientOnly,l=u.deferred;if(!(s&&l)&&tb(a.directives)&&a.directives.forEach(function(e){var t=e.name.value;if("client"===t&&(s=!0),"defer"===t){var r=eY(e,n.variables);r&&!1===r.if||(l=!0)}}),eJ(a)){var c=i.get(a);c&&(s=s&&c.clientOnly,l=l&&c.deferred),i.set(a,r7(n,s,l))}else{var d=ev(a,n.lookupFragment);if(!d&&a.kind===em.h.FRAGMENT_SPREAD)throw j(14,a.name.value);d&&o.fragmentMatches(d,r,t,n.variables)&&e(d.selectionSet,r7(n,s,l))}}}))}(e,n),i},e.prototype.applyMerges=function(e,t,n,r,i){var o=this;if(e.map.size&&!e$(n)){var a,s,u=!ty(n)&&(e$(t)||rB(t))?t:void 0,l=n;u&&!i&&(i=[e$(u)?u.__ref:u]);var c=function(e,t){return ty(e)?"number"==typeof t?e[t]:void 0:r.store.getFieldValue(e,String(t))};e.map.forEach(function(e,t){var n=c(u,t),a=c(l,t);if(void 0!==a){i&&i.push(t);var d=o.applyMerges(e,n,a,r,i);d!==a&&(s=s||new Map).set(t,d),i&&q(i.pop()===t)}}),s&&(n=ty(l)?l.slice(0):b({},l),s.forEach(function(e,t){n[t]=e}))}return e.info?this.cache.policies.runMergeFunction(t,n,e.info,r,i&&(a=r.store).getStorage.apply(a,i)):n},e}(),it=[];function ir(e,t){var n=e.map;return n.has(t)||n.set(t,it.pop()||{map:new Map}),n.get(t)}function ii(e){return!e||!(e.info||e.map.size)}function io(e,t){var n=e.map,r=n.get(t);r&&ii(r)&&(it.push(r),n.delete(t))}var ia=new Set,is=function(e){function t(t){void 0===t&&(t={});var n=e.call(this)||this;return n.watches=new Set,n.addTypenameTransform=new nj(tK),n.assumeImmutableResults=!0,n.makeVar=rb,n.txCount=0,n.config=nG(rE,t),n.addTypename=!!n.config.addTypename,n.policies=new r4({cache:n,dataIdFromObject:n.config.dataIdFromObject,possibleTypes:n.config.possibleTypes,typePolicies:n.config.typePolicies}),n.init(),n}return y(t,e),t.prototype.init=function(){var e=this.data=new rD.Root({policies:this.policies,resultCaching:this.config.resultCaching});this.optimisticData=e.stump,this.resetResultCache()},t.prototype.resetResultCache=function(e){var t=this,n=this.storeReader,r=this.config.fragments;this.storeWriter=new ie(this,this.storeReader=new rK({cache:this,addTypename:this.addTypename,resultCacheMaxSize:this.config.resultCacheMaxSize,canonizeResults:rP(this.config),canon:e?void 0:n&&n.canon,fragments:r}),r),this.maybeBroadcastWatch=nF(function(e,n){return t.broadcastWatch(e,n)},{max:this.config.resultCacheMaxSize||eB["inMemoryCache.maybeBroadcastWatch"]||5e3,makeCacheKey:function(e){var n=e.optimistic?t.optimisticData:t.data;if(rV(n)){var r=e.optimistic,i=e.id,o=e.variables;return n.makeCacheKey(e.query,e.callback,eU({optimistic:r,id:i,variables:o}))}}}),new Set([this.data.group,this.optimisticData.group]).forEach(function(e){return e.resetCaching()})},t.prototype.restore=function(e){return this.init(),e&&this.data.replace(e),this},t.prototype.extract=function(e){return void 0===e&&(e=!1),(e?this.optimisticData:this.data).extract()},t.prototype.read=function(e){var t=e.returnPartialData;try{return this.storeReader.diffQueryAgainstStore(b(b({},e),{store:e.optimistic?this.optimisticData:this.data,config:this.config,returnPartialData:void 0!==t&&t})).result||null}catch(e){if(e instanceof rA)return null;throw e}},t.prototype.write=function(e){try{return++this.txCount,this.storeWriter.writeToStore(this.data,e)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.modify=function(e){if(rS.call(e,"id")&&!e.id)return!1;var t=e.optimistic?this.optimisticData:this.data;try{return++this.txCount,t.modify(e.id||"ROOT_QUERY",e.fields)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.diff=function(e){return this.storeReader.diffQueryAgainstStore(b(b({},e),{store:e.optimistic?this.optimisticData:this.data,rootId:e.id||"ROOT_QUERY",config:this.config}))},t.prototype.watch=function(e){var t=this;return this.watches.size||function(e){rg(e).vars.forEach(function(t){return t.attachCache(e)})}(this),this.watches.add(e),e.immediate&&this.maybeBroadcastWatch(e),function(){t.watches.delete(e)&&!t.watches.size&&ry(t),t.maybeBroadcastWatch.forget(e)}},t.prototype.gc=function(e){eU.reset(),tq.reset(),this.addTypenameTransform.resetCache(),null===(t=this.config.fragments)||void 0===t||t.resetCaches();var t,n=this.optimisticData.gc();return e&&!this.txCount&&(e.resetResultCache?this.resetResultCache(e.resetResultIdentities):e.resetResultIdentities&&this.storeReader.resetCanon()),n},t.prototype.retain=function(e,t){return(t?this.optimisticData:this.data).retain(e)},t.prototype.release=function(e,t){return(t?this.optimisticData:this.data).release(e)},t.prototype.identify=function(e){if(e$(e))return e.__ref;try{return this.policies.identify(e)[0]}catch(e){!1!==globalThis.__DEV__&&q.warn(e)}},t.prototype.evict=function(e){if(!e.id){if(rS.call(e,"id"))return!1;e=b(b({},e),{id:"ROOT_QUERY"})}try{return++this.txCount,this.optimisticData.evict(e,this.data)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.reset=function(e){var t=this;return this.init(),eU.reset(),e&&e.discardWatches?(this.watches.forEach(function(e){return t.maybeBroadcastWatch.forget(e)}),this.watches.clear(),ry(this)):this.broadcastWatches(),Promise.resolve()},t.prototype.removeOptimistic=function(e){var t=this.optimisticData.removeLayer(e);t!==this.optimisticData&&(this.optimisticData=t,this.broadcastWatches())},t.prototype.batch=function(e){var t,n=this,r=e.update,i=e.optimistic,o=void 0===i||i,a=e.removeOptimistic,s=e.onWatchUpdated,u=function(e){var i=n.data,o=n.optimisticData;++n.txCount,e&&(n.data=n.optimisticData=e);try{return t=r(n)}finally{--n.txCount,n.data=i,n.optimisticData=o}},l=new Set;return s&&!this.txCount&&this.broadcastWatches(b(b({},e),{onWatchUpdated:function(e){return l.add(e),!1}})),"string"==typeof o?this.optimisticData=this.optimisticData.addLayer(o,u):!1===o?u(this.data):u(),"string"==typeof a&&(this.optimisticData=this.optimisticData.removeLayer(a)),s&&l.size?(this.broadcastWatches(b(b({},e),{onWatchUpdated:function(e,t){var n=s.call(this,e,t);return!1!==n&&l.delete(e),n}})),l.size&&l.forEach(function(e){return n.maybeBroadcastWatch.dirty(e)})):this.broadcastWatches(e),t},t.prototype.performTransaction=function(e,t){return this.batch({update:e,optimistic:t||null!==t})},t.prototype.transformDocument=function(e){return this.addTypenameToDocument(this.addFragmentsToDocument(e))},t.prototype.fragmentMatches=function(e,t){return this.policies.fragmentMatches(e,t)},t.prototype.lookupFragment=function(e){var t;return(null===(t=this.config.fragments)||void 0===t?void 0:t.lookup(e))||null},t.prototype.broadcastWatches=function(e){var t=this;this.txCount||this.watches.forEach(function(n){return t.maybeBroadcastWatch(n,e)})},t.prototype.addFragmentsToDocument=function(e){var t=this.config.fragments;return t?t.transform(e):e},t.prototype.addTypenameToDocument=function(e){return this.addTypename?this.addTypenameTransform.transformDocument(e):e},t.prototype.broadcastWatch=function(e,t){var n=e.lastDiff,r=this.diff(e);(!t||(e.optimistic&&"string"==typeof t.optimistic&&(r.fromOptimisticTransaction=!0),!t.onWatchUpdated||!1!==t.onWatchUpdated.call(this,e,r,n)))&&(n&&t1(n.result,r.result)||e.callback(e.lastDiff=r,n))},t}(rx);!1!==globalThis.__DEV__&&(is.prototype.getMemoryInternals=eL);let iu=async()=>{let e=await new rk({connectToDevTools:!0,uri:"https://subgraph.sailor.finance/subgraphs/name/sailor",cache:new is,defaultOptions:{watchQuery:{fetchPolicy:"cache-and-network",nextFetchPolicy:"cache-and-network"}}});return e},il=async(e,t)=>{let n=await iu(),r=await n.query({query:e,...t});return r};var ic=n(18484),id=n(92128),ip=n(60449),ih=n(52266),im=n(14062),ig=n(69047),iy=n(6591),ib=n(71260);function i_(e){return"number"==typeof e?e:"wei"===e?0:Math.abs(ib.Bd[e])}var iv=n(35674);async function iw(e,t){let{address:n,blockNumber:r,blockTag:i,chainId:o,token:a,unit:s="ether"}=t;if(a)try{return await ik(e,{balanceAddress:n,chainId:o,symbolType:"string",tokenAddress:a})}catch(t){if("ContractFunctionExecutionError"===t.name){let t=await ik(e,{balanceAddress:n,chainId:o,symbolType:"bytes32",tokenAddress:a}),r=(0,ip.rR)((0,ih.f)(t.symbol,{dir:"right"}));return{...t,symbol:r}}throw t}let u=e.getClient({chainId:o}),l=(0,iy.s)(u,ig.s,"getBalance"),c=await l(r?{address:n,blockNumber:r}:{address:n,blockTag:i}),d=e.chains.find(e=>e.id===o)??u.chain;return{decimals:d.nativeCurrency.decimals,formatted:(0,im.b)(c,i_(s)),symbol:d.nativeCurrency.symbol,value:c}}async function ik(e,t){let{balanceAddress:n,chainId:r,symbolType:i,tokenAddress:o,unit:a}=t,s={abi:[{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"decimals",stateMutability:"view",inputs:[],outputs:[{type:"uint8"}]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{type:i}]}],address:o},[u,l,c]=await (0,iv.J)(e,{allowFailure:!1,contracts:[{...s,functionName:"balanceOf",args:[n],chainId:r},{...s,functionName:"decimals",chainId:r},{...s,functionName:"symbol",chainId:r}]}),d=(0,im.b)(u??"0",i_(a??l));return{decimals:l,formatted:d,symbol:c,value:u}}var ix=n(46278),iA=n(56139),iS=n(16546),iI=n(95378);let iT=[{id:"0xE30feDd158A2e3b13e9badaeABaFc5516e95e8C7",name:"Wrapped SEI",symbol:"WSEI",url:"https://dzyb4dm7r8k8w.cloudfront.net/prod/logos/0xE30feDd158A2e3b13e9badaeABaFc5516e95e8C7/logo.png",decimals:18},{id:"0x0000000000000000000000000000000000000000",name:"SEI",symbol:"SEI",url:"https://dzyb4dm7r8k8w.cloudfront.net/prod/logos/0xE30feDd158A2e3b13e9badaeABaFc5516e95e8C7/logo.png",decimals:18},{id:"0xB75D0B03c06A926e488e2659DF1A861F860bD3d1",name:"kavaUSDT",symbol:"kavaUSDT",url:"https://storage.googleapis.com/app-sailor/kavaUSDT.jpg",decimals:6},{id:"0x3894085Ef7Ff0f0aeDf52E2A2704928d1Ec074F1",name:"USDC",symbol:"USDC",url:"https://dzyb4dm7r8k8w.cloudfront.net/prod/logos/0x3894085Ef7Ff0f0aeDf52E2A2704928d1Ec074F1/logo.png",decimals:6},{id:"0x0555E30da8f98308EdB960aa94C0Db47230d2B9c",name:"Wrapped BTC",symbol:"WBTC",url:"https://dzyb4dm7r8k8w.cloudfront.net/prod/logos/0x0555E30da8f98308EdB960aa94C0Db47230d2B9c/logo.png",decimals:8},{id:"0x5Cf6826140C1C56Ff49C808A1A75407Cd1DF9423",name:"iSEI",symbol:"ISEI",url:"https://dzyb4dm7r8k8w.cloudfront.net/prod/logos/0x5Cf6826140C1C56Ff49C808A1A75407Cd1DF9423/logo.png",decimals:6},{id:"0x160345fC359604fC6e70E3c5fAcbdE5F7A9342d8",name:"Wrapped ETH",symbol:"WETH",url:"https://dzyb4dm7r8k8w.cloudfront.net/prod/logos/0x160345fC359604fC6e70E3c5fAcbdE5F7A9342d8/logo.png",decimals:18},{id:"0x64445f0aecC51E94aD52d8AC56b7190e764E561a",name:"Frax Share",symbol:"FXS",url:"https://dzyb4dm7r8k8w.cloudfront.net/prod/logos/0x64445f0aecC51E94aD52d8AC56b7190e764E561a/logo.png",decimals:18},{id:"0x37a4dD9CED2b19Cfe8FAC251cd727b5787E45269",name:"fastUSD",symbol:"FASTUSD",url:"https://dzyb4dm7r8k8w.cloudfront.net/prod/logos/0x37a4dD9CED2b19Cfe8FAC251cd727b5787E45269/logo.png",decimals:18}];(u=p||(p={})).HOUR="H",u.DAY="D",u.WEEK="W",u.MONTH="M",u.YEAR="Y";let iE=async()=>{try{let{data:e}=await ix.Z.get("https://asia-southeast1-ktx-finance-2.cloudfunctions.net/sailor_poolapi/getTokenList");return(null==e?void 0:e.map(e=>iD(e)))||[]}catch(e){return iT.map(e=>iD(e))||[]}},iP={data:new Map,timestamp:0},iC=new Map,iO=["SEI","USDT","USDC","WBTC","WETH"],iB=()=>{iP.data.clear(),iP.timestamp=0},iM=async function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=f.uM.getState().tokenList;if(!n||0===n.length)return console.warn("getPortfolioBalances called before tokenList loaded. Skipping."),{tokenBalances:[],tokensTotalDenominatedValue:{},tokensTotalDenominatedValueChange:{}};let r=Date.now();if(!t&&iP.timestamp>r-15e3&&iP.data.has(e))return iP.data.get(e);if(iC.has(e))return iC.get(e);let i=(async()=>{let t=f.uM.getState().tokenList,n=t.filter(e=>iO.includes(e.symbol)),i=t.filter(e=>!iO.includes(e.symbol)),o=async t=>{let n=t.map(async t=>{try{let n;let r=t.address;return n=r===iS.DR?await iw(id.v,{address:e,chainId:h.bI.Sei}):await iw(id.v,{address:e,token:r,chainId:h.bI.Sei}),{quantity:new iA.Z(null==n?void 0:n.formatted),denominatedValue:{},token:t}}catch(e){return console.error("Error fetching balance for token ".concat(t.symbol,":"),e),null}});return(await Promise.all(n)).filter(e=>null!==e)},a=await o(n),s={tokenBalances:a,tokensTotalDenominatedValue:{},tokensTotalDenominatedValueChange:{}},u=iL(a),l=iR(u);return iI.EN.setState({tokenAccounts:u,tokenAccountMap:l,refreshTokenAccTime:Date.now(),getTokenBalanceUiAmount:iI.EN.getState().getTokenBalanceUiAmount},!1,{type:"fetchTokenAccountAct"}),iP.data.set(e,s),iP.timestamp=r,i.length>0?setTimeout(async()=>{try{let t=await o(i),n=[...a,...t];iP.data.set(e,{tokenBalances:n,tokensTotalDenominatedValue:{},tokensTotalDenominatedValueChange:{}});let r=iL(n),s=iR(r);iI.EN.setState({tokenAccounts:r,tokenAccountMap:s,refreshTokenAccTime:Date.now(),getTokenBalanceUiAmount:iI.EN.getState().getTokenBalanceUiAmount},!1,{type:"fetchTokenAccountAct"})}catch(e){console.error("Error fetching other token balances:",e)}finally{iC.delete(e)}},0):iC.delete(e),s})();return iC.set(e,i),i};function iR(e){let t=new Map;return e.forEach(e=>{let n=e.address;t.has(n)?t.get(n).push(e):t.set(n,[e])}),t.forEach(e=>{e.sort((e,t)=>e.amount(null==e?void 0:e.length)?e.filter(e=>e.token.chain===(0,h.qj)(h.bI.Sei)).map(e=>{var t,n,r;return{amount:null==e?void 0:e.quantity,usdPrice:null==e?void 0:null===(t=e.denominatedValue)||void 0===t?void 0:t.value,address:null===(n=iF(null==e?void 0:e.token))||void 0===n?void 0:n.address,isNative:(null==e?void 0:null===(r=e.token)||void 0===r?void 0:r.standard)==="NATIVE"}}):[],iN=async(e,t)=>{let n={chain:null!=t?t:ic.qop.Ethereum,address:"11111111111111111111111111111111"===e?null:e},{data:r}=await il(ic.bfP,{variables:n});return iD(null==r?void 0:r.token)},iD=e=>{if(!e)return;let{id:t,name:n,address:r,decimals:i,symbol:o,project:a,chain:s,standard:u,url:l,...c}=iF(e);return{id:t.toLowerCase(),address:t.toLowerCase(),name:n,symbol:o,decimals:+(null!=i?i:18),logoURI:l,tags:["verified"],daily_volume:0,created_at:null,freeze_authority:null,permanent_delegate:null,minted_at:null,standard:"SEI"===o?"NATIVE":"",isNative:"NATIVE"===u,chain:"SEI",...c}},iF=e=>{let{standard:t,chain:n,...r}=e,i=e.address;if("NATIVE"===t){let e=(0,h.uF)(n);i=(0,m.kv)(e)}return{standard:t,chain:n,...r,address:i}}},6093:function(e,t,n){"use strict";n.d(t,{C5:function(){return r},H0:function(){return o},Ok:function(){return l},XD:function(){return c},Xn:function(){return p},_u:function(){return d},oc:function(){return i},zS:function(){return a}});let r=()=>!0,i=()=>r()&&"visible"===document.visibilityState,o=()=>r()&&window.location.host.includes("raydium.io"),a=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2;return e?[e.slice(0,t),".".repeat(n),e.slice(-1*t)].join(""):""},s=async e=>new Promise(t=>{setTimeout(()=>{t({})},e||1e3)}),u=new Set,l=new Map,c=async(e,t)=>{let{retryCount:n=10,interval:r=1e3,errorMsg:i="request failed",sleepTime:o,onError:a}=t||{},c=0;return new Promise(async(d,p)=>{void 0!==o&&await s(o),e().then(e=>{d(e)}).catch(()=>{let o=window.setInterval(async()=>{++c>n&&(null==a||a(i),clearInterval(o),u.delete(o),p(Error(i)));try{let t=await e();clearInterval(o),u.delete(o),d(t)}catch(e){"tx failed"===e.message&&(null==a||a(e.message),clearInterval(o),u.delete(o),p(Error("tx failed")))}},r);u.add(o),(null==t?void 0:t.id)&&l.set(t.id,o)})})},d=e=>{e&&window.clearInterval(e)};function p(e,t){if(!t)return"";if(!e||e.length<10)return e;let n=Math.floor((t-3)/2)+1;return e.substring(0,n)+"..."+e.substring(e.length-(t-(n+3)),e.length)}},30162:function(e,t,n){"use strict";n.d(t,{Pp:function(){return v},wI:function(){return f},bI:function(){return a},uF:function(){return _},qj:function(){return y},ne:function(){return b}});var r,i,o,a,s=n(18484),u=n(98260),l=n(93073),c=n(18053);let d=(0,c.a)({id:11155111,name:"Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.drpc.org"]}},blockExplorers:{default:{name:"Etherscan",url:"https://sepolia.etherscan.io",apiUrl:"https://api-sepolia.etherscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:751532},ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0xc8Af999e38273D658BE1b921b88A9Ddf005769cC",blockCreated:5317080}},testnet:!0});var p=n(53116);(r=o||(o={}))[r.MAINNET=1]="MAINNET",r[r.GOERLI=5]="GOERLI",r[r.SEPOLIA=11155111]="SEPOLIA",r[r.SEI=1329]="SEI",(i=a||(a={}))[i.Mainnet=o.MAINNET]="Mainnet",i[i.Sepolia=o.SEPOLIA]="Sepolia",i[i.Sei=o.SEI]="Sei";let f={[a.Mainnet]:{...l.R,id:a.Mainnet,sdkId:u.a_.MAINNET,assetRepoNetworkName:"ethereum",backendChain:{chain:s.qop.Ethereum,backendSupported:!0,isSecondaryChain:!1,nativeTokenBackendAddress:void 0},blockPerMainnetEpochForChainId:1,blockWaitMsBeforeWarning:6e4,bridge:void 0,chainPriority:0,docs:"https://docs.uniswap.org/",elementName:"",explorer:{name:"Etherscan",url:"https://etherscan.io/",apiURL:"https://api.etherscan.io"},helpCenterUrl:void 0,infoLink:"https://app.uniswap.org/explore",infuraPrefix:"mainnet",interfaceName:"mainnet",label:"Ethereum",logo:"ETHEREUM_LOGO",nativeCurrency:{name:"Ethereum",symbol:"ETH",decimals:18,address:"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",explorerLink:"https://etherscan.io/chart/etherprice",logo:"ETHEREUM_LOGO"},networkLayer:0,pendingTransactionsRetryOptions:void 0,rpcUrls:{private:{http:["https://rpc.mevblocker.io/?referrer=uniswapwallet"]},public:{http:["https://mainnet.infura.io/v3/0ac57a06f2994538829c14745750d721"]},default:{http:["https://mainnet.infura.io/v3/0ac57a06f2994538829c14745750d721"]},fallback:{http:["https://rpc.ankr.com/eth","https://eth-mainnet.public.blastapi.io"]}},urlParam:"ethereum",statusPage:void 0,supportsClientSideRouting:!0,supportsGasEstimates:!0,wrappedNativeCurrency:{name:"Wrapped Ether",symbol:"WETH",decimals:18,address:"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"}},[a.Sepolia]:{...d,id:a.Sepolia,sdkId:u.a_.SEPOLIA,assetRepoNetworkName:void 0,backendChain:{chain:s.qop.EthereumSepolia,backendSupported:!0,isSecondaryChain:!1,nativeTokenBackendAddress:void 0},blockPerMainnetEpochForChainId:1,blockWaitMsBeforeWarning:void 0,bridge:void 0,chainPriority:0,docs:"https://docs.uniswap.org/",elementName:"ElementName.ChainSepolia",explorer:{name:"Etherscan",url:"https://sepolia.etherscan.io/",apiURL:"https://api-sepolia.etherscan.io"},helpCenterUrl:void 0,infoLink:"https://app.uniswap.org/explore",infuraPrefix:"sepolia",interfaceName:"sepolia",label:"Sepolia",logo:"ETHEREUM_LOGO",nativeCurrency:{name:"Ethereum",symbol:"ETH",decimals:18,address:"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",explorerLink:"https://sepolia.etherscan.io/chart/etherprice",logo:"ETHEREUM_LOGO"},networkLayer:0,pendingTransactionsRetryOptions:void 0,rpcUrls:{public:{http:["https://rpc.sepolia.org"]},default:{http:["https://rpc.sepolia.org/"]},fallback:{http:["https://rpc.sepolia.org/","https://rpc2.sepolia.org/","https://rpc.sepolia.online/","https://www.sepoliarpc.space/","https://rpc-sepolia.rockx.com/","https://rpc.bordel.wtf/sepolia"]}},statusPage:void 0,supportsClientSideRouting:!0,supportsGasEstimates:!1,urlParam:"sepolia",wrappedNativeCurrency:{name:"Wrapped Ether",symbol:"WETH",decimals:18,address:"0xfff9976782d46cc05630d1f6ebab18b2324d6b14"}},[a.Sei]:{...p.N,id:a.Sei,assetRepoNetworkName:void 0,backendChain:{chain:s.qop.Sei,backendSupported:!0,isSecondaryChain:!1,nativeTokenBackendAddress:void 0},blockPerMainnetEpochForChainId:1329,blockWaitMsBeforeWarning:void 0,bridge:void 0,chainPriority:0,docs:"https://docs.uniswap.org/",elementName:"ElementName.ChainSepolia",explorer:{name:"Seitrace",url:"https://seitrace.com/?chain=pacific-1",apiURL:""},helpCenterUrl:void 0,infoLink:"https://seitrace.com/?chain=pacific-1",infuraPrefix:"sei",interfaceName:"sei",label:"Sei",logo:"ETHEREUM_LOGO",nativeCurrency:{name:"SEI",symbol:"SEI",decimals:18,address:"0x0000000000000000000000000000000000000000",explorerLink:"https://seitrace.com/?chain=pacific-1",logo:"ETHEREUM_LOGO"},networkLayer:0,pendingTransactionsRetryOptions:void 0,rpcUrls:{public:{http:["https://evm-rpc.sei-apis.com?x-apikey=cfa577a8"]},default:{http:["https://evm-rpc.sei-apis.com?x-apikey=cfa577a8"]},fallback:{http:["https://evm-rpc.sei-apis.com?x-apikey=cfa577a8"]}},statusPage:void 0,supportsClientSideRouting:!0,supportsGasEstimates:!1,urlParam:"sei",wrappedNativeCurrency:{name:"Wrapped SEI",symbol:"WSEI",decimals:18,address:"0xe30fedd158a2e3b13e9badaeabafc5516e95e8c7"}}},h=[a.Mainnet,a.Sepolia,a.Sei],m=[a.Sepolia],g=[...h,...m];function y(e){switch(e){case o.MAINNET:return s.qop.Ethereum;case o.SEPOLIA:return s.qop.EthereumSepolia;case o.SEI:return s.qop.Sei}}function b(e){return e&&g.map(e=>e.toString()).includes(e.toString())?parseInt(e.toString(),10):null}function _(e){switch(e){case s.qop.Ethereum:return a.Mainnet;case s.qop.EthereumSepolia:return a.Sepolia;case s.qop.Sei:return a.Sei}return null}let v=a.Sei},43903:function(e,t,n){"use strict";n.d(t,{Nh:function(){return o},qn:function(){return i},vD:function(){return a}});var r=n(6093);let i=e=>(0,r.C5)()?localStorage.getItem(e):null,o=(e,t)=>{if((0,r.C5)())return localStorage.setItem(e,String(t))},a=e=>{if((0,r.C5)())return localStorage.removeItem(e)}},46578:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(27484),i=n.n(r),o=n(70178),a=n.n(o);function s(){for(var e=arguments.length,t=Array(e),n=0;n{if(!e||!e.includes("."))return e;let t=e.split(".");for(;"0"===t[1][t[1].length-1];)t[1]=t[1].slice(0,-1);return t[1].length?"".concat(t[0],".").concat(t[1]):t[0]},a=/(-?)([\d,_]*)\.?(\d*)/;function s(e){var t;let n=e;e.indexOf("e")>0&&(n=new r.Z(e).toFixed(new r.Z(e).decimalPlaces()));let[,,,i=""]=null!==(t=n.match(a))&&void 0!==t?t:[],o=i.split("").findIndex(e=>Number(e)>0);return o+1}function u(e){var t;if(!e.includes("."))return e;let[,n,r,i]=null!==(t=e.match(a))&&void 0!==t?t:[],o=i;for(;o.endsWith("0");)o=o.slice(0,o.length-1);return o?"".concat(n).concat(r,".").concat(o):"".concat(n).concat(r)||"0"}let l=navigator.languages&&navigator.languages.length?navigator.languages[0]:navigator.language,c=new Intl.NumberFormat(l,{style:"decimal"}).format(1.1).substring(1,2),d=new Intl.NumberFormat(l,{style:"percent",maximumFractionDigits:2});new Intl.NumberFormat(l,{style:"percent",maximumFractionDigits:2,signDisplay:"exceptZero"});let p=new Intl.NumberFormat(l,{style:"decimal",useGrouping:!1,minimumFractionDigits:0,maximumFractionDigits:12}),f={format:(e,t)=>e?p.format(void 0!==t?+e.toFixed(t):e):"0"};function h(e){return e?"."!==c?e.toString().replace(".",c):e:""}let m=["₀","₁","₂","₃","₄","₅","₆","₇","₈","₉"];function g(e,t){return void 0!==t&&(e=function(e,t){let n=new RegExp("(\\.|,)(0{".concat(t+1,",})(?=[1-9]?)"));return e.replace(n,(e,t,n)=>"".concat(t,"0").concat(n.length.toString().split("").map(e=>m[parseInt(e,10)]).join("")))}(e,t)),e}function y(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2,r=new Intl.NumberFormat(l,{style:"decimal",useGrouping:!0,minimumFractionDigits:0,maximumFractionDigits:n});return{format:i=>{let a=r.format(i);if(t){let e=(function(e,t){let n=[{sign:"T",value:1e12},{sign:"B",value:1e9},{sign:"M",value:1e6},{sign:"K",value:1e3}];for(let r=0;r=n[r].value){let i=o((e/n[r].value).toFixed(t));return"".concat(i).concat(n[r].sign)}return o(e.toFixed(t))||""})(i,n).match(/^(\d+(?:\.\d+)?)([TBMK]?)$/);if(e){let[,t,n]=e;a="".concat(r.format(parseFloat(t))).concat(n)}}return e?"".concat(e).concat(a):a}}}function b(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{noDecimal:n=!1,symbol:i,abbreviated:o=!1,decimalPlaces:a,maximumDecimalTrailingZeroes:s}=t;if(!e)return i?"".concat(i,"0"):"0";if("string"==typeof e&&e.includes("e")){let[t,n]=e.split("e"),r=parseFloat(t).toFixed(2);return"".concat(r,"e").concat(n)}let u=e instanceof r.Z?e:new r.Z(String(e).replace(/,/gi,"")),l=u.toNumber(),c=y(i,o,0);if(!0===n&&l>1)return g(c.format(l));if(Object.prototype.hasOwnProperty.call(t,"decimalPlaces")&&l>=1e-6&&l<=1e12&&!s){let e=y(i,o,a);return g(e.format(l),s)}if(0===l)return l.toFixed(0);if(l>1e12)return g(l.toString(),s);if(l>=1e3);else if(l>=50&&l<1e3){let e=y(i,o,3);return g(e.format(l),s)}else if(l>=1e-6&&l<50){let e=y(i,o,8);return g(e.format(l),s)}else if(l<1e-6){let e=y(i,o,100);return g(e.format(function(e,t){let[n,r]=e.toExponential().split("e"),i=parseFloat(n).toFixed(3);return parseFloat("".concat(i,"e").concat(r))}(l,0)),s)}return g(c.format(l))}},46552:function(e,t,n){"use strict";n.d(t,{ZP:function(){return i},xF:function(){return o}});var r=n(81292);function i(e,t){try{var n,i,o;if(null==e)return"--";let a=(Number(e)*(null===(n=null==t?void 0:t.alreadyPercented)||void 0===n||n?1:100)).toFixed(null!==(i=null==t?void 0:t.decimals)&&void 0!==i?i:2);if((0===e||"0"===e)&&!(null==t?void 0:t.notShowZero))return"0%";if(!(null==t?void 0:t.exact)&&a===0..toFixed(null!==(o=null==t?void 0:t.decimals)&&void 0!==o?o:2))return(null==t?void 0:t.alwaysSigned)?"<+0.01%":"<0.01%";return(null==t?void 0:t.alwaysSigned)?"".concat(a?"-"!==String(a)[0]?"+":"-":"").concat(r.uf.format(Number(null==a?"":Number(a)>0?String(a):String(a).slice(1))),"%"):"".concat(r.uf.format(Number(a),null==t?void 0:t.decimals),"%")}catch(e){return"0%"}}let o=(e,t)=>parseFloat((e/(t||1)*100).toFixed(2))},76953:function(e,t,n){"use strict";n.d(t,{H:function(){return o},a:function(){return i}});var r=n(49895);let i=e=>{var t,n,i,o;return e.length<2?(0,r.dJ)(e[0].symbol)||(null===(t=e[0])||void 0===t?void 0:t.address.substring(0,6)):"".concat((0,r.dJ)(e[0].symbol)||(null===(n=e[0])||void 0===n?void 0:n.address.substring(0,6))," - ").concat((0,r.dJ)(null===(i=e[1])||void 0===i?void 0:i.symbol)||(null===(o=e[1])||void 0===o?void 0:o.address.substring(0,6)))},o=e=>{var t,n,r,i,o,a,s,u,l;return e.length<2?null!==(l=null===(t=e[0])||void 0===t?void 0:null===(n=t.address)||void 0===n?void 0:n.substring(0,6))&&void 0!==l?l:"":"".concat((null===(r=e[0])||void 0===r?void 0:r.symbol)||(null===(i=e[0])||void 0===i?void 0:null===(o=i.address)||void 0===o?void 0:o.substring(0,6))," - ").concat((null===(a=e[1])||void 0===a?void 0:a.symbol)||(null===(s=e[1])||void 0===s?void 0:null===(u=s.address)||void 0===u?void 0:u.substring(0,6)))}},34497:function(e,t,n){"use strict";n.d(t,{Z:function(){return a},g:function(){return o}});var r=n(64174);let i=new Map,o=e=>{if(!e)return!1;let t=e.toString();if(i.has(t))return!0;try{return new r.nh(t),!0}catch(e){return!1}};function a(e){let t=(null==e?void 0:e.toString())||"";if(i.has(t))return i.get(t);let n=new r.nh(t);return i.set(t,n),n}},12562:function(e,t,n){"use strict";n.d(t,{Jz:function(){return m},WA:function(){return p},TM:function(){return s}});var r=n(41266);let i=async(e,t)=>{try{let n=await r.ZP.post("https://asia-southeast1-ktx-finance-2.cloudfunctions.net/sailor_otherapi/bind_refercode",{address:e,referCode:t});return 200===n.status}catch(e){return console.error("Failed to save referral binding:",e),!1}},o="sailor_referral_codes",a="sailor_pending_refer_code",s=(e,t)=>{if(e&&t)try{let n=c();if(n[e.toLowerCase()]===t){console.log("Wallet already has this referCode:",t);return}console.log("Saving referCode for wallet:",e,t);let r={...n,[e.toLowerCase()]:t};localStorage.setItem(o,JSON.stringify(r)),l(e,t)}catch(e){console.error("Failed to save referral code:",e)}},u=()=>{try{let e=new URL(window.location.href);e.searchParams.delete("referCode"),window.history.replaceState({},"",e.toString())}catch(e){console.error("Failed to remove referCode from URL:",e)}},l=async(e,t)=>{try{let n=await i(e,t);n?(h(),u()):console.error("Failed to save referral binding to server")}catch(e){console.error("Failed to save referral binding to server:",e)}},c=()=>{try{let e=localStorage.getItem(o);return e?JSON.parse(e):{}}catch(e){return console.error("Failed to get referral codes:",e),{}}},d=()=>{try{let e=new URLSearchParams(window.location.search);return e.get("referCode")}catch(e){return console.error("Failed to extract referral code from URL:",e),null}},p=e=>{if(e)try{localStorage.setItem(a,e)}catch(e){console.error("Failed to save pending referral code:",e)}},f=()=>{try{return localStorage.getItem(a)}catch(e){return console.error("Failed to get pending referral code:",e),null}},h=()=>{try{localStorage.removeItem(a)}catch(e){console.error("Failed to clear pending referral code:",e)}},m=e=>{if(!e)return;let t=d();if(t){s(e,t);return}let n=f();n&&(s(e,n),h())}},76053:function(e,t,n){"use strict";function r(e,t){return t&&t.sortRules?[...e].sort((e,n)=>{for(let{value:o,compareFn:a,mode:s}of t.sortRules){var r;let t=o(e),u=o(n);if(null==t&&null==u)continue;if(null==t)return 1;if(null==u)return -1;let l=null!==(r=null==a?void 0:a(t,u,{itemA:e,itemB:n}))&&void 0!==r?r:i(t,u)*("increase"===s?1:-1);if(0!=l)return l}return i(e,n)}):e}function i(e,t){if(o(e)&&!o(t))return -1;if(o(t)&&!o(e))return 1;if(o(e)&&o(t))return 0;if(a(e)&&a(t))return e-t;if(u(e)&&u(t))return Number(e-t);if(s(e)&&s(t))return Number(e)-Number(t);if(l(e)&&l(t)){let n=Number(e),r=Number(t);return isNaN(r)||isNaN(n)?e.localeCompare(t):n-r}return 0}function o(e){return void 0==e&&null==e}function a(e){return"number"==typeof e}function s(e){return"boolean"==typeof e}function u(e){return"bigint"==typeof e}function l(e){return"string"==typeof e}n.d(t,{x:function(){return r}})},49895:function(e,t,n){"use strict";n.d(t,{B0:function(){return u},EM:function(){return _},GP:function(){return g},RC:function(){return f},SM:function(){return h},Th:function(){return d},Xn:function(){return k},aZ:function(){return b},dJ:function(){return l},dX:function(){return y},eI:function(){return s},fn:function(){return w},h3:function(){return m},l_:function(){return c},mT:function(){return p}});var r=n(61034),i=n(76053),o=n(62258),a=n(16546);let s=e=>e===r.DAM.toBase58()?r.YGS.toBase58():e,u=e=>e===r.YGS.toBase58()?r.DAM.toBase58():e,l=e=>e?e.replace(/WSOL/gi,"SOL"):"",c=e=>e?e.replace(/^SOL/gi,"WSOL"):"",d=e=>!!e&&(e.toString()===r.WRY.address||e.toString()===r._Fs.address),p=e=>(null==e?void 0:e.address)===a.DR?{...e,address:o.fd.address,symbol:o.fd.symbol,name:o.fd.name,id:o.fd.address}:e,f=e=>{var t;return(null==e?void 0:null===(t=e.address)||void 0===t?void 0:t.toLowerCase())===o.fd.address.toLowerCase()?{...e,address:a.DR,symbol:"SEI",name:"SEI",id:a.DR}:e},h=e=>e.address===r.DAM.toBase58()?{...e,address:r._Fs.address,symbol:r._Fs.symbol,name:r._Fs.name}:e,m=e=>{let{mint:t,transformSol:n}=e;return t?(n?l(t.symbol):t.symbol)||t.address.substring(0,6):""},g={chainId:101,address:"4k3Dyjzvzp8eMZWUXbBCjEvwSkkk59S5iCNLY3QrkX6R",programId:"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",logoURI:"https://img-v1.raydium.io/icon/4k3Dyjzvzp8eMZWUXbBCjEvwSkkk59S5iCNLY3QrkX6R.png",symbol:"RAY",name:"Raydium",decimals:6,tags:[],extensions:{coingeckoId:"raydium"},type:"raydium",priority:2},y=(e,t)=>{let{searchStr:n,skipFn:r}=t||{},o=n?n.trim().toLocaleLowerCase():"",a=[...e];if(o){let t=[];e.forEach(e=>{if((null==r?void 0:r(e))||t[0])return;if(o===e.address.toLocaleLowerCase()){t[0]=[e];return}if(o===e.symbol.toLocaleLowerCase()){t[1]=[...t[1]||[],e];return}let n=e.symbol.toLocaleLowerCase().indexOf(o);n>-1&&(t[n+2]=[...t[n+2]||[],e].sort((e,t)=>t.priority-e.priority))}),t[1]=t[1]?(0,i.x)(t[1],{sortRules:[{value:e=>"raydium"===e.type}]}):t[1],a=t.flat().filter(Boolean)}return a},b=e=>{if(e)return"sol"===e?r._Fs.address:e},_=e=>{if(e)return e===r._Fs.address?"sol":e},v={[r.LA$.toBase58()]:100,[r.q3f.toBase58()]:90,[r.YGS.toBase58()]:80,[r.DAM.toBase58()]:80};function w(e){let t=v[e];return t||0}function k(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4;return"".concat(e.slice(0,t),"...").concat(e.slice(-t))}},68389:function(e,t,n){"use strict";n.d(t,{u:function(){return s}});var r=n(61034),i=n(15061),o=n(41266);let a=async()=>{try{let e=await o.ZP.get("https://solanacompass.com/api/fees?cacheFreshTime=".concat(3e5),{timeout:3e3,skipError:!0});return e}catch(e){return}};async function s(){let e=i.qr.getState().getPriorityFee();if(!isNaN(parseFloat(String(e)||"")))return{units:6e5,microLamports:Math.ceil(Number(e)*10**r._Fs.decimals*1e6/6e5)};{var t;let e=await a(),{avg:n}=null!==(t=null==e?void 0:e[15])&&void 0!==t?t:{};if(!n)return;return{units:6e5,microLamports:Math.min(Math.ceil(1e6*n/6e5),25e3)}}}},62330:function(e,t,n){"use strict";async function r(e){let{adapter:t}=e;return t&&"standard"in t&&"fuse:getEphemeralSigners"in t.wallet.features&&t.wallet.features["fuse:getEphemeralSigners"].getEphemeralSigners}n.d(t,{Z:function(){return r}})},94089:function(e,t,n){"use strict";n.d(t,{Yp:function(){return o},kv:function(){return a}});var r=n(98260),i=n(30162);class o{equals(e){return e.isNative&&e.chainId===this.chainId}get wrapped(){return function(e){let t=i.wI[e].wrappedNativeCurrency;return new r.WU(e,t.address,t.decimals,t.symbol,t.name)}(this.chainId)}static onChain(e){var t;return null!==(t=this._cachedNativeCurrency[e])&&void 0!==t?t:this._cachedNativeCurrency[e]=new o(e)}constructor(e){let t=(0,i.ne)(e);if(!t)throw Error("Unsupported chain ID: ".concat(e));let n=i.wI[t];if(!n)throw Error("Native currrency info not found");this.chainId=t,this.decimals=n.nativeCurrency.decimals,this.name=n.nativeCurrency.name,this.symbol=n.nativeCurrency.symbol,this.isNative=!0,this.isToken=!1,this.address=a(this.chainId)}}function a(e){return i.wI[e].nativeCurrency.address}o._cachedNativeCurrency={}},11021:function(){},14690:function(){},8107:function(){},38758:function(){},37123:function(){},5152:function(e,t,n){e.exports=n(95677)},9008:function(e,t,n){e.exports=n(42636)},11163:function(e,t,n){e.exports=n(96885)},4298:function(e,t,n){e.exports=n(85442)},34155:function(e){var t,n,r,i=e.exports={};function o(){throw Error("setTimeout has not been defined")}function a(){throw Error("clearTimeout has not been defined")}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(e){n=a}}();var u=[],l=!1,c=-1;function d(){l&&r&&(l=!1,r.length?u=r.concat(u):c=-1,u.length&&p())}function p(){if(!l){var e=s(d);l=!0;for(var t=u.length;t;){for(r=u,u=[];++c1)for(var n=1;n1&&void 0!==arguments[1]?arguments[1]:"none";return e||t},x=function(){return!!("undefined"!=typeof window&&(window.navigator||navigator))&&(window.navigator||navigator)},A=function(e){var t=x();return t&&t.platform&&(-1!==t.platform.indexOf(e)||"MacIntel"===t.platform&&t.maxTouchPoints>1&&!window.MSStream)},S=function(e){return e.type===_.Browser},I=function(e){return e.name===v.Edge},T=function(e){return"string"==typeof e&&-1!==e.indexOf("Edg/")},E=function(){return A("iPad")};h.type,_.SmartTv,h.type,_.Console,h.type,_.Wearable,h.type,_.Embedded,p.name===v.MobileSafari||E(),p.name,v.Chromium,(r=h.type)===_.Mobile||r===_.Tablet||E(),h.type,_.Mobile,h.type===_.Tablet||E(),S(h),S(h),g.name,w.Android,g.name,w.WindowsPhone,g.name===w.IOS||E(),p.name,v.Chrome,p.name,v.Firefox,(i=p.name)===v.Safari||v.MobileSafari,p.name,v.Opera,(o=p.name)===v.InternetExplorer||v.Ie,k(g.version),k(g.name),k(p.version),k(p.major),k(p.name),k(h.vendor),k(h.model),k(m.name),k(m.version),k(y),I(p)||T(y),p.name,v.Yandex,k(h.type,"browser"),(a=x())&&(/iPad|iPhone|iPod/.test(a.platform)||"MacIntel"===a.platform&&a.maxTouchPoints>1)&&window.MSStream,E(),A("iPhone"),A("iPod"),"string"==typeof(u=(s=x())&&s.userAgent&&s.userAgent.toLowerCase())&&/electron/.test(u),T(y),I(p)&&T(y),g.name,w.Windows,g.name,w.MAC_OS,p.name,v.MIUI,p.name,v.SamsungBrowser,t.rQ=b},28189:function(e,t,n){"use strict";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 i(e){var t=function(e,t){if("object"!==r(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!==r(i))return i;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===r(t)?t:String(t)}function o(e,t,n){return(t=i(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}n.d(t,{cC:function(){return M},Db:function(){return E},$G:function(){return F}});var s,u=n(67294),l=n(81613);function c(){if(console&&console.warn){for(var e,t=arguments.length,n=Array(t),r=0;r",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"\xa9","©":"\xa9","®":"\xae","®":"\xae","…":"…","…":"…","/":"/","/":"/"},g=function(e){return m[e]};function y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function b(e){for(var t=1;t0:!!n}function S(e){return e?e.props?e.props.children:e.children:[]}function I(e){return Array.isArray(e)?e:[e]}function T(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};_=b(b({},_),e)}(e.options.react),s=e}},P=(0,u.createContext)(),C=function(){var e,t;function n(){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,n),this.usedNamespaces={}}return e=[{key:"addUsedNamespaces",value:function(e){var t=this;e.forEach(function(e){t.usedNamespaces[e]||(t.usedNamespaces[e]=!0)})}},{key:"getUsedNamespaces",value:function(){return Object.keys(this.usedNamespaces)}}],T(n.prototype,e),t&&T(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n}(),O=["children","count","parent","i18nKey","context","tOptions","values","defaults","components","ns","i18n","t","shouldUnescape"];function B(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function M(e){var t=e.children,n=e.count,i=e.parent,d=e.i18nKey,f=e.context,h=e.tOptions,m=e.values,g=e.defaults,y=e.components,b=e.ns,k=e.i18n,T=e.t,E=e.shouldUnescape,C=a(e,O),M=(0,u.useContext)(P)||{},R=M.i18n,L=M.defaultNS,N=k||R||s,D=T||N&&N.t.bind(N);return function(e){var t=e.children,n=e.count,i=e.parent,o=e.i18nKey,d=e.context,f=e.tOptions,h=void 0===f?{}:f,m=e.values,g=e.defaults,y=e.components,b=e.ns,k=e.i18n,T=e.t,E=e.shouldUnescape,P=a(e,w),C=k||s;if(!C)return p("You will need to pass in an i18next instance by using i18nextReactModule"),t;var O=T||C.t.bind(C)||function(e){return e};d&&(h.context=d);var B=x(x({},_),C.options&&C.options.react),M=b||O.ns||C.options&&C.options.defaultNS;M="string"==typeof M?[M]:M||["translation"];var R=g||function e(t,n){if(!t)return"";var i="",o=I(t),s=n.transSupportBasicHtmlNodes&&n.transKeepBasicHtmlNodesFor?n.transKeepBasicHtmlNodesFor:[];return o.forEach(function(t,o){if("string"==typeof t)i+="".concat(t);else if((0,u.isValidElement)(t)){var l=Object.keys(t.props).length,d=s.indexOf(t.type)>-1,p=t.props.children;if(!p&&d&&0===l)i+="<".concat(t.type,"/>");else if(p||d&&0===l){if(t.props.i18nIsDynamicList)i+="<".concat(o,">");else if(d&&1===l&&"string"==typeof p)i+="<".concat(t.type,">").concat(p,"");else{var f=e(p,n);i+="<".concat(o,">").concat(f,"")}}else i+="<".concat(o,">")}else if(null===t)c("Trans: the passed in value is invalid - seems you passed in a null child.");else if("object"===r(t)){var h=t.format,m=Object.keys(a(t,v));if(1===m.length){var g=h?"".concat(m[0],", ").concat(h):m[0];i+="{{".concat(g,"}}")}else c("react-i18next: the passed in object contained more than one variable - the object should look like {{ value, format }} where format is optional.",t)}else c("Trans: the passed in value is invalid - seems you passed in a variable like {number} - please pass in variables for interpolation as full objects like {{number}}.",t)}),i}(t,B)||B.transEmptyNodeValue||o,L=B.hashTransKey,N=o||(L?L(R):R),D=m?h.interpolation:{interpolation:x(x({},h.interpolation),{},{prefix:"#$?",suffix:"?$#"})},F=x(x(x(x({},h),{},{count:n},m),D),{},{defaultValue:R,ns:M}),q=N?O(N,F):R,j=function(e,t,n,i,o,a){if(""===t)return[];var s=i.transKeepBasicHtmlNodesFor||[],c=t&&new RegExp(s.join("|")).test(t);if(!e&&!c)return[t];var d={};!function e(t){I(t).forEach(function(t){"string"==typeof t||(A(t)?e(S(t)):"object"!==r(t)||(0,u.isValidElement)(t)||Object.assign(d,t))})}(e);var p=l.Z.parse("<0>".concat(t,"")),f=x(x({},d),o);function h(e,t,n){var r=S(e),i=g(r,t.children,n);return"[object Array]"===Object.prototype.toString.call(r)&&r.every(function(e){return(0,u.isValidElement)(e)})&&0===i.length?r:i}function m(e,t,n,r,i){e.dummy&&(e.children=t),n.push((0,u.cloneElement)(e,x(x({},e.props),{},{key:r}),i?void 0:t))}function g(t,o,l){var d=I(t);return I(o).reduce(function(t,o,p){var y=o.children&&o.children[0]&&o.children[0].content&&n.services.interpolator.interpolate(o.children[0].content,f,n.language);if("tag"===o.type){var b,_,v,w=d[parseInt(o.name,10)];!w&&1===l.length&&l[0][o.name]&&(w=l[0][o.name]),w||(w={});var k=0!==Object.keys(o.attrs).length?(b={props:o.attrs},(v=x({},_=w)).props=Object.assign(b.props,_.props),v):w,S=(0,u.isValidElement)(k),I=S&&A(o,!0)&&!o.voidElement,T=c&&"object"===r(k)&&k.dummy&&!S,E="object"===r(e)&&null!==e&&Object.hasOwnProperty.call(e,o.name);if("string"==typeof k){var P=n.services.interpolator.interpolate(k,f,n.language);t.push(P)}else if(A(k)||I){var C=h(k,o,l);m(k,C,t,p)}else if(T){var O=g(d,o.children,l);t.push((0,u.cloneElement)(k,x(x({},k.props),{},{key:p}),O))}else if(Number.isNaN(parseFloat(o.name))){if(E){var B=h(k,o,l);m(k,B,t,p,o.voidElement)}else if(i.transSupportBasicHtmlNodes&&s.indexOf(o.name)>-1){if(o.voidElement)t.push((0,u.createElement)(o.name,{key:"".concat(o.name,"-").concat(p)}));else{var M=g(d,o.children,l);t.push((0,u.createElement)(o.name,{key:"".concat(o.name,"-").concat(p)},M))}}else if(o.voidElement)t.push("<".concat(o.name," />"));else{var R=g(d,o.children,l);t.push("<".concat(o.name,">").concat(R,""))}}else if("object"!==r(k)||S)1===o.children.length&&y?t.push((0,u.cloneElement)(k,x(x({},k.props),{},{key:p}),y)):t.push((0,u.cloneElement)(k,x(x({},k.props),{},{key:p})));else{var L=o.children[0]?y:null;L&&t.push(L)}}else if("text"===o.type){var N=i.transWrapTextNodes,D=a?i.unescape(n.services.interpolator.interpolate(o.content,f,n.language)):n.services.interpolator.interpolate(o.content,f,n.language);N?t.push((0,u.createElement)(N,{key:"".concat(o.name,"-").concat(p)},D)):t.push(D)}return t},[])}return S(g([{dummy:!0,children:e||[]}],p,I(e||[]))[0])}(y||t,q,C,B,F,E),U=void 0!==i?i:B.defaultTransParent;return U?(0,u.createElement)(U,P,j):j}(function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n1&&void 0!==arguments[1]?arguments[1]:{},i=n.i18n,o=(0,u.useContext)(P)||{},a=o.i18n,l=o.defaultNS,c=i||a||s;if(c&&!c.reportNamespaces&&(c.reportNamespaces=new C),!c){p("You will need to pass in an i18next instance by using initReactI18next");var d=function(e,t){return"string"==typeof t?t:t&&"object"===r(t)&&"string"==typeof t.defaultValue?t.defaultValue:Array.isArray(e)?e[e.length-1]:e},h=[d,{},!1];return h.t=d,h.i18n={},h.ready=!1,h}c.options.react&&void 0!==c.options.react.wait&&p("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");var m=N(N(N({},_),c.options.react),n),g=m.useSuspense,y=m.keyPrefix,b=e||l||c.options&&c.options.defaultNS;b="string"==typeof b?[b]:b||["translation"],c.reportNamespaces.addUsedNamespaces&&c.reportNamespaces.addUsedNamespaces(b);var v=(c.isInitialized||c.initializedStoreOnce)&&b.every(function(e){return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.languages&&t.languages.length?void 0!==t.options.ignoreJSONStructure?t.hasLoadedNamespace(e,{precheck:function(t,r){if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!r(t.isLanguageChangingTo,e))return!1}}):function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=t.languages[0],i=!!t.options&&t.options.fallbackLng,o=t.languages[t.languages.length-1];if("cimode"===r.toLowerCase())return!0;var a=function(e,n){var r=t.services.backendConnector.state["".concat(e,"|").concat(n)];return -1===r||2===r};return(!(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1)||!t.services.backendConnector.backend||!t.isLanguageChangingTo||!!a(t.isLanguageChangingTo,e))&&!!(t.hasResourceBundle(r,e)||!t.services.backendConnector.backend||t.options.resources&&!t.options.partialBundledLanguages||a(r,e)&&(!i||a(o,e)))}(e,t,n):(p("i18n.languages were undefined or empty",t.languages),!0)}(e,c,m)});function w(){return c.getFixedT(null,"fallback"===m.nsMode?b:b[0],y)}var k=function(e){if(Array.isArray(e))return e}(t=(0,u.useState)(w))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,l=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);u=!0);}catch(e){l=!0,i=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw i}}return s}}(t,2)||function(e,t){if(e){if("string"==typeof e)return R(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return R(e,t)}}(t,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),x=k[0],A=k[1],S=b.join(),I=D(S),T=(0,u.useRef)(!0);(0,u.useEffect)(function(){var e=m.bindI18n,t=m.bindI18nStore;function n(){T.current&&A(w)}return T.current=!0,v||g||f(c,b,function(){T.current&&A(w)}),v&&I&&I!==S&&T.current&&A(w),e&&c&&c.on(e,n),t&&c&&c.store.on(t,n),function(){T.current=!1,e&&c&&e.split(" ").forEach(function(e){return c.off(e,n)}),t&&c&&t.split(" ").forEach(function(e){return c.store.off(e,n)})}},[c,S]);var E=(0,u.useRef)(!0);(0,u.useEffect)(function(){T.current&&!E.current&&A(w),E.current=!1},[c,y]);var O=[x,c,v];if(O.t=x,O.i18n=c,O.ready=v,v||!v&&!g)return O;throw new Promise(function(e){f(c,b,function(){e()})})}},69921:function(e,t){"use strict";/** @license React v16.13.1 * react-is.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,i=n?Symbol.for("react.portal"):60106,o=n?Symbol.for("react.fragment"):60107,a=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,u=n?Symbol.for("react.provider"):60109,l=n?Symbol.for("react.context"):60110,c=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,p=n?Symbol.for("react.forward_ref"):60112,f=n?Symbol.for("react.suspense"):60113,h=n?Symbol.for("react.suspense_list"):60120,m=n?Symbol.for("react.memo"):60115,g=n?Symbol.for("react.lazy"):60116,y=n?Symbol.for("react.block"):60121,b=n?Symbol.for("react.fundamental"):60117,_=n?Symbol.for("react.responder"):60118,v=n?Symbol.for("react.scope"):60119;function w(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case c:case d:case o:case s:case a:case f:return e;default:switch(e=e&&e.$$typeof){case l:case p:case g:case m:case u:return e;default:return t}}case i:return t}}}function k(e){return w(e)===d}t.AsyncMode=c,t.ConcurrentMode=d,t.ContextConsumer=l,t.ContextProvider=u,t.Element=r,t.ForwardRef=p,t.Fragment=o,t.Lazy=g,t.Memo=m,t.Portal=i,t.Profiler=s,t.StrictMode=a,t.Suspense=f,t.isAsyncMode=function(e){return k(e)||w(e)===c},t.isConcurrentMode=k,t.isContextConsumer=function(e){return w(e)===l},t.isContextProvider=function(e){return w(e)===u},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return w(e)===p},t.isFragment=function(e){return w(e)===o},t.isLazy=function(e){return w(e)===g},t.isMemo=function(e){return w(e)===m},t.isPortal=function(e){return w(e)===i},t.isProfiler=function(e){return w(e)===s},t.isStrictMode=function(e){return w(e)===a},t.isSuspense=function(e){return w(e)===f},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===d||e===s||e===a||e===f||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===m||e.$$typeof===u||e.$$typeof===l||e.$$typeof===p||e.$$typeof===b||e.$$typeof===_||e.$$typeof===v||e.$$typeof===y)},t.typeOf=w},59864:function(e,t,n){"use strict";e.exports=n(69921)},8653:function(e,t,n){"use strict";n.d(t,{x:function(){return B}});var r=n(70655);function i(e){return"function"==typeof e}function o(e){var t=e(function(e){Error.call(e),e.stack=Error().stack});return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var a=o(function(e){return function(t){e(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map(function(e,t){return t+1+") "+e.toString()}).join("\n "):"",this.name="UnsubscriptionError",this.errors=t}});function s(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var u=function(){var e;function t(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var e,t,n,o,s,u=this._parentage;if(u){if(this._parentage=null,Array.isArray(u))try{for(var l=(0,r.__values)(u),c=l.next();!c.done;c=l.next())c.value.remove(this)}catch(t){e={error:t}}finally{try{c&&!c.done&&(t=l.return)&&t.call(l)}finally{if(e)throw e.error}}else u.remove(this)}var p=this.initialTeardown;if(i(p))try{p()}catch(e){s=e instanceof a?e.errors:[e]}var f=this._finalizers;if(f){this._finalizers=null;try{for(var h=(0,r.__values)(f),m=h.next();!m.done;m=h.next()){var g=m.value;try{d(g)}catch(e){s=null!=s?s:[],e instanceof a?s=(0,r.__spreadArray)((0,r.__spreadArray)([],(0,r.__read)(s)),(0,r.__read)(e.errors)):s.push(e)}}}catch(e){n={error:e}}finally{try{m&&!m.done&&(o=h.return)&&o.call(h)}finally{if(n)throw n.error}}}if(s)throw new a(s)}},t.prototype.add=function(e){var n;if(e&&e!==this){if(this.closed)d(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=null!==(n=this._finalizers)&&void 0!==n?n:[]).push(e)}}},t.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},t.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},t.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&s(t,e)},t.prototype.remove=function(e){var n=this._finalizers;n&&s(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=((e=new t).closed=!0,e),t}(),l=u.EMPTY;function c(e){return e instanceof u||e&&"closed"in e&&i(e.remove)&&i(e.add)&&i(e.unsubscribe)}function d(e){i(e)?e():e.unsubscribe()}var p={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},f={setTimeout:function(e,t){for(var n=[],i=2;i0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,n=this.hasError,r=this.isStopped,i=this.observers;return n||r?l:(this.currentObservers=null,i.push(e),new u(function(){t.currentObservers=null,s(i,e)}))},t.prototype._checkFinalizedStatuses=function(e){var t=this.hasError,n=this.thrownError,r=this.isStopped;t?e.error(n):r&&e.complete()},t.prototype.asObservable=function(){var e=new P;return e.source=this,e},t.create=function(e,t){return new M(e,t)},t}(P),M=function(e){function t(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return(0,r.__extends)(t,e),t.prototype.next=function(e){var t,n;null===(n=null===(t=this.destination)||void 0===t?void 0:t.next)||void 0===n||n.call(t,e)},t.prototype.error=function(e){var t,n;null===(n=null===(t=this.destination)||void 0===t?void 0:t.error)||void 0===n||n.call(t,e)},t.prototype.complete=function(){var e,t;null===(t=null===(e=this.destination)||void 0===e?void 0:e.complete)||void 0===t||t.call(e)},t.prototype._subscribe=function(e){var t,n;return null!==(n=null===(t=this.source)||void 0===t?void 0:t.subscribe(e))&&void 0!==n?n:l},t}(B)},89509:function(e,t,n){/*! safe-buffer. MIT License. Feross Aboukhadijeh */var r=n(48764),i=r.Buffer;function o(e,t){for(var n in e)t[n]=e[n]}function a(e,t,n){return i(e,t,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=r:(o(r,t),t.Buffer=a),a.prototype=Object.create(i.prototype),o(i,a),a.from=function(e,t,n){if("number"==typeof e)throw TypeError("Argument must not be a number");return i(e,t,n)},a.alloc=function(e,t,n){if("number"!=typeof e)throw TypeError("Argument must be a number");var r=i(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},a.allocUnsafe=function(e){if("number"!=typeof e)throw TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw TypeError("Argument must be a number");return r.SlowBuffer(e)}},42533:function(e,t,n){"use strict";n.d(t,{Ab:function(){return a},Fr:function(){return s},G$:function(){return o},JM:function(){return d},K$:function(){return l},MS:function(){return r},h5:function(){return u},lK:function(){return c},uj:function(){return i}});var r="-ms-",i="-moz-",o="-webkit-",a="comm",s="rule",u="decl",l="@import",c="@keyframes",d="@layer"},6858:function(e,t,n){"use strict";n.d(t,{cD:function(){return o},qR:function(){return i}});var r=n(52864);function i(e){var t=(0,r.Ei)(e);return function(n,r,i,o){for(var a="",s=0;s0&&(0,i.to)(C)-b&&(0,i.R3)(v>32?u(C+";",l,a,b-1):u((0,i.gx)(C," ","")+";",l,a,b-2),h);break;case 59:C+=";";default:if((0,i.R3)(P=s(C,n,a,g,y,c,f,I,T=[],E=[],b),d),123===S){if(0===y)e(C,n,P,P,T,d,b,f,E);else switch(99===_&&110===(0,i.uO)(C,3)?100:_){case 100:case 108:case 109:case 115:e(t,P,P,l&&(0,i.R3)(s(t,P,P,0,0,c,f,I,c,T=[],b),E),c,E,b,f,l?T:E);break;default:e(C,P,P,P,[""],E,0,f,E)}}}g=y=v=0,k=A=1,I=C="",b=p;break;case 58:b=1+(0,i.to)(C),v=w;default:if(k<1){if(123==S)--k;else if(125==S&&0==k++&&125==(0,o.mp)())continue}switch(C+=(0,i.Dp)(S),S*k){case 38:A=y>0?1:(C+="\f",-1);break;case 44:f[g++]=((0,i.to)(C)-1)*A,A=1;break;case 64:45===(0,o.fj)()&&(C+=(0,o.iF)((0,o.lp)())),_=(0,o.fj)(),y=b=(0,i.to)(I=C+=(0,o.QU)((0,o.Ud)())),S++;break;case 45:45===w&&2==(0,i.to)(C)&&(k=0)}}return d}("",null,null,null,[""],e=(0,o.un)(e),0,[0],e))}function s(e,t,n,a,s,u,l,c,d,p,f){for(var h=s-1,m=0===s?u:[""],g=(0,i.Ei)(m),y=0,b=0,_=0;y0?m[v]+" "+w:(0,i.gx)(w,/&\f/g,m[v])))&&(d[_++]=k);return(0,o.dH)(e,t,n,0===s?r.Fr:c,d,p,f)}function u(e,t,n,a){return(0,o.dH)(e,t,n,r.h5,(0,i.tb)(e,0,a),(0,i.tb)(e,a+1,-1),a)}},17449:function(e,t,n){"use strict";n.d(t,{P:function(){return a},q:function(){return o}});var r=n(42533),i=n(52864);function o(e,t){for(var n="",r=(0,i.Ei)(e),o=0;o0?(0,r.uO)(l,--s):0,o--,10===u&&(o=1,i--),u}function h(){return u=s2||b(u)>3?"":" "}function x(e,t){for(;--t&&h()&&!(u<48)&&!(u>102)&&(!(u>57)||!(u<65))&&(!(u>70)||!(u<97)););return y(e,s+(t<6&&32==m()&&32==h()))}function A(e,t){for(;h();)if(e+u===57)break;else if(e+u===84&&47===m())break;return"/*"+y(t,s-1)+"*"+(0,r.Dp)(47===e?e:h())}function S(e){for(;!b(m());)h();return y(e,s)}},52864:function(e,t,n){"use strict";n.d(t,{$e:function(){return g},Cw:function(){return c},Dp:function(){return i},EQ:function(){return u},Ei:function(){return h},R3:function(){return m},Wn:function(){return r},f0:function(){return o},fy:function(){return s},gx:function(){return l},tb:function(){return p},to:function(){return f},uO:function(){return d},vp:function(){return a}});var r=Math.abs,i=String.fromCharCode,o=Object.assign;function a(e,t){return 45^d(e,0)?(((t<<2^d(e,0))<<2^d(e,1))<<2^d(e,2))<<2^d(e,3):0}function s(e){return e.trim()}function u(e,t){return(e=t.exec(e))?e[0]:e}function l(e,t,n){return e.replace(t,n)}function c(e,t){return e.indexOf(t)}function d(e,t){return 0|e.charCodeAt(t)}function p(e,t,n){return e.slice(t,n)}function f(e){return e.length}function h(e){return e.length}function m(e,t){return t.push(e),e}function g(e,t){return e.map(t).join("")}},27090:function(e,t,n){"use strict";n.d(t,{$l:function(){return a},BN:function(){return q},DY:function(){return h},J$:function(){return Z},JN:function(){return w},LI:function(){return B},PM:function(){return l},W6:function(){return C},i_:function(){return o},ko:function(){return er},kw:function(){return O},mf:function(){return u},o8:function(){return s},qC:function(){return L},s6:function(){return en},sj:function(){return F},u3:function(){return D},u_:function(){return K},w6:function(){return P},xD:function(){return ei}});var r=n(67294);let i=()=>{},o=i(),a=Object,s=e=>e===o,u=e=>"function"==typeof e,l=(e,t)=>({...e,...t}),c=e=>u(e.then),d=new WeakMap,p=0,f=e=>{let t,n;let r=typeof e,i=e&&e.constructor,o=i==Date;if(a(e)!==e||o||i==RegExp)t=o?e.toJSON():"symbol"==r?e.toString():"string"==r?JSON.stringify(e):""+e;else{if(t=d.get(e))return t;if(t=++p+"~",d.set(e,t),i==Array){for(n=0,t="@";nb&&typeof window.requestAnimationFrame!=y,w=(e,t)=>{let n=h.get(e);return[()=>!s(t)&&e.get(t)||m,r=>{if(!s(t)){let i=e.get(t);t in g||(g[t]=i),n[5](t,l(i,r),i||m)}},n[6],()=>!s(t)&&t in g?g[t]:!s(t)&&e.get(t)||m]},k=!0,[x,A]=b&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[i,i],S=()=>{let e=_&&document.visibilityState;return s(e)||"hidden"!==e},I=e=>(_&&document.addEventListener("visibilitychange",e),x("focus",e),()=>{_&&document.removeEventListener("visibilitychange",e),A("focus",e)}),T=e=>{let t=()=>{k=!0,e()},n=()=>{k=!1};return x("online",t),x("offline",n),()=>{A("online",t),A("offline",n)}},E={initFocus:I,initReconnect:T},P=!r.useId,C=!b||"Deno"in window,O=e=>v()?window.requestAnimationFrame(e):setTimeout(e,1),B=C?r.useEffect:r.useLayoutEffect,M="undefined"!=typeof navigator&&navigator.connection,R=!C&&M&&(["slow-2g","2g"].includes(M.effectiveType)||M.saveData),L=e=>{if(u(e))try{e=e()}catch(t){e=""}let t=e;return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?f(e):"",t]},N=0,D=()=>++N;var F={__proto__:null,ERROR_REVALIDATE_EVENT:3,FOCUS_EVENT:0,MUTATE_EVENT:2,RECONNECT_EVENT:1};async function q(...e){let[t,n,r,i]=e,a=l({populateCache:!0,throwOnError:!0},"boolean"==typeof i?{revalidate:i}:i||{}),d=a.populateCache,p=a.rollbackOnError,f=a.optimisticData,m=!1!==a.revalidate,g=e=>"function"==typeof p?p(e):!1!==p,y=a.throwOnError;if(u(n)){let e=[],r=t.keys();for(let i of r)!/^\$(inf|sub)\$/.test(i)&&n(t.get(i)._k)&&e.push(i);return Promise.all(e.map(b))}return b(n);async function b(n){let i;let[a]=L(n);if(!a)return;let[l,p]=w(t,a),[b,_,v,k]=h.get(t),x=b[a],A=()=>m&&(delete v[a],delete k[a],x&&x[0])?x[0](2).then(()=>l().data):l().data;if(e.length<3)return A();let S=r,I=D();_[a]=[I,0];let T=!s(f),E=l(),P=E.data,C=E._c,O=s(C)?P:C;if(T&&p({data:f=u(f)?f(O,P):f,_c:O}),u(S))try{S=S(O)}catch(e){i=e}if(S&&c(S)){if(S=await S.catch(e=>{i=e}),I!==_[a][0]){if(i)throw i;return S}i&&T&&g(i)&&(d=!0,p({data:S=O,_c:o}))}d&&!i&&(u(d)&&(S=d(S,O)),p({data:S,error:o,_c:o})),_[a][1]=D();let B=await A();if(p({_c:o}),i){if(y)throw i;return}return d?B:S}}let j=(e,t)=>{for(let n in e)e[n][0]&&e[n][0](t)},U=(e,t)=>{if(!h.has(e)){let n=l(E,t),r={},a=q.bind(o,e),s=i,u={},c=(e,t)=>{let n=u[e]||[];return u[e]=n,n.push(t),()=>n.splice(n.indexOf(t),1)},d=(t,n,r)=>{e.set(t,n);let i=u[t];if(i)for(let e of i)e(n,r)},p=()=>{if(!h.has(e)&&(h.set(e,[r,{},{},{},a,d,c]),!C)){let t=n.initFocus(setTimeout.bind(o,j.bind(o,r,0))),i=n.initReconnect(setTimeout.bind(o,j.bind(o,r,1)));s=()=>{t&&t(),i&&i(),h.delete(e)}}};return p(),[e,a,p,s]}return[e,h.get(e)[4]]},z=(e,t,n,r,i)=>{let o=n.errorRetryCount,a=i.retryCount,u=~~((Math.random()+.5)*(1<<(a<8?a:8)))*n.errorRetryInterval;(s(o)||!(a>o))&&setTimeout(r,u,i)},V=(e,t)=>f(e)==f(t),[W,$]=U(new Map),K=l({onLoadingSlow:i,onSuccess:i,onError:i,onErrorRetry:z,onDiscarded:i,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:R?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:R?5e3:3e3,compare:V,isPaused:()=>!1,cache:W,mutate:$,fallback:{}},{isOnline:()=>k,isVisible:S}),H=(e,t)=>{let n=l(e,t);if(t){let{use:r,fallback:i}=e,{use:o,fallback:a}=t;r&&o&&(n.use=r.concat(o)),i&&a&&(n.fallback=l(i,a))}return n},G=(0,r.createContext)({}),Z=e=>{let{value:t}=e,n=(0,r.useContext)(G),i=u(t),a=(0,r.useMemo)(()=>i?t(n):t,[i,n,t]),s=(0,r.useMemo)(()=>i?a:H(n,a),[i,n,a]),c=a&&a.provider,d=(0,r.useRef)(o);c&&!d.current&&(d.current=U(c(s.cache||W),a));let p=d.current;return p&&(s.cache=p[0],s.mutate=p[1]),B(()=>{if(p)return p[2]&&p[2](),p[3]},[]),(0,r.createElement)(G.Provider,l(e,{value:s}))},Y=b&&window.__SWR_DEVTOOLS_USE__,X=Y?window.__SWR_DEVTOOLS_USE__:[],Q=e=>u(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}],J=()=>l(K,(0,r.useContext)(G)),ee=e=>(t,n,r)=>{let i=n&&((...e)=>{let[r]=L(t),[,,,i]=h.get(W),o=i[r];return s(o)?n(...e):(delete i[r],o)});return e(t,i,r)},et=X.concat(ee),en=e=>function(...t){let n=J(),[r,i,o]=Q(t),a=H(n,o),s=e,{use:u}=a,l=(u||[]).concat(et);for(let e=l.length;e--;)s=l[e](s);return s(r,i||a.fetcher||null,a)},er=(e,t,n)=>{let r=t[e]||(t[e]=[]);return r.push(n),()=>{let e=r.indexOf(n);e>=0&&(r[e]=r[r.length-1],r.pop())}},ei=(e,t)=>(...n)=>{let[r,i,o]=Q(n),a=(o.use||[]).concat(t);return e(r,i,{...o,use:a})};Y&&(window.__SWR_DEVTOOLS_REACT__=r)},36667:function(e,t,n){"use strict";n.d(t,{J$:function(){return l},ZP:function(){return c}});var r=n(67294),i=n(61688),o=n(27090);let a=r.use||(e=>{if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;if("rejected"===e.status)throw e.reason;throw e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e}),s={dedupe:!0},u=(e,t,n)=>{let{cache:u,compare:l,suspense:c,fallbackData:d,revalidateOnMount:p,revalidateIfStale:f,refreshInterval:h,refreshWhenHidden:m,refreshWhenOffline:g,keepPreviousData:y}=n,[b,_,v,w]=o.DY.get(u),[k,x]=(0,o.qC)(e),A=(0,r.useRef)(!1),S=(0,r.useRef)(!1),I=(0,r.useRef)(k),T=(0,r.useRef)(t),E=(0,r.useRef)(n),P=()=>E.current,C=()=>P().isVisible()&&P().isOnline(),[O,B,M,R]=(0,o.JN)(u,k),L=(0,r.useRef)({}).current,N=(0,o.o8)(d)?n.fallback[k]:d,D=(e,t)=>{for(let n in L){let r=n;if("data"===r){if(!l(e[r],t[r])&&(!(0,o.o8)(e[r])||!l(K,t[r])))return!1}else if(t[r]!==e[r])return!1}return!0},F=(0,r.useMemo)(()=>{let e=!!k&&!!t&&((0,o.o8)(p)?!P().isPaused()&&!c&&(!!(0,o.o8)(f)||f):p),n=t=>{let n=(0,o.PM)(t);return(delete n._k,e)?{isValidating:!0,isLoading:!0,...n}:n},r=O(),i=R(),a=n(r),s=r===i?a:n(i),u=a;return[()=>{let e=n(O()),t=D(e,u);return t?(u.data=e.data,u.isLoading=e.isLoading,u.isValidating=e.isValidating,u.error=e.error,u):(u=e,e)},()=>s]},[u,k]),q=(0,i.useSyncExternalStore)((0,r.useCallback)(e=>M(k,(t,n)=>{D(n,t)||e()}),[u,k]),F[0],F[1]),j=!A.current,U=b[k]&&b[k].length>0,z=q.data,V=(0,o.o8)(z)?N:z,W=q.error,$=(0,r.useRef)(V),K=y?(0,o.o8)(z)?$.current:z:V,H=(!U||!!(0,o.o8)(W))&&(j&&!(0,o.o8)(p)?p:!P().isPaused()&&(c?!(0,o.o8)(V)&&f:(0,o.o8)(V)||f)),G=!!(k&&t&&j&&H),Z=(0,o.o8)(q.isValidating)?G:q.isValidating,Y=(0,o.o8)(q.isLoading)?G:q.isLoading,X=(0,r.useCallback)(async e=>{let t,r;let i=T.current;if(!k||!i||S.current||P().isPaused())return!1;let a=!0,s=e||{},u=!v[k]||!s.dedupe,c=()=>o.w6?!S.current&&k===I.current&&A.current:k===I.current,d={isValidating:!1,isLoading:!1},p=()=>{B(d)},f=()=>{let e=v[k];e&&e[1]===r&&delete v[k]},h={isValidating:!0};(0,o.o8)(O().data)&&(h.isLoading=!0);try{if(u&&(B(h),n.loadingTimeout&&(0,o.o8)(O().data)&&setTimeout(()=>{a&&c()&&P().onLoadingSlow(k,n)},n.loadingTimeout),v[k]=[i(x),(0,o.u3)()]),[t,r]=v[k],t=await t,u&&setTimeout(f,n.dedupingInterval),!v[k]||v[k][1]!==r)return u&&c()&&P().onDiscarded(k),!1;d.error=o.i_;let e=_[k];if(!(0,o.o8)(e)&&(r<=e[0]||r<=e[1]||0===e[1]))return p(),u&&c()&&P().onDiscarded(k),!1;let s=O().data;d.data=l(s,t)?s:t,u&&c()&&P().onSuccess(t,k,n)}catch(n){f();let e=P(),{shouldRetryOnError:t}=e;!e.isPaused()&&(d.error=n,u&&c()&&(e.onError(n,k,e),(!0===t||(0,o.mf)(t)&&t(n))&&C()&&e.onErrorRetry(n,k,e,e=>{let t=b[k];t&&t[0]&&t[0](o.sj.ERROR_REVALIDATE_EVENT,e)},{retryCount:(s.retryCount||0)+1,dedupe:!0})))}return a=!1,p(),!0},[k,u]),Q=(0,r.useCallback)((...e)=>(0,o.BN)(u,I.current,...e),[]);if((0,o.LI)(()=>{T.current=t,E.current=n,(0,o.o8)(z)||($.current=z)}),(0,o.LI)(()=>{if(!k)return;let e=X.bind(o.i_,s),t=0,n=(n,r={})=>{if(n==o.sj.FOCUS_EVENT){let n=Date.now();P().revalidateOnFocus&&n>t&&C()&&(t=n+P().focusThrottleInterval,e())}else if(n==o.sj.RECONNECT_EVENT)P().revalidateOnReconnect&&C()&&e();else if(n==o.sj.MUTATE_EVENT)return X();else if(n==o.sj.ERROR_REVALIDATE_EVENT)return X(r)},r=(0,o.ko)(k,b,n);return S.current=!1,I.current=k,A.current=!0,B({_k:x}),H&&((0,o.o8)(V)||o.W6?e():(0,o.kw)(e)),()=>{S.current=!0,r()}},[k]),(0,o.LI)(()=>{let e;function t(){let t=(0,o.mf)(h)?h(O().data):h;t&&-1!==e&&(e=setTimeout(n,t))}function n(){!O().error&&(m||P().isVisible())&&(g||P().isOnline())?X(s).then(t):t()}return t(),()=>{e&&(clearTimeout(e),e=-1)}},[h,m,g,k]),(0,r.useDebugValue)(K),c&&(0,o.o8)(V)&&k){if(!o.w6&&o.W6)throw Error("Fallback data is required when using suspense in SSR.");T.current=t,E.current=n,S.current=!1;let e=w[k];if(!(0,o.o8)(e)){let t=Q(e);a(t)}if((0,o.o8)(W)){let e=X(s);(0,o.o8)(K)||(e.status="fulfilled",e.value=!0),a(e)}else throw W}return{mutate:Q,get data(){return L.data=!0,K},get error(){return L.error=!0,W},get isValidating(){return L.isValidating=!0,Z},get isLoading(){return L.isLoading=!0,Y}}},l=o.$l.defineProperty(o.J$,"defaultValue",{value:o.u_}),c=(0,o.s6)(u)},8467:function(e,t,n){"use strict";function r(e,t,n){return t<=e&&e<=n}function i(e){if(void 0===e)return{};if(e===Object(e))return e;throw TypeError("Could not convert argument to dictionary")}function o(e){this.tokens=[].slice.call(e)}function a(e,t){if(e)throw TypeError("Decoder error");return t||65533}n.r(t),n.d(t,{TextDecoder:function(){return u},TextEncoder:function(){return l}}),o.prototype={endOfStream:function(){return!this.tokens.length},read:function(){return this.tokens.length?this.tokens.shift():-1},prepend:function(e){if(Array.isArray(e))for(;e.length;)this.tokens.unshift(e.pop());else this.tokens.unshift(e)},push:function(e){if(Array.isArray(e))for(;e.length;)this.tokens.push(e.shift());else this.tokens.push(e)}};var s="utf-8";function u(e,t){if(!(this instanceof u))return new u(e,t);if((e=void 0!==e?String(e).toLowerCase():s)!==s)throw Error("Encoding not supported. Only utf-8 is supported");t=i(t),this._streaming=!1,this._BOMseen=!1,this._decoder=null,this._fatal=!!t.fatal,this._ignoreBOM=!!t.ignoreBOM,Object.defineProperty(this,"encoding",{value:"utf-8"}),Object.defineProperty(this,"fatal",{value:this._fatal}),Object.defineProperty(this,"ignoreBOM",{value:this._ignoreBOM})}function l(e,t){if(!(this instanceof l))return new l(e,t);if((e=void 0!==e?String(e).toLowerCase():s)!==s)throw Error("Encoding not supported. Only utf-8 is supported");t=i(t),this._streaming=!1,this._encoder=null,this._options={fatal:!!t.fatal},Object.defineProperty(this,"encoding",{value:"utf-8"})}function c(e){var t=e.fatal,n=0,i=0,o=0,s=128,u=191;this.handler=function(e,l){if(-1===l&&0!==o)return o=0,a(t);if(-1===l)return -1;if(0===o){if(r(l,0,127))return l;if(r(l,194,223))o=1,n=l-192;else if(r(l,224,239))224===l&&(s=160),237===l&&(u=159),o=2,n=l-224;else{if(!r(l,240,244))return a(t);240===l&&(s=144),244===l&&(u=143),o=3,n=l-240}return n<<=6*o,null}if(!r(l,s,u))return n=o=i=0,s=128,u=191,e.prepend(l),a(t);if(s=128,u=191,i+=1,n+=l-128<<6*(o-i),i!==o)return null;var c=n;return n=o=i=0,c}}function d(e){e.fatal,this.handler=function(e,t){if(-1===t)return -1;if(r(t,0,127))return t;r(t,128,2047)?(n=1,i=192):r(t,2048,65535)?(n=2,i=224):r(t,65536,1114111)&&(n=3,i=240);for(var n,i,o=[(t>>6*n)+i];n>0;){var a=t>>6*(n-1);o.push(128|63&a),n-=1}return o}}u.prototype={decode:function(e,t){n="object"==typeof e&&e instanceof ArrayBuffer?new Uint8Array(e):"object"==typeof e&&"buffer"in e&&e.buffer instanceof ArrayBuffer?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(0),t=i(t),this._streaming||(this._decoder=new c({fatal:this._fatal}),this._BOMseen=!1),this._streaming=!!t.stream;for(var n,r,a=new o(n),s=[];!a.endOfStream()&&-1!==(r=this._decoder.handler(a,a.read()));)null!==r&&(Array.isArray(r)?s.push.apply(s,r):s.push(r));if(!this._streaming){do{if(-1===(r=this._decoder.handler(a,a.read())))break;if(null===r)continue;Array.isArray(r)?s.push.apply(s,r):s.push(r)}while(!a.endOfStream());this._decoder=null}return!s.length||-1===["utf-8"].indexOf(this.encoding)||this._ignoreBOM||this._BOMseen||(65279===s[0]?(this._BOMseen=!0,s.shift()):this._BOMseen=!0),function(e){for(var t="",n=0;n>10)+55296,(1023&r)+56320))}return t}(s)}},l.prototype={encode:function(e,t){e=e?String(e):"",t=i(t),this._streaming||(this._encoder=new d(this._options)),this._streaming=!!t.stream;for(var n,r=[],a=new o(function(e){for(var t=String(e),n=t.length,r=0,i=[];r57343)i.push(o);else if(56320<=o&&o<=57343)i.push(65533);else if(55296<=o&&o<=56319){if(r===n-1)i.push(65533);else{var a=e.charCodeAt(r+1);if(56320<=a&&a<=57343){var s=1023&o,u=1023&a;i.push(65536+(s<<10)+u),r+=1}else i.push(65533)}}r+=1}return i}(e));!a.endOfStream()&&-1!==(n=this._encoder.handler(a,a.read()));)Array.isArray(n)?r.push.apply(r,n):r.push(n);if(!this._streaming){for(;-1!==(n=this._encoder.handler(a,a.read()));)Array.isArray(n)?r.push.apply(r,n):r.push(n);this._encoder=null}return new Uint8Array(r)}}},86257:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.YouTubeEmbed=t.GoogleMapsEmbed=t.GoogleAnalytics=void 0;var r=n(53494);Object.defineProperty(t,"GoogleAnalytics",{enumerable:!0,get:function(){return r.GoogleAnalytics}});var i=n(34248);Object.defineProperty(t,"GoogleMapsEmbed",{enumerable:!0,get:function(){return i.GoogleMapsEmbed}});var o=n(92239);Object.defineProperty(t,"YouTubeEmbed",{enumerable:!0,get:function(){return o.YouTubeEmbed}})},53494:function(e,t,n){"use strict";var r=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);it.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.GoogleAnalytics=void 0;let o=i(n(89426)),a=n(17058),s=e=>{var t=r(e,[]);return(0,a.formatData)(o.default,t)};t.GoogleAnalytics=s},34248:function(e,t,n){"use strict";var r=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);it.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.GoogleMapsEmbed=void 0;let o=i(n(27395)),a=n(17058),s=e=>{var t=r(e,[]);return(0,a.formatData)(o.default,t)};t.GoogleMapsEmbed=s},92239:function(e,t,n){"use strict";var r=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);it.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.YouTubeEmbed=void 0;let o=i(n(88420)),a=n(17058),s=e=>{var t=r(e,[]);return(0,a.formatData)(o.default,t)};t.YouTubeEmbed=s},17058:function(e,t){"use strict";function n(e,t,n=!1){return t?Object.keys(e).filter(e=>n?!t.includes(e):t.includes(e)).reduce((t,n)=>(t[n]=e[n],t),{}):{}}function r(e,t,n,r){let i=r&&Object.keys(r).length>0?new URL(Object.values(r)[0],e):new URL(e);return t&&n&&t.forEach(e=>{n[e]&&i.searchParams.set(e,n[e])}),i.toString()}function i(e,t,n,i,o){var a;if(!t)return`<${e}>`;let s=(null===(a=t.src)||void 0===a?void 0:a.url)?Object.assign(Object.assign({},t),{src:r(t.src.url,t.src.params,i,o)}):t,u=Object.keys(Object.assign(Object.assign({},s),n)).reduce((e,t)=>{let r=null==n?void 0:n[t],i=s[t],o=null!=r?r:i,a=!0===o?t:`${t}="${o}"`;return o?e+` ${a}`:e},"");return`<${e}${u}>`}Object.defineProperty(t,"__esModule",{value:!0}),t.formatData=t.createHtml=t.formatUrl=void 0,t.formatUrl=r,t.createHtml=i,t.formatData=function(e,t){var o,a,s,u,l;let c=null===(o=e.scripts)||void 0===o?void 0:o.reduce((e,t)=>[...e,...Array.isArray(t.params)?t.params:[]],[]),d=n(t,c),p=n(t,null===(s=null===(a=e.html)||void 0===a?void 0:a.attributes.src)||void 0===s?void 0:s.params),f=n(t,[null===(l=null===(u=e.html)||void 0===u?void 0:u.attributes.src)||void 0===l?void 0:l.slugParam]),h=n(t,[...Object.keys(d),...Object.keys(p),...Object.keys(f)],!0);return Object.assign(Object.assign({},e),{html:e.html?i(e.html.element,e.html.attributes,h,p,f):null,scripts:e.scripts?e.scripts.map(e=>Object.assign(Object.assign({},e),{url:r(e.url,e.params,d)})):null})}},92600:function(e,t,n){"use strict";function r(e,t){if(!e)throw Error("Invariant failed")}n.d(t,{Z:function(){return r}})},12447:function(e){e.exports&&(e.exports=function(e){return e.prototype.toFormat=function(e,t,n){if(!this.e&&0!==this.e)return this.toString();var r,i,o,a,s,u,l,c,d,p,f,h,m,g,y,b=this.format||{},_=this.constructor.format||{};if(e!=s?"object"==typeof e?(n=e,e=s):t!=s?"object"==typeof t?(n=t,t=s):"object"!=typeof n&&(n={}):n={}:n={},c=(r=this.toFixed(e,t).split("."))[0],d=r[1],u=(l=this.s<0?c.slice(1):c).length,(p=n.decimalSeparator)==s&&(p=b.decimalSeparator)==s&&(p=_.decimalSeparator)==s&&(p="."),(f=n.groupSeparator)==s&&(f=b.groupSeparator)==s&&(f=_.groupSeparator),f&&((h=n.groupSize)==s&&(h=b.groupSize)==s&&(h=_.groupSize)==s&&(h=0),(m=n.secondaryGroupSize)==s&&(m=b.secondaryGroupSize)==s&&(m=_.secondaryGroupSize)==s&&(m=0),m?(i=+m,u-=o=+h):(i=+h,o=+m),i>0&&u>0)){for(a=u%i||i,c=l.substr(0,a);a0&&(c+=f+l.slice(a)),this.s<0&&(c="-"+c)}return d?((g=n.fractionGroupSeparator)==s&&(g=b.fractionGroupSeparator)==s&&(g=_.fractionGroupSeparator),g&&((y=n.fractionGroupSize)==s&&(y=b.fractionGroupSize)==s&&(y=_.fractionGroupSize)==s&&(y=0),(y=+y)&&(d=d.replace(RegExp("\\d{"+y+"}\\B","g"),"$&"+g))),c+p+d):c},e.format={decimalSeparator:".",groupSeparator:",",groupSize:3,secondaryGroupSize:0,fractionGroupSeparator:"",fractionGroupSize:0},e})},70655:function(e,t,n){"use strict";n.r(t),n.d(t,{__assign:function(){return o},__asyncDelegator:function(){return w},__asyncGenerator:function(){return v},__asyncValues:function(){return k},__await:function(){return _},__awaiter:function(){return c},__classPrivateFieldGet:function(){return T},__classPrivateFieldIn:function(){return P},__classPrivateFieldSet:function(){return E},__createBinding:function(){return p},__decorate:function(){return s},__exportStar:function(){return f},__extends:function(){return i},__generator:function(){return d},__importDefault:function(){return I},__importStar:function(){return S},__makeTemplateObject:function(){return x},__metadata:function(){return l},__param:function(){return u},__read:function(){return m},__rest:function(){return a},__spread:function(){return g},__spreadArray:function(){return b},__spreadArrays:function(){return y},__values:function(){return h}});var r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o=function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;nt.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);it.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function s(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a}function u(e,t){return function(n,r){t(n,r,e)}}function l(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function c(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}u((r=r.apply(e,t||[])).next())})}function d(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function m(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function g(){for(var e=[],t=0;t1||s(e,t)})})}function s(e,t){try{var n;(n=i[e](t)).value instanceof _?Promise.resolve(n.value.v).then(u,l):c(o[0][2],n)}catch(e){c(o[0][3],e)}}function u(e){s("next",e)}function l(e){s("throw",e)}function c(e,t){e(t),o.shift(),o.length&&s(o[0][0],o[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",function(e){throw e}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:_(e[r](t)),done:"return"===r}:i?i(t):t}:i}}function k(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=h(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise(function(r,i){!function(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}(r,i,(t=e[n](t)).done,t.value)})}}}function x(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var A=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function S(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&p(t,e,n);return A(t,e),t}function I(e){return e&&e.__esModule?e:{default:e}}function T(e,t,n,r){if("a"===n&&!r)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)}function E(e,t,n,r,i){if("m"===r)throw TypeError("Private method is not writable");if("a"===r&&!i)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n}function P(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}},23451:function(e,t,n){var r;!function(i,o){"use strict";var a="function",s="undefined",u="object",l="string",c="major",d="model",p="name",f="type",h="vendor",m="version",g="architecture",y="console",b="mobile",_="tablet",v="smarttv",w="wearable",k="embedded",x="Amazon",A="Apple",S="ASUS",I="BlackBerry",T="Browser",E="Chrome",P="Firefox",C="Google",O="Huawei",B="Microsoft",M="Motorola",R="Opera",L="Samsung",N="Sharp",D="Sony",F="Xiaomi",q="Zebra",j="Facebook",U="Chromium OS",z="Mac OS",V=function(e,t){var n={};for(var r in e)t[r]&&t[r].length%2==0?n[r]=t[r].concat(e[r]):n[r]=e[r];return n},W=function(e){for(var t={},n=0;n0?2===s.length?typeof s[1]==a?this[s[0]]=s[1].call(this,c):this[s[0]]=s[1]:3===s.length?typeof s[1]!==a||s[1].exec&&s[1].test?this[s[0]]=c?c.replace(s[1],s[2]):o:this[s[0]]=c?s[1].call(this,c,s[2]):o:4===s.length&&(this[s[0]]=c?s[3].call(this,c.replace(s[1],s[2])):o):this[s]=c||o;d+=2}},Z=function(e,t){for(var n in t)if(typeof t[n]===u&&t[n].length>0){for(var r=0;r2&&(e[d]="iPad",e[f]=_),e},this.getEngine=function(){var e={};return e[p]=o,e[m]=o,G.call(e,r,v.engine),e},this.getOS=function(){var e={};return e[p]=o,e[m]=o,G.call(e,r,v.os),w&&!e[p]&&y&&y.platform&&"Unknown"!=y.platform&&(e[p]=y.platform.replace(/chrome os/i,U).replace(/macos/i,z)),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return r},this.setUA=function(e){return r=typeof e===l&&e.length>500?H(e,500):e,this},this.setUA(r),this};Q.VERSION="1.0.38",Q.BROWSER=W([p,m,c]),Q.CPU=W([g]),Q.DEVICE=W([d,h,f,y,b,v,_,w,k]),Q.ENGINE=Q.OS=W([p,m]),typeof t!==s?(e.exports&&(t=e.exports=Q),t.UAParser=Q):n.amdO?(r=(function(){return Q}).call(t,n,t,e),o!==r&&(e.exports=r)):typeof i!==s&&(i.UAParser=Q);var J=typeof i!==s&&(i.jQuery||i.Zepto);if(J&&!J.ua){var ee=new Q;J.ua=ee.getResult(),J.ua.get=function(){return ee.getUA()},J.ua.set=function(e){ee.setUA(e);var t=ee.getResult();for(var n in t)J.ua[n]=t[n]}}}("object"==typeof window?window:this)},53250:function(e,t,n){"use strict";/** * @license React * use-sync-external-store-shim.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var r=n(67294),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=r.useState,a=r.useEffect,s=r.useLayoutEffect,u=r.useDebugValue;function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch(e){return!0}}var c="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=o({inst:{value:n,getSnapshot:t}}),i=r[0].inst,c=r[1];return s(function(){i.value=n,i.getSnapshot=t,l(i)&&c({inst:i})},[e,n,t]),a(function(){return l(i)&&c({inst:i}),e(function(){l(i)&&c({inst:i})})},[e]),u(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:c},50139:function(e,t,n){"use strict";/** * @license React * use-sync-external-store-shim/with-selector.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var r=n(67294),i=n(61688),o="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},a=i.useSyncExternalStore,s=r.useRef,u=r.useEffect,l=r.useMemo,c=r.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var d=s(null);if(null===d.current){var p={hasValue:!1,value:null};d.current=p}else p=d.current;d=l(function(){function e(e){if(!u){if(u=!0,a=e,e=r(e),void 0!==i&&p.hasValue){var t=p.value;if(i(t,e))return s=t}return s=e}if(t=s,o(a,e))return t;var n=r(e);return void 0!==i&&i(t,n)?t:(a=e,s=n)}var a,s,u=!1,l=void 0===n?null:n;return[function(){return e(t())},null===l?void 0:function(){return e(l())}]},[t,n,r,i]);var f=a(e,d[0],d[1]);return u(function(){p.hasValue=!0,p.value=f},[f]),c(f),f}},61688:function(e,t,n){"use strict";e.exports=n(53250)},52798:function(e,t,n){"use strict";e.exports=n(50139)},57632:function(e,t,n){"use strict";let r;n.d(t,{Z:function(){return l}});let i="undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var o={randomUUID:i};let a=new Uint8Array(16);function s(){if(!r&&!(r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(a)}let u=[];for(let e=0;e<256;++e)u.push((e+256).toString(16).slice(1));var l=function(e,t,n){if(o.randomUUID&&!t&&!e)return o.randomUUID();e=e||{};let r=e.random||(e.rng||s)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return function(e,t=0){return u[e[t+0]]+u[e[t+1]]+u[e[t+2]]+u[e[t+3]]+"-"+u[e[t+4]]+u[e[t+5]]+"-"+u[e[t+6]]+u[e[t+7]]+"-"+u[e[t+8]]+u[e[t+9]]+"-"+u[e[t+10]]+u[e[t+11]]+u[e[t+12]]+u[e[t+13]]+u[e[t+14]]+u[e[t+15]]}(r)}},17509:function(e,t,n){"use strict";function r(e){return"string"==typeof e?{address:e,type:"json-rpc"}:e}n.d(t,{T:function(){return r}})},83969:function(e,t,n){"use strict";n.d(t,{R:function(){return er}});var r=n(93037);let i=/^error (?[a-zA-Z$_][a-zA-Z0-9$_]*)\((?.*?)\)$/,o=/^event (?[a-zA-Z$_][a-zA-Z0-9$_]*)\((?.*?)\)$/,a=/^function (?[a-zA-Z$_][a-zA-Z0-9$_]*)\((?.*?)\)(?: (?external|public{1}))?(?: (?pure|view|nonpayable|payable{1}))?(?: returns\s?\((?.*?)\))?$/,s=/^struct (?[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?.*?)\}$/,u=/^constructor\((?.*?)\)(?:\s(?payable{1}))?$/,l=/^fallback\(\) external(?:\s(?payable{1}))?$/,c=/^receive\(\) external payable$/,d=new Set(["indexed"]),p=new Set(["calldata","memory","storage"]);class f extends Error{constructor(e,t={}){let n=t.cause instanceof f?t.cause.details:t.cause?.message?t.cause.message:t.details,r=t.cause instanceof f&&t.cause.docsPath||t.docsPath,i=[e||"An error occurred.","",...t.metaMessages?[...t.metaMessages,""]:[],...r?[`Docs: https://abitype.dev${r}`]:[],...n?[`Details: ${n}`]:[],"Version: abitype@1.0.7"].join("\n");super(i),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiTypeError"}),t.cause&&(this.cause=t.cause),this.details=n,this.docsPath=r,this.metaMessages=t.metaMessages,this.shortMessage=e}}class h extends f{constructor({type:e}){super("Unknown type.",{metaMessages:[`Type "${e}" is not a valid ABI type. Perhaps you forgot to include a struct signature?`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownTypeError"})}}class m extends f{constructor({type:e}){super("Unknown type.",{metaMessages:[`Type "${e}" is not a valid ABI type.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSolidityTypeError"})}}class g extends f{constructor({param:e}){super("Invalid ABI parameter.",{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParameterError"})}}class y extends f{constructor({param:e,name:t}){super("Invalid ABI parameter.",{details:e,metaMessages:[`"${t}" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SolidityProtectedKeywordError"})}}class b extends f{constructor({param:e,type:t,modifier:n}){super("Invalid ABI parameter.",{details:e,metaMessages:[`Modifier "${n}" not allowed${t?` in "${t}" type`:""}.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidModifierError"})}}class _ extends f{constructor({param:e,type:t,modifier:n}){super("Invalid ABI parameter.",{details:e,metaMessages:[`Modifier "${n}" not allowed${t?` in "${t}" type`:""}.`,`Data location can only be specified for array, struct, or mapping types, but "${n}" was given.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidFunctionModifierError"})}}class v extends f{constructor({abiParameter:e}){super("Invalid ABI parameter.",{details:JSON.stringify(e,null,2),metaMessages:["ABI parameter type is invalid."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiTypeParameterError"})}}class w extends f{constructor({signature:e,type:t}){super(`Invalid ${t} signature.`,{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSignatureError"})}}class k extends f{constructor({signature:e}){super("Unknown signature.",{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSignatureError"})}}class x extends f{constructor({signature:e}){super("Invalid struct signature.",{details:e,metaMessages:["No properties exist."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStructSignatureError"})}}class A extends f{constructor({type:e}){super("Circular reference detected.",{metaMessages:[`Struct "${e}" is a circular reference.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CircularReferenceError"})}}class S extends f{constructor({current:e,depth:t}){super("Unbalanced parentheses.",{metaMessages:[`"${e.trim()}" has too many ${t>0?"opening":"closing"} parentheses.`],details:`Depth "${t}"`}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParenthesisError"})}}let I=new Map([["address",{type:"address"}],["bool",{type:"bool"}],["bytes",{type:"bytes"}],["bytes32",{type:"bytes32"}],["int",{type:"int256"}],["int256",{type:"int256"}],["string",{type:"string"}],["uint",{type:"uint256"}],["uint8",{type:"uint8"}],["uint16",{type:"uint16"}],["uint24",{type:"uint24"}],["uint32",{type:"uint32"}],["uint64",{type:"uint64"}],["uint96",{type:"uint96"}],["uint112",{type:"uint112"}],["uint160",{type:"uint160"}],["uint192",{type:"uint192"}],["uint256",{type:"uint256"}],["address owner",{type:"address",name:"owner"}],["address to",{type:"address",name:"to"}],["bool approved",{type:"bool",name:"approved"}],["bytes _data",{type:"bytes",name:"_data"}],["bytes data",{type:"bytes",name:"data"}],["bytes signature",{type:"bytes",name:"signature"}],["bytes32 hash",{type:"bytes32",name:"hash"}],["bytes32 r",{type:"bytes32",name:"r"}],["bytes32 root",{type:"bytes32",name:"root"}],["bytes32 s",{type:"bytes32",name:"s"}],["string name",{type:"string",name:"name"}],["string symbol",{type:"string",name:"symbol"}],["string tokenURI",{type:"string",name:"tokenURI"}],["uint tokenId",{type:"uint256",name:"tokenId"}],["uint8 v",{type:"uint8",name:"v"}],["uint256 balance",{type:"uint256",name:"balance"}],["uint256 tokenId",{type:"uint256",name:"tokenId"}],["uint256 value",{type:"uint256",name:"value"}],["event:address indexed from",{type:"address",name:"from",indexed:!0}],["event:address indexed to",{type:"address",name:"to",indexed:!0}],["event:uint indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}],["event:uint256 indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}]]),T=/^(?[a-zA-Z$_][a-zA-Z0-9$_]*)(?(?:\[\d*?\])+?)?(?:\s(?calldata|indexed|memory|storage{1}))?(?:\s(?[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,E=/^\((?.+?)\)(?(?:\[\d*?\])+?)?(?:\s(?calldata|indexed|memory|storage{1}))?(?:\s(?[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,P=/^u?int$/;function C(e,t){var n,i;let o;let a=function(e,t,n){let r="";if(n)for(let e of Object.entries(n)){if(!e)continue;let t="";for(let n of e[1])t+=`[${n.type}${n.name?`:${n.name}`:""}]`;r+=`(${e[0]}{${t}})`}return t?`${t}:${e}${r}`:e}(e,t?.type,t?.structs);if(I.has(a))return I.get(a);let s=r.cN.test(e),u=(0,r.Zw)(s?E:T,e);if(!u)throw new g({param:e});if(u.name&&("address"===(n=u.name)||"bool"===n||"function"===n||"string"===n||"tuple"===n||r.eL.test(n)||r.lh.test(n)||M.test(n)))throw new y({param:e,name:u.name});let l=u.name?{name:u.name}:{},c="indexed"===u.modifier?{indexed:!0}:{},d=t?.structs??{},f={};if(s){o="tuple";let e=O(u.type),t=[],n=e.length;for(let r=0;r[a-zA-Z$_][a-zA-Z0-9$_]*)(?(?:\[\d*?\])+?)?$/;function L(e){let t=function(e){let t={},n=e.length;for(let i=0;i"type"in e&&"constructor"===e.type);if(!i)throw new z.fM({docsPath:$});if(!("inputs"in i)||!i.inputs||0===i.inputs.length)throw new z.cO({docsPath:$});let o=(0,W.E)(i.inputs,n);return(0,V.SM)([r,o])}var H=n(72460),G=n(95473),Z=n(26704),Y=n(84163),X=n(77342),Q=n(95384),J=n(2291),ee=n(27525),et=n(93358),en=n(75140);async function er(e,t){let{account:r=e.account,batch:i=!!e.batch?.multicall,blockNumber:o,blockTag:a="latest",accessList:s,blobs:u,code:l,data:c,factory:d,factoryData:p,gas:f,gasPrice:h,maxFeePerBlobGas:m,maxFeePerGas:g,maxPriorityFeePerGas:y,nonce:b,to:_,value:v,stateOverride:w,...k}=t,x=r?(0,N.T)(r):void 0;if(l&&(d||p))throw new F.G("Cannot provide both `code` & `factory`/`factoryData` as parameters.");if(l&&_)throw new F.G("Cannot provide both `code` & `to` as parameters.");let A=l&&c,S=d&&p&&_&&c,I=A||S,T=A?function(e){let{code:t,data:n}=e;return K({abi:L(["constructor(bytes, bytes)"]),bytecode:"0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe",args:[t,n]})}({code:l,data:c}):S?function(e){let{data:t,factory:n,factoryData:r,to:i}=e;return K({abi:L(["constructor(address, bytes, address, bytes)"]),bytecode:"0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe",args:[i,t,n,r]})}({data:c,factory:d,factoryData:p,to:_}):c;try{(0,en.F)(t);let n=o?(0,Z.eC)(o):void 0,r=n||a,l=(0,et.mF)(w),c=e.chain?.formatters?.transactionRequest?.format,d=c||J.tG,p=d({...(0,Q.K)(k,{format:c}),from:x?.address,accessList:s,blobs:u,data:T,gas:f,gasPrice:h,maxFeePerBlobGas:m,maxFeePerGas:g,maxPriorityFeePerGas:y,nonce:b,to:I?void 0:_,value:v});if(i&&function({request:e}){let{data:t,to:n,...r}=e;return!(!t||t.startsWith("0x82ad56cb"))&&!!n&&!(Object.values(r).filter(e=>void 0!==e).length>0)}({request:p})&&!l)try{return await ei(e,{...p,blockNumber:o,blockTag:a})}catch(e){if(!(e instanceof q.pZ)&&!(e instanceof q.mm))throw e}let A=await e.request({method:"eth_call",params:l?[p,r,l]:[p,r]});if("0x"===A)return{data:void 0};return{data:A}}catch(a){let r=function(e){if(!(e instanceof F.G))return;let t=e.walk();return"object"==typeof t?.data?t.data?.data:t.data}(a),{offchainLookup:i,offchainLookupSignature:o}=await n.e(120).then(n.bind(n,90120));if(!1!==e.ccipRead&&r?.slice(0,10)===o&&_)return{data:await i(e,{data:r,to:_})};if(I&&"0x101bb98d"===r?.slice(0,10))throw new j.Mo({factory:d});throw function(e,{docsPath:t,...n}){let r=(()=>{let t=(0,X.k)(e,n);return t instanceof Y.cj?e:t})();return new j.cg(r,{docsPath:t,...n})}(a,{...t,account:x,chain:e.chain})}}async function ei(e,t){let{batchSize:n=1024,wait:r=0}="object"==typeof e.batch?.multicall?e.batch.multicall:{},{blockNumber:i,blockTag:o="latest",data:a,multicallAddress:s,to:u}=t,l=s;if(!l){if(!e.chain)throw new q.pZ;l=(0,G.L)({blockNumber:i,chain:e.chain,contract:"multicall3"})}let c=i?(0,Z.eC)(i):void 0,d=c||o,{schedule:p}=(0,ee.S)({id:`${e.uid}.${d}`,wait:r,shouldSplitBatch(e){let t=e.reduce((e,{data:t})=>e+(t.length-2),0);return t>2*n},fn:async t=>{let n=t.map(e=>({allowFailure:!0,callData:e.data,target:e.to})),r=(0,H.R)({abi:D.F8,args:[n],functionName:"aggregate3"}),i=await e.request({method:"eth_call",params:[{data:r,to:l},d]});return(0,U.k)({abi:D.F8,args:[n],functionName:"aggregate3",data:i||"0x"})}}),[{returnData:f,success:h}]=await p({data:a,to:u});if(!h)throw new j.VQ({data:f});return"0x"===f?{data:void 0}:{data:f}}},69047:function(e,t,n){"use strict";n.d(t,{s:function(){return i}});var r=n(26704);async function i(e,{address:t,blockNumber:n,blockTag:i="latest"}){let o=n?(0,r.eC)(n):void 0,a=await e.request({method:"eth_getBalance",params:[t,o||i]});return BigInt(a)}},88490:function(e,t,n){"use strict";n.d(t,{L:function(){return u}});var r=n(22668),i=n(72460),o=n(83461),a=n(72721),s=n(83969);async function u(e,t){let{abi:n,address:u,args:l,functionName:c,...d}=t,p=(0,i.R)({abi:n,args:l,functionName:c});try{let{data:t}=await (0,a.s)(e,s.R,"call")({...d,data:p,to:u});return(0,r.k)({abi:n,args:l,functionName:c,data:t||"0x"})}catch(e){throw(0,o.S)(e,{abi:n,address:u,args:l,docsPath:"/docs/contract/readContract",functionName:c})}}},93073:function(e,t,n){"use strict";n.d(t,{R:function(){return i}});var r=n(18053);let i=(0,r.a)({id:1,name:"Ethereum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://cloudflare-eth.com"]}},blockExplorers:{default:{name:"Etherscan",url:"https://etherscan.io",apiUrl:"https://api.etherscan.io/api"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0xce01f8eee7E479C928F8919abD53E553a36CeF67",blockCreated:19258213},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}})},41070:function(e,t,n){"use strict";n.d(t,{v:function(){return M}});var r=n(60449),i=n(74678),o=n(88266),a=n(39892);let s={block:(0,i.G)({format(e){let t=e.transactions?.map(e=>{if("string"==typeof e)return e;let t=(0,o.Tr)(e);return"0x7e"===t.typeHex&&(t.isSystemTx=e.isSystemTx,t.mint=e.mint?(0,r.y_)(e.mint):void 0,t.sourceHash=e.sourceHash,t.type="deposit"),t});return{transactions:t,stateRoot:e.stateRoot}}}),transaction:(0,o.y_)({format(e){let t={};return"0x7e"===e.type&&(t.isSystemTx=e.isSystemTx,t.mint=e.mint?(0,r.y_)(e.mint):void 0,t.sourceHash=e.sourceHash,t.type="deposit"),t}}),transactionReceipt:(0,a.dI)({format:e=>({l1GasPrice:e.l1GasPrice?(0,r.y_)(e.l1GasPrice):null,l1GasUsed:e.l1GasUsed?(0,r.y_)(e.l1GasUsed):null,l1Fee:e.l1Fee?(0,r.y_)(e.l1Fee):null,l1FeeScalar:e.l1FeeScalar?Number(e.l1FeeScalar):null})})};var u=n(20230),l=n(93408),c=n(77644),d=n(26704),p=n(4900),f=n(28697),h=n(65072),m=n(68053),g=n(89515),y=n(39914),b=n(52266),_=n(25549),v=n(5272),w=n(76382),k=n(4157),x=n(65315),A=n(84163),S=n(77476),I=n(43525);function T(e){let{chainId:t,maxPriorityFeePerGas:n,maxFeePerGas:r,to:i}=e;if(t<=0)throw new x.hJ({chainId:t});if(i&&!(0,l.U)(i))throw new u.b({address:i});if(r&&r>v.zL)throw new A.Hh({maxFeePerGas:r});if(n&&r&&n>r)throw new A.cs({maxFeePerGas:r,maxPriorityFeePerGas:n})}var E=n(35641);function P(e){if(!e||0===e.length)return[];let t=[];for(let n=0;nv.zL)throw new A.Hh({maxFeePerGas:r})}(e);let m=P(f),g=[(0,d.NC)(n),o?(0,d.NC)(o):"0x",h?(0,d.NC)(h):"0x",r?(0,d.NC)(r):"0x",a??"0x",s?(0,d.NC)(s):"0x",i??"0x",m,...C(e,t)];return(0,c.SM)(["0x01",(0,p.LV)(g)])}(e,t):"eip4844"===n?function(e,t){let{chainId:n,gas:i,nonce:o,to:a,value:s,maxFeePerBlobGas:u,maxFeePerGas:l,maxPriorityFeePerGas:f,accessList:b,data:v}=e;!function(e){let{blobVersionedHashes:t}=e;if(t){if(0===t.length)throw new k.RX;for(let e of t){let t=(0,S.d)(e),n=(0,r.ly)((0,I.tP)(e,0,1));if(32!==t)throw new k.xd({hash:e,size:t});if(n!==_.l)throw new k.cJ({hash:e,version:n})}}T(e)}(e);let w=e.blobVersionedHashes,x=e.sidecars;if(e.blobs&&(void 0===w||void 0===x)){let t="string"==typeof e.blobs[0]?e.blobs:e.blobs.map(e=>(0,d.ci)(e)),n=e.kzg,r=(0,h.P)({blobs:t,kzg:n});if(void 0===w&&(w=(0,g.C)({commitments:r})),void 0===x){let e=(0,m.y)({blobs:t,commitments:r,kzg:n});x=(0,y.j)({blobs:t,commitments:r,proofs:e})}}let A=P(b),E=[(0,d.NC)(n),o?(0,d.NC)(o):"0x",f?(0,d.NC)(f):"0x",l?(0,d.NC)(l):"0x",i?(0,d.NC)(i):"0x",a??"0x",s?(0,d.NC)(s):"0x",v??"0x",A,u?(0,d.NC)(u):"0x",w??[],...C(e,t)],O=[],B=[],M=[];if(x)for(let e=0;ev.zL)throw new A.Hh({maxFeePerGas:r})}(e);let h=[o?(0,d.NC)(o):"0x",c?(0,d.NC)(c):"0x",r?(0,d.NC)(r):"0x",a??"0x",s?(0,d.NC)(s):"0x",i??"0x"];if(t){let e=(()=>{if(t.v>=35n){let e=(t.v-35n)/2n;return e>0?t.v:27n+(35n===t.v?0n:1n)}if(n>0)return BigInt(2*n)+BigInt(35n+t.v-27n);let e=27n+(27n===t.v?0n:1n);if(t.v!==e)throw new f.vl({v:t.v});return e})(),r=(0,b.f)(t.r),i=(0,b.f)(t.s);h=[...h,(0,d.NC)(e),"0x00"===r?"0x":r,"0x00"===i?"0x":i]}else n>0&&(h=[...h,(0,d.NC)(n),"0x","0x"]);return(0,p.LV)(h)}(e,t)}(e,t)}}};var B=n(18053);let M=(0,B.a)({...O,id:10,name:"OP Mainnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.optimism.io"]}},blockExplorers:{default:{name:"Optimism Explorer",url:"https://optimistic.etherscan.io",apiUrl:"https://api-optimistic.etherscan.io/api"}},contracts:{...O.contracts,disputeGameFactory:{1:{address:"0xe5965Ab5962eDc7477C8520243A95517CD252fA9"}},l2OutputOracle:{1:{address:"0xdfe97868233d1aa22e815a266982f2cf17685a27"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:4286263},portal:{1:{address:"0xbEb5Fc579115071764c7423A4f12eDde41f106Ed"}},l1StandardBridge:{1:{address:"0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1"}}},sourceId:1})},53116:function(e,t,n){"use strict";n.d(t,{N:function(){return i}});var r=n(18053);let i=(0,r.a)({id:1329,name:"Sei Network",nativeCurrency:{name:"Sei",symbol:"SEI",decimals:18},rpcUrls:{default:{http:["https://evm-rpc.sei-apis.com/"],webSocket:["wss://evm-ws.sei-apis.com/"]}},blockExplorers:{default:{name:"Seitrace",url:"https://seitrace.com",apiUrl:"https://seitrace.com/pacific-1/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11"}}})},43450:function(e,t,n){"use strict";n.d(t,{e:function(){return o}});var r=n(17509),i=n(32939);function o(e){let{batch:t,cacheTime:n=e.pollingInterval??4e3,ccipRead:o,key:a="base",name:s="Base Client",pollingInterval:u=4e3,type:l="base"}=e,c=e.chain,d=e.account?(0,r.T)(e.account):void 0,{config:p,request:f,value:h}=e.transport({chain:c,pollingInterval:u}),m={...p,...h},g={account:d,batch:t,cacheTime:n,ccipRead:o,chain:c,key:a,name:s,pollingInterval:u,request:f,transport:m,type:l,uid:(0,i.h)()};return Object.assign(g,{extend:function e(t){return n=>{let r=n(t);for(let e in g)delete r[e];let i={...t,...r};return Object.assign(i,{extend:e(i)})}}(g)})}},87514:function(e,t,n){"use strict";n.d(t,{q:function(){return f}});var r=n(76382),i=n(76929),o=n(66491),a=n(26704),s=n(87787),u=n(57584);let l=new u.k(8192);var c=n(73984),d=n(91159),p=n(32939);function f({key:e,name:t,request:n,retryCount:u=3,retryDelay:f=150,timeout:h,type:m},g){let y=(0,p.h)();return{config:{key:e,name:t,request:n,retryCount:u,retryDelay:f,timeout:h,type:m},request:function(e,t={}){return async(n,u={})=>{let{dedupe:p=!1,retryDelay:f=150,retryCount:h=3,uid:m}={...t,...u},g=p?(0,s.w)((0,a.$G)(`${m}.${(0,d.P)(n)}`)):void 0;return function(e,{enabled:t=!0,id:n}){if(!t||!n)return e();if(l.get(n))return l.get(n);let r=e().finally(()=>l.delete(n));return l.set(n,r),r}(()=>(0,c.J)(async()=>{try{return await e(n)}catch(e){switch(e.code){case o.s7.code:throw new o.s7(e);case o.B.code:throw new o.B(e);case o.LX.code:throw new o.LX(e,{method:n.method});case o.nY.code:throw new o.nY(e);case o.XS.code:throw new o.XS(e);case o.yR.code:throw new o.yR(e);case o.Og.code:throw new o.Og(e);case o.pT.code:throw new o.pT(e);case o.KB.code:throw new o.KB(e);case o.gS.code:throw new o.gS(e,{method:n.method});case o.Pv.code:throw new o.Pv(e);case o.GD.code:throw new o.GD(e);case o.ab.code:throw new o.ab(e);case o.PE.code:throw new o.PE(e);case o.Ts.code:throw new o.Ts(e);case o.u5.code:throw new o.u5(e);case o.I0.code:throw new o.I0(e);case o.x3.code:throw new o.x3(e);case 5e3:throw new o.ab(e);default:if(e instanceof r.G)throw e;throw new o.ir(e)}}},{delay:({count:e,error:t})=>{if(t&&t instanceof i.Gg){let e=t?.headers?.get("Retry-After");if(e?.match(/\d/))return 1e3*Number.parseInt(e)}return~~(1<"code"in e&&"number"==typeof e.code?-1===e.code||e.code===o.Pv.code||e.code===o.XS.code:!(e instanceof i.Gg)||!e.status||403===e.status||408===e.status||413===e.status||429===e.status||500===e.status||502===e.status||503===e.status||504===e.status}),{enabled:p,id:g})}}(n,{retryCount:u,retryDelay:f,uid:y}),value:g}}},57290:function(e,t,n){"use strict";n.d(t,{F8:function(){return r},Hr:function(){return l},Wo:function(){return u},du:function(){return a},k3:function(){return o},nZ:function(){return s}});let r=[{inputs:[{components:[{name:"target",type:"address"},{name:"allowFailure",type:"bool"},{name:"callData",type:"bytes"}],name:"calls",type:"tuple[]"}],name:"aggregate3",outputs:[{components:[{name:"success",type:"bool"},{name:"returnData",type:"bytes"}],name:"returnData",type:"tuple[]"}],stateMutability:"view",type:"function"}],i=[{inputs:[],name:"ResolverNotFound",type:"error"},{inputs:[],name:"ResolverWildcardNotSupported",type:"error"},{inputs:[],name:"ResolverNotContract",type:"error"},{inputs:[{name:"returnData",type:"bytes"}],name:"ResolverError",type:"error"},{inputs:[{components:[{name:"status",type:"uint16"},{name:"message",type:"string"}],name:"errors",type:"tuple[]"}],name:"HttpError",type:"error"}],o=[...i,{name:"resolve",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]},{name:"resolve",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"},{name:"gateways",type:"string[]"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]}],a=[...i,{name:"reverse",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolvedAddress"},{type:"address",name:"reverseResolver"},{type:"address",name:"resolver"}]},{name:"reverse",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"},{type:"string[]",name:"gateways"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolvedAddress"},{type:"address",name:"reverseResolver"},{type:"address",name:"resolver"}]}],s=[{name:"text",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"key",type:"string"}],outputs:[{name:"",type:"string"}]}],u=[{type:"event",name:"Approval",inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"event",name:"Transfer",inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"function",name:"allowance",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"approve",stateMutability:"nonpayable",inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]},{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"decimals",stateMutability:"view",inputs:[],outputs:[{type:"uint8"}]},{type:"function",name:"name",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{type:"function",name:"totalSupply",stateMutability:"view",inputs:[],outputs:[{type:"uint256"}]},{type:"function",name:"transfer",stateMutability:"nonpayable",inputs:[{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]},{type:"function",name:"transferFrom",stateMutability:"nonpayable",inputs:[{name:"sender",type:"address"},{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]}],l=[{type:"event",name:"Approval",inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!0,name:"tokenId",type:"uint256"}]},{type:"event",name:"ApprovalForAll",inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"operator",type:"address"},{indexed:!1,name:"approved",type:"bool"}]},{type:"event",name:"Transfer",inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!0,name:"tokenId",type:"uint256"}]},{type:"function",name:"approve",stateMutability:"payable",inputs:[{name:"spender",type:"address"},{name:"tokenId",type:"uint256"}],outputs:[]},{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"getApproved",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{type:"address"}]},{type:"function",name:"isApprovedForAll",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"operator",type:"address"}],outputs:[{type:"bool"}]},{type:"function",name:"name",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{type:"function",name:"ownerOf",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{name:"owner",type:"address"}]},{type:"function",name:"safeTransferFrom",stateMutability:"payable",inputs:[{name:"from",type:"address"},{name:"to",type:"address"},{name:"tokenId",type:"uint256"}],outputs:[]},{type:"function",name:"safeTransferFrom",stateMutability:"nonpayable",inputs:[{name:"from",type:"address"},{name:"to",type:"address"},{name:"id",type:"uint256"},{name:"data",type:"bytes"}],outputs:[]},{type:"function",name:"setApprovalForAll",stateMutability:"nonpayable",inputs:[{name:"operator",type:"address"},{name:"approved",type:"bool"}],outputs:[]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{type:"function",name:"tokenByIndex",stateMutability:"view",inputs:[{name:"index",type:"uint256"}],outputs:[{type:"uint256"}]},{type:"function",name:"tokenByIndex",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"index",type:"uint256"}],outputs:[{name:"tokenId",type:"uint256"}]},{type:"function",name:"tokenURI",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{type:"string"}]},{type:"function",name:"totalSupply",stateMutability:"view",inputs:[],outputs:[{type:"uint256"}]},{type:"function",name:"transferFrom",stateMutability:"payable",inputs:[{name:"sender",type:"address"},{name:"recipient",type:"address"},{name:"tokeId",type:"uint256"}],outputs:[]}]},16546:function(e,t,n){"use strict";n.d(t,{DR:function(){return r}});let r="0x0000000000000000000000000000000000000000"},25549:function(e,t,n){"use strict";n.d(t,{l:function(){return r}});let r=1},5272:function(e,t,n){"use strict";n.d(t,{zL:function(){return r}});let r=2n**256n-1n},51687:function(e,t,n){"use strict";n.d(t,{$:function(){return r},Up:function(){return i},hZ:function(){return o}});let r={1:"An `assert` condition failed.",17:"Arithmetic operation resulted in underflow or overflow.",18:"Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).",33:"Attempted to convert to an invalid type.",34:"Attempted to access a storage byte array that is incorrectly encoded.",49:"Performed `.pop()` on an empty array",50:"Array index is out of bounds.",65:"Allocated too much memory or created an array which is too large.",81:"Attempted to call a zero-initialized variable of internal function type."},i={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},o={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"}},71260:function(e,t,n){"use strict";n.d(t,{Bd:function(){return o},Zn:function(){return i},ez:function(){return r}});let r={gwei:9,wei:18},i={ether:-9,wei:9},o={ether:-18,gwei:-9}},8008:function(e,t,n){"use strict";n.d(t,{CI:function(){return x},FM:function(){return h},Gy:function(){return w},M4:function(){return d},MX:function(){return y},S4:function(){return _},SM:function(){return v},cO:function(){return s},dh:function(){return k},eF:function(){return b},fM:function(){return a},fs:function(){return p},gr:function(){return c},hn:function(){return A},lC:function(){return m},wM:function(){return S},wb:function(){return l},xB:function(){return u},xL:function(){return g},yP:function(){return f}});var r=n(28789),i=n(77476),o=n(76382);class a extends o.G{constructor({docsPath:e}){super("A constructor was not found on the ABI.\nMake sure you are using the correct ABI and that the constructor exists on it.",{docsPath:e,name:"AbiConstructorNotFoundError"})}}class s extends o.G{constructor({docsPath:e}){super("Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.\nMake sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists.",{docsPath:e,name:"AbiConstructorParamsNotFoundError"})}}class u extends o.G{constructor({data:e,params:t,size:n}){super(`Data size of ${n} bytes is too small for given parameters.`,{metaMessages:[`Params: (${(0,r.h)(t,{includeName:!0})})`,`Data: ${e} (${n} bytes)`],name:"AbiDecodingDataSizeTooSmallError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=e,this.params=t,this.size=n}}class l extends o.G{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.',{name:"AbiDecodingZeroDataError"})}}class c extends o.G{constructor({expectedLength:e,givenLength:t,type:n}){super(`ABI encoding array length mismatch for type ${n}. Expected length: ${e} Given length: ${t}`,{name:"AbiEncodingArrayLengthMismatchError"})}}class d extends o.G{constructor({expectedSize:e,value:t}){super(`Size of bytes "${t}" (bytes${(0,i.d)(t)}) does not match expected size (bytes${e}).`,{name:"AbiEncodingBytesSizeMismatchError"})}}class p extends o.G{constructor({expectedLength:e,givenLength:t}){super(`ABI encoding params/values length mismatch. Expected length (params): ${e} Given length (values): ${t}`,{name:"AbiEncodingLengthMismatchError"})}}class f extends o.G{constructor(e,{docsPath:t}){super(`Encoded error signature "${e}" not found on ABI. Make sure you are using the correct ABI and that the error exists on it. You can look up the decoded signature here: https://openchain.xyz/signatures?query=${e}.`,{docsPath:t,name:"AbiErrorSignatureNotFoundError"}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.signature=e}}class h extends o.G{constructor({docsPath:e}){super("Cannot extract event signature from empty topics.",{docsPath:e,name:"AbiEventSignatureEmptyTopicsError"})}}class m extends o.G{constructor(e,{docsPath:t}){super(`Encoded event signature "${e}" not found on ABI. Make sure you are using the correct ABI and that the event exists on it. You can look up the signature here: https://openchain.xyz/signatures?query=${e}.`,{docsPath:t,name:"AbiEventSignatureNotFoundError"})}}class g extends o.G{constructor(e,{docsPath:t}={}){super(`Function ${e?`"${e}" `:""}not found on ABI. Make sure you are using the correct ABI and that the function exists on it.`,{docsPath:t,name:"AbiFunctionNotFoundError"})}}class y extends o.G{constructor(e,{docsPath:t}){super(`Function "${e}" does not contain any \`outputs\` on ABI. Cannot decode function result without knowing what the parameter types are. Make sure you are using the correct ABI and that the function exists on it.`,{docsPath:t,name:"AbiFunctionOutputsNotFoundError"})}}class b extends o.G{constructor(e,{docsPath:t}){super(`Encoded function signature "${e}" not found on ABI. Make sure you are using the correct ABI and that the function exists on it. You can look up the signature here: https://openchain.xyz/signatures?query=${e}.`,{docsPath:t,name:"AbiFunctionSignatureNotFoundError"})}}class _ extends o.G{constructor(e,t){super("Found ambiguous types in overloaded ABI items.",{metaMessages:[`\`${e.type}\` in \`${(0,r.t)(e.abiItem)}\`, and`,`\`${t.type}\` in \`${(0,r.t)(t.abiItem)}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."],name:"AbiItemAmbiguityError"})}}class v extends o.G{constructor({abiItem:e,data:t,params:n,size:i}){super(`Data size of ${i} bytes is too small for non-indexed event parameters.`,{metaMessages:[`Params: (${(0,r.h)(n,{includeName:!0})})`,`Data: ${t} (${i} bytes)`],name:"DecodeLogDataMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=e,this.data=t,this.params=n,this.size=i}}class w extends o.G{constructor({abiItem:e,param:t}){super(`Expected a topic for indexed event parameter${t.name?` "${t.name}"`:""} on event "${(0,r.t)(e,{includeName:!0})}".`,{name:"DecodeLogTopicsMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=e}}class k extends o.G{constructor(e,{docsPath:t}){super(`Type "${e}" is not a valid encoding type. Please provide a valid ABI type.`,{docsPath:t,name:"InvalidAbiEncodingType"})}}class x extends o.G{constructor(e,{docsPath:t}){super(`Type "${e}" is not a valid decoding type. Please provide a valid ABI type.`,{docsPath:t,name:"InvalidAbiDecodingType"})}}class A extends o.G{constructor(e){super(`Value "${e}" is not a valid array.`,{name:"InvalidArrayError"})}}class S extends o.G{constructor(e){super(`"${e}" is not a valid definition type. Valid types: "function", "event", "error"`,{name:"InvalidDefinitionTypeError"})}}},20230:function(e,t,n){"use strict";n.d(t,{b:function(){return i}});var r=n(76382);class i extends r.G{constructor({address:e}){super(`Address "${e}" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."],name:"InvalidAddressError"})}}},76382:function(e,t,n){"use strict";n.d(t,{G:function(){return o}});let r="2.21.56",i={getDocsUrl:({docsBaseUrl:e,docsPath:t="",docsSlug:n})=>t?`${e??"https://viem.sh"}${t}${n?`#${n}`:""}`:void 0,version:`viem@${r}`};class o extends Error{constructor(e,t={}){let n=t.cause instanceof o?t.cause.details:t.cause?.message?t.cause.message:t.details,a=t.cause instanceof o&&t.cause.docsPath||t.docsPath,s=i.getDocsUrl?.({...t,docsPath:a}),u=[e||"An error occurred.","",...t.metaMessages?[...t.metaMessages,""]:[],...s?[`Docs: ${s}`]:[],...n?[`Details: ${n}`]:[],...i.version?[`Version: ${i.version}`]:[]].join("\n");super(u,t.cause?{cause:t.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.details=n,this.docsPath=a,this.metaMessages=t.metaMessages,this.name=t.name??this.name,this.shortMessage=e,this.version=r}walk(e){return function e(t,n){return n?.(t)?t:t&&"object"==typeof t&&"cause"in t&&void 0!==t.cause?e(t.cause,n):n?null:t}(this,e)}}},4157:function(e,t,n){"use strict";n.d(t,{RX:function(){return a},cJ:function(){return u},m7:function(){return o},xd:function(){return s}});var r=n(25549),i=n(76382);class o extends i.G{constructor({maxSize:e,size:t}){super("Blob size is too large.",{metaMessages:[`Max: ${e} bytes`,`Given: ${t} bytes`],name:"BlobSizeTooLargeError"})}}class a extends i.G{constructor(){super("Blob data must not be empty.",{name:"EmptyBlobError"})}}class s extends i.G{constructor({hash:e,size:t}){super(`Versioned hash "${e}" size is invalid.`,{metaMessages:["Expected: 32",`Received: ${t}`],name:"InvalidVersionedHashSizeError"})}}class u extends i.G{constructor({hash:e,version:t}){super(`Versioned hash "${e}" version is invalid.`,{metaMessages:[`Expected: ${r.l}`,`Received: ${t}`],name:"InvalidVersionedHashVersionError"})}}},65315:function(e,t,n){"use strict";n.d(t,{Bk:function(){return a},Yl:function(){return o},hJ:function(){return u},mm:function(){return i},pZ:function(){return s}});var r=n(76382);class i extends r.G{constructor({blockNumber:e,chain:t,contract:n}){super(`Chain "${t.name}" does not support contract "${n.name}".`,{metaMessages:["This could be due to any of the following:",...e&&n.blockCreated&&n.blockCreated>e?[`- The contract "${n.name}" was not deployed until block ${n.blockCreated} (current block ${e}).`]:[`- The chain does not have the contract "${n.name}" configured.`]],name:"ChainDoesNotSupportContract"})}}class o extends r.G{constructor({chain:e,currentChainId:t}){super(`The current chain of the wallet (id: ${t}) does not match the target chain for the transaction (id: ${e.id} – ${e.name}).`,{metaMessages:[`Current Chain ID: ${t}`,`Expected Chain ID: ${e.id} – ${e.name}`],name:"ChainMismatchError"})}}class a extends r.G{constructor(){super("No chain was provided to the request.\nPlease provide a chain with the `chain` argument on the Action, or by supplying a `chain` to WalletClient.",{name:"ChainNotFoundError"})}}class s extends r.G{constructor(){super("No chain was provided to the Client.",{name:"ClientChainNotConfiguredError"})}}class u extends r.G{constructor({chainId:e}){super("number"==typeof e?`Chain ID "${e}" is invalid.`:"Chain ID is invalid.",{name:"InvalidChainIdError"})}}},24014:function(e,t,n){"use strict";n.d(t,{cg:function(){return y},uq:function(){return b},Lu:function(){return _},Dk:function(){return v},Mo:function(){return w},VQ:function(){return k}});var r=n(17509),i=n(51687),o=n(54796),a=n(28789),s=n(91159);function u({abiItem:e,args:t,includeFunctionName:n=!0,includeName:r=!1}){if("name"in e&&"inputs"in e&&e.inputs)return`${n?e.name:""}(${e.inputs.map((e,n)=>`${r&&e.name?`${e.name}: `:""}${"object"==typeof t[n]?(0,s.P)(t[n]):t[n]}`).join(", ")})`}var l=n(55578),c=n(31986),d=n(46885),p=n(8008),f=n(76382),h=n(74681),m=n(28697),g=n(23706);class y extends f.G{constructor(e,{account:t,docsPath:n,chain:i,data:o,gas:a,gasPrice:s,maxFeePerGas:u,maxPriorityFeePerGas:l,nonce:p,to:f,value:g,stateOverride:y}){let b=t?(0,r.T)(t):void 0,_=(0,m.xr)({from:b?.address,to:f,value:void 0!==g&&`${(0,c.d)(g)} ${i?.nativeCurrency?.symbol||"ETH"}`,data:o,gas:a,gasPrice:void 0!==s&&`${(0,d.o)(s)} gwei`,maxFeePerGas:void 0!==u&&`${(0,d.o)(u)} gwei`,maxPriorityFeePerGas:void 0!==l&&`${(0,d.o)(l)} gwei`,nonce:p});y&&(_+=` ${(0,h.Bj)(y)}`),super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Raw Call Arguments:",_].filter(Boolean),name:"CallExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=e}}class b extends f.G{constructor(e,{abi:t,args:n,contractAddress:r,docsPath:i,functionName:o,sender:s}){let c=(0,l.mE)({abi:t,args:n,name:o}),d=c?u({abiItem:c,args:n,includeFunctionName:!1,includeName:!1}):void 0,p=c?(0,a.t)(c,{includeName:!0}):void 0,f=(0,m.xr)({address:r&&(0,g.C)(r),function:p,args:d&&"()"!==d&&`${[...Array(o?.length??0).keys()].map(()=>" ").join("")}${d}`,sender:s});super(e.shortMessage||`An unknown error occurred while executing the contract function "${o}".`,{cause:e,docsPath:i,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],f&&"Contract Call:",f].filter(Boolean),name:"ContractFunctionExecutionError"}),Object.defineProperty(this,"abi",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"args",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"contractAddress",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"formattedArgs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"functionName",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sender",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abi=t,this.args=n,this.cause=e,this.contractAddress=r,this.functionName=o,this.sender=s}}class _ extends f.G{constructor({abi:e,data:t,functionName:n,message:r}){let s,l,c,d,f;if(t&&"0x"!==t)try{f=(0,o.p)({abi:e,data:t});let{abiItem:n,errorName:r,args:s}=f;if("Error"===r)c=s[0];else if("Panic"===r){let[e]=s;c=i.$[e]}else{let e=n?(0,a.t)(n,{includeName:!0}):void 0,t=n&&s?u({abiItem:n,args:s,includeFunctionName:!1,includeName:!1}):void 0;l=[e?`Error: ${e}`:"",t&&"()"!==t?` ${[...Array(r?.length??0).keys()].map(()=>" ").join("")}${t}`:""]}}catch(e){s=e}else r&&(c=r);s instanceof p.yP&&(l=[`Unable to decode signature "${d=s.signature}" as it was not found on the provided ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${d}.`]),super(c&&"execution reverted"!==c||d?[`The contract function "${n}" reverted with the following ${d?"signature":"reason"}:`,c||d].join("\n"):`The contract function "${n}" reverted.`,{cause:s,metaMessages:l,name:"ContractFunctionRevertedError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"reason",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=f,this.reason=c,this.signature=d}}class v extends f.G{constructor({functionName:e}){super(`The contract function "${e}" returned no data ("0x").`,{metaMessages:["This could be due to any of the following:",` - The contract does not have the function "${e}",`," - The parameters passed to the contract function may be invalid, or"," - The address is not a contract."],name:"ContractFunctionZeroDataError"})}}class w extends f.G{constructor({factory:e}){super(`Deployment for counterfactual contract call failed${e?` for factory "${e}".`:""}`,{metaMessages:["Please ensure:","- The `factory` is a valid contract deployment factory (ie. Create2 Factory, ERC-4337 Factory, etc).","- The `factoryData` is a valid encoded function call for contract deployment function on the factory."],name:"CounterfactualDeploymentFailedError"})}}class k extends f.G{constructor({data:e,message:t}){super(t||"",{name:"RawContractError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=e}}},25383:function(e,t,n){"use strict";n.d(t,{KD:function(){return a},T_:function(){return i},lQ:function(){return o}});var r=n(76382);class i extends r.G{constructor({offset:e}){super(`Offset \`${e}\` cannot be negative.`,{name:"NegativeOffsetError"})}}class o extends r.G{constructor({length:e,position:t}){super(`Position \`${t}\` is out of bounds (\`0 < position < ${e}\`).`,{name:"PositionOutOfBoundsError"})}}class a extends r.G{constructor({count:e,limit:t}){super(`Recursive read limit of \`${t}\` exceeded (recursive read count: \`${e}\`).`,{name:"RecursiveReadLimitExceededError"})}}},83305:function(e,t,n){"use strict";n.d(t,{$s:function(){return o},W_:function(){return a},mV:function(){return i}});var r=n(76382);class i extends r.G{constructor({offset:e,position:t,size:n}){super(`Slice ${"start"===t?"starting":"ending"} at offset "${e}" is out-of-bounds (size: ${n}).`,{name:"SliceOffsetOutOfBoundsError"})}}class o extends r.G{constructor({size:e,targetSize:t,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} size (${e}) exceeds padding size (${t}).`,{name:"SizeExceedsPaddingSizeError"})}}class a extends r.G{constructor({size:e,targetSize:t,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} is expected to be ${t} ${n} long, but is ${e} ${n} long.`,{name:"InvalidBytesLengthError"})}}},87694:function(e,t,n){"use strict";n.d(t,{J5:function(){return i},M6:function(){return a},yr:function(){return o}});var r=n(76382);class i extends r.G{constructor({max:e,min:t,signed:n,size:r,value:i}){super(`Number "${i}" is not in safe ${r?`${8*r}-bit ${n?"signed":"unsigned"} `:""}integer range ${e?`(${t} to ${e})`:`(above ${t})`}`,{name:"IntegerOutOfRangeError"})}}class o extends r.G{constructor(e){super(`Bytes value "${e}" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`,{name:"InvalidBytesBooleanError"})}}class a extends r.G{constructor({givenSize:e,maxSize:t}){super(`Size cannot exceed ${t} bytes. Given size: ${e} bytes.`,{name:"SizeOverflowError"})}}},84163:function(e,t,n){"use strict";n.d(t,{C_:function(){return d},G$:function(){return s},Hh:function(){return a},M_:function(){return o},WF:function(){return p},ZI:function(){return u},cj:function(){return g},cs:function(){return m},dR:function(){return f},pZ:function(){return h},se:function(){return c},vU:function(){return l}});var r=n(46885),i=n(76382);class o extends i.G{constructor({cause:e,message:t}={}){let n=t?.replace("execution reverted: ","")?.replace("execution reverted","");super(`Execution reverted ${n?`with reason: ${n}`:"for an unknown reason"}.`,{cause:e,name:"ExecutionRevertedError"})}}Object.defineProperty(o,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(o,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted/});class a extends i.G{constructor({cause:e,maxFeePerGas:t}={}){super(`The fee cap (\`maxFeePerGas\`${t?` = ${(0,r.o)(t)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:e,name:"FeeCapTooHighError"})}}Object.defineProperty(a,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/});class s extends i.G{constructor({cause:e,maxFeePerGas:t}={}){super(`The fee cap (\`maxFeePerGas\`${t?` = ${(0,r.o)(t)}`:""} gwei) cannot be lower than the block base fee.`,{cause:e,name:"FeeCapTooLowError"})}}Object.defineProperty(s,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/});class u extends i.G{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}is higher than the next one expected.`,{cause:e,name:"NonceTooHighError"})}}Object.defineProperty(u,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class l extends i.G{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}is lower than the current nonce of the account. Try increasing the nonce or find the latest nonce with \`getTransactionCount\`.`,{cause:e,name:"NonceTooLowError"})}}Object.defineProperty(l,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});class c extends i.G{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}exceeds the maximum allowed nonce.`,{cause:e,name:"NonceMaxValueError"})}}Object.defineProperty(c,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});class d extends i.G{constructor({cause:e}={}){super("The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account.",{cause:e,metaMessages:["This error could arise when the account does not have enough funds to:"," - pay for the total gas fee,"," - pay for the value to send."," ","The cost of the transaction is calculated as `gas * gas fee + value`, where:"," - `gas` is the amount of gas needed for transaction to execute,"," - `gas fee` is the gas fee,"," - `value` is the amount of ether to send to the recipient."],name:"InsufficientFundsError"})}}Object.defineProperty(d,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds|exceeds transaction sender account balance/});class p extends i.G{constructor({cause:e,gas:t}={}){super(`The amount of gas ${t?`(${t}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:e,name:"IntrinsicGasTooHighError"})}}Object.defineProperty(p,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});class f extends i.G{constructor({cause:e,gas:t}={}){super(`The amount of gas ${t?`(${t}) `:""}provided for the transaction is too low.`,{cause:e,name:"IntrinsicGasTooLowError"})}}Object.defineProperty(f,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});class h extends i.G{constructor({cause:e}){super("The transaction type is not supported for this chain.",{cause:e,name:"TransactionTypeNotSupportedError"})}}Object.defineProperty(h,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});class m extends i.G{constructor({cause:e,maxPriorityFeePerGas:t,maxFeePerGas:n}={}){super(`The provided tip (\`maxPriorityFeePerGas\`${t?` = ${(0,r.o)(t)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${n?` = ${(0,r.o)(n)} gwei`:""}).`,{cause:e,name:"TipAboveFeeCapError"})}}Object.defineProperty(m,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});class g extends i.G{constructor({cause:e}){super(`An error occurred while executing: ${e?.shortMessage}`,{cause:e,name:"UnknownNodeError"})}}},76929:function(e,t,n){"use strict";n.d(t,{Gg:function(){return a},W5:function(){return u},bs:function(){return s}});var r=n(91159),i=n(76382),o=n(23706);class a extends i.G{constructor({body:e,cause:t,details:n,headers:i,status:a,url:s}){super("HTTP request failed.",{cause:t,details:n,metaMessages:[a&&`Status: ${a}`,`URL: ${(0,o.G)(s)}`,e&&`Request body: ${(0,r.P)(e)}`].filter(Boolean),name:"HttpRequestError"}),Object.defineProperty(this,"body",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"headers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.body=e,this.headers=i,this.status=a,this.url=s}}class s extends i.G{constructor({body:e,error:t,url:n}){super("RPC Request failed.",{cause:t,details:t.message,metaMessages:[`URL: ${(0,o.G)(n)}`,`Request body: ${(0,r.P)(e)}`],name:"RpcRequestError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=t.code}}class u extends i.G{constructor({body:e,url:t}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${(0,o.G)(t)}`,`Request body: ${(0,r.P)(e)}`],name:"TimeoutError"})}}},66491:function(e,t,n){"use strict";n.d(t,{B:function(){return u},GD:function(){return b},I0:function(){return x},KB:function(){return m},LX:function(){return l},Og:function(){return f},PE:function(){return v},Pv:function(){return y},Ts:function(){return w},XS:function(){return d},ab:function(){return _},gS:function(){return g},ir:function(){return S},nY:function(){return c},pT:function(){return h},s7:function(){return s},u5:function(){return k},x3:function(){return A},yR:function(){return p}});var r=n(76382),i=n(76929);class o extends r.G{constructor(e,{code:t,docsPath:n,metaMessages:r,name:o,shortMessage:a}){super(a,{cause:e,docsPath:n,metaMessages:r||e?.metaMessages,name:o||"RpcError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=o||e.name,this.code=e instanceof i.bs?e.code:t??-1}}class a extends o{constructor(e,t){super(e,t),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=t.data}}class s extends o{constructor(e){super(e,{code:s.code,name:"ParseRpcError",shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."})}}Object.defineProperty(s,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700});class u extends o{constructor(e){super(e,{code:u.code,name:"InvalidRequestRpcError",shortMessage:"JSON is not a valid request object."})}}Object.defineProperty(u,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600});class l extends o{constructor(e,{method:t}={}){super(e,{code:l.code,name:"MethodNotFoundRpcError",shortMessage:`The method${t?` "${t}"`:""} does not exist / is not available.`})}}Object.defineProperty(l,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601});class c extends o{constructor(e){super(e,{code:c.code,name:"InvalidParamsRpcError",shortMessage:"Invalid parameters were provided to the RPC method.\nDouble check you have provided the correct parameters."})}}Object.defineProperty(c,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602});class d extends o{constructor(e){super(e,{code:d.code,name:"InternalRpcError",shortMessage:"An internal error was received."})}}Object.defineProperty(d,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603});class p extends o{constructor(e){super(e,{code:p.code,name:"InvalidInputRpcError",shortMessage:"Missing or invalid parameters.\nDouble check you have provided the correct parameters."})}}Object.defineProperty(p,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3});class f extends o{constructor(e){super(e,{code:f.code,name:"ResourceNotFoundRpcError",shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceNotFoundRpcError"})}}Object.defineProperty(f,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001});class h extends o{constructor(e){super(e,{code:h.code,name:"ResourceUnavailableRpcError",shortMessage:"Requested resource not available."})}}Object.defineProperty(h,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002});class m extends o{constructor(e){super(e,{code:m.code,name:"TransactionRejectedRpcError",shortMessage:"Transaction creation failed."})}}Object.defineProperty(m,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003});class g extends o{constructor(e,{method:t}={}){super(e,{code:g.code,name:"MethodNotSupportedRpcError",shortMessage:`Method${t?` "${t}"`:""} is not implemented.`})}}Object.defineProperty(g,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004});class y extends o{constructor(e){super(e,{code:y.code,name:"LimitExceededRpcError",shortMessage:"Request exceeds defined limit."})}}Object.defineProperty(y,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005});class b extends o{constructor(e){super(e,{code:b.code,name:"JsonRpcVersionUnsupportedError",shortMessage:"Version of JSON-RPC protocol is not supported."})}}Object.defineProperty(b,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006});class _ extends a{constructor(e){super(e,{code:_.code,name:"UserRejectedRequestError",shortMessage:"User rejected the request."})}}Object.defineProperty(_,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001});class v extends a{constructor(e){super(e,{code:v.code,name:"UnauthorizedProviderError",shortMessage:"The requested method and/or account has not been authorized by the user."})}}Object.defineProperty(v,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100});class w extends a{constructor(e,{method:t}={}){super(e,{code:w.code,name:"UnsupportedProviderMethodError",shortMessage:`The Provider does not support the requested method${t?` " ${t}"`:""}.`})}}Object.defineProperty(w,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200});class k extends a{constructor(e){super(e,{code:k.code,name:"ProviderDisconnectedError",shortMessage:"The Provider is disconnected from all chains."})}}Object.defineProperty(k,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900});class x extends a{constructor(e){super(e,{code:x.code,name:"ChainDisconnectedError",shortMessage:"The Provider is not connected to the requested chain."})}}Object.defineProperty(x,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901});class A extends a{constructor(e){super(e,{code:A.code,name:"SwitchChainError",shortMessage:"An error occurred when attempting to switch chain."})}}Object.defineProperty(A,"code",{enumerable:!0,configurable:!0,writable:!0,value:4902});class S extends o{constructor(e){super(e,{name:"UnknownRpcError",shortMessage:"An unknown RPC error occurred."})}}},74681:function(e,t,n){"use strict";n.d(t,{Bj:function(){return s},Nc:function(){return i},Z8:function(){return o}});var r=n(76382);class i extends r.G{constructor({address:e}){super(`State for account "${e}" is set multiple times.`,{name:"AccountStateConflictError"})}}class o extends r.G{constructor(){super("state and stateDiff are set on the same account.",{name:"StateAssignmentConflictError"})}}function a(e){return e.reduce((e,{slot:t,value:n})=>`${e} ${t}: ${n} `,"")}function s(e){return e.reduce((e,{address:t,...n})=>{let r=`${e} ${t}: `;return n.nonce&&(r+=` nonce: ${n.nonce} `),n.balance&&(r+=` balance: ${n.balance} `),n.code&&(r+=` code: ${n.code} `),n.state&&(r+=" state:\n"+a(n.state)),n.stateDiff&&(r+=" stateDiff:\n"+a(n.stateDiff)),r}," State Override:\n").slice(0,-1)}},28697:function(e,t,n){"use strict";n.d(t,{Bh:function(){return p},JC:function(){return c},Yb:function(){return f},j3:function(){return l},mc:function(){return h},mk:function(){return d},vl:function(){return u},xY:function(){return s},xr:function(){return a}});var r=n(31986),i=n(46885),o=n(76382);function a(e){let t=Object.entries(e).map(([e,t])=>void 0===t||!1===t?null:[e,t]).filter(Boolean),n=t.reduce((e,[t])=>Math.max(e,t.length),0);return t.map(([e,t])=>` ${`${e}:`.padEnd(n+1)} ${t}`).join("\n")}class s extends o.G{constructor(){super("Cannot specify both a `gasPrice` and a `maxFeePerGas`/`maxPriorityFeePerGas`.\nUse `maxFeePerGas`/`maxPriorityFeePerGas` for EIP-1559 compatible networks, and `gasPrice` for others.",{name:"FeeConflictError"})}}class u extends o.G{constructor({v:e}){super(`Invalid \`v\` value "${e}". Expected 27 or 28.`,{name:"InvalidLegacyVError"})}}class l extends o.G{constructor({transaction:e}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",a(e),"}","","To infer the type, either provide:","- a `type` to the Transaction, or","- an EIP-1559 Transaction with `maxFeePerGas`, or","- an EIP-2930 Transaction with `gasPrice` & `accessList`, or","- an EIP-4844 Transaction with `blobs`, `blobVersionedHashes`, `sidecars`, or","- an EIP-7702 Transaction with `authorizationList`, or","- a Legacy Transaction with `gasPrice`"],name:"InvalidSerializableTransactionError"})}}class c extends o.G{constructor({storageKey:e}){super(`Size for storage key "${e}" is invalid. Expected 32 bytes. Got ${Math.floor((e.length-2)/2)} bytes.`,{name:"InvalidStorageKeySizeError"})}}class d extends o.G{constructor(e,{account:t,docsPath:n,chain:o,data:s,gas:u,gasPrice:l,maxFeePerGas:c,maxPriorityFeePerGas:d,nonce:p,to:f,value:h}){let m=a({chain:o&&`${o?.name} (id: ${o?.id})`,from:t?.address,to:f,value:void 0!==h&&`${(0,r.d)(h)} ${o?.nativeCurrency?.symbol||"ETH"}`,data:s,gas:u,gasPrice:void 0!==l&&`${(0,i.o)(l)} gwei`,maxFeePerGas:void 0!==c&&`${(0,i.o)(c)} gwei`,maxPriorityFeePerGas:void 0!==d&&`${(0,i.o)(d)} gwei`,nonce:p});super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Request Arguments:",m].filter(Boolean),name:"TransactionExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=e}}class p extends o.G{constructor({blockHash:e,blockNumber:t,blockTag:n,hash:r,index:i}){let o="Transaction";n&&void 0!==i&&(o=`Transaction at block time "${n}" at index "${i}"`),e&&void 0!==i&&(o=`Transaction at block hash "${e}" at index "${i}"`),t&&void 0!==i&&(o=`Transaction at block number "${t}" at index "${i}"`),r&&(o=`Transaction with hash "${r}"`),super(`${o} could not be found.`,{name:"TransactionNotFoundError"})}}class f extends o.G{constructor({hash:e}){super(`Transaction receipt with hash "${e}" could not be found. The Transaction may not be processed on a block yet.`,{name:"TransactionReceiptNotFoundError"})}}class h extends o.G{constructor({hash:e}){super(`Timed out while waiting for transaction with hash "${e}" to be confirmed.`,{name:"WaitForTransactionReceiptTimeoutError"})}}},23706:function(e,t,n){"use strict";n.d(t,{C:function(){return r},G:function(){return i}});let r=e=>e,i=e=>e},89167:function(e,t,n){"use strict";n.d(t,{r:function(){return m}});var r=n(8008),i=n(24883),o=n(59735),a=n(77476),s=n(43525),u=n(52266),l=n(87694),c=n(60449),d=n(26704);function p(e,t={}){void 0!==t.size&&(0,c.Yf)(e,{size:t.size});let n=(0,d.ci)(e,t);return(0,c.ly)(n,t)}var f=n(96614),h=n(83740);function m(e,t){let n="string"==typeof t?(0,f.nr)(t):t,m=(0,o.q)(n);if(0===(0,a.d)(n)&&e.length>0)throw new r.wb;if((0,a.d)(t)&&32>(0,a.d)(t))throw new r.xB({data:"string"==typeof t?t:(0,d.ci)(t),params:e,size:(0,a.d)(t)});let y=0,b=[];for(let t=0;t!e),o=i?[]:{},a=0;if(g(n)){let s=p(t.readBytes(32)),u=r+s;for(let r=0;r1||n[0]>1)throw new l.yr(n);return!!n[0]}(t.readBytes(32),{size:32}),32];if(n.type.startsWith("bytes"))return function(e,t,{staticPosition:n}){let[r,i]=t.type.split("bytes");if(!i){let t=p(e.readBytes(32));e.setPosition(n+t);let r=p(e.readBytes(32));if(0===r)return e.setPosition(n+32),["0x",32];let i=e.readBytes(r);return e.setPosition(n+32),[(0,d.ci)(i),32]}let o=(0,d.ci)(e.readBytes(Number.parseInt(i),32));return[o,32]}(t,n,{staticPosition:o});if(n.type.startsWith("uint")||n.type.startsWith("int"))return function(e,t){let n=t.type.startsWith("int"),r=Number.parseInt(t.type.split("int")[1]||"256"),i=e.readBytes(32);return[r>48?function(e,t={}){void 0!==t.size&&(0,c.Yf)(e,{size:t.size});let n=(0,d.ci)(e,t);return(0,c.y_)(n,t)}(i,{signed:n}):p(i,{signed:n}),32]}(t,n);if("string"===n.type)return function(e,{staticPosition:t}){let n=p(e.readBytes(32));e.setPosition(t+n);let r=p(e.readBytes(32));if(0===r)return e.setPosition(t+32),["",32];let i=e.readBytes(r,32),o=function(e,t={}){let n=e;return void 0!==t.size&&((0,c.Yf)(n,{size:t.size}),n=(0,u.f)(n,{dir:"right"})),new TextDecoder().decode(n)}((0,u.f)(i));return e.setPosition(t+32),[o,32]}(t,{staticPosition:o});throw new r.CI(n.type,{docsPath:"/docs/contract/decodeAbiParameters"})}(m,n,{staticPosition:0});y+=a,b.push(o)}return b}function g(e){let{type:t}=e;if("string"===t||"bytes"===t||t.endsWith("[]"))return!0;if("tuple"===t)return e.components?.some(g);let n=(0,h.S)(e.type);return!!(n&&g({...e,type:n[1]}))}},54796:function(e,t,n){"use strict";n.d(t,{p:function(){return l}});var r=n(51687),i=n(8008),o=n(43525),a=n(24140),s=n(89167),u=n(28789);function l(e){let{abi:t,data:n}=e,l=(0,o.tP)(n,0,4);if("0x"===l)throw new i.wb;let c=[...t||[],r.Up,r.hZ],d=c.find(e=>"error"===e.type&&l===(0,a.C)((0,u.t)(e)));if(!d)throw new i.yP(l,{docsPath:"/docs/contract/decodeErrorResult"});return{abiItem:d,args:"inputs"in d&&d.inputs&&d.inputs.length>0?(0,s.r)(d.inputs,(0,o.tP)(n,4)):void 0,errorName:d.name}}},22668:function(e,t,n){"use strict";n.d(t,{k:function(){return s}});var r=n(8008),i=n(89167),o=n(55578);let a="/docs/contract/decodeFunctionResult";function s(e){let{abi:t,args:n,functionName:s,data:u}=e,l=t[0];if(s){let e=(0,o.mE)({abi:t,args:n,name:s});if(!e)throw new r.xL(s,{docsPath:a});l=e}if("function"!==l.type)throw new r.xL(void 0,{docsPath:a});if(!l.outputs)throw new r.MX(l.name,{docsPath:a});let c=(0,i.r)(l.outputs,u);return c&&c.length>1?c:c&&1===c.length?c[0]:void 0}},83740:function(e,t,n){"use strict";n.d(t,{E:function(){return h},S:function(){return g}});var r=n(8008),i=n(20230),o=n(76382),a=n(87694),s=n(93408),u=n(77644),l=n(61593),c=n(77476),d=n(43525),p=n(26704);let f=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;function h(e,t){if(e.length!==t.length)throw new r.fs({expectedLength:e.length,givenLength:t.length});let n=function({params:e,values:t}){let n=[];for(let h=0;h0?(0,u.zo)([t,e]):t}}if(a)return{dynamic:!0,encoded:e}}return{dynamic:!1,encoded:(0,u.zo)(s.map(({encoded:e})=>e))}}(n,{length:i,param:{...t,type:o}})}if("tuple"===t.type)return function(t,{param:n}){let r=!1,i=[];for(let o=0;oe))}}(n,{param:t});if("address"===t.type)return function(e){if(!(0,s.U)(e))throw new i.b({address:e});return{dynamic:!1,encoded:(0,l.gc)(e.toLowerCase())}}(n);if("bool"===t.type)return function(e){if("boolean"!=typeof e)throw new o.G(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:(0,l.gc)((0,p.C4)(e))}}(n);if(t.type.startsWith("uint")||t.type.startsWith("int")){let e=t.type.startsWith("int"),[,,r="256"]=f.exec(t.type)??[];return function(e,{signed:t,size:n=256}){if("number"==typeof n){let r=2n**(BigInt(n)-(t?1n:0n))-1n,i=t?-r-1n:0n;if(e>r||e(function(e,{includeName:t}){return e.type.startsWith("tuple")?`(${o(e.components,{includeName:t})})${e.type.slice(5)}`:e.type+(t&&e.name?` ${e.name}`:"")})(e,{includeName:t})).join(t?", ":","):""}},55578:function(e,t,n){"use strict";n.d(t,{mE:function(){return u}});var r=n(8008),i=n(39450),o=n(93408),a=n(72556),s=n(24140);function u(e){let t;let{abi:n,args:u=[],name:l}=e,c=(0,i.v)(l,{strict:!1}),d=n.filter(e=>c?"function"===e.type?(0,s.C)(e)===l:"event"===e.type&&(0,a.n)(e)===l:"name"in e&&e.name===l);if(0!==d.length){if(1===d.length)return d[0];for(let e of d){if(!("inputs"in e))continue;if(!u||0===u.length){if(!e.inputs||0===e.inputs.length)return e;continue}if(!e.inputs||0===e.inputs.length||e.inputs.length!==u.length)continue;let n=u.every((t,n)=>{let r="inputs"in e&&e.inputs[n];return!!r&&function e(t,n){let r=typeof t,i=n.type;switch(i){case"address":return(0,o.U)(t,{strict:!1});case"bool":return"boolean"===r;case"function":case"string":return"string"===r;default:if("tuple"===i&&"components"in n)return Object.values(n.components).every((n,r)=>e(Object.values(t)[r],n));if(/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(i))return"number"===r||"bigint"===r;if(/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(i))return"string"===r||t instanceof Uint8Array;if(/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(i))return Array.isArray(t)&&t.every(t=>e(t,{...n,type:i.replace(/(\[[0-9]{0,}\])$/,"")}));return!1}}(t,r)});if(n){if(t&&"inputs"in t&&t.inputs){let n=function e(t,n,r){for(let i in t){let a=t[i],s=n[i];if("tuple"===a.type&&"tuple"===s.type&&"components"in a&&"components"in s)return e(a.components,s.components,r[i]);let u=[a.type,s.type],l=!!(u.includes("address")&&u.includes("bytes20"))||!!(u.includes("address")&&u.includes("string")||u.includes("address")&&u.includes("bytes"))&&(0,o.U)(r[i],{strict:!1});if(l)return u}}(e.inputs,t.inputs,u);if(n)throw new r.S4({abiItem:e,type:n[0]},{abiItem:t,type:n[1]})}t=e}}return t||d[0]}}},24883:function(e,t,n){"use strict";n.d(t,{K:function(){return c},x:function(){return l}});var r=n(20230),i=n(96614),o=n(87787),a=n(57584),s=n(93408);let u=new a.k(8192);function l(e,t){if(u.has(`${e}.${t}`))return u.get(`${e}.${t}`);let n=t?`${t}${e.toLowerCase()}`:e.substring(2).toLowerCase(),r=(0,o.w)((0,i.qX)(n),"bytes"),a=(t?n.substring(`${t}0x`.length):n).split("");for(let e=0;e<40;e+=2)r[e>>1]>>4>=8&&a[e]&&(a[e]=a[e].toUpperCase()),(15&r[e>>1])>=8&&a[e+1]&&(a[e+1]=a[e+1].toUpperCase());let s=`0x${a.join("")}`;return u.set(`${e}.${t}`,s),s}function c(e,t){if(!(0,s.U)(e,{strict:!1}))throw new r.b({address:e});return l(e,t)}},93408:function(e,t,n){"use strict";n.d(t,{U:function(){return s}});var r=n(57584),i=n(24883);let o=/^0x[a-fA-F0-9]{40}$/,a=new r.k(8192);function s(e,t){let{strict:n=!0}=t??{},r=`${e}.${n}`;if(a.has(r))return a.get(r);let s=!!o.test(e)&&(e.toLowerCase()===e||!n||(0,i.x)(e)===e);return a.set(r,s),s}},65072:function(e,t,n){"use strict";n.d(t,{P:function(){return o}});var r=n(96614),i=n(26704);function o(e){let{kzg:t}=e,n=e.to??("string"==typeof e.blobs[0]?"hex":"bytes"),o="string"==typeof e.blobs[0]?e.blobs.map(e=>(0,r.nr)(e)):e.blobs,a=[];for(let e of o)a.push(Uint8Array.from(t.blobToKzgCommitment(e)));return"bytes"===n?a:a.map(e=>(0,i.ci)(e))}},68053:function(e,t,n){"use strict";n.d(t,{y:function(){return o}});var r=n(96614),i=n(26704);function o(e){let{kzg:t}=e,n=e.to??("string"==typeof e.blobs[0]?"hex":"bytes"),o="string"==typeof e.blobs[0]?e.blobs.map(e=>(0,r.nr)(e)):e.blobs,a="string"==typeof e.commitments[0]?e.commitments.map(e=>(0,r.nr)(e)):e.commitments,s=[];for(let e=0;e(0,i.ci)(e))}},89515:function(e,t,n){"use strict";n.d(t,{C:function(){return g}});var r=n(26704),i=n(42007),o=n(74733);let a=(e,t,n)=>e&t^~e&n,s=(e,t,n)=>e&t^e&n^t&n;class u extends o.kb{constructor(e,t,n,r){super(),this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=r,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=(0,o.GL)(this.buffer)}update(e){(0,i.$h)(this);let{view:t,buffer:n,blockLen:r}=this;e=(0,o.O0)(e);let a=e.length;for(let i=0;ir-s&&(this.process(n,0),s=0);for(let e=s;e>i&o),s=Number(n&o);e.setUint32(t+(r?4:0),a,r),e.setUint32(t+(r?0:4),s,r)}(n,r-8,BigInt(8*this.length),a),this.process(n,0);let u=(0,o.GL)(e),l=this.outputLen;if(l%4)throw Error("_sha2: outputLen should be aligned to 32bit");let c=l/4,d=this.get();if(c>d.length)throw Error("_sha2: outputLen bigger than state");for(let e=0;e>>3,i=(0,o.np)(n,17)^(0,o.np)(n,19)^n>>>10;d[e]=i+d[e-7]+r+d[e-16]|0}let{A:n,B:r,C:i,D:u,E:c,F:p,G:f,H:h}=this;for(let e=0;e<64;e++){let t=(0,o.np)(c,6)^(0,o.np)(c,11)^(0,o.np)(c,25),m=h+t+a(c,p,f)+l[e]+d[e]|0,g=(0,o.np)(n,2)^(0,o.np)(n,13)^(0,o.np)(n,22),y=g+s(n,r,i)|0;h=f,f=p,p=c,c=u+m|0,u=i,i=r,r=n,n=m+y|0}n=n+this.A|0,r=r+this.B|0,i=i+this.C|0,u=u+this.D|0,c=c+this.E|0,p=p+this.F|0,f=f+this.G|0,h=h+this.H|0,this.set(n,r,i,u,c,p,f,h)}roundClean(){d.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}let f=(0,o.hE)(()=>new p);var h=n(39450),m=n(96614);function g(e){let{commitments:t,version:n}=e,i=e.to??("string"==typeof t[0]?"hex":"bytes"),o=[];for(let e of t)o.push(function(e){let{commitment:t,version:n=1}=e,i=e.to??("string"==typeof t?"hex":"bytes"),o=function(e,t){let n=f((0,h.v)(e,{strict:!1})?(0,m.O0)(e):e);return"bytes"===(t||"hex")?n:(0,r.NC)(n)}(t,"bytes");return o.set([n],0),"bytes"===i?o:(0,r.ci)(o)}({commitment:e,to:i,version:n}));return o}},39914:function(e,t,n){"use strict";n.d(t,{j:function(){return c}});var r=n(65072),i=n(68053),o=n(4157),a=n(59735),s=n(77476),u=n(96614),l=n(26704);function c(e){let{data:t,kzg:n,to:c}=e,d=e.blobs??function(e){let t=e.to??("string"==typeof e.data?"hex":"bytes"),n="string"==typeof e.data?(0,u.nr)(e.data):e.data,r=(0,s.d)(n);if(!r)throw new o.RX;if(r>761855)throw new o.m7({maxSize:761855,size:r});let i=[],c=!0,d=0;for(;c;){let e=(0,a.q)(new Uint8Array(131072)),t=0;for(;t<4096;){let r=n.slice(d,d+31);if(e.pushByte(0),e.pushBytes(r),r.length<31){e.pushByte(128),c=!1;break}t++,d+=31}i.push(e)}return"bytes"===t?i.map(e=>e.bytes):i.map(e=>(0,l.ci)(e.bytes))}({data:t,to:c}),p=e.commitments??(0,r.P)({blobs:d,kzg:n,to:c}),f=e.proofs??(0,i.y)({blobs:d,commitments:p,kzg:n,to:c}),h=[];for(let e=0;ee)throw new r.mm({blockNumber:e,chain:t,contract:{name:n,blockCreated:i.blockCreated}});return i.address}},59735:function(e,t,n){"use strict";n.d(t,{q:function(){return o}});var r=n(25383);let i={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new r.KD({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new r.lQ({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new r.T_({offset:e});let t=this.position-e;this.assertPosition(t),this.position=t},getReadCount(e){return this.positionReadCount.get(e||this.position)||0},incrementPosition(e){if(e<0)throw new r.T_({offset:e});let t=this.position+e;this.assertPosition(t),this.position=t},inspectByte(e){let t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){let n=t??this.position;return this.assertPosition(n+e-1),this.bytes.subarray(n,n+e)},inspectUint8(e){let t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){let t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){let t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){let t=e??this.position;return this.assertPosition(t+3),this.dataView.getUint32(t)},pushByte(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushBytes(e){this.assertPosition(this.position+e.length-1),this.bytes.set(e,this.position),this.position+=e.length},pushUint8(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushUint16(e){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,e),this.position+=2},pushUint24(e){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,e>>8),this.dataView.setUint8(this.position+2,255&e),this.position+=3},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4},readByte(){this.assertReadLimit(),this._touch();let e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this._touch();let n=this.inspectBytes(e);return this.position+=t??e,n},readUint8(){this.assertReadLimit(),this._touch();let e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this._touch();let e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this._touch();let e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this._touch();let e=this.inspectUint32();return this.position+=4,e},get remaining(){return this.bytes.length-this.position},setPosition(e){let t=this.position;return this.assertPosition(e),this.position=e,()=>this.position=t},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;let e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++}};function o(e,{recursiveReadLimit:t=8192}={}){let n=Object.create(i);return n.bytes=e,n.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength),n.positionReadCount=new Map,n.recursiveReadLimit=t,n}},77644:function(e,t,n){"use strict";function r(e){return"string"==typeof e[0]?i(e):function(e){let t=0;for(let n of e)t+=n.length;let n=new Uint8Array(t),r=0;for(let t of e)n.set(t,r),r+=t.length;return n}(e)}function i(e){return`0x${e.reduce((e,t)=>e+t.replace("0x",""),"")}`}n.d(t,{SM:function(){return i},zo:function(){return r}})},39450:function(e,t,n){"use strict";function r(e,{strict:t=!0}={}){return!!e&&"string"==typeof e&&(t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x"))}n.d(t,{v:function(){return r}})},61593:function(e,t,n){"use strict";n.d(t,{gc:function(){return o},vk:function(){return i}});var r=n(83305);function i(e,{dir:t,size:n=32}={}){return"string"==typeof e?o(e,{dir:t,size:n}):function(e,{dir:t,size:n=32}={}){if(null===n)return e;if(e.length>n)throw new r.$s({size:e.length,targetSize:n,type:"bytes"});let i=new Uint8Array(n);for(let r=0;r2*n)throw new r.$s({size:Math.ceil(i.length/2),targetSize:n,type:"hex"});return`0x${i["right"===t?"padEnd":"padStart"](2*n,"0")}`}},77476:function(e,t,n){"use strict";n.d(t,{d:function(){return i}});var r=n(39450);function i(e){return(0,r.v)(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}},43525:function(e,t,n){"use strict";n.d(t,{T4:function(){return l},tP:function(){return a}});var r=n(83305),i=n(39450),o=n(77476);function a(e,t,n,{strict:r}={}){return(0,i.v)(e,{strict:!1})?function(e,t,n,{strict:r}={}){s(e,t);let i=`0x${e.replace("0x","").slice((t??0)*2,(n??e.length)*2)}`;return r&&u(i,t,n),i}(e,t,n,{strict:r}):l(e,t,n,{strict:r})}function s(e,t){if("number"==typeof t&&t>0&&t>(0,o.d)(e)-1)throw new r.mV({offset:t,position:"start",size:(0,o.d)(e)})}function u(e,t,n){if("number"==typeof t&&"number"==typeof n&&(0,o.d)(e)!==n-t)throw new r.mV({offset:n,position:"end",size:(0,o.d)(e)})}function l(e,t,n,{strict:r}={}){s(e,t);let i=e.slice(t,n);return r&&u(i,t,n),i}},52266:function(e,t,n){"use strict";function r(e,{dir:t="left"}={}){let n="string"==typeof e?e.replace("0x",""):e,r=0;for(let e=0;et)throw new r.M6({givenSize:(0,i.d)(e),maxSize:t})}function u(e,t={}){let{signed:n}=t;t.size&&s(e,{size:t.size});let r=BigInt(e);if(!n)return r;let i=(e.length-2)/2,o=(1n<<8n*BigInt(i)-1n)-1n;return r<=o?r:r-BigInt(`0x${"f".padStart(2*i,"f")}`)-1n}function l(e,t={}){return Number(u(e,t))}function c(e,t={}){let n=(0,a.nr)(e);return t.size&&(s(n,{size:t.size}),n=(0,o.f)(n,{dir:"right"})),new TextDecoder().decode(n)}},96614:function(e,t,n){"use strict";n.d(t,{O0:function(){return l},nr:function(){return p},qX:function(){return f}});var r=n(76382),i=n(39450),o=n(61593),a=n(60449),s=n(26704);let u=new TextEncoder;function l(e,t={}){return"number"==typeof e||"bigint"==typeof e?function(e,t){let n=(0,s.eC)(e,t);return p(n)}(e,t):"boolean"==typeof e?function(e,t={}){let n=new Uint8Array(1);return(n[0]=Number(e),"number"==typeof t.size)?((0,a.Yf)(n,{size:t.size}),(0,o.vk)(n,{size:t.size})):n}(e,t):(0,i.v)(e)?p(e,t):f(e,t)}let c={zero:48,nine:57,A:65,F:70,a:97,f:102};function d(e){return e>=c.zero&&e<=c.nine?e-c.zero:e>=c.A&&e<=c.F?e-(c.A-10):e>=c.a&&e<=c.f?e-(c.a-10):void 0}function p(e,t={}){let n=e;t.size&&((0,a.Yf)(n,{size:t.size}),n=(0,o.vk)(n,{dir:"right",size:t.size}));let i=n.slice(2);i.length%2&&(i=`0${i}`);let s=i.length/2,u=new Uint8Array(s);for(let e=0,t=0;et.toString(16).padStart(2,"0"));function s(e,t={}){return"number"==typeof e||"bigint"==typeof e?c(e,t):"string"==typeof e?p(e,t):"boolean"==typeof e?u(e,t):l(e,t)}function u(e,t={}){let n=`0x${Number(e)}`;return"number"==typeof t.size?((0,o.Yf)(n,{size:t.size}),(0,i.vk)(n,{size:t.size})):n}function l(e,t={}){let n="";for(let t=0;tn||se+t.length,0),n=u(t);return{length:t<=55?1+t:1+n+t,encode(r){for(let{encode:i}of(t<=55?r.pushByte(192+t):(r.pushByte(247+n),1===n?r.pushUint8(t):2===n?r.pushUint16(t):3===n?r.pushUint24(t):r.pushUint32(t)),e))i(r)}}}(t.map(t=>e(t))):function(e){let t="string"==typeof e?(0,o.nr)(e):e,n=u(t.length),r=1===t.length&&t[0]<128?1:t.length<=55?1+t.length:1+n+t.length;return{length:r,encode(e){1===t.length&&t[0]<128?e.pushBytes(t):t.length<=55?(e.pushByte(128+t.length),e.pushBytes(t)):(e.pushByte(183+n),1===n?e.pushUint8(t.length):2===n?e.pushUint16(t.length):3===n?e.pushUint24(t.length):e.pushUint32(t.length),e.pushBytes(t))}}}(t)}(e),r=(0,i.q)(new Uint8Array(n.length));return(n.encode(r),"hex"===t)?(0,a.ci)(r.bytes):r.bytes}function u(e){if(e<256)return 1;if(e<65536)return 2;if(e<16777216)return 3;if(e<4294967296)return 4;throw new r.G("Length is too large.")}},83461:function(e,t,n){"use strict";n.d(t,{S:function(){return s}});var r=n(8008),i=n(76382),o=n(24014),a=n(66491);function s(e,{abi:t,address:n,args:s,docsPath:u,functionName:l,sender:c}){let{code:d,data:p,message:f,shortMessage:h}=e instanceof o.VQ?e:e instanceof i.G?e.walk(e=>"data"in e)||e.walk():{},m=e instanceof r.wb?new o.Dk({functionName:l}):[3,a.XS.code].includes(d)&&(p||f||h)?new o.Lu({abi:t,data:"object"==typeof p?p.data:p,functionName:l,message:h??f}):e;return new o.uq(m,{abi:t,args:s,contractAddress:n,docsPath:u,functionName:l,sender:c})}},77342:function(e,t,n){"use strict";n.d(t,{k:function(){return o}});var r=n(76382),i=n(84163);function o(e,t){let n=(e.details||"").toLowerCase(),o=e instanceof r.G?e.walk(e=>e?.code===i.M_.code):e;return o instanceof r.G?new i.M_({cause:e,message:o.details}):i.M_.nodeMessage.test(n)?new i.M_({cause:e,message:e.details}):i.Hh.nodeMessage.test(n)?new i.Hh({cause:e,maxFeePerGas:t?.maxFeePerGas}):i.G$.nodeMessage.test(n)?new i.G$({cause:e,maxFeePerGas:t?.maxFeePerGas}):i.ZI.nodeMessage.test(n)?new i.ZI({cause:e,nonce:t?.nonce}):i.vU.nodeMessage.test(n)?new i.vU({cause:e,nonce:t?.nonce}):i.se.nodeMessage.test(n)?new i.se({cause:e,nonce:t?.nonce}):i.C_.nodeMessage.test(n)?new i.C_({cause:e}):i.WF.nodeMessage.test(n)?new i.WF({cause:e,gas:t?.gas}):i.dR.nodeMessage.test(n)?new i.dR({cause:e,gas:t?.gas}):i.pZ.nodeMessage.test(n)?new i.pZ({cause:e}):i.cs.nodeMessage.test(n)?new i.cs({cause:e,maxFeePerGas:t?.maxFeePerGas,maxPriorityFeePerGas:t?.maxPriorityFeePerGas}):new i.cj({cause:e})}},74678:function(e,t,n){"use strict";n.d(t,{G:function(){return a},Z:function(){return o}});var r=n(99104),i=n(88266);function o(e){let t=(e.transactions??[]).map(e=>"string"==typeof e?e:(0,i.Tr)(e));return{...e,baseFeePerGas:e.baseFeePerGas?BigInt(e.baseFeePerGas):null,blobGasUsed:e.blobGasUsed?BigInt(e.blobGasUsed):void 0,difficulty:e.difficulty?BigInt(e.difficulty):void 0,excessBlobGas:e.excessBlobGas?BigInt(e.excessBlobGas):void 0,gasLimit:e.gasLimit?BigInt(e.gasLimit):void 0,gasUsed:e.gasUsed?BigInt(e.gasUsed):void 0,hash:e.hash?e.hash:null,logsBloom:e.logsBloom?e.logsBloom:null,nonce:e.nonce?e.nonce:null,number:e.number?BigInt(e.number):null,size:e.size?BigInt(e.size):void 0,timestamp:e.timestamp?BigInt(e.timestamp):void 0,transactions:t,totalDifficulty:e.totalDifficulty?BigInt(e.totalDifficulty):null}}let a=(0,r.$)("block",o)},95384:function(e,t,n){"use strict";function r(e,{format:t}){if(!t)return{};let n={},r=t(e||{});return!function t(r){let i=Object.keys(r);for(let o of i)o in e&&(n[o]=e[o]),r[o]&&"object"==typeof r[o]&&!Array.isArray(r[o])&&t(r[o])}(r),n}n.d(t,{K:function(){return r}})},99104:function(e,t,n){"use strict";function r(e,t){return({exclude:n,format:r})=>({exclude:n,format:e=>{let i=t(e);if(n)for(let e of n)delete i[e];return{...i,...r(e)}},type:e})}n.d(t,{$:function(){return r}})},88266:function(e,t,n){"use strict";n.d(t,{Tr:function(){return a},c8:function(){return o},y_:function(){return s}});var r=n(60449),i=n(99104);let o={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function a(e){let t={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,chainId:e.chainId?(0,r.ly)(e.chainId):void 0,gas:e.gas?BigInt(e.gas):void 0,gasPrice:e.gasPrice?BigInt(e.gasPrice):void 0,maxFeePerBlobGas:e.maxFeePerBlobGas?BigInt(e.maxFeePerBlobGas):void 0,maxFeePerGas:e.maxFeePerGas?BigInt(e.maxFeePerGas):void 0,maxPriorityFeePerGas:e.maxPriorityFeePerGas?BigInt(e.maxPriorityFeePerGas):void 0,nonce:e.nonce?(0,r.ly)(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?o[e.type]:void 0,typeHex:e.type?e.type:void 0,value:e.value?BigInt(e.value):void 0,v:e.v?BigInt(e.v):void 0};return e.authorizationList&&(t.authorizationList=e.authorizationList.map(e=>({contractAddress:e.address,chainId:Number(e.chainId),nonce:Number(e.nonce),r:e.r,s:e.s,yParity:Number(e.yParity)}))),t.yParity=(()=>{if(e.yParity)return Number(e.yParity);if("bigint"==typeof t.v){if(0n===t.v||27n===t.v)return 0;if(1n===t.v||28n===t.v)return 1;if(t.v>=35n)return t.v%2n===0n?1:0}})(),"legacy"===t.type&&(delete t.accessList,delete t.maxFeePerBlobGas,delete t.maxFeePerGas,delete t.maxPriorityFeePerGas,delete t.yParity),"eip2930"===t.type&&(delete t.maxFeePerBlobGas,delete t.maxFeePerGas,delete t.maxPriorityFeePerGas),"eip1559"===t.type&&delete t.maxFeePerBlobGas,t}let s=(0,i.$)("transaction",a)},39892:function(e,t,n){"use strict";n.d(t,{dI:function(){return u},fA:function(){return s}});var r=n(60449),i=n(99104),o=n(88266);let a={"0x0":"reverted","0x1":"success"};function s(e){let t={...e,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,contractAddress:e.contractAddress?e.contractAddress:null,cumulativeGasUsed:e.cumulativeGasUsed?BigInt(e.cumulativeGasUsed):null,effectiveGasPrice:e.effectiveGasPrice?BigInt(e.effectiveGasPrice):null,gasUsed:e.gasUsed?BigInt(e.gasUsed):null,logs:e.logs?e.logs.map(e=>(function(e,{args:t,eventName:n}={}){return{...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,logIndex:e.logIndex?Number(e.logIndex):null,transactionHash:e.transactionHash?e.transactionHash:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,...n?{args:t,eventName:n}:{}}})(e)):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?(0,r.ly)(e.transactionIndex):null,status:e.status?a[e.status]:null,type:e.type?o.c8[e.type]||e.type:null};return e.blobGasPrice&&(t.blobGasPrice=BigInt(e.blobGasPrice)),e.blobGasUsed&&(t.blobGasUsed=BigInt(e.blobGasUsed)),t}let u=(0,i.$)("transactionReceipt",s)},2291:function(e,t,n){"use strict";n.d(t,{tG:function(){return o}});var r=n(26704);let i={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"};function o(e){let t={};return void 0!==e.authorizationList&&(t.authorizationList=e.authorizationList.map(e=>({address:e.contractAddress,r:e.r,s:e.s,chainId:(0,r.eC)(e.chainId),nonce:(0,r.eC)(e.nonce),...void 0!==e.yParity?{yParity:(0,r.eC)(e.yParity)}:{},...void 0!==e.v&&void 0===e.yParity?{v:(0,r.eC)(e.v)}:{}}))),void 0!==e.accessList&&(t.accessList=e.accessList),void 0!==e.blobVersionedHashes&&(t.blobVersionedHashes=e.blobVersionedHashes),void 0!==e.blobs&&("string"!=typeof e.blobs[0]?t.blobs=e.blobs.map(e=>(0,r.ci)(e)):t.blobs=e.blobs),void 0!==e.data&&(t.data=e.data),void 0!==e.from&&(t.from=e.from),void 0!==e.gas&&(t.gas=(0,r.eC)(e.gas)),void 0!==e.gasPrice&&(t.gasPrice=(0,r.eC)(e.gasPrice)),void 0!==e.maxFeePerBlobGas&&(t.maxFeePerBlobGas=(0,r.eC)(e.maxFeePerBlobGas)),void 0!==e.maxFeePerGas&&(t.maxFeePerGas=(0,r.eC)(e.maxFeePerGas)),void 0!==e.maxPriorityFeePerGas&&(t.maxPriorityFeePerGas=(0,r.eC)(e.maxPriorityFeePerGas)),void 0!==e.nonce&&(t.nonce=(0,r.eC)(e.nonce)),void 0!==e.to&&(t.to=e.to),void 0!==e.type&&(t.type=i[e.type]),void 0!==e.value&&(t.value=(0,r.eC)(e.value)),t}},72721:function(e,t,n){"use strict";function r(e,t,n){let r=e[t.name];if("function"==typeof r)return r;let i=e[n];return"function"==typeof i?i:n=>t(e,n)}n.d(t,{s:function(){return r}})},87787:function(e,t,n){"use strict";n.d(t,{w:function(){return P}});var r=n(42007);let i=BigInt(4294967296-1),o=BigInt(32),a=(e,t,n)=>e<>>32-n,s=(e,t,n)=>t<>>32-n,u=(e,t,n)=>t<>>64-n,l=(e,t,n)=>e<>>64-n;var c=n(74733);let d=[],p=[],f=[],h=BigInt(0),m=BigInt(1),g=BigInt(2),y=BigInt(7),b=BigInt(256),_=BigInt(113);for(let e=0,t=m,n=1,r=0;e<24;e++){[n,r]=[r,(2*n+3*r)%5],d.push(2*(5*r+n)),p.push((e+1)*(e+2)/2%64);let i=h;for(let e=0;e<7;e++)(t=(t<>y)*_)%b)&g&&(i^=m<<(m<>o&i)}:{h:0|Number(e>>o&i),l:0|Number(e&i)}}(e[a],t);[n[a],r[a]]=[s,u]}return[n,r]}(f,!0),k=(e,t,n)=>n>32?u(e,t,n):a(e,t,n),x=(e,t,n)=>n>32?l(e,t,n):s(e,t,n);class A extends c.kb{constructor(e,t,n,i=!1,o=24){if(super(),this.blockLen=e,this.suffix=t,this.outputLen=n,this.enableXOF=i,this.rounds=o,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,(0,r.k8)(n),0>=this.blockLen||this.blockLen>=200)throw Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,c.Jq)(this.state)}keccak(){c.iA||(0,c.l1)(this.state32),function(e,t=24){let n=new Uint32Array(10);for(let r=24-t;r<24;r++){for(let t=0;t<10;t++)n[t]=e[t]^e[t+10]^e[t+20]^e[t+30]^e[t+40];for(let t=0;t<10;t+=2){let r=(t+8)%10,i=(t+2)%10,o=n[i],a=n[i+1],s=k(o,a,1)^n[r],u=x(o,a,1)^n[r+1];for(let n=0;n<50;n+=10)e[t+n]^=s,e[t+n+1]^=u}let t=e[2],i=e[3];for(let n=0;n<24;n++){let r=p[n],o=k(t,i,r),a=x(t,i,r),s=d[n];t=e[s],i=e[s+1],e[s]=o,e[s+1]=a}for(let t=0;t<50;t+=10){for(let r=0;r<10;r++)n[r]=e[t+r];for(let r=0;r<10;r++)e[t+r]^=~n[(r+2)%10]&n[(r+4)%10]}e[0]^=v[r],e[1]^=w[r]}n.fill(0)}(this.state32,this.rounds),c.iA||(0,c.l1)(this.state32),this.posOut=0,this.pos=0}update(e){(0,r.$h)(this);let{blockLen:t,state:n}=this;e=(0,c.O0)(e);let i=e.length;for(let r=0;r=n&&this.keccak();let o=Math.min(n-this.posOut,i-r);e.set(t.subarray(this.posOut,this.posOut+o),r),this.posOut+=o,r+=o}return e}xofInto(e){if(!this.enableXOF)throw Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return(0,r.k8)(e),this.xofInto(new Uint8Array(e))}digestInto(e){if((0,r.eB)(e,this),this.finished)throw Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){let{blockLen:t,suffix:n,outputLen:r,rounds:i,enableXOF:o}=this;return e||(e=new A(t,n,r,o,i)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=i,e.suffix=n,e.outputLen=r,e.enableXOF=o,e.destroyed=this.destroyed,e}}let S=(0,c.hE)(()=>new A(136,1,32));var I=n(39450),T=n(96614),E=n(26704);function P(e,t){let n=S((0,I.v)(e,{strict:!1})?(0,T.O0)(e):e);return"bytes"===(t||"hex")?n:(0,E.NC)(n)}},72556:function(e,t,n){"use strict";n.d(t,{n:function(){return i}});var r=n(12730);let i=r.r},24140:function(e,t,n){"use strict";n.d(t,{C:function(){return o}});var r=n(43525),i=n(12730);let o=e=>(0,r.tP)((0,i.r)(e),0,4)},12730:function(e,t,n){"use strict";n.d(t,{r:function(){return d}});var r=n(96614),i=n(87787);let o=e=>(0,i.w)((0,r.O0)(e));var a=n(93037);let s=/^tuple(?(\[(\d*)\])*)$/;function u(e){let t="",n=e.length;for(let r=0;r{let t="string"==typeof e?e:"function"===e.type?`function ${e.name}(${u(e.inputs)})${e.stateMutability&&"nonpayable"!==e.stateMutability?` ${e.stateMutability}`:""}${e.outputs?.length?` returns (${u(e.outputs)})`:""}`:"event"===e.type?`event ${e.name}(${u(e.inputs)})`:"error"===e.type?`error ${e.name}(${u(e.inputs)})`:"constructor"===e.type?`constructor(${u(e.inputs)})${"payable"===e.stateMutability?" payable":""}`:"fallback"===e.type?`fallback() external${"payable"===e.stateMutability?" payable":""}`:"receive() external payable";return function(e){let t=!0,n="",r=0,i="",o=!1;for(let a=0;athis.maxSize){let e=this.keys().next().value;e&&this.delete(e)}return this}}},27525:function(e,t,n){"use strict";n.d(t,{S:function(){return o}});var r=n(21136);let i=new Map;function o({fn:e,id:t,shouldSplitBatch:n,wait:o=0,sort:a}){let s=async()=>{let t=c();u();let n=t.map(({args:e})=>e);0!==n.length&&e(n).then(e=>{a&&Array.isArray(e)&&e.sort(a);for(let n=0;n{for(let n=0;ni.delete(t),l=()=>c().map(({args:e})=>e),c=()=>i.get(t)||[],d=e=>i.set(t,[...c(),e]);return{flush:u,async schedule(e){let{promise:t,resolve:i,reject:a}=(0,r.n)(),u=n?.([...l(),e]);u&&s();let p=c().length>0;return p?(d({args:e,resolve:i,reject:a}),t):(d({args:e,resolve:i,reject:a}),setTimeout(s,o),t)}}}},21136:function(e,t,n){"use strict";function r(){let e=()=>void 0,t=()=>void 0,n=new Promise((n,r)=>{e=n,t=r});return{promise:n,resolve:e,reject:t}}n.d(t,{n:function(){return r}})},73984:function(e,t,n){"use strict";n.d(t,{J:function(){return i}});var r=n(17648);function i(e,{delay:t=100,retryCount:n=2,shouldRetry:i=()=>!0}={}){return new Promise((o,a)=>{let s=async({count:u=0}={})=>{let l=async({error:e})=>{let n="function"==typeof t?t({count:u,error:e}):t;n&&await (0,r.D)(n),s({count:u+1})};try{let t=await e();o(t)}catch(e){if(u{if(66!==t.length)throw new i.W_({size:t.length,targetSize:66,type:"hex"});if(66!==n.length)throw new i.W_({size:n.length,targetSize:66,type:"hex"});return e[t]=n,e},{})}function l(e){if(!e)return;let t={};for(let{address:n,...i}of e){if(!(0,a.U)(n,{strict:!1}))throw new r.b({address:n});if(t[n])throw new o.Nc({address:n});t[n]=function(e){let{balance:t,nonce:n,state:r,stateDiff:i,code:a}=e,l={};if(void 0!==a&&(l.code=a),void 0!==t&&(l.balance=(0,s.eC)(t)),void 0!==n&&(l.nonce=(0,s.eC)(n)),void 0!==r&&(l.state=u(r)),void 0!==i){if(l.state)throw new o.Z8;l.stateDiff=u(i)}return l}(i)}return t}},91159:function(e,t,n){"use strict";n.d(t,{P:function(){return r}});let r=(e,t,n)=>JSON.stringify(e,(e,n)=>{let r="bigint"==typeof n?n.toString():n;return"function"==typeof t?t(e,r):r},n)},75140:function(e,t,n){"use strict";n.d(t,{F:function(){return l}});var r=n(17509),i=n(5272),o=n(20230),a=n(84163),s=n(28697),u=n(93408);function l(e){let{account:t,gasPrice:n,maxFeePerGas:l,maxPriorityFeePerGas:c,to:d}=e,p=t?(0,r.T)(t):void 0;if(p&&!(0,u.U)(p.address))throw new o.b({address:p.address});if(d&&!(0,u.U)(d))throw new o.b({address:d});if(void 0!==n&&(void 0!==l||void 0!==c))throw new s.xY;if(l&&l>i.zL)throw new a.Hh({maxFeePerGas:l});if(c&&l&&c>l)throw new a.cs({maxFeePerGas:l,maxPriorityFeePerGas:c})}},35641:function(e,t,n){"use strict";n.d(t,{l:function(){return i}});var r=n(28697);function i(e){if(e.type)return e.type;if(void 0!==e.authorizationList)return"eip7702";if(void 0!==e.blobs||void 0!==e.blobVersionedHashes||void 0!==e.maxFeePerBlobGas||void 0!==e.sidecars)return"eip4844";if(void 0!==e.maxFeePerGas||void 0!==e.maxPriorityFeePerGas)return"eip1559";if(void 0!==e.gasPrice)return void 0!==e.accessList?"eip2930":"legacy";throw new r.j3({transaction:e})}},32939:function(e,t,n){"use strict";let r;n.d(t,{h:function(){return o}});let i=256;function o(e=11){if(!r||i+e>512){r="",i=0;for(let e=0;e<256;e++)r+=(256+256*Math.random()|0).toString(16).substring(1)}return r.substring(i,i+++e)}},31986:function(e,t,n){"use strict";n.d(t,{d:function(){return o}});var r=n(71260),i=n(14062);function o(e,t="wei"){return(0,i.b)(e,r.ez[t])}},46885:function(e,t,n){"use strict";n.d(t,{o:function(){return o}});var r=n(71260),i=n(14062);function o(e,t="wei"){return(0,i.b)(e,r.Zn[t])}},14062:function(e,t,n){"use strict";function r(e,t){let n=e.toString(),r=n.startsWith("-");r&&(n=n.slice(1));let[i,o]=[(n=n.padStart(t,"0")).slice(0,n.length-t),n.slice(n.length-t)];return o=o.replace(/(0+)$/,""),`${r?"-":""}${i||"0"}${o?`.${o}`:""}`}n.d(t,{b:function(){return r}})},17648:function(e,t,n){"use strict";async function r(e){return new Promise(t=>setTimeout(t,e))}n.d(t,{D:function(){return r}})},42007:function(e,t,n){"use strict";function r(e){if(!Number.isSafeInteger(e)||e<0)throw Error("positive integer expected, got "+e)}function i(e,...t){if(!(e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name))throw Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw Error("Uint8Array expected of length "+t+", got length="+e.length)}function o(e,t=!0){if(e.destroyed)throw Error("Hash instance has been destroyed");if(t&&e.finished)throw Error("Hash#digest() has already been called")}function a(e,t){i(e);let n=t.outputLen;if(e.lengthnew Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4)),o=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),a=(e,t)=>e<<32-t|e>>>t,s=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],u=e=>e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255;function l(e){for(let t=0;tt.toString(16).padStart(2,"0"));class d{clone(){return this._cloneInto()}}function p(e){let t=t=>e().update(c(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}},93037:function(e,t,n){"use strict";function r(e,t){let n=e.exec(t);return n?.groups}n.d(t,{Zw:function(){return r},cN:function(){return a},eL:function(){return i},lh:function(){return o}});let i=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,o=/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,a=/^\(.+?\).*?$/},71739:function(e){e.exports={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}},60374:function(e,t,n){"use strict";function r(e,t){if(Object.is(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;let n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let r=0;r>","more_info":"More info","less_info":"Less info","tokens":"Tokens","amm_id":"AMM ID","market_id":"Market ID","lp":"LP","fees":"Fees","reward":"Reward","successfully":"Successfully","token":"Token","token_list":"Token List","learn_more":"Learn more","pool_id":"Pool id","add_token":"Add token","remove_token":"Remove token","confirm_token":"Confirm Token","user_added":"User Added","beta_tooltip":"Welcome to Sailor Finance V3 ! Updates are ongoing. The V2 site can still be accessed <0>here.","days":"Days","sort_by":"Sort By","app_version_available":"New version available","refresh_update":"Refresh the page to update and use the app.","refresh":"Refresh","update_later":"Update later","note":"Note:","got_it":"Got it","edit":"Edit","only_alm":"Only ALM"},"button":{"deposit":"Deposit","close":"Close","delete":"Delete","cancel":"Cancel","continue":"Continue","confirm":"Confirm","confirm_understand":"I understand, confirm","edit":"Edit","search":"Search","reset":"Reset","stake":"Stake","unstake":"Unstake","harvest":"Harvest","save":"Save","claim":"Claim","not_now":"Not Now","switch":"Switch","back":"Back","next_step":"Next Step","migrate":"Migrate","connect_wallet":"Connect Wallet","connect":"Connect","create":"Create","switch_chain":"Switch To Sei"},"badge":{"suggested":"Suggested","new":"New","ongoing":"Ongoing","ended":"Ended","updated":"Updated","ecosystem":"Ecosystem","fusion":"Fusion","raydium":"Raydium","openbook":"Openbook"},"setting_board":{"panel_title":"Settings","default_explorer":"Default Explorer","default_explorer_tooltip":"Select preferred block explorer","rpc_connection":"RPC Connection","rpc_connection_tooltip":"Select preferred RPC endpoint","color_theme":"Color Theme","slippage_tolerance_swap":"Swap slippage tolerance","slippage_tolerance_liquidity":"Liquidity slippage tolerance","slippage_tolerance_tooltip_swap":"Set your slippage tolerance for swap transactions.","slippage_tolerance_tooltip_liquidity":"Set tolerance for changes in the quote/base token deposit ratio.","slippage_tolerance_forerun":"Your transaction may be frontrun and result in an unfavorable trade","slippage_tolerance_fail":"Your transaction may fail","language":"Language","language_tooltip":"Select preferred language","versioned_transaction":"Versioned Transaction","versioned_transaction_tooltip":"Versioned Tx is a significant upgrade that allows for additional functionality, including advanced swap routing. Before turning on Vers. Tx, ensure that your wallet is compatible.","custom":"Custom","fee_auto":"Auto","fee_dynamic":"Dynamic","fee_none":"None","fee_high":"High","fee_turbo":"Turbo","transaction_priority":"Transaction Priority","transaction_priority_desc":"The priority fee is paid to the Solana network. This additional fee helps boost how a transaction is prioritized against others, resulting in faster transaction execution times.","transaction_priority_fee":"Transaction Priority Fee","transaction_priority_fee_tip":"The priority fee is paid to the Solana network. This additional fee boosts transaction prioritization, resulting in faster execution times. Note that the fee is taken even if a transaction ultimately fails.","transaction_priority_fee_usage":"Fee settings are applied across all Sailor Finance features, including Swap, Liquidity, and Staking.","priority_level":"Priority Level","priority_level_fast":"Fast","priority_level_turbo":"Turbo","priority_level_ultra":"Ultra","priority_mode":"Priority Mode","priority_mode_max_cap":"Max Cap","priority_mode_exact_fee":"Exact Fee","priority_mode_set_max_cap":"Set Max Cap","priority_fee_auto_optimizes":"Sailor Finance auto-optimizes priority fees for your transaction. Set a max cap to prevent overpaying.","priority_fee_exact":"Transactions will use the exact fee set below.","priority_fee_below_market_rate":"Your current max fee is below market rate. Increase it to ensure your transactions are processed."},"wallet_connect_panel":{"title":"Connect Wallet","desc":"By connecting a wallet, you agree to SAILOR Labs\' Terms of Service and consent to its Privacy Policy.","desc_link":"disclaimer","choose_network":"Choose network","choose_wallet":"Choose wallet","show_uninstalled_wallets":"Show uninstalled wallets","show_uninstalled":"Show uninstalled","tour_title":"New here?","tour_desc":"Get started on Sailor Finance","disconnect":"Disconnect","copy_address":"Copy Address","auto_confirm":"Auto Confirm","auto_approve":"Auto Approve","auto_confirm_tip":"Auto-confirm is now available for all transactions on Sailor Finance. <0>Learn More","auto_approve_tip_solflare":"Auto-approve is now available for all transactions on Sailor Finance.","phantom_wallet_not_installed":"Oops... Looks like you don\'t have Phantom installed!","install_phantom":"Install Phantom","how_to_install_phantom":"How to install Phantom?","on_mobile":"On mobile:","mobile_open_wallet":"Download and open the wallet app instead","on_desktop":"On desktop:","install_refresh_page":"Install at link above then refresh this page","wallet_installed_refresh_page":"I\'ve already Installed, Refresh page","goback":"Go back","sell_crypto":"Off ramp to fiat with ","buy_crypto_with_fiat":"Buy Crypto with fiat"},"token_selector":{"search_placeholder":"Search by token or paste address","jupiter_types_all":"ALL","jupiter_types_strict":"Strict","token_not_found":"Can\'t find the token you\'re looking for? Try entering the mint address or check token list settings below.","input_token_symbol":"input a symbol for this token","input_token_name":"input a name for this token (optional)","add_user_token":"Add User Token","token_freeze_warning":"Freeze Authority Warning","token_has_freeze":"This token has freeze authority enabled and could prevent you from transferring or trading the token later.","token_has_freeze_disable":"The selected token has freeze authority enabled. Disable freeze authority and try again or choose a different token."},"field":{"24h_volume":"Volume 24H","24h_fees":"Fees 24H","24h_apr":"APR 24H","7d_volume":"Volume 7D","7d_fees":"Fees 7D","7d_apr":"APR 7D","30d_volume":"Volume 30D","30d_fees":"Fees 30D","30d_apr":"APR 30D","total_apr":"Total APR","trade_fees":"Trade fees","weekly_rewards":"Weekly Rewards","fee_tier":"Fee Tier","fee":"Fee","current_price":"Current Price","apr":"APR","min":"Min","max":"Max","start_time":"Start time","total_value":"Total value"},"swap":{"title":"Swap","wrap":"Wrap","unwrap":"Unwrap","from_label":"From","to_label":"To","info_minimum_received":"Minimum Received","info_minimum_received_tooltip":"The minimum number of tokens you will receive. This is determined by your slippage tolerance.","info_maximum_input":"Maximum Input","info_maximum_input_tooltip":"The maximum number of tokens you will input on this trade","info_order_routing":"Order Routing","info_order_routing_tooltip":"This route gave the best price for your trade","info_price_impact":"Price Impact","info_price_impact_tooltip":"The difference between the current market price and estimated price due to trade size","info_estimated_fees":"Estimated Fees","info_estimated_fees_tooltip":"Swap fees go to LPs, RAY buybacks, and treasury.","info_not_default_token":"This token is not on the default token lists.","info_add_not_default_token":"By clicking below, you understand that you are fully responsible for confirming the token you are trading.","price_impact_high_tooltip":"Price Impact Warning","price_impact_warning_tooltip":"Price Impact Warning","price_impact_low_tooltip":"Low Price Impact","alert_price_updated":"Price updated","alert_price_updated_tooltip":"Price has changed since your swap amount was entered.","alert_price_updated_button":"Accept","alert_high_price_warn_title":"High Price Impact Warning","alert_high_price_warn_desc":"Price impact for this swap is {{percent}}
Confirming may result in a poor price for this swap!","swap_anyway":"Swap Anyway","pool_not_found":"Pool not found","pool_loading":"Loading pool...","computing":"Computing..","error_ROUTE_NOT_FOUND":"No Routes Found","error_AMOUNT_TOO_SMALL":"Swap Amount Too Small","error_TOO_LOW_LIQUIDITY":" Insufficient Liquidity","error_INSUFFICIENT_LIQUIDITY":" Insufficient Liquidity","error_REQ_POOL_NOT_OPEN":"Pool Open At","error_sei_fee_not_insufficient":"You need at least {{amount}} SEI to pay for fees and deposits","user_added_token_list":"User Added Token List","show_chart":"Show chart","unwrap_all_wsol":"Unwrapped all WSOL","unwrap_all_wsol_desc":"Unwrapped total {{amount}} WSOL","unwrap_wsol_info":"You have {{amount}} WSOL that you can Unwrap","blink_referral_desc":"Copy your custom referral link and earn 1% rewards when it\'s used on Twitter with Blink!"},"liquidity_pools":{"view_chart_tooltip":"View pool charts","chart_tab_volume":"Volume","chart_tab_liquidity":"Liquidity","chart_tooltip_volume":"volume","modal_header_standard_position_detail":"Standard Position Detail","farms":"Farms"},"liquidity":{"title":"Liquidity","pools":"Liquidity Pools","pool_info":"Pool Info","pools_desc":"Provide liquidity, earn yield.","concentrated":"Concentrated","standard":"Standard","pool":"Pool","fee_rate":"Fee Rate","show_farms":"Show Farms","create_pool":"Create","create_pool_tx_title":"Create pool","create_pool_tx_desc":"create {{mintA}} - {{mintB}} pool","value":"value","select_type":"Select Pool Type","select_farm":"Select Farm","stake_liquidity":"Stake Liquidity","unstake_liquidity":"Unstake Liquidity","add_liquidity":"Add Liquidity","remove_liquidity":"Remove Liquidity","withdraw_liquidity":"Withdraw Liquidity","pool_liquidity":"Pool Liquidity","pooled":"Pooled","pool_not_found":"Pool Not Found","total_apr_7d":"Total APR 7D","my_position":"My Position","APR":"APR","APR_tooltip":"Estimated APR based on trading fees earned by the pool in the past 24H","my_lp_balance":"My LP balance","lp_token_balance":"LP Token Balances","staked_liquidity":"Staked Liquidity","unstaked_liquidity":"Unstaked Liquidity","rewards_to_be_harvested":"Rewards to be harvested","assets_to_be_received":"Assets to be received","staked":"Staked","unstaked":"Unstaked","auto_swap":"Auto-swap","total_deposit":"Total Deposit","stakeable_hint":"You have unstaked LP tokens for this pool. You can stake them directly on the Stake Liquidity tab.","auto_swap_hint":"When auto-swap is on, token amounts will be automatically swapped to the deposit ratio needed to create your position.","auto_swap_modal":{"turn_on_title":"Turn on Auto-swap?","turn_off_title":"Turn off Auto-swap?","turn_on_description":"When auto-swap is on, token amounts will be automatically swapped to the deposit ratio needed to create your position.","turn_off_description":"When auto-swap is off, tokens will not be swapped to match your position deposit ratio. You will need sufficient tokens in your wallet to create a position.","turn_on":"Turn on Auto-swap","turn_off":"Turn off Auto-swap"},"setting_modal":{"title":"Setting"},"pool_search_modal":{"title":"Pool Search"},"pool_fee_desc":"This is a {{feeRate}}% fee tier {{type}} liquidity pool","no_active_farm":"There is no active farm for this pool.","no_active_farm_desc":"Rewards have ended for this farm. You can unstake your LP tokens.","loading_pool":"Loading pool","create_lp":"Create Position","preview_pool":"Preview Pool","want_to_stake_lp":"Do you want to stake your LP now?","stake_lp_desc":"Stake LP tokens to a farm to earn additional rewards. You can also do it later under Portfolio.","assets_to_received":"Assets to be received","tx_message":{"staked_successfully":"Staked {{symbol}}","staked_desc":"You staked {{amount}} {{symbol}}","unStaked_successfully":"Unstaked {{symbol}}","unStaked_desc":"You Unstaked {{amount}} {{symbol}}"},"rewards_ended":"Ended","rewards_ends":"Ends","rewards_starts":"Starts","tvl_dsc":"Trading Volume (dsc)","tvl_asc":"Trading Volume (asc)","lp_dsc":"TVL (dsc)","lp_asc":"TVL (asc)","yield_dsc":"Yield (dsc)","yield_asc":"Yield (asc)","default":"default","keep_my_position_open":"Keep my position open","keep_my_position_open_tip":"You can remove all your tokens and still keep your position open in order to add position seamless next time.","lock_liquidity":"Lock Liquidity","lock_my_liquidity":"Lock my liquidity","locked_percent":"{{percent}} permanently locked","locked_position":"Locked position","locked_positions":"Locked positions","locked_positions_tip_info":"You previously permanently locked the NFT for this position, however trading fees earned are still fully claimable.","lock_cpmm_title":"Burn/Lock Liquidity for standard AMM position","lock_clmm_title":"Burn/Lock Liquidity for CLMM position","lock_cpmm_set_amount":"Set amount of position to lock:","lock_cpmm_desc1":"Token teams can permanently lock liquidity. The LP tokens representing your position is sent to a locked token account. Fees auto-compound to the original position, but remain claimable.","lock_cpmm_desc2":"To start, select a standard AMM position below to lock. Ensure that <0>position value and LP balance match the position you want to lock!","lock_cpmm_desc3":"Note: Technically, your LP tokens are not burned but permanently locked.","lock_cpmm_desc4":"NOTE: This feature only supports CPMM pools created on the UI. Older V4 pools are not supported at this time.<0>Learn more here.","lock_clmm_desc1":"Token teams can permanently lock liquidity. The NFT representing your position is sent to a locked token account. Fees will still be claimable.","lock_clmm_desc2":"To start, select a CLMM position below to lock. Ensure that <0>position value and NFT mint match the position you want to lock!","lock_clmm_desc3":"Note: Technically, your NFT is not burned but permanently locked.","lock_desc4":"Are you sure you want to <0>permanently lock/burn liquidity? You will be unable to access or withdraw underlying position assets, only <1>trading fees earned will remain claimable.","nft_mint":"NFT Mint:","lock_liquidity_permanently":"Lock Liquidity Permanently?","pool_position_nft":" position NFT:","lock_agree_text":"By confirming below, I agree to permanently lock liquidity. I understand access to the underlying assets will be lost forever.","lock_to_confirm":"To confirm, type the following:","lock_confirm_text":"I confirm, permanently lock my liquidity forever","confirm_lock_liquidity_permanently":"Confirm, Lock Liquidity Permanently","lock_cpmm_positions_empty":"You do not currently have any open standard AMM positions","lock_clmm_positions_empty":"You do not currently have any open CLMM positions","total_locked_position":"Total locked liquidity in this pool: {{percent}}","position_locked_success":"Position locked successfully!","nft_desc":"A new NFT is now in your wallet and represents the right to claim trading fees from the locked position. ONLY the NFT holder can claim fees.","dont_burn_nft":"DO NOT burn this NFT or you will lose the ability to claim fees forever! If you send the NFT to another wallet, only the new wallet will be able to claim fees.","claim_fee":"Claim Fee","claim_fees":"Claim Fees","total_fees_locked_liquidity":"Total fees from locked liquidity:","locked_liquidity":"Locked Liquidity","locked_liquidity_tooltip":"You previously permanently locked the LP tokens for this position, however trading fees earned are still fully claimable.","pending_fees":"Pending fees","locked_lp_amount":"Locked LP Amount","approx_lp_fees":"Approx LP Fees","approx_fee_breakdown":"Approx Fee breakdown","show_more":"Show more","pool_detail":"Pool detail","tab_manual":"Manual","tab_auto":"Auto"},"create_pool":{"modal_title":"I want to...","pool_type":"Pool type:","modal_tab_standard_amm":"Standard AMM","modal_tab_standard_amm_desc":"Newest CPMM, cheaper, supports Token 2022","modal_tab_legacy_amm":"Legacy AMM v4","modal_tab_legacy_amm_desc":"Legacy AMM program, more expensive due to orderbook market requirement","modal_tab_concentrated":"Concentrated Liquidity","modal_tab_concentrated_desc":"Custom ranges, increased capital efficiency","modal_section_header_pool":"Create pool","modal_section_header_pool_desc":"Select pool type to create a pool for any token pair. Read the guide for <0>CLMM or <1>Standard pools.","modal_section_header_pool_desc_link":"detailed guide","modal_section_header_farm":"Creating a farm","modal_section_header_farm_desc":"Create a farm for any live pool. Read the instructions for <0>CLMM or <1>Standard farms.","modal_section_header_lock":"Burn & Earn","modal_section_header_lock_desc":"Permanently burn/lock liquidity for an existing position. Trading fees remain claimable. <0>Learn more","clmm_please_note":"Please Note","clmm_please_note_des":"This tool is for advanced users. For detailed instructions, read the guide for <0>CLMM pools.","clmm_create_pool_note_step1":"First, select tokens & fee tier","clmm_create_pool_note_step2":"Next, set initial token price & position price range","clmm_create_pool_note_step3":"Last, please enter token deposit amount","pool_existed":"Pool existed","clmm_create_pool_success_title":"Pool created & position added successfully!","clmm_create_pool_success_content":"Your pool may take a few minutes before appearing in the pool list. Please kindly wait and refresh the page, and then search the pool list for your pool before attempting to create a farm.","clmm_create_pool_fullrange_success_title":"Pool and position created successfully","clmm_create_pool_fullrange_success_content":"Token creators can now burn/lock liquidity permanently while trading fees earned remain fully claimable."},"farm":{"create":"Create Farm","show_closed":"Show closed","title_farm_created_success":"Create Farm TX success!!","info_farm_created_success":"Farm created successfully!","to_my_created_farms":"Go to My Created Farms","farm_id":"Farm ID"},"clmm":{"total_deposit":"Total Deposit","my_range":"My Range","nft_mint_address":"NFT Mint Address","nft_mint":"NFT Mint","in_range":"In Range","out_of_range":"Out of Range","create_new_position":"Create New Position","position":"Position","set_price_range":"Set Price Range","time_price_range":"{{time}} Price Range","match_deposit_ratio":"Match Deposit Ratio","add_deposit_amount":"Add Deposit Amount","match_deposit_ratio_tooltip":"When turned on, token amounts will be automatically swapped to the deposit ratio needed to create your position","deposit_ratio":"Deposit Ratio","select_token_fee_tier":"Select token & fee tier","set_initial_price_range":"Set initial price & range","enter_deposit_amount":"Enter deposit amount","best_for_very_stable":"Best for very stable pairs","best_for_stable":"Best for stable pairs","best_for_most_pair":"Best for most pairs","best_for_exotic_pair":"Best for exotic pairs","price_setting":"Price Setting","initial_price":"Initial price","price_range":"Price range","preview_deposit":"Preview Deposit","selected_range":"Selected Range","min_price":"Min Price","max_price":"Max Price","confirm_deposit":"Confirm Deposit","you_will_receive":"You will receive:","pooled_assets":"Pooled assets","pending_rewards":"Pending rewards","no_clmm_positions":"You don\'t have any concentrated liquidity positions.","current_position":"Current position","deposit_successful":"Deposit successfully","nft_desc":"A new NFT representing your Concentrated Liquidity position is now in your wallet.","dont_burn_nft":"DO NOT burn this NFT or you will be unable to remove liquidity! If you send the NFT to another wallet, only the new wallet will be able to remove liquidity.","view_my_positions":"View my positions","input_lock_desc":"The market price is outside your specified price range. Single asset deposit only.","modal_header_add_liquidity_to":"Add Liquidity","modal_header_remove_liquidity":"Remove Liquidity","close_position":"Close Position","position_closed":"Position Closed","close_mint_position":"Close {{mint}} position.","full_range":"Full Range","custom":"Custom","start_now":"Start Now","price_away_from_market":"Pool price is {{percent}} away from market","price_away_from_market_tooltip":"The pool price is imbalanced for this pair. Adding a small amount of liquidity in a wide range can bring the price closer to the current market price.","low_liquidity":"Low Liquidity: ","low_liquidity_desc":"Your deposit is large relative to current liquidity in the pool, which may lead to arbitrage on your position. If the quoted price is far from market price, this risk may be magnified.","timebasis_day_label":"24 hour ","timebasis_week_label":"7 day ","timebasis_month_label":"1 month ","type_confirm_text":"Type confirmation text here","no_nft":"Failed to fetch NFT","select_provider":"Select Provider","select_strategy":"Select Strategy"},"migrate_clmm":{"title":"Migrate to Concentrated Liquidity pool","desc":"Migrate below or learn more about CLMM pools and risks","desc_link":"here","quick_migration":"Quick migration","quick_migration_desc":"Very wide price range for a more passive strategy.","custom_migration":"Custom migration","custom_migration_desc":"Set a custom price range for higher capital efficiency.","heading_clmm_pool":"CLMM Pool","heading_price_range":"Price Range","current_price":"Current price","current_position":"Current position","clmm_pool":"CLMM Pool","wallet":"Wallet","footer_note":"* Migrate will also harvest","footer_note_2":"in pending rewards.","migrate_clmm_tx_title":"Migrate to CLMM","migrate_clmm_tx_desc":"Migrate {{mint}} to CLMM position."},"portfolio":{"title":"Portfolio","hero_title":"My Portfolio","assets_by_pool":"Assets by pool","assets_by_token":"Assets by token","idle_tokens":"Idle tokens","harvest_all_label":"Pending Yield","harvest_all_tooltip":"\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16description for harvest all","harvest_all_button":"Harvest All","section_overview":"Overview","section_boost":"My Boost Rewards","claim_all_label":"Weekly SEI Boost Rewards","claim_all_tooltip":"SEI Rewards are claimable next Monday","claim_all_button":"Claim All","section_positions":"My positions","section_positions_tab_clmm":"Concentrated","section_positions_tab_standard":"Standard","section_positions_tab_staking":"Staked RAY","section_positions_clmm_switch_direction_tooltip":"Base/quote tokens have been switched to simplify data display.","section_positions_clmm_account_view_less":"View Less","section_positions_clmm_account_nft_mint_address":"NFT Mint Address","section_positions_clmm_account_pending_yield":"Pending Yield","section_positions_clmm_account_pending_yield_button":"Harvest","section_rewards":"My Boost Rewards","section_my_created_farms":"My created farms","section_department_tab_clmm":"CLMM","section_department_tab_standard":"Standard","section_department_tab_staked_ray":"Staked RAY","section_department_tab_all":"All Type","section_my_created_farms_item_edit_farm_button":"Edit Farm","no_staked_farm":"You don\'t have any staked RAY.","no_standard_positions":"You don\'t have any standard liquidity positions.","stake_item_stake_button":"Stake","stake_item_migrate_button":"Migrate","acceleraytor":"Acceleraytor","acceleraytor_desc":"You have unclaimed funds from AcceleRaytor. Remaining funds can be claimed below.","acceleraytor_banner_desc":"You have unclaimed funds in AcceleRaytor. Check details at the bottom of this page and claim funds with one click.","acceleraytor_tx_title":"AccelerRaytor Claim","acceleraytor_tx_desc":"Claim {{amountA}} {{symbolA}}","acceleraytor_tx_1_desc":"Claim {{amountA}} {{symbolA}} and {{amountB}} {{symbolB}}","load_more":"Load More","id":"ID","pool_boost_rewards":"Weekly Boost Rewards","section_rewards_tab_lp":"LP","section_rewards_tab_trading":"Trading"},"amm":{"staked":"Staked","pending_reward":"Pending rewards","pending_reward_button":"Harvest","pending_alert":"You have unstaked LP tokens that could be staked in a farm. Stake now","pooled_token":"Pooled {{token}}","farm_ended":"Farm Inactive","farm_unstaked":"Unstaked LP","position":"Position"},"staking":{"title":"Staking","pending_reward":"Pending Rewards","pending_rewards":"Pending Rewards","staked":"Staked","APR":"APR","liquidity":"Liquidity","available":"Available {{symbol}}","pending_rewards_tooltip":"Pending rewards are calculated based on the current pool size and the time since the last harvest.","pending_rewards_button":"Harvest","staking_desc":"Stake RAY to earn additional RAY yield.","unstake_modal_header":"Unstake {{symbol}}","unstake_modal_confirm_text":"Unstake {{symbol}}","stake_modal_header":"Stake {{symbol}}","stake_modal_confirm_text":"Stake {{symbol}}","alert_empty_token":"Insufficient RAY balance","my_staked_ray":"My Staked RAY"},"wallet":{"connected_hint":{"portfolio_info":"Connect wallet to see your asset distribution.","portfolio_idle":"Connect wallet to see your deposited assets.","portfolio_position":"Connect wallet to see your positions."}},"error":{"should_input_valid_minimum_order_size":"Input a valid minimum order size","should_input_valid_price_tick":"Input a valid price tick size","select_quote_token":"Select quote token","select_base_token":"Select base token","enter_upper_price":"Enter upper price","enter_lower_price":"Enter lower price","enter_max_price":"Enter max price","enter_min_price":"Enter min price","invalid_max_price":"Invalid max price","invalid_min_price":"Invalid min price","enter_current_price":"Enter current price","enter_order_size":"Enter order size","enter_price_tick":"Enter price tick size","select_pool_fee":"Select pool fee tier","select_pool_token_1":"Select pool token 1","select_pool_token_2":"Select pool token 2","pool_not_found":"Pool not found","balance_not_enough":"Insufficent balance","select_reward_token":"Select reward token","enter_token_amount":"Enter Token Amount","insufficient_sub_balance":"Insufficient {{token}} balance","no_matches":"No matches.","no_pools_found":"No pools found","decrease_reward":"Decreasing the reward rate is permitted within 72 hours of current farm end time.","decrease_reward_72h":"Decreasing reward rate is permitted within 72 hrs of current farm end time. Try adding more tokens.","add_reward_days":"Time extended must be a minimum 7 days and maximum 90 days.","insufficient_duration":"Insufficient farm duration","emission_rewards_low":"Reward emissions are lower than the min required","start_time_should_later":"Start time cannot be set to a time in the past.","balance_not_enough_token":"{{side}} token balance is insufficient","should_input_positive_amount":"Input an amount of {{side}} greater than zero","select_token":"Select {{side}} token","enter_starting_price":"Enter starting price","is_amount_valid":"is amount valid","api_error":"API request error","rpc_error":"Rpc request error","no_liquidity_data":"There is no liquidity data.","pool_liquidity_appear":"Pool liquidity will appear here.","liquidity_data_not_available":"Liquidity data not available.","cannot_find_pool":"Can\'t find the pool you\'re looking for? Try entering the token address or check the pool lists below.","no_chart_data":"No data for this chart.","no_chart_data_hint":"Please wait for a moment or try refreshing the page.","liquidity_not_enough":"Liquidity not enough","swap_slippage_error_title":"Swap failed due to slippage error!","swap_slippage_error_desc":"Slippage has exceeded user settings.\\nTry again or adjust your slippage tolerance.","initial_liquidity_low":"Initial liquidity is too low, try increasing the amount.","amm_not_support_2022":"Amm V4 pool does not support token 2022","farm_not_support_2022":"Farm does not support token 2022","pool_existed":"Pool has existed","no_price":"Please connect wallet to view the liquidity data"},"input":{"max_button":"Max","search_for_a_pair_or_enter_amm_id":"Search for a pair or enter AMM ID","enter_search_token":"Search for token.","search_amm_title":"Search for a pair or paste AMM ID","placeholder_input_amm_id":"input AmmId / TVL","enter_custom_value":"Enter custom value"},"date_picker":{"farm_will_end_at":"Farm will end at","farm_period":"Farm period","start_on":"Start on","start_at":"Start at","duration":"Duration"},"transaction":{"title":"Transaction","sent":"Sent","processed":"Processed","failed":"Transaction Failed","completed":"Transaction completed successfully!","view_detail":"View transaction details","confirmed":"Confirmed","send_failed":"Send Transaction Failed","send_success":"Send Transaction Successfully","transaction_initiating":"Transaction initiating","multisig_wallet":"Multisig Wallet","multisig_wallet_initiation":"Transaction initiation","multisig_wallet_initiated":"Transaction initiated.","multisig_wallet_desc":"You can now cast votes for this proposal on the Squads app.","sending":"Sending..","send_timeout":"Send transaction timeout"},"edit_farm":{"button":"Edit","title":"Edit Farm","farm_id":"Farm id","please_note_title":"Please note","please_note_content":"You can add more tokens and/or extend the farming period. Any action that will decrease the reward rate can only be done within 72 hours of current farm end time, and the period must be extended by at least 7 days.","tour_note_title":"How to add more rewards?","tour_note_des_1":"1. Rewards allocated to farms cannot be withdrawn after farming starts.","tour_note_des_2":"2. If you want to increase the reward rate, additional rewards can be added while a farm is still running. The period must be extended by at least 7 days.","tour_note_des_3":"3. If you want to decrease the rewards rate, this can only be done 72 hours before the end of the current farming period, and the period must be extended by at least 7 days.","title_des":"Before creating a farm, make sure to check the","title_des_link":"detailed guide","subtitle_pool":"Pool","subtitle_farm_reward":"Farm reward","farming_start":"Farming starts","farming_end":"Farming ends","open_date_picker":"Select","time_day":"Days","modal_add_another_token":"Add another token","estimated_rewards_week":"Estimated rewards / week","days_extends":"Days Extends","box_header_updated_rewards":"Updated rewards","box_header_current_rewards_period":"Current rewards period","box_header_rewards_adjustment":"Rewards adjustment","box_header_adjust_rewards":"Adjust rewards","box_header_remaining_amount":"Remaining amount","remaining_days":"{{days}}D remaining","rate":"Rate","per_week":"/week","APR":"APR","loading_text_no_farm":"Farm not found","loading_text_farm_not_editable":"Farm is not editable","claim_unemmitted_rewards":"Claim Unemmitted Rewards","button_adjust_rewards":"Adjust rewards","button_add_more_rewards":"Add More Rewards"},"recent_transaction":{"another_wallet":"Another wallet","recent_transactions":"Recent transactions","view_all":"View all"},"transaction_history":{"name_add_liquidity":"Add Liquidity","add_liquidity_desc":"Added {{amountA}} {{symbolA}} and {{amountB}} {{symbolB}}.","name_remove_liquidity":"Remove Liquidity","remove_liquidity_desc":"Removed {{amountA}} {{symbolA}} and {{amountB}} {{symbolB}}.","name_harvest":"Harvest","set_up":"Setup","clean_up":"Cleanup","name_swap":"Swap","desc_swap":"Swap {{amountA}} {{symbolA}} for {{amountB}} {{symbolB}}.","description_remove_liquidity":"Remove {{token1}} balabalabala\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16","liquidity_staked_title":"Liquidity Staked","liquidity_staked_desc":"Staked {{amount}} {{symbol}}","liquidity_unstaked_title":"Withdraw Staked Liquidity","liquidity_unstaked_desc":"Unstaked {{amount}} {{symbol}}","harvest_reward_title":"Harvest Rewards","harvest_clmm_reward_desc":"Harvest Clmm Rewards","harvest_farm_reward_desc":"Harvest Farm Rewards","harvest_lock_reward_desc":"Harvest Locked Position Rewards","update_reward_title":"Update rewards","update_reward_desc":"Update rewards in {{pool}}","create_pool":"Create pool","create_clmm_pool":"create clmm pool","open_pool_position":"Open pool position","open_clmm_pool_position":"Open CLMM pool position","create_farm":"Create new farm","create_clmm_farm_desc":"ID: {{poolId}}","harvest_rewards":"Harvested Rewards","harvest_rewards_desc":"Harvested: {{symbol}}","lock_position":"Lock Position","position_locked":"Position {{position}} locked"},"create_standard_pool":{"step_1":"Step 1","step_1_name":"Create Market","step_2":"Step 2","step_2_name":"Initialize Liquidity Pool","please_note":"Please Note","please_note_des":"This tool is for advanced users. For detailed instructions, read the guide for <0>CLMM or <1>Standard pools.","enter_open_book_market_id":"Enter OpenBook Market ID","market_id":"Market ID","note_has_id":"OpenBook integrated pools must be linked to a unique OpenBook Market ID. A Market ID can only be used for one pool.","have_id":"I have an ID","no_id":"Create ID","friendly_sentence_1":"First, you need a Market ID","friendly_sentence_2":"Almost there! \\nNow enter the initial pool settings","note_done":"Your pool has been created successfully!","note_done_2":"You can now create a farm or go back","current_price":"Current price","initial_liquidity":"Initial liquidity","initialize_cpmm_pool":"Initialize CPMM pool","initialize_amm_v4_pool":"Initialize AMM v4 pool","base_token_initial_liquidity":"Base token initial liquidity","quote_token_initial_liquidity":"Quote token initial liquidity","market_open_book_id":"OpenBook Program ID","market_create_orderbook":"Create an OpenBook Market ID below:","market_tokens":"Tokens","market_min_order_size":"Minimum Order size","market_min_order_size_label":"Min order size","market_min_order_size_tip":"This is the smallest allowed order size.","market_price_tick":"Price tick","market_price_tick_label":"Min price tick size","market_price_tick_tip":"This is the smallest amount by which prices can move.","market_advance_options":"Advanced options","market_advance_options_desc":"Configure sizes for different accounts to adjust rent cost.","market_event_queue":"Event queue","market_request_queue":"Request Queue","market_orderbook":"Orderbook","market_create_button":"Create Market","market_create_note":"Note that creating a new market can cost anywhere from 3 - 4 SOL","market_create_note_highlight":"3 - 4 SOL","button_create_farm":"Create Farm","button_to_my_pools":"Back to My Pools","button_initialize_liquidity_pool":"Initialize Liquidity Pool","pool_create_integrated_with_openbook":"To create a pool that is integrated with an OpenBook market, click ","pool_create_integrated_with_openbook_link":"here","initial_price_tooltip":"Initial price is set by the ratio of tokens deposited for initial liquidity. If the token is already trading on Sailor Finance, initial price will be auto-filled with the current price.","pool_creation_fee_note":"Note: A creation fee of {{subject}} SOL is required for new pools.","pool_creation_fee_tooltip":"A pool creation fee of 0.15 SOL is currently reserved to support front and backend infrastructure. Approximately 0.05 SOL is required for program account creation and network fees.","pool_ammv4_creation_fee_tooltip":"A pool creation fee of 0.40 SOL is currently reserved to support front and backend infrastructure. Approximately 0.3 SOL is required for OpenBook Market rent and program account creation.","custom":"Custom","start_now":"Start Now","current_price_tooltip":"This is the current price of an existing pool on Sailor. You can still enter a different initial price but be aware this may lead to arbitrage if the price difference is large."},"create_farm":{"weekly_rewards":"Weekly Rewards","unemmitted_rewards":"Unemmitted Rewards","select_pool":"Select Pool","concentrated_liquidity":"Concentrated Liquidity","standard_amm":"Standard AMM","select_from_your_created_pools":"Select from your created pools","select_from_your_created_pools_tooltip":"The farm will be created for the selected pool","item_reward_tooltip":"\uD83E\uDD16","foot_note":"Can\'t find what you want?","foot_note_link":"Create a new pool","step_1":"Step 1","step_1_name":"Select Pool","step_1_sentence":"First, select a pool for farm rewards","step_2":"Step 2","step_2_name":"Add Rewards","step_2_sentence":"Next, enter rewards for the farm","step_3":"Step 3","step_3_name":"Review Farm Detail","add_another_button_text":"Add another","add_another_button_text_2":"Add another reward token","done":"done","pool":"Pool","period":"Period","farming_rewards":"Farming rewards","button_create_farm":"Create Farm","error_text_create_farm":"User must have 300 RAY","please_note":"Please Note","please_note_des":"Rewards allocated to farms cannot be withdrawn after farming starts. Newly created farms generally appear on Sailor Finance 10-30 minutes after creation, depending on Solana network status.","note_des":"A farm can be created for any pool that is already live. For detailed instructions, read the guide for <0>CLMM or <1>Standard farms.","add_reward_token":"You can add up to 3 reward tokens.","estimated_rewards_week":"Estimated rewards / week"},"acceleraytor":{"unclaim":"Unclaim"},"apr_dialog":{"modal_title":"APR Calculation Method","desc":"Two methods for calculating estimated APR are available, based on historical trade fees and emissions. Only positions in range earn yield. Past performance is not indicative of future results.","warning_note":"Calculations are an estimate and only for reference.","mode_D_title":"Delta Method","mode_D_desc":"This method uses the implied change (delta) in pool liquidity, as determined by the user\'s price range and position size, to calculate estimated APR.","mode_D_desc_brief":"Estimated APR is calculated by the Delta Method. Click the \'D\' icon to switch to the Multiplier Method or","mode_M_title":"Multiplier Method","mode_M_desc":"This method applies a multiplier, determined by the intersection of user price range and the historical price range of the pool, to calculate estimated APR.","mode_M_desc_brief":"Estimated APR is calculated by the Multiplier Method. Click the \'M\' icon to switch to the Delta Method or"},"create_market":{"title":"Create Market","desc":"Create {{pair}} Market","create":"Create"},"moonpay":{"title":"MoonPay","phantom_wallet_not_installed":"Install Phantom and connect your wallet to log in.","deposit_using":"Deposit using ","step1":"step 1","step2":"step 2","step3":"step 3","step1_text":"Sign-up or login with Phantom.","step2_text":"Buy Solana with MoonPay to top up your trading account.","step3_text":"Buy & sell any token with one-click on Sailor Finance."},"disclaimer":{"title":"Disclaimer","text1":"This website-hosted user interface (this \\"Interface\\") is an open source frontend software portal to the Sailor Finance protocol, a decentralized and community-driven collection of blockchain-enabled smart contracts and tools (the \\"Sailor Finance Protocol\\"). This Interface and the Sailor Finance Protocol are made available by the Sailor Finance Holding Foundation, however all transactions conducted on the protocol are run by related permissionless smart contracts. As the Interface is open-sourced and the Sailor Finance Protocol and its related smart contracts are accessible by any user, entity or third party, there are a number of third party web and mobile user-interfaces that allow for interaction with the Sailor Finance Protocol.","text2":"THIS INTERFACE AND THE SAILOR FINANCE PROTOCOL ARE PROVIDED \\"AS IS\\", AT YOUR OWN RISK, AND WITHOUT WARRANTIES OF ANY KIND. The Sailor Finance Holding Foundation does not provide, own, or control the Sailor Finance Protocol or any transactions conducted on the protocol or via related smart contracts. By using or accessing this Interface or the Sailor Finance Protocol and related smart contracts, you agree that no developer or entity involved in creating, deploying or maintaining this Interface or the Sailor Finance Protocol will be liable for any claims or damages whatsoever associated with your use, inability to use, or your interaction with other users of, this Interface or the Sailor Finance Protocol, including any direct, indirect, incidental, special, exemplary, punitive or consequential damages, or loss of profits, digital assets, tokens, or anything else of value.","text3":"The Sailor Finance Protocol is not available to residents of Belarus, the Central African Republic, The Democratic Republic of Congo, the Democratic People\'s Republic of Korea, the Crimea, Donetsk People\'s Republic, and Luhansk People\'s Republic regions of Ukraine, Cuba, Iran, Libya, Somalia, Sudan, South Sudan, Syria, the USA, Yemen, Zimbabwe and any other jurisdiction in which accessing or using the Sailor Finance Protocol is prohibited (the \\"Prohibited Jurisdictions\\").","text4":"By using or accessing this Interface, the Sailor Finance Protocol, or related smart contracts, you represent that you are not located in, incorporated or established in, or a citizen or resident of the Prohibited Jurisdictions. You also represent that you are not subject to sanctions or otherwise designated on any list of prohibited or restricted parties or excluded or denied persons, including but not limited to the lists maintained by the United States\' Department of Treasury\'s Office of Foreign Assets Control, the United Nations Security Council, the European Union or its Member States, or any other government authority.","agree_terms":"Agree to terms","enter_raydium":"Enter Sailor Finance"},"bridge":{"title":"Bridge"},"referral":{"using_code":"Using referral code","active_code_tooltip":"The referral code being used by your current wallet"}}')},55117:function(e){"use strict";e.exports=JSON.parse('{"common":{"language":"Idioma","playground":"\xe1rea principal","disabled":"Deshabilitado","all":"Todo","search_all":"Buscar todo","layout":"Dise\xf1o","list":"lista","grid":"cuadr\xedcula","time_base":"Base de tiempo","more":"M\xe1s","view_chart":"Ver gr\xe1fico","tvl":"TVL","volume":"Volumen","rewards":"Recompensas","amount":"Cantidad","pools":"Piscinas","nft_address":"Direcci\xf3n NFT","copy_success":"\xa1Copiado con \xe9xito!","copied":"Copiado","copied_desc":"{{subject}} ha sido copiado al portapapeles","week":"Semana","per_unit":"{{subA}} por {{subB}}","per_unit_2":"{{subA}}/{{subB}}","price":"Precio","token_price":"Precio de {{token}}","unit_step":"Paso {{num}}","back":"Atr\xe1s","select_a_token":"Seleccionar un token","popular_tokens":"Tokens populares","balance":"Saldo","address":"Direcci\xf3n","view_token_list":"Ver lista de tokens","token_list_settings":"Configuraci\xf3n de lista de tokens","select":"Seleccionar","subject_price":"Precio de {{subject}}","base_token":"Token base","quote_token":"Token de cotizaci\xf3n","go_to_pools":"Ir a las piscinas","add":"A\xf1adir","view_more":"Ver m\xe1s","view_less":"Ver menos","nav_text_more":"M\xe1s","nav_text_docs":"Documentos","nav_text_feedback":"Comentarios","estimated_APR":"APR estimado","route_go":"Ir>>","more_info":"M\xe1s informaci\xf3n","less_info":"Menos informaci\xf3n","tokens":"Tokens","amm_id":"ID AMM","market_id":"ID de mercado","lp":"LP","fees":"Tarifas","reward":"Recompensa","successfully":"Exitosamente","token":"Token","token_list":"Lista de tokens","learn_more":"Aprende m\xe1s"},"button":{"deposit":"Depositar","close":"Cerrar","delete":"Eliminar","cancel":"Cancelar","continue":"Continuar","confirm":"Confirmar","edit":"Editar","search":"Buscar","reset":"Reiniciar","stake":"Apostar","unstake":"Retirar apuesta","harvest":"Cosechar","save":"Guardar","claim":"Reclamar","not_now":"Ahora no","switch":"Cambiar","back":"Atr\xe1s","next_step":"Siguiente paso","migrate":"Migrar","connect_wallet":"Conectar billetera"},"badge":{"suggested":"Sugerido","new":"Nuevo","ongoing":"En curso","ended":"Finalizado","updated":"Actualizado","ecosystem":"Ecosistema","fusion":"Fusi\xf3n","raydium":"Raydium"},"setting_board":{"panel_title":"Configuraci\xf3n","default_explorer":"Explorador predeterminado","default_explorer_tooltip":"Seleccione el explorador de bloques preferido","rpc_connection":"Conexi\xf3n RPC","rpc_connection_tooltip":"Seleccione el punto final RPC preferido","color_theme":"Tema de color","slippage_tolerance":"Tolerancia al deslizamiento","slippage_tolerance_tooltip":"Seleccione la tolerancia m\xe1xima al deslizamiento","language":"Idioma","language_tooltip":"Seleccione el idioma preferido","versioned_transaction":"Transacci\xf3n versionada","versioned_transaction_tooltip":"La transacci\xf3n versionada es una actualizaci\xf3n significativa que permite funcionalidades adicionales, incluyendo enrutamiento avanzado de swaps. Antes de activar Tx versionada, aseg\xfarese de que su billetera sea compatible.","custom":"Personalizado"},"wallet_connect_panel":{"title":"Conecta tu billetera a Raydium","desc":"Al conectar tu billetera, reconoces que has le\xeddo, entendido y aceptado los t\xe9rminos del","desc_link":"descargo de responsabilidad","choose_network":"Elige la red","choose_wallet":"Elige la billetera","show_uninstalled_wallets":"Mostrar billeteras no instaladas","tour_title":"\xbfNuevo por aqu\xed?","tour_desc":"Comienza en Raydium","disconnect":"Desconectar"},"token_selector":{"search_placeholder":"Buscar por token o pegar direcci\xf3n","jupiter_types_all":"TODOS","jupiter_types_strict":"Estricto"},"field":{"24h_volume":"Volumen 24H","24h_fees":"Tarifas 24H","24h_apr":"APR 24H","7d_volume":"Volumen 7D","7d_fees":"Tarifas 7D","7d_apr":"APR 7D","30d_volume":"Volumen 30D","30d_fees":"Tarifas 30D","30d_apr":"APR 30D","total_apr":"APR total","trade_fees":"Tarifas de trading","weekly_rewards":"Recompensas semanales","fee_tier":"Nivel de tarifa","fee":"Tarifa","current_price":"Precio actual","apr":"APR","min":"M\xedn","max":"M\xe1x","start_time":"Hora de inicio"},"swap":{"title":"Intercambiar","from_label":"Desde","to_label":"A","info_minimum_received":"M\xednimo recibido","info_minimum_received_tooltip":"El n\xfamero m\xednimo de tokens que recibir\xe1s. Esto est\xe1 determinado por tu tolerancia al deslizamiento.","info_order_routing":"Enrutamiento de \xf3rdenes","info_order_routing_tooltip":"Esta ruta dio el mejor precio para tu intercambio","info_price_impact":"Impacto de precio","info_price_impact_tooltip":"La diferencia entre el precio actual del mercado y el precio estimado debido al tama\xf1o de la operaci\xf3n","info_estimated_fees":"Tarifas estimadas","info_estimated_fees_tooltip":"Las tarifas de intercambio van a los LP, recompras de RAY y al tesoro.","alert_price_updated":"Precio actualizado","alert_price_updated_tooltip":"El precio ha cambiado desde que ingresaste la cantidad de intercambio.","alert_price_updated_button":"Aceptar","pool_not_found":"Piscina no encontrado","pool_loading":"Cargando piscina..."},"liquidity_pools":{"view_chart_tooltip":"Ver gr\xe1ficos de la piscina","chart_tab_volume":"Volumen","chart_tab_liquidity":"Liquidez","chart_tooltip_volume":"volumen","modal_header_standard_position_detail":"Detalles de posici\xf3n est\xe1ndar","farms":"Granjas"},"liquidity":{"title":"Liquidez","pools":"Piscinas de liquidez","pool_info":"Informaci\xf3n de las piscina","pools_desc":"Proporciona liquidez, gana rendimiento.","concentrated":"Concentrado","standard":"Est\xe1ndar","pool":"Piscina","fee_rate":"Tasa de comisi\xf3n","show_farms":"Mostrar granjas","create_pool":"Crear","create_pool_mobile":"crear","create_pool_tx_title":"Crear piscina","create_pool_tx_desc":"crear piscina {{mintA}} - {{mintB}}","value":"valor","select_type":"Seleccionar tipo de piscina","select_farm":"Seleccionar granja","stake_liquidity":"Apostar liquidez","unstake_liquidity":"Retirar liquidez apostada","add_liquidity":"A\xf1adir liquidez","remove_liquidity":"Remover liquidez","withdraw_liquidity":"Retirar liquidez","pool_liquidity":"Liquidez de la piscina","pooled":"Pooled","pool_not_found":"Piscina no encontrada","total_apr_7d":"APR total 7D","my_position":"Mi posici\xf3n","APR":"APR","APR_tooltip":"APR estimado basado en las tarifas de trading ganadas por la piscina en las \xfaltimas 24H","my_lp_balance":"Mi saldo LP","lp_token_balance":"Saldos de tokens LP","staked_liquidity":"Liquidez apostada","unstaked_liquidity":"Liquidez no apostada","rewards_to_be_harvested":"Recompensas por cosechar","assets_to_be_received":"Activos por recibir","staked":"Apostado","unstaked":"No apostado","auto_swap":"Intercambio autom\xe1tico","total_deposit":"Dep\xf3sito total","stakeable_hint":"No tienes tokens LP apostados en esta piscina. Puedes apostarlos directamente en la pesta\xf1a Apostar Liquidez.","auto_swap_hint":"Cuando el intercambio autom\xe1tico est\xe1 activado, las cantidades de tokens se intercambiar\xe1n autom\xe1ticamente a la proporci\xf3n de dep\xf3sito necesaria para crear tu posici\xf3n.","auto_swap_modal":{"turn_on_title":"\xbfActivar intercambio autom\xe1tico?","turn_off_title":"\xbfDesactivar intercambio autom\xe1tico?","turn_on_description":"Cuando el intercambio autom\xe1tico est\xe1 activado, las cantidades de tokens se intercambiar\xe1n autom\xe1ticamente a la proporci\xf3n de dep\xf3sito necesaria para crear tu posici\xf3n.","turn_off_description":"Cuando el intercambio autom\xe1tico est\xe1 desactivado, los tokens no se intercambiar\xe1n para igualar la proporci\xf3n de dep\xf3sito de tu posici\xf3n. Necesitar\xe1s suficientes tokens en tu billetera para crear una posici\xf3n.","turn_on":"Activar intercambio autom\xe1tico","turn_off":"Desactivar intercambio autom\xe1tico"},"setting_modal":{"title":"Configuraci\xf3n"},"pool_search_modal":{"title":"Buscar piscina"},"pool_fee_desc":"Este es un piscina de liquidez {{type}} de nivel de tarifa {{feeRate}}%","no_active_farm":"No hay granja activa para este piscina.","loading_pool":"Cargando piscina","create_lp":"Crear posici\xf3n","preview_pool":"Previsualizar piscina","want_to_stake_lp":"\xbfQuieres apostar tus LP ahora?","stake_lp_desc":"Apuesta tokens LP en una granja para ganar recompensas adicionales. Tambi\xe9n puedes hacerlo m\xe1s tarde en Portafolio.","assets_to_received":"Activos por recibir","tx_message":{"staked_successfully":"{{symbol}} en staking","staked_desc":"Dejaste en staking {{amount}} {{symbol}}","unStaked_successfully":"Retiraste {{symbol}}","unStaked_desc":"Retiraste {{amount}} {{symbol}} del staking"}},"create_pool":{"modal_title":"Quiero comenzar desde...","modal_tab_label":"Tipo de piscina","modal_tab_standard_amm":"AMM est\xe1ndar","modal_tab_concentrated":"Liquidez concentrada","modal_section_header_pool":"Creando una piscina","modal_section_header_pool_desc":"Crea una piscina de liquidez para cualquier par de tokens. Es muy recomendable leer esta","modal_section_header_pool_desc_link":"gu\xeda detallada","modal_section_header_farm":"Creando una granja","modal_section_header_farm_desc":"Se puede crear una granja para cualquier piscina que ya est\xe9 activa. Es muy recomendable leer esto","modal_section_header_farm_desc_link":"gu\xeda detallada","clmm_please_note":"Nota","clmm_please_note_des":"Esta herramienta es para usuarios avanzados. Antes de crear una granja, se sugiere revisar la","clmm_please_note_des_link":"gu\xeda detallada"},"farm":{"create":"Crear granja","show_closed":"Mostrar cerradas"},"clmm":{"total_deposit":"Dep\xf3sito total","my_range":"Mi rango","nft_mint_address":"Direcci\xf3n de acu\xf1aci\xf3n NFT","nft_mint":"Acu\xf1aci\xf3n NFT","in_range":"En rango","out_of_range":"Fuera de rango","create_new_position":"Crear nueva posici\xf3n","position":"Posici\xf3n","set_price_range":"Establecer rango de precios","time_price_range":"Rango de precios {{time}}","match_deposit_ratio":"Igualar proporci\xf3n de dep\xf3sito","add_deposit_amount":"Agregar cantidad de dep\xf3sito","match_deposit_ratio_tooltip":"Cuando est\xe9 activado, las cantidades de tokens se intercambiar\xe1n autom\xe1ticamente a la proporci\xf3n de dep\xf3sito necesaria para crear tu posici\xf3n","deposit_ratio":"Proporci\xf3n de dep\xf3sito","select_token_fee_tier":"Seleccionar token y nivel de tarifa","set_initial_price_range":"Establecer precio y rango iniciales","enter_deposit_amount":"Ingresar cantidad de dep\xf3sito","best_for_very_stable":"Mejor para pares muy estables","best_for_stable":"Mejor para pares estables","best_for_most_pair":"Mejor para la mayor\xeda de pares","best_for_exotic_pair":"Mejor para pares ex\xf3ticos","price_setting":"Ajuste de precio","initial_price":"Precio inicial","price_range":"Rango de precios","preview_deposit":"Previsualizar dep\xf3sito","selected_range":"Rango seleccionado","min_price":"Precio m\xednimo","max_price":"Precio m\xe1ximo","confirm_deposit":"Confirmar dep\xf3sito","you_will_receive":"Recibir\xe1s","pooled_assets":"Activos agrupados","pending_rewards":"Recompensas pendientes","no_clmm_positions":"No tienes posiciones de liquidez concentrada.","current_position":"Posici\xf3n actual","deposit_successful":"Dep\xf3sito exitoso","nft_desc":"Un nuevo NFT que representa tu posici\xf3n de Liquidez Concentrada ahora est\xe1 en tu billetera.","dont_burn_nft":"NO quemes este NFT o no podr\xe1s remover la liquidez. Si env\xedas el NFT a otra billetera, solo la nueva billetera podr\xe1 remover la liquidez.","view_my_positions":"Ver mis posiciones","input_lock_desc":"El precio del mercado est\xe1 fuera de tu rango de precios especificado. Solo dep\xf3sito de un activo.","modal_header_add_liquidity_to":"Agregar liquidez a","modal_header_remove_liquidity":"Remover liquidez","close_position":"Cerrar posici\xf3n","position_closed":"Posici\xf3n cerrada","close_mint_position":"Cerrar posici\xf3n {{mint}}."},"migrate_clmm":{"title":"Migrar a una piscina de Liquidez Concentrada","desc":"Migra abajo o aprende m\xe1s sobre las piscinas CLMM y sus riesgos","desc_link":"aqu\xed","quick_migration":"Migraci\xf3n r\xe1pida","quick_migration_desc":"Rango de precios muy amplio para una estrategia m\xe1s pasiva.","custom_migration":"Migraci\xf3n personalizada","custom_migration_desc":"Establece un rango de precios personalizado para una mayor eficiencia de capital.","heading_clmm_pool":"Pool CLMM","heading_price_range":"Rango de precios","current_price":"Precio actual","current_position":"Posici\xf3n actual","clmm_pool":"Pool CLMM","wallet":"Billetera","footer_note":"* La migraci\xf3n tambi\xe9n cosechar\xe1","footer_note_2":"las recompensas pendientes.","migrate_clmm_tx_title":"Migrar a CLMM","migrate_clmm_tx_desc":"Migrar a posici\xf3n CLMM."},"portfolio":{"title":"Portafolio","hero_title":"Mi portafolio","assets_by_pool":"Activos por piscina","assets_by_token":"Activos por token","idle_tokens":"Tokens inactivos","harvest_all_label":"Rendimiento pendiente","harvest_all_tooltip":"\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16descripci\xf3n para cosechar todo","harvest_all_button":"Cosechar todo","section_overview":"Visi\xf3n general","section_positions":"Mis posiciones","section_positions_tab_clmm":"Concentradas","section_positions_tab_standard":"Est\xe1ndar","section_positions_tab_staking":"RAY apostado","section_positions_clmm_switch_direction_tooltip":"Los tokens base/cotizaci\xf3n han sido intercambiados para simplificar la visualizaci\xf3n de datos.","section_positions_clmm_account_view_more":"Ver m\xe1s","section_positions_clmm_account_view_less":"Ver menos","section_positions_clmm_account_nft_mint_address":"Direcci\xf3n de acu\xf1aci\xf3n NFT","section_positions_clmm_account_pending_yield":"Rendimiento pendiente","":"\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16descripci\xf3n para rendimiento pendiente","section_positions_clmm_account_pending_yield_button":"Cosechar","section_my_created_farms":"Mis granjas creadas","section_department_tab_clmm":"Concentradas","section_department_tab_standard":"Est\xe1ndar","section_department_tab_all":"Todas","section_my_created_farms_item_edit_farm_button":"Editar granja","no_staked_farm":"No tienes RAY apostado.","no_standard_positions":"No tienes posiciones de liquidez est\xe1ndar.","stake_item_stake_button":"Apostar","stake_item_migrate_button":"Migrar","acceleraytor":"AcceleRaytor","acceleraytor_desc":"Tienes fondos no reclamados en AcceleRaytor. Los fondos restantes se pueden reclamar a continuaci\xf3n.","acceleraytor_banner_desc":"Tienes fondos no reclamados en AcceleRaytor. Consulta los detalles al final de esta p\xe1gina y reclama los fondos con un clic.","acceleraytor_tx_title":"Reclamaci\xf3n del AccelerRaytor","acceleraytor_tx_desc":"Reclamar {{amountA}} {{symbolA}}","acceleraytor_tx_1_desc":"Reclamar {{amountA}} {{symbolA}} y {{amountB}} {{symbolB}}"},"amm":{"staked":"Apostado","pending_reward":"Recompensas pendientes","pending_reward_button":"Cosechar","pending_alert":"Tienes tokens LP no apostados que podr\xedan apostarse en una granja. Apuesta ahora","pooled_token":"{{token}} agrupado","farm_ended":"Granja inactiva","farm_unstaked":"LP no apostado","position":"Posici\xf3n"},"staking":{"title":"Staking","pending_reward":"Recompensas pendientes","pending_rewards":"Recompensas pendientes","staked":"Apostado","APR":"APR","liquidity":"Liquidez","available":"{{symbol}} disponibles","pending_rewards_tooltip":"\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16","pending_rewards_button":"Cosechar","staking_desc":"Apuesta RAY para ganar rendimiento adicional de RAY.","unstake_modal_header":"Retirar apuesta de {{symbol}}","unstake_modal_confirm_text":"Retirar apuesta de {{symbol}}","stake_modal_header":"Apostar {{symbol}}","stake_modal_confirm_text":"Apostar {{symbol}}","alert_empty_token":"Saldo insuficiente de RAY"},"wallet":{"connected_hint":{"portfolio_info":"Conecta tu billetera para ver la distribuci\xf3n de tus activos.","portfolio_idle":"Conecta tu billetera para ver tus activos depositados.","portfolio_position":"Conecta tu billetera para ver tus posiciones."}},"error":{"should_input_valid_minimum_order_size":"Ingresa un tama\xf1o de orden m\xednimo v\xe1lido","should_input_valid_price_tick":"Ingresa un tama\xf1o de tick de precio v\xe1lido","select_quote_token":"Selecciona el token de cotizaci\xf3n","select_base_token":"Selecciona el token base","enter_upper_price":"Ingresa el precio m\xe1ximo","enter_lower_price":"Ingresa el precio m\xednimo","enter_max_price":"Ingresa el precio m\xe1ximo","enter_min_price":"Ingresa el precio m\xednimo","enter_current_price":"Ingresa el precio actual","enter_order_size":"Ingresa el tama\xf1o de la orden","enter_price_tick":"Ingresa el tama\xf1o de tick de precio","select_pool_fee":"Selecciona el nivel de tarifa de la piscina","select_pool_token_1":"Selecciona el token 1 de la piscina","select_pool_token_2":"Selecciona el token 2 de la piscina","pool_not_found":"Piscina no encontrada","balance_not_enough":"Saldo insuficiente","select_reward_token":"Selecciona el token de recompensa","enter_token_amount":"Ingresa la cantidad de tokens","insufficient_sub_balance":"Saldo insuficiente de {{token}}","no_matches":"Sin coincidencias.","no_pools_found":"No se encontraron piscinas","decrease_reward":"Disminuir la tasa de recompensa est\xe1 permitido dentro de las 72 horas previas al tiempo de finalizaci\xf3n actual de la granja.","decrease_reward_72h":"Disminuir la tasa de recompensa est\xe1 permitido dentro de las 72 horas previas al tiempo de finalizaci\xf3n actual de la granja. Intenta agregar m\xe1s tokens.","add_reward_days":"El tiempo extendido debe ser un m\xednimo de 7 d\xedas y un m\xe1ximo de 90 d\xedas.","insufficient_duration":"Duraci\xf3n de granja insuficiente","emission_rewards_low":"Las emisiones de recompensa son menores que el m\xednimo requerido","start_time_should_later":"La hora de inicio no puede ser una hora en el pasado.","balance_not_enough_token":"El saldo de token {{side}} es insuficiente","should_input_positive_amount":"Ingresa una cantidad de {{side}} mayor que cero","select_token":"Selecciona el token {{side}}","enter_starting_price":"Ingresa el precio inicial","is_amount_valid":"\xbfes la cantidad v\xe1lida?","api_error":"Error de solicitud API","no_liquidity_data":"No hay datos de liquidez.","pool_liquidity_appear":"La liquidez de la piscina aparecer\xe1 aqu\xed.","liquidity_data_not_available":"Datos de liquidez no disponibles.","cannot_find_pool":"\xbfNo puedes encontrar la piscina que buscas? Intenta ingresar la direcci\xf3n del token o revisa las listas de las piscinas a continuaci\xf3n.","no_chart_data":"No hay datos para este gr\xe1fico.","no_chart_data_hint":"Espera un momento o intenta actualizar la p\xe1gina."},"input":{"max_button":"M\xe1x","search_for_a_pair_or_enter_amm_id":"Busca un par o ingresa el ID AMM","enter_search_token":"Busca un token o pega la direcci\xf3n mint.","search_amm_title":"Busca un par o pega el ID AMM","placeholder_input_amm_id":"ingresar AmmId / TVL"},"date_picker":{"farm_will_end_at":"La granja terminar\xe1 en"},"transaction":{"title":"Transacci\xf3n","sent":"Enviada","processed":"Procesada","failed":"Fallida","view_detail":"Ver detalles de la transacci\xf3n","confirmed":"Confirmada"},"edit_farm":{"button":"Editar","title":"Editar granja","farm_id":"Id de granja","please_note_title":"Nota","please_note_content":"Puedes agregar m\xe1s tokens y/o extender el per\xedodo de cultivo. Cualquier acci\xf3n que disminuya la tasa de recompensa s\xf3lo se puede hacer dentro de las 72 horas previas al tiempo de finalizaci\xf3n actual de la granja, y el per\xedodo debe extenderse al menos 7 d\xedas.","tour_note_title":"\xbfC\xf3mo agregar m\xe1s recompensas?","tour_note_des_1":"1. Las recompensas asignadas a las granjas no se pueden retirar despu\xe9s de que comience el cultivo.","tour_note_des_2":"2. Si quieres aumentar la tasa de recompensa, se pueden agregar recompensas adicionales mientras la granja a\xfan est\xe1 en funcionamiento. El per\xedodo debe extenderse al menos 7 d\xedas.","tour_note_des_3":"3. Si quieres disminuir la tasa de recompensas, esto solo se puede hacer 72 horas antes del final del per\xedodo de cultivo actual, y el per\xedodo debe extenderse al menos 7 d\xedas.","title_des":"Antes de crear una granja, aseg\xfarate de revisar la","title_des_link":"gu\xeda detallada","subtitle_pool":"Piscina","subtitle_farm_reward":"Recompensa de granja","farming_start":"Inicio de cultivo","farming_end":"Fin de cultivo","open_date_picker":"Seleccionar","time_day":"D\xedas","modal_add_another_token":"Agregar otro token","estimated_rewards_week":"Recompensas estimadas / semana","days_extends":"D\xedas extendidos","box_header_updated_rewards":"Recompensas actualizadas","box_header_current_rewards_period":"Per\xedodo de recompensas actual","box_header_rewards_adjustment":"Ajuste de recompensas","box_header_adjust_rewards":"Ajustar recompensas","box_header_remaining_amount":"Cantidad restante","remaining_days":"{{days}}D restantes","rate":"Tasa","per_week":"/semana","APR":"APR","loading_text_no_farm":"Granja no encontrada","loading_text_farm_not_editable":"La granja no es editable","claim_unemmitted_rewards":"Reclamar recompensas no emitidas","button_adjust_rewards":"Ajustar recompensas","button_add_more_rewards":"Agregar m\xe1s recompensas"},"recent_transaction":{"another_wallet":"Otra billetera","recent_transactions":"Transacciones recientes","view_all":"Ver todo"},"transaction_history":{"name_add_liquidity":"A\xf1adir liquidez","add_liquidity_desc":"A\xf1adidas {{amountA}} {{symbolA}} y {{amountB}} {{symbolB}}.","name_remove_liquidity":"Remover liquidez","remove_liquidity_desc":"Removidas {{amountA}} {{symbolA}} y {{amountB}} {{symbolB}}.","name_harvest":"Cosechar","name_swap":"Intercambiar","description_remove_liquidity":"Remover {{token1}} balabalabala\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16","liquidity_staked_title":"Liquidez apostada","liquidity_staked_desc":"Apostados {{amount}} {{symbol}}","liquidity_unstaked_title":"Retirar liquidez apostada","liquidity_unstaked_desc":"Retirados {{amount}} {{symbol}}","harvest_reward_title":"Cosechar recompensas","harvest_clmm_reward_desc":"Cosechar recompensas CLMM","harvest_farm_reward_desc":"Cosechar recompensas de granja","update_reward_title":"Actualizar recompensas","update_reward_desc":"Actualizar recompensas en {{pool}}","create_pool":"Crear piscina","create_clmm_pool":"crear piscina clmm","open_pool_position":"Abrir posici\xf3n de piscina","open_clmm_pool_position":"Abrir posici\xf3n de piscina CLMM","create_farm":"Crear nueva granja","create_clmm_farm_desc":"ID: {{poolId}}","harvest_rewards":"Recompensas cosechadas","harvest_rewards_desc":"Cosechado: {{symbol}}"},"create_standard_pool":{"step_1":"Paso 1","step_1_name":"Crear mercado","step_2":"Paso 2","step_2_name":"Inicializar piscina de liquidez","please_note":"Nota","please_note_des":"Se puede crear una granja para cualquier piscina que ya est\xe9 activo. Se sugiere leer esta","please_note_des_link":"gu\xeda detallada","enter_open_book_market_id":"Ingresar ID de mercado OpenBook","market_id":"ID de mercado","note_has_id":"Las piscinas integrados de OpenBook deben estar vinculados a un ID de mercado OpenBook \xfanico. Un ID de mercado solo se puede usar para una piscina.","have_id":"Tengo un ID","no_id":"Crear ID","friendly_sentence_1":"Primero, necesitas un ID de mercado","friendly_sentence_2":"\xa1Casi listo! Ahora ingresa la configuraci\xf3n inicial de la piscina","note_done":"\xa1Tu piscina ha sido creada con \xe9xito!","note_done_2":"Ahora puedes crear una granja o volver","current_price":"Precio actual","initial_liquidity":"Liquidez inicial","base_token_initial_liquidity":"Liquidez inicial de token base","quote_token_initial_liquidity":"Liquidez inicial de token de cotizaci\xf3n","market_open_book_id":"ID de programa OpenBook","market_create_orderbook":"Crea un ID de mercado OpenBook a continuaci\xf3n:","market_tokens":"Tokens","market_min_order_size":"Tama\xf1o m\xednimo de orden","market_min_order_size_label":"Tama\xf1o m\xednimo de orden","market_min_order_size_tip":"Este es el tama\xf1o de orden m\xe1s peque\xf1o permitido.","market_price_tick":"Tick de precio","market_price_tick_label":"Tama\xf1o m\xednimo de tick de precio","market_price_tick_tip":"Esta es la cantidad m\xe1s peque\xf1a por la que los precios pueden moverse.","market_advance_options":"Opciones avanzadas","market_advance_options_desc":"Configura los tama\xf1os para diferentes cuentas para ajustar el costo de alquiler.","market_event_queue":"Cola de eventos","market_request_queue":"Cola de solicitudes","market_orderbook":"Libro de \xf3rdenes","market_create_button":"Crear mercado","market_create_note":"Ten en cuenta que crear un nuevo mercado puede costar de 3 a 4 SOL","market_create_note_highlight":"3 - 4 SOL","button_create_farm":"Crear granja","button_to_my_pools":"Volver a mis piscinas","button_initialize_liquidity_pool":"Inicializar piscina de liquidez"},"create_farm":{"weekly_rewards":"Recompensas semanales","unemmitted_rewards":"Recompensas no emitidas","select_pool":"Seleccionar piscina","concentrated_liquidity":"Liquidez concentrada","standard_amm":"AMM est\xe1ndar","select_from_your_created_pools":"Selecciona de tus piscinas creadas","select_from_your_created_pools_tooltip":"La granja se crear\xe1 para la piscina seleccionada","item_reward_tooltip":"\uD83E\uDD16","foot_note":"\xbfNo encuentras lo que buscas?","foot_note_link":"Crear una nueva piscina","step_1":"Paso 1","step_1_name":"Seleccionar piscina","step_1_sentence":"Primero, selecciona una piscina para recompensas de granja","step_2":"Paso 2","step_2_name":"Agregar recompensas","step_2_sentence":"Luego, ingresa las recompensas para la granja","step_3":"Paso 3","step_3_name":"Revisar detalles de granja","add_another_button_text":"Agregar otro","add_another_button_text_2":"Agregar otro token de recompensa","done":"listo","pool":"Pool","period":"Per\xedodo","farming_rewards":"Recompensas de cultivo","button_create_farm":"Crear granja","error_text_create_farm":"El usuario debe tener 300 RAY","please_note":"Nota","please_note_des":"Las recompensas asignadas a las granjas no se pueden retirar despu\xe9s de que comience el cultivo. Las granjas reci\xe9n creadas generalmente aparecen en Raydium de 10 a 30 minutos despu\xe9s de la creaci\xf3n, dependiendo del estado de la red Solana.","note_des":"Esta herramienta es para usuarios avanzados. Antes de crear una granja, se sugiere revisar la","note_des_link":"gu\xeda detallada","add_reward_token":"Puedes agregar hasta 3 tokens de recompensa.","estimated_rewards_week":"Recompensas estimadas / semana"},"acceleraytor":{"unclaim":"No reclamado"},"apr_dialog":{"modal_title":"M\xe9todo de c\xe1lculo de APR","desc":"Hay dos m\xe9todos disponibles para calcular el APR estimado, basados en las tarifas hist\xf3ricas de trading y las emisiones. Solo las posiciones en rango ganan rendimiento. El rendimiento pasado no indica resultados futuros.","warning_note":"Los c\xe1lculos son una estimaci\xf3n y solo son de referencia.","mode_D_title":"M\xe9todo detallado","mode_D_desc":"Este m\xe9todo utiliza el cambio impl\xedcito (delta) en la liquidez del piscina, determinado por el rango de precios y el tama\xf1o de posici\xf3n del usuario, para calcular el APR estimado.","mode_D_desc_brief":"El APR estimado se calcula mediante el M\xe9todo Delta. Haz clic en el icono \'D\' para cambiar al M\xe9todo Multiplicador o","mode_M_title":"M\xe9todo multiplicador","mode_M_desc":"Este m\xe9todo aplica un multiplicador, determinado por la intersecci\xf3n del rango de precios del usuario y el rango de precios hist\xf3rico de la piscina, para calcular el APR estimado.","mode_M_desc_brief":"El APR estimado se calcula mediante el M\xe9todo Multiplicador. Haz clic en el icono \'M\' para cambiar al M\xe9todo Delta o"}}')},86115:function(e){"use strict";e.exports=JSON.parse('{"common":{"language":"Langage","playground":"playground","disabled":"Disabled","all":"Tout","search_all":"Rechercher","layout":"Layout","list":"liste","grid":"grille","time_base":"Base temporelle","more":"Plus","view_chart":"View Chart","tvl":"TVL","volume":"Volume","rewards":"Rewards","amount":"Montant","pools":"Pools","nft_address":"adresse NFT","copy_success":"Copi\xe9 avec succ\xe8s!","copied":"Copi\xe9","copied_desc":"{{subject}} a \xe9t\xe9 copi\xe9 dans le presse-papiers","week":"Semaine","per_unit":"{{subA}} pour {{subB}}","per_unit_2":"{{subA}}/{{subB}}","price":"Prix","token_price":"{{token}} prix","unit_step":"\xc9tape {{num}}","back":"Retour","select_a_token":"Selectionner un token","popular_tokens":"Tokens populaires","balance":"Solde","address":"Adresse","view_token_list":"Voir la liste de Tokens","token_list_settings":"Param\xe8tres de la liste de Tokens","select":"S\xe9lectionner","subject_price":"{{subject}} prix","base_token":"Base token","quote_token":"Quote token","go_to_pools":"Go to pools","add":"Ajouter","view_more":"Voir plus","view_less":"Voir moins","nav_text_more":"Plus","nav_text_docs":"Docs","nav_text_feedback":"Feedback","estimated_APR":"APR estim\xe9","route_go":"Go>>","more_info":"Plus d\'info","less_info":"Moins d\'info","tokens":"Tokens","amm_id":"AMM ID","market_id":"Market ID","lp":"LP","fees":"Fees","reward":"Reward","successfully":"Avec succ\xe8s","token":"Token","token_list":"Liste de Token","learn_more":"En apprendre d\'avantage"},"button":{"deposit":"D\xe9poser","close":"Fermer","delete":"Supprimer","cancel":"Annuler","continue":"Continuer","confirm":"Confirmer","edit":"Editer","search":"Rechercher","reset":"Reset","stake":"Stake","unstake":"Unstake","harvest":"Collecter","save":"Sauvegarder","claim":"Collecter","not_now":"Pas maintenant","switch":"Switcher","back":"Retour","next_step":"\xc9tape Suivante","migrate":"Migrer","connect_wallet":"Connecter un Wallet"},"badge":{"suggested":"Sugg\xe9r\xe9","new":"Nouveau","ongoing":"En cours","ended":"Termin\xe9","updated":"Mis \xe0 jour","ecosystem":"Ecosystem","fusion":"Fusion","raydium":"Raydium"},"setting_board":{"panel_title":"Param\xe8tres","default_explorer":"Explorer par d\xe9faut","default_explorer_tooltip":"S\xe9lectionner votre block explorer pr\xe9f\xe9r\xe9","rpc_connection":"Connexion RPC","rpc_connection_tooltip":"S\xe9lectionner votre RPC endpoint","color_theme":"Th\xe8me","slippage_tolerance":"Tol\xe9rance de Slippage","slippage_tolerance_tooltip":"S\xe9lectionner votre tol\xe9rance maximale au Slippage","language":"Langage","language_tooltip":"S\xe9lectionner votre langage","versioned_transaction":"Versioned Transaction","versioned_transaction_tooltip":"Versioned Tx est une am\xe9lioration qui octroie des fonctionnalit\xe9s suppl\xe9mentaires, notamment le routage avanc\xe9 des swaps. Avant d\'activer Vers. Tx, assurez-vous que votre wallet est compatible.","custom":"personalis\xe9"},"wallet_connect_panel":{"title":"Connecter votre wallet \xe0 Raydium","desc":"En connectant votre wallet, vous reconnaissez que vous avez lu, compris et accept\xe9 les conditions d\'utilisation dans le","desc_link":"disclaimer","choose_network":"Choisissez un network","choose_wallet":"Choisissez un wallet","show_uninstalled_wallets":"Montrer les wallets non-install\xe9s","tour_title":"Nouveau?","tour_desc":"Commencer avec Raydium","disconnect":"D\xe9connecter"},"token_selector":{"search_placeholder":"Rechercher par token ou copier une adresse","jupiter_types_all":"TOUT","jupiter_types_strict":"Stricte"},"field":{"24h_volume":"Volume 24H","24h_fees":"Fees 24H","24h_apr":"APR 24H","7d_volume":"Volume 7J","7d_fees":"Fees 7J","7d_apr":"APR 7J","30d_volume":"Volume 30J","30d_fees":"Fees 30J","30d_apr":"APR 30J","total_apr":"Total APR","trade_fees":"Trade fees","weekly_rewards":"Rewards hebdomadaires","fee_tier":"Fee Tier","fee":"Fee","current_price":"Prix actuel","apr":"APR","min":"Min","max":"Max","start_time":"Commence le"},"swap":{"title":"Swap","from_label":"De","to_label":"\xc0","info_minimum_received":"Minimum re\xe7u","info_minimum_received_tooltip":"Le nombre minimum de tokens que vous recevrez. Il est d\xe9termin\xe9 par votre tol\xe9rance au slippage.","info_order_routing":"Routage","info_order_routing_tooltip":"Cet itin\xe9raire a permis d\'obtenir le meilleur prix pour votre trade","info_price_impact":"Impact sur le prix","info_price_impact_tooltip":"La diff\xe9rence entre le prix actuel au march\xe9 et le prix estim\xe9 en raison de la taille de l\'op\xe9ration.","info_estimated_fees":"Estimation des fees","info_estimated_fees_tooltip":"Les swaps fees sont distribu\xe9s aux LPs, RAY buybacks, et la tr\xe9sori\xe8re.","alert_price_updated":"Prix mis \xe0 jour","alert_price_updated_tooltip":"Le prix a chang\xe9 depuis que le montant du swap a \xe9t\xe9 saisi.","alert_price_updated_button":"Accepter","pool_not_found":"Pool non trouv\xe9","pool_loading":"Chargement des pools..."},"liquidity_pools":{"view_chart_tooltip":"Voir graphiques","chart_tab_volume":"Volume","chart_tab_liquidity":"Liquidit\xe9","chart_tooltip_volume":"volume","modal_header_standard_position_detail":"D\xe9tails Position Standard","farms":"Farms"},"liquidity":{"title":"Liquidit\xe9","pools":"Liquidity Pools","pool_info":"Pool Info","pools_desc":"Apporter de la liquidit\xe9, g\xe9n\xe9rer un rendement.","concentrated":"Concentr\xe9e","standard":"Standard","pool":"Pool","fee_rate":"Fee Rate","show_farms":"Voir Farms","create_pool":"Cr\xe9er Pool","create_pool_mobile":"Cr\xe9er Pool","create_pool_tx_title":"Cr\xe9er une pool","create_pool_tx_desc":"cr\xe9er {{mintA}} - {{mintB}} pool","value":"valeur","select_type":"S\xe9lectionner le Pool Type","select_farm":"S\xe9lectionner une Farm","stake_liquidity":"Staker de la Liquidit\xe9","unstake_liquidity":"Unstaker de la Liquidit\xe9","add_liquidity":"Ajouter de la liquidit\xe9","remove_liquidity":"Enlever de la liquidit\xe9","withdraw_liquidity":"Retirer de la Liquidit\xe9","pool_liquidity":"Pool Liquidit\xe9","pooled":"Pooled","pool_not_found":"Pool non trouv\xe9e","total_apr_7d":"Total APR 7J","my_position":"Ma Position","APR":"APR","APR_tooltip":"Estimation de l\'APR sur la base des commissions per\xe7ues par le pool au cours des derni\xe8res 24H","my_lp_balance":"Mon solde LP","lp_token_balance":"Soldes LP Token","staked_liquidity":"Liquidit\xe9 Stak\xe9e","unstaked_liquidity":"Liquidit\xe9 Unstak\xe9e","rewards_to_be_harvested":"Rewards \xe0 collecter","assets_to_be_received":"Assets \xe0 recevoir","staked":"Stak\xe9","unstaked":"Unstak\xe9","auto_swap":"Auto-swap","total_deposit":"D\xe9p\xf4t Total","stakeable_hint":"Vous avez LP tokens non stak\xe9s pour cette pool. Vous pouvez les staker directement sur la page Staker de la Liquidit\xe9.","auto_swap_hint":"Lorsque auto-swap est activ\xe9, les montants des tokens sont automatiquement \xe9chang\xe9s en fonction du ratio de d\xe9p\xf4t n\xe9cessaire pour cr\xe9er votre position.","auto_swap_modal":{"turn_on_title":"Activer Auto-swap?","turn_off_title":"D\xe9sactiver Auto-swap?","turn_on_description":"Lorsque auto-swap est activ\xe9, les montants des tokens sont automatiquement \xe9chang\xe9s en fonction du ratio de d\xe9p\xf4t n\xe9cessaire pour cr\xe9er votre position.","turn_off_description":"Lorsque auto-swap est d\xe9sactiv\xe9, Les tokens ne seront pas \xe9chang\xe9s pour correspondre au ratio de d\xe9p\xf4t de votre position. Vous devez avoir suffisamment de tokens dans votre wallet pour cr\xe9er une position..","turn_on":"Activer Auto-swap","turn_off":"D\xe9sactiver Auto-swap"},"setting_modal":{"title":"Param\xe8tre"},"pool_search_modal":{"title":"Recherche de Pool"},"pool_fee_desc":"Ceci est une {{feeRate}}% fee tier {{type}} pool de liquidit\xe9","no_active_farm":"Il n\'y a pas de farm active pour cette pool.","loading_pool":"Chargement des pools","create_lp":"Cr\xe9er une Position","preview_pool":"Aper\xe7u","want_to_stake_lp":"Voulez-vous stake vos LP maintenant?","stake_lp_desc":"Staker vos LP tokens \xe0 une farm pour gagner des r\xe9compenses suppl\xe9mentaires. Vous pouvez \xe9galement le faire plus tard dans le Portfolio.","assets_to_received":"Assets \xe0 recevoir","tx_message":{"staked_successfully":"{{symbol}} Stak\xe9","staked_desc":"Vous avez stak\xe9 {{amount}} {{symbol}}","unStaked_successfully":"{{symbol}} Unstak\xe9","unStaked_desc":"Vous avez Unstak\xe9 {{amount}} {{symbol}}"}},"create_pool":{"modal_title":"Je veux commencer par..","modal_tab_label":"Pool type","modal_tab_standard_amm":"Standard AMM","modal_tab_concentrated":"Liquidit\xe9 Concentr\xe9e","modal_section_header_pool":"Cr\xe9er une pool","modal_section_header_pool_desc":"Cr\xe9er une pool de liquidit\xe9 pour n\'importe quelle paire de tokens. Il est hautement sugg\xe9r\xe9 de le lire ce","modal_section_header_pool_desc_link":"guide d\xe9taill\xe9","modal_section_header_farm":"Cr\xe9er une farm","modal_section_header_farm_desc":"Une farm peut \xeatre cr\xe9\xe9 pour une n\'import quelle pool d\xe9j\xe0 active. Il est hautement sugg\xe9r\xe9 de le lire ce","modal_section_header_farm_desc_link":"guide d\xe9taill\xe9","clmm_please_note":"Veuillez noter","clmm_please_note_des":"Cet outil est destin\xe9 aux utilisateurs avanc\xe9s. Avant de cr\xe9er une farm, il est conseill\xe9 de consulter le","clmm_please_note_des_link":"guide d\xe9taill\xe9"},"farm":{"create":"Cr\xe9er une Farm","show_closed":"Montrer ferm\xe9"},"clmm":{"total_deposit":"D\xe9p\xf4t total","my_range":"Mon Range","nft_mint_address":"NFT Mint Adresse","nft_mint":"NFT Mint","in_range":"Dans le Range","out_of_range":"En dehors du Range","create_new_position":"Ouvrir une nouvelle Position","position":"Position","set_price_range":"D\xe9finir un price Range","time_price_range":"{{time}} price Range","match_deposit_ratio":"Match Ratio de D\xe9p\xf4t","add_deposit_amount":"Entrer le montant du d\xe9p\xf4t","match_deposit_ratio_tooltip":"Quand la fonction est activ\xe9e, le tokens seront automatiquement swapper pour obtenir le ratio de d\xe9p\xf4t n\xe9cessaire \xe0 la cr\xe9ation de la position","deposit_ratio":"Ratio de D\xe9p\xf4t","select_token_fee_tier":"Selectionner token & fee tier","set_initial_price_range":"D\xe9finir le prix initial & range","enter_deposit_amount":"Entrer le montant du d\xe9p\xf4t","best_for_very_stable":"Meilleur pour les pairs tr\xe8s stable","best_for_stable":"Meilleur pour les pairs stables","best_for_most_pair":"Meilleur pour la plus part des pairs","best_for_exotic_pair":"Meilleur pour les pairs exotics","price_setting":"Prix d\xe9fini","initial_price":"Prix initial","price_range":"Price range","preview_deposit":"Aper\xe7u de la position","selected_range":"Range selectionn\xe9","min_price":"Prix Min","max_price":"Prix Max","confirm_deposit":"Confirmer le D\xe9p\xf4t","you_will_receive":"Vous recevrez","pooled_assets":"Assets ajout\xe9s","pending_rewards":"Rewards \xe0 collecter","no_clmm_positions":"Vous n\'avez pas de position de liquidit\xe9 concentr\xe9e","current_position":"Position actuelle","deposit_successful":"D\xe9poser avec succ\xe8s","nft_desc":"Une nouvelle NFT repr\xe9sentant votre position de liquidit\xe9 concentr\xe9e a \xe9t\xe9 ajout\xe9e a votre wallet.","dont_burn_nft":"NE PAS burn cette NFT ou vous serez incapable de retirer vos liquidit\xe9! Si cette NFT est envoy\xe9e \xe0 un nouveau wallet, seulement ce wallet pourra retirer la liquidit\xe9.","view_my_positions":"Voir mes positions","input_lock_desc":"Le prix du march\xe9 est en dehors de votre price range. Seulement un token peut \xeatre d\xe9pos\xe9.","modal_header_add_liquidity_to":"Ajouter la liquidit\xe9 \xe0","modal_header_remove_liquidity":"Retirer la liquidit\xe9","close_position":"Fermer la Position","position_closed":"Position Ferm\xe9e","close_mint_position":"Fermer la position {{mint}}."},"migrate_clmm":{"title":"Migrer vers une pool de Liquidit\xe9 Concentr\xe9e","desc":"Migrer ou en apprendre plus les CLMM risques","desc_link":"ici","quick_migration":"Migration Rapide","quick_migration_desc":"Range tr\xe8s large pour une position plus passive.","custom_migration":"Custom migration","custom_migration_desc":"D\xe9terminer un price range personnalis\xe9 pour une plus grande efficacit\xe9 du capital.","heading_clmm_pool":"CLMM Pool","heading_price_range":"Price Range","current_price":"Prix actuel","current_position":"Position actuelle","clmm_pool":"CLMM Pool","wallet":"Wallet","footer_note":"* Migrer collectera aussi les r\xe9compenses","footer_note_2":"en r\xe9compense \xe0 collecter.","migrate_clmm_tx_title":"Migrer vers CLMM","migrate_clmm_tx_desc":"Migrer vers position CLMM."},"portfolio":{"title":"Portfolio","hero_title":"Mon Portfolio","assets_by_pool":"Assets par pool","assets_by_token":"Assets par token","idle_tokens":"Tokens non d\xe9pos\xe9s","harvest_all_label":"Yield \xe0 collecter","harvest_all_tooltip":"Collecte toutes les r\xe9compenses","harvest_all_button":"Tout collecter","section_overview":"R\xe9sum\xe9","section_positions":"Mes positions","section_positions_tab_clmm":"Concentr\xe9e","section_positions_tab_standard":"Standard","section_positions_tab_staking":"Staked RAY","section_positions_clmm_switch_direction_tooltip":"Base/quote tokens ont \xe9t\xe9 interverti pour simplifier l\'affichage.","section_positions_clmm_account_view_more":"Voir plus","section_positions_clmm_account_view_less":"Voir moins","section_positions_clmm_account_nft_mint_address":"NFT Mint Address","section_positions_clmm_account_pending_yield":"Yield \xe0 collecter","section_positions_clmm_account_pending_yield_button":"Collecter","section_my_created_farms":"Mes farms cr\xe9\xe9es","section_department_tab_clmm":"Concentr\xe9e","section_department_tab_standard":"Standard","section_department_tab_all":"Tout","section_my_created_farms_item_edit_farm_button":"Editer Farm","no_staked_farm":"Vous n\'avez pas de staked RAY.","no_standard_positions":"You don’t have any standard liquidity positions.","stake_item_stake_button":"Stake","stake_item_migrate_button":"Migrer","acceleraytor":"Acceleraytor","acceleraytor_desc":"Vous avez des fonds non collect\xe9s sur l\'AcceleRaytor. Ces fonds peuvent \xeatre collect\xe9s ci-dessous.","acceleraytor_banner_desc":"Vous avez des fonds non collect\xe9s sur l\'AcceleRaytor. Regardez le detail au bas de cette page et collecter les en un click.","acceleraytor_tx_title":"AccelerRaytor Claim","acceleraytor_tx_desc":"Claim {{amountA}} {{symbolA}}","acceleraytor_tx_1_desc":"Claim {{amountA}} {{symbolA}} and {{amountB}} {{symbolB}}"},"amm":{"staked":"Stak\xe9","pending_reward":"R\xe9compenses \xe0 collecter","pending_reward_button":"Collecter","pending_alert":"Vous avez des LP tokens non stak\xe9 qui pourrait \xeatre ajout\xe9 \xe0 une farm. Staker maintenant","pooled_token":"Pooled {{token}}","farm_ended":"Farm Inactive","farm_unstaked":"LP unstak\xe9","position":"Position"},"staking":{"title":"Staking","pending_reward":"R\xe9compenses \xe0 collecter","pending_rewards":"R\xe9compenses \xe0 collecter","staked":"Stak\xe9","APR":"APR","liquidity":"Liquidit\xe9","available":"Disponible {{symbol}}","pending_rewards_tooltip":"\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16","pending_rewards_button":"Collecter","staking_desc":"Stake vos RAYs pour g\xe9n\xe9rer un RAY yield suppl\xe9mentaire.","unstake_modal_header":"Unstaker {{symbol}}","unstake_modal_confirm_text":"Unstaker {{symbol}}","stake_modal_header":"Staker {{symbol}}","stake_modal_confirm_text":"Staker {{symbol}}","alert_empty_token":"Solde de RAY insuffisant"},"wallet":{"connected_hint":{"portfolio_info":"Connecter votre wallet pour voir la distribution de vos assets.","portfolio_idle":"Connecter votre wallet pour voir les assets d\xe9pos\xe9s.","portfolio_position":"Connecter votre wallet pour voir vos positions."}},"error":{"should_input_valid_minimum_order_size":"Entrer un minimum order size valide","should_input_valid_price_tick":"Entrer un price tick size valide","select_quote_token":"S\xe9lectionner le quote token","select_base_token":"S\xe9lectionner le base token","enter_upper_price":"Entrer le prix haut","enter_lower_price":"Entrer le prix bas","enter_max_price":"Entrer max prix","enter_min_price":"Entrer min prix","enter_current_price":"Entrer prix actuel","enter_order_size":"Entrer order size","enter_price_tick":"Entrer price tick size","select_pool_fee":"S\xe9lectionner fee tier","select_pool_token_1":"S\xe9lectionner token 1","select_pool_token_2":"S\xe9lectionner token 2","pool_not_found":"Pool non trouv\xe9","balance_not_enough":"Solde insuffisant","select_reward_token":"S\xe9lectionner r\xe9compense token","enter_token_amount":"Entrer Montant","insufficient_sub_balance":"Solde {{token}} insuffisant","no_matches":"Pas de correspondance.","no_pools_found":"Aucune pool trouv\xe9e","decrease_reward":"Diminuer le taux d\'\xe9mission est permis durant le 72h pr\xe9c\xe9dent la cloture d\'une farm.","decrease_reward_72h":"Diminuer le taux d\'\xe9mission est permis durant le 72h pr\xe9c\xe9dent la cloture d\'une farm. Essayez d\'ajouter plus de tokens.","add_reward_days":"L\'extension de la dur\xe9e doit \xeatre comprise entre 7j et 90j.","insufficient_duration":"Dur\xe9e d\'emission insuffisante","emission_rewards_low":"Taux d\'\xe9mission de r\xe9compenses insuffisant","start_time_should_later":"La date de d\xe9but ne peut pas \xeatre dans le pass\xe9.","balance_not_enough_token":"{{side}} solde de token insuffisant","should_input_positive_amount":"Entrer un montant {{side}} supp\xe9rieur \xe0 zero","select_token":"S\xe9lectionner {{side}} token","enter_starting_price":"Entrer price de d\xe9part","is_amount_valid":"est un montant invalide","api_error":"Erreur API","no_liquidity_data":"Il n\'y a pas de liquidity donn\xe9es.","pool_liquidity_appear":"Les liquidit\xe9s vont apparaitre ici.","liquidity_data_not_available":"Donn\xe9es indisponible.","cannot_find_pool":"Vous ne trouvez pas la pool que vous cherchez? Essayez avec l\'AMM ID, ou scrollez la liste.","no_chart_data":"Pas de donn\xe9es pour cette chart.","no_chart_data_hint":"Attendez un moment ou reloadez la page."},"input":{"max_button":"Max","search_for_a_pair_or_enter_amm_id":"Recherchez une pair ou tapez AMM ID","enter_search_token":"Recherchez un token ou copiez sa mint adresse.","search_amm_title":"Recherchez une pair ou tapez AMM ID","placeholder_input_amm_id":"input AmmId / TVL"},"date_picker":{"farm_will_end_at":"Farm se termine au"},"transaction":{"title":"Transaction","sent":"Enovoy\xe9e","processed":"Execut\xe9e","failed":"\xc9chou\xe9e","view_detail":"Voir le d\xe9tail de la transaction","confirmed":"Confirm\xe9e"},"edit_farm":{"button":"Editer","title":"Editer Farm","farm_id":"Farm id","please_note_title":"Notez que","please_note_content":"Vous pouvez ajouter des tokens et/ou prolonger la p\xe9riode de farm. Toute action visant \xe0 r\xe9duire le taux de r\xe9compense ne peut \xeatre effectu\xe9e que dans les 72 heures pr\xe9c\xe9dent la fin de la farm, et la p\xe9riode doit \xeatre prolong\xe9e d\'au moins 7 jours.","tour_note_title":"Comment ajouter des r\xe9compenses","tour_note_des_1":"1. Les r\xe9compenses allou\xe9es \xe0 la farm ne peuvent pas \xeatre retir\xe9es.","tour_note_des_2":"2. Si vous souhaitez augmenter le taux de r\xe9compense, des r\xe9compenses suppl\xe9mentaires peuvent \xeatre ajout\xe9es pendant qu\'une farm est encore en activit\xe9. La dur\xe9e doit \xeatre prolong\xe9e d\'au moins 7 jours..","tour_note_des_3":"3. Si vous souhaitez diminuer le taux d\'\xe9mission est permis durant le 72h pr\xe9c\xe9dent la cloture d\'une farm, et la dur\xe9e doit \xeatre prolong\xe9e d\'au moins 7j.","title_des":"Avant de cr\xe9er une farm, s\'il vous plait lisez le","title_des_link":"guide d\xe9taill\xe9","subtitle_pool":"Pool","subtitle_farm_reward":"R\xe9compenses","farming_start":"Farming commence","farming_end":"Farming termine","open_date_picker":"S\xe9lectionner","time_day":"Jours","modal_add_another_token":"Ajouter un autre token","estimated_rewards_week":"Estimation r\xe9compenses / semaine","days_extends":"Jours ajout\xe9s","box_header_updated_rewards":"Recompenses Updat\xe9es","box_header_current_rewards_period":"P\xe9riode d\'\xe9mission","box_header_rewards_adjustment":"Adjustment des r\xe9compenses","box_header_adjust_rewards":"Adjuster r\xe9compense","box_header_remaining_amount":"Montant restant","remaining_days":"{{days}}J restant","rate":"Taux","per_week":"/semaine","APR":"APR","loading_text_no_farm":"Farm non trouv\xe9e","loading_text_farm_not_editable":"Farm non \xe9ditable","claim_unemmitted_rewards":"Collecter r\xe9compenses non \xe9mises","button_adjust_rewards":"Adjuster r\xe9comepense","button_add_more_rewards":"Ajouter r\xe9compense"},"recent_transaction":{"another_wallet":"Autre wallet","recent_transactions":"Transactions R\xe9centes","view_all":"Tout voir"},"transaction_history":{"name_add_liquidity":"Ajouter Liquidit\xe9","add_liquidity_desc":"Ajout\xe9s {{amountA}} {{symbolA}} et {{amountB}} {{symbolB}}.","name_remove_liquidity":"Retirer Liquidit\xe9","remove_liquidity_desc":"Retir\xe9s {{amountA}} {{symbolA}} et {{amountB}} {{symbolB}}.","name_harvest":"Collecter","name_swap":"Swap","description_remove_liquidity":"Retirer {{token1}} balabalabala\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16","liquidity_staked_title":"Liquidit\xe9 Stak\xe9e","liquidity_staked_desc":"Stak\xe9 {{amount}} {{symbol}}","liquidity_unstaked_title":"Retirer Staked Liquidity","liquidity_unstaked_desc":"Unstak\xe9 {{amount}} {{symbol}}","harvest_reward_title":"Collecter Rewards","harvest_clmm_reward_desc":"Collecter Clmm Rewards","harvest_farm_reward_desc":"Collecter Farm Rewards","update_reward_title":"Updater rewards","update_reward_desc":"Updater rewards sur {{pool}}","create_pool":"Cr\xe9er pool","create_clmm_pool":"Cr\xe9er clmm pool","open_pool_position":"Ouvrir une position","open_clmm_pool_position":"Ouvrir une position CLMM","create_farm":"Cr\xe9er une farm","create_clmm_farm_desc":"ID: {{poolId}}","harvest_rewards":"R\xe9compenses collect\xe9es","harvest_rewards_desc":"Collect\xe9s: {{symbol}}"},"create_standard_pool":{"step_1":"\xc9tape 1","step_1_name":"Cr\xe9er Market","step_2":"\xc9tape 2","step_2_name":"Initialiaser Pool","please_note":"Veuillez noter","please_note_des":"Une farm peut \xeatre cr\xe9\xe9e pour n\'importe quelle pool active. Il est hautement sugg\xe9rer de lire ce","please_note_des_link":"guide d\xe9taill\xe9","enter_open_book_market_id":"Entrer OpenBook Market ID","market_id":"Market ID","note_has_id":"Les pools int\xe9grant OpenBook doivent \xeatre li\xe9es \xe0 un OpenBook Market ID unique. Un Market ID ne peut \xeatre utilis\xe9 que pour une pool.","have_id":"J\'ai un ID","no_id":"Cr\xe9er ID","friendly_sentence_1":"D\'abord, vous avez besoin d\'un Market ID","friendly_sentence_2":"Vous y \xeates presque! Entrer les param\xe8tres de la pool","note_done":"Votre pool a \xe9t\xe9 cr\xe9\xe9e avec succ\xe8s!","note_done_2":"Vous pouvez maintenant cr\xe9er une farm ou faire retour","current_price":"Prix actuel","initial_liquidity":"Liquidit\xe9 initiale","base_token_initial_liquidity":"Liquidit\xe9 initiale Base token","quote_token_initial_liquidity":"Liquidit\xe9 initiale Quote token","market_open_book_id":"OpenBook Program ID","market_create_orderbook":"Cr\xe9er un OpenBook Market ID ci-dessous:","market_tokens":"Tokens","market_min_order_size":"Minimum Order size","market_min_order_size_label":"Min order size","market_min_order_size_tip":"Ceci est le plus petit montant pour order size.","market_price_tick":"Price tick","market_price_tick_label":"Min price tick size","market_price_tick_tip":"Ceci est le plus petit montant par lequel les prix peuvent bouger.","market_advance_options":"Options avanc\xe9es","market_advance_options_desc":"Configurez les tailles des accounts pour adjuster le cout en rent.","market_event_queue":"Event queue","market_request_queue":"Request Queue","market_orderbook":"Orderbook","market_create_button":"Cr\xe9er un Market","market_create_note":"Notez que cr\xe9er un Market peut couter entre 3 - 4 SOL","market_create_note_highlight":"3 - 4 SOL","button_create_farm":"Cr\xe9er une Farm","button_to_my_pools":"Retour vers Mes Pools","button_initialize_liquidity_pool":"Initialiser Liquidity Pool"},"create_farm":{"weekly_rewards":"R\xe9compenses hebdomadaire","unemmitted_rewards":"R\xe9compenses non \xe9mises","select_pool":"S\xe9lectionner Pool","concentrated_liquidity":"Liquidit\xe9 Concentr\xe9e","standard_amm":"Standard AMM","select_from_your_created_pools":"S\xe9lectionner depuis vos pools cr\xe9\xe9es","select_from_your_created_pools_tooltip":"La farm sera cr\xe9\xe9e pour la pool s\xe9lectionn\xe9e.","item_reward_tooltip":"\uD83E\uDD16","foot_note":"Vous ne trouvez pas ce que vous cherchez?","foot_note_link":"Cr\xe9er une pool","step_1":"\xc9tape 1","step_1_name":"S\xe9lectionner Pool","step_1_sentence":"D\'abord, S\xe9lectionner une pool pour votre farm","step_2":"\xc9tape 2","step_2_name":"Ajouter des r\xe9compenses","step_2_sentence":"Ensuite, entrer les r\xe9compenses pour votre farm","step_3":"\xc9tape 3","step_3_name":"Revoir les d\xe9tails de la farm","add_another_button_text":"Ajouter une autre","add_another_button_text_2":"Ajouter une autre r\xe9compense","done":"fait","pool":"Pool","period":"Dur\xe9e","farming_rewards":"Farming r\xe9compenses","button_create_farm":"Cr\xe9er une Farm","error_text_create_farm":"L\'utilisateur doit avoir 300 RAY","please_note":"Veuillez noter","please_note_des":"Les r\xe9compenses allou\xe9es aux farmd ne peuvent pas \xeatre retir\xe9es apr\xe8s le d\xe9but des \xe9missions. Les farms nouvellement cr\xe9\xe9es apparaissent g\xe9n\xe9ralement sur Raydium 10 \xe0 30 minutes apr\xe8s leur cr\xe9ation, en fonction de l\'\xe9tat du r\xe9seau Solana.","note_des":"Cet outils est pour les utilisateurs avanc\xe9s. Avant de cr\xe9er une farm, il est sugg\xe9rer de lire le","note_des_link":"guide d\xe9taill\xe9","add_reward_token":"Vous pouvez ajouter jusqu\'\xe0 3 reward tokens.","estimated_rewards_week":"Estimation r\xe9compense / semaine"},"acceleraytor":{"unclaim":"Non r\xe9clam\xe9"},"apr_dialog":{"modal_title":"APR Calculation Method","desc":"Deux m\xe9thodes de calcul d\'APR estim\xe9 sont disponibles, bas\xe9es sur l\'historique des frais de transaction et des \xe9missions. Seules les positions comprises dans la fourchette obtiennent un rendement. Les performances pass\xe9es ne sont pas indicatives des r\xe9sultats futurs.","warning_note":"Les calculs sont une estimation et ne sont donn\xe9s qu\'\xe0 titre indicatif.","mode_D_title":"M\xe9thode detail\xe9e","mode_D_desc":"Cette m\xe9thode utilise la variation implicite (delta) de la liquidit\xe9 du pool, d\xe9termin\xe9e par la fourchette de prix et la taille de la position de l\'utilisateur, pour calculer l\'APR estim\xe9..","mode_D_desc_brief":"L\'estimation d\'APR est calcul\xe9 par la Delta Method. Clicker l\'icone ‘D’ pour changer vers la Multiplier Method or","mode_M_title":"Multiplier Method","mode_M_desc":"Cette m\xe9thode applique un multiplicateur, determin\xe9e par l\'intersection du price range de la pool et l\'historique du volume de la pool, pour calculer l\'APR estim\xe9.","mode_M_desc_brief":"L\'estimation d\'APR est calcul\xe9 par la Multiplier Method. Clicker l\'icone ‘M’ pour changer vers la Delta Method or"}}')},44875:function(e){"use strict";e.exports=JSON.parse('{"common":{"language":"言語","playground":"プレイグラウンド","disabled":"無効","all":"すべて","search_all":"すべてを検索","layout":"レイアウト","list":"リスト","grid":"グリッド","time_base":"時間ベース","more":"詳細","view_chart":"チャートを表示","tvl":"TVL","volume":"取引量","rewards":"報酬","amount":"金額","pools":"プール","nft_address":"NFTアドレス","copy_success":"コピーが成功しました!","copied":"コピーされました","copied_desc":"{{subject}}がクリップボードにコピーされました","week":"週","per_unit":"{{subA}}あたり{{subB}}","per_unit_2":"{{subA}}/{{subB}}","price":"価格","token_price":"{{token}}価格","unit_step":"ステップ{{num}}","back":"戻る","select_a_token":"トークンを選択","popular_tokens":"人気のトークン","balance":"残高","address":"アドレス","view_token_list":"トークンリストを表示","token_list_settings":"トークンリストの設定","select":"選択","subject_price":"{{subject}}価格","base_token":"ベーストークン","quote_token":"クォートトークン","go_to_pools":"プールへ移動","add":"追加","view_more":"もっと見る","view_less":"表示を少なくする","nav_text_more":"詳細","nav_text_docs":"ドキュメント","nav_text_feedback":"フィードバック","estimated_APR":"推定APR","route_go":"進む>>","more_info":"詳細情報","less_info":"少ない情報","tokens":"トークン","amm_id":"AMM ID","market_id":"市場ID","lp":"LP","fees":"手数料","reward":"報酬","successfully":"成功","token":"トークン","token_list":"トークンリスト","learn_more":"詳細を見る"},"button":{"deposit":"入金","close":"閉じる","delete":"削除","cancel":"キャンセル","continue":"続行","confirm":"確認","edit":"編集","search":"検索","reset":"リセット","stake":"ステーク","unstake":"アンステーク","harvest":"収穫","save":"保存","claim":"請求","not_now":"今はしない","switch":"切り替え","back":"戻る","next_step":"次のステップ","migrate":"移行","connect_wallet":"ウォレットを接続"},"badge":{"suggested":"提案された","new":"新着","ongoing":"進行中","ended":"終了","updated":"更新済み","ecosystem":"エコシステム","fusion":"フュージョン","raydium":"Raydium"},"setting_board":{"panel_title":"設定","default_explorer":"デフォルトエクスプローラー","default_explorer_tooltip":"好みのブロックエクスプローラーを選択","rpc_connection":"RPC接続","rpc_connection_tooltip":"好みのRPCエンドポイントを選択","color_theme":"カラーテーマ","slippage_tolerance":"スリッページ許容度","slippage_tolerance_tooltip":"最大スリッページ許容度を選択","language":"言語","language_tooltip":"好みの言語を選択","versioned_transaction":"バージョン付きトランザクション","versioned_transaction_tooltip":"Versioned Txは、追加の機能、特に高度なスワップルーティングを可能にする重要なアップグレードです。 Vers.TXをオンにする前に、ウォレットが互換性があることを確認してください。","custom":"カスタム"},"wallet_connect_panel":{"title":"ウォレットをRaydiumに接続する","desc":"ウォレットを接続することで、次の条件を読み、理解し、受け入れたことになります。","desc_link":"免責事項","choose_network":"ネットワークを選択","choose_wallet":"ウォレットを選択","show_uninstalled_wallets":"未インストールのウォレットを表示","tour_title":"初めてですか?","tour_desc":"Raydiumの始め方","disconnect":"切断する"},"token_selector":{"search_placeholder":"トークンを検索するか、アドレスを貼り付ける","jupiter_types_all":"すべて","jupiter_types_strict":"厳密"},"field":{"24h_volume":"24時間の取引量","24h_fees":"24時間の手数料","24h_apr":"24時間のAPR","7d_volume":"7日間の取引量","7d_fees":"7日間の手数料","7d_apr":"7日間のAPR","30d_volume":"30日間の取引量","30d_fees":"30日間の手数料","30d_apr":"30日間のAPR","total_apr":"合計APR","trade_fees":"取引手数料","weekly_rewards":"週次報酬","fee_tier":"無料枠","fee":"手数料","current_price":"現在価格","apr":"年換算利回り","min":"最小","max":"最大","start_time":"開始時間"},"swap":{"title":"スワップ","from_label":"送金元","to_label":"送金先","info_minimum_received":"最小受け取り額","info_minimum_received_tooltip":"受け取ることができる最小トークン数。これはスリッページ許容度によって決定されます。","info_order_routing":"注文ルーティング","info_order_routing_tooltip":"このルートが取引に対して最適な価格を提供しました。","info_price_impact":"価格の影響","info_price_impact_tooltip":"取引サイズによる現在の市場価格と推定価格の差","info_estimated_fees":"推定手数料","info_estimated_fees_tooltip":"スワップ手数料はLP、RAYのバイバック、およびトレジャリーへ支払われます。","alert_price_updated":"価格が更新されました","alert_price_updated_tooltip":"スワップ額が入力された後に価格が変更されました。","alert_price_updated_button":"承諾する","pool_not_found":"プールが見つかりません","pool_loading":"プールを読み込んでいます..."},"liquidity_pools":{"view_chart_tooltip":"プールのチャートを表示","chart_tab_volume":"取引量","chart_tab_liquidity":"流動性","chart_tooltip_volume":"取引量","modal_header_standard_position_detail":"標準ポジション詳細","farms":"ファーム"},"liquidity":{"title":"流動性","pools":"流動性プール","pool_info":"プール情報","pools_desc":"流動性を提供し、収益を得ます。","concentrated":"濃縮型","standard":"標準","pool":"プール","fee_rate":"手数料率","show_farms":"ファームを表示","create_pool":"作成","create_pool_mobile":"作成","create_pool_tx_title":"プールを作成","create_pool_tx_desc":"{{mintA}} - {{mintB}}プールを作成","value":"価値","select_type":"プールタイプを選択","select_farm":"ファームを選択","stake_liquidity":"流動性をステーキング","unstake_liquidity":"流動性のステーキング解除","add_liquidity":"流動性を追加","remove_liquidity":"流動性を削除","withdraw_liquidity":"流動性を引き出す","pool_liquidity":"プール流動性","pooled":"プールされた","pool_not_found":"プールが見つかりません","total_apr_7d":"7日間の総APR","my_position":"私のポジション","APR":"APR","APR_tooltip":"過去24時間のプールが稼いだ取引手数料に基づいた推定APR","my_lp_balance":"私のLP残高","lp_token_balance":"LPトークン残高","staked_liquidity":"ステーキングされた流動性","unstaked_liquidity":"ステーキング解除された流動性","rewards_to_be_harvested":"収穫待ちのリワード","assets_to_be_received":"受け取る予定のアセット","staked":"ステーキングされました","unstaked":"ステーキング解除されました","auto_swap":"自動スワップ","total_deposit":"合計デポジット","stakeable_hint":"このプールの未ステーキングLPトークンがあります。これらを直接Stake Liquidityタブでステーキングできます。","auto_swap_hint":"自動スワップがオンになっている場合、トークンの量は、ポジションを作成するために必要なデポジット比率に自動的にスワップされます。","auto_swap_modal":{"turn_on_title":"自動スワップをオンにしますか?","turn_off_title":"自動スワップをオフにしますか?","turn_on_description":"自動スワップがオンになっている場合、トークンの量は、ポジションを作成するために必要なデポジット比率に自動的にスワップされます。","turn_off_description":"自動スワップがオフになっている場合、トークンはポジションのデポジット比率に合わせてスワップされません。ウォレットに十分なトークンが必要です。","turn_on":"自動スワップをオンにする","turn_off":"自動スワップをオフにする"},"setting_modal":{"title":"設定"},"pool_search_modal":{"title":"プール検索"},"pool_fee_desc":"これは{{feeRate}}%の手数料ティア{{type}}流動性プールです","no_active_farm":"このプールにはアクティブなファームがありません。","loading_pool":"プールを読み込んでいます","create_lp":"ポジションを作成","preview_pool":"プールをプレビュー","want_to_stake_lp":"LPをステーキングしますか?","stake_lp_desc":"LPトークンをファームにステーキングして追加のリワードを獲得します。後でポートフォリオの下で行うこともできます。","assets_to_received":"受け取る予定のアセット","tx_message":{"staked_successfully":"{{symbol}}をステーキングしました","staked_desc":"ステーキングしました {{amount}} {{symbol}}","unStaked_successfully":"{{symbol}}をステーキング解除しました","unStaked_desc":"ステーキング解除しました {{amount}} {{symbol}}"}},"create_pool":{"modal_title":"始めたいタイプを選択","modal_tab_label":"プールの種類","modal_tab_standard_amm":"標準AMM","modal_tab_concentrated":"濃縮型流動性","modal_section_header_pool":"プールの作成","modal_section_header_pool_desc":"任意のトークンペアの流動性プールを作成します。詳細なガイドをお読みいただくことを強くお勧めします","modal_section_header_pool_desc_link":"詳細なガイド","modal_section_header_farm":"ファームの作成","modal_section_header_farm_desc":"すでに稼働中のプールに対してファームを作成できます。詳細なガイドをお読みいただくことを強くお勧めします","modal_section_header_farm_desc_link":"詳細なガイド","clmm_please_note":"ご注意","clmm_please_note_des":"このツールは上級者向けです。ファームを作成する前に、詳細なガイドをお読みいただくことをお勧めします","clmm_please_note_des_link":"詳細なガイド"},"farm":{"create":"ファームの作成","show_closed":"終了済みを表示"},"clmm":{"total_deposit":"総デポジット","my_range":"自分のレンジ","nft_mint_address":"NFTミントアドレス","nft_mint":"NFTミント","in_range":"範囲内","out_of_range":"範囲外","create_new_position":"新しいポジションを作成","position":"ポジション","set_price_range":"価格範囲の設定","time_price_range":"{{time}}価格範囲","match_deposit_ratio":"デポジット比率に合わせる","add_deposit_amount":"デポジット金額の追加","match_deposit_ratio_tooltip":"オンにすると、ポジションを作成するために必要なデポジット比率に自動的にトークン量がスワップされます","deposit_ratio":"デポジット比率","select_token_fee_tier":"トークンと手数料ティアの選択","set_initial_price_range":"初期価格と範囲の設定","enter_deposit_amount":"デポジット金額を入力","best_for_very_stable":"非常に安定したペアに最適","best_for_stable":"安定したペアに最適","best_for_most_pair":"ほとんどのペアに最適","best_for_exotic_pair":"マイナーなペア向け","price_setting":"価格設定","initial_price":"初期価格","price_range":"価格範囲","preview_deposit":"デポジットのプレビュー","selected_range":"選択した範囲","min_price":"最小価格","max_price":"最大価格","confirm_deposit":"デポジットを確認","you_will_receive":"受け取ることができます","pooled_assets":"プールされた資産","pending_rewards":"保留中の報酬","no_clmm_positions":"濃縮型流動性のポジションはありません。","current_position":"現在のポジション","deposit_successful":"デポジットが成功しました","nft_desc":"濃縮型流動性ポジションを表す新しいNFTが今、あなたのウォレットにあります。","dont_burn_nft":"このNFTを燃やさないでください さもないと、流動性を削除できなくなります!NFTを別のウォレットに送信した場合、その新しいウォレットのみが流動性の削除が可能となります。","view_my_positions":"ポジションを表示する","input_lock_desc":"市場価格が指定された価格範囲の外にあります。単一資産のデポジットのみ可能です。","modal_header_add_liquidity_to":"に流動性を追加する","modal_header_remove_liquidity":"流動性を削除する","close_position":"ポジションを閉じる","position_closed":"ポジションが閉じられました","close_mint_position":"{{mint}} ポジションを閉じる。"},"migrate_clmm":{"title":"濃縮型流動性プールに移行する","desc":"以下に移行するか、CLMMプールとリスクについて詳しく学びます","desc_link":"こちら","quick_migration":"クイック移行","quick_migration_desc":"より受動的な戦略のための非常に広い価格範囲。","custom_migration":"カスタム移行","custom_migration_desc":"より高い資本効率のためにカスタム価格範囲を設定します。","heading_clmm_pool":"CLMMプール","heading_price_range":"価格範囲","current_price":"現在の価格","current_position":"現在のポジション","clmm_pool":"CLMMプール","wallet":"ウォレット","footer_note":"* 移行はペンディングリワードも収穫します","footer_note_2":"。","migrate_clmm_tx_title":"CLMMに移行","migrate_clmm_tx_desc":"CLMMポジションに移行します。"},"portfolio":{"title":"ポートフォリオ","hero_title":"私のポートフォリオ","assets_by_pool":"プール別の資産","assets_by_token":"トークン別の資産","idle_tokens":"アイドルトークン","harvest_all_label":"未収穫利益","harvest_all_tooltip":"\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16未収穫利益の説明","harvest_all_button":"すべて収穫する","section_overview":"概要","section_positions":"私のポジション","section_positions_tab_clmm":"濃縮型","section_positions_tab_standard":"標準","section_positions_tab_staking":"ステーキング済み RAY","section_positions_clmm_switch_direction_tooltip":"データ表示を簡素化するためにベース/クォートトークンが切り替えられました。","section_positions_clmm_account_view_more":"さらに表示","section_positions_clmm_account_view_less":"表示を減らす","section_positions_clmm_account_nft_mint_address":"NFTミントアドレス","section_positions_clmm_account_pending_yield":"未収穫利益","section_positions_clmm_account_pending_yield_button":"収穫","section_my_created_farms":"私が作成したファーム","section_department_tab_clmm":"濃縮型","section_department_tab_standard":"標準","section_department_tab_all":"すべて","section_my_created_farms_item_edit_farm_button":"ファームを編集","no_staked_farm":"ステーキングされたRAYはありません。","no_standard_positions":"標準の流動性ポジションはありません。","stake_item_stake_button":"ステーク","stake_item_migrate_button":"マイグレーション","acceleraytor":"アクセルレイター","acceleraytor_desc":"アクセルレイターから未請求の資金があります。残高は以下から請求できます。","acceleraytor_banner_desc":"アクセルレイターに未請求の資金があります。このページの一番下で詳細を確認し、1クリックで資金を請求できます。","acceleraytor_tx_title":"アクセルレイターの請求","acceleraytor_tx_desc":"{{amountA}} {{symbolA}} の請求","acceleraytor_tx_1_desc":"{{amountA}} {{symbolA}}{{amountB}} {{symbolB}} の請求"},"amm":{"staked":"ステーク済み","pending_reward":"保留中の報酬","pending_reward_button":"収穫","pending_alert":"ファームでステーキングされていないLPトークンがあります。今すぐステーキングしてください","pooled_token":"{{token}}をプール済み","farm_ended":"ファーム非アクティブ","farm_unstaked":"ステーキングされていないLP","position":"ポジション"},"staking":{"title":"ステーキング","pending_reward":"保留中の報酬","pending_rewards":"保留中の報酬","staked":"ステーク済み","APR":"年間利益率","liquidity":"流動性","available":"利用可能な{{symbol}}","pending_rewards_tooltip":"\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16","pending_rewards_button":"収穫","staking_desc":"RAYをステーキングして追加のRAY収益を獲得します。","unstake_modal_header":"{{symbol}}のステーク解除","unstake_modal_confirm_text":"{{symbol}}のステーク解除","stake_modal_header":"{{symbol}}のステーク","stake_modal_confirm_text":"{{symbol}}のステーク","alert_empty_token":"不足しているRAY残高"},"wallet":{"connected_hint":{"portfolio_info":"ウォレットを接続して、アセットの分布を表示します。","portfolio_idle":"ウォレットを接続して、預けられたアセットを表示します。","portfolio_position":"ウォレットを接続して、ポジションを表示します。"}},"error":{"should_input_valid_minimum_order_size":"有効な最小注文サイズを入力してください","should_input_valid_price_tick":"有効な価格ティックサイズを入力してください","select_quote_token":"クォートトークンを選択してください","select_base_token":"ベーストークンを選択してください","enter_upper_price":"上限価格を入力してください","enter_lower_price":"下限価格を入力してください","enter_max_price":"最大価格を入力してください","enter_min_price":"最小価格を入力してください","enter_current_price":"現在価格を入力してください","enter_order_size":"注文サイズを入力してください","enter_price_tick":"価格ティックサイズを入力してください","select_pool_fee":"プール手数料ティアを選択してください","select_pool_token_1":"プールトークン1を選択してください","select_pool_token_2":"プールトークン2を選択してください","pool_not_found":"プールが見つかりません","balance_not_enough":"残高が不足しています","select_reward_token":"報酬トークンを選択してください","enter_token_amount":"トークン量を入力してください","insufficient_sub_balance":"{{token}}の残高が不足しています","no_matches":"一致するものがありません。","no_pools_found":"プールが見つかりません","decrease_reward":"現在のファーム終了時間から72時間以内に報酬率を減少させることが許可されています。","decrease_reward_72h":"現在のファーム終了時間から72時間以内に報酬率を減少させることが許可されています。トークンを追加してみてください。","add_reward_days":"延長された時間は、最小7日間、最大90日間である必要があります。","insufficient_duration":"不十分なファーム期間","emission_rewards_low":"報酬の発行量が最小必要量よりも低いです","start_time_should_later":"開始時間は過去の時間に設定できません。","balance_not_enough_token":"{{side}}トークンの残高が不足しています","should_input_positive_amount":"{{side}}の量をゼロより大きい値で入力してください","select_token":"{{side}}トークンを選択してください","enter_starting_price":"開始価格を入力してください","is_amount_valid":"金額が有効です","api_error":"APIリクエストエラー","no_liquidity_data":"流動性データがありません。","pool_liquidity_appear":"ここにプールの流動性が表示されます。","liquidity_data_not_available":"流動性データは利用できません。","cannot_find_pool":"探しているプールが見つかりませんか?トークンのアドレスを入力するか、以下のプールリストを確認してみてください。","no_chart_data":"このチャートのデータがありません。","no_chart_data_hint":"少々お待ちいただくか、ページを更新してください。"},"input":{"max_button":"最大値","search_for_a_pair_or_enter_amm_id":"ペアを検索するか、AMM IDを入力してください","enter_search_token":"トークンを検索するか、Mintアドレスを貼り付けてください。","search_amm_title":"ペアを検索するか、AMM IDを貼り付けてください","placeholder_input_amm_id":"AmmId / TVLを入力してください"},"date_picker":{"farm_will_end_at":"ファームは終了します"},"transaction":{"title":"トランザクション","sent":"送信済み","processed":"処理済み","failed":"失敗しました","view_detail":"トランザクションの詳細を表示","confirmed":"確認済み"},"edit_farm":{"button":"編集","title":"ファームを編集","farm_id":"ファームID","please_note_title":"ご注意","please_note_content":"トークンを追加したり、ファーミング期間を延長することができます。報酬率を減らす操作は、現在のファーム終了時間から72時間以内にのみ行うことができ、期間は少なくとも7日間延長する必要があります。","tour_note_title":"報酬を追加する方法","tour_note_des_1":"1. ファームに割り当てられた報酬は、ファーミングが開始された後に引き出すことはできません。","tour_note_des_2":"2. 報酬率を増やしたい場合、ファームが稼働中でも追加の報酬を追加できます。期間は少なくとも7日間延長する必要があります。","tour_note_des_3":"3. 報酬率を減らしたい場合、これは現在のファーミング期間の終了から72時間前のみ行うことができ、期間は少なくとも7日間延長する必要があります。","title_des":"ファームを作成する前に、以下の","title_des_link":"詳細なガイド","subtitle_pool":"プール","subtitle_farm_reward":"ファーム報酬","farming_start":"ファーミング開始","farming_end":"ファーミング終了","open_date_picker":"選択","time_day":"日","modal_add_another_token":"別のトークンを追加","estimated_rewards_week":"週間の推定報酬","days_extends":"日延長","box_header_updated_rewards":"更新された報酬","box_header_current_rewards_period":"現在の報酬期間","box_header_rewards_adjustment":"報酬調整","box_header_adjust_rewards":"報酬を調整","box_header_remaining_amount":"残高","remaining_days":"{{days}}日残り","rate":"レート","per_week":"/週","APR":"年換算利回り","loading_text_no_farm":"ファームが見つかりません","loading_text_farm_not_editable":"ファームは編集できません","claim_unemmitted_rewards":"未発行の報酬を請求","button_adjust_rewards":"報酬を調整","button_add_more_rewards":"報酬を追加"},"recent_transaction":{"another_wallet":"別のウォレット","recent_transactions":"最近の取引","view_all":"すべて表示"},"transaction_history":{"name_add_liquidity":"流動性を追加","add_liquidity_desc":"{{amountA}} {{symbolA}}{{amountB}} {{symbolB}} を追加しました。","name_remove_liquidity":"流動性を削除","remove_liquidity_desc":"{{amountA}} {{symbolA}}{{amountB}} {{symbolB}} を削除しました。","name_harvest":"収穫","name_swap":"スワップ","description_remove_liquidity":"{{token1}} の削除 balabalabala\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16","liquidity_staked_title":"流動性をステーク","liquidity_staked_desc":"{{amount}} {{symbol}} をステークしました","liquidity_unstaked_title":"ステークした流動性を引き出す","liquidity_unstaked_desc":"{{amount}} {{symbol}} を引き出しました","harvest_reward_title":"報酬を収穫","harvest_clmm_reward_desc":"CLMM の報酬を収穫","harvest_farm_reward_desc":"ファームの報酬を収穫","update_reward_title":"報酬を更新","update_reward_desc":"報酬を更新しました {{pool}}","create_pool":"プールを作成","create_clmm_pool":"CLMM プールを作成","open_pool_position":"プールポジションを開く","open_clmm_pool_position":"CLMM プールポジションを開く","create_farm":"新しいファームを作成","create_clmm_farm_desc":"ID: {{poolId}}","harvest_rewards":"収穫した報酬","harvest_rewards_desc":"収穫済み:{{symbol}}"},"create_standard_pool":{"step_1":"ステップ 1","step_1_name":"マーケットを作成","step_2":"ステップ 2","step_2_name":"流動性プールを初期化","please_note":"ご注意","please_note_des":"既存のプールにはファームを作成できます。この","please_note_des_link":"詳細なガイド","enter_open_book_market_id":"OpenBook マーケット ID を入力してください","market_id":"マーケット ID","note_has_id":"OpenBook に統合されたプールには、固有の OpenBook マーケット ID がリンクされている必要があります。マーケット ID は 1 つのプールにのみ使用できます。","have_id":"ID を持っています","no_id":"ID を作成","friendly_sentence_1":"最初にマーケット ID が必要です","friendly_sentence_2":"もう少しです!次に初期プール設定を入力してください","note_done":"プールが正常に作成されました!","note_done_2":"今すぐファームを作成するか、戻ることができます","current_price":"現在の価格","initial_liquidity":"初期の流動性","base_token_initial_liquidity":"ベーストークンの初期流動性","quote_token_initial_liquidity":"クォートトークンの初期流動性","market_open_book_id":"OpenBook プログラム ID","market_create_orderbook":"以下に OpenBook マーケット ID を作成してください:","market_tokens":"トークン","market_min_order_size":"最小注文サイズ","market_min_order_size_label":"最小注文サイズ","market_min_order_size_tip":"これは許可される最小注文サイズです。","market_price_tick":"価格ティック","market_price_tick_label":"最小価格ティックサイズ","market_price_tick_tip":"これは価格が動く最小量です。","market_advance_options":"高度なオプション","market_advance_options_desc":"異なるアカウントのサイズを構成して、レンタルコストを調整します。","market_event_queue":"イベントキュー","market_request_queue":"リクエストキュー","market_orderbook":"オーダーブック","market_create_button":"マーケットを作成","market_create_note":"新しいマーケットを作成するのは、3 - 4 SOL かかる場合があります","market_create_note_highlight":"3 - 4 SOL","button_create_farm":"ファームを作成","button_to_my_pools":"マイプールに戻る","button_initialize_liquidity_pool":"流動性プールを初期化"},"create_farm":{"weekly_rewards":"週間リワード","unemmitted_rewards":"未発行リワード","select_pool":"プールを選択","concentrated_liquidity":"濃縮型流動性","standard_amm":"標準 AMM","select_from_your_created_pools":"作成したプールから選択","select_from_your_created_pools_tooltip":"ファームは選択したプールに対して作成されます","item_reward_tooltip":"\uD83E\uDD16","foot_note":"お探しのものが見つかりませんか?","foot_note_link":"新しいプールを作成","step_1":"ステップ 1","step_1_name":"プールを選択","step_1_sentence":"まず、ファームリワード用のプールを選択してください","step_2":"ステップ 2","step_2_name":"リワードを追加","step_2_sentence":"次に、ファームのリワードを入力します","step_3":"ステップ 3","step_3_name":"ファーム詳細を確認","add_another_button_text":"別の追加","add_another_button_text_2":"別のリワードトークンを追加","done":"完了","pool":"プール","period":"期間","farming_rewards":"ファームリワード","button_create_farm":"ファームを作成","error_text_create_farm":"ユーザーは 300 RAY 必要です","please_note":"ご注意","please_note_des":"ファームに割り当てられたリワードは、ファームが開始された後に引き出すことはできません。新しく作成されたファームは、一般的に Raydium に登録されてから 10〜30 分後に表示されます。Solana ネットワークの状態に応じて異なります。","note_des":"このツールは上級者向けです。ファームを作成する前に、この","note_des_link":"詳細ガイド","add_reward_token":"最大3つのリワードトークンを追加できます。","estimated_rewards_week":"推定報酬/週"},"acceleraytor":{"unclaim":"未請求"},"apr_dialog":{"modal_title":"APR 計算方法","desc":"過去の取引手数料と排出量に基づいて推定年利を計算する2つの方法が利用可能です。範囲内のポジションのみが利回りを獲得します。過去のパフォーマンスは将来の結果を示すものではありません。","warning_note":"計算は概算であり、参照のみを目的としています。","mode_D_title":"詳細方法","mode_D_desc":"この方法では、ユーザーの価格帯とポジションサイズによって決まるプールの流動性の暗黙の変化(デルタ)を使用して、推定 APR を計算します。","mode_D_desc_brief":"推定 APR はデルタメソッドによって計算されます。マルチプライヤーメソッドに切り替えるには \'D\' アイコンをクリックするか、","mode_M_title":"マルチプライヤーメソッド","mode_M_desc":"この方法では、ユーザーの価格帯とプールの過去の価格帯との交差点によって決まるマルチプライヤーを適用して、推定 APR を計算します。","mode_M_desc_brief":"推定 APR はマルチプライヤーメソッドによって計算されます。デルタメソッドに切り替えるには \'M\' アイコンをクリックするか、"}}')},86163:function(e){"use strict";e.exports=JSON.parse('{"common":{"language":"언어","playground":"플레이그라운드","disabled":"비활성화","all":"모두","search_all":"모두 검색","layout":"레이아웃","list":"리스트","grid":"그리드","time_base":"시간 기준","more":"더보기","view_chart":"차트 보기","tvl":"TVL","volume":"거래량","24h_volume":"24시간 거래량","24h_pool_fee":"24시간 풀 수수료","rewards":"리워드","amount":"금액","pools":"풀","nft_address":"NFT 주소","copy_success":"복사 성공!","copied":"복사됨","copied_desc":"{{subject}}이(가) 클립보드에 복사되었습니다","week":"주","per_unit":"{{subB}}당 {{subA}}","per_unit_2":"{{subA}}/{{subB}}","price":"가격","token_price":"{{token}} 가격","unit_step":"단계 {{num}}","back":"뒤로","select_a_token":"토큰 선택","popular_tokens":"인기 토큰","balance":"잔액","address":"주소","view_token_list":"토큰 리스트 보기","token_list_settings":"토큰 리스트 설정","select":"선택","subject_price":"{{subject}} 가격","base_token":"기본 토큰","quote_token":"호가 토큰","go_to_pools":"풀로 이동","go_to_staking":"스테이킹으로 이동","add":"추가","view_more":"더보기","view_less":"간단히 보기","nav_text_more":"더보기","nav_text_docs":"문서","nav_text_feedback":"피드백","estimated_APR":"예상 APR","route_go":"이동>>","more_info":"자세히 보기","less_info":"간략히 보기","tokens":"토큰","amm_id":"AMM ID","market_id":"마켓 ID","lp":"LP","fees":"수수료","reward":"리워드","successfully":"성공적으로","token":"토큰","token_list":"토큰 리스트","learn_more":"더 알아보기","pool_id":"풀 ID","add_token":"토큰 추가","remove_token":"토큰 제거","confirm_token":"토큰 확인","user_added":"사용자 추가됨","beta_tooltip":"Sailor Finance V3에 오신 것을 환영합니다! 업데이트가 진행 중입니다. V2 사이트는 여전히 <0>여기에서 접근할 수 있습니다.","days":"일","sort_by":"정렬 기준","app_version_available":"새 버전 이용 가능","refresh_update":"페이지를 새로고침하여 앱을 업데이트하고 사용하세요.","refresh":"새로고침","update_later":"나중에 업데이트"},"button":{"deposit":"예치","close":"닫기","delete":"삭제","cancel":"취소","continue":"계속","confirm":"확인","confirm_understand":"이해했고, 확인합니다","edit":"편집","search":"검색","reset":"리셋","stake":"스테이킹","unstake":"언스테이킹","harvest":"수확","save":"저장","claim":"청구","not_now":"나중에","switch":"전환","back":"뒤로","next_step":"다음 단계","migrate":"마이그레이션","connect_wallet":"지갑 연결"},"badge":{"suggested":"추천","new":"신규","ongoing":"진행 중","ended":"종료됨","updated":"업데이트됨","ecosystem":"생태계","fusion":"퓨전","raydium":"Raydium","openbook":"오픈북"},"setting_board":{"panel_title":"설정","default_explorer":"기본 탐색기","default_explorer_tooltip":"선호하는 블록 탐색기를 선택","rpc_connection":"RPC 연결","rpc_connection_tooltip":"선호하는 RPC 엔드포인트를 선택","color_theme":"색상 테마","slippage_tolerance_swap":"스왑 슬리피지 허용범위","slippage_tolerance_liquidity":"유동성 슬리피지 허용범위","slippage_tolerance_tooltip_swap":"스왑 거래에 대한 슬리피지 허용범위를 설정하세요.","slippage_tolerance_tooltip_liquidity":"기본/호가 토큰 예치 비율 변경에 대한 허용범위를 설정하세요.","slippage_tolerance_forerun":"거래가 프론트러닝되어 불리한 거래 결과가 발생할 수 있습니다","slippage_tolerance_fail":"거래가 실패할 수 있습니다","language":"언어","language_tooltip":"선호하는 언어 선택","versioned_transaction":"버전 트랜잭션","versioned_transaction_tooltip":"버전 트랜잭션은 고급 스왑 라우팅 등 추가 기능을 제공하는 중요한 업그레이드입니다. 버전 트랜잭션을 켜기 전에 지갑이 호환되는지 확인하십시오.","custom":"사용자 지정","fee_auto":"자동","fee_dynamic":"동적","fee_none":"없음","fee_high":"높음","fee_turbo":"터보","transaction_priority":"우대 거래","transaction_priority_desc":"우대 거래 수수료는 Solana 네트워크에 지불됩니다. 이 추가 수수료는 거래가 다른 거래보다 우선 처리되도록 도와주며, 빠른 거래 체결을 돕습니다.","transaction_priority_fee":"우대 거래 수수료","transaction_priority_fee_tip":"우대 거래 수수료는 Solana 네트워크에 지불됩니다. 이 추가 수수료는 거래 우선순위를 높여 빠른 거래 체결을 돕습니다. 거래가 실패하더라도 수수료는 지불됩니다.","transaction_priority_fee_usage":"수수료 설정은 스왑, 유동성 및 스테이킹을 포함한 모든 Sailor Finance 기능에 적용됩니다.","priority_level":"우대 수준","priority_level_fast":"빠름","priority_level_turbo":"터보","priority_level_ultra":"울트라","priority_mode":"우대 모드","priority_mode_max_cap":"최대 상한","priority_mode_exact_fee":"정확한 수수료","priority_mode_set_max_cap":"최대 상한 설정","priority_fee_auto_optimizes":"Sailor Finance은 거래에 대한 우대 수수료를 자동 최적화합니다. 과도한 지불을 방지하기 위해 최대 상한을 설정하세요.","priority_fee_exact":"거래는 아래 설정된 정확한 수수료를 사용합니다.","priority_fee_below_market_rate":"현재 최대 수수료가 시장 가격보다 낮습니다. 거래가 처리되도록 수수료를 인상하세요."},"wallet_connect_panel":{"title":"지갑을 Sailor Finance에 연결","desc":"지갑을 연결하면, 귀하는 이용 약관을 읽고 이해하며 동의한 것으로 간주됩니다","desc_link":"면책 조항","choose_network":"네트워크 선택","choose_wallet":"지갑 선택","show_uninstalled_wallets":"설치되지 않은 지갑 보기","tour_title":"처음이신가요?","tour_desc":"Sailor Finance 시작하기","disconnect":"연결 해제","auto_confirm":"자동 확인","auto_approve":"자동 승인","auto_confirm_tip":"Sailor Finance의 모든 거래에 대해 자동 확인이 가능합니다. <0>더 알아보기","auto_approve_tip_solflare":"Sailor Finance의 모든 거래에 대해 자동 승인이 가능합니다.","phantom_wallet_not_installed":"이런... Phantom이 설치되지 않은 것 같습니다!","install_phantom":"Phantom 설치","how_to_install_phantom":"Phantom 설치 방법?","on_mobile":"모바일에서:","mobile_open_wallet":"지갑 앱을 다운로드하고 여세요","on_desktop":"데스크톱에서:","install_refresh_page":"위 링크에서 설치한 후 이 페이지를 새로고침하세요","wallet_installed_refresh_page":"설치 완료, 페이지 새로고침","goback":"뒤로 가기","sell_crypto":"암호화폐 매도 ","buy_crypto_with_fiat":"법정화폐로 암호화폐 구매"},"token_selector":{"search_placeholder":"토큰 검색 또는 주소 붙여넣기","jupiter_types_all":"모두","jupiter_types_strict":"엄격","token_not_found":"찾으려는 토큰을 찾을 수 없습니까? 민트 주소를 입력하거나 아래 토큰 리스트 설정을 확인하세요.","input_token_symbol":"이 토큰의 심볼을 입력하세요","input_token_name":"이 토큰의 이름을 입력하세요 (선택 사항)","add_user_token":"사용자 토큰 추가","token_freeze_warning":"거래동결권한 경고","token_has_freeze":"이 토큰은 거래동결 권한이 활성화되어 있어 나중에 토큰 전송이나 거래가 동결될 수 있습니다.","token_has_freeze_disable":"선택한 토큰에 거래동결 권한이 활성화되어 있습니다. 동결 권한을 비활성화하고 다시 시도하거나 다른 토큰을 선택하세요."},"field":{"24h_volume":"24시간 거래량","24h_fees":"24시간 수수료","24h_apr":"24시간 APR","7d_volume":"7일 거래량","7d_fees":"7일 수수료","7d_apr":"7일 APR","30d_volume":"30일 거래량","30d_fees":"30일 수수료","30d_apr":"30일 APR","total_apr":"총 APR","trade_fees":"거래 수수료","weekly_rewards":"주간 리워드","fee_tier":"수수료 티어","fee":"수수료","current_price":"현재 가격","apr":"APR","min":"최소","max":"최대","start_time":"시작 시간","total_value":"총 가치"},"swap":{"title":"스왑","from_label":"출발","to_label":"도착","info_minimum_received":"최소 수령","info_minimum_received_tooltip":"수령할 최소 토큰 수입니다. 이는 귀하의 슬리피지 허용 범위에 따라 결정됩니다.","info_maximum_input":"최대 투입","info_maximum_input_tooltip":"이 거래에 투입할 최대 토큰 수","info_order_routing":"주문 라우팅","info_order_routing_tooltip":"이 라우팅이 최상의 가격을 제공합니다.","info_price_impact":"가격 영향","info_price_impact_tooltip":"거래 규모에 따른 현재 시장 가격과 예상 가격의 차이","info_estimated_fees":"예상 수수료","info_estimated_fees_tooltip":"스왑 수수료는 LP, RAY 바이백, 그리고 금고로 들어갑니다.","info_not_default_token":"이 토큰은 기본 토큰 리스트에 없습니다.","info_add_not_default_token":"아래를 클릭함으로써 거래할 토큰을 확인할 책임이 본인에게 있음을 인정합니다.","price_impact_high_tooltip":"가격 영향 경고","price_impact_warning_tooltip":"가격 영향 경고","price_impact_low_tooltip":"낮은 가격 영향","alert_price_updated":"가격 업데이트됨","alert_price_updated_tooltip":"스왑 수량 입력 이후 가격이 변경되었습니다.","alert_price_updated_button":"수락","alert_high_price_warn_title":"높은 가격 영향 경고","alert_high_price_warn_desc":"이 스왑의 가격 영향은 {{percent}}
확인하면 이 스왑에 대해 불리한 가격이 될 수 있습니다!","swap_anyway":"그래도 스왑","pool_not_found":"풀을 찾을 수 없음","pool_loading":"풀 로딩 중...","computing":"계산 중...","error_ROUTE_NOT_FOUND":"경로를 찾을 수 없음","error_AMOUNT_TOO_SMALL":"스왑 금액이 너무 작음","error_TOO_LOW_LIQUIDITY":"유동성이 부족함","error_INSUFFICIENT_LIQUIDITY":"유동성이 부족함","error_REQ_POOL_NOT_OPEN":"풀은 다음 시간에 열립니다","error_sei_fee_not_insufficient":"수수료와 예치금으로 최소 {{amount}} SEI이 필요합니다","user_added_token_list":"사용자 추가 토큰 리스트","show_chart":"차트 보기","unwrap_all_wsol":"언랩된 모든 WSOL","unwrap_all_wsol_desc":"합계 {{amount}} WSOL 언랩됨","unwrap_wsol_info":"언랩할 수 있는 {{amount}} WSOL이 있습니다.","blink_referral_desc":"맞춤 추천 링크를 복사하고 트위터에서 Blink와 함께 사용하여 1% 리워드를 받으세요!"},"liquidity_pools":{"view_chart_tooltip":"풀 차트 보기","chart_tab_volume":"거래량","chart_tab_liquidity":"유동성","chart_tooltip_volume":"거래량","modal_header_standard_position_detail":"표준 포지션 세부 정보","farms":"팜"},"liquidity":{"title":"유동성","pools":"유동성 풀","pool_info":"풀 정보","pools_desc":"유동성을 제공하고 수익을 얻으세요.","concentrated":"집중형","standard":"표준형","pool":"풀","fee_rate":"수수료율","show_farms":"팜 보기","create_pool":"생성","create_pool_mobile":"생성","create_pool_tx_title":"풀 생성","create_pool_tx_desc":"{{mintA}} - {{mintB}} 풀 생성","value":"가치","select_type":"풀 유형 선택","select_farm":"팜 선택","stake_liquidity":"유동성 스테이킹","unstake_liquidity":"유동성 언스테이킹","add_liquidity":"유동성 추가","remove_liquidity":"유동성 제거","withdraw_liquidity":"유동성 인출","pool_liquidity":"풀 유동성","pooled":"풀링된","pool_not_found":"풀을 찾을 수 없음","total_apr_7d":"7일간 총 APR","my_position":"내 포지션","APR":"APR","APR_tooltip":"지난 24시간 동안 풀에서 얻은 거래 수수료 기준 예상 APR","my_lp_balance":"내 LP 잔고","lp_token_balance":"LP 토큰 잔고","staked_liquidity":"스테이킹된 유동성","unstaked_liquidity":"언스테이킹된 유동성","rewards_to_be_harvested":"수확할 리워드","assets_to_be_received":"받을 자산","staked":"스테이킹됨","unstaked":"언스테이킹됨","auto_swap":"자동 스왑","total_deposit":"총 입금액","stakeable_hint":"이 풀에 언스테이킹된 LP 토큰이 있습니다. 유동성 스테이킹 탭에서 직접 스테이킹할 수 있습니다.","auto_swap_hint":"자동 스왑이 켜져 있으면, 포지션을 생성하는 데 필요한 예치 비율로 자동으로 스왑됩니다.","auto_swap_modal":{"turn_on_title":"자동 스왑을 켜시겠습니까?","turn_off_title":"자동 스왑을 끄시겠습니까?","turn_on_description":"자동 스왑이 켜져 있으면 토큰 금액이 포지션을 생성하는 데 필요한 예치 비율로 자동으로 스왑됩니다.","turn_off_description":"자동 스왑이 꺼져 있으면 토큰이 포지션 예치 비율에 맞게 스왑되지 않습니다. 포지션을 생성하려면 지갑에 충분한 토큰이 있어야 합니다.","turn_on":"자동 스왑 켜기","turn_off":"자동 스왑 끄기"},"setting_modal":{"title":"설정"},"pool_search_modal":{"title":"풀 검색"},"pool_fee_desc":"이 풀은 {{feeRate}}% 수수료 티어 {{type}} 유동성 풀입니다","no_active_farm":"이 풀에 활성 팜이 없습니다.","loading_pool":"풀 로딩 중","create_lp":"포지션 생성","preview_pool":"풀 미리보기","want_to_stake_lp":"지금 LP를 스테이킹 하시겠습니까?","stake_lp_desc":"LP 토큰을 팜에 스테이킹하여 추가 리워드을 얻으세요. 나중에 포트폴리오에서 할 수도 있습니다.","assets_to_received":"받을 자산","tx_message":{"staked_successfully":"{{symbol}} 스테이킹됨","staked_desc":"{{amount}} {{symbol}}을(를) 스테이킹했습니다.","unStaked_successfully":"{{symbol}} 언스테이킹됨","unStaked_desc":"{{amount}} {{symbol}}을(를) 언스테이킹했습니다."},"rewards_ended":"종료됨","rewards_ends":"종료","tvl_dsc":"거래량 (내림차순)","tvl_asc":"거래량 (오름차순)","lp_dsc":"유동성 (내림차순)","lp_asc":"유동성 (오름차순)","yield_dsc":"수익 (내림차순)","yield_asc":"수익 (오름차순)","default":"기본값","keep_my_position_open":"내 포지션 오픈 상태로 유지","keep_my_position_open_tip":"모든 토큰을 제거하더라도 다음 번에 포지션을 원활하게 추가하기 위해 포지션을 오픈 상태로 둘 수 있습니다."},"create_pool":{"modal_title":"다음에서 시작하고 싶습니다...","modal_tab_label":"풀 유형","modal_tab_standard_amm":"표준 AMM","modal_tab_concentrated":"집중 유동성","modal_section_header_pool":"풀 생성","modal_section_header_pool_desc":"모든 토큰 페어에 대한 유동성 풀을 생성하세요. 자세한 설명은 <0>CLMM 또는 <1>표준 풀에 대한 가이드를 읽으세요.","modal_section_header_pool_desc_link":"상세 가이드","modal_section_header_farm":"팜 생성","modal_section_header_farm_desc":"이미 활성화된 모든 풀에 대해 팜을 생성할 수 있습니다. 자세한 설명은 <0>CLMM 또는 <1>표준 팜에 대한 가이드를 읽으세요.","clmm_please_note":"주의 사항","clmm_please_note_des":"이 도구는 고급 사용자용입니다. 자세한 설명은 <0>CLMM 또는 <1>표준 풀에 대한 가이드를 읽으세요.","clmm_create_pool_note_step1":"먼저, 토큰 및 수수료 티어 선택","clmm_create_pool_note_step2":"다음, 초기 토큰 가격 및 포지션 가격 범위 설정","clmm_create_pool_note_step3":"마지막으로, 토큰 예치 금액 입력","pool_existed":"풀 존재"},"farm":{"create":"팜 생성","show_closed":"종료된 항목 보기","title_farm_created_success":"팜 생성 TX 성공!!","info_farm_created_success":"팜이 성공적으로 생성되었습니다!","to_my_created_farms":"내가 생성한 팜으로 이동","farm_id":"팜 ID"},"clmm":{"total_deposit":"총 예치금","my_range":"내 범위","nft_mint_address":"NFT 민트 주소","nft_mint":"NFT 민트","in_range":"범위 내","out_of_range":"범위 밖","create_new_position":"새 포지션 생성","position":"포지션","set_price_range":"가격 범위 설정","time_price_range":"{{time}} 가격 범위","match_deposit_ratio":"예치 비율 맞추기","add_deposit_amount":"예치금 추가","match_deposit_ratio_tooltip":"켜져 있으면 포지션을 생성하는 데 필요한 예치 비율로 토큰 금액이 자동으로 스왑됩니다","deposit_ratio":"예치 비율","select_token_fee_tier":"토큰 및 수수료 티어 선택","set_initial_price_range":"초기 가격 및 범위 설정","enter_deposit_amount":"예치금 입력","best_for_very_stable":"매우 안정적인 페어에 최적","best_for_stable":"안정적인 페어에 최적","best_for_most_pair":"대부분의 페어에 최적","best_for_exotic_pair":"특이한 페어에 최적","price_setting":"가격 설정","initial_price":"초기 가격","price_range":"가격 범위","preview_deposit":"예치금 미리보기","selected_range":"선택된 범위","min_price":"최소 가격","max_price":"최대 가격","confirm_deposit":"예치 확인","you_will_receive":"받을 금액","pooled_assets":"풀링된 자산","pending_rewards":"대기 중인 리워드","no_clmm_positions":"집중 유동성 포지션이 없습니다.","current_position":"현재 포지션","deposit_successful":"예치 성공","nft_desc":"새로운 집중 유동성 포지션을 나타내는 NFT가 이제 지갑에 있습니다.","dont_burn_nft":"절대 이 NFT를 소각하지 마십시오. 소각하면 유동성을 제거할 수 없습니다! NFT를 다른 지갑으로 보내면 새 지갑에서만 유동성을 제거할 수 있습니다.","view_my_positions":"내 포지션 보기","input_lock_desc":"시장 가격이 지정된 가격 범위 밖에 있습니다. 단일 자산 예치만 가능합니다.","modal_header_add_liquidity_to":"유동성 추가","modal_header_remove_liquidity":"유동성 제거","close_position":"포지션 닫기","position_closed":"포지션 닫힘","close_mint_position":"{{mint}} 포지션 닫기.","full_range":"전체 범위","custom":"사용자 지정","start_now":"지금 시작","price_away_from_market":"풀 가격이 시장 가격에서 {{percent}}만큼 떨어져 있습니다","price_away_from_market_tooltip":"풀 가격이 이 페어에 대해 불균형입니다. 넓은 범위에 적은 양의 유동성을 추가해도 가격을 현재 시장 가격에 더 가깝게 만들 수 있습니다.","low_liquidity":"유동성 낮음: ","low_liquidity_desc":"당신의 예치금이 풀의 현재 유동성에 비해 큽니다. 이는 포지션에서의 차익거래를 초래할 수 있습니다. 호가가 시장 가격에서 멀리 떨어져 있으면 이 위험이 커질 수 있습니다."},"migrate_clmm":{"title":"집중 유동성 풀로 마이그레이션","desc":"아래에서 마이그레이션하거나 CLMM 풀 및 위험에 대해 더 알아보세요","desc_link":"여기","quick_migration":"빠른 마이그레이션","quick_migration_desc":"더 수동적인 전략을 위한 매우 넓은 가격 범위.","custom_migration":"사용자 지정 마이그레이션","custom_migration_desc":"더 높은 자본 효율성을 위한 사용자 지정 가격 범위 설정.","heading_clmm_pool":"CLMM 풀","heading_price_range":"가격 범위","current_price":"현재 가격","current_position":"현재 포지션","clmm_pool":"CLMM 풀","wallet":"지갑","footer_note":"* 마이그레이션을 하면 수확도 합니다","footer_note_2":"보류 중인 리워드에서.","migrate_clmm_tx_title":"CLMM으로 마이그레이션","migrate_clmm_tx_desc":"{{mint}}을 CLMM 포지션으로 마이그레이션합니다."},"portfolio":{"title":"포트폴리오","hero_title":"내 포트폴리오","assets_by_pool":"풀별 자산","assets_by_token":"토큰별 자산","idle_tokens":"유휴 토큰","harvest_all_label":"대기 중인 수익","harvest_all_tooltip":"모두 수확하기에 대한 \uD83E\uDD16\uD83E\uDD16\uD83E\uDD16 설명","harvest_all_button":"모두 수확","section_overview":"개요","section_positions":"내 포지션","section_positions_tab_clmm":"집중형","section_positions_tab_standard":"표준형","section_positions_tab_staking":"스테이킹된 RAY","section_positions_clmm_switch_direction_tooltip":"데이터 표시를 단순화하기 위해 기본/호가 토큰이 전환되었습니다.","section_positions_clmm_account_view_more":"더 보기","section_positions_clmm_account_view_less":"덜 보기","section_positions_clmm_account_nft_mint_address":"NFT 민트 주소","section_positions_clmm_account_pending_yield":"대기 중인 수익","section_positions_clmm_account_pending_yield_button":"수확","section_my_created_farms":"내가 생성한 팜","section_department_tab_clmm":"집중형","section_department_tab_standard":"표준형","section_department_tab_all":"모두","section_my_created_farms_item_edit_farm_button":"팜 수정","no_staked_farm":"스테이킹된 RAY가 없습니다.","no_standard_positions":"표준 유동성 포지션이 없습니다.","stake_item_stake_button":"스테이킹","stake_item_migrate_button":"마이그레이션","acceleraytor":"엑셀러레이터","acceleraytor_desc":"엑셀러레이터에서 청구되지 않은 자금이 있습니다. 남은 자금은 아래에서 청구할 수 있습니다.","acceleraytor_banner_desc":"엑셀러레이터에서 청구되지 않은 자금이 있습니다. 이 페이지 하단에서 세부 정보를 확인하고 한 번의 클릭으로 자금을 청구하세요.","acceleraytor_tx_title":"엑셀러레이터 청구","acceleraytor_tx_desc":"{{amountA}} {{symbolA}} 청구","acceleraytor_tx_1_desc":"{{amountA}} {{symbolA}}{{amountB}} {{symbolB}} 청구","load_more":"더 불러오기","id":"ID"},"amm":{"staked":"스테이킹됨","pending_reward":"대기 중인 리워드","pending_reward_button":"수확","pending_alert":"팜에 스테이킹할 수 있는 언스테이킹된 LP 토큰이 있습니다. 지금 스테이킹하세요.","pooled_token":"풀링된 {{token}}","farm_ended":"팜 비활성화","farm_unstaked":"언스테이킹된 LP","position":"포지션"},"staking":{"title":"스테이킹","pending_reward":"대기 중인 리워드","pending_rewards":"대기 중인 리워드","staked":"스테이킹됨","APR":"APR","liquidity":"유동성","available":"사용 가능 {{symbol}}","pending_rewards_tooltip":"대기 중인 리워드는 현재 풀 크기와 마지막 수확 이후 시간을 기준으로 계산됩니다.","pending_rewards_button":"수확","staking_desc":"RAY를 스테이킹하여 추가 RAY 수익을 얻으세요.","unstake_modal_header":"{{symbol}} 언스테이킹","unstake_modal_confirm_text":"{{symbol}} 언스테이킹","stake_modal_header":"{{symbol}} 스테이킹","stake_modal_confirm_text":"{{symbol}} 스테이킹","alert_empty_token":"RAY 잔액이 부족합니다."},"wallet":{"connected_hint":{"portfolio_info":"자산 분포를 보려면 지갑을 연결하세요.","portfolio_idle":"예치된 자산을 보려면 지갑을 연결하세요.","portfolio_position":"포지션을 보려면 지갑을 연결하세요."}},"error":{"should_input_valid_minimum_order_size":"유효한 최소 주문 크기를 입력하세요","should_input_valid_price_tick":"유효한 가격 틱 크기를 입력하세요","select_quote_token":"호가 토큰을 선택하세요","select_base_token":"기본 토큰을 선택하세요","enter_upper_price":"높은 가격을 입력하세요","enter_lower_price":"낮은 가격을 입력하세요","enter_max_price":"상한 가격을 입력하세요","enter_min_price":"하한 가격을 입력하세요","invalid_max_price":"잘못된 상한 가격","invalid_min_price":"잘못된 하한 가격","enter_current_price":"현재 가격을 입력하세요","enter_order_size":"주문 크기를 입력하세요","enter_price_tick":"가격 틱 크기를 입력하세요","select_pool_fee":"풀 수수료 티어를 선택하세요","select_pool_token_1":"풀 토큰 1을 선택하세요","select_pool_token_2":"풀 토큰 2를 선택하세요","pool_not_found":"풀을 찾을 수 없습니다","balance_not_enough":"잔액이 부족합니다","select_reward_token":"리워드 토큰을 선택하세요","enter_token_amount":"토큰 수량을 입력하세요","insufficient_sub_balance":"{{token}} 잔액이 부족합니다","no_matches":"일치하는 항목이 없습니다.","no_pools_found":"풀이 발견되지 않았습니다","decrease_reward":"리워드율 축소는 현재 팜 종료 전 72시간 이내에 허용됩니다.","decrease_reward_72h":"리워드율 축소는 현재 팜 종료 전 72시간 이내에 허용됩니다. 더 많은 토큰을 추가하세요.","add_reward_days":"시간 연장은 최소 7일, 최대 90일이어야 합니다.","insufficient_duration":"팜 기간이 불충분합니다","emission_rewards_low":"리워드 금액이 배출을 위한 최소량보다 낮습니다","start_time_should_later":"시작 시간을 과거로 설정할 수 없습니다.","balance_not_enough_token":"{{side}} 토큰 잔액이 부족합니다","should_input_positive_amount":"{{side}}의 양을 0보다 크게 입력하세요","select_token":"{{side}} 토큰을 선택하세요","enter_starting_price":"시작 가격을 입력하세요","is_amount_valid":"수치 유효 확인","api_error":"API 요청 오류","no_liquidity_data":"유동성 데이터가 없습니다.","pool_liquidity_appear":"풀 유동성이 여기에 표시됩니다.","liquidity_data_not_available":"유동성 데이터를 사용할 수 없습니다.","cannot_find_pool":"찾고 있는 풀을 찾을 수 없습니까? 토큰 주소를 입력하거나 아래 풀 리스트을 확인하세요.","no_chart_data":"이 차트에 데이터가 없습니다.","no_chart_data_hint":"잠시 기다리거나 페이지를 새로 고침하세요.","liquidity_not_enough":"유동성이 충분하지 않습니다","swap_slippage_error_title":"슬리피지 오류로 인해 스왑 실패!","swap_slippage_error_desc":"슬리피지가 사용자 설정을 초과했습니다.\\n다시 시도하거나 슬리피지 허용 오차를 조정하세요."},"input":{"max_button":"최대","search_for_a_pair_or_enter_amm_id":"페어를 검색하거나 AMM ID를 입력하세요","enter_search_token":"토큰을 검색하거나 민트 주소를 붙여넣으세요.","search_amm_title":"페어를 검색하거나 AMM ID를 붙여넣으세요","placeholder_input_amm_id":"AmmId / TVL을 입력하세요","enter_custom_value":"사용자 정의 값을 입력하세요"},"date_picker":{"farm_will_end_at":"팜이 종료됩니다","farm_period":"팜 기간","start_on":"시작","start_at":"시작 시간","duration":"기간"},"transaction":{"title":"거래","sent":"보냄","processed":"처리됨","failed":"실패함","view_detail":"거래 세부사항 보기","confirmed":"확인됨","send_failed":"{{title}} 거래 보내기 실패","transaction_initiating":"거래 시작","multisig_wallet":"다중서명 지갑","multisig_wallet_initiation":"거래 시작","multisig_wallet_initiated":"거래가 시작되었습니다.","multisig_wallet_desc":"이제 Squads 앱에서 이 제안에 대한 투표를 할 수 있습니다.","sending":"보내는 중..","send_timeout":"거래 전송 시간 초과"},"edit_farm":{"button":"편집","title":"팜 편집","farm_id":"팜 ID","please_note_title":"유의 사항","please_note_content":"더 많은 토큰을 추가하거나 팜 기간을 연장할 수 있습니다. 리워드율을 줄이는 모든 작업은 현재 팜 종료 시간의 72시간 이내에만 수행할 수 있으며, 기간은 최소 7일 연장해야 합니다.","tour_note_title":"리워드를 추가하는 방법?","tour_note_des_1":"1. 팜에 할당된 리워드는 팜이 시작된 후에는 인출할 수 없습니다.","tour_note_des_2":"2. 리워드율을 높이고 싶다면, 팜이 진행 중일 때 추가 리워드을 더할 수 있습니다. 기간은 최소 7일 이상 연장해야 합니다.","tour_note_des_3":"3. 리워드율을 낮추고 싶다면, 이는 현재 팜 기간 종료 전 72시간 동안 가능합니다. 기간은 최소 7일 이상 연장해야 합니다.","title_des":"팜을 생성하기 전에 확인하십시오","title_des_link":"상세 가이드","subtitle_pool":"풀","subtitle_farm_reward":"팜 리워드","farming_start":"팜 시작","farming_end":"팜 종료","open_date_picker":"선택","time_day":"일","modal_add_another_token":"다른 토큰 추가","estimated_rewards_week":"예상 리워드/주","days_extends":"날짜 연장","box_header_updated_rewards":"업데이트된 리워드","box_header_current_rewards_period":"현재 리워드 기간","box_header_rewards_adjustment":"리워드 조정","box_header_adjust_rewards":"리워드 조정하기","box_header_remaining_amount":"남은 수량","remaining_days":"{{days}}일 남음","rate":"비율","per_week":"/주","APR":"APR","loading_text_no_farm":"팜을 찾을 수 없습니다","loading_text_farm_not_editable":"팜을 편집할 수 없습니다","claim_unemmitted_rewards":"미배출 리워드 청구","button_adjust_rewards":"리워드 조정","button_add_more_rewards":"더 많은 리워드 추가"},"recent_transaction":{"another_wallet":"다른 지갑","recent_transactions":"최근 거래","view_all":"모두 보기"},"transaction_history":{"name_add_liquidity":"유동성 추가","add_liquidity_desc":"추가된 {{amountA}} {{symbolA}}{{amountB}} {{symbolB}}","name_remove_liquidity":"유동성 제거","remove_liquidity_desc":"제거된 {{amountA}} {{symbolA}}{{amountB}} {{symbolB}}","name_harvest":"수확","set_up":"설정","clean_up":"정리","name_swap":"스왑","desc_swap":"{{amountA}} {{symbolA}}{{amountB}} {{symbolB}}로 스왑","description_remove_liquidity":"{{token1}} balabalabala\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16 제거","liquidity_staked_title":"유동성 스테이킹됨","liquidity_staked_desc":"스테이킹된 {{amount}} {{symbol}}","liquidity_unstaked_title":"스테이킹된 유동성 인출","liquidity_unstaked_desc":"언스테이킹된 {{amount}} {{symbol}}","harvest_reward_title":"리워드 수확","harvest_clmm_reward_desc":"CLMM 리워드 수확","harvest_farm_reward_desc":"팜 리워드 수확","update_reward_title":"리워드 업데이트","update_reward_desc":"{{pool}}의 리워드 업데이트","create_pool":"풀 생성","create_clmm_pool":"CLMM 풀 생성","open_pool_position":"풀 포지션 열기","open_clmm_pool_position":"CLMM 풀 포지션 열기","create_farm":"새 팜 생성","create_clmm_farm_desc":"ID: {{poolId}}","harvest_rewards":"수확된 리워드","harvest_rewards_desc":"수확됨: {{symbol}}"},"create_standard_pool":{"step_1":"1단계","step_1_name":"마켓 생성","step_2":"2단계","step_2_name":"유동성 풀 시작하기","please_note":"주의 사항","please_note_des":"이 도구는 고급 사용자용입니다. 자세한 지침은 <0>CLMM 또는 <1>표준 풀 가이드를 읽으십시오.","enter_open_book_market_id":"오픈북 마켓 ID 입력","market_id":"마켓 ID","note_has_id":"오픈북 통합 풀은 고유한 오픈북 마켓 ID와 연결되어야 합니다. 마켓 ID는 하나의 풀에만 사용할 수 있습니다.","have_id":"ID 있음","no_id":"ID 생성","friendly_sentence_1":"먼저 마켓 ID가 필요합니다","friendly_sentence_2":"거의 다 됐습니다! \\n이제 초기 풀 설정을 입력하십시오","note_done":"풀이 성공적으로 생성되었습니다!","note_done_2":"이제 팜을 생성하거나 돌아갈 수 있습니다","current_price":"현재 가격","initial_liquidity":"초기 유동성","base_token_initial_liquidity":"기본 토큰 초기 유동성","quote_token_initial_liquidity":"호가 토큰 초기 유동성","market_open_book_id":"오픈북 프로그램 ID","market_create_orderbook":"아래에서 오픈북 마켓 ID를 생성하십시오:","market_tokens":"토큰","market_min_order_size":"최소 주문 크기","market_min_order_size_label":"최소 주문 크기","market_min_order_size_tip":"이것은 허용되는 가장 작은 주문 크기입니다.","market_price_tick":"가격 틱","market_price_tick_label":"최소 가격 틱 크기","market_price_tick_tip":"이것은 가격이 움직일 수 있는 가장 작은 단위입니다.","market_advance_options":"고급 옵션","market_advance_options_desc":"렌트 비용을 조정하기 위해 다른 계정들의 크기를 설정하십시오.","market_event_queue":"이벤트 큐","market_request_queue":"요청 큐","market_orderbook":"오더북","market_create_button":"마켓 생성","market_create_note":"새 마켓을 생성하는 데는 3 - 4 SOL 정도가 필요합니다.","market_create_note_highlight":"3 - 4 SOL","button_create_farm":"팜 생성","button_to_my_pools":"내 풀로 돌아가기","button_initialize_liquidity_pool":"유동성 풀 초기화","pool_create_integrated_with_openbook":"오픈북 마켓과 통합된 풀을 생성하려면 클릭하세요 ","pool_create_integrated_with_openbook_link":"여기","initial_price_tooltip":"초기 가격은 초기 유동성을 위해 예치된 토큰의 비율로 설정됩니다. 토큰이 이미 Sailor Finance에서 거래되고 있는 경우, 초기 가격은 현재 가격으로 자동으로 채워집니다.","pool_creation_fee_note":"주의: 새로운 풀에 대한 생성 수수료는\xa0{{subject}}\xa0SOL입니다.","pool_creation_fee_tooltip":"0.15 SOL의 풀 생성 수수료는프론트 및 백엔드 인프라를 지원하기 위한 것입니다. 프로그램 계정 생성 및 네트워크 수수료에는 약 0.05 SOL이 필요합니다.","custom":"사용자 정의","start_now":"지금 시작","current_price_tooltip":"이것은 Sailor Finance 기존 풀의 현재 가격입니다. 다른 초기 가격을 입력할 수 있지만, 가격 차이가 클 경우 차익 거래가 발생할 수 있습니다."},"create_farm":{"weekly_rewards":"주간 리워드","unemmitted_rewards":"미배출 리워드","select_pool":"풀 선택","concentrated_liquidity":"집중 유동성","standard_amm":"표준 AMM","select_from_your_created_pools":"생성한 풀에서 선택","select_from_your_created_pools_tooltip":"선택한 풀에 대해 팜이 생성됩니다","item_reward_tooltip":"\uD83E\uDD16","foot_note":"원하는 것을 찾을 수 없습니까?","foot_note_link":"새 풀 생성","step_1":"1단계","step_1_name":"풀 선택","step_1_sentence":"먼저, 팜 리워드를 위한 풀을 선택하십시오","step_2":"2단계","step_2_name":"리워드 추가","step_2_sentence":"다음으로, 팜 리워드를 입력하십시오","step_3":"3단계","step_3_name":"팜 세부 정보 검토","add_another_button_text":"다른 것 추가","add_another_button_text_2":"다른 리워드 토큰 추가","done":"완료","pool":"풀","period":"기간","farming_rewards":"팜 리워드","button_create_farm":"팜 생성","error_text_create_farm":"사용자는 300 RAY가 필요합니다","please_note":"주의 사항","please_note_des":"팜에 할당된 리워드는 팜이 시작된 후에는 인출할 수 없습니다. 새로 생성된 팜은 Solana 네트워크 상태에 따라 일반적으로 생성 후 10-30분 내에 Sailor Finance에 나타납니다.","note_des":"이미 라이브인 풀이면 팜을 생성할 수 있습니다. 자세한 지침은 <0>CLMM 또는 <1>표준 팜 가이드를 읽으십시오.","add_reward_token":"최대 3개의 리워드 토큰을 추가할 수 있습니다.","estimated_rewards_week":"예상 리워드 / 주"},"acceleraytor":{"unclaim":"미청구"},"apr_dialog":{"modal_title":"APR 계산 방법","desc":"과거 거래 수수료 및 배출량을 기반으로 추정 APR을 계산하는 두 가지 방법이 있습니다. 범위 내의 포지션만 수익을 창출합니다. 과거 성과가 미래 결과를 담보하지 않습니다.","warning_note":"계산은 추정치이며 참고용입니다.","mode_D_title":"상세 방법","mode_D_desc":"이 방법은 사용자의 가격 범위와 포지션 크기에 따라 결정된 풀 유동성에 함축된 변화(델타)를 사용하여 추정 APR을 계산합니다.","mode_D_desc_brief":"추정 APR은 델타 방법으로 계산됩니다. ‘D’ 아이콘을 클릭하여 배수법으로 전환하거나","mode_M_title":"배수법","mode_M_desc":"이 방법은 사용자의 가격 범위와 풀의 과거 가격 범위의 교차에 의해 결정된 배수를 적용하여 추정 APR을 계산합니다.","mode_M_desc_brief":"추정 APR은 배수법으로 계산됩니다. \'M\' 아이콘을 클릭하여 델타 방법으로 전환하거나"},"create_market":{"title":"마켓 생성","desc":"{{pair}} 마켓 생성","create":"생성"},"moonpay":{"title":"문페이","phantom_wallet_not_installed":"팬텀을 설치하고 지갑을 연결하여 로그인하십시오.","deposit_using":"다음을 사용하여 입금: ","step1":"1단계","step2":"2단계","step3":"3단계","step1_text":"팬텀으로 회원가입하거나 로그인하십시오.","step2_text":"문페이를 사용하여 Solana를 구매하여 거래 계좌를 충전하십시오.","step3_text":"Sailor Finance에서 원클릭으로 토큰을 사고 팔 수 있습니다."},"disclaimer":{"title":"면책 조항","text1":"이 웹사이트에서 호스팅되는 사용자 인터페이스(이 \\"인터페이스\\")는 비중앙집권적이고 커뮤니티 주도의 블록체인 기반의 스마트 계약 및 도구 모음인 Sailor Finance 프로토콜(“Sailor Finance 프로토콜”)로 통하는 오픈 소스 프론트엔드 소프트웨어 포털입니다. 이 인터페이스 및 Sailor Finance 프로토콜은 Sailor Finance Holding Foundation에 의해 제공되지만, 프로토콜에서 수행되는 모든 거래는 관련 허가가 필요없는 스마트 계약에 의해 실행됩니다. 인터페이스는 오픈 소스이고 Sailor Finance 프로토콜 및 관련 스마트 계약은 모든 사용자, 단체 또는 제3자가 접근할 수 있으므로 Sailor Finance 프로토콜과 상호 작용할 수 있는 제3자 웹 및 모바일 사용자 인터페이스가 다수 있습니다.","text2":"이 인터페이스 및 Sailor Finance 프로토콜은 \'있는 그대로\', 본인의 위험 부담 하에, 어떤 종류의 보증 없이 제공됩니다. Sailor Finance Holding Foundation은 Sailor Finance 프로토콜 또는 프로토콜에서 수행되는 거래 또는 관련 스마트 계약을 제공, 소유 또는 통제하지 않습니다. 이 인터페이스 또는 Sailor Finance 프로토콜 및 관련 스마트 계약을 사용하거나 접근함으로써, 귀하는 이 인터페이스 또는 Sailor Finance 프로토콜을 생성, 배포 또는 유지 관리하는 데 관여한 개발자나 단체가 이 인터페이스 또는 Sailor Finance 프로토콜의 사용, 사용 불가 또는 다른 사용자와의 상호 작용과 관련된 모든 청구 또는 손해에 대해 책임을 지지 않음을 동의하게 됩니다. 여기에는 직접적, 간접적, 우발적, 특수한, 징벌적, 처벌적 또는 결과적 손해 또는 이익, 디지털 자산, 토큰 또는 기타 모든 가치의 손실이 포함됩니다.","text3":"Sailor Finance 프로토콜은 벨라루스, 중앙아프리카공화국, 콩고민주공화국, 조선민주주의인민공화국, 우크라이나의 크림, 도네츠크 인민공화국, 루한스크인민공화국 지역, 쿠바, 이란, 리비아, 소말리아, 수단, 남수단, 시리아, 미국, 예멘, 짐바브웨 및 Sailor Finance 프로토콜 접근 또는 사용이 금지된 기타 관할 지역(“금지된 관할 지역”)의 거주자에게는 제공되지 않습니다.","text4":"이 인터페이스, Sailor Finance 프로토콜 또는 관련 스마트 계약을 사용하거나 접근함으로써, 귀하는 금지된 관할 지역에 위치하지 않으며, 그곳에서 결사, 설립되지 않았으며, 금지된 관할 지역의 시민이나 거주자가 아님을 진술하게 됩니다. 또한 귀하는 제재 하에 있지 않고, 미국 재무부 해외 자산 통제국, 유엔 안전 보장 이사회, 유럽 연합 또는 회원국 또는 기타 정부 당국이 유지하는 금지 또는 제한된 당사자 리스트 또는 제외 또는 거부된 사람 리스트 등에 포함되지 않았음을 진술하게 됩니다.","agree_terms":"약관에 동의","enter_raydium":"Sailor Finance 접속"}}')},65909:function(e){"use strict";e.exports=JSON.parse('{"common":{"language":"Idioma","playground":"playground","disabled":"Desabilitado","all":"Todos","search_all":"Pesquisar tudo","layout":"Layout","list":"lista","grid":"grade","time_base":"Base de tempo","more":"Mais","view_chart":"Ver gr\xe1fico","tvl":"TVL","volume":"Volume","rewards":"Recompensas","amount":"Quantidade","pools":"Pools","nft_address":"Endere\xe7o NFT","copy_success":"Copiado com sucesso!","copied":"Copiado","copied_desc":"{{subject}} foi copiado para a \xe1rea de transfer\xeancia","week":"Semana","per_unit":"{{subA}} por {{subB}}","per_unit_2":"{{subA}}/{{subB}}","price":"Pre\xe7o","token_price":"Pre\xe7o de {{token}}","unit_step":"Passo {{num}}","back":"Voltar","select_a_token":"Selecionar um token","popular_tokens":"Tokens populares","balance":"Saldo","address":"Endere\xe7o","view_token_list":"Ver lista de tokens","token_list_settings":"Configura\xe7\xf5es da lista de tokens","select":"Selecionar","subject_price":"Pre\xe7o de {{subject}}","base_token":"Token base","quote_token":"Token de cota\xe7\xe3o","go_to_pools":"Ir para pools","add":"Adicionar","view_more":"Ver mais","view_less":"Ver menos","nav_text_more":"Mais","nav_text_docs":"Documentos","nav_text_feedback":"Feedback","estimated_APR":"APR estimado","route_go":"Ir>>","more_info":"Mais informa\xe7\xf5es","less_info":"Menos informa\xe7\xf5es","tokens":"Tokens","amm_id":"ID AMM","market_id":"ID de mercado","lp":"LP","fees":"Taxas","reward":"Recompensa","successfully":"Com sucesso","token":"Token","token_list":"Lista de tokens","learn_more":"Aprender mais"},"button":{"deposit":"Depositar","close":"Fechar","delete":"Excluir","cancel":"Cancelar","continue":"Continuar","confirm":"Confirmar","edit":"Editar","search":"Pesquisar","reset":"Resetar","stake":"Staking","unstake":"Remover staking","harvest":"Colher","save":"Salvar","claim":"Reivindicar","not_now":"N\xe3o agora","switch":"Trocar","back":"Voltar","next_step":"Pr\xf3xima etapa","migrate":"Migrar","connect_wallet":"Conectar carteira"},"badge":{"suggested":"Sugerido","new":"Novo","ongoing":"Em andamento","ended":"Finalizado","updated":"Atualizado","ecosystem":"Ecossistema","fusion":"Fusion","raydium":"Raydium"},"setting_board":{"panel_title":"Configura\xe7\xf5es","default_explorer":"Explorador padr\xe3o","default_explorer_tooltip":"Selecione o explorador de blocos preferido","rpc_connection":"Conex\xe3o RPC","rpc_connection_tooltip":"Selecione o endpoint RPC preferido","color_theme":"Tema de Cor","slippage_tolerance":"Toler\xe2ncia de Derrapagem","slippage_tolerance_tooltip":"Selecione a toler\xe2ncia m\xe1xima de derrapagem","language":"Idioma","language_tooltip":"Selecione o idioma preferido","versioned_transaction":"Transa\xe7\xe3o Versionada","versioned_transaction_tooltip":"A Transa\xe7\xe3o Versionada \xe9 uma atualiza\xe7\xe3o significativa que permite funcionalidades adicionais, incluindo roteamento avan\xe7ado de troca. Antes de ativar a Transa\xe7\xe3o Vers., verifique se sua carteira \xe9 compat\xedvel.","custom":"Personalizado"},"wallet_connect_panel":{"title":"Conecte sua carteira ao Raydium","desc":"Ao conectar sua carteira, voc\xea reconhece que leu, entendeu e aceita os termos no","desc_link":"aviso legal","choose_network":"Escolher rede","choose_wallet":"Escolher carteira","show_uninstalled_wallets":"Mostrar carteiras n\xe3o instaladas","tour_title":"Novo por aqui?","tour_desc":"Comece no Raydium","disconnect":"Desconectar"},"token_selector":{"search_placeholder":"Pesquisar por token ou colar endere\xe7o mint","jupiter_types_all":"TODOS","jupiter_types_strict":"Restrito"},"field":{"24h_volume":"Volume 24H","24h_fees":"Taxas 24H","24h_apr":"APR 24H","7d_volume":"Volume 7D","7d_fees":"Taxas 7D","7d_apr":"APR 7D","30d_volume":"Volume 30D","30d_fees":"Taxas 30D","30d_apr":"APR 30D","total_apr":"APR Total","trade_fees":"Taxas de negocia\xe7\xe3o","weekly_rewards":"Recompensas semanais","fee_tier":"N\xedvel de taxa","fee":"Taxa","current_price":"Pre\xe7o atual","apr":"APR","min":"Min","max":"Max","start_time":"Hora de in\xedcio"},"swap":{"title":"Trocar","from_label":"De","to_label":"Para","info_minimum_received":"M\xednimo recebido","info_minimum_received_tooltip":"O n\xfamero m\xednimo de tokens que voc\xea receber\xe1. Isso \xe9 determinado por sua toler\xe2ncia ao slippage.","info_order_routing":"Roteamento de pedidos","info_order_routing_tooltip":"Essa rota deu o melhor pre\xe7o para sua negocia\xe7\xe3o","info_price_impact":"Impacto no pre\xe7o","info_price_impact_tooltip":"A diferen\xe7a entre o pre\xe7o atual do mercado e o pre\xe7o estimado devido ao tamanho da negocia\xe7\xe3o","info_estimated_fees":"Taxas estimadas","info_estimated_fees_tooltip":"As taxas de troca v\xe3o para LPs, recompras de RAY e tesouraria.","alert_price_updated":"Pre\xe7o atualizado","alert_price_updated_tooltip":"O pre\xe7o mudou desde que voc\xea inseriu o valor da troca.","alert_price_updated_button":"Aceitar","pool_not_found":"Pool n\xe3o encontrado","pool_loading":"Carregando pool..."},"liquidity_pools":{"view_chart_tooltip":"Ver gr\xe1ficos do pool","chart_tab_volume":"Volume","chart_tab_liquidity":"Liquidez","chart_tooltip_volume":"volume","modal_header_standard_position_detail":"Detalhes da posi\xe7\xe3o padr\xe3o","farms":"Fazendas"},"liquidity":{"title":"Liquidez","pools":"Pools de liquidez","pool_info":"Informa\xe7\xf5es do pool","pools_desc":"Forne\xe7a liquidez, ganhe rendimento.","concentrated":"Concentrado","standard":"Padr\xe3o","pool":"Pool","fee_rate":"Taxa de taxa","show_farms":"Mostrar fazendas","create_pool":"Criar","create_pool_mobile":"criar","create_pool_tx_title":"Criar pool","create_pool_tx_desc":"criar pool {{mintA}} - {{mintB}}","value":"valor","select_type":"Selecionar tipo de pool","select_farm":"Selecionar fazenda","stake_liquidity":"Stake de Liquidez","unstake_liquidity":"Remover stake de liquidez","add_liquidity":"Adicionar liquidez","remove_liquidity":"Remover liquidez","withdraw_liquidity":"Retirar Liquidez","pool_liquidity":"Liquidez do pool","pooled":"Agrupado","pool_not_found":"Pool n\xe3o encontrado","total_apr_7d":"APR Total 7D","my_position":"Minha posi\xe7\xe3o","APR":"APR","APR_tooltip":"APR estimado com base nas taxas de negocia\xe7\xe3o ganhas pela pool nas \xfaltimas 24 horas","my_lp_balance":"Meu saldo de LP","lp_token_balance":"Saldo de Tokens LP","staked_liquidity":"Liquidez Apostada","unstaked_liquidity":"Liquidez N\xe3o Apostada","rewards_to_be_harvested":"Recompensas a serem colhidas","assets_to_be_received":"Ativos a serem recebidos","staked":"Apostado","unstaked":"N\xe3o Apostado","auto_swap":"Troca Autom\xe1tica","total_deposit":"Dep\xf3sito Total","stakeable_hint":"Voc\xea possui tokens LP n\xe3o apostados para esta pool. Voc\xea pode apost\xe1-los diretamente na guia Stake Liquidity.","auto_swap_hint":"Quando a troca autom\xe1tica est\xe1 ativada, os montantes de tokens ser\xe3o trocados automaticamente para a propor\xe7\xe3o de dep\xf3sito necess\xe1ria para criar sua posi\xe7\xe3o.","auto_swap_modal":{"turn_on_title":"Ativar Troca Autom\xe1tica?","turn_off_title":"Desativar Troca Autom\xe1tica?","turn_on_description":"Quando a troca autom\xe1tica est\xe1 ativada, os montantes de tokens ser\xe3o trocados automaticamente para a propor\xe7\xe3o de dep\xf3sito necess\xe1ria para criar sua posi\xe7\xe3o.","turn_off_description":"Quando a troca autom\xe1tica est\xe1 desativada, os tokens n\xe3o ser\xe3o trocados para corresponder \xe0 propor\xe7\xe3o de dep\xf3sito da sua posi\xe7\xe3o. Voc\xea precisar\xe1 de tokens suficientes em sua carteira para criar uma posi\xe7\xe3o.","turn_on":"Ativar Troca Autom\xe1tica","turn_off":"Desativar Troca Autom\xe1tica"},"setting_modal":{"title":"Configura\xe7\xe3o"},"pool_search_modal":{"title":"Buscar Pool"},"pool_fee_desc":"Esta \xe9 uma pool de liquidez de taxa de {{feeRate}}% de {{type}}","no_active_farm":"N\xe3o h\xe1 uma fazenda ativa para esta pool.","loading_pool":"Carregando pool","create_lp":"Criar Posi\xe7\xe3o","preview_pool":"Visualizar Pool","want_to_stake_lp":"Voc\xea deseja apostar seus LP agora?","stake_lp_desc":"Aposte tokens LP em uma fazenda para ganhar recompensas adicionais. Voc\xea tamb\xe9m pode fazer isso posteriormente em Portf\xf3lio.","assets_to_received":"Ativos a serem recebidos","tx_message":{"staked_successfully":"Apostado {{symbol}}","staked_desc":"Voc\xea apostou {{amount}} {{symbol}}","unStaked_successfully":"N\xe3o Apostado {{symbol}}","unStaked_desc":"Voc\xea N\xe3o Apostou {{amount}} {{symbol}}"}},"create_pool":{"modal_title":"Quero come\xe7ar por...","modal_tab_label":"Tipo de Pool","modal_tab_standard_amm":"AMM Padr\xe3o","modal_tab_concentrated":"Liquidez Concentrada","modal_section_header_pool":"Criando uma pool","modal_section_header_pool_desc":"Crie uma pool de liquidez para qualquer par de tokens. \xc9 altamente recomendado ler este","modal_section_header_pool_desc_link":"guia detalhado","modal_section_header_farm":"Criando uma fazenda","modal_section_header_farm_desc":"Uma fazenda pode ser criada para qualquer pool que j\xe1 esteja ativa. \xc9 altamente recomendado ler este","modal_section_header_farm_desc_link":"guia detalhado","clmm_please_note":"Por favor, observe","clmm_please_note_des":"Esta ferramenta \xe9 para usu\xe1rios avan\xe7ados. Antes de criar uma fazenda, \xe9 sugerido passar pelo","clmm_please_note_des_link":"guia detalhado"},"farm":{"create":"Criar Fazenda","show_closed":"Mostrar Encerradas"},"clmm":{"total_deposit":"Dep\xf3sito Total","my_range":"Minha Faixa","nft_mint_address":"Endere\xe7o de Mint de NFT","nft_mint":"Mint de NFT","in_range":"Na Faixa","out_of_range":"Fora da Faixa","create_new_position":"Criar Nova Posi\xe7\xe3o","position":"Posi\xe7\xe3o","set_price_range":"Definir Faixa de Pre\xe7o","time_price_range":"{{time}} Faixa de Pre\xe7o","match_deposit_ratio":"Corresponder \xe0 Propor\xe7\xe3o de Dep\xf3sito","add_deposit_amount":"Adicionar Montante de Dep\xf3sito","match_deposit_ratio_tooltip":"Quando ativado, os montantes de token ser\xe3o automaticamente trocados para a propor\xe7\xe3o de dep\xf3sito necess\xe1ria para criar sua posi\xe7\xe3o","deposit_ratio":"Propor\xe7\xe3o de Dep\xf3sito","select_token_fee_tier":"Selecionar token & taxa de comiss\xe3o","set_initial_price_range":"Definir pre\xe7o inicial & faixa","enter_deposit_amount":"Digite o montante do dep\xf3sito","best_for_very_stable":"Melhor para pares muito est\xe1veis","best_for_stable":"Melhor para pares est\xe1veis","best_for_most_pair":"Melhor para a maioria dos pares","best_for_exotic_pair":"Melhor para pares ex\xf3ticos","price_setting":"Configura\xe7\xe3o de Pre\xe7o","initial_price":"Pre\xe7o Inicial","price_range":"Faixa de Pre\xe7o","preview_deposit":"Visualizar Dep\xf3sito","selected_range":"Faixa Selecionada","min_price":"Pre\xe7o M\xednimo","max_price":"Pre\xe7o M\xe1ximo","confirm_deposit":"Confirmar Dep\xf3sito","you_will_receive":"Voc\xea receber\xe1","pooled_assets":"Ativos da Pool","pending_rewards":"Recompensas Pendentes","no_clmm_positions":"Voc\xea n\xe3o possui nenhuma posi\xe7\xe3o de liquidez concentrada.","current_position":"Posi\xe7\xe3o Atual","deposit_successful":"Dep\xf3sito realizado com sucesso","nft_desc":"Um novo NFT representando sua posi\xe7\xe3o de Liquidez Concentrada est\xe1 agora em sua carteira.","dont_burn_nft":"N\xc3O queime este NFT ou voc\xea n\xe3o poder\xe1 remover a liquidez! Se voc\xea enviar o NFT para outra carteira, apenas a nova carteira poder\xe1 remover a liquidez.","view_my_positions":"Ver minhas posi\xe7\xf5es","input_lock_desc":"O pre\xe7o de mercado est\xe1 fora da sua faixa de pre\xe7o especificada. Apenas dep\xf3sito de um \xfanico ativo.","modal_header_add_liquidity_to":"Adicionar Liquidez a","modal_header_remove_liquidity":"Remover Liquidez","close_position":"Fechar Posi\xe7\xe3o","position_closed":"Posi\xe7\xe3o Fechada","close_mint_position":"Fechar posi\xe7\xe3o de {{mint}}"},"migrate_clmm":{"title":"Migrar para a pool de Liquidez Concentrada","desc":"Migre abaixo ou saiba mais sobre as pools CLMM e os riscos","desc_link":"aqui","quick_migration":"Migra\xe7\xe3o r\xe1pida","quick_migration_desc":"Faixa de pre\xe7o muito ampla para uma estrat\xe9gia mais passiva.","custom_migration":"Migra\xe7\xe3o personalizada","custom_migration_desc":"Defina uma faixa de pre\xe7o personalizada para maior efici\xeancia de capital.","heading_clmm_pool":"Pool CLMM","heading_price_range":"Faixa de Pre\xe7o","current_price":"Pre\xe7o Atual","current_position":"Posi\xe7\xe3o Atual","clmm_pool":"Pool CLMM","wallet":"Carteira","footer_note":"* A migra\xe7\xe3o tamb\xe9m colher\xe1","footer_note_2":"em recompensas pendentes.","migrate_clmm_tx_title":"Migrar para CLMM","migrate_clmm_tx_desc":"Migrar para a posi\xe7\xe3o CLMM."},"portfolio":{"title":"Carteira","hero_title":"Minha Carteira","assets_by_pool":"Ativos por pool","assets_by_token":"Ativos por token","idle_tokens":"Tokens ociosos","harvest_all_label":"Rendimento Pendente","harvest_all_tooltip":"\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16descri\xe7\xe3o para colher tudo","harvest_all_button":"Colher Tudo","section_overview":"Vis\xe3o geral","section_positions":"Minhas posi\xe7\xf5es","section_positions_tab_clmm":"Concentrado","section_positions_tab_standard":"Padr\xe3o","section_positions_tab_staking":"RAY Estacado","section_positions_clmm_switch_direction_tooltip":"Os tokens base/cota foram trocados para simplificar a exibi\xe7\xe3o de dados.","section_positions_clmm_account_view_more":"Ver Mais","section_positions_clmm_account_view_less":"Ver Menos","section_positions_clmm_account_nft_mint_address":"Endere\xe7o de Mint de NFT","section_positions_clmm_account_pending_yield":"Rendimento Pendente","section_positions_clmm_account_pending_yield_button":"Colher","section_my_created_farms":"Minhas fazendas criadas","section_department_tab_clmm":"Concentrado","section_department_tab_standard":"Padr\xe3o","section_department_tab_all":"Todos","section_my_created_farms_item_edit_farm_button":"Editar Fazenda","no_staked_farm":"Voc\xea n\xe3o tem nenhum RAY estacado.","no_standard_positions":"Voc\xea n\xe3o possui posi\xe7\xf5es de liquidez padr\xe3o.","stake_item_stake_button":"Estacar","stake_item_migrate_button":"Migrar","acceleraytor":"Acelerador","acceleraytor_desc":"Voc\xea possui fundos n\xe3o reclamados do Acelerador. Os fundos restantes podem ser reclamados abaixo.","acceleraytor_banner_desc":"Voc\xea possui fundos n\xe3o reclamados no Acelerador. Verifique os detalhes na parte inferior desta p\xe1gina e reivindique os fundos com um clique.","acceleraytor_tx_title":"Reivindica\xe7\xe3o do Acelerador","acceleraytor_tx_desc":"Reivindicar {{amountA}} {{symbolA}}","acceleraytor_tx_1_desc":"Reivindicar {{amountA}} {{symbolA}} e {{amountB}} {{symbolB}}"},"amm":{"staked":"Estacado","pending_reward":"Recompensas Pendentes","pending_reward_button":"Colher","pending_alert":"Voc\xea possui tokens LP n\xe3o estacados que poderiam ser estacados em uma fazenda. Estaque agora","pooled_token":"{{token}} Estacado","farm_ended":"Fazenda Inativa","farm_unstaked":"LP N\xe3o Estacado","position":"Posi\xe7\xe3o"},"staking":{"title":"Staking","pending_reward":"Recompensas pendentes","pending_rewards":"Recompensas pendentes","staked":"Stake aplicado","APR":"APR","liquidity":"Liquidez","available":"{{symbol}} dispon\xedveis","pending_rewards_tooltip":"\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16","pending_rewards_button":"Colher","staking_desc":"Fa\xe7a stake de RAY para ganhar rendimento adicional de RAY.","unstake_modal_header":"Remover stake de {{symbol}}","unstake_modal_confirm_text":"Remover stake de {{symbol}}","stake_modal_header":"Stake de {{symbol}}","stake_modal_confirm_text":"Stake de {{symbol}}","alert_empty_token":"Saldo insuficiente de RAY"},"wallet":{"connected_hint":{"portfolio_info":"Conecte sua carteira para ver a distribui\xe7\xe3o de seus ativos.","portfolio_idle":"Conecte sua carteira para ver seus ativos depositados.","portfolio_position":"Conecte sua carteira para ver suas posi\xe7\xf5es."}},"error":{"should_input_valid_minimum_order_size":"Insira um tamanho m\xednimo de pedido v\xe1lido","should_input_valid_price_tick":"Insira um tamanho de tick de pre\xe7o v\xe1lido","select_quote_token":"Selecione o token de cota\xe7\xe3o","select_base_token":"Selecione o token base","enter_upper_price":"Insira o pre\xe7o m\xe1ximo","enter_lower_price":"Insira o pre\xe7o m\xednimo","enter_max_price":"Insira o pre\xe7o m\xe1ximo","enter_min_price":"Insira o pre\xe7o m\xednimo","enter_current_price":"Insira o pre\xe7o atual","enter_order_size":"Insira o tamanho do pedido","enter_price_tick":"Insira o tamanho do tick de pre\xe7o","select_pool_fee":"Selecione o n\xedvel de taxa do pool","select_pool_token_1":"Selecione o token 1 do pool","select_pool_token_2":"Selecione o token 2 do pool","pool_not_found":"Pool n\xe3o encontrado","balance_not_enough":"Saldo insuficiente","select_reward_token":"Selecione o token de recompensa","enter_token_amount":"Insira a quantidade de tokens","insufficient_sub_balance":"Saldo insuficiente de {{token}}","no_matches":"Nenhuma correspond\xeancia.","no_pools_found":"Nenhum pool encontrado","decrease_reward":"A diminui\xe7\xe3o da taxa de recompensa \xe9 permitida dentro de 72 horas do tempo de encerramento atual da fazenda.","decrease_reward_72h":"A diminui\xe7\xe3o da taxa de recompensa \xe9 permitida dentro de 72 horas do tempo de encerramento atual da fazenda. Tente adicionar mais tokens.","add_reward_days":"O tempo estendido deve ser um m\xednimo de 7 dias e m\xe1ximo de 90 dias.","insufficient_duration":"Dura\xe7\xe3o da fazenda insuficiente","emission_rewards_low":"As emiss\xf5es de recompensa s\xe3o menores que o m\xednimo exigido","start_time_should_later":"O hor\xe1rio de in\xedcio n\xe3o pode ser definido para um hor\xe1rio no passado.","balance_not_enough_token":"Saldo insuficiente de token {{side}}","should_input_positive_amount":"Insira um valor de {{side}} maior que zero","select_token":"Selecione o token {{side}}","enter_starting_price":"Insira o pre\xe7o inicial","is_amount_valid":"a quantidade \xe9 v\xe1lida?","api_error":"Erro na solicita\xe7\xe3o da API","no_liquidity_data":"N\xe3o h\xe1 dados de liquidez.","pool_liquidity_appear":"A liquidez do pool aparecer\xe1 aqui.","liquidity_data_not_available":"Dados de liquidez n\xe3o dispon\xedveis.","cannot_find_pool":"N\xe3o consegue encontrar o pool que est\xe1 procurando? Tente inserir o endere\xe7o do token ou verificar as listas de pools abaixo.","no_chart_data":"N\xe3o h\xe1 dados para este gr\xe1fico.","no_chart_data_hint":"Aguarde um momento ou tente atualizar a p\xe1gina."},"input":{"max_button":"M\xe1x","search_for_a_pair_or_enter_amm_id":"Pesquise por um par ou insira o ID AMM","enter_search_token":"Pesquise por um token ou cole o endere\xe7o mint.","search_amm_title":"Pesquise por um par ou cole o ID AMM","placeholder_input_amm_id":"insira AmmId / TVL"},"date_picker":{"farm_will_end_at":"A fazenda terminar\xe1 em"},"transaction":{"title":"Transa\xe7\xe3o","sent":"Enviada","processed":"Processada","failed":"Falhou","view_detail":"Ver detalhes da transa\xe7\xe3o","confirmed":"Confirmada"},"edit_farm":{"button":"Editar","title":"Editar fazenda","farm_id":"ID da fazenda","please_note_title":"Observe","please_note_content":"Voc\xea pode adicionar mais tokens e/ou estender o per\xedodo de cultivo. Qualquer a\xe7\xe3o que diminuir\xe1 a taxa de recompensa s\xf3 pode ser feita dentro de 72 horas do tempo de encerramento atual da fazenda, e o per\xedodo deve ser estendido por pelo menos 7 dias.","tour_note_title":"Como adicionar mais recompensas?","tour_note_des_1":"1. As recompensas alocadas para as fazendas n\xe3o podem ser retiradas ap\xf3s o in\xedcio do cultivo.","tour_note_des_2":"2. Se voc\xea quiser aumentar a taxa de recompensa, recompensas adicionais podem ser adicionadas enquanto uma fazenda ainda estiver em execu\xe7\xe3o. O per\xedodo deve ser estendido por pelo menos 7 dias.","tour_note_des_3":"3. Se voc\xea quiser diminuir a taxa de recompensas, isso s\xf3 pode ser feito 72 horas antes do fim do per\xedodo de cultivo atual, e o per\xedodo deve ser estendido por pelo menos 7 dias.","title_des":"Antes de criar uma fazenda, certifique-se de verificar o","title_des_link":"guia detalhado","subtitle_pool":"Pool","subtitle_farm_reward":"Recompensa da fazenda","farming_start":"In\xedcio da agricultura","farming_end":"Fim da agricultura","open_date_picker":"Selecionar","time_day":"Dias","modal_add_another_token":"Adicionar outro token","estimated_rewards_week":"Recompensas estimadas / semana","days_extends":"Dias Estendidos","box_header_updated_rewards":"Recompensas atualizadas","box_header_current_rewards_period":"Per\xedodo de recompensas atual","box_header_rewards_adjustment":"Ajuste de recompensas","box_header_adjust_rewards":"Ajustar recompensas","box_header_remaining_amount":"Quantidade restante","remaining_days":"{{days}}D restantes","rate":"Taxa","per_week":"/semana","APR":"APR","loading_text_no_farm":"Fazenda n\xe3o encontrada","loading_text_farm_not_editable":"Fazenda n\xe3o \xe9 edit\xe1vel","claim_unemmitted_rewards":"Reivindicar Recompensas N\xe3o Emitidas","button_adjust_rewards":"Ajustar recompensas","button_add_more_rewards":"Adicionar Mais Recompensas"},"recent_transaction":{"another_wallet":"Outra carteira","recent_transactions":"Transa\xe7\xf5es recentes","view_all":"Ver tudo"},"transaction_history":{"name_add_liquidity":"Adicionar Liquidez","add_liquidity_desc":"Adicionado {{amountA}} {{symbolA}} e {{amountB}} {{symbolB}}.","name_remove_liquidity":"Remover Liquidez","remove_liquidity_desc":"Removido {{amountA}} {{symbolA}} e {{amountB}} {{symbolB}}.","name_harvest":"Colheita","name_swap":"Trocar","description_remove_liquidity":"Remover {{token1}} balabalabala\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16","liquidity_staked_title":"Liquidez Apostada","liquidity_staked_desc":"Apostado {{amount}} {{symbol}}","liquidity_unstaked_title":"Retirar Liquidez Apostada","liquidity_unstaked_desc":"Apostado {{amount}} {{symbol}}","harvest_reward_title":"Colher Recompensas","harvest_clmm_reward_desc":"Colher Recompensas Clmm","harvest_farm_reward_desc":"Colher Recompensas da Fazenda","update_reward_title":"Atualizar recompensas","update_reward_desc":"Atualizar recompensas em {{pool}}","create_pool":"Criar pool","create_clmm_pool":"criar pool clmm","open_pool_position":"Abrir posi\xe7\xe3o do pool","open_clmm_pool_position":"Abrir posi\xe7\xe3o do pool CLMM","create_farm":"Criar nova fazenda","create_clmm_farm_desc":"ID: {{poolId}}","harvest_rewards":"Recompensas colhidas","harvest_rewards_desc":"Colhido: {{symbol}}"},"create_standard_pool":{"step_1":"Passo 1","step_1_name":"Criar Mercado","step_2":"Passo 2","step_2_name":"Inicializar Pool de Liquidez","please_note":"Por favor, observe","please_note_des":"Uma fazenda pode ser criada para qualquer pool que j\xe1 esteja ativo. \xc9 altamente recomendado ler este","please_note_des_link":"guia detalhado","enter_open_book_market_id":"Digite o ID do Mercado do OpenBook","market_id":"ID do Mercado","note_has_id":"Pools integradas ao OpenBook devem estar vinculadas a um ID de Mercado do OpenBook \xfanico. Um ID de Mercado s\xf3 pode ser usado para uma pool.","have_id":"Eu tenho um ID","no_id":"Criar ID","friendly_sentence_1":"Primeiro, voc\xea precisa de um ID de Mercado","friendly_sentence_2":"Quase l\xe1! Agora, insira as configura\xe7\xf5es iniciais da pool","note_done":"Sua pool foi criada com sucesso!","note_done_2":"Agora voc\xea pode criar uma fazenda ou voltar","current_price":"Pre\xe7o atual","initial_liquidity":"Liquidez inicial","base_token_initial_liquidity":"Liquidez inicial do token base","quote_token_initial_liquidity":"Liquidez inicial do token de cota\xe7\xe3o","market_open_book_id":"ID do Programa OpenBook","market_create_orderbook":"Crie um ID de Mercado do OpenBook abaixo:","market_tokens":"Tokens","market_min_order_size":"Tamanho M\xednimo do Pedido","market_min_order_size_label":"Tamanho m\xednimo do pedido","market_min_order_size_tip":"Este \xe9 o menor tamanho de pedido permitido.","market_price_tick":"Incremento de Pre\xe7o","market_price_tick_label":"Tamanho m\xednimo do incremento de pre\xe7o","market_price_tick_tip":"Esta \xe9 a menor quantidade pela qual os pre\xe7os podem se mover.","market_advance_options":"Op\xe7\xf5es Avan\xe7adas","market_advance_options_desc":"Configure tamanhos para diferentes contas para ajustar o custo do aluguel.","market_event_queue":"Fila de Eventos","market_request_queue":"Fila de Solicita\xe7\xf5es","market_orderbook":"Livro de Ordens","market_create_button":"Criar Mercado","market_create_note":"Observe que criar um novo mercado pode custar de 3 a 4 SOL","market_create_note_highlight":"3 - 4 SOL","button_create_farm":"Criar Fazenda","button_to_my_pools":"Voltar para Minhas Pools","button_initialize_liquidity_pool":"Inicializar Pool de Liquidez"},"create_farm":{"weekly_rewards":"Recompensas Semanais","unemmitted_rewards":"Recompensas N\xe3o Emitidas","select_pool":"Selecionar Pool","concentrated_liquidity":"Liquidez Concentrada","standard_amm":"AMM Padr\xe3o","select_from_your_created_pools":"Selecionar das pools criadas por voc\xea","select_from_your_created_pools_tooltip":"A fazenda ser\xe1 criada para a pool selecionada","item_reward_tooltip":"\uD83E\uDD16","foot_note":"N\xe3o encontrou o que procura?","foot_note_link":"Crie uma nova pool","step_1":"Passo 1","step_1_name":"Selecionar Pool","step_1_sentence":"Primeiro, selecione uma pool para as recompensas da fazenda","step_2":"Passo 2","step_2_name":"Adicionar Recompensas","step_2_sentence":"Em seguida, insira as recompensas para a fazenda","step_3":"Passo 3","step_3_name":"Revisar Detalhes da Fazenda","add_another_button_text":"Adicionar outro","add_another_button_text_2":"Adicionar outro token de recompensa","done":"conclu\xeddo","pool":"Pool","period":"Per\xedodo","farming_rewards":"Recompensas da agricultura","button_create_farm":"Criar Fazenda","error_text_create_farm":"Usu\xe1rio deve ter 300 RAY","please_note":"Por favor, observe","please_note_des":"As recompensas alocadas para fazendas n\xe3o podem ser retiradas ap\xf3s o in\xedcio da agricultura. Fazendas rec\xe9m-criadas geralmente aparecem no Raydium 10-30 minutos ap\xf3s a cria\xe7\xe3o, dependendo do status da rede Solana.","note_des":"Esta ferramenta \xe9 para usu\xe1rios avan\xe7ados. Antes de criar uma fazenda, \xe9 sugerido passar pelo","note_des_link":"guia detalhado","add_reward_token":"Voc\xea pode adicionar at\xe9 3 tokens de recompensa.","estimated_rewards_week":"Recompensas estimadas / semana"},"acceleraytor":{"unclaim":"N\xe3o reivindicado"},"apr_dialog":{"modal_title":"M\xe9todo de C\xe1lculo APR","desc":"Dois m\xe9todos para calcular o APR estimado est\xe3o dispon\xedveis, com base em taxas de negocia\xe7\xe3o hist\xf3ricas e emiss\xf5es. Apenas posi\xe7\xf5es na faixa ganham rendimento. O desempenho passado n\xe3o \xe9 indicativo de resultados futuros.","warning_note":"Os c\xe1lculos s\xe3o uma estimativa e apenas para refer\xeancia.","mode_D_title":"M\xe9todo Detalhado","mode_D_desc":"Este m\xe9todo utiliza a mudan\xe7a impl\xedcita (delta) na liquidez da pool, conforme determinado pela faixa de pre\xe7o do usu\xe1rio e tamanho da posi\xe7\xe3o, para calcular o APR estimado.","mode_D_desc_brief":"O APR estimado \xe9 calculado pelo M\xe9todo Delta. Clique no \xedcone ‘D’ para alternar para o M\xe9todo do Multiplicador ou","mode_M_title":"M\xe9todo do Multiplicador","mode_M_desc":"Este m\xe9todo aplica um multiplicador, determinado pela interse\xe7\xe3o da faixa de pre\xe7o do usu\xe1rio e da faixa de pre\xe7o hist\xf3rica da pool, para calcular o APR estimado.","mode_M_desc_brief":"O APR estimado \xe9 calculado pelo M\xe9todo do Multiplicador. Clique no \xedcone ‘M’ para alternar para o M\xe9todo Delta ou"}}')},50482:function(e){"use strict";e.exports=JSON.parse('{"common":{"language":"Язык","playground":"playground","disabled":"Выключено","all":"Все","search_all":"Искать все","layout":"Макет","list":"Список","grid":"сетка","time_base":"База времени","more":"More","view_chart":"Посмотреть Диаграмму","tvl":"TVL","volume":"Объем","rewards":"Награды","amount":"Количество","pools":"Пулы","nft_address":"NFT адрес","copy_success":"Скопировано успешно!","copied":"Скопировано","copied_desc":"{{subject}} было скопировано в буфер обмена","week":"Неделя","per_unit":"{{subA}} за {{subB}}","per_unit_2":"{{subA}}/{{subB}}","price":"Цена","token_price":"{{token}} цена","unit_step":"Шаг {{num}}","back":"Назад","select_a_token":"Выберите токен","popular_tokens":"Популярные токены","balance":"Баланс","address":"Адрес","view_token_list":"Посмотреть список токенов","token_list_settings":"Настройки списка токенов","select":"Выбирать","subject_price":"{{subject}} цена","base_token":"Базовый токен","quote_token":"Токен котировки","go_to_pools":"Идти в пулы","add":"Добавить","view_more":"Посмотреть больше","view_less":"Посмотреть меньше","nav_text_more":"Более","nav_text_docs":"Документы","nav_text_feedback":"Обратная связь","estimated_APR":"Расчетный APR","route_go":"Идти>>","more_info":"Больше информации","less_info":"Меньше информации","tokens":"Токены","amm_id":"AMM ID","market_id":"Маркет ID","lp":"LP","fees":"Сборы","reward":"Награда","successfully":"Успешно","token":"Токен","token_list":"Список токенов","learn_more":"Узнать больше"},"button":{"deposit":"Депозит","close":"Закрыть","delete":"Удалить","cancel":"Отменить","continue":"Продолжать","confirm":"Потверждать","edit":"Редактировать","search":"Искать","reset":"Перезагрузить","stake":"Stake","unstake":"Unstake","harvest":"Harvest","save":"Сохранить","claim":"Claim","not_now":"Не сейчас","switch":"Выключатель","back":"Назад","next_step":"Следующий шаг","migrate":"Мигрировать","connect_wallet":"Подключить кошелек"},"badge":{"suggested":"Предложенный","new":"Новый","ongoing":"Продолжаюшийся","ended":"Закончено","updated":"Обновлено","ecosystem":"Экосистема","fusion":"Fusion","raydium":"Raydium"},"setting_board":{"panel_title":"Настройки","default_explorer":"Default Explorer","default_explorer_tooltip":"Выберите предпочтительный обозреватель блоков","rpc_connection":"RPC-соединение","rpc_connection_tooltip":"Выберите предпочтительную конечную точку RPC","color_theme":"Цветовая тема","slippage_tolerance":"Допуск проскальзывания","slippage_tolerance_tooltip":"Выберите максимальный допуск на проскальзывание","language":"Язык","language_tooltip":"Выберите предпочитаемый язык","versioned_transaction":"Версионная транзакция","versioned_transaction_tooltip":"Versioned Tx — это значительное обновление, которое обеспечивает дополнительную функциональность, включая расширенную маршрутизацию подкачки. Прежде чем включить Vers. Tx, убедитесь, что ваш кошелек совместим.","custom":"Custom"},"wallet_connect_panel":{"title":"Подключите свой кошелек к Raydium","desc":"Подключая свой кошелек, вы подтверждаете, что прочитали, поняли и принимаете условия, изложенные в","desc_link":"отказ от ответственности","choose_network":"Выберите сеть","choose_wallet":"Выбрать кошелек","show_uninstalled_wallets":"Показать неустановленные кошельки","tour_title":"Новенький тут?","tour_desc":"Начните работу с Raydium","disconnect":"Отключить"},"token_selector":{"search_placeholder":"Поиск по токену или вставке адреса","jupiter_types_all":"ВСЕ","jupiter_types_strict":"Строгий"},"field":{"24h_volume":"Объем за 24 часа","24h_fees":"Комиссии за 24 часа в сутки","24h_apr":"APR за 24 часа","7d_volume":"Объем за 7 дней","7d_fees":"Комиссии за 7 дней","7d_apr":"APR за 7 дней","30d_volume":"Объем за 30 дней","30d_fees":"Комиссии за 30 дней","30d_apr":"APR за 30 дней","total_apr":"Всего годовых","trade_fees":"Торговые комиссии","weekly_rewards":"Еженедельные награды","fee_tier":"Уровень комиссий","fee":"Комиссия","current_price":"Текущая цена","apr":"APR","min":"Min","max":"Max","start_time":"Время начала"},"swap":{"title":"Swap","from_label":"От","to_label":"К","info_minimum_received":"Минимум получено","info_minimum_received_tooltip":"Минимальное количество токенов, которое вы получите. Это определяется вашей устойчивостью к проскальзыванию.","info_order_routing":"Заказать маршрутизацию","info_order_routing_tooltip":"Этот маршрут дал лучшую цену для вашей сделки","info_price_impact":"Влияние на цену","info_price_impact_tooltip":"Разница между текущей рыночной ценой и расчетной ценой из-за размера сделки","info_estimated_fees":"Ориентировочная комиссия","info_estimated_fees_tooltip":"Комиссионные за свап идут на LP, обратные выкупы RAY и казначейство.","alert_price_updated":"Цена обновлена","alert_price_updated_tooltip":"Цена изменилась с момента ввода суммы свапа.","alert_price_updated_button":"Принимать","pool_not_found":"Пул не найден","pool_loading":"Загрузка пула..."},"liquidity_pools":{"view_chart_tooltip":"Посмотреть графики пулов","chart_tab_volume":"Объем","chart_tab_liquidity":"Ликвидность","chart_tooltip_volume":"объем","modal_header_standard_position_detail":"Детали стандартной позиции","farms":"Фермы"},"liquidity":{"title":"Ликвидность","pools":"Пулы ликвидности","pool_info":"Информация о пуле","pools_desc":"Обеспечьте ликвидность, получайте доход.","concentrated":"Концентрированный","standard":"Стандартный","pool":"Пул","fee_rate":"Ставка комиссии","show_farms":"Показать Farms","create_pool":"Создать","create_pool_mobile":"создать","create_pool_tx_title":"Создать пул","create_pool_tx_desc":"создать {{mintA}} - {{mintB}} пул","value":"ценность","select_type":"Выберите тип пула","select_farm":"Выберите Farm","stake_liquidity":"Stake ликвидность","unstake_liquidity":"Unstake ликвидность","add_liquidity":"Добавить ликвидность","remove_liquidity":"Удалить ликвидность","withdraw_liquidity":"Вывод ликвидности","pool_liquidity":"Ликвидность Пула","pooled":"Pooled","pool_not_found":"Пул не найден","total_apr_7d":"Общий APR за 7 дней","my_position":"Моя позиция","APR":"APR","APR_tooltip":"APR основано на торговых комиссиях, полученных пулом за последние 24 часа.","my_lp_balance":"Мой LP баланс","lp_token_balance":"Балансы токенов LP","staked_liquidity":"Staked Ликвидность","unstaked_liquidity":"Unstaked Ликвидность","rewards_to_be_harvested":"Награды, которые нужно собрать","assets_to_be_received":"Активы к получению","staked":"Staked","unstaked":"Unstaked","auto_swap":"Авто-swap","total_deposit":"Общий депозит","stakeable_hint":"У вас есть нестейкованные токены LP для этого пула. Вы можете поставить их прямо на вкладке \xabStake Ликвидность.","auto_swap_hint":"Когда Авто-swap включен, суммы токенов будут автоматически заменены на соотношение депозитов, необходимое для создания вашей позиции..","auto_swap_modal":{"turn_on_title":"Включить Авто-swap?","turn_off_title":"Отключить Авто-swap?","turn_on_description":"Когда Авто-swap включен, суммы токенов будут автоматически заменены на соотношение депозитов, необходимое для создания вашей позиции.","turn_off_description":"Если Авто-swap отключен, токены не будут обмениваться в соответствии с соотношением депозитов вашей позиции. Вам понадобится достаточно токенов в вашем кошельке для создания позиции.","turn_on":"Включить Авто-swap","turn_off":"Отключить Авто-swap"},"setting_modal":{"title":"Настройки"},"pool_search_modal":{"title":"Искать пула"},"pool_fee_desc":"Это {{feeRate}}% уровень комиссии {{type}} ликвидности пула","no_active_farm":"Для этого пула нет активного farm.","loading_pool":"Загрузка пула","create_lp":"Создать позицию","preview_pool":"Предварительный пул","want_to_stake_lp":"Хотите ли вы сделать stake на свой LP сейчас??","stake_lp_desc":"Stake токены LP на farm, чтобы получить дополнительные награды. Вы также можете сделать это позже в разделе \xabПортфолио.","assets_to_received":"Активы к получению","tx_message":{"staked_successfully":"Сделано Stake {{symbol}}","staked_desc":"Сделали stake {{amount}} {{symbol}}","unStaked_successfully":"Сделано Unstaked {{symbol}}","unStaked_desc":"Вы сделали Unstaked {{amount}} {{symbol}}"}},"create_pool":{"modal_title":"Я хочу начать с...","modal_tab_label":"Тип Пула","modal_tab_standard_amm":"Стандартный AMM","modal_tab_concentrated":"Концентрированная ликвидность","modal_section_header_pool":"Создание пула","modal_section_header_pool_desc":"Создайте пул ликвидности для любой пары токенов. Настоятельно рекомендуется это прочитать","modal_section_header_pool_desc_link":"подробное руководство","modal_section_header_farm":"Создание farm","modal_section_header_farm_desc":"Farm можно создать для любого уже работающего пула. Настоятельно рекомендуется это прочитать","modal_section_header_farm_desc_link":"подробное руководство","clmm_please_note":"Пожалуйста, обратите внимание","clmm_please_note_des":"Этот инструмент предназначен для опытных пользователей. Перед созданием Farm предлагается пройти","clmm_please_note_des_link":"подробное руководство"},"farm":{"create":"Создать Farm","show_closed":"Показать закрыто"},"clmm":{"total_deposit":"Общий депозит","my_range":"Мой диапазон","nft_mint_address":"NFT Mint адрес","nft_mint":"NFT Mint","in_range":"В диапазоне","out_of_range":"Вне диапазона","create_new_position":"Создать новую позицию","position":"Позиция","set_price_range":"Установить ценовой диапазон","time_price_range":"{{time}} Ценовой диапазон","match_deposit_ratio":"Коэффициент депозита на матч","add_deposit_amount":"Добавить сумму депозита","match_deposit_ratio_tooltip":"При включении суммы токенов будут автоматически заменены на соотношение депозитов, необходимое для создания вашей позиции.","deposit_ratio":"Коэффициент депозита","select_token_fee_tier":"Выберите токен и уровень комиссии","set_initial_price_range":"Установите начальную цену и диапазон","enter_deposit_amount":"Введите сумму депозита","best_for_very_stable":"Лучше всего для очень стабильных пар","best_for_stable":"Лучше всего для стабильных пар","best_for_most_pair":"Лучше всего подходит для большинства пар","best_for_exotic_pair":"Лучше всего для экзотических пар","price_setting":"Установление цены","initial_price":"Начальная цена","price_range":"Ценовой диапазон","preview_deposit":"Предварительный депозит","selected_range":"Выбранный диапазон","min_price":"Минимальная цена","max_price":"Максимальная цена","confirm_deposit":"Подтвердить депозит","you_will_receive":"Вы получите","pooled_assets":"Объединенные активы","pending_rewards":"Ожидаемые награды","no_clmm_positions":"У вас нет позиций концентрированной ликвидности.","current_position":"Текущая позиция","deposit_successful":"Депозит успешно","nft_desc":"Новый NFT, представляющий вашу позицию концентрированной ликвидности, теперь в вашем кошельке.","dont_burn_nft":"DO NOT сожгите этот NFT, иначе вы не сможете удалить ликвидность! Если вы отправите NFT на другой кошелек, только новый кошелек сможет удалить ликвидность.","view_my_positions":"Посмотреть мои позиции","input_lock_desc":"Рыночная цена находится за пределами указанного вами ценового диапазона. Только депозит одного актива.","modal_header_add_liquidity_to":"Добавить ликвидность","modal_header_remove_liquidity":"Удалить ликвидность","close_position":"Закрыть позицию","position_closed":"Позиция закрыта","close_mint_position":"Закрыть {{mint}} позицию."},"migrate_clmm":{"title":"Переход на пул концентрированной ликвидности","desc":"Перейдите ниже или узнайте больше о пулах и рисках CLMM.","desc_link":"Здесь","quick_migration":"Быстрая миграция","quick_migration_desc":"Очень широкий ценовой диапазон для более пассивной стратегии.","custom_migration":"Пользовательская миграция","custom_migration_desc":"Установите индивидуальный диапазон цен для более высокой эффективности использования капитала.","heading_clmm_pool":"CLMM Пул","heading_price_range":"Ценовой диапазон","current_price":"Текущая цена","current_position":"Текущая позиция","clmm_pool":"CLMM Пул","wallet":"Кошелек","footer_note":"* Миграция также принесет урожай","footer_note_2":"в ожидании наград.","migrate_clmm_tx_title":"Перейти в CLMM","migrate_clmm_tx_desc":"Перейти на позицию CLMM."},"portfolio":{"title":"Портфолио","hero_title":"Мое Портфолио","assets_by_pool":"Активы по пулам","assets_by_token":"Активы по токенам","idle_tokens":"Idle токены","harvest_all_label":"Ожидаемая доходность","harvest_all_tooltip":"\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16описание урожая все","harvest_all_button":"Собрать все","section_overview":"Обзор","section_positions":"Мои позиции","section_positions_tab_clmm":"Концентрированный","section_positions_tab_standard":"Стандарт","section_positions_tab_staking":"Сделано Stake RAY","section_positions_clmm_switch_direction_tooltip":"Токены базы/котировки были переключены для упрощения отображения данных.","section_positions_clmm_account_view_more":"Посмотреть больше","section_positions_clmm_account_view_less":"Посмотреть меньше","section_positions_clmm_account_nft_mint_address":"NFT Mint Адрес","section_positions_clmm_account_pending_yield":"Ожидаемая доходность","section_positions_clmm_account_pending_yield_button":"Урожай","section_my_created_farms":"Мои созданные Farms","section_department_tab_clmm":"Концентрированный","section_department_tab_standard":"Стандартный","section_department_tab_all":"Все","section_my_created_farms_item_edit_farm_button":"Редактировать Farm","no_staked_farm":"У вас нет застейканный RAY.","no_standard_positions":"У вас нет стандартных позиций ликвидности.","stake_item_stake_button":"Stake","stake_item_migrate_button":"Миграция","acceleraytor":"Acceleraytor","acceleraytor_desc":"У вас есть невостребованные средства от AcceleRaytor. Остальные средства можно запросить ниже.","acceleraytor_banner_desc":"У вас есть невостребованные средства в AcceleRaytor. Проверьте детали внизу этой страницы и получите средства одним щелчком мыши.","acceleraytor_tx_title":"AccelerRaytor Claim","acceleraytor_tx_desc":"Claim {{amountA}} {{symbolA}}","acceleraytor_tx_1_desc":"Claim {{amountA}} {{symbolA}} and {{amountB}} {{symbolB}}"},"amm":{"staked":"Staked","pending_reward":"Ожидаемые награды","pending_reward_button":"Harvest","pending_alert":"У вас есть нестейкованные токены LP, которые можно застейкать на Farm. Сделайте Stake сейчас","pooled_token":"Объединенный {{token}}","farm_ended":"Farm неактивен","farm_unstaked":"Unstaked LP","position":"Позиция"},"staking":{"title":"Staking","pending_reward":"Ожидаемые награды","pending_rewards":"Ожидаемые награды","staked":"Staked","APR":"APR","liquidity":"Ликвидность","available":"Доступный {{symbol}}","pending_rewards_tooltip":"\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16","pending_rewards_button":"Harvest","staking_desc":"Сделайте Stake RAY, чтобы получить дополнительный доход от RAY.","unstake_modal_header":"Unstake {{symbol}}","unstake_modal_confirm_text":"Unstake {{symbol}}","stake_modal_header":"Stake {{symbol}}","stake_modal_confirm_text":"Stake {{symbol}}","alert_empty_token":"Недостаточный баланс RAY"},"wallet":{"connected_hint":{"portfolio_info":"Подключите кошелек, чтобы увидеть распределение активов.","portfolio_idle":"Подключите кошелек, чтобы увидеть свои внесенные активы.","portfolio_position":"Подключите кошелек, чтобы видеть свои позиции."}},"error":{"should_input_valid_minimum_order_size":"Введите действительный минимальный ордер","should_input_valid_price_tick":"Введите действительный размер ценового тика.","select_quote_token":"Выберите токен котировки","select_base_token":"Выберите базовый токен","enter_upper_price":"Введите верхнюю цену","enter_lower_price":"Введите более низкую цену","enter_max_price":"Введите максимальную цену","enter_min_price":"Введите минимальную цену","enter_current_price":"Введите текущую цену","enter_order_size":"Введите размер ордера","enter_price_tick":"Введите размер ценового тика","select_pool_fee":"Выберите уровень комиссии пула","select_pool_token_1":"Выберите токен пула 1","select_pool_token_2":"Выберите токен пула 2","pool_not_found":"Пул не найден","balance_not_enough":"Недостаточный баланс","select_reward_token":"Выберите токен вознаграждения","enter_token_amount":"Введите сумму токена","insufficient_sub_balance":"Недостаточный {{token}} баланс","no_matches":"Нет совпадает.","no_pools_found":"Пулов не найдено","decrease_reward":"Уменьшение ставки вознаграждения разрешено в течение 72 часов после текущего времени окончания Farm.","decrease_reward_72h":"Уменьшение ставки вознаграждения разрешено в течение 72 часов после текущего времени окончания фермы. Попробуйте добавить больше токенов.","add_reward_days":"Продленный срок должен составлять минимум 7 дней и максимум 90 дней.","insufficient_duration":"Недостаточная продолжительность Фармы","emission_rewards_low":"Эмиссия вознаграждений ниже минимально необходимого","start_time_should_later":"Время начала не может быть установлено на время в прошлом.","balance_not_enough_token":"{{side}} баланс токена недостаточен","should_input_positive_amount":"Введите сумму {{side}} больше нуля","select_token":"Выбирать {{side}} токен","enter_starting_price":"Введите стартовую цену","is_amount_valid":"действительна ли сумма","api_error":"Ошибка запроса API","no_liquidity_data":"Данных о ликвидности нет.","pool_liquidity_appear":"Ликвидность пула появится здесь.","liquidity_data_not_available":"Данные о ликвидности недоступны.","cannot_find_pool":"Не можете найти нужный пул? Попробуйте ввести адрес токена или проверьте списки пулов ниже.","no_chart_data":"Нет данных для этой диаграммы.","no_chart_data_hint":"Пожалуйста, подождите немного или попробуйте обновить страницу.."},"input":{"max_button":"Максимум","search_for_a_pair_or_enter_amm_id":"Найдите пару или введите идентификатор AMM.","enter_search_token":"Найдите токен или вставьте минт адрес","search_amm_title":"Найдите пару или вставьте идентификатор AMM","placeholder_input_amm_id":"введите AmmId / TVL"},"date_picker":{"farm_will_end_at":"Farm закончится в"},"transaction":{"title":"Транзакция","sent":"Отправлен","processed":"Обработан","failed":"Не удалось","view_detail":"Посмотреть детали транзакции","confirmed":"Подтвержден"},"edit_farm":{"button":"Редактировать","title":"Редактировать Farm","farm_id":"Farm id","please_note_title":"Обратите внимание","please_note_content":"Вы можете добавить больше токенов и/или продлить период фарма. Любое действие, которое уменьшит ставку вознаграждения, может быть выполнено только в течение 72 часов с момента окончания текущего периода фарма, и этот период должен быть продлен как минимум на 7 дней.","tour_note_title":"Как добавить больше наград?","tour_note_des_1":"1. Награды, выделенные фармам, не могут быть сняты после начала фарма.","tour_note_des_2":"2. Если вы хотите увеличить ставку вознаграждения, можно добавить дополнительные награды, пока фарм еще работает. Срок должен быть продлен как минимум на 7 дней.","tour_note_des_3":"3. Если вы хотите уменьшить ставку вознаграждения, это можно сделать только за 72 часа до окончания текущего периода фарма, и этот период должен быть продлен как минимум на 7 дней.","title_des":"Перед созданием фарма обязательно проверьтe","title_des_link":"подробное руководство","subtitle_pool":"Пул","subtitle_farm_reward":"Farm награда","farming_start":"Farming начинается","farming_end":"Farming заканчивается","open_date_picker":"Выбирать","time_day":"Дни","modal_add_another_token":"Добавить другой токен","estimated_rewards_week":"Предполагаемые награды / неделя","days_extends":"Дни продлеваются","box_header_updated_rewards":"Обновленные награды","box_header_current_rewards_period":"Текущий период вознаграждения","box_header_rewards_adjustment":"Корректировка вознаграждений","box_header_adjust_rewards":"Корректировка вознаграждений","box_header_remaining_amount":"Оставшееся количество","remaining_days":"{{days}}D оставшийся","rate":"Оценка","per_week":"/неделя","APR":"APR","loading_text_no_farm":"Фарм не найдено","loading_text_farm_not_editable":"Фарм недоступен для редактирования","claim_unemmitted_rewards":"Получите неиспользованные вознаграждения","button_adjust_rewards":"Настройка вознаграждений","button_add_more_rewards":"Добавьте больше наград"},"recent_transaction":{"another_wallet":"Другой кошелек","recent_transactions":"Недавние транзакции","view_all":"Посмотреть все"},"transaction_history":{"name_add_liquidity":"Добавить ликвидность","add_liquidity_desc":"Добавлен {{amountA}} {{symbolA}} and {{amountB}} {{symbolB}}.","name_remove_liquidity":"Удалить ликвидность","remove_liquidity_desc":"Удален {{amountA}} {{symbolA}} и {{amountB}} {{symbolB}}.","name_harvest":"Harvest","name_swap":"Swap","description_remove_liquidity":"Удалить {{token1}} balabalabala\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16","liquidity_staked_title":"Liquidity Staked","liquidity_staked_desc":"Staked {{amount}} {{symbol}}","liquidity_unstaked_title":"Вывод стейкинговой ликвидности","liquidity_unstaked_desc":"Unstaked {{amount}} {{symbol}}","harvest_reward_title":"Harvest Награды","harvest_clmm_reward_desc":"Harvest Clmm Награды","harvest_farm_reward_desc":"Harvest Farm Награды","update_reward_title":"Обновить награды","update_reward_desc":"Обновить награды в {{pool}}","create_pool":"Создать пул","create_clmm_pool":"создать пул clmm","open_pool_position":"Открытая позиция пула","open_clmm_pool_position":"Открытая позиция пула CLMM","create_farm":"Создать новый фарм","create_clmm_farm_desc":"ID: {{poolId}}","harvest_rewards":"Harvested Награды","harvest_rewards_desc":"Harvested: {{symbol}}"},"create_standard_pool":{"step_1":"Шаг 1","step_1_name":"Создать рынок","step_2":"Шаг 2","step_2_name":"Инициализация пула ликвидности","please_note":"Пожалуйста, обратите внимание","please_note_des":"Фарм можно создать для любого уже работающего пула. Настоятельно рекомендуется это прочитать","please_note_des_link":"подробное руководство","enter_open_book_market_id":"Введите идентификатор OpenBook Market","market_id":"Market ID","note_has_id":"Интегрированные пулы OpenBook должны быть связаны с уникальным идентификатором OpenBook Market ID. Рыночный идентификатор можно использовать только для одного пула.","have_id":"У меня есть ID","no_id":"Создать ID","friendly_sentence_1":"Во-первых, вам нужен Market ID","friendly_sentence_2":"Почти готово! Теперь введите первоначальные настройки пула","note_done":"Ваш пул успешно создан!","note_done_2":"Теперь вы можете создать фарм или вернуться назад.","current_price":"Текущая цена","initial_liquidity":"Начальная ликвидность","base_token_initial_liquidity":"Начальная ликвидность базового токена","quote_token_initial_liquidity":"Котировки токена начальной ликвидности","market_open_book_id":"Идентификатор программы OpenBook","market_create_orderbook":"Создайте идентификатор OpenBook Market ниже:","market_tokens":"Токены","market_min_order_size":"Минимальный размер ордера","market_min_order_size_label":"Минимальный размер заказа","market_min_order_size_tip":"Это наименьший разрешенный размер заказа.","market_price_tick":"Ценовой тик","market_price_tick_label":"Минимальный размер ценового тика","market_price_tick_tip":"Это наименьшая величина, на которую могут измениться цены.","market_advance_options":"Расширенные настройки","market_advance_options_desc":"Настройте размеры для разных учетных записей, чтобы скорректировать стоимость затраты.","market_event_queue":"Очередь событий","market_request_queue":"Очередь Queue","market_orderbook":"Orderbook","market_create_button":"Создать рынок","market_create_note":"Обратите внимание, что новый рынок может стоить от 3 до 4 SOL","market_create_note_highlight":"3 - 4 SOL","button_create_farm":"Создать Farm","button_to_my_pools":"Вернуться к моим пулам","button_initialize_liquidity_pool":"Инициализация пула ликвидности"},"create_farm":{"weekly_rewards":"Еженедельные награды","unemmitted_rewards":"Неиспользованные награды","select_pool":"Выберите пул","concentrated_liquidity":"Концентрированная ликвидность","standard_amm":"Стандартный AMM","select_from_your_created_pools":"Выберите из созданных вами пулов","select_from_your_created_pools_tooltip":"Фарм будет создана для выбранного пула.","item_reward_tooltip":"\uD83E\uDD16","foot_note":"Не могу найти то, что вы хотите?","foot_note_link":"Создать новый пул","step_1":"Шаг 1","step_1_name":"Выберите пул","step_1_sentence":"Сначала выберите пул для получения вознаграждений за фарм","step_2":"Шаг 2","step_2_name":"Добавить награды","step_2_sentence":"Далее введите награды за farm","step_3":"Шаг 3","step_3_name":"Обзор сведений о фарме","add_another_button_text":"Добавить еще","add_another_button_text_2":"Добавить еще один токен вознаграждения","done":"Сделано","pool":"Пул","period":"Период","farming_rewards":"Farming награды","button_create_farm":"Создать Farm","error_text_create_farm":"Пользователь должен иметь 300 RAY","please_note":"Обратите внимание","please_note_des":"Награды, выделенные фармам, не могут быть сняты после начала фарма. Вновь созданные фермы обычно появляются на Raydium через 10–30 минут после создания, в зависимости от состояния сети Solana.","note_des":"Этот инструмент предназначен для опытных пользователей. Перед созданием фермы предлагается пройти.","note_des_link":"подробное руководство","add_reward_token":"Вы можете добавить до 3 токен вознаграждения.","estimated_rewards_week":"Предполагаемые награды/ неделя"},"acceleraytor":{"unclaim":"Unclaim"},"apr_dialog":{"modal_title":"APR Метод расчета","desc":"Доступны два метода расчета APR, основанные на исторических торговых сборах и выбросах. Только позиции в диапазоне приносят доход. Прошлые показатели не свидетельствуют о будущих результатах.","warning_note":"Расчеты являются приблизительными и предназначены только для справки..","mode_D_title":"Детальный метод","mode_D_desc":"Этот метод использует предполагаемое изменение (дельту) ликвидности пула, определяемое ценовым диапазоном пользователя и размером позиции, для расчета APR.","mode_D_desc_brief":"Расчетная APR ассчитывается методом дельты. Нажмите значок \xabD\xbb, чтобы переключиться на метод множителя или","mode_M_title":"Метод множителя","mode_M_desc":"Этот метод применяет множитель, определяемый пересечением диапазона цен пользователя и исторического диапазона цен пула, для расчета APR.","mode_M_desc_brief":"Расчетный APR рассчитывается методом мультипликатора. Нажмите значок \xabM\xbb, чтобы переключиться на метод дельты или"}}')},94596:function(e){"use strict";e.exports=JSON.parse('{"common":{"language":"Dil","playground":"playground","disabled":"Devre dışı bırakıldı","all":"Hepsi","search_all":"T\xfcm\xfcn\xfc ara","layout":"D\xfczen","list":"liste","grid":"grid","time_base":"Zaman tabanı","more":"Daha Fazla","view_chart":"Chart\'ı G\xf6r\xfcnt\xfcle","tvl":"TVL","volume":"İşlem Hacmi","rewards":"\xd6d\xfcller","amount":"Miktar","pools":"Havuzlar","nft_address":"NFT adresi","copy_success":"Başarıyla kopyalandı!","copied":"Kopyalandı","copied_desc":"{{subject}} panoya kopyalandı","week":"Hafta","per_unit":"{{subA}} başına {{subB}}","per_unit_2":"{{subA}}/{{subB}}","price":"Fiyat","token_price":"{{token}} fiyat","unit_step":"Adım {{num}}","back":"Geri","select_a_token":"Bir token se\xe7in","popular_tokens":"Pop\xfcler tokenler","balance":"Bakiye","address":"Adres","view_token_list":"Token Listesini G\xf6r\xfcnt\xfcle","token_list_settings":"Token Liste Ayarları","select":"Se\xe7","subject_price":"{{subject}} fiyat","base_token":"Base token","quote_token":"Quote token","go_to_pools":"Havuzlara git","add":"Ekle","view_more":"Daha fazla g\xf6ster","view_less":"Daha az g\xf6ster","nav_text_more":"Daha fazla","nav_text_docs":"D\xf6k\xfcmanlar","nav_text_feedback":"Geribildirim","estimated_APR":"Tahmini APR","route_go":"ito>>","more_info":"Daha fazla bilgi","less_info":"Daha az bilgi","tokens":"Tokenler","amm_id":"AMM ID","market_id":"Market ID","lp":"LP","fees":"\xdccretler","reward":"\xd6d\xfcl","successfully":"Başarıyla","token":"Token","token_list":"Token Listesi","learn_more":"Daha fazla bilgi edin"},"button":{"deposit":"Para yatır","close":"Kapat","delete":"Sil","cancel":"İptal et","continue":"Devam","confirm":"Onayla","edit":"D\xfczenle","search":"Ara","reset":"Reset","stake":"Stake","unstake":"Unstake","harvest":"Harvest","save":"Kaydet","claim":"Claim","not_now":"Şimdi değil","switch":"Değiştir","back":"Geri","next_step":"Sonraki adım","migrate":"Migrate","connect_wallet":"C\xfczdanı Bağla"},"badge":{"suggested":"\xd6nerilen","new":"Yeni","ongoing":"Devam eden","ended":"Bitti","updated":"G\xfcncellendi","ecosystem":"Ekosistem","fusion":"Fusion","raydium":"Raydium"},"setting_board":{"panel_title":"Ayarlar","default_explorer":"Varsayılan Blok gezgini","default_explorer_tooltip":"Tercih edilen blok gezginini se\xe7in","rpc_connection":"RPC Bağlantısı","rpc_connection_tooltip":"Tercih edilen RPC endpointi se\xe7in","color_theme":"Renk teması","slippage_tolerance":"Slipaj Toleransı","slippage_tolerance_tooltip":"Maksimum Slipaj toleransını se\xe7in","language":"Dil","language_tooltip":"Tercih edilen dili se\xe7in","versioned_transaction":"Versioned Tx","versioned_transaction_tooltip":"Versioned Tx, gelişmiş takas y\xf6nlendirme dahil olmak \xfczere ek işlevsellik sağlayan \xf6nemli bir y\xfckseltmedir. Version Tx i a\xe7madan \xf6nce, c\xfczdanınızın uyumlu olduğundan emin olun.","custom":"Custom"},"wallet_connect_panel":{"title":"C\xfczdanınızı Raydium\'a bağlayın","desc":"C\xfczdanınızı bağlayarak, Şartları okuduğunuzu, anladığınızı ve kabul ettiğinizi onaylamış olursunuz.","desc_link":"sorumluluk reddi","choose_network":"Ağ se\xe7in","choose_wallet":"C\xfczdan se\xe7in","show_uninstalled_wallets":"Kaldırılan c\xfczdanları g\xf6ster","tour_title":"Yeni misiniz?","tour_desc":"Raydium\'u kullanmaya başlayın","disconnect":"Bağlantıyı kes"},"token_selector":{"search_placeholder":"Token ile arayın veya adresi yapıştırın","jupiter_types_all":"HEPSİ","jupiter_types_strict":"Strict"},"field":{"24h_volume":"24H İşlem hacmi","24h_fees":"24H işlem \xdccretleri","24h_apr":"24H APR ","7d_volume":"7D İşlem hacmi","7d_fees":"7D işlem \xdccretleri","7d_apr":"7D APR","30d_volume":"30D İşlem hacmi","30d_fees":"30D işlem \xdccretleri","30d_apr":"30D APR","total_apr":"Toplam APR","trade_fees":"Trade \xfccretleri","weekly_rewards":"Haftalık \xd6d\xfcller","fee_tier":"Fee Tier","fee":"Fee","current_price":"Anlık Fiyat","apr":"APR","min":"Min","max":"Max","start_time":"Başlangı\xe7 zamanı"},"swap":{"title":"Swap","from_label":"Den","to_label":"ye","info_minimum_received":"Minimum Alınan","info_minimum_received_tooltip":"Alacağınız minimum token sayısı. Bu, slipaj toleransınıza g\xf6re belirlenir.","info_order_routing":"Emir Y\xf6nlendirme","info_order_routing_tooltip":"Bu y\xf6nlendirme ticaretiniz i\xe7in en iyi fiyatı verdi","info_price_impact":"Fiyat Etkisi","info_price_impact_tooltip":"Trade b\xfcy\xfckl\xfck nedeniyle mevcut piyasa fiyatı ile tahmini fiyat arasındaki fark","info_estimated_fees":"Tahmini \xdccretler","info_estimated_fees_tooltip":"Swap \xfccretleri LP\'lere, RAY geri alımlarına ve hazineye gider.","alert_price_updated":"Fiyat g\xfcncellendi","alert_price_updated_tooltip":"Swap tutarınız girildiğinden beri fiyat değişti.","alert_price_updated_button":"Kabul et","pool_not_found":"Havuz bulunamadı","pool_loading":"Havuz y\xfckleniyor..."},"liquidity_pools":{"view_chart_tooltip":"Havuz grafiklerini g\xf6r\xfcnt\xfcle","chart_tab_volume":"İşlem Hacmi","chart_tab_liquidity":"Likidite","chart_tooltip_volume":"İşlem Hacmi","modal_header_standard_position_detail":"Standart Pozisyon Detayı","farms":"Farmlar"},"liquidity":{"title":"Likidite","pools":"Likidite Havuzları","pool_info":"Havuz Bilgisi","pools_desc":"Likidite sağlayın, getiri elde edin.","concentrated":"Konsantre","standard":"Standard","pool":"Havuz","fee_rate":"Fee Oranı","show_farms":"Farmları g\xf6ster","create_pool":"Yarat","create_pool_mobile":"yarat","create_pool_tx_title":"Havuz yarat ","create_pool_tx_desc":"yarat {{mintA}} - {{mintB}} havuz","value":"değer","select_type":"Havuz T\xfcr\xfcn\xfc Se\xe7in","select_farm":"Farm se\xe7","stake_liquidity":"Likidite stake","unstake_liquidity":"Likidite unstake","add_liquidity":"Likidite Ekle","remove_liquidity":"Likidite kaldır","withdraw_liquidity":"Likidite \xc7ek","pool_liquidity":"Likidite Havuzu","pooled":"Havuz","pool_not_found":"Havuz bulunamadı","total_apr_7d":"Toplam APR 7D","my_position":"Pozisyonum","APR":"APR","APR_tooltip":"Havuzun son 24 saatte kazandığı işlem \xfccretlerine dayalı tahmini APR","my_lp_balance":"Benim LP bakiyem","lp_token_balance":"LP Token Bakiyesi","staked_liquidity":"Stake edilmiş likidite","unstaked_liquidity":"Unstake edilmiş likidite","rewards_to_be_harvested":"Bekleyen \xf6d\xfcller","assets_to_be_received":"Alınacak varlıklar","staked":"Stake edildi","unstaked":"Unstake eildi","auto_swap":"Auto-swap","total_deposit":"Toplam Deposit","stakeable_hint":"Bu havuz i\xe7in LP tokenlerinizin stake\'ini kaldırdınız. Bunları doğrudan Stake Likidite sekmesinde stake edebilirsiniz.","auto_swap_hint":"Auto-swap a\xe7ıkken, token tutarları otomatik olarak pozisyonunuzu oluşturmak i\xe7in gereken para yatırma oranına d\xf6n\xfcşt\xfcr\xfclecektir.","auto_swap_modal":{"turn_on_title":"Auto-swap a\xe7ılsın mı?","turn_off_title":"Auto-swap kapatılsın mı?","turn_on_description":"Auto-swap a\xe7ıkken, token tutarları otomatik olarak pozisyonunuzu oluşturmak i\xe7in gereken para yatırma oranına d\xf6n\xfcşt\xfcr\xfclecektir.","turn_off_description":"Auto-swap kapalıyken, tokenlar pozisyon yatırma oranınıza uyacak şekilde değiştirilmeyecektir. Bir pozisyon oluşturmak i\xe7in c\xfczdanınızda yeterli miktarda tokene ihtiyacınız olacak.","turn_on":"Auto-swapı a\xe7","turn_off":"Auto-swapı kapat"},"setting_modal":{"title":"Ayarlar"},"pool_search_modal":{"title":"Havuz Ara"},"pool_fee_desc":"Bu bir {{feeRate}}% fee tier {{type}} likidite havuzudur","no_active_farm":"Bu havuza ait aktif bir farm bulunmamaktadır.","loading_pool":"Havuz y\xfckleniyor","create_lp":"LP yarat","preview_pool":"Havuzu g\xf6r\xfcnt\xfcle","want_to_stake_lp":"LP\'nizi şimdi stake etmek istiyor musunuz??","stake_lp_desc":"Ek \xf6d\xfcller kazanmak i\xe7in LP tokenlerinizi bir farma yatırın. Bunu daha sonra Portf\xf6y altında da yapabilirsiniz.","assets_to_received":"Alınacak varlıklar","tx_message":{"staked_successfully":"Stake edildi {{symbol}}","staked_desc":"Stake ettiniz {{amount}} {{symbol}}","unStaked_successfully":"Unstake edildi {{symbol}}","unStaked_desc":"Unstake ettiniz {{amount}} {{symbol}}"}},"create_pool":{"modal_title":"Buradan başlamak istiyorum...","modal_tab_label":"Havuz tipi","modal_tab_standard_amm":"Standard AMM","modal_tab_concentrated":"Konsantre Likidite","modal_section_header_pool":"Yeni havuz yaratılıyor","modal_section_header_pool_desc":"Herhangi bir token farmı i\xe7in bir likidite havuzu oluşturun. Bunu okumanız şiddetle tavsiye edilir","modal_section_header_pool_desc_link":"detaylı rehber","modal_section_header_farm":"Bir farm yaratılıyor","modal_section_header_farm_desc":"Halihazırda aktif olan herhangi bir havuz i\xe7in bir farm oluşturulabilir. Bunu okumanız şiddetle tavsiye edilir","modal_section_header_farm_desc_link":"detaylı rehber","clmm_please_note":"L\xfctfen Not edin","clmm_please_note_des":"Bu ara\xe7 ileri d\xfczey kullanıcılar i\xe7indir. Bir farm oluşturmadan \xf6nce şu aşamalardan ge\xe7meniz \xf6nerilir:","clmm_please_note_des_link":"detaylı rehber"},"farm":{"create":"Farm yarat","show_closed":"Kapananları g\xf6ster"},"clmm":{"total_deposit":"Toplam Deposit","my_range":"Benim aralığım","nft_mint_address":"NFT Mint Adresi","nft_mint":"NFT Mint","in_range":"Range İ\xe7inde","out_of_range":"Range dışında","create_new_position":"Yeni pozisyon yarat","position":"Pozisyon","set_price_range":"Fiyat aralığı ayarla","time_price_range":"{{time}} Fiyat Aralığı","match_deposit_ratio":"Deposit oranını eşle","add_deposit_amount":"Deposit Miktarı Ekle","match_deposit_ratio_tooltip":"A\xe7ıldığında, token tutarları otomatik olarak pozisyonunuzu oluşturmak i\xe7in gereken para yatırma oranına d\xf6n\xfcşt\xfcr\xfclecektir.","deposit_ratio":"Deposit Oranı","select_token_fee_tier":"Token se\xe7 & fee tier","set_initial_price_range":"Başlangı\xe7 fiyat & range ayarla","enter_deposit_amount":"Deposit miktarını gir","best_for_very_stable":"\xc7ok stabil pairler i\xe7in en iyisi","best_for_stable":"Stabil pairler i\xe7in en iyisi","best_for_most_pair":"\xc7oğu pairler i\xe7in en iyisi","best_for_exotic_pair":"volatil pairler i\xe7in en iyisi","price_setting":"Fiyat Ayarları","initial_price":"Başlangı\xe7 Fiyatı","price_range":"Fiyat aralığı","preview_deposit":"Deposit G\xf6r\xfcnt\xfcle","selected_range":"Se\xe7ilen Range","min_price":"Min Fiyat","max_price":"Max Fiyat","confirm_deposit":"Depositi Onayla","you_will_receive":"Alacaksınız","pooled_assets":"Havuzdaki varlıklar","pending_rewards":"Bekleyen \xd6d\xfcller","no_clmm_positions":"Konsantre likidite pozisyonunuz yok.","current_position":"Şu anki pozisyon","deposit_successful":"Başarılı bir şekilde para yatırın","nft_desc":"Konsantre Likidite pozisyonunuzu temsil eden yeni bir NFT artık c\xfczdanınızda.","dont_burn_nft":"Asla bu NFT yi burn etmeyin yoksa likiditeyi kaldıramazsınız! NFT\'yi başka bir c\xfczdana g\xf6nderirseniz yalnızca yeni c\xfczdan likiditeyi kaldırabilir.","view_my_positions":"Pozisyonlarımı g\xf6r\xfcnt\xfcle","input_lock_desc":"Piyasa fiyatı belirlediğiniz fiyat aralığının dışında. Yalnızca tek varlık deposit","modal_header_add_liquidity_to":"Likidite Ekle","modal_header_remove_liquidity":"Likidite Kaldır","close_position":"Pozisyonu kapat","position_closed":"Pozisyonu kapatıldı","close_mint_position":"Kapat {{mint}} pozisyon."},"migrate_clmm":{"title":"Konsantre Likidite havuzuna ge\xe7iş","desc":"Aşağıdan ge\xe7iş yapın veya CLMM havuzları ve riskleri hakkında daha fazla bilgi edinin","desc_link":"bura","quick_migration":"Hızlı ge\xe7iş","quick_migration_desc":"Daha pasif bir strateji i\xe7in \xe7ok geniş fiyat aralığı.","custom_migration":"\xd6zel ge\xe7iş","custom_migration_desc":"Daha y\xfcksek sermaye verimliliği i\xe7in \xf6zel bir fiyat aralığı belirleyin.","heading_clmm_pool":"CLMM Havuz","heading_price_range":"Fiyat Aralığı","current_price":"Anlık fiyat","current_position":"Şu anki pozisyon","clmm_pool":"CLMM Havuz","wallet":"C\xfczdan","footer_note":"* Ge\xe7iş aynı zamanda harvest de yapacak","footer_note_2":"bekleyen \xf6d\xfcllerde.","migrate_clmm_tx_title":"CLMM\'ye ge\xe7iş","migrate_clmm_tx_desc":"CLMM pozisyonuna ge\xe7iş."},"portfolio":{"title":"Portf\xf6y","hero_title":"Portf\xf6y\xfcm","assets_by_pool":"Havuza g\xf6re varlıklar","assets_by_token":"Tokene g\xf6re varlıklar","idle_tokens":"Boştaki tokenler","harvest_all_label":"Bekleyen yield","harvest_all_tooltip":"\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16hepsini harvest i\xe7in a\xe7ıklama","harvest_all_button":"Hepsini Harvest et","section_overview":"Genel Bakış","section_positions":"Pozisyonlarım","section_positions_tab_clmm":"Konsantre","section_positions_tab_standard":"Standard","section_positions_tab_staking":"Stake edilen RAY","section_positions_clmm_switch_direction_tooltip":"Veri g\xf6r\xfcnt\xfclemeyi kolaylaştırmak i\xe7in Base/quote tokenleri değiştirildi.","section_positions_clmm_account_view_more":"Daha fazla g\xf6r\xfcnt\xfcle","section_positions_clmm_account_view_less":"Daha az g\xf6r\xfcnt\xfcle","section_positions_clmm_account_nft_mint_address":"NFT Mint Adresi","section_positions_clmm_account_pending_yield":"Bekleyen getiri","section_positions_clmm_account_pending_yield_button":"Harvest","section_my_created_farms":"Oluşturduğum farmlar","section_department_tab_clmm":"Konsantre","section_department_tab_standard":"Standard","section_department_tab_all":"Hepsi","section_my_created_farms_item_edit_farm_button":"Farmı D\xfczenle","no_staked_farm":"Stake edilmiş RAY yok.","no_standard_positions":"Herhangi bir standart likidite pozisyonunuz yok.","stake_item_stake_button":"Stake","stake_item_migrate_button":"Migrate","acceleraytor":"Acceleraytor","acceleraytor_desc":"AcceleRaytor\'dan talep edilmemiş paranız var. Kalan fonlar aşağıda talep edilebilir.","acceleraytor_banner_desc":"AcceleRaytor\'da talep edilmemiş paranız var. Bu sayfanın altındaki ayrıntıları kontrol edin ve tek tıklamayla paranızı talep edin.","acceleraytor_tx_title":"AccelerRaytor Claim","acceleraytor_tx_desc":"Claim {{amountA}} {{symbolA}}","acceleraytor_tx_1_desc":"Claim {{amountA}} {{symbolA}} ve {{amountB}} {{symbolB}}"},"amm":{"staked":"Stake edilmiş","pending_reward":"Bekleyen \xd6d\xfcller","pending_reward_button":"Harvest","pending_alert":"Bir farmda stake edilebilecek LP tokenlarını kaldırmışsınız. Şimdi stake edin","pooled_token":"Havuzdaki {{token}}","farm_ended":"Farm Aktif değil","farm_unstaked":"LP Unstake edilmiş","position":"Pozisyon"},"staking":{"title":"Staking","pending_reward":"Bekleyen \xd6d\xfcller","pending_rewards":"Bekleyen \xd6d\xfcller","staked":"Stake edilen","APR":"APR","liquidity":"Likidite","available":"Mevcut {{symbol}}","pending_rewards_tooltip":"\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16","pending_rewards_button":"Harvest","staking_desc":"Ek RAY getirisi kazanmak i\xe7in RAY\'i stake edin.","unstake_modal_header":"Unstake {{symbol}}","unstake_modal_confirm_text":"Unstake {{symbol}}","stake_modal_header":"Stake {{symbol}}","stake_modal_confirm_text":"Stake {{symbol}}","alert_empty_token":"Yetersiz RAY bakiyesi"},"wallet":{"connected_hint":{"portfolio_info":"Varlık dağıtımınızı g\xf6rmek i\xe7in c\xfczdanı bağlayın.","portfolio_idle":"Yatırılan varlıklarınızı g\xf6rmek i\xe7in c\xfczdanı bağlayın.","portfolio_position":"Pozisyonlarınızı g\xf6rmek i\xe7in c\xfczdanı bağlayın."}},"error":{"should_input_valid_minimum_order_size":"Ge\xe7erli bir minimum emir boyutu girin","should_input_valid_price_tick":"Ge\xe7erli bir fiyat adımı boyutu girin","select_quote_token":"Teklif tokenini se\xe7in","select_base_token":"Temel tokeni se\xe7in","enter_upper_price":"\xdcst fiyatı girin","enter_lower_price":"Alt fiyatı girin","enter_max_price":"Maksimum fiyatı girin","enter_min_price":"Minimum fiyatı girin","enter_current_price":"G\xfcncel fiyatı girin","enter_order_size":"Emir boyutunu girin","enter_price_tick":"Fiyat adımı boyutunu girin","select_pool_fee":"Havuz \xfccreti tier\'ı se\xe7in","select_pool_token_1":"Havuz token 1\'i se\xe7in","select_pool_token_2":"Havuz token 2\'i se\xe7in","pool_not_found":"Havuz bulunamadı","balance_not_enough":"Yetersiz bakiye","select_reward_token":"\xd6d\xfcl tokenini se\xe7in","enter_token_amount":"Token Tutarını Girin","insufficient_sub_balance":"Yetersiz {{token}} bakiye","no_matches":"Eşleşme yok.","no_pools_found":"Havuz bulunamadı","decrease_reward":"\xd6d\xfcl oranının azaltılmasına mevcut farmın bitiş saatinden sonraki 72 saat i\xe7inde izin verilir.","decrease_reward_72h":"\xd6d\xfcl oranının azaltılmasına mevcut farmın bitiş saatinden sonraki 72 saat i\xe7inde izin verilir. Daha fazla token eklemeyi deneyin.","add_reward_days":"Uzatılan s\xfcre en az 7 g\xfcn, en fazla 90 g\xfcn olmalıdır.","insufficient_duration":"Yetersiz farm s\xfcresi","emission_rewards_low":"\xd6d\xfcl emisyonları gereken minimum değerden daha d\xfcş\xfck","start_time_should_later":"Başlangı\xe7 zamanı ge\xe7mişteki bir zamana ayarlanamaz.","balance_not_enough_token":"{{side}} token bakiyesi yetersiz","should_input_positive_amount":"Sıfırdan b\xfcy\xfck bir {{side}} miktar girin","select_token":"Token {{side}} se\xe7","enter_starting_price":"Başlangı\xe7 fiyatını girin","is_amount_valid":"miktar ge\xe7erli","api_error":"API istek hatası","no_liquidity_data":"Likidite verisi yok.","pool_liquidity_appear":"Havuz likiditesi burada g\xf6r\xfcnecektir.","liquidity_data_not_available":"Likidite verileri mevcut değil.","cannot_find_pool":"Aradığınız havuzu bulamıyor musunuz? Token adresini girmeyi deneyin veya aşağıdaki havuz listelerini kontrol edin.","no_chart_data":"Bu grafik i\xe7in veri yok.","no_chart_data_hint":"L\xfctfen bir s\xfcre bekleyin veya sayfayı yenilemeyi deneyin."},"input":{"max_button":"Max","search_for_a_pair_or_enter_amm_id":"Bir pair arayın veya AMM kimliğini girin","enter_search_token":"Token arayın veya mint adresini yapıştırın.","search_amm_title":"Bir pair arayın veya AMM kimliğini yapıştırın","placeholder_input_amm_id":"AmmId / TVL girişi"},"date_picker":{"farm_will_end_at":"Farm şu saatte bitecek:"},"transaction":{"title":"İşlem","sent":"G\xf6nderildi","processed":"İşleme alındı","failed":"Başarısız","view_detail":"İşlem ayrıntılarını g\xf6r\xfcnt\xfcle","confirmed":"Onaylandı"},"edit_farm":{"button":"D\xfczenle","title":"Farmı D\xfczenle","farm_id":"Farm id","please_note_title":"L\xfctfen aklınızda bulundurun","please_note_content":"Daha fazla token ekleyebilir ve/veya farm s\xfcresini uzatabilirsiniz. \xd6d\xfcl oranını d\xfcş\xfcrecek herhangi bir işlem, mevcut farm bitiş saatinden itibaren yalnızca 72 saat i\xe7inde yapılabilir ve s\xfcrenin en az 7 g\xfcn uzatılması gerekir.","tour_note_title":"Daha fazla \xf6d\xfcl nasıl eklenir??","tour_note_des_1":"1. Farmlara tahsis edilen \xf6d\xfcller, farm başladıktan sonra geri alınamaz.","tour_note_des_2":"2. \xd6d\xfcl oranını artırmak istiyorsanız farm hala aktif durumdayken ek \xf6d\xfcller eklenebilir. S\xfcrenin en az 7 g\xfcn uzatılması gerekiyor.","tour_note_des_3":"3. \xd6d\xfcl oranını d\xfcş\xfcrmek istiyorsanız, bu yalnızca mevcut farm d\xf6neminin bitiminden 72 saat \xf6nce yapılabilir ve s\xfcrenin en az 7 g\xfcn uzatılması gerekir.","title_des":"Bir farm oluşturmadan \xf6nce aşağıdakileri kontrol ettiğinizden emin olun:","title_des_link":"detaylı rehber","subtitle_pool":"Havuz","subtitle_farm_reward":"Farm \xf6d\xfcl\xfc","farming_start":"Farm başlangı\xe7","farming_end":"Farm bitiş","open_date_picker":"Se\xe7","time_day":"G\xfcn","modal_add_another_token":"Başka token ekle","estimated_rewards_week":"Haftalık tahmini \xf6d\xfcl","days_extends":"G\xfcn\xfc uzat","box_header_updated_rewards":"G\xfcncel \xf6d\xfcl","box_header_current_rewards_period":"Mevcut \xf6d\xfcl periyodu","box_header_rewards_adjustment":"\xd6d\xfcl d\xfczenlemesi","box_header_adjust_rewards":"\xd6d\xfclleri ayarlayın","box_header_remaining_amount":"Kalan miktar","remaining_days":"{{days}}G\xfcn kalan","rate":"Oran","per_week":"/hafta","APR":"APR","loading_text_no_farm":"Farm bulunamadı","loading_text_farm_not_editable":"Farm d\xfczenlenemez","claim_unemmitted_rewards":"Dağıtılmayan \xd6d\xfclleri Talep Edin","button_adjust_rewards":"\xd6d\xfclleri ayarlayın","button_add_more_rewards":"Daha Fazla \xd6d\xfcl Ekle"},"recent_transaction":{"another_wallet":"Başka c\xfczdan","recent_transactions":"Son işlemler","view_all":"Hepsini g\xf6ster"},"transaction_history":{"name_add_liquidity":"Likidite Ekle","add_liquidity_desc":"Eklendi {{amountA}} {{symbolA}} ve {{amountB}} {{symbolB}}.","name_remove_liquidity":"Likiditeyi Kaldır","remove_liquidity_desc":"Kaldırıldı {{amountA}} {{symbolA}} ve {{amountB}} {{symbolB}}.","name_harvest":"Harvest","name_swap":"Swap","description_remove_liquidity":"Kaldır {{token1}} balabalabala\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16","liquidity_staked_title":"Likidite Stake edildi","liquidity_staked_desc":"Stake edildi {{amount}} {{symbol}}","liquidity_unstaked_title":"Stake Edilen Likiditeyi Geri \xc7ek","liquidity_unstaked_desc":"Unstake edildi {{amount}} {{symbol}}","harvest_reward_title":"Harvest \xd6d\xfclleri","harvest_clmm_reward_desc":"Harvest Clmm \xd6d\xfclleri","harvest_farm_reward_desc":"Harvest Farm \xd6d\xfclleri","update_reward_title":"\xd6d\xfclleri G\xfcncelle","update_reward_desc":"\xd6d\xfclleri G\xfcncelle {{pool}}","create_pool":"Havuz Yarat","create_clmm_pool":"clmm havuzu yarat","open_pool_position":"Havuz pozisyonu a\xe7","open_clmm_pool_position":"CLMM havuz pozisyonu a\xe7","create_farm":"Yeni farm yarat","create_clmm_farm_desc":"ID: {{poolId}}","harvest_rewards":"Harvest edilen \xd6d\xfcller","harvest_rewards_desc":"Harvest edildi: {{symbol}}"},"create_standard_pool":{"step_1":"Adım 1","step_1_name":"Market yarat","step_2":"Adım 2","step_2_name":"Likidite Havuzunu Başlat","please_note":"L\xfctfen aklınızda bulundurun","please_note_des":"Halihazırda aktif olan herhangi bir havuz i\xe7in bir farm oluşturulabilir. Bunu okumanız şiddetle tavsiye edilir","please_note_des_link":"detaylı rehber","enter_open_book_market_id":"OpenBook Pazar Kimliğini girin","market_id":"Market ID","note_has_id":"OpenBook entegre havuzları benzersiz bir OpenBook Pazar Kimliğine bağlanmalıdır. Market Kimliği yalnızca bir havuz i\xe7in kullanılabilir.","have_id":"Bir ID ye sahibim","no_id":"ID yarat","friendly_sentence_1":"\xd6ncelikle bir Market Kimliğine ihtiyacınız var","friendly_sentence_2":"Neredeyse hazır! Şimdi ilk havuz ayarlarını girin","note_done":"Havuz başarıyla oluşturuldu!","note_done_2":"Artık bir farm oluşturabilir veya geri d\xf6nebilirsiniz","current_price":"Mevcut Fiyat","initial_liquidity":"İlk likidite","base_token_initial_liquidity":"Base token İlk likidite","quote_token_initial_liquidity":"Quote token İlk likidite","market_open_book_id":"OpenBook Program ID","market_create_orderbook":"Aşağıda bir OpenBook Market Kimliği oluşturun:","market_tokens":"Tokenler","market_min_order_size":"Min Emir boyutu","market_min_order_size_label":"Min Emir boyutu","market_min_order_size_tip":"Bu, izin verilen en k\xfc\xe7\xfck emir boyutudur.","market_price_tick":"Fiyat adımı","market_price_tick_label":"Minimum fiyat adımı boyutu","market_price_tick_tip":"Bu, fiyatların hareket edebileceği en k\xfc\xe7\xfck miktardır.","market_advance_options":"Gelişmiş se\xe7enekler","market_advance_options_desc":"Kira maliyetini ayarlamak i\xe7in farklı hesapların boyutlarını yapılandırın.","market_event_queue":"Etkinlik Sırası","market_request_queue":"Talep Sırası","market_orderbook":"Emir Defteri","market_create_button":"Market yarat","market_create_note":"Yeni bir market yaratmanın 3 - 4 SOL arasında bir maliyeti olabileceğini unutmayın.","market_create_note_highlight":"3 - 4 SOL","button_create_farm":"Farm yarat","button_to_my_pools":"Havuzlarıma geri d\xf6n","button_initialize_liquidity_pool":"Likidite Havuzunu Başlat"},"create_farm":{"weekly_rewards":"Haftalık \xd6d\xfcller","unemmitted_rewards":"G\xf6nderilmemiş \xd6d\xfcller","select_pool":"Havuz Se\xe7","concentrated_liquidity":"Konsantre Likidite","standard_amm":"Standard AMM","select_from_your_created_pools":"Oluşturduğunuz havuzlardan se\xe7im yapın","select_from_your_created_pools_tooltip":"Se\xe7ilen havuz i\xe7in farm oluşturulacak","item_reward_tooltip":"\uD83E\uDD16","foot_note":"İstediğinizi bulamıyor musunuz??","foot_note_link":"Yeni bir havuz yarat","step_1":"Adım 1","step_1_name":"Havuz se\xe7","step_1_sentence":"\xd6ncelikle farm \xf6d\xfclleri i\xe7in bir havuz se\xe7in","step_2":"Adım 2","step_2_name":"\xd6d\xfclleri ekle","step_2_sentence":"Daha sonra farm i\xe7in \xf6d\xfclleri girin","step_3":"Adım 3","step_3_name":"Farm Detaylarını G\xf6r\xfcnt\xfcle","add_another_button_text":"Başka ekle","add_another_button_text_2":"Başka bir \xf6d\xfcl tokeni ekle","done":"yapıldı","pool":"Havuz","period":"Period","farming_rewards":"Farm \xf6d\xfclleri","button_create_farm":"Farm yarat","error_text_create_farm":"Kullanıcının 300 RAY\'e sahip olması gerekir","please_note":"L\xfctfen aklınızda bulundurun","please_note_des":"Farmlara tahsis edilen \xf6d\xfcller, farm başladıktan sonra geri alınamaz. Yeni oluşturulan farmlar, Solana ağ durumuna bağlı olarak genellikle oluşturulduktan 10-30 dakika sonra Raydium\'da g\xf6r\xfcn\xfcr.","note_des":"Bu ara\xe7 ileri d\xfczey kullanıcılar i\xe7indir. Bir farm oluşturmadan \xf6nce şu aşamalardan ge\xe7meniz \xf6nerilir:","note_des_link":"detaylı rehber","add_reward_token":"En fazla 3 \xf6d\xfcl tokeni ekleyebilirsiniz.","estimated_rewards_week":"Tahmini \xf6d\xfcller/hafta"},"acceleraytor":{"unclaim":"Unclaim"},"apr_dialog":{"modal_title":"APR Hesaplama Y\xf6ntemi","desc":"Tahmini APR\'yi hesaplamak i\xe7in ge\xe7miş trade \xfccretleri ve emisyonlara dayalı iki y\xf6ntem mevcuttur. Yalnızca aralıktaki konumlar getiri sağlar. Ge\xe7miş performans gelecekteki sonu\xe7ların g\xf6stergesi değildir.","warning_note":"Hesaplamalar bir tahmindir ve yalnızca referans ama\xe7lıdır.","mode_D_title":"Detay Metodu","mode_D_desc":"Bu y\xf6ntem, tahmini APR\'yi hesaplamak i\xe7in kullanıcının fiyat aralığı ve pozisyon b\xfcy\xfckl\xfcğ\xfcne g\xf6re belirlenen havuz likiditesindeki zımni değişikliği (delta) kullanır.","mode_D_desc_brief":"Tahmini APR, Delta Y\xf6ntemi ile hesaplanır. \xc7arpan Y\xf6ntemine ge\xe7mek i\xe7in \'D\' simgesine tıklayın veya","mode_M_title":"\xc7arpan Y\xf6ntemi","mode_M_desc":"Bu y\xf6ntem, tahmini APR\'yi hesaplamak i\xe7in kullanıcı fiyat aralığı ile havuzun ge\xe7miş fiyat aralığının kesişimiyle belirlenen bir \xe7arpan uygular.","mode_M_desc_brief":"Tahmini APR, \xc7arpan Y\xf6ntemi ile hesaplanır. Delta Y\xf6ntemine ge\xe7mek i\xe7in \'M\' simgesine tıklayın veya"}}')},41659:function(e){"use strict";e.exports=JSON.parse('{"common":{"language":"语言","playground":"游乐场","disabled":"已禁用","all":"全部","search_all":"搜索全部","layout":"布局","list":"列表","grid":"网格","time_base":"时间基准","more":"更多","view_chart":"查看图表","tvl":"TVL","volume":"成交量","rewards":"奖励","amount":"数量","pools":"池子","nft_address":"NFT地址","copy_success":"已成功复制!","copied":"已复制","copied_desc":"{{subject}}已复制到剪贴板","week":"周","per_unit":"{{subA}} 每 {{subB}}","per_unit_2":"{{subA}} / {{subB}}","price":"价格","token_price":"{{token}} 价格","unit_step":"步骤{{num}}","back":"返回","select_a_token":"选择代币","popular_tokens":"热门代币","balance":"余额","address":"地址","view_token_list":"查看代币列表","token_list_settings":"代币列表设置","select":"选择","subject_price":"{{subject}}价格","base_token":"基础代币","quote_token":"报价代币","go_to_pools":"前往流动性池子页面","add":"添加","view_more":"查看更多","view_less":"折叠","nav_text_more":"更多","nav_text_docs":"文档","nav_text_feedback":"反馈","estimated_APR":"预估APR","route_go":"前往>>","more_info":"详细信息","less_info":"精简显示","tokens":"代币","amm_id":"标准AMM ID","market_id":"市场 ID","lp":"LP","fees":"手续费","reward":"奖励","successfully":"成功","token":"代币","token_list":"代币列表","learn_more":"了解更多信息"},"button":{"deposit":"存入","close":"关闭","delete":"删除","cancel":"取消","continue":"继续","confirm":"确认","edit":"编辑","search":"搜索","reset":"重置","stake":"质押","unstake":"解除质押","harvest":"获取挖矿奖励","save":"保存","claim":"领取","not_now":"暂不","switch":"切换","back":"返回","next_step":"下一步","migrate":"迁移","connect_wallet":"连接钱包"},"badge":{"suggested":"推荐","new":"新","ongoing":"进行中","end":"结束","updated":"更新","ecosystem":"生态系统","fusion":"荟萃","raydium":"Raydium"},"setting_board":{"panel_title":"设置","default_explorer":"默认浏览器","default_explorer_tooltip":"选择常用的区块浏览器","rpc_connection":"RPC连接","rpc_connection_tooltip":"选择常用的RPC服务商","color_theme":"颜色主题","slippage_tolerance":"滑点","slippage_tolerance_tooltip":"选择您能接受的最大滑点","language":"语言","language_tooltip":"选择常用语言","versioned_transaction":"版本化交易","versioned_transaction_tooltip":"版本化交易是一项重大升级来保证实现更多功能,包括高级交换路由。在开启功能前,请确保您的钱包兼容。","custom":"自定义"},"wallet_connect_panel":{"title":"连接您的钱包到Raydium","desc":"连接您的钱包,即表示您已阅读、理解并接受","desc_link":"免责声明","choose_network":"选择网络","choose_wallet":"选择钱包","show_uninstalled_wallets":"显示未安装的钱包","tour_title":"新手上路?","tour_desc":"开始上手Raydium","disconnect":"断开连接"},"token_selector":{"search_placeholder":"代币搜索或黏贴地址","jupiter_types_all":"全部","jupiter_types_strict":"严格"},"field":{"24h_volume":"24小时成交量","24h_fees":"24小时手续费","24h_apr":"24小时APR","7d_volume":"7天成交量","7d_fees":"7天手续费","7d_apr":"7天APR","30d_volume":"30天成交量","30d_fees":"30天手续费","30d_apr":"30天APR","total_apr":"总APR","trade_fees":"交易手续费","weekly_rewards":"每周奖励","fee_tier":"费率层级","fee":"手续费","current_price":"当前价格","apr":"APR","min":"最小值","max":"最大值","start_time":"开始时间"},"swap":{"title":"兑换","from_label":"从","to_label":"到","info_minimum_received":"最小收到数量","info_minimum_received_tooltip":"在此交易中您将收到的最小代币数量,这取决于您的滑点容忍度。","info_order_routing":"订单路由","info_order_routing_tooltip":"该功能为您的交易提供了最佳价格","info_price_impact":"价格影响","info_price_impact_tooltip":"由于交易规模,市场价格与预估价格之间的差价","info_estimated_fees":"预估手续费","info_estimated_fees_tooltip":"兑换手续费归流动性提供者、RAY回购以及国库所有。","alert_price_updated":"更新价格","alert_price_updated_tooltip":"自您输入交易金额以来,价格已发生变化。","alert_price_updated_button":"接受","pool_not_found":"未找到流动性池","pool_loading":"正在加载流动性池..."},"liquidity_pools":{"view_chart_tooltip":"查看数据的图表","chart_tab_volume":"成交量","chart_tab_liquidity":"流动性","chart_tooltip_volume":"交易量","modal_header_standard_position_detail":"标准流动性仓位的详情","farms":"农场"},"liquidity":{"title":"流动性","pools":"流动性池","pool_info":"池子信息","pools_desc":"提供流动性,赚取收益。","concentrated":"集中","standard":"标准","pool":"池子","fee_rate":"费率","show_farms":"显示农场","create_pool":"创建","create_pool_mobile":"创建","create_pool_tx_title":"创建池","create_pool_tx_desc":"创建 {{mintA}} - {{mintB}} 池","value":"价值","select_type":"选择池子类型","select_farm":"选择农场","stake_liquidity":"质押流动性","unstake_liquidity":"解除质押流动性","add_liquidity":"添加流动性","remove_liquidity":"移除流动性","withdraw_liquidity":"收回流动性","pool_liquidity":"池子流动性","pooled":"池子里已质押","pool_not_found":"未找到池子","total_apr_7d":"7天总APR","my_position":"我的持仓","APR":"APR","APR_tooltip":"APR \uD83E\uDD16\uD83E\uDD16\uD83E\uDD16","my_lp_balance":"我的流动性持仓","lp_token_balance":"流动性持仓余额","staked_liquidity":"已质押流动性","unstaked_liquidity":"未质押流动性","rewards_to_be_harvested":"待收取奖励","assets_to_be_received":"待接收资产","staked":"已质押","unstaked":"未质押","auto_swap":"自动兑换","total_deposit":"总共存入的持仓","stakeable_hint":"您有尚未质押的LP代币,您可以直接在\'Stake Liquidity\'页面直接质押。","auto_swap_hint":"当自动兑换开启时,我们将帮助您自动兑换的代币,以确保您有足够的代币创建仓位。","auto_swap_modal":{"turn_on_title":"打开自动兑换?","turn_off_title":"关闭自动兑换?","turn_on_description":"当自动兑换开启时,您所输入的代币金额将自动兑换为开仓所需的存款比例,便于开仓。","turn_off_description":"当自动兑换关闭时,您所输入的代币金额将自动兑换为开仓所需的存款比例,便于开仓。","turn_on":"打开自动兑换","turn_off":"关闭自动兑换"},"setting_modal":{"title":"设置"},"pool_search_modal":{"title":"搜索流动性池子"},"pool_fee_desc":"这是一个{{feeRate}}%流动性池子","no_active_farm":"这个池子没有农场。","loading_pool":"加载池子","create_lp":"开仓","preview_pool":"预览池子信息","want_to_stake_lp":"您想现在就把您的流动性质押到这个池子中吗?","stake_lp_desc":"将您的流动性质押到一个农场会帮助您获得更高的APR。您也可以稍后通过您的投资组合操作。","assets_to_received":"即将收到的资产","tx_message":{"staked_successfully":"质押成功 {{symbol}}","staked_desc":"您已经成功质押 {{amount}} {{symbol}}","unStaked_successfully":"解除质押成功 {{symbol}}","unStaked_desc":"您已经成功解除质押 {{amount}} {{symbol}}"}},"create_pool":{"modal_title":"我想从...开始","modal_tab_label":"选择池子类型","modal_tab_standard_amm":"标准AMM池","modal_tab_concentrated":"流动性集中池","modal_section_header_pool":"创建一个池子","modal_section_header_pool_desc":"您可以为任何代币对创建流动性池子。强烈建议阅读以下内容","modal_section_header_pool_desc_link":"详细指南","modal_section_header_farm":"创建一个农场","modal_section_header_farm_desc":"在创建农场之前,建议阅读一下","modal_section_header_farm_desc_link":"详细指南","clmm_please_note":"请注意","clmm_please_note_des":"这个工具适合高级用户。在创建农场之前,建议阅读一下。","clmm_please_note_des_link":"详细指南"},"farm":{"create":"创建农场","show_closed":"显示关闭的农场"},"clmm":{"total_deposit":"总共存入的仓位","my_range":"我的仓位范围","nft_mint_address":"NFT铸造地址","nft_mint":"NFT铸造","in_range":"在范围内","out_of_range":"超出范围","create_new_position":"创建新的仓位","position":"仓位","set_price_range":"设置价格范围","time_price_range":"{{time}}价格范围","match_deposit_ratio":"匹配存入比例","add_deposit_amount":"添加存入数量","match_deposit_ratio_tooltip":"打开后,代币金额将自动兑换为开仓所需的存入比例","deposit_ratio":"存入比例","select_token_fee_tier":"选择代币&费率","set_initial_price_range":"设置初始价格&范围","enter_deposit_amount":"输入存入数量","best_for_very_stable":"最适合非常稳定的代币对","best_for_stable":"最适合稳定的代币对","best_for_most_pair":"最适合大多数代币对","best_for_exotic_pair":"最适合奇异的代币对","price_setting":"价格设置","initial_price":"初始价格","price_range":"价格范围","preview_deposit":"预览存入金额","selected_range":"选择的范围","min_price":"最低价","max_price":"最高价","confirm_deposit":"确认存入金额","you_will_receive":"您将收到","pooled_assets":"池子里已质押的资产","pending_rewards":"待发放的奖励","no_clmm_positions":"您没有任何集中流动性仓位。","current_position":"当前仓位","deposit_successful":"成功存入","nft_desc":"象征您集中流动性仓位的NFT已成功发送到您的钱包中。","dont_burn_nft":"请勿销毁此NFT,否则您将无法移除流动性!如果您将NFT发送到另一个钱包,只有新钱包才能移除流动性。","view_my_positions":"查看我的仓位","input_lock_desc":"市场价格超出您指定的价格范围。仅支持单一资产存款。","modal_header_add_liquidity_to":"添加流动性到","modal_header_remove_liquidity":"移除流动性","close_position":"关闭仓位","position_closed":"您的仓位已关闭","close_mint_position":"关闭 {{mint}} 仓位"},"migrate_clmm":{"title":"迁移到集中流动性池","desc":"点击下方迁移,或了解有关集中流动性池和风险的更多信息","desc_link":"这里","quick_migration":"快速迁移","quick_migration_desc":"更宽泛的价格范围,采用较为被动的管理策略。","custom_migration":"自定义迁移","custom_migration_desc":"为更高的资本效率设置自定义价格范围。","heading_clmm_pool":"集中流动性池","heading_price_range":"价格范围","current_price":"当前价格","current_position":"当前仓位","clmm_pool":"集中流动性池","wallet":"钱包","footer_note":"* 迁移并收取奖励收取奖励","footer_note_2":"待处理的奖励。","migrate_clmm_tx_title":"迁移到集中流动性池","migrate_clmm_tx_desc":"迁移到集中流动性仓位."},"portfolio":{"title":"投资组合","hero_title":"我的投资组合","assets_by_pool":"按流动性池划分的资产","assets_by_token":"按代币划分的资产","idle_tokens":"闲置的代币","harvest_all_label":"待收取奖励","harvest_all_tooltip":"\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16待收益的说明","harvest_all_button":"全部收取","section_overview":"概览","section_positions":"我的持仓","section_positions_tab_clmm":"集中流动池子","section_positions_tab_standard":"标准流动池子","section_positions_tab_staking":"质押的RAY","section_positions_clmm_switch_direction_tooltip":"为展示最优的数据显示,基础/报价代币已切换。","section_positions_clmm_account_view_more":"查看更多","section_positions_clmm_account_view_less":"折叠","section_positions_clmm_account_nft_mint_address":"NFT铸造地址","section_positions_clmm_account_pending_yield":"待收取奖励","section_positions_clmm_account_pending_yield_button":"收取奖励","section_my_created_farms":"我创建的农场","section_department_tab_clmm":"集中流动性池子","section_department_tab_standard":"标准流动性池子","section_department_tab_all":"全部","section_my_created_farms_item_edit_farm_button":"编辑农场","no_staked_farm":"您没有任何质押的RAY代币。","no_standard_positions":"您没有任何标准流动性持仓。","stake_item_stake_button":"质押","stake_item_migrate_button":"迁移","acceleraytor":"Acceleraytor","acceleraytor_desc":"您有来自Acceleraytor的未领取资金。剩余资金可以在下方领取。","acceleraytor_banner_desc":"您在Accelerayto中有未领取的资金。在本页底部查看详细信息,并一键领取资金。","acceleraytor_tx_title":"AccelerRaytor领取","acceleraytor_tx_desc":"领取 {{amountA}} {{symbolA}}","acceleraytor_tx_1_desc":"领取 {{amountA}} {{symbolA}}{{amountB}} {{symbolB}}"},"amm":{"staked":"已质押","pending_reward":"待收取奖励","pending_reward_button":"收取奖励","pending_alert":"您有未质押的LP。立刻质押","pooled_token":"池子里质押的 {{token}}","farm_ended":"农场已结束","farm_unstaked":"未质押的LP","position":"仓位"},"staking":{"title":"质押","pending_reward":"待收取奖励","pending_rewards":"待收取奖励","staked":"已质押","APR":"APR","liquidity":"流动性","available":"可用 {{symbol}}","pending_rewards_tooltip":"\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16","pending_rewards_button":"收取奖励","staking_desc":"质押您的Ray代币以赚取收益。","unstake_modal_header":"解除质押 {{symbol}}","unstake_modal_confirm_text":"解除质押 {{symbol}}","stake_modal_header":"质押 {{symbol}}","stake_modal_confirm_text":"质押 {{symbol}}","alert_empty_token":"RAY代币的余额不足"},"wallet":{"connected_hint":{"portfolio_info":"连接您的钱包以查看资产分布。","portfolio_idle":"连接您的钱包以查看您存入的资产。","portfolio_position":"连接您的钱包以查看您的仓位。"}},"error":{"should_input_valid_minimum_order_size":"应输入有效的最小订单变动量","should_input_valid_price_tick":"应输入有效的价格变动量","select_quote_token":"请选择报价代币","select_base_token":"请选择基础代币","enter_upper_price":"输入上限价格","enter_lower_price":"输入下限价格","enter_max_price":"输入最大价格","enter_min_price":"输入最小价格","enter_current_price":"输入当前价格","enter_order_size":"输入订单变动量","enter_price_tick":"输入价格变动量","select_pool_fee":"请选择池子费率层级","select_pool_token_1":"请选择池代币 1","select_pool_token_2":"请选择池代币 2","pool_not_found":"未找到池子","balance_not_enough":"余额不足","select_reward_token":"请选择奖励代币","enter_token_amount":"请输入代币数量","insufficient_sub_balance":"{{token}} 余额不足","no_matches":"暂无匹配","no_pools_found":"未找到池子","decrease_reward":"在当前挖矿结束时间的72小时内允许降低奖励释放率。","decrease_reward_72h":"在当前挖矿结束时间的72小时内允许降低奖励释放率。请尝试添加更多代币。","add_reward_days":"延长的时间必须至少为7天,最多为90天。","insufficient_duration":"奖励释放时间不足","emission_rewards_low":"奖励释放量低于最低要求","start_time_should_later":"开始时间应晚于当前时间","balance_not_enough_token":"{{side}} 代币余额不足","should_input_positive_amount":"应输入大于0的 {{side}} 金额","select_token":"选择 {{side}} 代币","enter_starting_price":"输入起始价格","is_amount_valid":"金额是否有效","api_error":"API请求错误","no_liquidity_data":"暂无流动性数据","pool_liquidity_appear":"池子流动性会在这里展示","liquidity_data_not_available":"暂无流动性数据","cannot_find_pool":"暂时搜不到您需要的池子?请试试输入代币地址或者检查下方池子列表","no_chart_data":"没有图表数据","no_chart_data_hint":"稍安勿躁,刷新页面再试一下"},"input":{"max_button":"最大","search_for_a_pair_or_enter_amm_id":"搜索一个币对或输入AMM ID","enter_search_token":"输入代币或黏贴铸币地址","search_amm_title":"搜索一个币对或输入AMM ID","placeholder_input_amm_id":"输入AmmId / TVL"},"date_picker":{"farm_will_end_at":"农场将结束于:"},"transaction":{"title":"交易","sent":"已发送","processed":"已处理","failed":"失败","view_detail":"查看交易详情","confirmed":"已确认"},"edit_farm":{"button":"编辑","title":"编辑农场","farm_id":"农场ID","please_note_title":"请注意","please_note_content":"您可以添加更多代币和/或延长挖矿时间。任何会降低奖励释放速度的操作都只能在当前农场结束时间的72小时内进行,并且期限必须至少延长7天。","tour_note_title":"如何增加更多奖励?","tour_note_des_1":"1. 分配给农场的奖励在农场开始后无法提取。","tour_note_des_2":"2. 如果您想提高奖励发放速度,可以在农场仍在挖矿时添加额外奖励。期限必须至少延长7天。","tour_note_des_3":"3. 如果您想降低奖励发放速度,只能在当前挖矿期结束前72小时内进行,并且期限必须至少延长7天。","title_des":"在创建农场之前,请确保查看","title_des_link":"详细指南","subtitle_pool":"池","subtitle_farm_reward":"农场奖励","farming_start":"挖矿开始","farming_end":"挖矿结束","open_date_picker":"选择","time_day":"天","modal_add_another_token":"添加另一个代币","estimated_rewards_week":"每周预估奖励","days_extends":"延长天数","box_header_updated_rewards":"已更新奖励","box_header_current_rewards_period":"当前奖励期限","box_header_rewards_adjustment":"奖励调整","box_header_adjust_rewards":"调整奖励","box_header_remaining_amount":"剩余数量","remaining_days":"{{days}}天剩余","rate":"率","per_week":"/周","APR":"年化收益率","loading_text_no_farm":"未找到农场","loading_text_farm_not_editable":"农场不可编辑","claim_unemmitted_rewards":"领取未发放的奖励","button_adjust_rewards":"调整奖励","button_add_more_rewards":"添加更多奖励"},"recent_transaction":{"another_wallet":"另一个钱包","recent_transactions":"最近交易","view_all":"查看全部"},"transaction_history":{"name_add_liquidity":"添加流动性","add_liquidity_desc":"添加 {{amountA}} {{symbolA}}{{amountB}} {{symbolB}}.","name_remove_liquidity":"移除流动性","remove_liquidity_desc":"移除 {{amountA}} {{symbolA}}{{amountB}} {{symbolB}}.","name_harvest":"收取奖励","name_swap":"兑换","description_remove_liquidity":"移除{{token1}} balabalabala\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16\uD83E\uDD16","liquidity_staked_title":"质押流动性","liquidity_staked_desc":"质押 {{amount}} {{symbol}}","liquidity_unstaked_title":"解除质押流动性","liquidity_unstaked_desc":"解除质押 {{amount}} {{symbol}}","harvest_reward_title":"收取奖励","harvest_clmm_reward_desc":"收取集中流动性奖励","harvest_farm_reward_desc":"收取挖矿奖励","update_reward_title":"更新奖励","update_reward_desc":"更新奖励 {{pool}}","create_pool":"创建池子","create_clmm_pool":"创建集中流动性池子","open_pool_position":"池子开仓","open_clmm_pool_position":"创建集中流动性仓位","create_farm":"创建新农场","create_clmm_farm_desc":"ID: {{poolId}}","harvest_rewards":"收取奖励","harvest_rewards_desc":"收取: {{symbol}}"},"create_standard_pool":{"step_1":"步骤 1","step_1_name":"创建市场","step_2":"步骤 2","step_2_name":"初始化流动性池","please_note":"请注意","please_note_des":"可以为任何已经上线的池子创建农场。强烈建议阅读此","please_note_des_link":"详细指南","enter_open_book_market_id":"输入OpenBook市场ID","market_id":"市场ID","note_has_id":"每个新池必须与唯一的OpenBook市场ID关联。一个市场ID只能用于一个池。","have_id":"我有一个ID","no_id":"创建一个ID","friendly_sentence_1":"首先,您需要一个市场ID","friendly_sentence_2":"就差一点了!现在您需要进行一些初始设置","note_done":"您的池已成功创建!","note_done_2":"您现在可以继续创建一个农场或回到主页","current_price":"当前价格","initial_liquidity":"初始流动性","base_token_initial_liquidity":"基础代币初始流动性","quote_token_initial_liquidity":"引用代币初始流动性","market_open_book_id":"OpenBook程序ID","market_create_orderbook":"在下面创建OpenBook市场ID:","market_tokens":"代币","market_min_order_size":"最小订单变动量","market_min_order_size_label":"最小订单变动量","market_min_order_size_tip":"这是允许的最小订单变动量。","market_price_tick":"价格变动量","market_price_tick_label":"最小价格变动量","market_price_tick_tip":"这是价格可以变动的最小金额。","market_advance_options":"高级选项","market_advance_options_desc":"配置不同帐户的大小以调整租金成本。","market_event_queue":"事件队列","market_request_queue":"请求队列","market_orderbook":"订单簿","market_create_button":"创建市场","market_create_note":"请注意,创建新市场的成本可能在3-4SOL之间","market_create_note_highlight":"3-4 SOL","button_create_farm":"创建农场","button_to_my_pools":"返回我的池","button_initialize_liquidity_pool":"初始化流动性池"},"create_farm":{"weekly_rewards":"每周奖励","unemmitted_rewards":"未发放的奖励","select_pool":"选择池子","concentrated_liquidity":"集中流动性","standard_amm":"标准流动性","select_from_your_created_pools":"从您创建的池中选择","select_from_your_created_pools_tooltip":"将为选定的池子创建农场","item_reward_tooltip":"\uD83E\uDD16","foot_note":"找不到您想要的池子?","foot_note_link":"创建一个","step_1":"步骤 1","step_1_name":"选择池子","step_1_sentence":"首先,为农场奖励选择一个池子","step_2":"步骤 2","step_2_name":"添加奖励","step_2_sentence":"接下来,为农场注入奖励","step_3":"步骤 3","step_3_name":"复查农场详情","add_another_button_text":"添加另一个","add_another_button_text_2":"添加另一个奖励代币","done":"完成","pool":"池子","period":"奖励发放时间","farming_rewards":"挖矿奖励","button_create_farm":"创建农场","error_text_create_farm":"用户必须拥有300RAY","please_note":"请注意","please_note_des":"分配给农场的奖励在农场开始后将无法提取。新创建的农场通常在创建后的10-30分钟内在Raydium上显示,具体取决于Solana网络状态。","note_des":"此工具适用于高级用户。在创建农场之前,建议阅读","note_des_link":"详细指南","add_reward_token":"最多可添加3种奖励币","estimated_rewards_week":"每周预估奖励"},"acceleraytor":{"unclaim":"未领取的"},"apr_dialog":{"modal_title":"预估年化百分率(APR)","desc":"有两种方法可用于计算预估年化百分率(APR),基于历史交易手续费和释放奖励。只有在范围内的仓位才能获得收益。过去的表现并不能保证未来的收益。","warning_note":"计算仅为预估,仅供参考。","mode_D_title":"详细方法","mode_D_desc":"该方法利用用户价格范围和仓位大小确定的池流动性的隐含变化(delta)来计算预估年化百分率。","mode_D_desc_brief":"通过Delta方法计算预估年化百分率。单击\'D\'图标切换到乘数方法或","mode_M_title":"乘数方法","mode_M_desc":"该方法将用户价格范围与池的历史价格范围相交的乘数应用于计算预估年化百分率。","mode_M_desc_brief":"通过乘数方法计算预估年化百分率。单击\'M\'图标切换到Delta方法或"},"referral":{"using_code":"使用邀请码","active_code_tooltip":"当前钱包正在使用的邀请码"}}')},13262:function(e){"use strict";e.exports=JSON.parse('{"common":{"language":"語言","playground":"開發元件","disabled":"不可用","all":"全部","search_all":"搜尋全部","layout":"排版","list":"條列","grid":"格狀","time_base":"時間基準","more":"更多","view_chart":"查看圖表","tvl":"總交易量","volume":"交易量","rewards":"獎勵","amount":"數量","pools":"流動池","nft_address":"NFT地址","copy_success":"複製成功!","copied":"已複製","copied_desc":"{{subject}}已經複製到剪貼簿","week":"週","price":"價格","unit_step":"第{{num}}步","back":"返回","select_a_token":"選擇一個token","popular_tokens":"熱門tokens","balance":"餘額","address":"地址","view_token_list":"查看Token列表","token_list_settings":"Token列表設定","select":"選擇","per_unit":"{{subA}}每{{subB}}","per_unit_2":"{{subA}}每{{subB}}","subject_price":"{{subject}}價格","base_token":"Base token","quote_token":"Quote token","go_to_pools":"前往流動池列表","add":"增加","successfully":"已成功"},"field":{"24h_volume":"24小時交易量","24h_fees":"24小時手續費","24h_apr":"24小時年利率","7d_volume":"7日交易量","7d_fees":"7日手續費","7d_apr":"7日年利率","30d_volume":"30日交易量","30d_fees":"30日手續費","30d_apr":"30日年利率","total_apr":"總年利率","trade_fees":"交易手續費","weekly_rewards":"週獎勵","fee_tier":"手續費級距","fee":"手續費","current_price":"現價","apr":"年利率","min":"最小","max":"最大","start_time":"開始時間"},"button":{"deposit":"充值","close":"關閉","cancel":"取消","continue":"繼續","confirm":"確認","search":"搜尋","reset":"重置","stake":"質押","not_now":"不是現在"},"swap":{"title":"交易"},"liquidity":{"title":"流動性","pools":"流動池","pool_info":"流動池資訊","pools_desc":"提供流動性,獲取收益","concentrated":"集中池","standard":"標準池","pool":"流動池","fee_rate":"費率","show_farms":"展示Farms","create_pool":"創建流動池","create_pool_mobile":"創建流動池","create_pool_tx_title":"創建流動池","create_pool_tx_desc":"創建 {{mintA}} - {{mintB}} 流動池","value":"value","select_type":"選擇流動池類型","select_farm":"選擇Farm","stake_liquidity":"質押流動性代幣","unstake_liquidity":"解質押流動性代幣","add_liquidity":"添加流動性","remove_liquidity":"移除流動性","withdraw_liquidity":"提領流動性","pool_liquidity":"流動性","pooled":"已提供流動性","pool_not_found":"沒有流動池","total_apr_7d":"7日總年利率","my_position":"我的流動性部位","my_lp_balance":"我的流動性代幣餘額","lp_token_balance":"流動性代幣餘額","staked_liquidity":"已質押流動性","unstaked_liquidity":"已解質押流動性","rewards_to_be_harvested":"待收獎勵","assets_to_be_received":"待收資產","staked":"已質押","unstaked":"未質押","auto_swap":"自動交換","total_deposit":"總充值","stakeable_hint":"您在目前的流動池中有尚未質押的流動性代幣。您可以直接在「質押流動性」分頁內質押它們","auto_swap_hint":"當「自動交換」開啟時, 系統會自動交易以平衡您的代幣數量, 確保增加的流動性部位數量正確","auto_swap_modal":{"turn_on_title":"啟動自動交換?","turn_off_title":"關閉自動交換?","turn_on_description":"當自動交換打開時,一對不均勻的代幣數量可以自動交易到創建頭寸所需的正確比率。","turn_off_description":"當自動交換關閉時,一對不均勻的代幣數量不能被自動交易到創建頭寸所需的正確比率。","turn_on":"開啟自動交換","turn_off":"關閉自動交換"},"setting_modal":{"title":"設定"},"pool_search_modal":{"title":"資金池搜尋"},"pool_fee_desc":"這是一個手續費{{feeRate}}%費率的{{type}}","no_active_farm":"此流動池沒有可用的Farm","loading_pool":"流動池載入中","create_lp":"創建流動性","preview_pool":"預覽流動池","want_to_stake_lp":"你現在想要質押LP嗎?","stake_lp_desc":"質押您的LP到農場內將會得到更高的APR.您也可以將來從錢包概況頁面進行質押","assets_to_received":"收到的資產","tx_message":{"added":"已增加流動性!","add_desc":"您已存入{{amountA}} {{symbolA}}{{amountB}} {{symbolB}}.","removed":"已移除流動性!","removed_desc":"您已移除{{amountA}} {{symbolA}} and {{amountB}} {{symbolB}}.","staked_successfully":"質押{{symbol}}成功!","staked_desc":"您已質押{{amount}} {{symbol}}","unStaked_successfully":"提領質押{{symbol}}成功!","unStaked_desc":"您已提領質押{{amount}} {{symbol}}"}},"clmm":{"my_range":"我的範圍","nft_mint_address":"NFT Mint地址","nft_mint":"NFT Mint","in_range":"範圍內","out_of_range":"超範圍","create_new_position":"創建新倉位","position":"倉位","set_price_range":"設定價格範圍","time_price_range":"{{time}}價格區間","add_deposit_amount":"增加充值數量","match_deposit_ratio":"符合充值比例","deposit_ratio":"充值比例","select_token_fee_tier":"選擇虛擬幣及費率","set_initial_price_range":"設定初始價格及範圍","enter_deposit_amount":"輸入充值數量","best_for_very_stable":"最適合非常穩定交易對","best_for_stable":"最適合穩定交易","best_for_most_pair":"最適合大部分交易對","best_for_exotic_pair":"最適合波動大交易對","price_setting":"設定價格","initial_price":"初始價格","price_range":"價格範圍","preview_deposit":"預覽充值","selected_range":"已選擇範圍","min_price":"最小價格","max_price":"最大價格","confirm_deposit":"確認充值","you_will_receive":"您將收到","pooled_assets":"已存入的資產","pending_rewards":"代領獎勵","no_clmm_positions":"您沒有任何集中流動池的部位","current_position":"目前的部位","deposit_successful":"充值成功","nft_desc":"一個代表著集中性流動池部位的新NFT已在您的錢包","dont_burn_nft":"不要燃燒這個NFT否則您將無法提取流動性!如果您轉移NFT到新的錢包,那將只有該錢包可以提領流動性","view_my_positions":"查看我的流動池部位"},"portfolio":{"title":"錢包概況","no_staked_farm":"你沒有質押的倉位"},"wallet":{"connected_hint":{"portfolio_info":"連接錢包查看資產分佈","portfolio_idle":"連接錢包查看資產是否妥善存入資金池","portfolio_position":"連接錢包查看資產部位"}},"error":{"select_reward_token":"選擇獎勵Token","enter_token_amount":"輸入token數量","insufficient_sub_balance":"{{token}}餘額不足","no_matches":"沒有符合的結果","no_pools_found":"找不到流動池","decrease_reward":"減緩獎勵發送速度只允許在目前Farm結束前的72小時內","decrease_reward_72h":"減緩獎勵發送速度只允許在目前Farm結束前的72小時內,請試著增加獎勵的Token","add_reward_days":"延長時間必須在最少7天最多90天區間","insufficient_duration":"期間設置錯誤"},"input":{"enter_search_token":"輸入名稱或地址搜尋token."},"transaction":{"sent":"交易已發送","processed":"交易已處理","failed":"交易錯誤","view_detail":"查看交易細節"}}')}},function(e){var t=function(t){return e(e.s=t)};e.O(0,[9774,179],function(){return t(6840),t(96885)}),_N_E=e.O()}]);