diff --git a/404.html b/404.html index 93aad06..ed06565 100644 --- a/404.html +++ b/404.html @@ -2,7 +2,7 @@ - + - + +
diff --git a/assets/index.5bdfee9b.js b/assets/index.4dd7eadf.js similarity index 93% rename from assets/index.5bdfee9b.js rename to assets/index.4dd7eadf.js index 5fcfb4d..97ac188 100644 --- a/assets/index.5bdfee9b.js +++ b/assets/index.4dd7eadf.js @@ -77,7 +77,7 @@ Error generating stack: `+a.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function xS(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let i=e[r];return t.concat(Array.isArray(i)?i.map(o=>[r,o]):[[r,i]])},[]))}function zK(e,t){let r=xS(e);for(let i of t.keys())r.has(i)||t.getAll(i).forEach(o=>{r.append(i,o)});return r}function HK(e){let{basename:t,children:r,window:i}=e,o=X.exports.useRef();o.current==null&&(o.current=Vq({window:i,v5Compat:!0}));let a=o.current,[s,l]=X.exports.useState({action:a.action,location:a.location});return X.exports.useLayoutEffect(()=>a.listen(l),[a]),L($K,{basename:t,children:r,location:s.location,navigationType:s.action,navigator:a})}var fT;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmitImpl="useSubmitImpl",e.UseFetcher="useFetcher"})(fT||(fT={}));var pT;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(pT||(pT={}));function yw(e){let t=X.exports.useRef(xS(e)),r=py(),i=X.exports.useMemo(()=>zK(r.search,t.current),[r.search]),o=QC(),a=X.exports.useCallback((s,l)=>{const u=xS(typeof s=="function"?s(i):s);o("?"+u,l)},[o,i]);return[i,a]}const vw="/assets/icon.136020fa.svg",ZC="/assets/github-dark.aac0d47c.svg";function De(){return De=Object.assign?Object.assign.bind():function(e){for(var t=1;t{t[r]=_U(e[r])}),t}function Is(e,t,r={clone:!0}){const i=r.clone?De({},e):e;return cf(e)&&cf(t)&&Object.keys(t).forEach(o=>{o!=="__proto__"&&(cf(t[o])&&o in e&&cf(e[o])?i[o]=Is(e[o],t[o],r):r.clone?i[o]=cf(t[o])?_U(t[o]):t[o]:i[o]=t[o])}),i}var Co={exports:{}},WK="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",VK=WK,qK=VK;function SU(){}function CU(){}CU.resetWarningCache=SU;var KK=function(){function e(i,o,a,s,l,u){if(u!==qK){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}e.isRequired=e;function t(){return e}var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:CU,resetWarningCache:SU};return r.PropTypes=r,r};Co.exports=KK();function kd(e){let t="https://mui.com/production-error/?code="+e;for(let r=1;r{let i=e[r];return t.concat(Array.isArray(i)?i.map(o=>[r,o]):[[r,i]])},[]))}function zK(e,t){let r=xS(e);for(let i of t.keys())r.has(i)||t.getAll(i).forEach(o=>{r.append(i,o)});return r}function HK(e){let{basename:t,children:r,window:i}=e,o=X.exports.useRef();o.current==null&&(o.current=Vq({window:i,v5Compat:!0}));let a=o.current,[s,l]=X.exports.useState({action:a.action,location:a.location});return X.exports.useLayoutEffect(()=>a.listen(l),[a]),L($K,{basename:t,children:r,location:s.location,navigationType:s.action,navigator:a})}var fT;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmitImpl="useSubmitImpl",e.UseFetcher="useFetcher"})(fT||(fT={}));var pT;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(pT||(pT={}));function yw(e){let t=X.exports.useRef(xS(e)),r=py(),i=X.exports.useMemo(()=>zK(r.search,t.current),[r.search]),o=QC(),a=X.exports.useCallback((s,l)=>{const u=xS(typeof s=="function"?s(i):s);o("?"+u,l)},[o,i]);return[i,a]}const vw="/verifier/assets/icon.136020fa.svg",ZC="/verifier/assets/github-dark.aac0d47c.svg";function De(){return De=Object.assign?Object.assign.bind():function(e){for(var t=1;t{t[r]=_U(e[r])}),t}function Is(e,t,r={clone:!0}){const i=r.clone?De({},e):e;return cf(e)&&cf(t)&&Object.keys(t).forEach(o=>{o!=="__proto__"&&(cf(t[o])&&o in e&&cf(e[o])?i[o]=Is(e[o],t[o],r):r.clone?i[o]=cf(t[o])?_U(t[o]):t[o]:i[o]=t[o])}),i}var Co={exports:{}},WK="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",VK=WK,qK=VK;function SU(){}function CU(){}CU.resetWarningCache=SU;var KK=function(){function e(i,o,a,s,l,u){if(u!==qK){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}e.isRequired=e;function t(){return e}var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:CU,resetWarningCache:SU};return r.PropTypes=r,r};Co.exports=KK();function kd(e){let t="https://mui.com/production-error/?code="+e;for(let r=1;r{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))};function Zm(e,t){return t?Is(e,t,{clone:!1}):e}const c6={xs:0,sm:600,md:900,lg:1200,xl:1536},TT={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${c6[e]}px)`};function Os(e,t,r){const i=e.theme||{};if(Array.isArray(t)){const a=i.breakpoints||TT;return t.reduce((s,l,u)=>(s[a.up(a.keys[u])]=r(t[u]),s),{})}if(typeof t=="object"){const a=i.breakpoints||TT;return Object.keys(t).reduce((s,l)=>{if(Object.keys(a.values||c6).indexOf(l)!==-1){const u=a.up(l);s[u]=r(t[l],l)}else{const u=l;s[u]=t[u]}return s},{})}return r(t)}function KU(e={}){var t;return((t=e.keys)==null?void 0:t.reduce((i,o)=>{const a=e.up(o);return i[a]={},i},{}))||{}}function GU(e,t){return e.reduce((r,i)=>{const o=r[i];return(!o||Object.keys(o).length===0)&&delete r[i],r},t)}function pY(e,...t){const r=KU(e),i=[r,...t].reduce((o,a)=>Is(o,a),{});return GU(Object.keys(r),i)}function hY(e,t){if(typeof e!="object")return{};const r={},i=Object.keys(t);return Array.isArray(e)?i.forEach((o,a)=>{a{e[o]!=null&&(r[o]=!0)}),r}function Cf({values:e,breakpoints:t,base:r}){const i=r||hY(e,t),o=Object.keys(i);if(o.length===0)return e;let a;return o.reduce((s,l,u)=>(Array.isArray(e)?(s[l]=e[u]!=null?e[u]:e[a],a=u):typeof e=="object"?(s[l]=e[l]!=null?e[l]:e[a],a=l):s[l]=e,s),{})}function Mh(e,t,r=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&r){const i=`vars.${t}`.split(".").reduce((o,a)=>o&&o[a]?o[a]:null,e);if(i!=null)return i}return t.split(".").reduce((i,o)=>i&&i[o]!=null?i[o]:null,e)}function X1(e,t,r,i=r){let o;return typeof e=="function"?o=e(r):Array.isArray(e)?o=e[r]||i:o=Mh(e,r)||i,t&&(o=t(o,i,e)),o}function ho(e){const{prop:t,cssProperty:r=e.prop,themeKey:i,transform:o}=e,a=s=>{if(s[t]==null)return null;const l=s[t],u=s.theme,c=Mh(u,i)||{};return Os(s,l,p=>{let v=X1(c,o,p);return p===v&&typeof p=="string"&&(v=X1(c,o,`${t}${p==="default"?"":Qr(p)}`,p)),r===!1?v:{[r]:v}})};return a.propTypes={},a.filterProps=[t],a}function Vw(...e){const t=e.reduce((i,o)=>(o.filterProps.forEach(a=>{i[a]=o}),i),{}),r=i=>Object.keys(i).reduce((o,a)=>t[a]?Zm(o,t[a](i)):o,{});return r.propTypes={},r.filterProps=e.reduce((i,o)=>i.concat(o.filterProps),[]),r}function gY(e){const t={};return r=>(t[r]===void 0&&(t[r]=e(r)),t[r])}const mY={m:"margin",p:"padding"},yY={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},IT={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},vY=gY(e=>{if(e.length>2)if(IT[e])e=IT[e];else return[e];const[t,r]=e.split(""),i=mY[t],o=yY[r]||"";return Array.isArray(o)?o.map(a=>i+a):[i+o]}),d6=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],f6=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...d6,...f6];function gy(e,t,r,i){var o;const a=(o=Mh(e,t,!1))!=null?o:r;return typeof a=="number"?s=>typeof s=="string"?s:a*s:Array.isArray(a)?s=>typeof s=="string"?s:a[s]:typeof a=="function"?a:()=>{}}function p6(e){return gy(e,"spacing",8)}function og(e,t){if(typeof t=="string"||t==null)return t;const r=Math.abs(t),i=e(r);return t>=0?i:typeof i=="number"?-i:`-${i}`}function bY(e,t){return r=>e.reduce((i,o)=>(i[o]=og(t,r),i),{})}function wY(e,t,r,i){if(t.indexOf(r)===-1)return null;const o=vY(r),a=bY(o,i),s=e[r];return Os(e,s,a)}function YU(e,t){const r=p6(e.theme);return Object.keys(e).map(i=>wY(e,t,i,r)).reduce(Zm,{})}function ra(e){return YU(e,d6)}ra.propTypes={};ra.filterProps=d6;function na(e){return YU(e,f6)}na.propTypes={};na.filterProps=f6;function gu(e){return typeof e!="number"?e:`${e}px solid`}const xY=ho({prop:"border",themeKey:"borders",transform:gu}),_Y=ho({prop:"borderTop",themeKey:"borders",transform:gu}),SY=ho({prop:"borderRight",themeKey:"borders",transform:gu}),CY=ho({prop:"borderBottom",themeKey:"borders",transform:gu}),kY=ho({prop:"borderLeft",themeKey:"borders",transform:gu}),EY=ho({prop:"borderColor",themeKey:"palette"}),AY=ho({prop:"borderTopColor",themeKey:"palette"}),TY=ho({prop:"borderRightColor",themeKey:"palette"}),IY=ho({prop:"borderBottomColor",themeKey:"palette"}),RY=ho({prop:"borderLeftColor",themeKey:"palette"}),qw=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=gy(e.theme,"shape.borderRadius",4),r=i=>({borderRadius:og(t,i)});return Os(e,e.borderRadius,r)}return null};qw.propTypes={};qw.filterProps=["borderRadius"];Vw(xY,_Y,SY,CY,kY,EY,AY,TY,IY,RY,qw);const Kw=e=>{if(e.gap!==void 0&&e.gap!==null){const t=gy(e.theme,"spacing",8),r=i=>({gap:og(t,i)});return Os(e,e.gap,r)}return null};Kw.propTypes={};Kw.filterProps=["gap"];const Gw=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=gy(e.theme,"spacing",8),r=i=>({columnGap:og(t,i)});return Os(e,e.columnGap,r)}return null};Gw.propTypes={};Gw.filterProps=["columnGap"];const Yw=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=gy(e.theme,"spacing",8),r=i=>({rowGap:og(t,i)});return Os(e,e.rowGap,r)}return null};Yw.propTypes={};Yw.filterProps=["rowGap"];const PY=ho({prop:"gridColumn"}),MY=ho({prop:"gridRow"}),OY=ho({prop:"gridAutoFlow"}),BY=ho({prop:"gridAutoColumns"}),UY=ho({prop:"gridAutoRows"}),DY=ho({prop:"gridTemplateColumns"}),LY=ho({prop:"gridTemplateRows"}),NY=ho({prop:"gridTemplateAreas"}),jY=ho({prop:"gridArea"});Vw(Kw,Gw,Yw,PY,MY,OY,BY,UY,DY,LY,NY,jY);function vh(e,t){return t==="grey"?t:e}const $Y=ho({prop:"color",themeKey:"palette",transform:vh}),FY=ho({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:vh}),zY=ho({prop:"backgroundColor",themeKey:"palette",transform:vh});Vw($Y,FY,zY);function qs(e){return e<=1&&e!==0?`${e*100}%`:e}const HY=ho({prop:"width",transform:qs}),h6=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=r=>{var i,o,a;return{maxWidth:((i=e.theme)==null||(o=i.breakpoints)==null||(a=o.values)==null?void 0:a[r])||c6[r]||qs(r)}};return Os(e,e.maxWidth,t)}return null};h6.filterProps=["maxWidth"];const WY=ho({prop:"minWidth",transform:qs}),VY=ho({prop:"height",transform:qs}),qY=ho({prop:"maxHeight",transform:qs}),KY=ho({prop:"minHeight",transform:qs});ho({prop:"size",cssProperty:"width",transform:qs});ho({prop:"size",cssProperty:"height",transform:qs});const GY=ho({prop:"boxSizing"});Vw(HY,h6,WY,VY,qY,KY,GY);const YY={border:{themeKey:"borders",transform:gu},borderTop:{themeKey:"borders",transform:gu},borderRight:{themeKey:"borders",transform:gu},borderBottom:{themeKey:"borders",transform:gu},borderLeft:{themeKey:"borders",transform:gu},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:qw},color:{themeKey:"palette",transform:vh},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:vh},backgroundColor:{themeKey:"palette",transform:vh},p:{style:na},pt:{style:na},pr:{style:na},pb:{style:na},pl:{style:na},px:{style:na},py:{style:na},padding:{style:na},paddingTop:{style:na},paddingRight:{style:na},paddingBottom:{style:na},paddingLeft:{style:na},paddingX:{style:na},paddingY:{style:na},paddingInline:{style:na},paddingInlineStart:{style:na},paddingInlineEnd:{style:na},paddingBlock:{style:na},paddingBlockStart:{style:na},paddingBlockEnd:{style:na},m:{style:ra},mt:{style:ra},mr:{style:ra},mb:{style:ra},ml:{style:ra},mx:{style:ra},my:{style:ra},margin:{style:ra},marginTop:{style:ra},marginRight:{style:ra},marginBottom:{style:ra},marginLeft:{style:ra},marginX:{style:ra},marginY:{style:ra},marginInline:{style:ra},marginInlineStart:{style:ra},marginInlineEnd:{style:ra},marginBlock:{style:ra},marginBlockStart:{style:ra},marginBlockEnd:{style:ra},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:Kw},rowGap:{style:Yw},columnGap:{style:Gw},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:qs},maxWidth:{style:h6},minWidth:{transform:qs},height:{transform:qs},maxHeight:{transform:qs},minHeight:{transform:qs},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}},Qw=YY;function QY(...e){const t=e.reduce((i,o)=>i.concat(Object.keys(o)),[]),r=new Set(t);return e.every(i=>r.size===Object.keys(i).length)}function ZY(e,t){return typeof e=="function"?e(t):e}function XY(){function e(r,i,o,a){const s={[r]:i,theme:o},l=a[r];if(!l)return{[r]:i};const{cssProperty:u=r,themeKey:c,transform:d,style:p}=l;if(i==null)return null;const v=Mh(o,c)||{};return p?p(s):Os(s,i,b=>{let y=X1(v,d,b);return b===y&&typeof b=="string"&&(y=X1(v,d,`${r}${b==="default"?"":Qr(b)}`,b)),u===!1?y:{[u]:y}})}function t(r){var i;const{sx:o,theme:a={}}=r||{};if(!o)return null;const s=(i=a.unstable_sxConfig)!=null?i:Qw;function l(u){let c=u;if(typeof u=="function")c=u(a);else if(typeof u!="object")return u;if(!c)return null;const d=KU(a.breakpoints),p=Object.keys(d);let v=d;return Object.keys(c).forEach(x=>{const b=ZY(c[x],a);if(b!=null)if(typeof b=="object")if(s[x])v=Zm(v,e(x,b,a,s));else{const y=Os({theme:a},b,_=>({[x]:_}));QY(y,b)?v[x]=t({sx:b,theme:a}):v=Zm(v,y)}else v=Zm(v,e(x,b,a,s))}),GU(p,v)}return Array.isArray(o)?o.map(l):l(o)}return t}const QU=XY();QU.filterProps=["sx"];const Zw=QU,JY=["sx"],eQ=e=>{var t,r;const i={systemProps:{},otherProps:{}},o=(t=e==null||(r=e.theme)==null?void 0:r.unstable_sxConfig)!=null?t:Qw;return Object.keys(e).forEach(a=>{o[a]?i.systemProps[a]=e[a]:i.otherProps[a]=e[a]}),i};function Xw(e){const{sx:t}=e,r=bn(e,JY),{systemProps:i,otherProps:o}=eQ(r);let a;return Array.isArray(t)?a=[i,...t]:typeof t=="function"?a=(...s)=>{const l=t(...s);return cf(l)?De({},i,l):i}:a=De({},i,t),De({},o,{sx:a})}function ZU(e){var t,r,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t{const t=Object.keys(e).map(r=>({key:r,val:e[r]}))||[];return t.sort((r,i)=>r.val-i.val),t.reduce((r,i)=>De({},r,{[i.key]:i.val}),{})};function nQ(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:i=5}=e,o=bn(e,tQ),a=rQ(t),s=Object.keys(a);function l(v){return`@media (min-width:${typeof t[v]=="number"?t[v]:v}${r})`}function u(v){return`@media (max-width:${(typeof t[v]=="number"?t[v]:v)-i/100}${r})`}function c(v,x){const b=s.indexOf(x);return`@media (min-width:${typeof t[v]=="number"?t[v]:v}${r}) and (max-width:${(b!==-1&&typeof t[s[b]]=="number"?t[s[b]]:x)-i/100}${r})`}function d(v){return s.indexOf(v)+1(i.length===0?[1]:i).map(a=>{const s=t(a);return typeof s=="number"?`${s}px`:s}).join(" ");return r.mui=!0,r}const sQ=["breakpoints","palette","spacing","shape"];function g6(e={},...t){const{breakpoints:r={},palette:i={},spacing:o,shape:a={}}=e,s=bn(e,sQ),l=nQ(r),u=aQ(o);let c=Is({breakpoints:l,direction:"ltr",components:{},palette:De({mode:"light"},i),spacing:u,shape:De({},oQ,a)},s);return c=t.reduce((d,p)=>Is(d,p),c),c.unstable_sxConfig=De({},Qw,s?.unstable_sxConfig),c.unstable_sx=function(p){return Zw({sx:p,theme:this})},c}const lQ=X.exports.createContext(null),XU=lQ;function JU(){return X.exports.useContext(XU)}const uQ=typeof Symbol=="function"&&Symbol.for,cQ=uQ?Symbol.for("mui.nested"):"__THEME_NESTED__";function dQ(e,t){return typeof t=="function"?t(e):De({},e,t)}function fQ(e){const{children:t,theme:r}=e,i=JU(),o=X.exports.useMemo(()=>{const a=i===null?r:dQ(i,r);return a!=null&&(a[cQ]=i!==null),a},[r,i]);return L(XU.Provider,{value:o,children:t})}function pQ(e){return Object.keys(e).length===0}function m6(e=null){const t=JU();return!t||pQ(t)?e:t}const hQ=g6();function Jw(e=hQ){return m6(e)}const gQ=["className","component"];function e7(e={}){const{defaultTheme:t,defaultClassName:r="MuiBox-root",generateClassName:i}=e,o=qU("div",{shouldForwardProp:s=>s!=="theme"&&s!=="sx"&&s!=="as"})(Zw);return X.exports.forwardRef(function(l,u){const c=Jw(t),d=Xw(l),{className:p,component:v="div"}=d,x=bn(d,gQ);return L(o,De({as:v,ref:u,className:pn(p,i?i(r):r),theme:c},x))})}const mQ=e7(),da=mQ,yQ=["variant"];function RT(e){return e.length===0}function t7(e){const{variant:t}=e,r=bn(e,yQ);let i=t||"";return Object.keys(r).sort().forEach(o=>{o==="color"?i+=RT(i)?e[o]:Qr(e[o]):i+=`${RT(i)?o:Qr(o)}${Qr(e[o].toString())}`}),i}const vQ=["name","slot","skipVariantsResolver","skipSx","overridesResolver"],bQ=["theme"],wQ=["theme"];function Yg(e){return Object.keys(e).length===0}function xQ(e){return typeof e=="string"&&e.charCodeAt(0)>96}const _Q=(e,t)=>t.components&&t.components[e]&&t.components[e].styleOverrides?t.components[e].styleOverrides:null,SQ=(e,t)=>{let r=[];t&&t.components&&t.components[e]&&t.components[e].variants&&(r=t.components[e].variants);const i={};return r.forEach(o=>{const a=t7(o.props);i[a]=o.style}),i},CQ=(e,t,r,i)=>{var o,a;const{ownerState:s={}}=e,l=[],u=r==null||(o=r.components)==null||(a=o[i])==null?void 0:a.variants;return u&&u.forEach(c=>{let d=!0;Object.keys(c.props).forEach(p=>{s[p]!==c.props[p]&&e[p]!==c.props[p]&&(d=!1)}),d&&l.push(t[t7(c.props)])}),l};function Xm(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const kQ=g6();function r7(e={}){const{defaultTheme:t=kQ,rootShouldForwardProp:r=Xm,slotShouldForwardProp:i=Xm}=e,o=a=>{const s=Yg(a.theme)?t:a.theme;return Zw(De({},a,{theme:s}))};return o.__mui_systemSx=!0,(a,s={})=>{fY(a,B=>B.filter(U=>!(U!=null&&U.__mui_systemSx)));const{name:l,slot:u,skipVariantsResolver:c,skipSx:d,overridesResolver:p}=s,v=bn(s,vQ),x=c!==void 0?c:u&&u!=="Root"||!1,b=d||!1;let y,_=Xm;u==="Root"?_=r:u?_=i:xQ(a)&&(_=void 0);const k=qU(a,De({shouldForwardProp:_,label:y},v)),E=(B,...U)=>{const D=U?U.map(W=>typeof W=="function"&&W.__emotion_real!==W?G=>{let{theme:ae}=G,V=bn(G,bQ);return W(De({theme:Yg(ae)?t:ae},V))}:W):[];let j=B;l&&p&&D.push(W=>{const G=Yg(W.theme)?t:W.theme,ae=_Q(l,G);if(ae){const V={};return Object.entries(ae).forEach(([oe,P])=>{V[oe]=typeof P=="function"?P(De({},W,{theme:G})):P}),p(W,V)}return null}),l&&!x&&D.push(W=>{const G=Yg(W.theme)?t:W.theme;return CQ(W,SQ(l,G),G,l)}),b||D.push(o);const F=D.length-U.length;if(Array.isArray(B)&&F>0){const W=new Array(F).fill("");j=[...B,...W],j.raw=[...B.raw,...W]}else typeof B=="function"&&B.__emotion_real!==B&&(j=W=>{let{theme:G}=W,ae=bn(W,wQ);return B(De({theme:Yg(G)?t:G},ae))});return k(j,...D)};return k.withConfig&&(E.withConfig=k.withConfig),E}}const EQ=r7(),Xi=EQ;function n7(e){const{theme:t,name:r,props:i}=e;return!t||!t.components||!t.components[r]||!t.components[r].defaultProps?i:e6(t.components[r].defaultProps,i)}function AQ({props:e,name:t,defaultTheme:r}){const i=Jw(r);return n7({theme:i,name:t,props:e})}function y6(e,t=0,r=1){return Math.min(Math.max(t,e),r)}function TQ(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let r=e.match(t);return r&&r[0].length===1&&(r=r.map(i=>i+i)),r?`rgb${r.length===4?"a":""}(${r.map((i,o)=>o<3?parseInt(i,16):Math.round(parseInt(i,16)/255*1e3)/1e3).join(", ")})`:""}function Df(e){if(e.type)return e;if(e.charAt(0)==="#")return Df(TQ(e));const t=e.indexOf("("),r=e.substring(0,t);if(["rgb","rgba","hsl","hsla","color"].indexOf(r)===-1)throw new Error(kd(9,e));let i=e.substring(t+1,e.length-1),o;if(r==="color"){if(i=i.split(" "),o=i.shift(),i.length===4&&i[3].charAt(0)==="/"&&(i[3]=i[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(o)===-1)throw new Error(kd(10,o))}else i=i.split(",");return i=i.map(a=>parseFloat(a)),{type:r,values:i,colorSpace:o}}function e2(e){const{type:t,colorSpace:r}=e;let{values:i}=e;return t.indexOf("rgb")!==-1?i=i.map((o,a)=>a<3?parseInt(o,10):o):t.indexOf("hsl")!==-1&&(i[1]=`${i[1]}%`,i[2]=`${i[2]}%`),t.indexOf("color")!==-1?i=`${r} ${i.join(" ")}`:i=`${i.join(", ")}`,`${t}(${i})`}function IQ(e){e=Df(e);const{values:t}=e,r=t[0],i=t[1]/100,o=t[2]/100,a=i*Math.min(o,1-o),s=(c,d=(c+r/30)%12)=>o-a*Math.max(Math.min(d-3,9-d,1),-1);let l="rgb";const u=[Math.round(s(0)*255),Math.round(s(8)*255),Math.round(s(4)*255)];return e.type==="hsla"&&(l+="a",u.push(t[3])),e2({type:l,values:u})}function AS(e){e=Df(e);let t=e.type==="hsl"||e.type==="hsla"?Df(IQ(e)).values:e.values;return t=t.map(r=>(e.type!=="color"&&(r/=255),r<=.03928?r/12.92:((r+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function RQ(e,t){const r=AS(e),i=AS(t);return(Math.max(r,i)+.05)/(Math.min(r,i)+.05)}function Zi(e,t){return e=Df(e),t=y6(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,e2(e)}function Oh(e,t){if(e=Df(e),t=y6(t),e.type.indexOf("hsl")!==-1)e.values[2]*=1-t;else if(e.type.indexOf("rgb")!==-1||e.type.indexOf("color")!==-1)for(let r=0;r<3;r+=1)e.values[r]*=1-t;return e2(e)}function Bh(e,t){if(e=Df(e),t=y6(t),e.type.indexOf("hsl")!==-1)e.values[2]+=(100-e.values[2])*t;else if(e.type.indexOf("rgb")!==-1)for(let r=0;r<3;r+=1)e.values[r]+=(255-e.values[r])*t;else if(e.type.indexOf("color")!==-1)for(let r=0;r<3;r+=1)e.values[r]+=(1-e.values[r])*t;return e2(e)}function PQ(e,t=.15){return AS(e)>.5?Oh(e,t):Bh(e,t)}const MQ={};function OQ(e){const t=Jw();return L(u6.Provider,{value:typeof t=="object"?t:MQ,children:e.children})}function BQ(e){const{children:t,theme:r}=e;return L(fQ,{theme:r,children:L(OQ,{children:t})})}function UQ(e,t){return De({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},t)}const DQ={black:"#000",white:"#fff"},U0=DQ,LQ={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},NQ=LQ,jQ={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},Ip=jQ,$Q={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},Rp=$Q,FQ={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},Qg=FQ,zQ={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},Pp=zQ,HQ={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},Mp=HQ,WQ={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},Op=WQ,VQ=["mode","contrastThreshold","tonalOffset"],PT={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:U0.white,default:U0.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},W_={text:{primary:U0.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:U0.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function MT(e,t,r,i){const o=i.light||i,a=i.dark||i*1.5;e[t]||(e.hasOwnProperty(r)?e[t]=e[r]:t==="light"?e.light=Bh(e.main,o):t==="dark"&&(e.dark=Oh(e.main,a)))}function qQ(e="light"){return e==="dark"?{main:Pp[200],light:Pp[50],dark:Pp[400]}:{main:Pp[700],light:Pp[400],dark:Pp[800]}}function KQ(e="light"){return e==="dark"?{main:Ip[200],light:Ip[50],dark:Ip[400]}:{main:Ip[500],light:Ip[300],dark:Ip[700]}}function GQ(e="light"){return e==="dark"?{main:Rp[500],light:Rp[300],dark:Rp[700]}:{main:Rp[700],light:Rp[400],dark:Rp[800]}}function YQ(e="light"){return e==="dark"?{main:Mp[400],light:Mp[300],dark:Mp[700]}:{main:Mp[700],light:Mp[500],dark:Mp[900]}}function QQ(e="light"){return e==="dark"?{main:Op[400],light:Op[300],dark:Op[700]}:{main:Op[800],light:Op[500],dark:Op[900]}}function ZQ(e="light"){return e==="dark"?{main:Qg[400],light:Qg[300],dark:Qg[700]}:{main:"#ed6c02",light:Qg[500],dark:Qg[900]}}function XQ(e){const{mode:t="light",contrastThreshold:r=3,tonalOffset:i=.2}=e,o=bn(e,VQ),a=e.primary||qQ(t),s=e.secondary||KQ(t),l=e.error||GQ(t),u=e.info||YQ(t),c=e.success||QQ(t),d=e.warning||ZQ(t);function p(y){return RQ(y,W_.text.primary)>=r?W_.text.primary:PT.text.primary}const v=({color:y,name:_,mainShade:k=500,lightShade:E=300,darkShade:B=700})=>{if(y=De({},y),!y.main&&y[k]&&(y.main=y[k]),!y.hasOwnProperty("main"))throw new Error(kd(11,_?` (${_})`:"",k));if(typeof y.main!="string")throw new Error(kd(12,_?` (${_})`:"",JSON.stringify(y.main)));return MT(y,"light",E,i),MT(y,"dark",B,i),y.contrastText||(y.contrastText=p(y.main)),y},x={dark:W_,light:PT};return Is(De({common:De({},U0),mode:t,primary:v({color:a,name:"primary"}),secondary:v({color:s,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:v({color:l,name:"error"}),warning:v({color:d,name:"warning"}),info:v({color:u,name:"info"}),success:v({color:c,name:"success"}),grey:NQ,contrastThreshold:r,getContrastText:p,augmentColor:v,tonalOffset:i},x[t]),o)}const JQ=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function eZ(e){return Math.round(e*1e5)/1e5}const OT={textTransform:"uppercase"},BT='"Roboto", "Helvetica", "Arial", sans-serif';function tZ(e,t){const r=typeof t=="function"?t(e):t,{fontFamily:i=BT,fontSize:o=14,fontWeightLight:a=300,fontWeightRegular:s=400,fontWeightMedium:l=500,fontWeightBold:u=700,htmlFontSize:c=16,allVariants:d,pxToRem:p}=r,v=bn(r,JQ),x=o/14,b=p||(k=>`${k/c*x}rem`),y=(k,E,B,U,D)=>De({fontFamily:i,fontWeight:k,fontSize:b(E),lineHeight:B},i===BT?{letterSpacing:`${eZ(U/E)}em`}:{},D,d),_={h1:y(a,96,1.167,-1.5),h2:y(a,60,1.2,-.5),h3:y(s,48,1.167,0),h4:y(s,34,1.235,.25),h5:y(s,24,1.334,0),h6:y(l,20,1.6,.15),subtitle1:y(s,16,1.75,.15),subtitle2:y(l,14,1.57,.1),body1:y(s,16,1.5,.15),body2:y(s,14,1.43,.15),button:y(l,14,1.75,.4,OT),caption:y(s,12,1.66,.4),overline:y(s,12,2.66,1,OT)};return Is(De({htmlFontSize:c,pxToRem:b,fontFamily:i,fontSize:o,fontWeightLight:a,fontWeightRegular:s,fontWeightMedium:l,fontWeightBold:u},_),v,{clone:!1})}const rZ=.2,nZ=.14,iZ=.12;function zo(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${rZ})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${nZ})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${iZ})`].join(",")}const oZ=["none",zo(0,2,1,-1,0,1,1,0,0,1,3,0),zo(0,3,1,-2,0,2,2,0,0,1,5,0),zo(0,3,3,-2,0,3,4,0,0,1,8,0),zo(0,2,4,-1,0,4,5,0,0,1,10,0),zo(0,3,5,-1,0,5,8,0,0,1,14,0),zo(0,3,5,-1,0,6,10,0,0,1,18,0),zo(0,4,5,-2,0,7,10,1,0,2,16,1),zo(0,5,5,-3,0,8,10,1,0,3,14,2),zo(0,5,6,-3,0,9,12,1,0,3,16,2),zo(0,6,6,-3,0,10,14,1,0,4,18,3),zo(0,6,7,-4,0,11,15,1,0,4,20,3),zo(0,7,8,-4,0,12,17,2,0,5,22,4),zo(0,7,8,-4,0,13,19,2,0,5,24,4),zo(0,7,9,-4,0,14,21,2,0,5,26,4),zo(0,8,9,-5,0,15,22,2,0,6,28,5),zo(0,8,10,-5,0,16,24,2,0,6,30,5),zo(0,8,11,-5,0,17,26,2,0,6,32,5),zo(0,9,11,-5,0,18,28,2,0,7,34,6),zo(0,9,12,-6,0,19,29,2,0,7,36,6),zo(0,10,13,-6,0,20,31,3,0,8,38,7),zo(0,10,13,-6,0,21,33,3,0,8,40,7),zo(0,10,14,-6,0,22,35,3,0,8,42,7),zo(0,11,14,-7,0,23,36,3,0,9,44,8),zo(0,11,15,-7,0,24,38,3,0,9,46,8)],aZ=oZ,sZ=["duration","easing","delay"],lZ={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},i7={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function UT(e){return`${Math.round(e)}ms`}function uZ(e){if(!e)return 0;const t=e/36;return Math.round((4+15*t**.25+t/5)*10)}function cZ(e){const t=De({},lZ,e.easing),r=De({},i7,e.duration);return De({getAutoHeightDuration:uZ,create:(o=["all"],a={})=>{const{duration:s=r.standard,easing:l=t.easeInOut,delay:u=0}=a;return bn(a,sZ),(Array.isArray(o)?o:[o]).map(c=>`${c} ${typeof s=="string"?s:UT(s)} ${l} ${typeof u=="string"?u:UT(u)}`).join(",")}},e,{easing:t,duration:r})}const dZ={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},fZ=dZ,pZ=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function v6(e={},...t){const{mixins:r={},palette:i={},transitions:o={},typography:a={}}=e,s=bn(e,pZ);if(e.vars)throw new Error(kd(18));const l=XQ(i),u=g6(e);let c=Is(u,{mixins:UQ(u.breakpoints,r),palette:l,shadows:aZ.slice(),typography:tZ(l,a),transitions:cZ(o),zIndex:De({},fZ)});return c=Is(c,s),c=t.reduce((d,p)=>Is(d,p),c),c.unstable_sxConfig=De({},Qw,s?.unstable_sxConfig),c.unstable_sx=function(p){return Zw({sx:p,theme:this})},c}function hZ(e){return String(e).match(/[\d.\-+]*\s*(.*)/)[1]||""}function gZ(e){return parseFloat(e)}const mZ=v6(),t2=mZ;function la(){return Jw(t2)}function gi({props:e,name:t}){return AQ({props:e,name:t,defaultTheme:t2})}const tu=e=>Xm(e)&&e!=="classes",yZ=Xm,vZ=r7({defaultTheme:t2,rootShouldForwardProp:tu}),sr=vZ,bZ=e=>{let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,(t/100).toFixed(2)},DT=bZ,wZ="/assets/search.7f4d94b1.svg",b6="/assets/close.3e490fed.svg";function J1(e){return typeof e=="string"}function Um(e,t,r){return e===void 0||J1(e)?t:De({},t,{ownerState:De({},t.ownerState,r)})}function xZ(e,t=[]){if(e===void 0)return{};const r={};return Object.keys(e).filter(i=>i.match(/^on[A-Z]/)&&typeof e[i]=="function"&&!t.includes(i)).forEach(i=>{r[i]=e[i]}),r}function TS(e,t){return typeof e=="function"?e(t):e}function LT(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(r=>!(r.match(/^on[A-Z]/)&&typeof e[r]=="function")).forEach(r=>{t[r]=e[r]}),t}function _Z(e){const{getSlotProps:t,additionalProps:r,externalSlotProps:i,externalForwardedProps:o,className:a}=e;if(!t){const x=pn(o?.className,i?.className,a,r?.className),b=De({},r?.style,o?.style,i?.style),y=De({},r,o,i);return x.length>0&&(y.className=x),Object.keys(b).length>0&&(y.style=b),{props:y,internalRef:void 0}}const s=xZ(De({},o,i)),l=LT(i),u=LT(o),c=t(s),d=pn(c?.className,r?.className,a,o?.className,i?.className),p=De({},c?.style,r?.style,o?.style,i?.style),v=De({},c,r,u,l);return d.length>0&&(v.className=d),Object.keys(p).length>0&&(v.style=p),{props:v,internalRef:c.ref}}const SZ=["elementType","externalSlotProps","ownerState"];function IS(e){var t;const{elementType:r,externalSlotProps:i,ownerState:o}=e,a=bn(e,SZ),s=TS(i,o),{props:l,internalRef:u}=_Z(De({},a,{externalSlotProps:s})),c=Vo(u,s?.ref,(t=e.additionalProps)==null?void 0:t.ref);return Um(r,De({},l,{ref:c}),o)}function NT(e){return e.substring(2).toLowerCase()}function CZ(e,t){return t.documentElement.clientWidth(setTimeout(()=>{u.current=!0},0),()=>{u.current=!1}),[]);const d=Vo(t.ref,l),p=bl(b=>{const y=c.current;c.current=!1;const _=ya(l.current);if(!u.current||!l.current||"clientX"in b&&CZ(b,_))return;if(s.current){s.current=!1;return}let k;b.composedPath?k=b.composedPath().indexOf(l.current)>-1:k=!_.documentElement.contains(b.target)||l.current.contains(b.target),!k&&(r||!y)&&o(b)}),v=b=>y=>{c.current=!0;const _=t.props[b];_&&_(y)},x={ref:d};return a!==!1&&(x[a]=v(a)),X.exports.useEffect(()=>{if(a!==!1){const b=NT(a),y=ya(l.current),_=()=>{s.current=!0};return y.addEventListener(b,p),y.addEventListener("touchmove",_),()=>{y.removeEventListener(b,p),y.removeEventListener("touchmove",_)}}},[p,a]),i!==!1&&(x[i]=v(i)),X.exports.useEffect(()=>{if(i!==!1){const b=NT(i),y=ya(l.current);return y.addEventListener(b,p),()=>{y.removeEventListener(b,p)}}},[p,i]),L(X.exports.Fragment,{children:X.exports.cloneElement(t,x)})}const kZ=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function EZ(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?e.contentEditable==="true"||(e.nodeName==="AUDIO"||e.nodeName==="VIDEO"||e.nodeName==="DETAILS")&&e.getAttribute("tabindex")===null?0:e.tabIndex:t}function AZ(e){if(e.tagName!=="INPUT"||e.type!=="radio"||!e.name)return!1;const t=i=>e.ownerDocument.querySelector(`input[type="radio"]${i}`);let r=t(`[name="${e.name}"]:checked`);return r||(r=t(`[name="${e.name}"]`)),r!==e}function TZ(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||AZ(e))}function IZ(e){const t=[],r=[];return Array.from(e.querySelectorAll(kZ)).forEach((i,o)=>{const a=EZ(i);a===-1||!TZ(i)||(a===0?t.push(i):r.push({documentOrder:o,tabIndex:a,node:i}))}),r.sort((i,o)=>i.tabIndex===o.tabIndex?i.documentOrder-o.documentOrder:i.tabIndex-o.tabIndex).map(i=>i.node).concat(t)}function RZ(){return!0}function PZ(e){const{children:t,disableAutoFocus:r=!1,disableEnforceFocus:i=!1,disableRestoreFocus:o=!1,getTabbable:a=IZ,isEnabled:s=RZ,open:l}=e,u=X.exports.useRef(!1),c=X.exports.useRef(null),d=X.exports.useRef(null),p=X.exports.useRef(null),v=X.exports.useRef(null),x=X.exports.useRef(!1),b=X.exports.useRef(null),y=Vo(t.ref,b),_=X.exports.useRef(null);X.exports.useEffect(()=>{!l||!b.current||(x.current=!r)},[r,l]),X.exports.useEffect(()=>{if(!l||!b.current)return;const B=ya(b.current);return b.current.contains(B.activeElement)||(b.current.hasAttribute("tabIndex")||b.current.setAttribute("tabIndex","-1"),x.current&&b.current.focus()),()=>{o||(p.current&&p.current.focus&&(u.current=!0,p.current.focus()),p.current=null)}},[l]),X.exports.useEffect(()=>{if(!l||!b.current)return;const B=ya(b.current),U=F=>{const{current:H}=b;if(H!==null){if(!B.hasFocus()||i||!s()||u.current){u.current=!1;return}if(!H.contains(B.activeElement)){if(F&&v.current!==F.target||B.activeElement!==v.current)v.current=null;else if(v.current!==null)return;if(!x.current)return;let ae=[];if((B.activeElement===c.current||B.activeElement===d.current)&&(ae=a(b.current)),ae.length>0){var W,G;const V=Boolean(((W=_.current)==null?void 0:W.shiftKey)&&((G=_.current)==null?void 0:G.key)==="Tab"),oe=ae[0],P=ae[ae.length-1];typeof oe!="string"&&typeof P!="string"&&(V?P.focus():oe.focus())}else H.focus()}}},D=F=>{_.current=F,!(i||!s()||F.key!=="Tab")&&B.activeElement===b.current&&F.shiftKey&&(u.current=!0,d.current&&d.current.focus())};B.addEventListener("focusin",U),B.addEventListener("keydown",D,!0);const j=setInterval(()=>{B.activeElement&&B.activeElement.tagName==="BODY"&&U(null)},50);return()=>{clearInterval(j),B.removeEventListener("focusin",U),B.removeEventListener("keydown",D,!0)}},[r,i,o,s,l,a]);const k=B=>{p.current===null&&(p.current=B.relatedTarget),x.current=!0,v.current=B.target;const U=t.props.onFocus;U&&U(B)},E=B=>{p.current===null&&(p.current=B.relatedTarget),x.current=!0};return Ut(X.exports.Fragment,{children:[L("div",{tabIndex:l?0:-1,onFocus:E,ref:c,"data-testid":"sentinelStart"}),X.exports.cloneElement(t,{ref:y,onFocus:k}),L("div",{tabIndex:l?0:-1,onFocus:E,ref:d,"data-testid":"sentinelEnd"})]})}var Rs="top",Al="bottom",Tl="right",Ps="left",x6="auto",my=[Rs,Al,Tl,Ps],Uh="start",D0="end",MZ="clippingParents",o7="viewport",Zg="popper",OZ="reference",jT=my.reduce(function(e,t){return e.concat([t+"-"+Uh,t+"-"+D0])},[]),a7=[].concat(my,[x6]).reduce(function(e,t){return e.concat([t,t+"-"+Uh,t+"-"+D0])},[]),BZ="beforeRead",UZ="read",DZ="afterRead",LZ="beforeMain",NZ="main",jZ="afterMain",$Z="beforeWrite",FZ="write",zZ="afterWrite",HZ=[BZ,UZ,DZ,LZ,NZ,jZ,$Z,FZ,zZ];function Mu(e){return e?(e.nodeName||"").toLowerCase():null}function Rl(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Lf(e){var t=Rl(e).Element;return e instanceof t||e instanceof Element}function xl(e){var t=Rl(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function _6(e){if(typeof ShadowRoot>"u")return!1;var t=Rl(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function WZ(e){var t=e.state;Object.keys(t.elements).forEach(function(r){var i=t.styles[r]||{},o=t.attributes[r]||{},a=t.elements[r];!xl(a)||!Mu(a)||(Object.assign(a.style,i),Object.keys(o).forEach(function(s){var l=o[s];l===!1?a.removeAttribute(s):a.setAttribute(s,l===!0?"":l)}))})}function VZ(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach(function(i){var o=t.elements[i],a=t.attributes[i]||{},s=Object.keys(t.styles.hasOwnProperty(i)?t.styles[i]:r[i]),l=s.reduce(function(u,c){return u[c]="",u},{});!xl(o)||!Mu(o)||(Object.assign(o.style,l),Object.keys(a).forEach(function(u){o.removeAttribute(u)}))})}}const qZ={name:"applyStyles",enabled:!0,phase:"write",fn:WZ,effect:VZ,requires:["computeStyles"]};function Su(e){return e.split("-")[0]}var kf=Math.max,eb=Math.min,Dh=Math.round;function RS(){var e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function s7(){return!/^((?!chrome|android).)*safari/i.test(RS())}function Lh(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);var i=e.getBoundingClientRect(),o=1,a=1;t&&xl(e)&&(o=e.offsetWidth>0&&Dh(i.width)/e.offsetWidth||1,a=e.offsetHeight>0&&Dh(i.height)/e.offsetHeight||1);var s=Lf(e)?Rl(e):window,l=s.visualViewport,u=!s7()&&r,c=(i.left+(u&&l?l.offsetLeft:0))/o,d=(i.top+(u&&l?l.offsetTop:0))/a,p=i.width/o,v=i.height/a;return{width:p,height:v,top:d,right:c+p,bottom:d+v,left:c,x:c,y:d}}function S6(e){var t=Lh(e),r=e.offsetWidth,i=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-i)<=1&&(i=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:i}}function l7(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&_6(r)){var i=t;do{if(i&&e.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function wc(e){return Rl(e).getComputedStyle(e)}function KZ(e){return["table","td","th"].indexOf(Mu(e))>=0}function $d(e){return((Lf(e)?e.ownerDocument:e.document)||window.document).documentElement}function r2(e){return Mu(e)==="html"?e:e.assignedSlot||e.parentNode||(_6(e)?e.host:null)||$d(e)}function $T(e){return!xl(e)||wc(e).position==="fixed"?null:e.offsetParent}function GZ(e){var t=/firefox/i.test(RS()),r=/Trident/i.test(RS());if(r&&xl(e)){var i=wc(e);if(i.position==="fixed")return null}var o=r2(e);for(_6(o)&&(o=o.host);xl(o)&&["html","body"].indexOf(Mu(o))<0;){var a=wc(o);if(a.transform!=="none"||a.perspective!=="none"||a.contain==="paint"||["transform","perspective"].indexOf(a.willChange)!==-1||t&&a.willChange==="filter"||t&&a.filter&&a.filter!=="none")return o;o=o.parentNode}return null}function yy(e){for(var t=Rl(e),r=$T(e);r&&KZ(r)&&wc(r).position==="static";)r=$T(r);return r&&(Mu(r)==="html"||Mu(r)==="body"&&wc(r).position==="static")?t:r||GZ(e)||t}function C6(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Jm(e,t,r){return kf(e,eb(t,r))}function YZ(e,t,r){var i=Jm(e,t,r);return i>r?r:i}function u7(){return{top:0,right:0,bottom:0,left:0}}function c7(e){return Object.assign({},u7(),e)}function d7(e,t){return t.reduce(function(r,i){return r[i]=e,r},{})}var QZ=function(t,r){return t=typeof t=="function"?t(Object.assign({},r.rects,{placement:r.placement})):t,c7(typeof t!="number"?t:d7(t,my))};function ZZ(e){var t,r=e.state,i=e.name,o=e.options,a=r.elements.arrow,s=r.modifiersData.popperOffsets,l=Su(r.placement),u=C6(l),c=[Ps,Tl].indexOf(l)>=0,d=c?"height":"width";if(!(!a||!s)){var p=QZ(o.padding,r),v=S6(a),x=u==="y"?Rs:Ps,b=u==="y"?Al:Tl,y=r.rects.reference[d]+r.rects.reference[u]-s[u]-r.rects.popper[d],_=s[u]-r.rects.reference[u],k=yy(a),E=k?u==="y"?k.clientHeight||0:k.clientWidth||0:0,B=y/2-_/2,U=p[x],D=E-v[d]-p[b],j=E/2-v[d]/2+B,F=Jm(U,j,D),H=u;r.modifiersData[i]=(t={},t[H]=F,t.centerOffset=F-j,t)}}function XZ(e){var t=e.state,r=e.options,i=r.element,o=i===void 0?"[data-popper-arrow]":i;o!=null&&(typeof o=="string"&&(o=t.elements.popper.querySelector(o),!o)||!l7(t.elements.popper,o)||(t.elements.arrow=o))}const JZ={name:"arrow",enabled:!0,phase:"main",fn:ZZ,effect:XZ,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Nh(e){return e.split("-")[1]}var eX={top:"auto",right:"auto",bottom:"auto",left:"auto"};function tX(e){var t=e.x,r=e.y,i=window,o=i.devicePixelRatio||1;return{x:Dh(t*o)/o||0,y:Dh(r*o)/o||0}}function FT(e){var t,r=e.popper,i=e.popperRect,o=e.placement,a=e.variation,s=e.offsets,l=e.position,u=e.gpuAcceleration,c=e.adaptive,d=e.roundOffsets,p=e.isFixed,v=s.x,x=v===void 0?0:v,b=s.y,y=b===void 0?0:b,_=typeof d=="function"?d({x,y}):{x,y};x=_.x,y=_.y;var k=s.hasOwnProperty("x"),E=s.hasOwnProperty("y"),B=Ps,U=Rs,D=window;if(c){var j=yy(r),F="clientHeight",H="clientWidth";if(j===Rl(r)&&(j=$d(r),wc(j).position!=="static"&&l==="absolute"&&(F="scrollHeight",H="scrollWidth")),j=j,o===Rs||(o===Ps||o===Tl)&&a===D0){U=Al;var W=p&&j===D&&D.visualViewport?D.visualViewport.height:j[F];y-=W-i.height,y*=u?1:-1}if(o===Ps||(o===Rs||o===Al)&&a===D0){B=Tl;var G=p&&j===D&&D.visualViewport?D.visualViewport.width:j[H];x-=G-i.width,x*=u?1:-1}}var ae=Object.assign({position:l},c&&eX),V=d===!0?tX({x,y}):{x,y};if(x=V.x,y=V.y,u){var oe;return Object.assign({},ae,(oe={},oe[U]=E?"0":"",oe[B]=k?"0":"",oe.transform=(D.devicePixelRatio||1)<=1?"translate("+x+"px, "+y+"px)":"translate3d("+x+"px, "+y+"px, 0)",oe))}return Object.assign({},ae,(t={},t[U]=E?y+"px":"",t[B]=k?x+"px":"",t.transform="",t))}function rX(e){var t=e.state,r=e.options,i=r.gpuAcceleration,o=i===void 0?!0:i,a=r.adaptive,s=a===void 0?!0:a,l=r.roundOffsets,u=l===void 0?!0:l,c={placement:Su(t.placement),variation:Nh(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,FT(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:u})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,FT(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const nX={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:rX,data:{}};var wv={passive:!0};function iX(e){var t=e.state,r=e.instance,i=e.options,o=i.scroll,a=o===void 0?!0:o,s=i.resize,l=s===void 0?!0:s,u=Rl(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&c.forEach(function(d){d.addEventListener("scroll",r.update,wv)}),l&&u.addEventListener("resize",r.update,wv),function(){a&&c.forEach(function(d){d.removeEventListener("scroll",r.update,wv)}),l&&u.removeEventListener("resize",r.update,wv)}}const oX={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:iX,data:{}};var aX={left:"right",right:"left",bottom:"top",top:"bottom"};function c1(e){return e.replace(/left|right|bottom|top/g,function(t){return aX[t]})}var sX={start:"end",end:"start"};function zT(e){return e.replace(/start|end/g,function(t){return sX[t]})}function k6(e){var t=Rl(e),r=t.pageXOffset,i=t.pageYOffset;return{scrollLeft:r,scrollTop:i}}function E6(e){return Lh($d(e)).left+k6(e).scrollLeft}function lX(e,t){var r=Rl(e),i=$d(e),o=r.visualViewport,a=i.clientWidth,s=i.clientHeight,l=0,u=0;if(o){a=o.width,s=o.height;var c=s7();(c||!c&&t==="fixed")&&(l=o.offsetLeft,u=o.offsetTop)}return{width:a,height:s,x:l+E6(e),y:u}}function uX(e){var t,r=$d(e),i=k6(e),o=(t=e.ownerDocument)==null?void 0:t.body,a=kf(r.scrollWidth,r.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=kf(r.scrollHeight,r.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),l=-i.scrollLeft+E6(e),u=-i.scrollTop;return wc(o||r).direction==="rtl"&&(l+=kf(r.clientWidth,o?o.clientWidth:0)-a),{width:a,height:s,x:l,y:u}}function A6(e){var t=wc(e),r=t.overflow,i=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+o+i)}function f7(e){return["html","body","#document"].indexOf(Mu(e))>=0?e.ownerDocument.body:xl(e)&&A6(e)?e:f7(r2(e))}function e0(e,t){var r;t===void 0&&(t=[]);var i=f7(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),a=Rl(i),s=o?[a].concat(a.visualViewport||[],A6(i)?i:[]):i,l=t.concat(s);return o?l:l.concat(e0(r2(s)))}function PS(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function cX(e,t){var r=Lh(e,!1,t==="fixed");return r.top=r.top+e.clientTop,r.left=r.left+e.clientLeft,r.bottom=r.top+e.clientHeight,r.right=r.left+e.clientWidth,r.width=e.clientWidth,r.height=e.clientHeight,r.x=r.left,r.y=r.top,r}function HT(e,t,r){return t===o7?PS(lX(e,r)):Lf(t)?cX(t,r):PS(uX($d(e)))}function dX(e){var t=e0(r2(e)),r=["absolute","fixed"].indexOf(wc(e).position)>=0,i=r&&xl(e)?yy(e):e;return Lf(i)?t.filter(function(o){return Lf(o)&&l7(o,i)&&Mu(o)!=="body"}):[]}function fX(e,t,r,i){var o=t==="clippingParents"?dX(e):[].concat(t),a=[].concat(o,[r]),s=a[0],l=a.reduce(function(u,c){var d=HT(e,c,i);return u.top=kf(d.top,u.top),u.right=eb(d.right,u.right),u.bottom=eb(d.bottom,u.bottom),u.left=kf(d.left,u.left),u},HT(e,s,i));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function p7(e){var t=e.reference,r=e.element,i=e.placement,o=i?Su(i):null,a=i?Nh(i):null,s=t.x+t.width/2-r.width/2,l=t.y+t.height/2-r.height/2,u;switch(o){case Rs:u={x:s,y:t.y-r.height};break;case Al:u={x:s,y:t.y+t.height};break;case Tl:u={x:t.x+t.width,y:l};break;case Ps:u={x:t.x-r.width,y:l};break;default:u={x:t.x,y:t.y}}var c=o?C6(o):null;if(c!=null){var d=c==="y"?"height":"width";switch(a){case Uh:u[c]=u[c]-(t[d]/2-r[d]/2);break;case D0:u[c]=u[c]+(t[d]/2-r[d]/2);break}}return u}function L0(e,t){t===void 0&&(t={});var r=t,i=r.placement,o=i===void 0?e.placement:i,a=r.strategy,s=a===void 0?e.strategy:a,l=r.boundary,u=l===void 0?MZ:l,c=r.rootBoundary,d=c===void 0?o7:c,p=r.elementContext,v=p===void 0?Zg:p,x=r.altBoundary,b=x===void 0?!1:x,y=r.padding,_=y===void 0?0:y,k=c7(typeof _!="number"?_:d7(_,my)),E=v===Zg?OZ:Zg,B=e.rects.popper,U=e.elements[b?E:v],D=fX(Lf(U)?U:U.contextElement||$d(e.elements.popper),u,d,s),j=Lh(e.elements.reference),F=p7({reference:j,element:B,strategy:"absolute",placement:o}),H=PS(Object.assign({},B,F)),W=v===Zg?H:j,G={top:D.top-W.top+k.top,bottom:W.bottom-D.bottom+k.bottom,left:D.left-W.left+k.left,right:W.right-D.right+k.right},ae=e.modifiersData.offset;if(v===Zg&&ae){var V=ae[o];Object.keys(G).forEach(function(oe){var P=[Tl,Al].indexOf(oe)>=0?1:-1,ee=[Rs,Al].indexOf(oe)>=0?"y":"x";G[oe]+=V[ee]*P})}return G}function pX(e,t){t===void 0&&(t={});var r=t,i=r.placement,o=r.boundary,a=r.rootBoundary,s=r.padding,l=r.flipVariations,u=r.allowedAutoPlacements,c=u===void 0?a7:u,d=Nh(i),p=d?l?jT:jT.filter(function(b){return Nh(b)===d}):my,v=p.filter(function(b){return c.indexOf(b)>=0});v.length===0&&(v=p);var x=v.reduce(function(b,y){return b[y]=L0(e,{placement:y,boundary:o,rootBoundary:a,padding:s})[Su(y)],b},{});return Object.keys(x).sort(function(b,y){return x[b]-x[y]})}function hX(e){if(Su(e)===x6)return[];var t=c1(e);return[zT(e),t,zT(t)]}function gX(e){var t=e.state,r=e.options,i=e.name;if(!t.modifiersData[i]._skip){for(var o=r.mainAxis,a=o===void 0?!0:o,s=r.altAxis,l=s===void 0?!0:s,u=r.fallbackPlacements,c=r.padding,d=r.boundary,p=r.rootBoundary,v=r.altBoundary,x=r.flipVariations,b=x===void 0?!0:x,y=r.allowedAutoPlacements,_=t.options.placement,k=Su(_),E=k===_,B=u||(E||!b?[c1(_)]:hX(_)),U=[_].concat(B).reduce(function(Bt,Rt){return Bt.concat(Su(Rt)===x6?pX(t,{placement:Rt,boundary:d,rootBoundary:p,padding:c,flipVariations:b,allowedAutoPlacements:y}):Rt)},[]),D=t.rects.reference,j=t.rects.popper,F=new Map,H=!0,W=U[0],G=0;G=0,ee=P?"width":"height",le=L0(t,{placement:ae,boundary:d,rootBoundary:p,altBoundary:v,padding:c}),pe=P?oe?Tl:Ps:oe?Al:Rs;D[ee]>j[ee]&&(pe=c1(pe));var _e=c1(pe),J=[];if(a&&J.push(le[V]<=0),l&&J.push(le[pe]<=0,le[_e]<=0),J.every(function(Bt){return Bt})){W=ae,H=!1;break}F.set(ae,J)}if(H)for(var ft=b?3:1,Le=function(Rt){var Jt=U.find(function(vr){var At=F.get(vr);if(At)return At.slice(0,Rt).every(function(kt){return kt})});if(Jt)return W=Jt,"break"},He=ft;He>0;He--){var nr=Le(He);if(nr==="break")break}t.placement!==W&&(t.modifiersData[i]._skip=!0,t.placement=W,t.reset=!0)}}const mX={name:"flip",enabled:!0,phase:"main",fn:gX,requiresIfExists:["offset"],data:{_skip:!1}};function WT(e,t,r){return r===void 0&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function VT(e){return[Rs,Tl,Al,Ps].some(function(t){return e[t]>=0})}function yX(e){var t=e.state,r=e.name,i=t.rects.reference,o=t.rects.popper,a=t.modifiersData.preventOverflow,s=L0(t,{elementContext:"reference"}),l=L0(t,{altBoundary:!0}),u=WT(s,i),c=WT(l,o,a),d=VT(u),p=VT(c);t.modifiersData[r]={referenceClippingOffsets:u,popperEscapeOffsets:c,isReferenceHidden:d,hasPopperEscaped:p},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":p})}const vX={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:yX};function bX(e,t,r){var i=Su(e),o=[Ps,Rs].indexOf(i)>=0?-1:1,a=typeof r=="function"?r(Object.assign({},t,{placement:e})):r,s=a[0],l=a[1];return s=s||0,l=(l||0)*o,[Ps,Tl].indexOf(i)>=0?{x:l,y:s}:{x:s,y:l}}function wX(e){var t=e.state,r=e.options,i=e.name,o=r.offset,a=o===void 0?[0,0]:o,s=a7.reduce(function(d,p){return d[p]=bX(p,t.rects,a),d},{}),l=s[t.placement],u=l.x,c=l.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=u,t.modifiersData.popperOffsets.y+=c),t.modifiersData[i]=s}const xX={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:wX};function _X(e){var t=e.state,r=e.name;t.modifiersData[r]=p7({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const SX={name:"popperOffsets",enabled:!0,phase:"read",fn:_X,data:{}};function CX(e){return e==="x"?"y":"x"}function kX(e){var t=e.state,r=e.options,i=e.name,o=r.mainAxis,a=o===void 0?!0:o,s=r.altAxis,l=s===void 0?!1:s,u=r.boundary,c=r.rootBoundary,d=r.altBoundary,p=r.padding,v=r.tether,x=v===void 0?!0:v,b=r.tetherOffset,y=b===void 0?0:b,_=L0(t,{boundary:u,rootBoundary:c,padding:p,altBoundary:d}),k=Su(t.placement),E=Nh(t.placement),B=!E,U=C6(k),D=CX(U),j=t.modifiersData.popperOffsets,F=t.rects.reference,H=t.rects.popper,W=typeof y=="function"?y(Object.assign({},t.rects,{placement:t.placement})):y,G=typeof W=="number"?{mainAxis:W,altAxis:W}:Object.assign({mainAxis:0,altAxis:0},W),ae=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,V={x:0,y:0};if(!!j){if(a){var oe,P=U==="y"?Rs:Ps,ee=U==="y"?Al:Tl,le=U==="y"?"height":"width",pe=j[U],_e=pe+_[P],J=pe-_[ee],ft=x?-H[le]/2:0,Le=E===Uh?F[le]:H[le],He=E===Uh?-H[le]:-F[le],nr=t.elements.arrow,Bt=x&&nr?S6(nr):{width:0,height:0},Rt=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:u7(),Jt=Rt[P],vr=Rt[ee],At=Jm(0,F[le],Bt[le]),kt=B?F[le]/2-ft-At-Jt-G.mainAxis:Le-At-Jt-G.mainAxis,Ct=B?-F[le]/2+ft+At+vr+G.mainAxis:He+At+vr+G.mainAxis,Lt=t.elements.arrow&&yy(t.elements.arrow),Kt=Lt?U==="y"?Lt.clientTop||0:Lt.clientLeft||0:0,yr=(oe=ae?.[U])!=null?oe:0,ne=pe+kt-yr-Kt,Mt=pe+Ct-yr,Nt=Jm(x?eb(_e,ne):_e,pe,x?kf(J,Mt):J);j[U]=Nt,V[U]=Nt-pe}if(l){var Ie,Ae=U==="x"?Rs:Ps,fe=U==="x"?Al:Tl,Be=j[D],rt=D==="y"?"height":"width",lt=Be+_[Ae],jt=Be-_[fe],ce=[Rs,Ps].indexOf(k)!==-1,ie=(Ie=ae?.[D])!=null?Ie:0,de=ce?lt:Be-F[rt]-H[rt]-ie+G.altAxis,$=ce?Be+F[rt]+H[rt]-ie-G.altAxis:jt,C=x&&ce?YZ(de,Be,$):Jm(x?de:lt,Be,x?$:jt);j[D]=C,V[D]=C-Be}t.modifiersData[i]=V}}const EX={name:"preventOverflow",enabled:!0,phase:"main",fn:kX,requiresIfExists:["offset"]};function AX(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function TX(e){return e===Rl(e)||!xl(e)?k6(e):AX(e)}function IX(e){var t=e.getBoundingClientRect(),r=Dh(t.width)/e.offsetWidth||1,i=Dh(t.height)/e.offsetHeight||1;return r!==1||i!==1}function RX(e,t,r){r===void 0&&(r=!1);var i=xl(t),o=xl(t)&&IX(t),a=$d(t),s=Lh(e,o,r),l={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(i||!i&&!r)&&((Mu(t)!=="body"||A6(a))&&(l=TX(t)),xl(t)?(u=Lh(t,!0),u.x+=t.clientLeft,u.y+=t.clientTop):a&&(u.x=E6(a))),{x:s.left+l.scrollLeft-u.x,y:s.top+l.scrollTop-u.y,width:s.width,height:s.height}}function PX(e){var t=new Map,r=new Set,i=[];e.forEach(function(a){t.set(a.name,a)});function o(a){r.add(a.name);var s=[].concat(a.requires||[],a.requiresIfExists||[]);s.forEach(function(l){if(!r.has(l)){var u=t.get(l);u&&o(u)}}),i.push(a)}return e.forEach(function(a){r.has(a.name)||o(a)}),i}function MX(e){var t=PX(e);return HZ.reduce(function(r,i){return r.concat(t.filter(function(o){return o.phase===i}))},[])}function OX(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function BX(e){var t=e.reduce(function(r,i){var o=r[i.name];return r[i.name]=o?Object.assign({},o,i,{options:Object.assign({},o.options,i.options),data:Object.assign({},o.data,i.data)}):i,r},{});return Object.keys(t).map(function(r){return t[r]})}var qT={placement:"bottom",modifiers:[],strategy:"absolute"};function KT(){for(var e=arguments.length,t=new Array(e),r=0;r{a||l(NX(o)||document.body)},[o,a]),Yl(()=>{if(s&&!a)return Q1(r,s),()=>{Q1(r,null)}},[r,s,a]),a){if(X.exports.isValidElement(i)){const c={ref:u};return X.exports.cloneElement(i,c)}return L(X.exports.Fragment,{children:i})}return L(X.exports.Fragment,{children:s&&ml.exports.createPortal(i,s)})}),h7=jX;function $X(e){return di("MuiPopperUnstyled",e)}ri("MuiPopperUnstyled",["root"]);const FX=["anchorEl","children","component","direction","disablePortal","modifiers","open","ownerState","placement","popperOptions","popperRef","slotProps","slots","TransitionProps"],zX=["anchorEl","children","container","direction","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","style","transition","slotProps","slots"];function HX(e,t){if(t==="ltr")return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}function MS(e){return typeof e=="function"?e():e}function WX(e){return e.nodeType!==void 0}const VX=()=>hi({root:["root"]},$X,{}),qX={},KX=X.exports.forwardRef(function(t,r){var i;const{anchorEl:o,children:a,component:s,direction:l,disablePortal:u,modifiers:c,open:d,ownerState:p,placement:v,popperOptions:x,popperRef:b,slotProps:y={},slots:_={},TransitionProps:k}=t,E=bn(t,FX),B=X.exports.useRef(null),U=Vo(B,r),D=X.exports.useRef(null),j=Vo(D,b),F=X.exports.useRef(j);Yl(()=>{F.current=j},[j]),X.exports.useImperativeHandle(b,()=>D.current,[]);const H=HX(v,l),[W,G]=X.exports.useState(H),[ae,V]=X.exports.useState(MS(o));X.exports.useEffect(()=>{D.current&&D.current.forceUpdate()}),X.exports.useEffect(()=>{o&&V(MS(o))},[o]),Yl(()=>{if(!ae||!d)return;const pe=ft=>{G(ft.placement)};let _e=[{name:"preventOverflow",options:{altBoundary:u}},{name:"flip",options:{altBoundary:u}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:ft})=>{pe(ft)}}];c!=null&&(_e=_e.concat(c)),x&&x.modifiers!=null&&(_e=_e.concat(x.modifiers));const J=LX(ae,B.current,De({placement:H},x,{modifiers:_e}));return F.current(J),()=>{J.destroy(),F.current(null)}},[ae,u,c,d,x,H]);const oe={placement:W};k!==null&&(oe.TransitionProps=k);const P=VX(),ee=(i=s??_.root)!=null?i:"div",le=IS({elementType:ee,externalSlotProps:y.root,externalForwardedProps:E,additionalProps:{role:"tooltip",ref:U},ownerState:De({},t,p),className:P.root});return L(ee,De({},le,{children:typeof a=="function"?a(oe):a}))}),GX=X.exports.forwardRef(function(t,r){const{anchorEl:i,children:o,container:a,direction:s="ltr",disablePortal:l=!1,keepMounted:u=!1,modifiers:c,open:d,placement:p="bottom",popperOptions:v=qX,popperRef:x,style:b,transition:y=!1,slotProps:_={},slots:k={}}=t,E=bn(t,zX),[B,U]=X.exports.useState(!0),D=()=>{U(!1)},j=()=>{U(!0)};if(!u&&!d&&(!y||B))return null;let F;if(a)F=a;else if(i){const G=MS(i);F=G&&WX(G)?ya(G).body:ya(null).body}const H=!d&&u&&(!y||B)?"none":void 0,W=y?{in:d,onEnter:D,onExited:j}:void 0;return L(h7,{disablePortal:l,container:F,children:L(KX,De({anchorEl:i,direction:s,disablePortal:l,modifiers:c,ref:r,open:y?!B:d,placement:p,popperOptions:v,popperRef:x,slotProps:_,slots:k},E,{style:De({position:"fixed",top:0,left:0,display:H},b),TransitionProps:W,children:o}))})}),YX=GX;function QX(e){const t=ya(e);return t.body===e?El(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function t0(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function GT(e){return parseInt(El(e).getComputedStyle(e).paddingRight,10)||0}function ZX(e){const r=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName)!==-1,i=e.tagName==="INPUT"&&e.getAttribute("type")==="hidden";return r||i}function YT(e,t,r,i,o){const a=[t,r,...i];[].forEach.call(e.children,s=>{const l=a.indexOf(s)===-1,u=!ZX(s);l&&u&&t0(s,o)})}function V_(e,t){let r=-1;return e.some((i,o)=>t(i)?(r=o,!0):!1),r}function XX(e,t){const r=[],i=e.container;if(!t.disableScrollLock){if(QX(i)){const s=EU(ya(i));r.push({value:i.style.paddingRight,property:"padding-right",el:i}),i.style.paddingRight=`${GT(i)+s}px`;const l=ya(i).querySelectorAll(".mui-fixed");[].forEach.call(l,u=>{r.push({value:u.style.paddingRight,property:"padding-right",el:u}),u.style.paddingRight=`${GT(u)+s}px`})}let a;if(i.parentNode instanceof DocumentFragment)a=ya(i).body;else{const s=i.parentElement,l=El(i);a=s?.nodeName==="HTML"&&l.getComputedStyle(s).overflowY==="scroll"?s:i}r.push({value:a.style.overflow,property:"overflow",el:a},{value:a.style.overflowX,property:"overflow-x",el:a},{value:a.style.overflowY,property:"overflow-y",el:a}),a.style.overflow="hidden"}return()=>{r.forEach(({value:a,el:s,property:l})=>{a?s.style.setProperty(l,a):s.style.removeProperty(l)})}}function JX(e){const t=[];return[].forEach.call(e.children,r=>{r.getAttribute("aria-hidden")==="true"&&t.push(r)}),t}class eJ{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(t,r){let i=this.modals.indexOf(t);if(i!==-1)return i;i=this.modals.length,this.modals.push(t),t.modalRef&&t0(t.modalRef,!1);const o=JX(r);YT(r,t.mount,t.modalRef,o,!0);const a=V_(this.containers,s=>s.container===r);return a!==-1?(this.containers[a].modals.push(t),i):(this.containers.push({modals:[t],container:r,restore:null,hiddenSiblings:o}),i)}mount(t,r){const i=V_(this.containers,a=>a.modals.indexOf(t)!==-1),o=this.containers[i];o.restore||(o.restore=XX(o,r))}remove(t,r=!0){const i=this.modals.indexOf(t);if(i===-1)return i;const o=V_(this.containers,s=>s.modals.indexOf(t)!==-1),a=this.containers[o];if(a.modals.splice(a.modals.indexOf(t),1),this.modals.splice(i,1),a.modals.length===0)a.restore&&a.restore(),t.modalRef&&t0(t.modalRef,r),YT(a.container,t.mount,t.modalRef,a.hiddenSiblings,!1),this.containers.splice(o,1);else{const s=a.modals[a.modals.length-1];s.modalRef&&t0(s.modalRef,!1)}return i}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}function tJ(e){return di("MuiModal",e)}ri("MuiModal",["root","hidden"]);const rJ=["children","classes","closeAfterTransition","component","container","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","manager","onBackdropClick","onClose","onKeyDown","open","onTransitionEnter","onTransitionExited","slotProps","slots"],nJ=e=>{const{open:t,exited:r,classes:i}=e;return hi({root:["root",!t&&r&&"hidden"],backdrop:["backdrop"]},tJ,i)};function iJ(e){return typeof e=="function"?e():e}function oJ(e){return e?e.props.hasOwnProperty("in"):!1}const aJ=new eJ,sJ=X.exports.forwardRef(function(t,r){var i,o;const{children:a,classes:s,closeAfterTransition:l=!1,component:u,container:c,disableAutoFocus:d=!1,disableEnforceFocus:p=!1,disableEscapeKeyDown:v=!1,disablePortal:x=!1,disableRestoreFocus:b=!1,disableScrollLock:y=!1,hideBackdrop:_=!1,keepMounted:k=!1,manager:E=aJ,onBackdropClick:B,onClose:U,onKeyDown:D,open:j,onTransitionEnter:F,onTransitionExited:H,slotProps:W={},slots:G={}}=t,ae=bn(t,rJ),[V,oe]=X.exports.useState(!j),P=X.exports.useRef({}),ee=X.exports.useRef(null),le=X.exports.useRef(null),pe=Vo(le,r),_e=oJ(a),J=(i=t["aria-hidden"])!=null?i:!0,ft=()=>ya(ee.current),Le=()=>(P.current.modalRef=le.current,P.current.mountNode=ee.current,P.current),He=()=>{E.mount(Le(),{disableScrollLock:y}),le.current&&(le.current.scrollTop=0)},nr=bl(()=>{const Ae=iJ(c)||ft().body;E.add(Le(),Ae),le.current&&He()}),Bt=X.exports.useCallback(()=>E.isTopModal(Le()),[E]),Rt=bl(Ae=>{ee.current=Ae,!(!Ae||!le.current)&&(j&&Bt()?He():t0(le.current,J))}),Jt=X.exports.useCallback(()=>{E.remove(Le(),J)},[E,J]);X.exports.useEffect(()=>()=>{Jt()},[Jt]),X.exports.useEffect(()=>{j?nr():(!_e||!l)&&Jt()},[j,Jt,_e,l,nr]);const vr=De({},t,{classes:s,closeAfterTransition:l,disableAutoFocus:d,disableEnforceFocus:p,disableEscapeKeyDown:v,disablePortal:x,disableRestoreFocus:b,disableScrollLock:y,exited:V,hideBackdrop:_,keepMounted:k}),At=nJ(vr),kt=()=>{oe(!1),F&&F()},Ct=()=>{oe(!0),H&&H(),l&&Jt()},Lt=Ae=>{Ae.target===Ae.currentTarget&&(B&&B(Ae),U&&U(Ae,"backdropClick"))},Kt=Ae=>{D&&D(Ae),!(Ae.key!=="Escape"||!Bt())&&(v||(Ae.stopPropagation(),U&&U(Ae,"escapeKeyDown")))},yr={};a.props.tabIndex===void 0&&(yr.tabIndex="-1"),_e&&(yr.onEnter=_S(kt,a.props.onEnter),yr.onExited=_S(Ct,a.props.onExited));const ne=(o=u??G.root)!=null?o:"div",Mt=IS({elementType:ne,externalSlotProps:W.root,externalForwardedProps:ae,additionalProps:{ref:pe,role:"presentation",onKeyDown:Kt},className:At.root,ownerState:vr}),Nt=G.backdrop,Ie=IS({elementType:Nt,externalSlotProps:W.backdrop,additionalProps:{"aria-hidden":!0,onClick:Lt,open:j},className:At.backdrop,ownerState:vr});return!k&&!j&&(!_e||V)?null:L(h7,{ref:Rt,container:c,disablePortal:x,children:Ut(ne,De({},Mt,{children:[!_&&Nt?L(Nt,De({},Ie)):null,L(PZ,{disableEnforceFocus:p,disableAutoFocus:d,disableRestoreFocus:b,isEnabled:Bt,open:j,children:X.exports.cloneElement(a,yr)})]}))})}),lJ=sJ,uJ=["onChange","maxRows","minRows","style","value"];function xv(e,t){return parseInt(e[t],10)||0}const cJ={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function QT(e){return e==null||Object.keys(e).length===0}const dJ=X.exports.forwardRef(function(t,r){const{onChange:i,maxRows:o,minRows:a=1,style:s,value:l}=t,u=bn(t,uJ),{current:c}=X.exports.useRef(l!=null),d=X.exports.useRef(null),p=Vo(r,d),v=X.exports.useRef(null),x=X.exports.useRef(0),[b,y]=X.exports.useState({}),_=X.exports.useCallback(()=>{const D=d.current,F=El(D).getComputedStyle(D);if(F.width==="0px")return{};const H=v.current;H.style.width=F.width,H.value=D.value||t.placeholder||"x",H.value.slice(-1)===` + */function qU(e,t){return uY(e,t)}const fY=(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))};function Zm(e,t){return t?Is(e,t,{clone:!1}):e}const c6={xs:0,sm:600,md:900,lg:1200,xl:1536},TT={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${c6[e]}px)`};function Os(e,t,r){const i=e.theme||{};if(Array.isArray(t)){const a=i.breakpoints||TT;return t.reduce((s,l,u)=>(s[a.up(a.keys[u])]=r(t[u]),s),{})}if(typeof t=="object"){const a=i.breakpoints||TT;return Object.keys(t).reduce((s,l)=>{if(Object.keys(a.values||c6).indexOf(l)!==-1){const u=a.up(l);s[u]=r(t[l],l)}else{const u=l;s[u]=t[u]}return s},{})}return r(t)}function KU(e={}){var t;return((t=e.keys)==null?void 0:t.reduce((i,o)=>{const a=e.up(o);return i[a]={},i},{}))||{}}function GU(e,t){return e.reduce((r,i)=>{const o=r[i];return(!o||Object.keys(o).length===0)&&delete r[i],r},t)}function pY(e,...t){const r=KU(e),i=[r,...t].reduce((o,a)=>Is(o,a),{});return GU(Object.keys(r),i)}function hY(e,t){if(typeof e!="object")return{};const r={},i=Object.keys(t);return Array.isArray(e)?i.forEach((o,a)=>{a{e[o]!=null&&(r[o]=!0)}),r}function Cf({values:e,breakpoints:t,base:r}){const i=r||hY(e,t),o=Object.keys(i);if(o.length===0)return e;let a;return o.reduce((s,l,u)=>(Array.isArray(e)?(s[l]=e[u]!=null?e[u]:e[a],a=u):typeof e=="object"?(s[l]=e[l]!=null?e[l]:e[a],a=l):s[l]=e,s),{})}function Mh(e,t,r=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&r){const i=`vars.${t}`.split(".").reduce((o,a)=>o&&o[a]?o[a]:null,e);if(i!=null)return i}return t.split(".").reduce((i,o)=>i&&i[o]!=null?i[o]:null,e)}function X1(e,t,r,i=r){let o;return typeof e=="function"?o=e(r):Array.isArray(e)?o=e[r]||i:o=Mh(e,r)||i,t&&(o=t(o,i,e)),o}function ho(e){const{prop:t,cssProperty:r=e.prop,themeKey:i,transform:o}=e,a=s=>{if(s[t]==null)return null;const l=s[t],u=s.theme,c=Mh(u,i)||{};return Os(s,l,p=>{let v=X1(c,o,p);return p===v&&typeof p=="string"&&(v=X1(c,o,`${t}${p==="default"?"":Qr(p)}`,p)),r===!1?v:{[r]:v}})};return a.propTypes={},a.filterProps=[t],a}function Vw(...e){const t=e.reduce((i,o)=>(o.filterProps.forEach(a=>{i[a]=o}),i),{}),r=i=>Object.keys(i).reduce((o,a)=>t[a]?Zm(o,t[a](i)):o,{});return r.propTypes={},r.filterProps=e.reduce((i,o)=>i.concat(o.filterProps),[]),r}function gY(e){const t={};return r=>(t[r]===void 0&&(t[r]=e(r)),t[r])}const mY={m:"margin",p:"padding"},yY={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},IT={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},vY=gY(e=>{if(e.length>2)if(IT[e])e=IT[e];else return[e];const[t,r]=e.split(""),i=mY[t],o=yY[r]||"";return Array.isArray(o)?o.map(a=>i+a):[i+o]}),d6=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],f6=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...d6,...f6];function gy(e,t,r,i){var o;const a=(o=Mh(e,t,!1))!=null?o:r;return typeof a=="number"?s=>typeof s=="string"?s:a*s:Array.isArray(a)?s=>typeof s=="string"?s:a[s]:typeof a=="function"?a:()=>{}}function p6(e){return gy(e,"spacing",8)}function og(e,t){if(typeof t=="string"||t==null)return t;const r=Math.abs(t),i=e(r);return t>=0?i:typeof i=="number"?-i:`-${i}`}function bY(e,t){return r=>e.reduce((i,o)=>(i[o]=og(t,r),i),{})}function wY(e,t,r,i){if(t.indexOf(r)===-1)return null;const o=vY(r),a=bY(o,i),s=e[r];return Os(e,s,a)}function YU(e,t){const r=p6(e.theme);return Object.keys(e).map(i=>wY(e,t,i,r)).reduce(Zm,{})}function ra(e){return YU(e,d6)}ra.propTypes={};ra.filterProps=d6;function na(e){return YU(e,f6)}na.propTypes={};na.filterProps=f6;function gu(e){return typeof e!="number"?e:`${e}px solid`}const xY=ho({prop:"border",themeKey:"borders",transform:gu}),_Y=ho({prop:"borderTop",themeKey:"borders",transform:gu}),SY=ho({prop:"borderRight",themeKey:"borders",transform:gu}),CY=ho({prop:"borderBottom",themeKey:"borders",transform:gu}),kY=ho({prop:"borderLeft",themeKey:"borders",transform:gu}),EY=ho({prop:"borderColor",themeKey:"palette"}),AY=ho({prop:"borderTopColor",themeKey:"palette"}),TY=ho({prop:"borderRightColor",themeKey:"palette"}),IY=ho({prop:"borderBottomColor",themeKey:"palette"}),RY=ho({prop:"borderLeftColor",themeKey:"palette"}),qw=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=gy(e.theme,"shape.borderRadius",4),r=i=>({borderRadius:og(t,i)});return Os(e,e.borderRadius,r)}return null};qw.propTypes={};qw.filterProps=["borderRadius"];Vw(xY,_Y,SY,CY,kY,EY,AY,TY,IY,RY,qw);const Kw=e=>{if(e.gap!==void 0&&e.gap!==null){const t=gy(e.theme,"spacing",8),r=i=>({gap:og(t,i)});return Os(e,e.gap,r)}return null};Kw.propTypes={};Kw.filterProps=["gap"];const Gw=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=gy(e.theme,"spacing",8),r=i=>({columnGap:og(t,i)});return Os(e,e.columnGap,r)}return null};Gw.propTypes={};Gw.filterProps=["columnGap"];const Yw=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=gy(e.theme,"spacing",8),r=i=>({rowGap:og(t,i)});return Os(e,e.rowGap,r)}return null};Yw.propTypes={};Yw.filterProps=["rowGap"];const PY=ho({prop:"gridColumn"}),MY=ho({prop:"gridRow"}),OY=ho({prop:"gridAutoFlow"}),BY=ho({prop:"gridAutoColumns"}),UY=ho({prop:"gridAutoRows"}),DY=ho({prop:"gridTemplateColumns"}),LY=ho({prop:"gridTemplateRows"}),NY=ho({prop:"gridTemplateAreas"}),jY=ho({prop:"gridArea"});Vw(Kw,Gw,Yw,PY,MY,OY,BY,UY,DY,LY,NY,jY);function vh(e,t){return t==="grey"?t:e}const $Y=ho({prop:"color",themeKey:"palette",transform:vh}),FY=ho({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:vh}),zY=ho({prop:"backgroundColor",themeKey:"palette",transform:vh});Vw($Y,FY,zY);function qs(e){return e<=1&&e!==0?`${e*100}%`:e}const HY=ho({prop:"width",transform:qs}),h6=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=r=>{var i,o,a;return{maxWidth:((i=e.theme)==null||(o=i.breakpoints)==null||(a=o.values)==null?void 0:a[r])||c6[r]||qs(r)}};return Os(e,e.maxWidth,t)}return null};h6.filterProps=["maxWidth"];const WY=ho({prop:"minWidth",transform:qs}),VY=ho({prop:"height",transform:qs}),qY=ho({prop:"maxHeight",transform:qs}),KY=ho({prop:"minHeight",transform:qs});ho({prop:"size",cssProperty:"width",transform:qs});ho({prop:"size",cssProperty:"height",transform:qs});const GY=ho({prop:"boxSizing"});Vw(HY,h6,WY,VY,qY,KY,GY);const YY={border:{themeKey:"borders",transform:gu},borderTop:{themeKey:"borders",transform:gu},borderRight:{themeKey:"borders",transform:gu},borderBottom:{themeKey:"borders",transform:gu},borderLeft:{themeKey:"borders",transform:gu},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:qw},color:{themeKey:"palette",transform:vh},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:vh},backgroundColor:{themeKey:"palette",transform:vh},p:{style:na},pt:{style:na},pr:{style:na},pb:{style:na},pl:{style:na},px:{style:na},py:{style:na},padding:{style:na},paddingTop:{style:na},paddingRight:{style:na},paddingBottom:{style:na},paddingLeft:{style:na},paddingX:{style:na},paddingY:{style:na},paddingInline:{style:na},paddingInlineStart:{style:na},paddingInlineEnd:{style:na},paddingBlock:{style:na},paddingBlockStart:{style:na},paddingBlockEnd:{style:na},m:{style:ra},mt:{style:ra},mr:{style:ra},mb:{style:ra},ml:{style:ra},mx:{style:ra},my:{style:ra},margin:{style:ra},marginTop:{style:ra},marginRight:{style:ra},marginBottom:{style:ra},marginLeft:{style:ra},marginX:{style:ra},marginY:{style:ra},marginInline:{style:ra},marginInlineStart:{style:ra},marginInlineEnd:{style:ra},marginBlock:{style:ra},marginBlockStart:{style:ra},marginBlockEnd:{style:ra},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:Kw},rowGap:{style:Yw},columnGap:{style:Gw},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:qs},maxWidth:{style:h6},minWidth:{transform:qs},height:{transform:qs},maxHeight:{transform:qs},minHeight:{transform:qs},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}},Qw=YY;function QY(...e){const t=e.reduce((i,o)=>i.concat(Object.keys(o)),[]),r=new Set(t);return e.every(i=>r.size===Object.keys(i).length)}function ZY(e,t){return typeof e=="function"?e(t):e}function XY(){function e(r,i,o,a){const s={[r]:i,theme:o},l=a[r];if(!l)return{[r]:i};const{cssProperty:u=r,themeKey:c,transform:d,style:p}=l;if(i==null)return null;const v=Mh(o,c)||{};return p?p(s):Os(s,i,b=>{let y=X1(v,d,b);return b===y&&typeof b=="string"&&(y=X1(v,d,`${r}${b==="default"?"":Qr(b)}`,b)),u===!1?y:{[u]:y}})}function t(r){var i;const{sx:o,theme:a={}}=r||{};if(!o)return null;const s=(i=a.unstable_sxConfig)!=null?i:Qw;function l(u){let c=u;if(typeof u=="function")c=u(a);else if(typeof u!="object")return u;if(!c)return null;const d=KU(a.breakpoints),p=Object.keys(d);let v=d;return Object.keys(c).forEach(x=>{const b=ZY(c[x],a);if(b!=null)if(typeof b=="object")if(s[x])v=Zm(v,e(x,b,a,s));else{const y=Os({theme:a},b,_=>({[x]:_}));QY(y,b)?v[x]=t({sx:b,theme:a}):v=Zm(v,y)}else v=Zm(v,e(x,b,a,s))}),GU(p,v)}return Array.isArray(o)?o.map(l):l(o)}return t}const QU=XY();QU.filterProps=["sx"];const Zw=QU,JY=["sx"],eQ=e=>{var t,r;const i={systemProps:{},otherProps:{}},o=(t=e==null||(r=e.theme)==null?void 0:r.unstable_sxConfig)!=null?t:Qw;return Object.keys(e).forEach(a=>{o[a]?i.systemProps[a]=e[a]:i.otherProps[a]=e[a]}),i};function Xw(e){const{sx:t}=e,r=bn(e,JY),{systemProps:i,otherProps:o}=eQ(r);let a;return Array.isArray(t)?a=[i,...t]:typeof t=="function"?a=(...s)=>{const l=t(...s);return cf(l)?De({},i,l):i}:a=De({},i,t),De({},o,{sx:a})}function ZU(e){var t,r,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t{const t=Object.keys(e).map(r=>({key:r,val:e[r]}))||[];return t.sort((r,i)=>r.val-i.val),t.reduce((r,i)=>De({},r,{[i.key]:i.val}),{})};function nQ(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:i=5}=e,o=bn(e,tQ),a=rQ(t),s=Object.keys(a);function l(v){return`@media (min-width:${typeof t[v]=="number"?t[v]:v}${r})`}function u(v){return`@media (max-width:${(typeof t[v]=="number"?t[v]:v)-i/100}${r})`}function c(v,x){const b=s.indexOf(x);return`@media (min-width:${typeof t[v]=="number"?t[v]:v}${r}) and (max-width:${(b!==-1&&typeof t[s[b]]=="number"?t[s[b]]:x)-i/100}${r})`}function d(v){return s.indexOf(v)+1(i.length===0?[1]:i).map(a=>{const s=t(a);return typeof s=="number"?`${s}px`:s}).join(" ");return r.mui=!0,r}const sQ=["breakpoints","palette","spacing","shape"];function g6(e={},...t){const{breakpoints:r={},palette:i={},spacing:o,shape:a={}}=e,s=bn(e,sQ),l=nQ(r),u=aQ(o);let c=Is({breakpoints:l,direction:"ltr",components:{},palette:De({mode:"light"},i),spacing:u,shape:De({},oQ,a)},s);return c=t.reduce((d,p)=>Is(d,p),c),c.unstable_sxConfig=De({},Qw,s?.unstable_sxConfig),c.unstable_sx=function(p){return Zw({sx:p,theme:this})},c}const lQ=X.exports.createContext(null),XU=lQ;function JU(){return X.exports.useContext(XU)}const uQ=typeof Symbol=="function"&&Symbol.for,cQ=uQ?Symbol.for("mui.nested"):"__THEME_NESTED__";function dQ(e,t){return typeof t=="function"?t(e):De({},e,t)}function fQ(e){const{children:t,theme:r}=e,i=JU(),o=X.exports.useMemo(()=>{const a=i===null?r:dQ(i,r);return a!=null&&(a[cQ]=i!==null),a},[r,i]);return L(XU.Provider,{value:o,children:t})}function pQ(e){return Object.keys(e).length===0}function m6(e=null){const t=JU();return!t||pQ(t)?e:t}const hQ=g6();function Jw(e=hQ){return m6(e)}const gQ=["className","component"];function e7(e={}){const{defaultTheme:t,defaultClassName:r="MuiBox-root",generateClassName:i}=e,o=qU("div",{shouldForwardProp:s=>s!=="theme"&&s!=="sx"&&s!=="as"})(Zw);return X.exports.forwardRef(function(l,u){const c=Jw(t),d=Xw(l),{className:p,component:v="div"}=d,x=bn(d,gQ);return L(o,De({as:v,ref:u,className:pn(p,i?i(r):r),theme:c},x))})}const mQ=e7(),da=mQ,yQ=["variant"];function RT(e){return e.length===0}function t7(e){const{variant:t}=e,r=bn(e,yQ);let i=t||"";return Object.keys(r).sort().forEach(o=>{o==="color"?i+=RT(i)?e[o]:Qr(e[o]):i+=`${RT(i)?o:Qr(o)}${Qr(e[o].toString())}`}),i}const vQ=["name","slot","skipVariantsResolver","skipSx","overridesResolver"],bQ=["theme"],wQ=["theme"];function Yg(e){return Object.keys(e).length===0}function xQ(e){return typeof e=="string"&&e.charCodeAt(0)>96}const _Q=(e,t)=>t.components&&t.components[e]&&t.components[e].styleOverrides?t.components[e].styleOverrides:null,SQ=(e,t)=>{let r=[];t&&t.components&&t.components[e]&&t.components[e].variants&&(r=t.components[e].variants);const i={};return r.forEach(o=>{const a=t7(o.props);i[a]=o.style}),i},CQ=(e,t,r,i)=>{var o,a;const{ownerState:s={}}=e,l=[],u=r==null||(o=r.components)==null||(a=o[i])==null?void 0:a.variants;return u&&u.forEach(c=>{let d=!0;Object.keys(c.props).forEach(p=>{s[p]!==c.props[p]&&e[p]!==c.props[p]&&(d=!1)}),d&&l.push(t[t7(c.props)])}),l};function Xm(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const kQ=g6();function r7(e={}){const{defaultTheme:t=kQ,rootShouldForwardProp:r=Xm,slotShouldForwardProp:i=Xm}=e,o=a=>{const s=Yg(a.theme)?t:a.theme;return Zw(De({},a,{theme:s}))};return o.__mui_systemSx=!0,(a,s={})=>{fY(a,B=>B.filter(U=>!(U!=null&&U.__mui_systemSx)));const{name:l,slot:u,skipVariantsResolver:c,skipSx:d,overridesResolver:p}=s,v=bn(s,vQ),x=c!==void 0?c:u&&u!=="Root"||!1,b=d||!1;let y,_=Xm;u==="Root"?_=r:u?_=i:xQ(a)&&(_=void 0);const k=qU(a,De({shouldForwardProp:_,label:y},v)),E=(B,...U)=>{const D=U?U.map(W=>typeof W=="function"&&W.__emotion_real!==W?G=>{let{theme:ae}=G,V=bn(G,bQ);return W(De({theme:Yg(ae)?t:ae},V))}:W):[];let j=B;l&&p&&D.push(W=>{const G=Yg(W.theme)?t:W.theme,ae=_Q(l,G);if(ae){const V={};return Object.entries(ae).forEach(([oe,P])=>{V[oe]=typeof P=="function"?P(De({},W,{theme:G})):P}),p(W,V)}return null}),l&&!x&&D.push(W=>{const G=Yg(W.theme)?t:W.theme;return CQ(W,SQ(l,G),G,l)}),b||D.push(o);const F=D.length-U.length;if(Array.isArray(B)&&F>0){const W=new Array(F).fill("");j=[...B,...W],j.raw=[...B.raw,...W]}else typeof B=="function"&&B.__emotion_real!==B&&(j=W=>{let{theme:G}=W,ae=bn(W,wQ);return B(De({theme:Yg(G)?t:G},ae))});return k(j,...D)};return k.withConfig&&(E.withConfig=k.withConfig),E}}const EQ=r7(),Xi=EQ;function n7(e){const{theme:t,name:r,props:i}=e;return!t||!t.components||!t.components[r]||!t.components[r].defaultProps?i:e6(t.components[r].defaultProps,i)}function AQ({props:e,name:t,defaultTheme:r}){const i=Jw(r);return n7({theme:i,name:t,props:e})}function y6(e,t=0,r=1){return Math.min(Math.max(t,e),r)}function TQ(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let r=e.match(t);return r&&r[0].length===1&&(r=r.map(i=>i+i)),r?`rgb${r.length===4?"a":""}(${r.map((i,o)=>o<3?parseInt(i,16):Math.round(parseInt(i,16)/255*1e3)/1e3).join(", ")})`:""}function Df(e){if(e.type)return e;if(e.charAt(0)==="#")return Df(TQ(e));const t=e.indexOf("("),r=e.substring(0,t);if(["rgb","rgba","hsl","hsla","color"].indexOf(r)===-1)throw new Error(kd(9,e));let i=e.substring(t+1,e.length-1),o;if(r==="color"){if(i=i.split(" "),o=i.shift(),i.length===4&&i[3].charAt(0)==="/"&&(i[3]=i[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(o)===-1)throw new Error(kd(10,o))}else i=i.split(",");return i=i.map(a=>parseFloat(a)),{type:r,values:i,colorSpace:o}}function e2(e){const{type:t,colorSpace:r}=e;let{values:i}=e;return t.indexOf("rgb")!==-1?i=i.map((o,a)=>a<3?parseInt(o,10):o):t.indexOf("hsl")!==-1&&(i[1]=`${i[1]}%`,i[2]=`${i[2]}%`),t.indexOf("color")!==-1?i=`${r} ${i.join(" ")}`:i=`${i.join(", ")}`,`${t}(${i})`}function IQ(e){e=Df(e);const{values:t}=e,r=t[0],i=t[1]/100,o=t[2]/100,a=i*Math.min(o,1-o),s=(c,d=(c+r/30)%12)=>o-a*Math.max(Math.min(d-3,9-d,1),-1);let l="rgb";const u=[Math.round(s(0)*255),Math.round(s(8)*255),Math.round(s(4)*255)];return e.type==="hsla"&&(l+="a",u.push(t[3])),e2({type:l,values:u})}function AS(e){e=Df(e);let t=e.type==="hsl"||e.type==="hsla"?Df(IQ(e)).values:e.values;return t=t.map(r=>(e.type!=="color"&&(r/=255),r<=.03928?r/12.92:((r+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function RQ(e,t){const r=AS(e),i=AS(t);return(Math.max(r,i)+.05)/(Math.min(r,i)+.05)}function Zi(e,t){return e=Df(e),t=y6(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,e2(e)}function Oh(e,t){if(e=Df(e),t=y6(t),e.type.indexOf("hsl")!==-1)e.values[2]*=1-t;else if(e.type.indexOf("rgb")!==-1||e.type.indexOf("color")!==-1)for(let r=0;r<3;r+=1)e.values[r]*=1-t;return e2(e)}function Bh(e,t){if(e=Df(e),t=y6(t),e.type.indexOf("hsl")!==-1)e.values[2]+=(100-e.values[2])*t;else if(e.type.indexOf("rgb")!==-1)for(let r=0;r<3;r+=1)e.values[r]+=(255-e.values[r])*t;else if(e.type.indexOf("color")!==-1)for(let r=0;r<3;r+=1)e.values[r]+=(1-e.values[r])*t;return e2(e)}function PQ(e,t=.15){return AS(e)>.5?Oh(e,t):Bh(e,t)}const MQ={};function OQ(e){const t=Jw();return L(u6.Provider,{value:typeof t=="object"?t:MQ,children:e.children})}function BQ(e){const{children:t,theme:r}=e;return L(fQ,{theme:r,children:L(OQ,{children:t})})}function UQ(e,t){return De({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},t)}const DQ={black:"#000",white:"#fff"},U0=DQ,LQ={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},NQ=LQ,jQ={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},Ip=jQ,$Q={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},Rp=$Q,FQ={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},Qg=FQ,zQ={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},Pp=zQ,HQ={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},Mp=HQ,WQ={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},Op=WQ,VQ=["mode","contrastThreshold","tonalOffset"],PT={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:U0.white,default:U0.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},W_={text:{primary:U0.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:U0.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function MT(e,t,r,i){const o=i.light||i,a=i.dark||i*1.5;e[t]||(e.hasOwnProperty(r)?e[t]=e[r]:t==="light"?e.light=Bh(e.main,o):t==="dark"&&(e.dark=Oh(e.main,a)))}function qQ(e="light"){return e==="dark"?{main:Pp[200],light:Pp[50],dark:Pp[400]}:{main:Pp[700],light:Pp[400],dark:Pp[800]}}function KQ(e="light"){return e==="dark"?{main:Ip[200],light:Ip[50],dark:Ip[400]}:{main:Ip[500],light:Ip[300],dark:Ip[700]}}function GQ(e="light"){return e==="dark"?{main:Rp[500],light:Rp[300],dark:Rp[700]}:{main:Rp[700],light:Rp[400],dark:Rp[800]}}function YQ(e="light"){return e==="dark"?{main:Mp[400],light:Mp[300],dark:Mp[700]}:{main:Mp[700],light:Mp[500],dark:Mp[900]}}function QQ(e="light"){return e==="dark"?{main:Op[400],light:Op[300],dark:Op[700]}:{main:Op[800],light:Op[500],dark:Op[900]}}function ZQ(e="light"){return e==="dark"?{main:Qg[400],light:Qg[300],dark:Qg[700]}:{main:"#ed6c02",light:Qg[500],dark:Qg[900]}}function XQ(e){const{mode:t="light",contrastThreshold:r=3,tonalOffset:i=.2}=e,o=bn(e,VQ),a=e.primary||qQ(t),s=e.secondary||KQ(t),l=e.error||GQ(t),u=e.info||YQ(t),c=e.success||QQ(t),d=e.warning||ZQ(t);function p(y){return RQ(y,W_.text.primary)>=r?W_.text.primary:PT.text.primary}const v=({color:y,name:_,mainShade:k=500,lightShade:E=300,darkShade:B=700})=>{if(y=De({},y),!y.main&&y[k]&&(y.main=y[k]),!y.hasOwnProperty("main"))throw new Error(kd(11,_?` (${_})`:"",k));if(typeof y.main!="string")throw new Error(kd(12,_?` (${_})`:"",JSON.stringify(y.main)));return MT(y,"light",E,i),MT(y,"dark",B,i),y.contrastText||(y.contrastText=p(y.main)),y},x={dark:W_,light:PT};return Is(De({common:De({},U0),mode:t,primary:v({color:a,name:"primary"}),secondary:v({color:s,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:v({color:l,name:"error"}),warning:v({color:d,name:"warning"}),info:v({color:u,name:"info"}),success:v({color:c,name:"success"}),grey:NQ,contrastThreshold:r,getContrastText:p,augmentColor:v,tonalOffset:i},x[t]),o)}const JQ=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function eZ(e){return Math.round(e*1e5)/1e5}const OT={textTransform:"uppercase"},BT='"Roboto", "Helvetica", "Arial", sans-serif';function tZ(e,t){const r=typeof t=="function"?t(e):t,{fontFamily:i=BT,fontSize:o=14,fontWeightLight:a=300,fontWeightRegular:s=400,fontWeightMedium:l=500,fontWeightBold:u=700,htmlFontSize:c=16,allVariants:d,pxToRem:p}=r,v=bn(r,JQ),x=o/14,b=p||(k=>`${k/c*x}rem`),y=(k,E,B,U,D)=>De({fontFamily:i,fontWeight:k,fontSize:b(E),lineHeight:B},i===BT?{letterSpacing:`${eZ(U/E)}em`}:{},D,d),_={h1:y(a,96,1.167,-1.5),h2:y(a,60,1.2,-.5),h3:y(s,48,1.167,0),h4:y(s,34,1.235,.25),h5:y(s,24,1.334,0),h6:y(l,20,1.6,.15),subtitle1:y(s,16,1.75,.15),subtitle2:y(l,14,1.57,.1),body1:y(s,16,1.5,.15),body2:y(s,14,1.43,.15),button:y(l,14,1.75,.4,OT),caption:y(s,12,1.66,.4),overline:y(s,12,2.66,1,OT)};return Is(De({htmlFontSize:c,pxToRem:b,fontFamily:i,fontSize:o,fontWeightLight:a,fontWeightRegular:s,fontWeightMedium:l,fontWeightBold:u},_),v,{clone:!1})}const rZ=.2,nZ=.14,iZ=.12;function zo(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${rZ})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${nZ})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${iZ})`].join(",")}const oZ=["none",zo(0,2,1,-1,0,1,1,0,0,1,3,0),zo(0,3,1,-2,0,2,2,0,0,1,5,0),zo(0,3,3,-2,0,3,4,0,0,1,8,0),zo(0,2,4,-1,0,4,5,0,0,1,10,0),zo(0,3,5,-1,0,5,8,0,0,1,14,0),zo(0,3,5,-1,0,6,10,0,0,1,18,0),zo(0,4,5,-2,0,7,10,1,0,2,16,1),zo(0,5,5,-3,0,8,10,1,0,3,14,2),zo(0,5,6,-3,0,9,12,1,0,3,16,2),zo(0,6,6,-3,0,10,14,1,0,4,18,3),zo(0,6,7,-4,0,11,15,1,0,4,20,3),zo(0,7,8,-4,0,12,17,2,0,5,22,4),zo(0,7,8,-4,0,13,19,2,0,5,24,4),zo(0,7,9,-4,0,14,21,2,0,5,26,4),zo(0,8,9,-5,0,15,22,2,0,6,28,5),zo(0,8,10,-5,0,16,24,2,0,6,30,5),zo(0,8,11,-5,0,17,26,2,0,6,32,5),zo(0,9,11,-5,0,18,28,2,0,7,34,6),zo(0,9,12,-6,0,19,29,2,0,7,36,6),zo(0,10,13,-6,0,20,31,3,0,8,38,7),zo(0,10,13,-6,0,21,33,3,0,8,40,7),zo(0,10,14,-6,0,22,35,3,0,8,42,7),zo(0,11,14,-7,0,23,36,3,0,9,44,8),zo(0,11,15,-7,0,24,38,3,0,9,46,8)],aZ=oZ,sZ=["duration","easing","delay"],lZ={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},i7={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function UT(e){return`${Math.round(e)}ms`}function uZ(e){if(!e)return 0;const t=e/36;return Math.round((4+15*t**.25+t/5)*10)}function cZ(e){const t=De({},lZ,e.easing),r=De({},i7,e.duration);return De({getAutoHeightDuration:uZ,create:(o=["all"],a={})=>{const{duration:s=r.standard,easing:l=t.easeInOut,delay:u=0}=a;return bn(a,sZ),(Array.isArray(o)?o:[o]).map(c=>`${c} ${typeof s=="string"?s:UT(s)} ${l} ${typeof u=="string"?u:UT(u)}`).join(",")}},e,{easing:t,duration:r})}const dZ={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},fZ=dZ,pZ=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function v6(e={},...t){const{mixins:r={},palette:i={},transitions:o={},typography:a={}}=e,s=bn(e,pZ);if(e.vars)throw new Error(kd(18));const l=XQ(i),u=g6(e);let c=Is(u,{mixins:UQ(u.breakpoints,r),palette:l,shadows:aZ.slice(),typography:tZ(l,a),transitions:cZ(o),zIndex:De({},fZ)});return c=Is(c,s),c=t.reduce((d,p)=>Is(d,p),c),c.unstable_sxConfig=De({},Qw,s?.unstable_sxConfig),c.unstable_sx=function(p){return Zw({sx:p,theme:this})},c}function hZ(e){return String(e).match(/[\d.\-+]*\s*(.*)/)[1]||""}function gZ(e){return parseFloat(e)}const mZ=v6(),t2=mZ;function la(){return Jw(t2)}function gi({props:e,name:t}){return AQ({props:e,name:t,defaultTheme:t2})}const tu=e=>Xm(e)&&e!=="classes",yZ=Xm,vZ=r7({defaultTheme:t2,rootShouldForwardProp:tu}),sr=vZ,bZ=e=>{let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,(t/100).toFixed(2)},DT=bZ,wZ="/verifier/assets/search.7f4d94b1.svg",b6="/verifier/assets/close.3e490fed.svg";function J1(e){return typeof e=="string"}function Um(e,t,r){return e===void 0||J1(e)?t:De({},t,{ownerState:De({},t.ownerState,r)})}function xZ(e,t=[]){if(e===void 0)return{};const r={};return Object.keys(e).filter(i=>i.match(/^on[A-Z]/)&&typeof e[i]=="function"&&!t.includes(i)).forEach(i=>{r[i]=e[i]}),r}function TS(e,t){return typeof e=="function"?e(t):e}function LT(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(r=>!(r.match(/^on[A-Z]/)&&typeof e[r]=="function")).forEach(r=>{t[r]=e[r]}),t}function _Z(e){const{getSlotProps:t,additionalProps:r,externalSlotProps:i,externalForwardedProps:o,className:a}=e;if(!t){const x=pn(o?.className,i?.className,a,r?.className),b=De({},r?.style,o?.style,i?.style),y=De({},r,o,i);return x.length>0&&(y.className=x),Object.keys(b).length>0&&(y.style=b),{props:y,internalRef:void 0}}const s=xZ(De({},o,i)),l=LT(i),u=LT(o),c=t(s),d=pn(c?.className,r?.className,a,o?.className,i?.className),p=De({},c?.style,r?.style,o?.style,i?.style),v=De({},c,r,u,l);return d.length>0&&(v.className=d),Object.keys(p).length>0&&(v.style=p),{props:v,internalRef:c.ref}}const SZ=["elementType","externalSlotProps","ownerState"];function IS(e){var t;const{elementType:r,externalSlotProps:i,ownerState:o}=e,a=bn(e,SZ),s=TS(i,o),{props:l,internalRef:u}=_Z(De({},a,{externalSlotProps:s})),c=Vo(u,s?.ref,(t=e.additionalProps)==null?void 0:t.ref);return Um(r,De({},l,{ref:c}),o)}function NT(e){return e.substring(2).toLowerCase()}function CZ(e,t){return t.documentElement.clientWidth(setTimeout(()=>{u.current=!0},0),()=>{u.current=!1}),[]);const d=Vo(t.ref,l),p=bl(b=>{const y=c.current;c.current=!1;const _=ya(l.current);if(!u.current||!l.current||"clientX"in b&&CZ(b,_))return;if(s.current){s.current=!1;return}let k;b.composedPath?k=b.composedPath().indexOf(l.current)>-1:k=!_.documentElement.contains(b.target)||l.current.contains(b.target),!k&&(r||!y)&&o(b)}),v=b=>y=>{c.current=!0;const _=t.props[b];_&&_(y)},x={ref:d};return a!==!1&&(x[a]=v(a)),X.exports.useEffect(()=>{if(a!==!1){const b=NT(a),y=ya(l.current),_=()=>{s.current=!0};return y.addEventListener(b,p),y.addEventListener("touchmove",_),()=>{y.removeEventListener(b,p),y.removeEventListener("touchmove",_)}}},[p,a]),i!==!1&&(x[i]=v(i)),X.exports.useEffect(()=>{if(i!==!1){const b=NT(i),y=ya(l.current);return y.addEventListener(b,p),()=>{y.removeEventListener(b,p)}}},[p,i]),L(X.exports.Fragment,{children:X.exports.cloneElement(t,x)})}const kZ=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function EZ(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?e.contentEditable==="true"||(e.nodeName==="AUDIO"||e.nodeName==="VIDEO"||e.nodeName==="DETAILS")&&e.getAttribute("tabindex")===null?0:e.tabIndex:t}function AZ(e){if(e.tagName!=="INPUT"||e.type!=="radio"||!e.name)return!1;const t=i=>e.ownerDocument.querySelector(`input[type="radio"]${i}`);let r=t(`[name="${e.name}"]:checked`);return r||(r=t(`[name="${e.name}"]`)),r!==e}function TZ(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||AZ(e))}function IZ(e){const t=[],r=[];return Array.from(e.querySelectorAll(kZ)).forEach((i,o)=>{const a=EZ(i);a===-1||!TZ(i)||(a===0?t.push(i):r.push({documentOrder:o,tabIndex:a,node:i}))}),r.sort((i,o)=>i.tabIndex===o.tabIndex?i.documentOrder-o.documentOrder:i.tabIndex-o.tabIndex).map(i=>i.node).concat(t)}function RZ(){return!0}function PZ(e){const{children:t,disableAutoFocus:r=!1,disableEnforceFocus:i=!1,disableRestoreFocus:o=!1,getTabbable:a=IZ,isEnabled:s=RZ,open:l}=e,u=X.exports.useRef(!1),c=X.exports.useRef(null),d=X.exports.useRef(null),p=X.exports.useRef(null),v=X.exports.useRef(null),x=X.exports.useRef(!1),b=X.exports.useRef(null),y=Vo(t.ref,b),_=X.exports.useRef(null);X.exports.useEffect(()=>{!l||!b.current||(x.current=!r)},[r,l]),X.exports.useEffect(()=>{if(!l||!b.current)return;const B=ya(b.current);return b.current.contains(B.activeElement)||(b.current.hasAttribute("tabIndex")||b.current.setAttribute("tabIndex","-1"),x.current&&b.current.focus()),()=>{o||(p.current&&p.current.focus&&(u.current=!0,p.current.focus()),p.current=null)}},[l]),X.exports.useEffect(()=>{if(!l||!b.current)return;const B=ya(b.current),U=F=>{const{current:H}=b;if(H!==null){if(!B.hasFocus()||i||!s()||u.current){u.current=!1;return}if(!H.contains(B.activeElement)){if(F&&v.current!==F.target||B.activeElement!==v.current)v.current=null;else if(v.current!==null)return;if(!x.current)return;let ae=[];if((B.activeElement===c.current||B.activeElement===d.current)&&(ae=a(b.current)),ae.length>0){var W,G;const V=Boolean(((W=_.current)==null?void 0:W.shiftKey)&&((G=_.current)==null?void 0:G.key)==="Tab"),oe=ae[0],P=ae[ae.length-1];typeof oe!="string"&&typeof P!="string"&&(V?P.focus():oe.focus())}else H.focus()}}},D=F=>{_.current=F,!(i||!s()||F.key!=="Tab")&&B.activeElement===b.current&&F.shiftKey&&(u.current=!0,d.current&&d.current.focus())};B.addEventListener("focusin",U),B.addEventListener("keydown",D,!0);const j=setInterval(()=>{B.activeElement&&B.activeElement.tagName==="BODY"&&U(null)},50);return()=>{clearInterval(j),B.removeEventListener("focusin",U),B.removeEventListener("keydown",D,!0)}},[r,i,o,s,l,a]);const k=B=>{p.current===null&&(p.current=B.relatedTarget),x.current=!0,v.current=B.target;const U=t.props.onFocus;U&&U(B)},E=B=>{p.current===null&&(p.current=B.relatedTarget),x.current=!0};return Ut(X.exports.Fragment,{children:[L("div",{tabIndex:l?0:-1,onFocus:E,ref:c,"data-testid":"sentinelStart"}),X.exports.cloneElement(t,{ref:y,onFocus:k}),L("div",{tabIndex:l?0:-1,onFocus:E,ref:d,"data-testid":"sentinelEnd"})]})}var Rs="top",Al="bottom",Tl="right",Ps="left",x6="auto",my=[Rs,Al,Tl,Ps],Uh="start",D0="end",MZ="clippingParents",o7="viewport",Zg="popper",OZ="reference",jT=my.reduce(function(e,t){return e.concat([t+"-"+Uh,t+"-"+D0])},[]),a7=[].concat(my,[x6]).reduce(function(e,t){return e.concat([t,t+"-"+Uh,t+"-"+D0])},[]),BZ="beforeRead",UZ="read",DZ="afterRead",LZ="beforeMain",NZ="main",jZ="afterMain",$Z="beforeWrite",FZ="write",zZ="afterWrite",HZ=[BZ,UZ,DZ,LZ,NZ,jZ,$Z,FZ,zZ];function Mu(e){return e?(e.nodeName||"").toLowerCase():null}function Rl(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Lf(e){var t=Rl(e).Element;return e instanceof t||e instanceof Element}function xl(e){var t=Rl(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function _6(e){if(typeof ShadowRoot>"u")return!1;var t=Rl(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function WZ(e){var t=e.state;Object.keys(t.elements).forEach(function(r){var i=t.styles[r]||{},o=t.attributes[r]||{},a=t.elements[r];!xl(a)||!Mu(a)||(Object.assign(a.style,i),Object.keys(o).forEach(function(s){var l=o[s];l===!1?a.removeAttribute(s):a.setAttribute(s,l===!0?"":l)}))})}function VZ(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach(function(i){var o=t.elements[i],a=t.attributes[i]||{},s=Object.keys(t.styles.hasOwnProperty(i)?t.styles[i]:r[i]),l=s.reduce(function(u,c){return u[c]="",u},{});!xl(o)||!Mu(o)||(Object.assign(o.style,l),Object.keys(a).forEach(function(u){o.removeAttribute(u)}))})}}const qZ={name:"applyStyles",enabled:!0,phase:"write",fn:WZ,effect:VZ,requires:["computeStyles"]};function Su(e){return e.split("-")[0]}var kf=Math.max,eb=Math.min,Dh=Math.round;function RS(){var e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function s7(){return!/^((?!chrome|android).)*safari/i.test(RS())}function Lh(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);var i=e.getBoundingClientRect(),o=1,a=1;t&&xl(e)&&(o=e.offsetWidth>0&&Dh(i.width)/e.offsetWidth||1,a=e.offsetHeight>0&&Dh(i.height)/e.offsetHeight||1);var s=Lf(e)?Rl(e):window,l=s.visualViewport,u=!s7()&&r,c=(i.left+(u&&l?l.offsetLeft:0))/o,d=(i.top+(u&&l?l.offsetTop:0))/a,p=i.width/o,v=i.height/a;return{width:p,height:v,top:d,right:c+p,bottom:d+v,left:c,x:c,y:d}}function S6(e){var t=Lh(e),r=e.offsetWidth,i=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-i)<=1&&(i=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:i}}function l7(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&_6(r)){var i=t;do{if(i&&e.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function wc(e){return Rl(e).getComputedStyle(e)}function KZ(e){return["table","td","th"].indexOf(Mu(e))>=0}function $d(e){return((Lf(e)?e.ownerDocument:e.document)||window.document).documentElement}function r2(e){return Mu(e)==="html"?e:e.assignedSlot||e.parentNode||(_6(e)?e.host:null)||$d(e)}function $T(e){return!xl(e)||wc(e).position==="fixed"?null:e.offsetParent}function GZ(e){var t=/firefox/i.test(RS()),r=/Trident/i.test(RS());if(r&&xl(e)){var i=wc(e);if(i.position==="fixed")return null}var o=r2(e);for(_6(o)&&(o=o.host);xl(o)&&["html","body"].indexOf(Mu(o))<0;){var a=wc(o);if(a.transform!=="none"||a.perspective!=="none"||a.contain==="paint"||["transform","perspective"].indexOf(a.willChange)!==-1||t&&a.willChange==="filter"||t&&a.filter&&a.filter!=="none")return o;o=o.parentNode}return null}function yy(e){for(var t=Rl(e),r=$T(e);r&&KZ(r)&&wc(r).position==="static";)r=$T(r);return r&&(Mu(r)==="html"||Mu(r)==="body"&&wc(r).position==="static")?t:r||GZ(e)||t}function C6(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Jm(e,t,r){return kf(e,eb(t,r))}function YZ(e,t,r){var i=Jm(e,t,r);return i>r?r:i}function u7(){return{top:0,right:0,bottom:0,left:0}}function c7(e){return Object.assign({},u7(),e)}function d7(e,t){return t.reduce(function(r,i){return r[i]=e,r},{})}var QZ=function(t,r){return t=typeof t=="function"?t(Object.assign({},r.rects,{placement:r.placement})):t,c7(typeof t!="number"?t:d7(t,my))};function ZZ(e){var t,r=e.state,i=e.name,o=e.options,a=r.elements.arrow,s=r.modifiersData.popperOffsets,l=Su(r.placement),u=C6(l),c=[Ps,Tl].indexOf(l)>=0,d=c?"height":"width";if(!(!a||!s)){var p=QZ(o.padding,r),v=S6(a),x=u==="y"?Rs:Ps,b=u==="y"?Al:Tl,y=r.rects.reference[d]+r.rects.reference[u]-s[u]-r.rects.popper[d],_=s[u]-r.rects.reference[u],k=yy(a),E=k?u==="y"?k.clientHeight||0:k.clientWidth||0:0,B=y/2-_/2,U=p[x],D=E-v[d]-p[b],j=E/2-v[d]/2+B,F=Jm(U,j,D),H=u;r.modifiersData[i]=(t={},t[H]=F,t.centerOffset=F-j,t)}}function XZ(e){var t=e.state,r=e.options,i=r.element,o=i===void 0?"[data-popper-arrow]":i;o!=null&&(typeof o=="string"&&(o=t.elements.popper.querySelector(o),!o)||!l7(t.elements.popper,o)||(t.elements.arrow=o))}const JZ={name:"arrow",enabled:!0,phase:"main",fn:ZZ,effect:XZ,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Nh(e){return e.split("-")[1]}var eX={top:"auto",right:"auto",bottom:"auto",left:"auto"};function tX(e){var t=e.x,r=e.y,i=window,o=i.devicePixelRatio||1;return{x:Dh(t*o)/o||0,y:Dh(r*o)/o||0}}function FT(e){var t,r=e.popper,i=e.popperRect,o=e.placement,a=e.variation,s=e.offsets,l=e.position,u=e.gpuAcceleration,c=e.adaptive,d=e.roundOffsets,p=e.isFixed,v=s.x,x=v===void 0?0:v,b=s.y,y=b===void 0?0:b,_=typeof d=="function"?d({x,y}):{x,y};x=_.x,y=_.y;var k=s.hasOwnProperty("x"),E=s.hasOwnProperty("y"),B=Ps,U=Rs,D=window;if(c){var j=yy(r),F="clientHeight",H="clientWidth";if(j===Rl(r)&&(j=$d(r),wc(j).position!=="static"&&l==="absolute"&&(F="scrollHeight",H="scrollWidth")),j=j,o===Rs||(o===Ps||o===Tl)&&a===D0){U=Al;var W=p&&j===D&&D.visualViewport?D.visualViewport.height:j[F];y-=W-i.height,y*=u?1:-1}if(o===Ps||(o===Rs||o===Al)&&a===D0){B=Tl;var G=p&&j===D&&D.visualViewport?D.visualViewport.width:j[H];x-=G-i.width,x*=u?1:-1}}var ae=Object.assign({position:l},c&&eX),V=d===!0?tX({x,y}):{x,y};if(x=V.x,y=V.y,u){var oe;return Object.assign({},ae,(oe={},oe[U]=E?"0":"",oe[B]=k?"0":"",oe.transform=(D.devicePixelRatio||1)<=1?"translate("+x+"px, "+y+"px)":"translate3d("+x+"px, "+y+"px, 0)",oe))}return Object.assign({},ae,(t={},t[U]=E?y+"px":"",t[B]=k?x+"px":"",t.transform="",t))}function rX(e){var t=e.state,r=e.options,i=r.gpuAcceleration,o=i===void 0?!0:i,a=r.adaptive,s=a===void 0?!0:a,l=r.roundOffsets,u=l===void 0?!0:l,c={placement:Su(t.placement),variation:Nh(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,FT(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:u})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,FT(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const nX={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:rX,data:{}};var wv={passive:!0};function iX(e){var t=e.state,r=e.instance,i=e.options,o=i.scroll,a=o===void 0?!0:o,s=i.resize,l=s===void 0?!0:s,u=Rl(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&c.forEach(function(d){d.addEventListener("scroll",r.update,wv)}),l&&u.addEventListener("resize",r.update,wv),function(){a&&c.forEach(function(d){d.removeEventListener("scroll",r.update,wv)}),l&&u.removeEventListener("resize",r.update,wv)}}const oX={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:iX,data:{}};var aX={left:"right",right:"left",bottom:"top",top:"bottom"};function c1(e){return e.replace(/left|right|bottom|top/g,function(t){return aX[t]})}var sX={start:"end",end:"start"};function zT(e){return e.replace(/start|end/g,function(t){return sX[t]})}function k6(e){var t=Rl(e),r=t.pageXOffset,i=t.pageYOffset;return{scrollLeft:r,scrollTop:i}}function E6(e){return Lh($d(e)).left+k6(e).scrollLeft}function lX(e,t){var r=Rl(e),i=$d(e),o=r.visualViewport,a=i.clientWidth,s=i.clientHeight,l=0,u=0;if(o){a=o.width,s=o.height;var c=s7();(c||!c&&t==="fixed")&&(l=o.offsetLeft,u=o.offsetTop)}return{width:a,height:s,x:l+E6(e),y:u}}function uX(e){var t,r=$d(e),i=k6(e),o=(t=e.ownerDocument)==null?void 0:t.body,a=kf(r.scrollWidth,r.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=kf(r.scrollHeight,r.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),l=-i.scrollLeft+E6(e),u=-i.scrollTop;return wc(o||r).direction==="rtl"&&(l+=kf(r.clientWidth,o?o.clientWidth:0)-a),{width:a,height:s,x:l,y:u}}function A6(e){var t=wc(e),r=t.overflow,i=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+o+i)}function f7(e){return["html","body","#document"].indexOf(Mu(e))>=0?e.ownerDocument.body:xl(e)&&A6(e)?e:f7(r2(e))}function e0(e,t){var r;t===void 0&&(t=[]);var i=f7(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),a=Rl(i),s=o?[a].concat(a.visualViewport||[],A6(i)?i:[]):i,l=t.concat(s);return o?l:l.concat(e0(r2(s)))}function PS(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function cX(e,t){var r=Lh(e,!1,t==="fixed");return r.top=r.top+e.clientTop,r.left=r.left+e.clientLeft,r.bottom=r.top+e.clientHeight,r.right=r.left+e.clientWidth,r.width=e.clientWidth,r.height=e.clientHeight,r.x=r.left,r.y=r.top,r}function HT(e,t,r){return t===o7?PS(lX(e,r)):Lf(t)?cX(t,r):PS(uX($d(e)))}function dX(e){var t=e0(r2(e)),r=["absolute","fixed"].indexOf(wc(e).position)>=0,i=r&&xl(e)?yy(e):e;return Lf(i)?t.filter(function(o){return Lf(o)&&l7(o,i)&&Mu(o)!=="body"}):[]}function fX(e,t,r,i){var o=t==="clippingParents"?dX(e):[].concat(t),a=[].concat(o,[r]),s=a[0],l=a.reduce(function(u,c){var d=HT(e,c,i);return u.top=kf(d.top,u.top),u.right=eb(d.right,u.right),u.bottom=eb(d.bottom,u.bottom),u.left=kf(d.left,u.left),u},HT(e,s,i));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function p7(e){var t=e.reference,r=e.element,i=e.placement,o=i?Su(i):null,a=i?Nh(i):null,s=t.x+t.width/2-r.width/2,l=t.y+t.height/2-r.height/2,u;switch(o){case Rs:u={x:s,y:t.y-r.height};break;case Al:u={x:s,y:t.y+t.height};break;case Tl:u={x:t.x+t.width,y:l};break;case Ps:u={x:t.x-r.width,y:l};break;default:u={x:t.x,y:t.y}}var c=o?C6(o):null;if(c!=null){var d=c==="y"?"height":"width";switch(a){case Uh:u[c]=u[c]-(t[d]/2-r[d]/2);break;case D0:u[c]=u[c]+(t[d]/2-r[d]/2);break}}return u}function L0(e,t){t===void 0&&(t={});var r=t,i=r.placement,o=i===void 0?e.placement:i,a=r.strategy,s=a===void 0?e.strategy:a,l=r.boundary,u=l===void 0?MZ:l,c=r.rootBoundary,d=c===void 0?o7:c,p=r.elementContext,v=p===void 0?Zg:p,x=r.altBoundary,b=x===void 0?!1:x,y=r.padding,_=y===void 0?0:y,k=c7(typeof _!="number"?_:d7(_,my)),E=v===Zg?OZ:Zg,B=e.rects.popper,U=e.elements[b?E:v],D=fX(Lf(U)?U:U.contextElement||$d(e.elements.popper),u,d,s),j=Lh(e.elements.reference),F=p7({reference:j,element:B,strategy:"absolute",placement:o}),H=PS(Object.assign({},B,F)),W=v===Zg?H:j,G={top:D.top-W.top+k.top,bottom:W.bottom-D.bottom+k.bottom,left:D.left-W.left+k.left,right:W.right-D.right+k.right},ae=e.modifiersData.offset;if(v===Zg&&ae){var V=ae[o];Object.keys(G).forEach(function(oe){var P=[Tl,Al].indexOf(oe)>=0?1:-1,ee=[Rs,Al].indexOf(oe)>=0?"y":"x";G[oe]+=V[ee]*P})}return G}function pX(e,t){t===void 0&&(t={});var r=t,i=r.placement,o=r.boundary,a=r.rootBoundary,s=r.padding,l=r.flipVariations,u=r.allowedAutoPlacements,c=u===void 0?a7:u,d=Nh(i),p=d?l?jT:jT.filter(function(b){return Nh(b)===d}):my,v=p.filter(function(b){return c.indexOf(b)>=0});v.length===0&&(v=p);var x=v.reduce(function(b,y){return b[y]=L0(e,{placement:y,boundary:o,rootBoundary:a,padding:s})[Su(y)],b},{});return Object.keys(x).sort(function(b,y){return x[b]-x[y]})}function hX(e){if(Su(e)===x6)return[];var t=c1(e);return[zT(e),t,zT(t)]}function gX(e){var t=e.state,r=e.options,i=e.name;if(!t.modifiersData[i]._skip){for(var o=r.mainAxis,a=o===void 0?!0:o,s=r.altAxis,l=s===void 0?!0:s,u=r.fallbackPlacements,c=r.padding,d=r.boundary,p=r.rootBoundary,v=r.altBoundary,x=r.flipVariations,b=x===void 0?!0:x,y=r.allowedAutoPlacements,_=t.options.placement,k=Su(_),E=k===_,B=u||(E||!b?[c1(_)]:hX(_)),U=[_].concat(B).reduce(function(Bt,Rt){return Bt.concat(Su(Rt)===x6?pX(t,{placement:Rt,boundary:d,rootBoundary:p,padding:c,flipVariations:b,allowedAutoPlacements:y}):Rt)},[]),D=t.rects.reference,j=t.rects.popper,F=new Map,H=!0,W=U[0],G=0;G=0,ee=P?"width":"height",le=L0(t,{placement:ae,boundary:d,rootBoundary:p,altBoundary:v,padding:c}),pe=P?oe?Tl:Ps:oe?Al:Rs;D[ee]>j[ee]&&(pe=c1(pe));var _e=c1(pe),J=[];if(a&&J.push(le[V]<=0),l&&J.push(le[pe]<=0,le[_e]<=0),J.every(function(Bt){return Bt})){W=ae,H=!1;break}F.set(ae,J)}if(H)for(var ft=b?3:1,Le=function(Rt){var Jt=U.find(function(vr){var At=F.get(vr);if(At)return At.slice(0,Rt).every(function(kt){return kt})});if(Jt)return W=Jt,"break"},He=ft;He>0;He--){var nr=Le(He);if(nr==="break")break}t.placement!==W&&(t.modifiersData[i]._skip=!0,t.placement=W,t.reset=!0)}}const mX={name:"flip",enabled:!0,phase:"main",fn:gX,requiresIfExists:["offset"],data:{_skip:!1}};function WT(e,t,r){return r===void 0&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function VT(e){return[Rs,Tl,Al,Ps].some(function(t){return e[t]>=0})}function yX(e){var t=e.state,r=e.name,i=t.rects.reference,o=t.rects.popper,a=t.modifiersData.preventOverflow,s=L0(t,{elementContext:"reference"}),l=L0(t,{altBoundary:!0}),u=WT(s,i),c=WT(l,o,a),d=VT(u),p=VT(c);t.modifiersData[r]={referenceClippingOffsets:u,popperEscapeOffsets:c,isReferenceHidden:d,hasPopperEscaped:p},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":p})}const vX={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:yX};function bX(e,t,r){var i=Su(e),o=[Ps,Rs].indexOf(i)>=0?-1:1,a=typeof r=="function"?r(Object.assign({},t,{placement:e})):r,s=a[0],l=a[1];return s=s||0,l=(l||0)*o,[Ps,Tl].indexOf(i)>=0?{x:l,y:s}:{x:s,y:l}}function wX(e){var t=e.state,r=e.options,i=e.name,o=r.offset,a=o===void 0?[0,0]:o,s=a7.reduce(function(d,p){return d[p]=bX(p,t.rects,a),d},{}),l=s[t.placement],u=l.x,c=l.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=u,t.modifiersData.popperOffsets.y+=c),t.modifiersData[i]=s}const xX={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:wX};function _X(e){var t=e.state,r=e.name;t.modifiersData[r]=p7({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const SX={name:"popperOffsets",enabled:!0,phase:"read",fn:_X,data:{}};function CX(e){return e==="x"?"y":"x"}function kX(e){var t=e.state,r=e.options,i=e.name,o=r.mainAxis,a=o===void 0?!0:o,s=r.altAxis,l=s===void 0?!1:s,u=r.boundary,c=r.rootBoundary,d=r.altBoundary,p=r.padding,v=r.tether,x=v===void 0?!0:v,b=r.tetherOffset,y=b===void 0?0:b,_=L0(t,{boundary:u,rootBoundary:c,padding:p,altBoundary:d}),k=Su(t.placement),E=Nh(t.placement),B=!E,U=C6(k),D=CX(U),j=t.modifiersData.popperOffsets,F=t.rects.reference,H=t.rects.popper,W=typeof y=="function"?y(Object.assign({},t.rects,{placement:t.placement})):y,G=typeof W=="number"?{mainAxis:W,altAxis:W}:Object.assign({mainAxis:0,altAxis:0},W),ae=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,V={x:0,y:0};if(!!j){if(a){var oe,P=U==="y"?Rs:Ps,ee=U==="y"?Al:Tl,le=U==="y"?"height":"width",pe=j[U],_e=pe+_[P],J=pe-_[ee],ft=x?-H[le]/2:0,Le=E===Uh?F[le]:H[le],He=E===Uh?-H[le]:-F[le],nr=t.elements.arrow,Bt=x&&nr?S6(nr):{width:0,height:0},Rt=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:u7(),Jt=Rt[P],vr=Rt[ee],At=Jm(0,F[le],Bt[le]),kt=B?F[le]/2-ft-At-Jt-G.mainAxis:Le-At-Jt-G.mainAxis,Ct=B?-F[le]/2+ft+At+vr+G.mainAxis:He+At+vr+G.mainAxis,Lt=t.elements.arrow&&yy(t.elements.arrow),Kt=Lt?U==="y"?Lt.clientTop||0:Lt.clientLeft||0:0,yr=(oe=ae?.[U])!=null?oe:0,ne=pe+kt-yr-Kt,Mt=pe+Ct-yr,Nt=Jm(x?eb(_e,ne):_e,pe,x?kf(J,Mt):J);j[U]=Nt,V[U]=Nt-pe}if(l){var Ie,Ae=U==="x"?Rs:Ps,fe=U==="x"?Al:Tl,Be=j[D],rt=D==="y"?"height":"width",lt=Be+_[Ae],jt=Be-_[fe],ce=[Rs,Ps].indexOf(k)!==-1,ie=(Ie=ae?.[D])!=null?Ie:0,de=ce?lt:Be-F[rt]-H[rt]-ie+G.altAxis,$=ce?Be+F[rt]+H[rt]-ie-G.altAxis:jt,C=x&&ce?YZ(de,Be,$):Jm(x?de:lt,Be,x?$:jt);j[D]=C,V[D]=C-Be}t.modifiersData[i]=V}}const EX={name:"preventOverflow",enabled:!0,phase:"main",fn:kX,requiresIfExists:["offset"]};function AX(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function TX(e){return e===Rl(e)||!xl(e)?k6(e):AX(e)}function IX(e){var t=e.getBoundingClientRect(),r=Dh(t.width)/e.offsetWidth||1,i=Dh(t.height)/e.offsetHeight||1;return r!==1||i!==1}function RX(e,t,r){r===void 0&&(r=!1);var i=xl(t),o=xl(t)&&IX(t),a=$d(t),s=Lh(e,o,r),l={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(i||!i&&!r)&&((Mu(t)!=="body"||A6(a))&&(l=TX(t)),xl(t)?(u=Lh(t,!0),u.x+=t.clientLeft,u.y+=t.clientTop):a&&(u.x=E6(a))),{x:s.left+l.scrollLeft-u.x,y:s.top+l.scrollTop-u.y,width:s.width,height:s.height}}function PX(e){var t=new Map,r=new Set,i=[];e.forEach(function(a){t.set(a.name,a)});function o(a){r.add(a.name);var s=[].concat(a.requires||[],a.requiresIfExists||[]);s.forEach(function(l){if(!r.has(l)){var u=t.get(l);u&&o(u)}}),i.push(a)}return e.forEach(function(a){r.has(a.name)||o(a)}),i}function MX(e){var t=PX(e);return HZ.reduce(function(r,i){return r.concat(t.filter(function(o){return o.phase===i}))},[])}function OX(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function BX(e){var t=e.reduce(function(r,i){var o=r[i.name];return r[i.name]=o?Object.assign({},o,i,{options:Object.assign({},o.options,i.options),data:Object.assign({},o.data,i.data)}):i,r},{});return Object.keys(t).map(function(r){return t[r]})}var qT={placement:"bottom",modifiers:[],strategy:"absolute"};function KT(){for(var e=arguments.length,t=new Array(e),r=0;r{a||l(NX(o)||document.body)},[o,a]),Yl(()=>{if(s&&!a)return Q1(r,s),()=>{Q1(r,null)}},[r,s,a]),a){if(X.exports.isValidElement(i)){const c={ref:u};return X.exports.cloneElement(i,c)}return L(X.exports.Fragment,{children:i})}return L(X.exports.Fragment,{children:s&&ml.exports.createPortal(i,s)})}),h7=jX;function $X(e){return di("MuiPopperUnstyled",e)}ri("MuiPopperUnstyled",["root"]);const FX=["anchorEl","children","component","direction","disablePortal","modifiers","open","ownerState","placement","popperOptions","popperRef","slotProps","slots","TransitionProps"],zX=["anchorEl","children","container","direction","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","style","transition","slotProps","slots"];function HX(e,t){if(t==="ltr")return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}function MS(e){return typeof e=="function"?e():e}function WX(e){return e.nodeType!==void 0}const VX=()=>hi({root:["root"]},$X,{}),qX={},KX=X.exports.forwardRef(function(t,r){var i;const{anchorEl:o,children:a,component:s,direction:l,disablePortal:u,modifiers:c,open:d,ownerState:p,placement:v,popperOptions:x,popperRef:b,slotProps:y={},slots:_={},TransitionProps:k}=t,E=bn(t,FX),B=X.exports.useRef(null),U=Vo(B,r),D=X.exports.useRef(null),j=Vo(D,b),F=X.exports.useRef(j);Yl(()=>{F.current=j},[j]),X.exports.useImperativeHandle(b,()=>D.current,[]);const H=HX(v,l),[W,G]=X.exports.useState(H),[ae,V]=X.exports.useState(MS(o));X.exports.useEffect(()=>{D.current&&D.current.forceUpdate()}),X.exports.useEffect(()=>{o&&V(MS(o))},[o]),Yl(()=>{if(!ae||!d)return;const pe=ft=>{G(ft.placement)};let _e=[{name:"preventOverflow",options:{altBoundary:u}},{name:"flip",options:{altBoundary:u}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:ft})=>{pe(ft)}}];c!=null&&(_e=_e.concat(c)),x&&x.modifiers!=null&&(_e=_e.concat(x.modifiers));const J=LX(ae,B.current,De({placement:H},x,{modifiers:_e}));return F.current(J),()=>{J.destroy(),F.current(null)}},[ae,u,c,d,x,H]);const oe={placement:W};k!==null&&(oe.TransitionProps=k);const P=VX(),ee=(i=s??_.root)!=null?i:"div",le=IS({elementType:ee,externalSlotProps:y.root,externalForwardedProps:E,additionalProps:{role:"tooltip",ref:U},ownerState:De({},t,p),className:P.root});return L(ee,De({},le,{children:typeof a=="function"?a(oe):a}))}),GX=X.exports.forwardRef(function(t,r){const{anchorEl:i,children:o,container:a,direction:s="ltr",disablePortal:l=!1,keepMounted:u=!1,modifiers:c,open:d,placement:p="bottom",popperOptions:v=qX,popperRef:x,style:b,transition:y=!1,slotProps:_={},slots:k={}}=t,E=bn(t,zX),[B,U]=X.exports.useState(!0),D=()=>{U(!1)},j=()=>{U(!0)};if(!u&&!d&&(!y||B))return null;let F;if(a)F=a;else if(i){const G=MS(i);F=G&&WX(G)?ya(G).body:ya(null).body}const H=!d&&u&&(!y||B)?"none":void 0,W=y?{in:d,onEnter:D,onExited:j}:void 0;return L(h7,{disablePortal:l,container:F,children:L(KX,De({anchorEl:i,direction:s,disablePortal:l,modifiers:c,ref:r,open:y?!B:d,placement:p,popperOptions:v,popperRef:x,slotProps:_,slots:k},E,{style:De({position:"fixed",top:0,left:0,display:H},b),TransitionProps:W,children:o}))})}),YX=GX;function QX(e){const t=ya(e);return t.body===e?El(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function t0(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function GT(e){return parseInt(El(e).getComputedStyle(e).paddingRight,10)||0}function ZX(e){const r=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName)!==-1,i=e.tagName==="INPUT"&&e.getAttribute("type")==="hidden";return r||i}function YT(e,t,r,i,o){const a=[t,r,...i];[].forEach.call(e.children,s=>{const l=a.indexOf(s)===-1,u=!ZX(s);l&&u&&t0(s,o)})}function V_(e,t){let r=-1;return e.some((i,o)=>t(i)?(r=o,!0):!1),r}function XX(e,t){const r=[],i=e.container;if(!t.disableScrollLock){if(QX(i)){const s=EU(ya(i));r.push({value:i.style.paddingRight,property:"padding-right",el:i}),i.style.paddingRight=`${GT(i)+s}px`;const l=ya(i).querySelectorAll(".mui-fixed");[].forEach.call(l,u=>{r.push({value:u.style.paddingRight,property:"padding-right",el:u}),u.style.paddingRight=`${GT(u)+s}px`})}let a;if(i.parentNode instanceof DocumentFragment)a=ya(i).body;else{const s=i.parentElement,l=El(i);a=s?.nodeName==="HTML"&&l.getComputedStyle(s).overflowY==="scroll"?s:i}r.push({value:a.style.overflow,property:"overflow",el:a},{value:a.style.overflowX,property:"overflow-x",el:a},{value:a.style.overflowY,property:"overflow-y",el:a}),a.style.overflow="hidden"}return()=>{r.forEach(({value:a,el:s,property:l})=>{a?s.style.setProperty(l,a):s.style.removeProperty(l)})}}function JX(e){const t=[];return[].forEach.call(e.children,r=>{r.getAttribute("aria-hidden")==="true"&&t.push(r)}),t}class eJ{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(t,r){let i=this.modals.indexOf(t);if(i!==-1)return i;i=this.modals.length,this.modals.push(t),t.modalRef&&t0(t.modalRef,!1);const o=JX(r);YT(r,t.mount,t.modalRef,o,!0);const a=V_(this.containers,s=>s.container===r);return a!==-1?(this.containers[a].modals.push(t),i):(this.containers.push({modals:[t],container:r,restore:null,hiddenSiblings:o}),i)}mount(t,r){const i=V_(this.containers,a=>a.modals.indexOf(t)!==-1),o=this.containers[i];o.restore||(o.restore=XX(o,r))}remove(t,r=!0){const i=this.modals.indexOf(t);if(i===-1)return i;const o=V_(this.containers,s=>s.modals.indexOf(t)!==-1),a=this.containers[o];if(a.modals.splice(a.modals.indexOf(t),1),this.modals.splice(i,1),a.modals.length===0)a.restore&&a.restore(),t.modalRef&&t0(t.modalRef,r),YT(a.container,t.mount,t.modalRef,a.hiddenSiblings,!1),this.containers.splice(o,1);else{const s=a.modals[a.modals.length-1];s.modalRef&&t0(s.modalRef,!1)}return i}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}function tJ(e){return di("MuiModal",e)}ri("MuiModal",["root","hidden"]);const rJ=["children","classes","closeAfterTransition","component","container","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","manager","onBackdropClick","onClose","onKeyDown","open","onTransitionEnter","onTransitionExited","slotProps","slots"],nJ=e=>{const{open:t,exited:r,classes:i}=e;return hi({root:["root",!t&&r&&"hidden"],backdrop:["backdrop"]},tJ,i)};function iJ(e){return typeof e=="function"?e():e}function oJ(e){return e?e.props.hasOwnProperty("in"):!1}const aJ=new eJ,sJ=X.exports.forwardRef(function(t,r){var i,o;const{children:a,classes:s,closeAfterTransition:l=!1,component:u,container:c,disableAutoFocus:d=!1,disableEnforceFocus:p=!1,disableEscapeKeyDown:v=!1,disablePortal:x=!1,disableRestoreFocus:b=!1,disableScrollLock:y=!1,hideBackdrop:_=!1,keepMounted:k=!1,manager:E=aJ,onBackdropClick:B,onClose:U,onKeyDown:D,open:j,onTransitionEnter:F,onTransitionExited:H,slotProps:W={},slots:G={}}=t,ae=bn(t,rJ),[V,oe]=X.exports.useState(!j),P=X.exports.useRef({}),ee=X.exports.useRef(null),le=X.exports.useRef(null),pe=Vo(le,r),_e=oJ(a),J=(i=t["aria-hidden"])!=null?i:!0,ft=()=>ya(ee.current),Le=()=>(P.current.modalRef=le.current,P.current.mountNode=ee.current,P.current),He=()=>{E.mount(Le(),{disableScrollLock:y}),le.current&&(le.current.scrollTop=0)},nr=bl(()=>{const Ae=iJ(c)||ft().body;E.add(Le(),Ae),le.current&&He()}),Bt=X.exports.useCallback(()=>E.isTopModal(Le()),[E]),Rt=bl(Ae=>{ee.current=Ae,!(!Ae||!le.current)&&(j&&Bt()?He():t0(le.current,J))}),Jt=X.exports.useCallback(()=>{E.remove(Le(),J)},[E,J]);X.exports.useEffect(()=>()=>{Jt()},[Jt]),X.exports.useEffect(()=>{j?nr():(!_e||!l)&&Jt()},[j,Jt,_e,l,nr]);const vr=De({},t,{classes:s,closeAfterTransition:l,disableAutoFocus:d,disableEnforceFocus:p,disableEscapeKeyDown:v,disablePortal:x,disableRestoreFocus:b,disableScrollLock:y,exited:V,hideBackdrop:_,keepMounted:k}),At=nJ(vr),kt=()=>{oe(!1),F&&F()},Ct=()=>{oe(!0),H&&H(),l&&Jt()},Lt=Ae=>{Ae.target===Ae.currentTarget&&(B&&B(Ae),U&&U(Ae,"backdropClick"))},Kt=Ae=>{D&&D(Ae),!(Ae.key!=="Escape"||!Bt())&&(v||(Ae.stopPropagation(),U&&U(Ae,"escapeKeyDown")))},yr={};a.props.tabIndex===void 0&&(yr.tabIndex="-1"),_e&&(yr.onEnter=_S(kt,a.props.onEnter),yr.onExited=_S(Ct,a.props.onExited));const ne=(o=u??G.root)!=null?o:"div",Mt=IS({elementType:ne,externalSlotProps:W.root,externalForwardedProps:ae,additionalProps:{ref:pe,role:"presentation",onKeyDown:Kt},className:At.root,ownerState:vr}),Nt=G.backdrop,Ie=IS({elementType:Nt,externalSlotProps:W.backdrop,additionalProps:{"aria-hidden":!0,onClick:Lt,open:j},className:At.backdrop,ownerState:vr});return!k&&!j&&(!_e||V)?null:L(h7,{ref:Rt,container:c,disablePortal:x,children:Ut(ne,De({},Mt,{children:[!_&&Nt?L(Nt,De({},Ie)):null,L(PZ,{disableEnforceFocus:p,disableAutoFocus:d,disableRestoreFocus:b,isEnabled:Bt,open:j,children:X.exports.cloneElement(a,yr)})]}))})}),lJ=sJ,uJ=["onChange","maxRows","minRows","style","value"];function xv(e,t){return parseInt(e[t],10)||0}const cJ={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function QT(e){return e==null||Object.keys(e).length===0}const dJ=X.exports.forwardRef(function(t,r){const{onChange:i,maxRows:o,minRows:a=1,style:s,value:l}=t,u=bn(t,uJ),{current:c}=X.exports.useRef(l!=null),d=X.exports.useRef(null),p=Vo(r,d),v=X.exports.useRef(null),x=X.exports.useRef(0),[b,y]=X.exports.useState({}),_=X.exports.useCallback(()=>{const D=d.current,F=El(D).getComputedStyle(D);if(F.width==="0px")return{};const H=v.current;H.style.width=F.width,H.value=D.value||t.placeholder||"x",H.value.slice(-1)===` `&&(H.value+=" ");const W=F["box-sizing"],G=xv(F,"padding-bottom")+xv(F,"padding-top"),ae=xv(F,"border-bottom-width")+xv(F,"border-top-width"),V=H.scrollHeight;H.value="x";const oe=H.scrollHeight;let P=V;a&&(P=Math.max(Number(a)*oe,P)),o&&(P=Math.min(Number(o)*oe,P)),P=Math.max(P,oe);const ee=P+(W==="border-box"?G+ae:0),le=Math.abs(P-V)<=1;return{outerHeightStyle:ee,overflow:le}},[o,a,t.placeholder]),k=(D,j)=>{const{outerHeightStyle:F,overflow:H}=j;return x.current<20&&(F>0&&Math.abs((D.outerHeightStyle||0)-F)>1||D.overflow!==H)?(x.current+=1,{overflow:H,outerHeightStyle:F}):D},E=X.exports.useCallback(()=>{const D=_();QT(D)||y(j=>k(j,D))},[_]),B=()=>{const D=_();QT(D)||ml.exports.flushSync(()=>{y(j=>k(j,D))})};X.exports.useEffect(()=>{const D=Uf(()=>{x.current=0,d.current&&B()}),j=El(d.current);j.addEventListener("resize",D);let F;return typeof ResizeObserver<"u"&&(F=new ResizeObserver(D),F.observe(d.current)),()=>{D.clear(),j.removeEventListener("resize",D),F&&F.disconnect()}}),Yl(()=>{E()}),X.exports.useEffect(()=>{x.current=0},[l]);const U=D=>{x.current=0,c||E(),i&&i(D)};return Ut(X.exports.Fragment,{children:[L("textarea",De({value:l,onChange:U,ref:p,rows:a,style:De({height:b.outerHeightStyle,overflow:b.overflow?"hidden":null},s)},u)),L("textarea",{"aria-hidden":!0,className:t.className,readOnly:!0,ref:v,tabIndex:-1,style:De({},cJ.shadow,s,{padding:0})})]})}),fJ=dJ;function pJ(e){return di("MuiSvgIcon",e)}ri("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const hJ=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],gJ=e=>{const{color:t,fontSize:r,classes:i}=e,o={root:["root",t!=="inherit"&&`color${Qr(t)}`,`fontSize${Qr(r)}`]};return hi(o,pJ,i)},mJ=sr("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color!=="inherit"&&t[`color${Qr(r.color)}`],t[`fontSize${Qr(r.fontSize)}`]]}})(({theme:e,ownerState:t})=>{var r,i,o,a,s,l,u,c,d,p,v,x,b,y,_,k,E;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0,transition:(r=e.transitions)==null||(i=r.create)==null?void 0:i.call(r,"fill",{duration:(o=e.transitions)==null||(a=o.duration)==null?void 0:a.shorter}),fontSize:{inherit:"inherit",small:((s=e.typography)==null||(l=s.pxToRem)==null?void 0:l.call(s,20))||"1.25rem",medium:((u=e.typography)==null||(c=u.pxToRem)==null?void 0:c.call(u,24))||"1.5rem",large:((d=e.typography)==null||(p=d.pxToRem)==null?void 0:p.call(d,35))||"2.1875rem"}[t.fontSize],color:(v=(x=(e.vars||e).palette)==null||(b=x[t.color])==null?void 0:b.main)!=null?v:{action:(y=(e.vars||e).palette)==null||(_=y.action)==null?void 0:_.active,disabled:(k=(e.vars||e).palette)==null||(E=k.action)==null?void 0:E.disabled,inherit:void 0}[t.color]}}),g7=X.exports.forwardRef(function(t,r){const i=gi({props:t,name:"MuiSvgIcon"}),{children:o,className:a,color:s="inherit",component:l="svg",fontSize:u="medium",htmlColor:c,inheritViewBox:d=!1,titleAccess:p,viewBox:v="0 0 24 24"}=i,x=bn(i,hJ),b=De({},i,{color:s,component:l,fontSize:u,instanceFontSize:t.fontSize,inheritViewBox:d,viewBox:v}),y={};d||(y.viewBox=v);const _=gJ(b);return Ut(mJ,De({as:l,className:pn(_.root,a),focusable:"false",color:c,"aria-hidden":p?void 0:!0,role:p?"img":void 0,ref:r},y,x,{ownerState:b,children:[o,p?L("title",{children:p}):null]}))});g7.muiName="SvgIcon";const jh=g7;function Nu(e,t){function r(i,o){return L(jh,De({"data-testid":`${t}Icon`,ref:o},i,{children:e}))}return r.muiName=jh.muiName,X.exports.memo(X.exports.forwardRef(r))}const yJ={configure:e=>{t6.configure(e)}},vJ=Object.freeze(Object.defineProperty({__proto__:null,unstable_ClassNameGenerator:yJ,capitalize:Qr,createChainedFunction:_S,createSvgIcon:Nu,debounce:Uf,deprecatedPropType:ZK,isMuiElement:a1,ownerDocument:ya,ownerWindow:El,requirePropFactory:XK,setRef:Q1,unstable_useEnhancedEffect:Yl,unstable_useId:Iw,unsupportedProp:tG,useControlled:R0,useEventCallback:bl,useForkRef:Vo,useIsFocusVisible:Pw},Symbol.toStringTag,{value:"Module"}));function OS(e,t){return OS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,o){return i.__proto__=o,i},OS(e,t)}function m7(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,OS(e,t)}const ZT={disabled:!1},tb=Gn.createContext(null);var bJ=function(t){return t.scrollTop},Dm="unmounted",sf="exited",lf="entering",Wp="entered",BS="exiting",Ec=function(e){m7(t,e);function t(i,o){var a;a=e.call(this,i,o)||this;var s=o,l=s&&!s.isMounting?i.enter:i.appear,u;return a.appearStatus=null,i.in?l?(u=sf,a.appearStatus=lf):u=Wp:i.unmountOnExit||i.mountOnEnter?u=Dm:u=sf,a.state={status:u},a.nextCallback=null,a}t.getDerivedStateFromProps=function(o,a){var s=o.in;return s&&a.status===Dm?{status:sf}:null};var r=t.prototype;return r.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},r.componentDidUpdate=function(o){var a=null;if(o!==this.props){var s=this.state.status;this.props.in?s!==lf&&s!==Wp&&(a=lf):(s===lf||s===Wp)&&(a=BS)}this.updateStatus(!1,a)},r.componentWillUnmount=function(){this.cancelNextCallback()},r.getTimeouts=function(){var o=this.props.timeout,a,s,l;return a=s=l=o,o!=null&&typeof o!="number"&&(a=o.exit,s=o.enter,l=o.appear!==void 0?o.appear:s),{exit:a,enter:s,appear:l}},r.updateStatus=function(o,a){if(o===void 0&&(o=!1),a!==null)if(this.cancelNextCallback(),a===lf){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:vv.findDOMNode(this);s&&bJ(s)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===sf&&this.setState({status:Dm})},r.performEnter=function(o){var a=this,s=this.props.enter,l=this.context?this.context.isMounting:o,u=this.props.nodeRef?[l]:[vv.findDOMNode(this),l],c=u[0],d=u[1],p=this.getTimeouts(),v=l?p.appear:p.enter;if(!o&&!s||ZT.disabled){this.safeSetState({status:Wp},function(){a.props.onEntered(c)});return}this.props.onEnter(c,d),this.safeSetState({status:lf},function(){a.props.onEntering(c,d),a.onTransitionEnd(v,function(){a.safeSetState({status:Wp},function(){a.props.onEntered(c,d)})})})},r.performExit=function(){var o=this,a=this.props.exit,s=this.getTimeouts(),l=this.props.nodeRef?void 0:vv.findDOMNode(this);if(!a||ZT.disabled){this.safeSetState({status:sf},function(){o.props.onExited(l)});return}this.props.onExit(l),this.safeSetState({status:BS},function(){o.props.onExiting(l),o.onTransitionEnd(s.exit,function(){o.safeSetState({status:sf},function(){o.props.onExited(l)})})})},r.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},r.safeSetState=function(o,a){a=this.setNextCallback(a),this.setState(o,a)},r.setNextCallback=function(o){var a=this,s=!0;return this.nextCallback=function(l){s&&(s=!1,a.nextCallback=null,o(l))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},r.onTransitionEnd=function(o,a){this.setNextCallback(a);var s=this.props.nodeRef?this.props.nodeRef.current:vv.findDOMNode(this),l=o==null&&!this.props.addEndListener;if(!s||l){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var u=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],c=u[0],d=u[1];this.props.addEndListener(c,d)}o!=null&&setTimeout(this.nextCallback,o)},r.render=function(){var o=this.state.status;if(o===Dm)return null;var a=this.props,s=a.children;a.in,a.mountOnEnter,a.unmountOnExit,a.appear,a.enter,a.exit,a.timeout,a.addEndListener,a.onEnter,a.onEntering,a.onEntered,a.onExit,a.onExiting,a.onExited,a.nodeRef;var l=bn(a,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return L(tb.Provider,{value:null,children:typeof s=="function"?s(o,l):Gn.cloneElement(Gn.Children.only(s),l)})},t}(Gn.Component);Ec.contextType=tb;Ec.propTypes={};function Bp(){}Ec.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Bp,onEntering:Bp,onEntered:Bp,onExit:Bp,onExiting:Bp,onExited:Bp};Ec.UNMOUNTED=Dm;Ec.EXITED=sf;Ec.ENTERING=lf;Ec.ENTERED=Wp;Ec.EXITING=BS;const n2=Ec;function wJ(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function T6(e,t){var r=function(a){return t&&X.exports.isValidElement(a)?t(a):a},i=Object.create(null);return e&&X.exports.Children.map(e,function(o){return o}).forEach(function(o){i[o.key]=r(o)}),i}function xJ(e,t){e=e||{},t=t||{};function r(d){return d in t?t[d]:e[d]}var i=Object.create(null),o=[];for(var a in e)a in t?o.length&&(i[a]=o,o=[]):o.push(a);var s,l={};for(var u in t){if(i[u])for(s=0;se.scrollTop;function Ed(e,t){var r,i;const{timeout:o,easing:a,style:s={}}=e;return{duration:(r=s.transitionDuration)!=null?r:typeof o=="number"?o:o[t.mode]||0,easing:(i=s.transitionTimingFunction)!=null?i:typeof a=="object"?a[t.mode]:a,delay:s.transitionDelay}}function AJ(e){return di("MuiCollapse",e)}ri("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);const TJ=["addEndListener","children","className","collapsedSize","component","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","orientation","style","timeout","TransitionComponent"],IJ=e=>{const{orientation:t,classes:r}=e,i={root:["root",`${t}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${t}`],wrapperInner:["wrapperInner",`${t}`]};return hi(i,AJ,r)},RJ=sr("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.orientation],r.state==="entered"&&t.entered,r.state==="exited"&&!r.in&&r.collapsedSize==="0px"&&t.hidden]}})(({theme:e,ownerState:t})=>De({height:0,overflow:"hidden",transition:e.transitions.create("height")},t.orientation==="horizontal"&&{height:"auto",width:0,transition:e.transitions.create("width")},t.state==="entered"&&De({height:"auto",overflow:"visible"},t.orientation==="horizontal"&&{width:"auto"}),t.state==="exited"&&!t.in&&t.collapsedSize==="0px"&&{visibility:"hidden"})),PJ=sr("div",{name:"MuiCollapse",slot:"Wrapper",overridesResolver:(e,t)=>t.wrapper})(({ownerState:e})=>De({display:"flex",width:"100%"},e.orientation==="horizontal"&&{width:"auto",height:"100%"})),MJ=sr("div",{name:"MuiCollapse",slot:"WrapperInner",overridesResolver:(e,t)=>t.wrapperInner})(({ownerState:e})=>De({width:"100%"},e.orientation==="horizontal"&&{width:"auto",height:"100%"})),y7=X.exports.forwardRef(function(t,r){const i=gi({props:t,name:"MuiCollapse"}),{addEndListener:o,children:a,className:s,collapsedSize:l="0px",component:u,easing:c,in:d,onEnter:p,onEntered:v,onEntering:x,onExit:b,onExited:y,onExiting:_,orientation:k="vertical",style:E,timeout:B=i7.standard,TransitionComponent:U=n2}=i,D=bn(i,TJ),j=De({},i,{orientation:k,collapsedSize:l}),F=IJ(j),H=la(),W=X.exports.useRef(),G=X.exports.useRef(null),ae=X.exports.useRef(),V=typeof l=="number"?`${l}px`:l,oe=k==="horizontal",P=oe?"width":"height";X.exports.useEffect(()=>()=>{clearTimeout(W.current)},[]);const ee=X.exports.useRef(null),le=Vo(r,ee),pe=Jt=>vr=>{if(Jt){const At=ee.current;vr===void 0?Jt(At):Jt(At,vr)}},_e=()=>G.current?G.current[oe?"clientWidth":"clientHeight"]:0,J=pe((Jt,vr)=>{G.current&&oe&&(G.current.style.position="absolute"),Jt.style[P]=V,p&&p(Jt,vr)}),ft=pe((Jt,vr)=>{const At=_e();G.current&&oe&&(G.current.style.position="");const{duration:kt,easing:Ct}=Ed({style:E,timeout:B,easing:c},{mode:"enter"});if(B==="auto"){const Lt=H.transitions.getAutoHeightDuration(At);Jt.style.transitionDuration=`${Lt}ms`,ae.current=Lt}else Jt.style.transitionDuration=typeof kt=="string"?kt:`${kt}ms`;Jt.style[P]=`${At}px`,Jt.style.transitionTimingFunction=Ct,x&&x(Jt,vr)}),Le=pe((Jt,vr)=>{Jt.style[P]="auto",v&&v(Jt,vr)}),He=pe(Jt=>{Jt.style[P]=`${_e()}px`,b&&b(Jt)}),nr=pe(y),Bt=pe(Jt=>{const vr=_e(),{duration:At,easing:kt}=Ed({style:E,timeout:B,easing:c},{mode:"exit"});if(B==="auto"){const Ct=H.transitions.getAutoHeightDuration(vr);Jt.style.transitionDuration=`${Ct}ms`,ae.current=Ct}else Jt.style.transitionDuration=typeof At=="string"?At:`${At}ms`;Jt.style[P]=V,Jt.style.transitionTimingFunction=kt,_&&_(Jt)});return L(U,De({in:d,onEnter:J,onEntered:Le,onEntering:ft,onExit:He,onExited:nr,onExiting:Bt,addEndListener:Jt=>{B==="auto"&&(W.current=setTimeout(Jt,ae.current||0)),o&&o(ee.current,Jt)},nodeRef:ee,timeout:B==="auto"?null:B},D,{children:(Jt,vr)=>L(RJ,De({as:u,className:pn(F.root,s,{entered:F.entered,exited:!d&&V==="0px"&&F.hidden}[Jt]),style:De({[oe?"minWidth":"minHeight"]:V},E),ownerState:De({},j,{state:Jt}),ref:le},vr,{children:L(PJ,{ownerState:De({},j,{state:Jt}),className:F.wrapper,ref:G,children:L(MJ,{ownerState:De({},j,{state:Jt}),className:F.wrapperInner,children:a})})}))}))});y7.muiSupportAuto=!0;const OJ=y7;function BJ(e){return di("MuiPaper",e)}ri("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const UJ=["className","component","elevation","square","variant"],DJ=e=>{const{square:t,elevation:r,variant:i,classes:o}=e,a={root:["root",i,!t&&"rounded",i==="elevation"&&`elevation${r}`]};return hi(a,BJ,o)},LJ=sr("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],!r.square&&t.rounded,r.variant==="elevation"&&t[`elevation${r.elevation}`]]}})(({theme:e,ownerState:t})=>{var r;return De({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow")},!t.square&&{borderRadius:e.shape.borderRadius},t.variant==="outlined"&&{border:`1px solid ${(e.vars||e).palette.divider}`},t.variant==="elevation"&&De({boxShadow:(e.vars||e).shadows[t.elevation]},!e.vars&&e.palette.mode==="dark"&&{backgroundImage:`linear-gradient(${Zi("#fff",DT(t.elevation))}, ${Zi("#fff",DT(t.elevation))})`},e.vars&&{backgroundImage:(r=e.vars.overlays)==null?void 0:r[t.elevation]}))}),NJ=X.exports.forwardRef(function(t,r){const i=gi({props:t,name:"MuiPaper"}),{className:o,component:a="div",elevation:s=1,square:l=!1,variant:u="elevation"}=i,c=bn(i,UJ),d=De({},i,{component:a,elevation:s,square:l,variant:u}),p=DJ(d);return L(LJ,De({as:a,ownerState:d,className:pn(p.root,o),ref:r},c))}),ag=NJ;function jJ(e){const{className:t,classes:r,pulsate:i=!1,rippleX:o,rippleY:a,rippleSize:s,in:l,onExited:u,timeout:c}=e,[d,p]=X.exports.useState(!1),v=pn(t,r.ripple,r.rippleVisible,i&&r.ripplePulsate),x={width:s,height:s,top:-(s/2)+a,left:-(s/2)+o},b=pn(r.child,d&&r.childLeaving,i&&r.childPulsate);return!l&&!d&&p(!0),X.exports.useEffect(()=>{if(!l&&u!=null){const y=setTimeout(u,c);return()=>{clearTimeout(y)}}},[u,l,c]),L("span",{className:v,style:x,children:L("span",{className:b})})}const $J=ri("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),fl=$J,FJ=["center","classes","className"];let i2=e=>e,XT,JT,eI,tI;const US=550,zJ=80,HJ=pp(XT||(XT=i2` 0% { transform: scale(0); @@ -250,7 +250,7 @@ Error generating stack: `+a.message+` top: 0; } `),Kie,(t.vars||t).palette.action.hover)),Yie=X.exports.forwardRef(function(t,r){const i=gi({props:t,name:"MuiSkeleton"}),{animation:o="pulse",className:a,component:s="span",height:l,style:u,variant:c="text",width:d}=i,p=bn(i,Wie),v=De({},i,{animation:o,component:s,variant:c,hasChildren:Boolean(p.children)}),x=Vie(v);return L(Gie,De({as:s,ref:r,className:pn(x.root,a),ownerState:v},p,{style:De({width:d,height:l},u)}))}),Xa=Yie;function Qie(e){return di("MuiTooltip",e)}const Zie=ri("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]),ed=Zie,Xie=["arrow","children","classes","components","componentsProps","describeChild","disableFocusListener","disableHoverListener","disableInteractive","disableTouchListener","enterDelay","enterNextDelay","enterTouchDelay","followCursor","id","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperComponent","PopperProps","slotProps","slots","title","TransitionComponent","TransitionProps"];function Jie(e){return Math.round(e*1e5)/1e5}const eoe=e=>{const{classes:t,disableInteractive:r,arrow:i,touch:o,placement:a}=e,s={popper:["popper",!r&&"popperInteractive",i&&"popperArrow"],tooltip:["tooltip",i&&"tooltipArrow",o&&"touch",`tooltipPlacement${Qr(a.split("-")[0])}`],arrow:["arrow"]};return hi(s,Qie,t)},toe=sr(v7,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.popper,!r.disableInteractive&&t.popperInteractive,r.arrow&&t.popperArrow,!r.open&&t.popperClose]}})(({theme:e,ownerState:t,open:r})=>De({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none"},!t.disableInteractive&&{pointerEvents:"auto"},!r&&{pointerEvents:"none"},t.arrow&&{[`&[data-popper-placement*="bottom"] .${ed.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${ed.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${ed.arrow}`]:De({},t.isRtl?{right:0,marginRight:"-0.71em"}:{left:0,marginLeft:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}}),[`&[data-popper-placement*="left"] .${ed.arrow}`]:De({},t.isRtl?{left:0,marginLeft:"-0.71em"}:{right:0,marginRight:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}})})),roe=sr("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.tooltip,r.touch&&t.touch,r.arrow&&t.tooltipArrow,t[`tooltipPlacement${Qr(r.placement.split("-")[0])}`]]}})(({theme:e,ownerState:t})=>De({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:Zi(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium},t.arrow&&{position:"relative",margin:0},t.touch&&{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:`${Jie(16/14)}em`,fontWeight:e.typography.fontWeightRegular},{[`.${ed.popper}[data-popper-placement*="left"] &`]:De({transformOrigin:"right center"},t.isRtl?De({marginLeft:"14px"},t.touch&&{marginLeft:"24px"}):De({marginRight:"14px"},t.touch&&{marginRight:"24px"})),[`.${ed.popper}[data-popper-placement*="right"] &`]:De({transformOrigin:"left center"},t.isRtl?De({marginRight:"14px"},t.touch&&{marginRight:"24px"}):De({marginLeft:"14px"},t.touch&&{marginLeft:"24px"})),[`.${ed.popper}[data-popper-placement*="top"] &`]:De({transformOrigin:"center bottom",marginBottom:"14px"},t.touch&&{marginBottom:"24px"}),[`.${ed.popper}[data-popper-placement*="bottom"] &`]:De({transformOrigin:"center top",marginTop:"14px"},t.touch&&{marginTop:"24px"})})),noe=sr("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(e,t)=>t.arrow})(({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:Zi(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}}));let Ev=!1,Q_=null;function Av(e,t){return r=>{t&&t(r),e(r)}}const ioe=X.exports.forwardRef(function(t,r){var i,o,a,s,l,u,c,d,p,v,x,b,y,_,k,E,B,U,D;const j=gi({props:t,name:"MuiTooltip"}),{arrow:F=!1,children:H,components:W={},componentsProps:G={},describeChild:ae=!1,disableFocusListener:V=!1,disableHoverListener:oe=!1,disableInteractive:P=!1,disableTouchListener:ee=!1,enterDelay:le=100,enterNextDelay:pe=0,enterTouchDelay:_e=700,followCursor:J=!1,id:ft,leaveDelay:Le=0,leaveTouchDelay:He=1500,onClose:nr,onOpen:Bt,open:Rt,placement:Jt="bottom",PopperComponent:vr,PopperProps:At={},slotProps:kt={},slots:Ct={},title:Lt,TransitionComponent:Kt=LS,TransitionProps:yr}=j,ne=bn(j,Xie),Mt=la(),Nt=Mt.direction==="rtl",[Ie,Ae]=X.exports.useState(),[fe,Be]=X.exports.useState(null),rt=X.exports.useRef(!1),lt=P||J,jt=X.exports.useRef(),ce=X.exports.useRef(),ie=X.exports.useRef(),de=X.exports.useRef(),[$,C]=R0({controlled:Rt,default:!1,name:"Tooltip",state:"open"});let T=$;const Q=Iw(ft),ve=X.exports.useRef(),je=X.exports.useCallback(()=>{ve.current!==void 0&&(document.body.style.WebkitUserSelect=ve.current,ve.current=void 0),clearTimeout(de.current)},[]);X.exports.useEffect(()=>()=>{clearTimeout(jt.current),clearTimeout(ce.current),clearTimeout(ie.current),je()},[je]);const ct=it=>{clearTimeout(Q_),Ev=!0,C(!0),Bt&&!T&&Bt(it)},ur=bl(it=>{clearTimeout(Q_),Q_=setTimeout(()=>{Ev=!1},800+Le),C(!1),nr&&T&&nr(it),clearTimeout(jt.current),jt.current=setTimeout(()=>{rt.current=!1},Mt.transitions.duration.shortest)}),Dr=it=>{rt.current&&it.type!=="touchstart"||(Ie&&Ie.removeAttribute("title"),clearTimeout(ce.current),clearTimeout(ie.current),le||Ev&&pe?ce.current=setTimeout(()=>{ct(it)},Ev?pe:le):ct(it))},hr=it=>{clearTimeout(ce.current),clearTimeout(ie.current),ie.current=setTimeout(()=>{ur(it)},Le)},{isFocusVisibleRef:Rr,onBlur:Gr,onFocus:Nr,ref:Kn}=Pw(),[,Tn]=X.exports.useState(!1),In=it=>{Gr(it),Rr.current===!1&&(Tn(!1),hr(it))},yt=it=>{Ie||Ae(it.currentTarget),Nr(it),Rr.current===!0&&(Tn(!0),Dr(it))},Ei=it=>{rt.current=!0;const dt=H.props;dt.onTouchStart&&dt.onTouchStart(it)},Yn=Dr,Pi=hr,Ji=it=>{Ei(it),clearTimeout(ie.current),clearTimeout(jt.current),je(),ve.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",de.current=setTimeout(()=>{document.body.style.WebkitUserSelect=ve.current,Dr(it)},_e)},qo=it=>{H.props.onTouchEnd&&H.props.onTouchEnd(it),je(),clearTimeout(ie.current),ie.current=setTimeout(()=>{ur(it)},He)};X.exports.useEffect(()=>{if(!T)return;function it(dt){(dt.key==="Escape"||dt.key==="Esc")&&ur(dt)}return document.addEventListener("keydown",it),()=>{document.removeEventListener("keydown",it)}},[ur,T]);const eo=Vo(H.ref,Kn,Ae,r);!Lt&&Lt!==0&&(T=!1);const Mo=X.exports.useRef({x:0,y:0}),Wi=X.exports.useRef(),pa=it=>{const dt=H.props;dt.onMouseMove&&dt.onMouseMove(it),Mo.current={x:it.clientX,y:it.clientY},Wi.current&&Wi.current.update()},ue={},Re=typeof Lt=="string";ae?(ue.title=!T&&Re&&!oe?Lt:null,ue["aria-describedby"]=T?Q:null):(ue["aria-label"]=Re?Lt:null,ue["aria-labelledby"]=T&&!Re?Q:null);const Ee=De({},ue,ne,H.props,{className:pn(ne.className,H.props.className),onTouchStart:Ei,ref:eo},J?{onMouseMove:pa}:{}),q={};ee||(Ee.onTouchStart=Ji,Ee.onTouchEnd=qo),oe||(Ee.onMouseOver=Av(Yn,Ee.onMouseOver),Ee.onMouseLeave=Av(Pi,Ee.onMouseLeave),lt||(q.onMouseOver=Yn,q.onMouseLeave=Pi)),V||(Ee.onFocus=Av(yt,Ee.onFocus),Ee.onBlur=Av(In,Ee.onBlur),lt||(q.onFocus=yt,q.onBlur=In));const Fe=X.exports.useMemo(()=>{var it;let dt=[{name:"arrow",enabled:Boolean(fe),options:{element:fe,padding:4}}];return(it=At.popperOptions)!=null&&it.modifiers&&(dt=dt.concat(At.popperOptions.modifiers)),De({},At.popperOptions,{modifiers:dt})},[fe,At]),Xt=De({},j,{isRtl:Nt,arrow:F,disableInteractive:lt,placement:Jt,PopperComponentProp:vr,touch:rt.current}),ar=eoe(Xt),Br=(i=(o=Ct.popper)!=null?o:W.Popper)!=null?i:toe,Hr=(a=(s=(l=Ct.transition)!=null?l:W.Transition)!=null?s:Kt)!=null?a:LS,An=(u=(c=Ct.tooltip)!=null?c:W.Tooltip)!=null?u:roe,un=(d=(p=Ct.arrow)!=null?p:W.Arrow)!=null?d:noe,vt=Um(Br,De({},At,(v=kt.popper)!=null?v:G.popper,{className:pn(ar.popper,At?.className,(x=(b=kt.popper)!=null?b:G.popper)==null?void 0:x.className)}),Xt),K=Um(Hr,De({},yr,(y=kt.transition)!=null?y:G.transition),Xt),ye=Um(An,De({},(_=kt.tooltip)!=null?_:G.tooltip,{className:pn(ar.tooltip,(k=(E=kt.tooltip)!=null?E:G.tooltip)==null?void 0:k.className)}),Xt),Me=Um(un,De({},(B=kt.arrow)!=null?B:G.arrow,{className:pn(ar.arrow,(U=(D=kt.arrow)!=null?D:G.arrow)==null?void 0:U.className)}),Xt);return Ut(X.exports.Fragment,{children:[X.exports.cloneElement(H,Ee),L(Br,De({as:vr??v7,placement:Jt,anchorEl:J?{getBoundingClientRect:()=>({top:Mo.current.y,left:Mo.current.x,right:Mo.current.x,bottom:Mo.current.y,width:0,height:0})}:Ie,popperRef:Wi,open:Ie?T:!1,id:Q,transition:!0},q,vt,{popperOptions:Fe,children:({TransitionProps:it})=>L(Hr,De({timeout:Mt.transitions.duration.shorter},it,K,{children:Ut(An,De({},ye,{children:[Lt,F?L(un,De({},Me,{ref:Be})):null]}))}))}))]})}),$7=ioe,ooe=["component","direction","spacing","divider","children"];function aoe(e,t){const r=X.exports.Children.toArray(e).filter(Boolean);return r.reduce((i,o,a)=>(i.push(o),a({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[e],loe=({ownerState:e,theme:t})=>{let r=De({display:"flex",flexDirection:"column"},Os({theme:t},Cf({values:e.direction,breakpoints:t.breakpoints.values}),i=>({flexDirection:i})));if(e.spacing){const i=p6(t),o=Object.keys(t.breakpoints.values).reduce((u,c)=>((typeof e.spacing=="object"&&e.spacing[c]!=null||typeof e.direction=="object"&&e.direction[c]!=null)&&(u[c]=!0),u),{}),a=Cf({values:e.direction,base:o}),s=Cf({values:e.spacing,base:o});typeof a=="object"&&Object.keys(a).forEach((u,c,d)=>{if(!a[u]){const v=c>0?a[d[c-1]]:"column";a[u]=v}}),r=Is(r,Os({theme:t},s,(u,c)=>({"& > :not(style) + :not(style)":{margin:0,[`margin${soe(c?a[c]:e.direction)}`]:og(i,u)}})))}return r=pY(t.breakpoints,r),r},uoe=sr("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>[t.root]})(loe),coe=X.exports.forwardRef(function(t,r){const i=gi({props:t,name:"MuiStack"}),o=Xw(i),{component:a="div",direction:s="column",spacing:l=0,divider:u,children:c}=o,d=bn(o,ooe);return L(uoe,De({as:a,ownerState:{direction:s,spacing:l},ref:r},d,{children:u?aoe(c,u):c}))}),xs=coe;function doe(e){return di("MuiSwitch",e)}const foe=ri("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),ls=foe,poe=["className","color","edge","size","sx"],hoe=e=>{const{classes:t,edge:r,size:i,color:o,checked:a,disabled:s}=e,l={root:["root",r&&`edge${Qr(r)}`,`size${Qr(i)}`],switchBase:["switchBase",`color${Qr(o)}`,a&&"checked",s&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},u=hi(l,doe,t);return De({},t,u)},goe=sr("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.edge&&t[`edge${Qr(r.edge)}`],t[`size${Qr(r.size)}`]]}})(({ownerState:e})=>De({display:"inline-flex",width:34+12*2,height:14+12*2,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"}},e.edge==="start"&&{marginLeft:-8},e.edge==="end"&&{marginRight:-8},e.size==="small"&&{width:40,height:24,padding:7,[`& .${ls.thumb}`]:{width:16,height:16},[`& .${ls.switchBase}`]:{padding:4,[`&.${ls.checked}`]:{transform:"translateX(16px)"}}})),moe=sr(Rte,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.switchBase,{[`& .${ls.input}`]:t.input},r.color!=="default"&&t[`color${Qr(r.color)}`]]}})(({theme:e})=>({position:"absolute",top:0,left:0,zIndex:1,color:e.vars?e.vars.palette.Switch.defaultColor:`${e.palette.mode==="light"?e.palette.common.white:e.palette.grey[300]}`,transition:e.transitions.create(["left","transform"],{duration:e.transitions.duration.shortest}),[`&.${ls.checked}`]:{transform:"translateX(20px)"},[`&.${ls.disabled}`]:{color:e.vars?e.vars.palette.Switch.defaultDisabledColor:`${e.palette.mode==="light"?e.palette.grey[100]:e.palette.grey[600]}`},[`&.${ls.checked} + .${ls.track}`]:{opacity:.5},[`&.${ls.disabled} + .${ls.track}`]:{opacity:e.vars?e.vars.opacity.switchTrackDisabled:`${e.palette.mode==="light"?.12:.2}`},[`& .${ls.input}`]:{left:"-100%",width:"300%"}}),({theme:e,ownerState:t})=>De({"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:Zi(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},t.color!=="default"&&{[`&.${ls.checked}`]:{color:(e.vars||e).palette[t.color].main,"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Zi(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${ls.disabled}`]:{color:e.vars?e.vars.palette.Switch[`${t.color}DisabledColor`]:`${e.palette.mode==="light"?Bh(e.palette[t.color].main,.62):Oh(e.palette[t.color].main,.55)}`}},[`&.${ls.checked} + .${ls.track}`]:{backgroundColor:(e.vars||e).palette[t.color].main}})),yoe=sr("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(e,t)=>t.track})(({theme:e})=>({height:"100%",width:"100%",borderRadius:14/2,zIndex:-1,transition:e.transitions.create(["opacity","background-color"],{duration:e.transitions.duration.shortest}),backgroundColor:e.vars?e.vars.palette.common.onBackground:`${e.palette.mode==="light"?e.palette.common.black:e.palette.common.white}`,opacity:e.vars?e.vars.opacity.switchTrack:`${e.palette.mode==="light"?.38:.3}`})),voe=sr("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})(({theme:e})=>({boxShadow:(e.vars||e).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"})),boe=X.exports.forwardRef(function(t,r){const i=gi({props:t,name:"MuiSwitch"}),{className:o,color:a="primary",edge:s=!1,size:l="medium",sx:u}=i,c=bn(i,poe),d=De({},i,{color:a,edge:s,size:l}),p=hoe(d),v=L(voe,{className:p.thumb,ownerState:d});return Ut(goe,{className:pn(p.root,o),sx:u,ownerState:d,children:[L(moe,De({type:"checkbox",icon:v,checkedIcon:v,ref:r,ownerState:d},c,{classes:De({},p,{root:p.switchBase})})),L(yoe,{className:p.track,ownerState:d})]})}),woe=boe;function xoe(e){return di("MuiTab",e)}const _oe=ri("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]),Zd=_oe,Soe=["className","disabled","disableFocusRipple","fullWidth","icon","iconPosition","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"],Coe=e=>{const{classes:t,textColor:r,fullWidth:i,wrapped:o,icon:a,label:s,selected:l,disabled:u}=e,c={root:["root",a&&s&&"labelIcon",`textColor${Qr(r)}`,i&&"fullWidth",o&&"wrapped",l&&"selected",u&&"disabled"],iconWrapper:["iconWrapper"]};return hi(c,xoe,t)},koe=sr(Ad,{name:"MuiTab",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.label&&r.icon&&t.labelIcon,t[`textColor${Qr(r.textColor)}`],r.fullWidth&&t.fullWidth,r.wrapped&&t.wrapped]}})(({theme:e,ownerState:t})=>De({},e.typography.button,{maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center"},t.label&&{flexDirection:t.iconPosition==="top"||t.iconPosition==="bottom"?"column":"row"},{lineHeight:1.25},t.icon&&t.label&&{minHeight:72,paddingTop:9,paddingBottom:9,[`& > .${Zd.iconWrapper}`]:De({},t.iconPosition==="top"&&{marginBottom:6},t.iconPosition==="bottom"&&{marginTop:6},t.iconPosition==="start"&&{marginRight:e.spacing(1)},t.iconPosition==="end"&&{marginLeft:e.spacing(1)})},t.textColor==="inherit"&&{color:"inherit",opacity:.6,[`&.${Zd.selected}`]:{opacity:1},[`&.${Zd.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},t.textColor==="primary"&&{color:(e.vars||e).palette.text.secondary,[`&.${Zd.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${Zd.disabled}`]:{color:(e.vars||e).palette.text.disabled}},t.textColor==="secondary"&&{color:(e.vars||e).palette.text.secondary,[`&.${Zd.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${Zd.disabled}`]:{color:(e.vars||e).palette.text.disabled}},t.fullWidth&&{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},t.wrapped&&{fontSize:e.typography.pxToRem(12)})),Eoe=X.exports.forwardRef(function(t,r){const i=gi({props:t,name:"MuiTab"}),{className:o,disabled:a=!1,disableFocusRipple:s=!1,fullWidth:l,icon:u,iconPosition:c="top",indicator:d,label:p,onChange:v,onClick:x,onFocus:b,selected:y,selectionFollowsFocus:_,textColor:k="inherit",value:E,wrapped:B=!1}=i,U=bn(i,Soe),D=De({},i,{disabled:a,disableFocusRipple:s,selected:y,icon:!!u,iconPosition:c,label:!!p,fullWidth:l,textColor:k,wrapped:B}),j=Coe(D),F=u&&p&&X.exports.isValidElement(u)?X.exports.cloneElement(u,{className:pn(j.iconWrapper,u.props.className)}):u,H=G=>{!y&&v&&v(G,E),x&&x(G)},W=G=>{_&&!y&&v&&v(G,E),b&&b(G)};return Ut(koe,De({focusRipple:!s,className:pn(j.root,o),ref:r,role:"tab","aria-selected":y,disabled:a,onClick:H,onFocus:W,ownerState:D,tabIndex:y?0:-1},U,{children:[c==="top"||c==="start"?Ut(X.exports.Fragment,{children:[F,p]}):Ut(X.exports.Fragment,{children:[p,F]}),d]}))}),Z_=Eoe,Aoe=X.exports.createContext(),F7=Aoe;function Toe(e){return di("MuiTable",e)}ri("MuiTable",["root","stickyHeader"]);const Ioe=["className","component","padding","size","stickyHeader"],Roe=e=>{const{classes:t,stickyHeader:r}=e;return hi({root:["root",r&&"stickyHeader"]},Toe,t)},Poe=sr("table",{name:"MuiTable",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.stickyHeader&&t.stickyHeader]}})(({theme:e,ownerState:t})=>De({display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":De({},e.typography.body2,{padding:e.spacing(2),color:(e.vars||e).palette.text.secondary,textAlign:"left",captionSide:"bottom"})},t.stickyHeader&&{borderCollapse:"separate"})),MI="table",Moe=X.exports.forwardRef(function(t,r){const i=gi({props:t,name:"MuiTable"}),{className:o,component:a=MI,padding:s="normal",size:l="medium",stickyHeader:u=!1}=i,c=bn(i,Ioe),d=De({},i,{component:a,padding:s,size:l,stickyHeader:u}),p=Roe(d),v=X.exports.useMemo(()=>({padding:s,size:l,stickyHeader:u}),[s,l,u]);return L(F7.Provider,{value:v,children:L(Poe,De({as:a,role:a===MI?null:"table",ref:r,className:pn(p.root,o),ownerState:d},c))})}),L6=Moe,Ooe=X.exports.createContext(),f2=Ooe;function Boe(e){return di("MuiTableBody",e)}ri("MuiTableBody",["root"]);const Uoe=["className","component"],Doe=e=>{const{classes:t}=e;return hi({root:["root"]},Boe,t)},Loe=sr("tbody",{name:"MuiTableBody",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-row-group"}),Noe={variant:"body"},OI="tbody",joe=X.exports.forwardRef(function(t,r){const i=gi({props:t,name:"MuiTableBody"}),{className:o,component:a=OI}=i,s=bn(i,Uoe),l=De({},i,{component:a}),u=Doe(l);return L(f2.Provider,{value:Noe,children:L(Loe,De({className:pn(u.root,o),as:a,ref:r,role:a===OI?null:"rowgroup",ownerState:l},s))})}),N6=joe;function $oe(e){return di("MuiTableCell",e)}const Foe=ri("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]),zoe=Foe,Hoe=["align","className","component","padding","scope","size","sortDirection","variant"],Woe=e=>{const{classes:t,variant:r,align:i,padding:o,size:a,stickyHeader:s}=e,l={root:["root",r,s&&"stickyHeader",i!=="inherit"&&`align${Qr(i)}`,o!=="normal"&&`padding${Qr(o)}`,`size${Qr(a)}`]};return hi(l,$oe,t)},Voe=sr("td",{name:"MuiTableCell",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],t[`size${Qr(r.size)}`],r.padding!=="normal"&&t[`padding${Qr(r.padding)}`],r.align!=="inherit"&&t[`align${Qr(r.align)}`],r.stickyHeader&&t.stickyHeader]}})(({theme:e,ownerState:t})=>De({},e.typography.body2,{display:"table-cell",verticalAlign:"inherit",borderBottom:e.vars?`1px solid ${e.vars.palette.TableCell.border}`:`1px solid - ${e.palette.mode==="light"?Bh(Zi(e.palette.divider,1),.88):Oh(Zi(e.palette.divider,1),.68)}`,textAlign:"left",padding:16},t.variant==="head"&&{color:(e.vars||e).palette.text.primary,lineHeight:e.typography.pxToRem(24),fontWeight:e.typography.fontWeightMedium},t.variant==="body"&&{color:(e.vars||e).palette.text.primary},t.variant==="footer"&&{color:(e.vars||e).palette.text.secondary,lineHeight:e.typography.pxToRem(21),fontSize:e.typography.pxToRem(12)},t.size==="small"&&{padding:"6px 16px",[`&.${zoe.paddingCheckbox}`]:{width:24,padding:"0 12px 0 16px","& > *":{padding:0}}},t.padding==="checkbox"&&{width:48,padding:"0 0 0 4px"},t.padding==="none"&&{padding:0},t.align==="left"&&{textAlign:"left"},t.align==="center"&&{textAlign:"center"},t.align==="right"&&{textAlign:"right",flexDirection:"row-reverse"},t.align==="justify"&&{textAlign:"justify"},t.stickyHeader&&{position:"sticky",top:0,zIndex:2,backgroundColor:(e.vars||e).palette.background.default})),qoe=X.exports.forwardRef(function(t,r){const i=gi({props:t,name:"MuiTableCell"}),{align:o="inherit",className:a,component:s,padding:l,scope:u,size:c,sortDirection:d,variant:p}=i,v=bn(i,Hoe),x=X.exports.useContext(F7),b=X.exports.useContext(f2),y=b&&b.variant==="head";let _;s?_=s:_=y?"th":"td";let k=u;_==="td"?k=void 0:!k&&y&&(k="col");const E=p||b&&b.variant,B=De({},i,{align:o,component:_,padding:l||(x&&x.padding?x.padding:"normal"),size:c||(x&&x.size?x.size:"medium"),sortDirection:d,stickyHeader:E==="head"&&x&&x.stickyHeader,variant:E}),U=Woe(B);let D=null;return d&&(D=d==="asc"?"ascending":"descending"),L(Voe,De({as:_,ref:r,className:pn(U.root,a),"aria-sort":D,scope:k,ownerState:B},v))}),j6=qoe;function Koe(e){return di("MuiTableContainer",e)}ri("MuiTableContainer",["root"]);const Goe=["className","component"],Yoe=e=>{const{classes:t}=e;return hi({root:["root"]},Koe,t)},Qoe=sr("div",{name:"MuiTableContainer",slot:"Root",overridesResolver:(e,t)=>t.root})({width:"100%",overflowX:"auto"}),Zoe=X.exports.forwardRef(function(t,r){const i=gi({props:t,name:"MuiTableContainer"}),{className:o,component:a="div"}=i,s=bn(i,Goe),l=De({},i,{component:a}),u=Yoe(l);return L(Qoe,De({ref:r,as:a,className:pn(u.root,o),ownerState:l},s))}),Xoe=Zoe;function Joe(e){return di("MuiTableHead",e)}ri("MuiTableHead",["root"]);const eae=["className","component"],tae=e=>{const{classes:t}=e;return hi({root:["root"]},Joe,t)},rae=sr("thead",{name:"MuiTableHead",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-header-group"}),nae={variant:"head"},BI="thead",iae=X.exports.forwardRef(function(t,r){const i=gi({props:t,name:"MuiTableHead"}),{className:o,component:a=BI}=i,s=bn(i,eae),l=De({},i,{component:a}),u=tae(l);return L(f2.Provider,{value:nae,children:L(rae,De({as:a,className:pn(u.root,o),ref:r,role:a===BI?null:"rowgroup",ownerState:l},s))})}),z7=iae,oae=Nu(L("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),aae=Nu(L("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function sae(e){return di("MuiTableRow",e)}const lae=ri("MuiTableRow",["root","selected","hover","head","footer"]),UI=lae,uae=["className","component","hover","selected"],cae=e=>{const{classes:t,selected:r,hover:i,head:o,footer:a}=e;return hi({root:["root",r&&"selected",i&&"hover",o&&"head",a&&"footer"]},sae,t)},dae=sr("tr",{name:"MuiTableRow",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.head&&t.head,r.footer&&t.footer]}})(({theme:e})=>({color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,[`&.${UI.hover}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${UI.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Zi(e.palette.primary.main,e.palette.action.selectedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Zi(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity)}}})),DI="tr",fae=X.exports.forwardRef(function(t,r){const i=gi({props:t,name:"MuiTableRow"}),{className:o,component:a=DI,hover:s=!1,selected:l=!1}=i,u=bn(i,uae),c=X.exports.useContext(f2),d=De({},i,{component:a,hover:s,selected:l,head:c&&c.variant==="head",footer:c&&c.variant==="footer"}),p=cae(d);return L(dae,De({as:a,ref:r,className:pn(p.root,o),role:a===DI?null:"row",ownerState:d},u))}),xc=fae;function pae(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}function hae(e,t,r,i={},o=()=>{}){const{ease:a=pae,duration:s=300}=i;let l=null;const u=t[e];let c=!1;const d=()=>{c=!0},p=v=>{if(c){o(new Error("Animation cancelled"));return}l===null&&(l=v);const x=Math.min(1,(v-l)/s);if(t[e]=a(x)*(r-u)+u,x>=1){requestAnimationFrame(()=>{o(null)});return}requestAnimationFrame(p)};return u===r?(o(new Error("Element already at target position")),d):(requestAnimationFrame(p),d)}const gae=["onChange"],mae={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function yae(e){const{onChange:t}=e,r=bn(e,gae),i=X.exports.useRef(),o=X.exports.useRef(null),a=()=>{i.current=o.current.offsetHeight-o.current.clientHeight};return X.exports.useEffect(()=>{const s=Uf(()=>{const u=i.current;a(),u!==i.current&&t(i.current)}),l=El(o.current);return l.addEventListener("resize",s),()=>{s.clear(),l.removeEventListener("resize",s)}},[t]),X.exports.useEffect(()=>{a(),t(i.current)},[t]),L("div",De({style:mae,ref:o},r))}function vae(e){return di("MuiTabScrollButton",e)}const bae=ri("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),wae=bae;var LI,NI;const xae=["className","direction","orientation","disabled"],_ae=e=>{const{classes:t,orientation:r,disabled:i}=e;return hi({root:["root",r,i&&"disabled"]},vae,t)},Sae=sr(Ad,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.orientation&&t[r.orientation]]}})(({ownerState:e})=>De({width:40,flexShrink:0,opacity:.8,[`&.${wae.disabled}`]:{opacity:0}},e.orientation==="vertical"&&{width:"100%",height:40,"& svg":{transform:`rotate(${e.isRtl?-90:90}deg)`}})),Cae=X.exports.forwardRef(function(t,r){const i=gi({props:t,name:"MuiTabScrollButton"}),{className:o,direction:a}=i,s=bn(i,xae),u=la().direction==="rtl",c=De({isRtl:u},i),d=_ae(c);return L(Sae,De({component:"div",className:pn(d.root,o),ref:r,role:null,ownerState:c,tabIndex:null},s,{children:a==="left"?LI||(LI=L(oae,{fontSize:"small"})):NI||(NI=L(aae,{fontSize:"small"}))}))}),kae=Cae;function Eae(e){return di("MuiTabs",e)}const Aae=ri("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),X_=Aae,Tae=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],jI=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,$I=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,Tv=(e,t,r)=>{let i=!1,o=r(e,t);for(;o;){if(o===e.firstChild){if(i)return;i=!0}const a=o.disabled||o.getAttribute("aria-disabled")==="true";if(!o.hasAttribute("tabindex")||a)o=r(e,o);else{o.focus();return}}},Iae=e=>{const{vertical:t,fixed:r,hideScrollbar:i,scrollableX:o,scrollableY:a,centered:s,scrollButtonsHideMobile:l,classes:u}=e;return hi({root:["root",t&&"vertical"],scroller:["scroller",r&&"fixed",i&&"hideScrollbar",o&&"scrollableX",a&&"scrollableY"],flexContainer:["flexContainer",t&&"flexContainerVertical",s&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",l&&"scrollButtonsHideMobile"],scrollableX:[o&&"scrollableX"],hideScrollbar:[i&&"hideScrollbar"]},Eae,u)},Rae=sr("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[{[`& .${X_.scrollButtons}`]:t.scrollButtons},{[`& .${X_.scrollButtons}`]:r.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,r.vertical&&t.vertical]}})(({ownerState:e,theme:t})=>De({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},e.vertical&&{flexDirection:"column"},e.scrollButtonsHideMobile&&{[`& .${X_.scrollButtons}`]:{[t.breakpoints.down("sm")]:{display:"none"}}})),Pae=sr("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.scroller,r.fixed&&t.fixed,r.hideScrollbar&&t.hideScrollbar,r.scrollableX&&t.scrollableX,r.scrollableY&&t.scrollableY]}})(({ownerState:e})=>De({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},e.fixed&&{overflowX:"hidden",width:"100%"},e.hideScrollbar&&{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},e.scrollableX&&{overflowX:"auto",overflowY:"hidden"},e.scrollableY&&{overflowY:"auto",overflowX:"hidden"})),Mae=sr("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.flexContainer,r.vertical&&t.flexContainerVertical,r.centered&&t.centered]}})(({ownerState:e})=>De({display:"flex"},e.vertical&&{flexDirection:"column"},e.centered&&{justifyContent:"center"})),Oae=sr("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})(({ownerState:e,theme:t})=>De({position:"absolute",height:2,bottom:0,width:"100%",transition:t.transitions.create()},e.indicatorColor==="primary"&&{backgroundColor:(t.vars||t).palette.primary.main},e.indicatorColor==="secondary"&&{backgroundColor:(t.vars||t).palette.secondary.main},e.vertical&&{height:"100%",width:2,right:0})),Bae=sr(yae,{name:"MuiTabs",slot:"ScrollbarSize"})({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),FI={},Uae=X.exports.forwardRef(function(t,r){const i=gi({props:t,name:"MuiTabs"}),o=la(),a=o.direction==="rtl",{"aria-label":s,"aria-labelledby":l,action:u,centered:c=!1,children:d,className:p,component:v="div",allowScrollButtonsMobile:x=!1,indicatorColor:b="primary",onChange:y,orientation:_="horizontal",ScrollButtonComponent:k=kae,scrollButtons:E="auto",selectionFollowsFocus:B,TabIndicatorProps:U={},TabScrollButtonProps:D={},textColor:j="primary",value:F,variant:H="standard",visibleScrollbar:W=!1}=i,G=bn(i,Tae),ae=H==="scrollable",V=_==="vertical",oe=V?"scrollTop":"scrollLeft",P=V?"top":"left",ee=V?"bottom":"right",le=V?"clientHeight":"clientWidth",pe=V?"height":"width",_e=De({},i,{component:v,allowScrollButtonsMobile:x,indicatorColor:b,orientation:_,vertical:V,scrollButtons:E,textColor:j,variant:H,visibleScrollbar:W,fixed:!ae,hideScrollbar:ae&&!W,scrollableX:ae&&!V,scrollableY:ae&&V,centered:c&&!ae,scrollButtonsHideMobile:!x}),J=Iae(_e),[ft,Le]=X.exports.useState(!1),[He,nr]=X.exports.useState(FI),[Bt,Rt]=X.exports.useState({start:!1,end:!1}),[Jt,vr]=X.exports.useState({overflow:"hidden",scrollbarWidth:0}),At=new Map,kt=X.exports.useRef(null),Ct=X.exports.useRef(null),Lt=()=>{const C=kt.current;let T;if(C){const ve=C.getBoundingClientRect();T={clientWidth:C.clientWidth,scrollLeft:C.scrollLeft,scrollTop:C.scrollTop,scrollLeftNormalized:yT(C,o.direction),scrollWidth:C.scrollWidth,top:ve.top,bottom:ve.bottom,left:ve.left,right:ve.right}}let Q;if(C&&F!==!1){const ve=Ct.current.children;if(ve.length>0){const je=ve[At.get(F)];Q=je?je.getBoundingClientRect():null}}return{tabsMeta:T,tabMeta:Q}},Kt=bl(()=>{const{tabsMeta:C,tabMeta:T}=Lt();let Q=0,ve;if(V)ve="top",T&&C&&(Q=T.top-C.top+C.scrollTop);else if(ve=a?"right":"left",T&&C){const ct=a?C.scrollLeftNormalized+C.clientWidth-C.scrollWidth:C.scrollLeft;Q=(a?-1:1)*(T[ve]-C[ve]+ct)}const je={[ve]:Q,[pe]:T?T[pe]:0};if(isNaN(He[ve])||isNaN(He[pe]))nr(je);else{const ct=Math.abs(He[ve]-je[ve]),ur=Math.abs(He[pe]-je[pe]);(ct>=1||ur>=1)&&nr(je)}}),yr=(C,{animation:T=!0}={})=>{T?hae(oe,kt.current,C,{duration:o.transitions.duration.standard}):kt.current[oe]=C},ne=C=>{let T=kt.current[oe];V?T+=C:(T+=C*(a?-1:1),T*=a&&AU()==="reverse"?-1:1),yr(T)},Mt=()=>{const C=kt.current[le];let T=0;const Q=Array.from(Ct.current.children);for(let ve=0;veC){ve===0&&(T=C);break}T+=je[le]}return T},Nt=()=>{ne(-1*Mt())},Ie=()=>{ne(Mt())},Ae=X.exports.useCallback(C=>{vr({overflow:null,scrollbarWidth:C})},[]),fe=()=>{const C={};C.scrollbarSizeListener=ae?L(Bae,{onChange:Ae,className:pn(J.scrollableX,J.hideScrollbar)}):null;const T=Bt.start||Bt.end,Q=ae&&(E==="auto"&&T||E===!0);return C.scrollButtonStart=Q?L(k,De({orientation:_,direction:a?"right":"left",onClick:Nt,disabled:!Bt.start},D,{className:pn(J.scrollButtons,D.className)})):null,C.scrollButtonEnd=Q?L(k,De({orientation:_,direction:a?"left":"right",onClick:Ie,disabled:!Bt.end},D,{className:pn(J.scrollButtons,D.className)})):null,C},Be=bl(C=>{const{tabsMeta:T,tabMeta:Q}=Lt();if(!(!Q||!T)){if(Q[P]T[ee]){const ve=T[oe]+(Q[ee]-T[ee]);yr(ve,{animation:C})}}}),rt=bl(()=>{if(ae&&E!==!1){const{scrollTop:C,scrollHeight:T,clientHeight:Q,scrollWidth:ve,clientWidth:je}=kt.current;let ct,ur;if(V)ct=C>1,ur=C1,ur=a?Dr>1:Dr{const C=Uf(()=>{kt.current&&(Kt(),rt())}),T=El(kt.current);T.addEventListener("resize",C);let Q;return typeof ResizeObserver<"u"&&(Q=new ResizeObserver(C),Array.from(Ct.current.children).forEach(ve=>{Q.observe(ve)})),()=>{C.clear(),T.removeEventListener("resize",C),Q&&Q.disconnect()}},[Kt,rt]);const lt=X.exports.useMemo(()=>Uf(()=>{rt()}),[rt]);X.exports.useEffect(()=>()=>{lt.clear()},[lt]),X.exports.useEffect(()=>{Le(!0)},[]),X.exports.useEffect(()=>{Kt(),rt()}),X.exports.useEffect(()=>{Be(FI!==He)},[Be,He]),X.exports.useImperativeHandle(u,()=>({updateIndicator:Kt,updateScrollButtons:rt}),[Kt,rt]);const jt=L(Oae,De({},U,{className:pn(J.indicator,U.className),ownerState:_e,style:De({},He,U.style)}));let ce=0;const ie=X.exports.Children.map(d,C=>{if(!X.exports.isValidElement(C))return null;const T=C.props.value===void 0?ce:C.props.value;At.set(T,ce);const Q=T===F;return ce+=1,X.exports.cloneElement(C,De({fullWidth:H==="fullWidth",indicator:Q&&!ft&&jt,selected:Q,selectionFollowsFocus:B,onChange:y,textColor:j,value:T},ce===1&&F===!1&&!C.props.tabIndex?{tabIndex:0}:{}))}),de=C=>{const T=Ct.current,Q=ya(T).activeElement;if(Q.getAttribute("role")!=="tab")return;let je=_==="horizontal"?"ArrowLeft":"ArrowUp",ct=_==="horizontal"?"ArrowRight":"ArrowDown";switch(_==="horizontal"&&a&&(je="ArrowRight",ct="ArrowLeft"),C.key){case je:C.preventDefault(),Tv(T,Q,$I);break;case ct:C.preventDefault(),Tv(T,Q,jI);break;case"Home":C.preventDefault(),Tv(T,null,jI);break;case"End":C.preventDefault(),Tv(T,null,$I);break}},$=fe();return Ut(Rae,De({className:pn(J.root,p),ownerState:_e,ref:r,as:v},G,{children:[$.scrollButtonStart,$.scrollbarSizeListener,Ut(Pae,{className:J.scroller,ownerState:_e,style:{overflow:Jt.overflow,[V?`margin${a?"Left":"Right"}`:"marginBottom"]:W?void 0:-Jt.scrollbarWidth},ref:kt,onScroll:lt,children:[L(Mae,{"aria-label":s,"aria-labelledby":l,"aria-orientation":_==="vertical"?"vertical":null,className:J.flexContainer,ownerState:_e,onKeyDown:de,ref:Ct,role:"tablist",children:ie}),ft&&jt]}),$.scrollButtonEnd]}))}),H7=Uae;function Dae(e){return di("MuiTextField",e)}ri("MuiTextField",["root"]);const Lae=["autoComplete","autoFocus","children","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","id","InputLabelProps","inputProps","InputProps","inputRef","label","maxRows","minRows","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","select","SelectProps","type","value","variant"],Nae={standard:P7,filled:C7,outlined:L7},jae=e=>{const{classes:t}=e;return hi({root:["root"]},Dae,t)},$ae=sr(k7,{name:"MuiTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Fae=X.exports.forwardRef(function(t,r){const i=gi({props:t,name:"MuiTextField"}),{autoComplete:o,autoFocus:a=!1,children:s,className:l,color:u="primary",defaultValue:c,disabled:d=!1,error:p=!1,FormHelperTextProps:v,fullWidth:x=!1,helperText:b,id:y,InputLabelProps:_,inputProps:k,InputProps:E,inputRef:B,label:U,maxRows:D,minRows:j,multiline:F=!1,name:H,onBlur:W,onChange:G,onFocus:ae,placeholder:V,required:oe=!1,rows:P,select:ee=!1,SelectProps:le,type:pe,value:_e,variant:J="outlined"}=i,ft=bn(i,Lae),Le=De({},i,{autoFocus:a,color:u,disabled:d,error:p,fullWidth:x,multiline:F,required:oe,select:ee,variant:J}),He=jae(Le),nr={};J==="outlined"&&(_&&typeof _.shrink<"u"&&(nr.notched=_.shrink),nr.label=U),ee&&((!le||!le.native)&&(nr.id=void 0),nr["aria-describedby"]=void 0);const Bt=Iw(y),Rt=b&&Bt?`${Bt}-helper-text`:void 0,Jt=U&&Bt?`${Bt}-label`:void 0,vr=Nae[J],At=L(vr,De({"aria-describedby":Rt,autoComplete:o,autoFocus:a,defaultValue:c,fullWidth:x,multiline:F,name:H,rows:P,maxRows:D,minRows:j,type:pe,value:_e,id:Bt,inputRef:B,onBlur:W,onChange:G,onFocus:ae,placeholder:V,inputProps:k},nr,E));return Ut($ae,De({className:pn(He.root,l),disabled:d,error:p,fullWidth:x,ref:r,required:oe,color:u,variant:J,ownerState:Le},ft,{children:[U!=null&&U!==""&&L(mne,De({htmlFor:Bt,id:Jt},_,{children:U})),ee?L(j7,De({"aria-describedby":Rt,id:Bt,labelId:Jt,value:_e,input:At},le,{children:s})):At,b&&L(Ore,De({id:Rt},v,{children:b}))]}))}),wh=Fae,W7=1160,zae=250,$6="https://github.com/orbs-network/ton-contract-verifier",Hae=sr(c2)(e=>({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"center",gap:8,padding:"0px 16px",margin:"auto",maxWidth:160,width:e.width||"100%",height:e.height||"100%",fontSize:e.fontSize||14,fontWeight:e.fontWeight||400,boxShadow:"none",borderRadius:40,border:e.transparent?"1px solid #50A7EA":"",background:e.background||"inherit",whiteSpace:"nowrap",textTransform:"none",color:e.textColor||"#000","&:hover":{background:e.hoverBackground||"inherit"},"& img":{maxWidth:22},"&:disabled":{background:"#D9D9D9"},[t.breakpoints.down(900)]:{padding:0,minWidth:25}})),Ha=({children:e,disabled:t,onClick:r,type:i="button",fontSize:o=14,fontWeight:a,transparent:s,background:l,hoverBackground:u,width:c,height:d,textColor:p})=>L(Hae,{width:c,height:d,fontSize:o,fontWeight:a,transparent:s,background:l,textColor:p,hoverBackground:u,className:"base-button",type:i,onClick:r||(()=>{}),variant:s?"outlined":"contained",disabled:t,disableElevation:!0,children:e}),Wae="/assets/recent-search.82384f57.svg",$n=sr(kn)(()=>({display:"flex",alignItems:"center"})),ug=sr(kn)({boxSizing:"border-box",maxWidth:1160,width:"100%",marginTop:20,backgroundColor:"#fff",borderRadius:20,color:"#000",border:"0.5px solid rgba(114, 138, 150, 0.24)",boxShadow:"rgb(114 138 150 / 8%) 0px 2px 16px"}),p2=sr($n)({padding:"30px 24px 0 24px"}),cg=sr($n)({marginRight:8}),Fd=sr(jo)({fontSize:20,color:"#161C28",fontWeight:800}),Vae=Xi(da)(({theme:e})=>({position:"absolute",top:"calc(100% + 10px)",left:0,padding:`${e.spacing(1)}, ${e.spacing(2)}`,zIndex:99,background:"rgba(232,233,235)",border:"0.5px solid rgba(114, 138, 150, 0.16)",borderRadius:16,width:"100%",maxHeight:450,overflowY:"auto",[e.breakpoints.down("md")]:{display:"none"}})),qae=Xi(da)({display:"flex",alignItems:"center",justifyContent:"space-between",background:"transparent",fontSize:20,color:"#000",fontWeight:500,height:30,padding:"20px 21px",transitionDuration:".15s","&:hover":{cursor:"pointer",background:"rgb(225,227,230)"}}),Kae=({searchResults:e,onItemClick:t,onItemDelete:r,onHistoryClear:i})=>Ut(Vae,{children:[e.map(o=>Ut(qae,{onClick:()=>t(o),children:[Ut($n,{children:[L($n,{mr:1.5,children:L("img",{width:18,height:18,src:Wae,alt:"Search Icon"})}),L(jo,{children:o})]}),L(Bs,{onClick:a=>r(a,o),children:L("img",{src:b6,alt:"Close Icon",width:16,height:16})})]})),L($n,{mt:2,mb:1,ml:1,sx:{width:"fit-content"},children:L(Ha,{onClick:i,height:34,transparent:!0,children:"Clear History"})})]});function Ac(){const e=py(),t=QC();return(r,i)=>{t(typeof r=="string"?{pathname:r,search:e.search,hash:e.hash}:r,i)}}function Gae(e,t,r){const i=document.createElement("a"),o=new Blob([e],{type:r});i.href=URL.createObjectURL(o),i.download=t,i.click()}const V7=[{category:"Wallets - FIFT",contracts:[["wallet v1r1","EQAAQ-CfIZkUjmZ6ES9D_keK2yHz10U1ba49K0S86Whva74Z"],["wallet v1r2","EQAAVd4c_2pMb4Bp8BxumyV8jutdwJ9R-q0dBqQj7tj_W8SX"],["wallet v1r3","EQAAEgdraul87g9zvm5Lxtd9FNoebifojeyT90uG6zrWBvRh"],["wallet v2r1","EQAAC2tOLQxG4KuFcS_pb2Rta1MDdgx8wAtZnGf5bIEIMLft"],["wallet v2r2","EQAAnU-irJsuuljRAWBRUhdvFB-rvGRHbdQSWXPSQYND6MVb"],["wallet v3r1","EQAY_2_A88HD43S96hbVGbCLB21e6_k1nbaqICwS3ZCrMBaZ"],["wallet v3r2","EQALgHQ-KpmkwftbsdeZdA4DvVDCYkKvria9llb7_RMeZj_8"]]},{category:"DNS",contracts:[["dns-root","Ef_lZ1T4NCb2mwkme9h2rJfESCE0W34ma9lWp7-_uY3zXDvq"],["dns-collection","EQC3dNlesgVD8YbAazcauIrXBPfiVhMMr5YYk2in0Mtsz0Bz"],["dns-item","EQAGSjhQajnMSne9c9hGnKdMKmohX2-MkZuOkk7TmwQKwFOU"]]},{category:"Jettons",contracts:[["jetton-minter-discoverable","EQD-LkpmPTHhPW68cNfc7B83NcfE9JyGegXzAT8LetpQSRSm"],["jetton-minter","EQBb4JNqn4Z6U6-nf0cSLnOJo2dxj1QRuGoq-y6Hod72jPbl"],["jetton-wallet","EQAhuLHxOcrBwwMHKDnCUMYefuHwJ2iTOFKHWYQlDD-dgb__"],["jetton-wallet-fwd-fee","EQDt0qeoHwip8CtuUeNsaKjK-g0rwL7zUunKAnv0NCTZDSs3"],["kotecoin-minter","EQBlU_tKISgpepeMFT9t3xTDeiVmo25dW_4vUOl6jId_BNIj"]]},{category:"Wallets",contracts:[["wallet-v4","EQDerEPTIh0O8lBdjWc6aLaJs5HYqlfBN2Ruj1lJQH_6vcaZ"],["wallet-subscription-plugin","EQAteJqywxP0g6-6e6LX7VRKKDmZDoQv1Mhx0hdslJvAUGEy"],["highload-wallet-v2","EQBPrDVWoh-AMOk3fhgPPEDs6XkN5OC6kKP9N4-7hdAkFSmO"],["highload-wallet","EQBSXD33ezTpFxVVIB7SA5vuagUa2E8LO9ujIEGnpbyMXYHT"],["lockup-wallet-universal","0QBy4wyHHuR0jOyz7uM2BH8r5aSix7251ySvQt4OZRX9veAD"]]},{category:"Source Verifier",contracts:[["sources-registry","EQD-BJSVUJviud_Qv7Ymfd3qzXdrmV525e3YDzWQoHIAiInL"],["source-item","EQAXUJjoC9RUnBgTJdpp_XXebYUbq-sibaYnZ1C6Rojesz8w"]]},{category:"Validators/Staking",contracts:[["single-nominator","Ef_BLbagjGnqZEkpURP96guu7M9aICAYe5hKB_P5Ng5Gju5Y"],["nominator-pool","Ef8iu8EiNOP2MczVvHseFi-CrGO1C4v6MkSSOgVZcESNGfT7"]]},{category:"NFTs",contracts:[["telemint-item","EQAwC64h_7B6YrmGlsto39tBcFWjjakGzSvV7QaMwXiMKy20"],["telemint-collection","EQCA14o1-VWhS2efqoh_9M1b_A9DtKTuoqfmkn83AbJzwnPi"],["nft-item-v1","EQCZLzCnJuXCBktkb5IiqANbgThvqo2hYXjpupdTe5yHV6oY"],["sbt-item","EQC7JOIVycOY_cQnNRVtEBk8DpEFClZM8S3TlqfuD72jvU59"],["nft-single","EQBPIJPKd1G8eJ8vIWUnkpRf-5rpRp_oqiOepv3Tf571LKbq"],["nft-marketplace-v2","EQBYTuYbLf8INxFtD8tQeNk5ZLy-nAX9ahQbG_yl1qQ-GEMS"],["nft-item-editable","EQC2VNMbjQ8BY8b4iXTEop7dxNgYEXPAlr6ph1I-h42LrdED"],["nft-offer","EQA6rqhL9hxd8c3c1JVYQPohQVicy8PEZibTgF60iQCSEk1c"],["nft-fixprice-sale-v2","EQBeaUJdPdO66uL-P_D7-oHClw6uYIAPxoo9CX-TE6psn6lk"],["nft-fixprice-sale-v3","EQCljxPgw_0Z0uELYyt7AoGsmtGP7ORB-A4jk-gyuNJIjsRW"],["nft-collection-editable","EQCHmW1OkT6_-_vO6zoSFW9Z2T62dhffNZkkKRpdaPTFLPdT"],["nft-auction","EQC1yTmHvpD5z4Dk_l-YnEhZclc06utSisqhthfzBGz-w0Ae"],["nft-auction-v2","EQCnTg1uvsqc1ZCSgEOl5Yk5LItktG6OOYrSQ8SnJP4FFa58"]]},{category:"DEX",contracts:[["amm-minter","EQBIzHiopIkaXdXdSZ6Sm57kZV0y_5tZjnGO4fTUsMT0lOUz"]]},{category:"Core",contracts:[["elector","Ef8zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM0vF"],["config","Ef9VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVbxn","latest code in github does not match onchain, func0.2.0 with smart contract from commit 9bff928"]]},{category:"Bridge",contracts:[["eth-bridge","Ef_dJMSh8riPi3BTUTtcxsWjG8RLKnLctNjAM4rw8NN-xWdr"],["eth-bridge-multisig-gov-v2","Ef87m7_QrVM4uXAPCDM4DuF9Rj5Rwa5nHubwiQG96JmyAjQY"],["eth-bridge-multisig-gov-v1","kf8rV4RD7BD-j_C-Xsu8FBO9BOOOwISjNPbBC8tcq688Gcmk"],["eth-bridge-votes-collector","EQCuzvIOXLjH2tv35gY4tzhIvXCqZWDuK9kUhFGXKLImgxT5"],["bsc-bridge-multisig-gov-v1","kf8_gV8rpqtPl1vmYDrMzwxlGQDJ63SIKO8vDhNZHT5wwVhd"],["bsc-bridge-multisig-gov-v2","kf8OvX_5ynDgbp4iqJIvWudSEanWo0qAlOjhWHtga9u2Yo7j"],["bsc-bridge-votes-collector","EQAHI1vGuw7d4WG-CtfDrWqEPNtmUuKjKFEFeJmZaqqfWTvW"],["bsc-bridge","Ef9NXAIQs12t2qIZ-sRZ26D977H65Ol6DQeXc5_gUNaUys5r"]]},{category:"Other",contracts:[["counter","EQC-QTihJV_B4f8M2nynateMLynaRT_uwNYnnuyy87kam-G7"],["tact-example","EQA7c2RpiXxH1X52lvOxLFrVj4MukLeuCENcM86rHYcQdbha"]]},{category:"Unverified",contracts:[["system","Ef8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAU"]]}];function Yae(){const e=([r,i,o])=>`[https://verifier.ton.org/${i}] // ${r} ${o??""}`,t=["# Verified Examples"];V7.forEach(({category:r,contracts:i})=>{t.push(`## ${r}`),t.push(i.map(e).join(` + ${e.palette.mode==="light"?Bh(Zi(e.palette.divider,1),.88):Oh(Zi(e.palette.divider,1),.68)}`,textAlign:"left",padding:16},t.variant==="head"&&{color:(e.vars||e).palette.text.primary,lineHeight:e.typography.pxToRem(24),fontWeight:e.typography.fontWeightMedium},t.variant==="body"&&{color:(e.vars||e).palette.text.primary},t.variant==="footer"&&{color:(e.vars||e).palette.text.secondary,lineHeight:e.typography.pxToRem(21),fontSize:e.typography.pxToRem(12)},t.size==="small"&&{padding:"6px 16px",[`&.${zoe.paddingCheckbox}`]:{width:24,padding:"0 12px 0 16px","& > *":{padding:0}}},t.padding==="checkbox"&&{width:48,padding:"0 0 0 4px"},t.padding==="none"&&{padding:0},t.align==="left"&&{textAlign:"left"},t.align==="center"&&{textAlign:"center"},t.align==="right"&&{textAlign:"right",flexDirection:"row-reverse"},t.align==="justify"&&{textAlign:"justify"},t.stickyHeader&&{position:"sticky",top:0,zIndex:2,backgroundColor:(e.vars||e).palette.background.default})),qoe=X.exports.forwardRef(function(t,r){const i=gi({props:t,name:"MuiTableCell"}),{align:o="inherit",className:a,component:s,padding:l,scope:u,size:c,sortDirection:d,variant:p}=i,v=bn(i,Hoe),x=X.exports.useContext(F7),b=X.exports.useContext(f2),y=b&&b.variant==="head";let _;s?_=s:_=y?"th":"td";let k=u;_==="td"?k=void 0:!k&&y&&(k="col");const E=p||b&&b.variant,B=De({},i,{align:o,component:_,padding:l||(x&&x.padding?x.padding:"normal"),size:c||(x&&x.size?x.size:"medium"),sortDirection:d,stickyHeader:E==="head"&&x&&x.stickyHeader,variant:E}),U=Woe(B);let D=null;return d&&(D=d==="asc"?"ascending":"descending"),L(Voe,De({as:_,ref:r,className:pn(U.root,a),"aria-sort":D,scope:k,ownerState:B},v))}),j6=qoe;function Koe(e){return di("MuiTableContainer",e)}ri("MuiTableContainer",["root"]);const Goe=["className","component"],Yoe=e=>{const{classes:t}=e;return hi({root:["root"]},Koe,t)},Qoe=sr("div",{name:"MuiTableContainer",slot:"Root",overridesResolver:(e,t)=>t.root})({width:"100%",overflowX:"auto"}),Zoe=X.exports.forwardRef(function(t,r){const i=gi({props:t,name:"MuiTableContainer"}),{className:o,component:a="div"}=i,s=bn(i,Goe),l=De({},i,{component:a}),u=Yoe(l);return L(Qoe,De({ref:r,as:a,className:pn(u.root,o),ownerState:l},s))}),Xoe=Zoe;function Joe(e){return di("MuiTableHead",e)}ri("MuiTableHead",["root"]);const eae=["className","component"],tae=e=>{const{classes:t}=e;return hi({root:["root"]},Joe,t)},rae=sr("thead",{name:"MuiTableHead",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-header-group"}),nae={variant:"head"},BI="thead",iae=X.exports.forwardRef(function(t,r){const i=gi({props:t,name:"MuiTableHead"}),{className:o,component:a=BI}=i,s=bn(i,eae),l=De({},i,{component:a}),u=tae(l);return L(f2.Provider,{value:nae,children:L(rae,De({as:a,className:pn(u.root,o),ref:r,role:a===BI?null:"rowgroup",ownerState:l},s))})}),z7=iae,oae=Nu(L("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),aae=Nu(L("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function sae(e){return di("MuiTableRow",e)}const lae=ri("MuiTableRow",["root","selected","hover","head","footer"]),UI=lae,uae=["className","component","hover","selected"],cae=e=>{const{classes:t,selected:r,hover:i,head:o,footer:a}=e;return hi({root:["root",r&&"selected",i&&"hover",o&&"head",a&&"footer"]},sae,t)},dae=sr("tr",{name:"MuiTableRow",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.head&&t.head,r.footer&&t.footer]}})(({theme:e})=>({color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,[`&.${UI.hover}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${UI.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Zi(e.palette.primary.main,e.palette.action.selectedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Zi(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity)}}})),DI="tr",fae=X.exports.forwardRef(function(t,r){const i=gi({props:t,name:"MuiTableRow"}),{className:o,component:a=DI,hover:s=!1,selected:l=!1}=i,u=bn(i,uae),c=X.exports.useContext(f2),d=De({},i,{component:a,hover:s,selected:l,head:c&&c.variant==="head",footer:c&&c.variant==="footer"}),p=cae(d);return L(dae,De({as:a,ref:r,className:pn(p.root,o),role:a===DI?null:"row",ownerState:d},u))}),xc=fae;function pae(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}function hae(e,t,r,i={},o=()=>{}){const{ease:a=pae,duration:s=300}=i;let l=null;const u=t[e];let c=!1;const d=()=>{c=!0},p=v=>{if(c){o(new Error("Animation cancelled"));return}l===null&&(l=v);const x=Math.min(1,(v-l)/s);if(t[e]=a(x)*(r-u)+u,x>=1){requestAnimationFrame(()=>{o(null)});return}requestAnimationFrame(p)};return u===r?(o(new Error("Element already at target position")),d):(requestAnimationFrame(p),d)}const gae=["onChange"],mae={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function yae(e){const{onChange:t}=e,r=bn(e,gae),i=X.exports.useRef(),o=X.exports.useRef(null),a=()=>{i.current=o.current.offsetHeight-o.current.clientHeight};return X.exports.useEffect(()=>{const s=Uf(()=>{const u=i.current;a(),u!==i.current&&t(i.current)}),l=El(o.current);return l.addEventListener("resize",s),()=>{s.clear(),l.removeEventListener("resize",s)}},[t]),X.exports.useEffect(()=>{a(),t(i.current)},[t]),L("div",De({style:mae,ref:o},r))}function vae(e){return di("MuiTabScrollButton",e)}const bae=ri("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),wae=bae;var LI,NI;const xae=["className","direction","orientation","disabled"],_ae=e=>{const{classes:t,orientation:r,disabled:i}=e;return hi({root:["root",r,i&&"disabled"]},vae,t)},Sae=sr(Ad,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.orientation&&t[r.orientation]]}})(({ownerState:e})=>De({width:40,flexShrink:0,opacity:.8,[`&.${wae.disabled}`]:{opacity:0}},e.orientation==="vertical"&&{width:"100%",height:40,"& svg":{transform:`rotate(${e.isRtl?-90:90}deg)`}})),Cae=X.exports.forwardRef(function(t,r){const i=gi({props:t,name:"MuiTabScrollButton"}),{className:o,direction:a}=i,s=bn(i,xae),u=la().direction==="rtl",c=De({isRtl:u},i),d=_ae(c);return L(Sae,De({component:"div",className:pn(d.root,o),ref:r,role:null,ownerState:c,tabIndex:null},s,{children:a==="left"?LI||(LI=L(oae,{fontSize:"small"})):NI||(NI=L(aae,{fontSize:"small"}))}))}),kae=Cae;function Eae(e){return di("MuiTabs",e)}const Aae=ri("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),X_=Aae,Tae=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],jI=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,$I=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,Tv=(e,t,r)=>{let i=!1,o=r(e,t);for(;o;){if(o===e.firstChild){if(i)return;i=!0}const a=o.disabled||o.getAttribute("aria-disabled")==="true";if(!o.hasAttribute("tabindex")||a)o=r(e,o);else{o.focus();return}}},Iae=e=>{const{vertical:t,fixed:r,hideScrollbar:i,scrollableX:o,scrollableY:a,centered:s,scrollButtonsHideMobile:l,classes:u}=e;return hi({root:["root",t&&"vertical"],scroller:["scroller",r&&"fixed",i&&"hideScrollbar",o&&"scrollableX",a&&"scrollableY"],flexContainer:["flexContainer",t&&"flexContainerVertical",s&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",l&&"scrollButtonsHideMobile"],scrollableX:[o&&"scrollableX"],hideScrollbar:[i&&"hideScrollbar"]},Eae,u)},Rae=sr("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[{[`& .${X_.scrollButtons}`]:t.scrollButtons},{[`& .${X_.scrollButtons}`]:r.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,r.vertical&&t.vertical]}})(({ownerState:e,theme:t})=>De({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},e.vertical&&{flexDirection:"column"},e.scrollButtonsHideMobile&&{[`& .${X_.scrollButtons}`]:{[t.breakpoints.down("sm")]:{display:"none"}}})),Pae=sr("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.scroller,r.fixed&&t.fixed,r.hideScrollbar&&t.hideScrollbar,r.scrollableX&&t.scrollableX,r.scrollableY&&t.scrollableY]}})(({ownerState:e})=>De({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},e.fixed&&{overflowX:"hidden",width:"100%"},e.hideScrollbar&&{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},e.scrollableX&&{overflowX:"auto",overflowY:"hidden"},e.scrollableY&&{overflowY:"auto",overflowX:"hidden"})),Mae=sr("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.flexContainer,r.vertical&&t.flexContainerVertical,r.centered&&t.centered]}})(({ownerState:e})=>De({display:"flex"},e.vertical&&{flexDirection:"column"},e.centered&&{justifyContent:"center"})),Oae=sr("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})(({ownerState:e,theme:t})=>De({position:"absolute",height:2,bottom:0,width:"100%",transition:t.transitions.create()},e.indicatorColor==="primary"&&{backgroundColor:(t.vars||t).palette.primary.main},e.indicatorColor==="secondary"&&{backgroundColor:(t.vars||t).palette.secondary.main},e.vertical&&{height:"100%",width:2,right:0})),Bae=sr(yae,{name:"MuiTabs",slot:"ScrollbarSize"})({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),FI={},Uae=X.exports.forwardRef(function(t,r){const i=gi({props:t,name:"MuiTabs"}),o=la(),a=o.direction==="rtl",{"aria-label":s,"aria-labelledby":l,action:u,centered:c=!1,children:d,className:p,component:v="div",allowScrollButtonsMobile:x=!1,indicatorColor:b="primary",onChange:y,orientation:_="horizontal",ScrollButtonComponent:k=kae,scrollButtons:E="auto",selectionFollowsFocus:B,TabIndicatorProps:U={},TabScrollButtonProps:D={},textColor:j="primary",value:F,variant:H="standard",visibleScrollbar:W=!1}=i,G=bn(i,Tae),ae=H==="scrollable",V=_==="vertical",oe=V?"scrollTop":"scrollLeft",P=V?"top":"left",ee=V?"bottom":"right",le=V?"clientHeight":"clientWidth",pe=V?"height":"width",_e=De({},i,{component:v,allowScrollButtonsMobile:x,indicatorColor:b,orientation:_,vertical:V,scrollButtons:E,textColor:j,variant:H,visibleScrollbar:W,fixed:!ae,hideScrollbar:ae&&!W,scrollableX:ae&&!V,scrollableY:ae&&V,centered:c&&!ae,scrollButtonsHideMobile:!x}),J=Iae(_e),[ft,Le]=X.exports.useState(!1),[He,nr]=X.exports.useState(FI),[Bt,Rt]=X.exports.useState({start:!1,end:!1}),[Jt,vr]=X.exports.useState({overflow:"hidden",scrollbarWidth:0}),At=new Map,kt=X.exports.useRef(null),Ct=X.exports.useRef(null),Lt=()=>{const C=kt.current;let T;if(C){const ve=C.getBoundingClientRect();T={clientWidth:C.clientWidth,scrollLeft:C.scrollLeft,scrollTop:C.scrollTop,scrollLeftNormalized:yT(C,o.direction),scrollWidth:C.scrollWidth,top:ve.top,bottom:ve.bottom,left:ve.left,right:ve.right}}let Q;if(C&&F!==!1){const ve=Ct.current.children;if(ve.length>0){const je=ve[At.get(F)];Q=je?je.getBoundingClientRect():null}}return{tabsMeta:T,tabMeta:Q}},Kt=bl(()=>{const{tabsMeta:C,tabMeta:T}=Lt();let Q=0,ve;if(V)ve="top",T&&C&&(Q=T.top-C.top+C.scrollTop);else if(ve=a?"right":"left",T&&C){const ct=a?C.scrollLeftNormalized+C.clientWidth-C.scrollWidth:C.scrollLeft;Q=(a?-1:1)*(T[ve]-C[ve]+ct)}const je={[ve]:Q,[pe]:T?T[pe]:0};if(isNaN(He[ve])||isNaN(He[pe]))nr(je);else{const ct=Math.abs(He[ve]-je[ve]),ur=Math.abs(He[pe]-je[pe]);(ct>=1||ur>=1)&&nr(je)}}),yr=(C,{animation:T=!0}={})=>{T?hae(oe,kt.current,C,{duration:o.transitions.duration.standard}):kt.current[oe]=C},ne=C=>{let T=kt.current[oe];V?T+=C:(T+=C*(a?-1:1),T*=a&&AU()==="reverse"?-1:1),yr(T)},Mt=()=>{const C=kt.current[le];let T=0;const Q=Array.from(Ct.current.children);for(let ve=0;veC){ve===0&&(T=C);break}T+=je[le]}return T},Nt=()=>{ne(-1*Mt())},Ie=()=>{ne(Mt())},Ae=X.exports.useCallback(C=>{vr({overflow:null,scrollbarWidth:C})},[]),fe=()=>{const C={};C.scrollbarSizeListener=ae?L(Bae,{onChange:Ae,className:pn(J.scrollableX,J.hideScrollbar)}):null;const T=Bt.start||Bt.end,Q=ae&&(E==="auto"&&T||E===!0);return C.scrollButtonStart=Q?L(k,De({orientation:_,direction:a?"right":"left",onClick:Nt,disabled:!Bt.start},D,{className:pn(J.scrollButtons,D.className)})):null,C.scrollButtonEnd=Q?L(k,De({orientation:_,direction:a?"left":"right",onClick:Ie,disabled:!Bt.end},D,{className:pn(J.scrollButtons,D.className)})):null,C},Be=bl(C=>{const{tabsMeta:T,tabMeta:Q}=Lt();if(!(!Q||!T)){if(Q[P]T[ee]){const ve=T[oe]+(Q[ee]-T[ee]);yr(ve,{animation:C})}}}),rt=bl(()=>{if(ae&&E!==!1){const{scrollTop:C,scrollHeight:T,clientHeight:Q,scrollWidth:ve,clientWidth:je}=kt.current;let ct,ur;if(V)ct=C>1,ur=C1,ur=a?Dr>1:Dr{const C=Uf(()=>{kt.current&&(Kt(),rt())}),T=El(kt.current);T.addEventListener("resize",C);let Q;return typeof ResizeObserver<"u"&&(Q=new ResizeObserver(C),Array.from(Ct.current.children).forEach(ve=>{Q.observe(ve)})),()=>{C.clear(),T.removeEventListener("resize",C),Q&&Q.disconnect()}},[Kt,rt]);const lt=X.exports.useMemo(()=>Uf(()=>{rt()}),[rt]);X.exports.useEffect(()=>()=>{lt.clear()},[lt]),X.exports.useEffect(()=>{Le(!0)},[]),X.exports.useEffect(()=>{Kt(),rt()}),X.exports.useEffect(()=>{Be(FI!==He)},[Be,He]),X.exports.useImperativeHandle(u,()=>({updateIndicator:Kt,updateScrollButtons:rt}),[Kt,rt]);const jt=L(Oae,De({},U,{className:pn(J.indicator,U.className),ownerState:_e,style:De({},He,U.style)}));let ce=0;const ie=X.exports.Children.map(d,C=>{if(!X.exports.isValidElement(C))return null;const T=C.props.value===void 0?ce:C.props.value;At.set(T,ce);const Q=T===F;return ce+=1,X.exports.cloneElement(C,De({fullWidth:H==="fullWidth",indicator:Q&&!ft&&jt,selected:Q,selectionFollowsFocus:B,onChange:y,textColor:j,value:T},ce===1&&F===!1&&!C.props.tabIndex?{tabIndex:0}:{}))}),de=C=>{const T=Ct.current,Q=ya(T).activeElement;if(Q.getAttribute("role")!=="tab")return;let je=_==="horizontal"?"ArrowLeft":"ArrowUp",ct=_==="horizontal"?"ArrowRight":"ArrowDown";switch(_==="horizontal"&&a&&(je="ArrowRight",ct="ArrowLeft"),C.key){case je:C.preventDefault(),Tv(T,Q,$I);break;case ct:C.preventDefault(),Tv(T,Q,jI);break;case"Home":C.preventDefault(),Tv(T,null,jI);break;case"End":C.preventDefault(),Tv(T,null,$I);break}},$=fe();return Ut(Rae,De({className:pn(J.root,p),ownerState:_e,ref:r,as:v},G,{children:[$.scrollButtonStart,$.scrollbarSizeListener,Ut(Pae,{className:J.scroller,ownerState:_e,style:{overflow:Jt.overflow,[V?`margin${a?"Left":"Right"}`:"marginBottom"]:W?void 0:-Jt.scrollbarWidth},ref:kt,onScroll:lt,children:[L(Mae,{"aria-label":s,"aria-labelledby":l,"aria-orientation":_==="vertical"?"vertical":null,className:J.flexContainer,ownerState:_e,onKeyDown:de,ref:Ct,role:"tablist",children:ie}),ft&&jt]}),$.scrollButtonEnd]}))}),H7=Uae;function Dae(e){return di("MuiTextField",e)}ri("MuiTextField",["root"]);const Lae=["autoComplete","autoFocus","children","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","id","InputLabelProps","inputProps","InputProps","inputRef","label","maxRows","minRows","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","select","SelectProps","type","value","variant"],Nae={standard:P7,filled:C7,outlined:L7},jae=e=>{const{classes:t}=e;return hi({root:["root"]},Dae,t)},$ae=sr(k7,{name:"MuiTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Fae=X.exports.forwardRef(function(t,r){const i=gi({props:t,name:"MuiTextField"}),{autoComplete:o,autoFocus:a=!1,children:s,className:l,color:u="primary",defaultValue:c,disabled:d=!1,error:p=!1,FormHelperTextProps:v,fullWidth:x=!1,helperText:b,id:y,InputLabelProps:_,inputProps:k,InputProps:E,inputRef:B,label:U,maxRows:D,minRows:j,multiline:F=!1,name:H,onBlur:W,onChange:G,onFocus:ae,placeholder:V,required:oe=!1,rows:P,select:ee=!1,SelectProps:le,type:pe,value:_e,variant:J="outlined"}=i,ft=bn(i,Lae),Le=De({},i,{autoFocus:a,color:u,disabled:d,error:p,fullWidth:x,multiline:F,required:oe,select:ee,variant:J}),He=jae(Le),nr={};J==="outlined"&&(_&&typeof _.shrink<"u"&&(nr.notched=_.shrink),nr.label=U),ee&&((!le||!le.native)&&(nr.id=void 0),nr["aria-describedby"]=void 0);const Bt=Iw(y),Rt=b&&Bt?`${Bt}-helper-text`:void 0,Jt=U&&Bt?`${Bt}-label`:void 0,vr=Nae[J],At=L(vr,De({"aria-describedby":Rt,autoComplete:o,autoFocus:a,defaultValue:c,fullWidth:x,multiline:F,name:H,rows:P,maxRows:D,minRows:j,type:pe,value:_e,id:Bt,inputRef:B,onBlur:W,onChange:G,onFocus:ae,placeholder:V,inputProps:k},nr,E));return Ut($ae,De({className:pn(He.root,l),disabled:d,error:p,fullWidth:x,ref:r,required:oe,color:u,variant:J,ownerState:Le},ft,{children:[U!=null&&U!==""&&L(mne,De({htmlFor:Bt,id:Jt},_,{children:U})),ee?L(j7,De({"aria-describedby":Rt,id:Bt,labelId:Jt,value:_e,input:At},le,{children:s})):At,b&&L(Ore,De({id:Rt},v,{children:b}))]}))}),wh=Fae,W7=1160,zae=250,$6="https://github.com/orbs-network/ton-contract-verifier",Hae=sr(c2)(e=>({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"center",gap:8,padding:"0px 16px",margin:"auto",maxWidth:160,width:e.width||"100%",height:e.height||"100%",fontSize:e.fontSize||14,fontWeight:e.fontWeight||400,boxShadow:"none",borderRadius:40,border:e.transparent?"1px solid #50A7EA":"",background:e.background||"inherit",whiteSpace:"nowrap",textTransform:"none",color:e.textColor||"#000","&:hover":{background:e.hoverBackground||"inherit"},"& img":{maxWidth:22},"&:disabled":{background:"#D9D9D9"},[t.breakpoints.down(900)]:{padding:0,minWidth:25}})),Ha=({children:e,disabled:t,onClick:r,type:i="button",fontSize:o=14,fontWeight:a,transparent:s,background:l,hoverBackground:u,width:c,height:d,textColor:p})=>L(Hae,{width:c,height:d,fontSize:o,fontWeight:a,transparent:s,background:l,textColor:p,hoverBackground:u,className:"base-button",type:i,onClick:r||(()=>{}),variant:s?"outlined":"contained",disabled:t,disableElevation:!0,children:e}),Wae="/verifier/assets/recent-search.82384f57.svg",$n=sr(kn)(()=>({display:"flex",alignItems:"center"})),ug=sr(kn)({boxSizing:"border-box",maxWidth:1160,width:"100%",marginTop:20,backgroundColor:"#fff",borderRadius:20,color:"#000",border:"0.5px solid rgba(114, 138, 150, 0.24)",boxShadow:"rgb(114 138 150 / 8%) 0px 2px 16px"}),p2=sr($n)({padding:"30px 24px 0 24px"}),cg=sr($n)({marginRight:8}),Fd=sr(jo)({fontSize:20,color:"#161C28",fontWeight:800}),Vae=Xi(da)(({theme:e})=>({position:"absolute",top:"calc(100% + 10px)",left:0,padding:`${e.spacing(1)}, ${e.spacing(2)}`,zIndex:99,background:"rgba(232,233,235)",border:"0.5px solid rgba(114, 138, 150, 0.16)",borderRadius:16,width:"100%",maxHeight:450,overflowY:"auto",[e.breakpoints.down("md")]:{display:"none"}})),qae=Xi(da)({display:"flex",alignItems:"center",justifyContent:"space-between",background:"transparent",fontSize:20,color:"#000",fontWeight:500,height:30,padding:"20px 21px",transitionDuration:".15s","&:hover":{cursor:"pointer",background:"rgb(225,227,230)"}}),Kae=({searchResults:e,onItemClick:t,onItemDelete:r,onHistoryClear:i})=>Ut(Vae,{children:[e.map(o=>Ut(qae,{onClick:()=>t(o),children:[Ut($n,{children:[L($n,{mr:1.5,children:L("img",{width:18,height:18,src:Wae,alt:"Search Icon"})}),L(jo,{children:o})]}),L(Bs,{onClick:a=>r(a,o),children:L("img",{src:b6,alt:"Close Icon",width:16,height:16})})]})),L($n,{mt:2,mb:1,ml:1,sx:{width:"fit-content"},children:L(Ha,{onClick:i,height:34,transparent:!0,children:"Clear History"})})]});function Ac(){const e=py(),t=QC();return(r,i)=>{t(typeof r=="string"?{pathname:r,search:e.search,hash:e.hash}:r,i)}}function Gae(e,t,r){const i=document.createElement("a"),o=new Blob([e],{type:r});i.href=URL.createObjectURL(o),i.download=t,i.click()}const V7=[{category:"Wallets - FIFT",contracts:[["wallet v1r1","EQAAQ-CfIZkUjmZ6ES9D_keK2yHz10U1ba49K0S86Whva74Z"],["wallet v1r2","EQAAVd4c_2pMb4Bp8BxumyV8jutdwJ9R-q0dBqQj7tj_W8SX"],["wallet v1r3","EQAAEgdraul87g9zvm5Lxtd9FNoebifojeyT90uG6zrWBvRh"],["wallet v2r1","EQAAC2tOLQxG4KuFcS_pb2Rta1MDdgx8wAtZnGf5bIEIMLft"],["wallet v2r2","EQAAnU-irJsuuljRAWBRUhdvFB-rvGRHbdQSWXPSQYND6MVb"],["wallet v3r1","EQAY_2_A88HD43S96hbVGbCLB21e6_k1nbaqICwS3ZCrMBaZ"],["wallet v3r2","EQALgHQ-KpmkwftbsdeZdA4DvVDCYkKvria9llb7_RMeZj_8"]]},{category:"DNS",contracts:[["dns-root","Ef_lZ1T4NCb2mwkme9h2rJfESCE0W34ma9lWp7-_uY3zXDvq"],["dns-collection","EQC3dNlesgVD8YbAazcauIrXBPfiVhMMr5YYk2in0Mtsz0Bz"],["dns-item","EQAGSjhQajnMSne9c9hGnKdMKmohX2-MkZuOkk7TmwQKwFOU"]]},{category:"Jettons",contracts:[["jetton-minter-discoverable","EQD-LkpmPTHhPW68cNfc7B83NcfE9JyGegXzAT8LetpQSRSm"],["jetton-minter","EQBb4JNqn4Z6U6-nf0cSLnOJo2dxj1QRuGoq-y6Hod72jPbl"],["jetton-wallet","EQAhuLHxOcrBwwMHKDnCUMYefuHwJ2iTOFKHWYQlDD-dgb__"],["jetton-wallet-fwd-fee","EQDt0qeoHwip8CtuUeNsaKjK-g0rwL7zUunKAnv0NCTZDSs3"],["kotecoin-minter","EQBlU_tKISgpepeMFT9t3xTDeiVmo25dW_4vUOl6jId_BNIj"]]},{category:"Wallets",contracts:[["wallet-v4","EQDerEPTIh0O8lBdjWc6aLaJs5HYqlfBN2Ruj1lJQH_6vcaZ"],["wallet-subscription-plugin","EQAteJqywxP0g6-6e6LX7VRKKDmZDoQv1Mhx0hdslJvAUGEy"],["highload-wallet-v2","EQBPrDVWoh-AMOk3fhgPPEDs6XkN5OC6kKP9N4-7hdAkFSmO"],["highload-wallet","EQBSXD33ezTpFxVVIB7SA5vuagUa2E8LO9ujIEGnpbyMXYHT"],["lockup-wallet-universal","0QBy4wyHHuR0jOyz7uM2BH8r5aSix7251ySvQt4OZRX9veAD"]]},{category:"Source Verifier",contracts:[["sources-registry","EQD-BJSVUJviud_Qv7Ymfd3qzXdrmV525e3YDzWQoHIAiInL"],["source-item","EQAXUJjoC9RUnBgTJdpp_XXebYUbq-sibaYnZ1C6Rojesz8w"]]},{category:"Validators/Staking",contracts:[["single-nominator","Ef_BLbagjGnqZEkpURP96guu7M9aICAYe5hKB_P5Ng5Gju5Y"],["nominator-pool","Ef8iu8EiNOP2MczVvHseFi-CrGO1C4v6MkSSOgVZcESNGfT7"]]},{category:"NFTs",contracts:[["telemint-item","EQAwC64h_7B6YrmGlsto39tBcFWjjakGzSvV7QaMwXiMKy20"],["telemint-collection","EQCA14o1-VWhS2efqoh_9M1b_A9DtKTuoqfmkn83AbJzwnPi"],["nft-item-v1","EQCZLzCnJuXCBktkb5IiqANbgThvqo2hYXjpupdTe5yHV6oY"],["sbt-item","EQC7JOIVycOY_cQnNRVtEBk8DpEFClZM8S3TlqfuD72jvU59"],["nft-single","EQBPIJPKd1G8eJ8vIWUnkpRf-5rpRp_oqiOepv3Tf571LKbq"],["nft-marketplace-v2","EQBYTuYbLf8INxFtD8tQeNk5ZLy-nAX9ahQbG_yl1qQ-GEMS"],["nft-item-editable","EQC2VNMbjQ8BY8b4iXTEop7dxNgYEXPAlr6ph1I-h42LrdED"],["nft-offer","EQA6rqhL9hxd8c3c1JVYQPohQVicy8PEZibTgF60iQCSEk1c"],["nft-fixprice-sale-v2","EQBeaUJdPdO66uL-P_D7-oHClw6uYIAPxoo9CX-TE6psn6lk"],["nft-fixprice-sale-v3","EQCljxPgw_0Z0uELYyt7AoGsmtGP7ORB-A4jk-gyuNJIjsRW"],["nft-collection-editable","EQCHmW1OkT6_-_vO6zoSFW9Z2T62dhffNZkkKRpdaPTFLPdT"],["nft-auction","EQC1yTmHvpD5z4Dk_l-YnEhZclc06utSisqhthfzBGz-w0Ae"],["nft-auction-v2","EQCnTg1uvsqc1ZCSgEOl5Yk5LItktG6OOYrSQ8SnJP4FFa58"]]},{category:"DEX",contracts:[["amm-minter","EQBIzHiopIkaXdXdSZ6Sm57kZV0y_5tZjnGO4fTUsMT0lOUz"]]},{category:"Core",contracts:[["elector","Ef8zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM0vF"],["config","Ef9VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVbxn","latest code in github does not match onchain, func0.2.0 with smart contract from commit 9bff928"]]},{category:"Bridge",contracts:[["eth-bridge","Ef_dJMSh8riPi3BTUTtcxsWjG8RLKnLctNjAM4rw8NN-xWdr"],["eth-bridge-multisig-gov-v2","Ef87m7_QrVM4uXAPCDM4DuF9Rj5Rwa5nHubwiQG96JmyAjQY"],["eth-bridge-multisig-gov-v1","kf8rV4RD7BD-j_C-Xsu8FBO9BOOOwISjNPbBC8tcq688Gcmk"],["eth-bridge-votes-collector","EQCuzvIOXLjH2tv35gY4tzhIvXCqZWDuK9kUhFGXKLImgxT5"],["bsc-bridge-multisig-gov-v1","kf8_gV8rpqtPl1vmYDrMzwxlGQDJ63SIKO8vDhNZHT5wwVhd"],["bsc-bridge-multisig-gov-v2","kf8OvX_5ynDgbp4iqJIvWudSEanWo0qAlOjhWHtga9u2Yo7j"],["bsc-bridge-votes-collector","EQAHI1vGuw7d4WG-CtfDrWqEPNtmUuKjKFEFeJmZaqqfWTvW"],["bsc-bridge","Ef9NXAIQs12t2qIZ-sRZ26D977H65Ol6DQeXc5_gUNaUys5r"]]},{category:"Other",contracts:[["counter","EQC-QTihJV_B4f8M2nynateMLynaRT_uwNYnnuyy87kam-G7"],["tact-example","EQA7c2RpiXxH1X52lvOxLFrVj4MukLeuCENcM86rHYcQdbha"]]},{category:"Unverified",contracts:[["system","Ef8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAU"]]}];function Yae(){const e=([r,i,o])=>`[https://verifier.ton.org/${i}] // ${r} ${o??""}`,t=["# Verified Examples"];V7.forEach(({category:r,contracts:i})=>{t.push(`## ${r}`),t.push(i.map(e).join(` `))}),Gae(t.join(` @@ -262,7 +262,7 @@ Keys: Values: `+String(i)));KS(t);for(var o=0;o0&&Object.prototype.hasOwnProperty.call(e,e.length-1))}var Lce=Ice,J6={exports:{}},ek={exports:{}},eL=function(t,r){return function(){for(var o=new Array(arguments.length),a=0;a"u"}function jce(e){return e!==null&&!GS(e)&&e.constructor!==null&&!GS(e.constructor)&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}function tL(e){return zd.call(e)==="[object ArrayBuffer]"}function $ce(e){return zd.call(e)==="[object FormData]"}function Fce(e){var t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&tL(e.buffer),t}function zce(e){return typeof e=="string"}function Hce(e){return typeof e=="number"}function rL(e){return e!==null&&typeof e=="object"}function f1(e){if(zd.call(e)!=="[object Object]")return!1;var t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function Wce(e){return zd.call(e)==="[object Date]"}function Vce(e){return zd.call(e)==="[object File]"}function qce(e){return zd.call(e)==="[object Blob]"}function nL(e){return zd.call(e)==="[object Function]"}function Kce(e){return rL(e)&&nL(e.pipe)}function Gce(e){return zd.call(e)==="[object URLSearchParams]"}function Yce(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function Qce(){return typeof navigator<"u"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window<"u"&&typeof document<"u"}function rk(e,t){if(!(e===null||typeof e>"u"))if(typeof e!="object"&&(e=[e]),tk(e))for(var r=0,i=e.length;r"u"||(Up.isArray(u)?c=c+"[]":u=[u],Up.forEach(u,function(p){Up.isDate(p)?p=p.toISOString():Up.isObject(p)&&(p=JSON.stringify(p)),a.push(pR(c)+"="+pR(p))}))}),o=a.join("&")}if(o){var s=t.indexOf("#");s!==-1&&(t=t.slice(0,s)),t+=(t.indexOf("?")===-1?"?":"&")+o}return t},Jce=Us;function F2(){this.handlers=[]}F2.prototype.use=function(t,r,i){return this.handlers.push({fulfilled:t,rejected:r,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1};F2.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)};F2.prototype.forEach=function(t){Jce.forEach(this.handlers,function(i){i!==null&&t(i)})};var ede=F2,tde=Us,rde=function(t,r){tde.forEach(t,function(o,a){a!==r&&a.toUpperCase()===r.toUpperCase()&&(t[r]=o,delete t[a])})},oL=function(t,r,i,o,a){return t.config=r,i&&(t.code=i),t.request=o,t.response=a,t.isAxiosError=!0,t.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},t},o5,hR;function aL(){if(hR)return o5;hR=1;var e=oL;return o5=function(r,i,o,a,s){var l=new Error(r);return e(l,i,o,a,s)},o5}var a5,gR;function nde(){if(gR)return a5;gR=1;var e=aL();return a5=function(r,i,o){var a=o.config.validateStatus;!o.status||!a||a(o.status)?r(o):i(e("Request failed with status code "+o.status,o.config,null,o.request,o))},a5}var s5,mR;function ide(){if(mR)return s5;mR=1;var e=Us;return s5=e.isStandardBrowserEnv()?function(){return{write:function(i,o,a,s,l,u){var c=[];c.push(i+"="+encodeURIComponent(o)),e.isNumber(a)&&c.push("expires="+new Date(a).toGMTString()),e.isString(s)&&c.push("path="+s),e.isString(l)&&c.push("domain="+l),u===!0&&c.push("secure"),document.cookie=c.join("; ")},read:function(i){var o=document.cookie.match(new RegExp("(^|;\\s*)("+i+")=([^;]*)"));return o?decodeURIComponent(o[3]):null},remove:function(i){this.write(i,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}(),s5}var l5,yR;function ode(){return yR||(yR=1,l5=function(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}),l5}var u5,vR;function ade(){return vR||(vR=1,u5=function(t,r){return r?t.replace(/\/+$/,"")+"/"+r.replace(/^\/+/,""):t}),u5}var c5,bR;function sde(){if(bR)return c5;bR=1;var e=ode(),t=ade();return c5=function(i,o){return i&&!e(o)?t(i,o):o},c5}var d5,wR;function lde(){if(wR)return d5;wR=1;var e=Us,t=["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"];return d5=function(i){var o={},a,s,l;return i&&e.forEach(i.split(` -`),function(c){if(l=c.indexOf(":"),a=e.trim(c.substr(0,l)).toLowerCase(),s=e.trim(c.substr(l+1)),a){if(o[a]&&t.indexOf(a)>=0)return;a==="set-cookie"?o[a]=(o[a]?o[a]:[]).concat([s]):o[a]=o[a]?o[a]+", "+s:s}}),o},d5}var f5,xR;function ude(){if(xR)return f5;xR=1;var e=Us;return f5=e.isStandardBrowserEnv()?function(){var r=/(msie|trident)/i.test(navigator.userAgent),i=document.createElement("a"),o;function a(s){var l=s;return r&&(i.setAttribute("href",l),l=i.href),i.setAttribute("href",l),{href:i.href,protocol:i.protocol?i.protocol.replace(/:$/,""):"",host:i.host,search:i.search?i.search.replace(/^\?/,""):"",hash:i.hash?i.hash.replace(/^#/,""):"",hostname:i.hostname,port:i.port,pathname:i.pathname.charAt(0)==="/"?i.pathname:"/"+i.pathname}}return o=a(window.location.href),function(l){var u=e.isString(l)?a(l):l;return u.protocol===o.protocol&&u.host===o.host}}():function(){return function(){return!0}}(),f5}var p5,_R;function z2(){if(_R)return p5;_R=1;function e(t){this.message=t}return e.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},e.prototype.__CANCEL__=!0,p5=e,p5}var h5,SR;function CR(){if(SR)return h5;SR=1;var e=Us,t=nde(),r=ide(),i=iL,o=sde(),a=lde(),s=ude(),l=aL(),u=H2(),c=z2();return h5=function(p){return new Promise(function(x,b){var y=p.data,_=p.headers,k=p.responseType,E;function B(){p.cancelToken&&p.cancelToken.unsubscribe(E),p.signal&&p.signal.removeEventListener("abort",E)}e.isFormData(y)&&delete _["Content-Type"];var U=new XMLHttpRequest;if(p.auth){var D=p.auth.username||"",j=p.auth.password?unescape(encodeURIComponent(p.auth.password)):"";_.Authorization="Basic "+btoa(D+":"+j)}var F=o(p.baseURL,p.url);U.open(p.method.toUpperCase(),i(F,p.params,p.paramsSerializer),!0),U.timeout=p.timeout;function H(){if(!!U){var G="getAllResponseHeaders"in U?a(U.getAllResponseHeaders()):null,ae=!k||k==="text"||k==="json"?U.responseText:U.response,V={data:ae,status:U.status,statusText:U.statusText,headers:G,config:p,request:U};t(function(P){x(P),B()},function(P){b(P),B()},V),U=null}}if("onloadend"in U?U.onloadend=H:U.onreadystatechange=function(){!U||U.readyState!==4||U.status===0&&!(U.responseURL&&U.responseURL.indexOf("file:")===0)||setTimeout(H)},U.onabort=function(){!U||(b(l("Request aborted",p,"ECONNABORTED",U)),U=null)},U.onerror=function(){b(l("Network Error",p,null,U)),U=null},U.ontimeout=function(){var ae=p.timeout?"timeout of "+p.timeout+"ms exceeded":"timeout exceeded",V=p.transitional||u.transitional;p.timeoutErrorMessage&&(ae=p.timeoutErrorMessage),b(l(ae,p,V.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",U)),U=null},e.isStandardBrowserEnv()){var W=(p.withCredentials||s(F))&&p.xsrfCookieName?r.read(p.xsrfCookieName):void 0;W&&(_[p.xsrfHeaderName]=W)}"setRequestHeader"in U&&e.forEach(_,function(ae,V){typeof y>"u"&&V.toLowerCase()==="content-type"?delete _[V]:U.setRequestHeader(V,ae)}),e.isUndefined(p.withCredentials)||(U.withCredentials=!!p.withCredentials),k&&k!=="json"&&(U.responseType=p.responseType),typeof p.onDownloadProgress=="function"&&U.addEventListener("progress",p.onDownloadProgress),typeof p.onUploadProgress=="function"&&U.upload&&U.upload.addEventListener("progress",p.onUploadProgress),(p.cancelToken||p.signal)&&(E=function(G){!U||(b(!G||G&&G.type?new c("canceled"):G),U.abort(),U=null)},p.cancelToken&&p.cancelToken.subscribe(E),p.signal&&(p.signal.aborted?E():p.signal.addEventListener("abort",E))),y||(y=null),U.send(y)})},h5}var g5,kR;function H2(){if(kR)return g5;kR=1;var e=Us,t=rde,r=oL,i={"Content-Type":"application/x-www-form-urlencoded"};function o(u,c){!e.isUndefined(u)&&e.isUndefined(u["Content-Type"])&&(u["Content-Type"]=c)}function a(){var u;return(typeof XMLHttpRequest<"u"||typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]")&&(u=CR()),u}function s(u,c,d){if(e.isString(u))try{return(c||JSON.parse)(u),e.trim(u)}catch(p){if(p.name!=="SyntaxError")throw p}return(d||JSON.stringify)(u)}var l={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:a(),transformRequest:[function(c,d){return t(d,"Accept"),t(d,"Content-Type"),e.isFormData(c)||e.isArrayBuffer(c)||e.isBuffer(c)||e.isStream(c)||e.isFile(c)||e.isBlob(c)?c:e.isArrayBufferView(c)?c.buffer:e.isURLSearchParams(c)?(o(d,"application/x-www-form-urlencoded;charset=utf-8"),c.toString()):e.isObject(c)||d&&d["Content-Type"]==="application/json"?(o(d,"application/json"),s(c)):c}],transformResponse:[function(c){var d=this.transitional||l.transitional,p=d&&d.silentJSONParsing,v=d&&d.forcedJSONParsing,x=!p&&this.responseType==="json";if(x||v&&e.isString(c)&&c.length)try{return JSON.parse(c)}catch(b){if(x)throw b.name==="SyntaxError"?r(b,this,"E_JSON_PARSE"):b}return c}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(c){return c>=200&&c<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};return e.forEach(["delete","get","head"],function(c){l.headers[c]={}}),e.forEach(["post","put","patch"],function(c){l.headers[c]=e.merge(i)}),g5=l,g5}var cde=Us,dde=H2(),fde=function(t,r,i){var o=this||dde;return cde.forEach(i,function(s){t=s.call(o,t,r)}),t},m5,ER;function sL(){return ER||(ER=1,m5=function(t){return!!(t&&t.__CANCEL__)}),m5}var AR=Us,y5=fde,pde=sL(),hde=H2(),gde=z2();function v5(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new gde("canceled")}var mde=function(t){v5(t),t.headers=t.headers||{},t.data=y5.call(t,t.data,t.headers,t.transformRequest),t.headers=AR.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),AR.forEach(["delete","get","head","post","put","patch","common"],function(o){delete t.headers[o]});var r=t.adapter||hde.adapter;return r(t).then(function(o){return v5(t),o.data=y5.call(t,o.data,o.headers,t.transformResponse),o},function(o){return pde(o)||(v5(t),o&&o.response&&(o.response.data=y5.call(t,o.response.data,o.response.headers,t.transformResponse))),Promise.reject(o)})},Ls=Us,lL=function(t,r){r=r||{};var i={};function o(d,p){return Ls.isPlainObject(d)&&Ls.isPlainObject(p)?Ls.merge(d,p):Ls.isPlainObject(p)?Ls.merge({},p):Ls.isArray(p)?p.slice():p}function a(d){if(Ls.isUndefined(r[d])){if(!Ls.isUndefined(t[d]))return o(void 0,t[d])}else return o(t[d],r[d])}function s(d){if(!Ls.isUndefined(r[d]))return o(void 0,r[d])}function l(d){if(Ls.isUndefined(r[d])){if(!Ls.isUndefined(t[d]))return o(void 0,t[d])}else return o(void 0,r[d])}function u(d){if(d in r)return o(t[d],r[d]);if(d in t)return o(void 0,t[d])}var c={url:s,method:s,data:s,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,responseEncoding:l,validateStatus:u};return Ls.forEach(Object.keys(t).concat(Object.keys(r)),function(p){var v=c[p]||a,x=v(p);Ls.isUndefined(x)&&v!==u||(i[p]=x)}),i},b5,TR;function uL(){return TR||(TR=1,b5={version:"0.25.0"}),b5}var yde=uL().version,nk={};["object","boolean","number","function","string","symbol"].forEach(function(e,t){nk[e]=function(i){return typeof i===e||"a"+(t<1?"n ":" ")+e}});var IR={};nk.transitional=function(t,r,i){function o(a,s){return"[Axios v"+yde+"] Transitional option '"+a+"'"+s+(i?". "+i:"")}return function(a,s,l){if(t===!1)throw new Error(o(s," has been removed"+(r?" in "+r:"")));return r&&!IR[s]&&(IR[s]=!0,console.warn(o(s," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(a,s,l):!0}};function vde(e,t,r){if(typeof e!="object")throw new TypeError("options must be an object");for(var i=Object.keys(e),o=i.length;o-- >0;){var a=i[o],s=t[a];if(s){var l=e[a],u=l===void 0||s(l,a,e);if(u!==!0)throw new TypeError("option "+a+" must be "+u);continue}if(r!==!0)throw Error("Unknown option "+a)}}var bde={assertOptions:vde,validators:nk},cL=Us,wde=iL,RR=ede,PR=mde,W2=lL,dL=bde,Dp=dL.validators;function Ay(e){this.defaults=e,this.interceptors={request:new RR,response:new RR}}Ay.prototype.request=function(t,r){if(typeof t=="string"?(r=r||{},r.url=t):r=t||{},!r.url)throw new Error("Provided config url is not valid");r=W2(this.defaults,r),r.method?r.method=r.method.toLowerCase():this.defaults.method?r.method=this.defaults.method.toLowerCase():r.method="get";var i=r.transitional;i!==void 0&&dL.assertOptions(i,{silentJSONParsing:Dp.transitional(Dp.boolean),forcedJSONParsing:Dp.transitional(Dp.boolean),clarifyTimeoutError:Dp.transitional(Dp.boolean)},!1);var o=[],a=!0;this.interceptors.request.forEach(function(x){typeof x.runWhen=="function"&&x.runWhen(r)===!1||(a=a&&x.synchronous,o.unshift(x.fulfilled,x.rejected))});var s=[];this.interceptors.response.forEach(function(x){s.push(x.fulfilled,x.rejected)});var l;if(!a){var u=[PR,void 0];for(Array.prototype.unshift.apply(u,o),u=u.concat(s),l=Promise.resolve(r);u.length;)l=l.then(u.shift(),u.shift());return l}for(var c=r;o.length;){var d=o.shift(),p=o.shift();try{c=d(c)}catch(v){p(v);break}}try{l=PR(c)}catch(v){return Promise.reject(v)}for(;s.length;)l=l.then(s.shift(),s.shift());return l};Ay.prototype.getUri=function(t){if(!t.url)throw new Error("Provided config url is not valid");return t=W2(this.defaults,t),wde(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")};cL.forEach(["delete","get","head","options"],function(t){Ay.prototype[t]=function(r,i){return this.request(W2(i||{},{method:t,url:r,data:(i||{}).data}))}});cL.forEach(["post","put","patch"],function(t){Ay.prototype[t]=function(r,i,o){return this.request(W2(o||{},{method:t,url:r,data:i}))}});var xde=Ay,w5,MR;function _de(){if(MR)return w5;MR=1;var e=z2();function t(r){if(typeof r!="function")throw new TypeError("executor must be a function.");var i;this.promise=new Promise(function(s){i=s});var o=this;this.promise.then(function(a){if(!!o._listeners){var s,l=o._listeners.length;for(s=0;sl;function o(l){}i.assertIs=o;function a(l){throw new Error}i.assertNever=a,i.arrayToEnum=l=>{const u={};for(const c of l)u[c]=c;return u},i.getValidEnumValues=l=>{const u=i.objectKeys(l).filter(d=>typeof l[l[d]]!="number"),c={};for(const d of u)c[d]=l[d];return i.objectValues(c)},i.objectValues=l=>i.objectKeys(l).map(function(u){return l[u]}),i.objectKeys=typeof Object.keys=="function"?l=>Object.keys(l):l=>{const u=[];for(const c in l)Object.prototype.hasOwnProperty.call(l,c)&&u.push(c);return u},i.find=(l,u)=>{for(const c of l)if(u(c))return c},i.isInteger=typeof Number.isInteger=="function"?l=>Number.isInteger(l):l=>typeof l=="number"&&isFinite(l)&&Math.floor(l)===l;function s(l,u=" | "){return l.map(c=>typeof c=="string"?`'${c}'`:c).join(u)}i.joinValues=s,i.jsonStringifyReplacer=(l,u)=>typeof u=="bigint"?u.toString():u})(t=e.util||(e.util={})),function(i){i.mergeShapes=(o,a)=>({...o,...a})}(e.objectUtil||(e.objectUtil={})),e.ZodParsedType=t.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);const r=i=>{switch(typeof i){case"undefined":return e.ZodParsedType.undefined;case"string":return e.ZodParsedType.string;case"number":return isNaN(i)?e.ZodParsedType.nan:e.ZodParsedType.number;case"boolean":return e.ZodParsedType.boolean;case"function":return e.ZodParsedType.function;case"bigint":return e.ZodParsedType.bigint;case"symbol":return e.ZodParsedType.symbol;case"object":return Array.isArray(i)?e.ZodParsedType.array:i===null?e.ZodParsedType.null:i.then&&typeof i.then=="function"&&i.catch&&typeof i.catch=="function"?e.ZodParsedType.promise:typeof Map<"u"&&i instanceof Map?e.ZodParsedType.map:typeof Set<"u"&&i instanceof Set?e.ZodParsedType.set:typeof Date<"u"&&i instanceof Date?e.ZodParsedType.date:e.ZodParsedType.object;default:return e.ZodParsedType.unknown}};e.getParsedType=r})(Ty);var Eu={};Object.defineProperty(Eu,"__esModule",{value:!0});Eu.ZodError=Eu.quotelessJson=Eu.ZodIssueCode=void 0;const pL=Ty;Eu.ZodIssueCode=pL.util.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);const Tde=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");Eu.quotelessJson=Tde;class ZS extends Error{constructor(t){super(),this.issues=[],this.addIssue=i=>{this.issues=[...this.issues,i]},this.addIssues=(i=[])=>{this.issues=[...this.issues,...i]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const r=t||function(a){return a.message},i={_errors:[]},o=a=>{for(const s of a.issues)if(s.code==="invalid_union")s.unionErrors.map(o);else if(s.code==="invalid_return_type")o(s.returnTypeError);else if(s.code==="invalid_arguments")o(s.argumentsError);else if(s.path.length===0)i._errors.push(r(s));else{let l=i,u=0;for(;ur.message){const r={},i=[];for(const o of this.issues)o.path.length>0?(r[o.path[0]]=r[o.path[0]]||[],r[o.path[0]].push(t(o))):i.push(t(o));return{formErrors:i,fieldErrors:r}}get formErrors(){return this.flatten()}}Eu.ZodError=ZS;ZS.create=e=>new ZS(e);Object.defineProperty(V2,"__esModule",{value:!0});const tf=Ty,Qa=Eu,Ide=(e,t)=>{let r;switch(e.code){case Qa.ZodIssueCode.invalid_type:e.received===tf.ZodParsedType.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case Qa.ZodIssueCode.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,tf.util.jsonStringifyReplacer)}`;break;case Qa.ZodIssueCode.unrecognized_keys:r=`Unrecognized key(s) in object: ${tf.util.joinValues(e.keys,", ")}`;break;case Qa.ZodIssueCode.invalid_union:r="Invalid input";break;case Qa.ZodIssueCode.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${tf.util.joinValues(e.options)}`;break;case Qa.ZodIssueCode.invalid_enum_value:r=`Invalid enum value. Expected ${tf.util.joinValues(e.options)}, received '${e.received}'`;break;case Qa.ZodIssueCode.invalid_arguments:r="Invalid function arguments";break;case Qa.ZodIssueCode.invalid_return_type:r="Invalid function return type";break;case Qa.ZodIssueCode.invalid_date:r="Invalid date";break;case Qa.ZodIssueCode.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:tf.util.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case Qa.ZodIssueCode.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case Qa.ZodIssueCode.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case Qa.ZodIssueCode.custom:r="Invalid input";break;case Qa.ZodIssueCode.invalid_intersection_types:r="Intersection results could not be merged";break;case Qa.ZodIssueCode.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case Qa.ZodIssueCode.not_finite:r="Number must be finite";break;default:r=t.defaultError,tf.util.assertNever(e)}return{message:r}};V2.default=Ide;var Rde=_n&&_n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ku,"__esModule",{value:!0});ku.getErrorMap=ku.setErrorMap=ku.defaultErrorMap=void 0;const hL=Rde(V2);ku.defaultErrorMap=hL.default;let gL=hL.default;function Pde(e){gL=e}ku.setErrorMap=Pde;function Mde(){return gL}ku.getErrorMap=Mde;var ok={};(function(e){var t=_n&&_n.__importDefault||function(x){return x&&x.__esModule?x:{default:x}};Object.defineProperty(e,"__esModule",{value:!0}),e.isAsync=e.isValid=e.isDirty=e.isAborted=e.OK=e.DIRTY=e.INVALID=e.ParseStatus=e.addIssueToContext=e.EMPTY_PATH=e.makeIssue=void 0;const r=ku,i=t(V2),o=x=>{const{data:b,path:y,errorMaps:_,issueData:k}=x,E=[...y,...k.path||[]],B={...k,path:E};let U="";const D=_.filter(j=>!!j).slice().reverse();for(const j of D)U=j(B,{data:b,defaultError:U}).message;return{...k,path:E,message:k.message||U}};e.makeIssue=o,e.EMPTY_PATH=[];function a(x,b){const y=(0,e.makeIssue)({issueData:b,data:x.data,path:x.path,errorMaps:[x.common.contextualErrorMap,x.schemaErrorMap,(0,r.getErrorMap)(),i.default].filter(_=>!!_)});x.common.issues.push(y)}e.addIssueToContext=a;class s{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(b,y){const _=[];for(const k of y){if(k.status==="aborted")return e.INVALID;k.status==="dirty"&&b.dirty(),_.push(k.value)}return{status:b.value,value:_}}static async mergeObjectAsync(b,y){const _=[];for(const k of y)_.push({key:await k.key,value:await k.value});return s.mergeObjectSync(b,_)}static mergeObjectSync(b,y){const _={};for(const k of y){const{key:E,value:B}=k;if(E.status==="aborted"||B.status==="aborted")return e.INVALID;E.status==="dirty"&&b.dirty(),B.status==="dirty"&&b.dirty(),(typeof B.value<"u"||k.alwaysSet)&&(_[E.value]=B.value)}return{status:b.value,value:_}}}e.ParseStatus=s,e.INVALID=Object.freeze({status:"aborted"});const l=x=>({status:"dirty",value:x});e.DIRTY=l;const u=x=>({status:"valid",value:x});e.OK=u;const c=x=>x.status==="aborted";e.isAborted=c;const d=x=>x.status==="dirty";e.isDirty=d;const p=x=>x.status==="valid";e.isValid=p;const v=x=>typeof Promise<"u"&&x instanceof Promise;e.isAsync=v})(ok);var mL={};Object.defineProperty(mL,"__esModule",{value:!0});var yL={},vL={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.errorUtil=void 0,function(t){t.errToObj=r=>typeof r=="string"?{message:r}:r||{},t.toString=r=>typeof r=="string"?r:r?.message}(e.errorUtil||(e.errorUtil={}))})(vL);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.discriminatedUnion=e.date=e.boolean=e.bigint=e.array=e.any=e.coerce=e.ZodFirstPartyTypeKind=e.late=e.ZodSchema=e.Schema=e.custom=e.ZodPipeline=e.ZodBranded=e.BRAND=e.ZodNaN=e.ZodCatch=e.ZodDefault=e.ZodNullable=e.ZodOptional=e.ZodTransformer=e.ZodEffects=e.ZodPromise=e.ZodNativeEnum=e.ZodEnum=e.ZodLiteral=e.ZodLazy=e.ZodFunction=e.ZodSet=e.ZodMap=e.ZodRecord=e.ZodTuple=e.ZodIntersection=e.ZodDiscriminatedUnion=e.ZodUnion=e.ZodObject=e.ZodArray=e.ZodVoid=e.ZodNever=e.ZodUnknown=e.ZodAny=e.ZodNull=e.ZodUndefined=e.ZodSymbol=e.ZodDate=e.ZodBoolean=e.ZodBigInt=e.ZodNumber=e.ZodString=e.ZodType=void 0,e.NEVER=e.void=e.unknown=e.union=e.undefined=e.tuple=e.transformer=e.symbol=e.string=e.strictObject=e.set=e.record=e.promise=e.preprocess=e.pipeline=e.ostring=e.optional=e.onumber=e.oboolean=e.object=e.number=e.nullable=e.null=e.never=e.nativeEnum=e.nan=e.map=e.literal=e.lazy=e.intersection=e.instanceof=e.function=e.enum=e.effect=void 0;const t=ku,r=vL,i=ok,o=Ty,a=Eu;class s{constructor(K,ye,Me,it){this._cachedPath=[],this.parent=K,this.data=ye,this._path=Me,this._key=it}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const l=(vt,K)=>{if((0,i.isValid)(K))return{success:!0,data:K.value};if(!vt.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const ye=new a.ZodError(vt.common.issues);return this._error=ye,this._error}}};function u(vt){if(!vt)return{};const{errorMap:K,invalid_type_error:ye,required_error:Me,description:it}=vt;if(K&&(ye||Me))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return K?{errorMap:K,description:it}:{errorMap:(br,cr)=>br.code!=="invalid_type"?{message:cr.defaultError}:typeof cr.data>"u"?{message:Me??cr.defaultError}:{message:ye??cr.defaultError},description:it}}class c{constructor(K){this.spa=this.safeParseAsync,this._def=K,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(K){return(0,o.getParsedType)(K.data)}_getOrReturnCtx(K,ye){return ye||{common:K.parent.common,data:K.data,parsedType:(0,o.getParsedType)(K.data),schemaErrorMap:this._def.errorMap,path:K.path,parent:K.parent}}_processInputParams(K){return{status:new i.ParseStatus,ctx:{common:K.parent.common,data:K.data,parsedType:(0,o.getParsedType)(K.data),schemaErrorMap:this._def.errorMap,path:K.path,parent:K.parent}}}_parseSync(K){const ye=this._parse(K);if((0,i.isAsync)(ye))throw new Error("Synchronous parse encountered promise.");return ye}_parseAsync(K){const ye=this._parse(K);return Promise.resolve(ye)}parse(K,ye){const Me=this.safeParse(K,ye);if(Me.success)return Me.data;throw Me.error}safeParse(K,ye){var Me;const it={common:{issues:[],async:(Me=ye?.async)!==null&&Me!==void 0?Me:!1,contextualErrorMap:ye?.errorMap},path:ye?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:K,parsedType:(0,o.getParsedType)(K)},dt=this._parseSync({data:K,path:it.path,parent:it});return l(it,dt)}async parseAsync(K,ye){const Me=await this.safeParseAsync(K,ye);if(Me.success)return Me.data;throw Me.error}async safeParseAsync(K,ye){const Me={common:{issues:[],contextualErrorMap:ye?.errorMap,async:!0},path:ye?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:K,parsedType:(0,o.getParsedType)(K)},it=this._parse({data:K,path:Me.path,parent:Me}),dt=await((0,i.isAsync)(it)?it:Promise.resolve(it));return l(Me,dt)}refine(K,ye){const Me=it=>typeof ye=="string"||typeof ye>"u"?{message:ye}:typeof ye=="function"?ye(it):ye;return this._refinement((it,dt)=>{const br=K(it),cr=()=>dt.addIssue({code:a.ZodIssueCode.custom,...Me(it)});return typeof Promise<"u"&&br instanceof Promise?br.then(Or=>Or?!0:(cr(),!1)):br?!0:(cr(),!1)})}refinement(K,ye){return this._refinement((Me,it)=>K(Me)?!0:(it.addIssue(typeof ye=="function"?ye(Me,it):ye),!1))}_refinement(K){return new Nt({schema:this,typeName:ie.ZodEffects,effect:{type:"refinement",refinement:K}})}superRefine(K){return this._refinement(K)}optional(){return Ie.create(this,this._def)}nullable(){return Ae.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return pe.create(this,this._def)}promise(){return Mt.create(this,this._def)}or(K){return ft.create([this,K],this._def)}and(K){return Bt.create(this,K,this._def)}transform(K){return new Nt({...u(this._def),schema:this,typeName:ie.ZodEffects,effect:{type:"transform",transform:K}})}default(K){const ye=typeof K=="function"?K:()=>K;return new fe({...u(this._def),innerType:this,defaultValue:ye,typeName:ie.ZodDefault})}brand(){return new lt({typeName:ie.ZodBranded,type:this,...u(this._def)})}catch(K){const ye=typeof K=="function"?K:()=>K;return new Be({...u(this._def),innerType:this,catchValue:ye,typeName:ie.ZodCatch})}describe(K){const ye=this.constructor;return new ye({...this._def,description:K})}pipe(K){return jt.create(this,K)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}e.ZodType=c,e.Schema=c,e.ZodSchema=c;const d=/^c[^\s-]{8,}$/i,p=/^[a-z][a-z0-9]*$/,v=/[0-9A-HJKMNP-TV-Z]{26}/,x=/^([a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[a-f0-9]{4}-[a-f0-9]{12}|00000000-0000-0000-0000-000000000000)$/i,b=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\])|(\[IPv6:(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))\])|([A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])*(\.[A-Za-z]{2,})+))$/,y=/^(\p{Extended_Pictographic}|\p{Emoji_Component})+$/u,_=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,k=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,E=vt=>vt.precision?vt.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${vt.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${vt.precision}}Z$`):vt.precision===0?vt.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):vt.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");function B(vt,K){return!!((K==="v4"||!K)&&_.test(vt)||(K==="v6"||!K)&&k.test(vt))}class U extends c{constructor(){super(...arguments),this._regex=(K,ye,Me)=>this.refinement(it=>K.test(it),{validation:ye,code:a.ZodIssueCode.invalid_string,...r.errorUtil.errToObj(Me)}),this.nonempty=K=>this.min(1,r.errorUtil.errToObj(K)),this.trim=()=>new U({...this._def,checks:[...this._def.checks,{kind:"trim"}]}),this.toLowerCase=()=>new U({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]}),this.toUpperCase=()=>new U({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}_parse(K){if(this._def.coerce&&(K.data=String(K.data)),this._getType(K)!==o.ZodParsedType.string){const dt=this._getOrReturnCtx(K);return(0,i.addIssueToContext)(dt,{code:a.ZodIssueCode.invalid_type,expected:o.ZodParsedType.string,received:dt.parsedType}),i.INVALID}const Me=new i.ParseStatus;let it;for(const dt of this._def.checks)if(dt.kind==="min")K.data.lengthdt.value&&(it=this._getOrReturnCtx(K,it),(0,i.addIssueToContext)(it,{code:a.ZodIssueCode.too_big,maximum:dt.value,type:"string",inclusive:!0,exact:!1,message:dt.message}),Me.dirty());else if(dt.kind==="length"){const br=K.data.length>dt.value,cr=K.data.length"u"?null:K?.precision,offset:(ye=K?.offset)!==null&&ye!==void 0?ye:!1,...r.errorUtil.errToObj(K?.message)})}regex(K,ye){return this._addCheck({kind:"regex",regex:K,...r.errorUtil.errToObj(ye)})}includes(K,ye){return this._addCheck({kind:"includes",value:K,position:ye?.position,...r.errorUtil.errToObj(ye?.message)})}startsWith(K,ye){return this._addCheck({kind:"startsWith",value:K,...r.errorUtil.errToObj(ye)})}endsWith(K,ye){return this._addCheck({kind:"endsWith",value:K,...r.errorUtil.errToObj(ye)})}min(K,ye){return this._addCheck({kind:"min",value:K,...r.errorUtil.errToObj(ye)})}max(K,ye){return this._addCheck({kind:"max",value:K,...r.errorUtil.errToObj(ye)})}length(K,ye){return this._addCheck({kind:"length",value:K,...r.errorUtil.errToObj(ye)})}get isDatetime(){return!!this._def.checks.find(K=>K.kind==="datetime")}get isEmail(){return!!this._def.checks.find(K=>K.kind==="email")}get isURL(){return!!this._def.checks.find(K=>K.kind==="url")}get isEmoji(){return!!this._def.checks.find(K=>K.kind==="emoji")}get isUUID(){return!!this._def.checks.find(K=>K.kind==="uuid")}get isCUID(){return!!this._def.checks.find(K=>K.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(K=>K.kind==="cuid2")}get isULID(){return!!this._def.checks.find(K=>K.kind==="ulid")}get isIP(){return!!this._def.checks.find(K=>K.kind==="ip")}get minLength(){let K=null;for(const ye of this._def.checks)ye.kind==="min"&&(K===null||ye.value>K)&&(K=ye.value);return K}get maxLength(){let K=null;for(const ye of this._def.checks)ye.kind==="max"&&(K===null||ye.value{var K;return new U({checks:[],typeName:ie.ZodString,coerce:(K=vt?.coerce)!==null&&K!==void 0?K:!1,...u(vt)})};function D(vt,K){const ye=(vt.toString().split(".")[1]||"").length,Me=(K.toString().split(".")[1]||"").length,it=ye>Me?ye:Me,dt=parseInt(vt.toFixed(it).replace(".","")),br=parseInt(K.toFixed(it).replace(".",""));return dt%br/Math.pow(10,it)}class j extends c{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(K){if(this._def.coerce&&(K.data=Number(K.data)),this._getType(K)!==o.ZodParsedType.number){const dt=this._getOrReturnCtx(K);return(0,i.addIssueToContext)(dt,{code:a.ZodIssueCode.invalid_type,expected:o.ZodParsedType.number,received:dt.parsedType}),i.INVALID}let Me;const it=new i.ParseStatus;for(const dt of this._def.checks)dt.kind==="int"?o.util.isInteger(K.data)||(Me=this._getOrReturnCtx(K,Me),(0,i.addIssueToContext)(Me,{code:a.ZodIssueCode.invalid_type,expected:"integer",received:"float",message:dt.message}),it.dirty()):dt.kind==="min"?(dt.inclusive?K.datadt.value:K.data>=dt.value)&&(Me=this._getOrReturnCtx(K,Me),(0,i.addIssueToContext)(Me,{code:a.ZodIssueCode.too_big,maximum:dt.value,type:"number",inclusive:dt.inclusive,exact:!1,message:dt.message}),it.dirty()):dt.kind==="multipleOf"?D(K.data,dt.value)!==0&&(Me=this._getOrReturnCtx(K,Me),(0,i.addIssueToContext)(Me,{code:a.ZodIssueCode.not_multiple_of,multipleOf:dt.value,message:dt.message}),it.dirty()):dt.kind==="finite"?Number.isFinite(K.data)||(Me=this._getOrReturnCtx(K,Me),(0,i.addIssueToContext)(Me,{code:a.ZodIssueCode.not_finite,message:dt.message}),it.dirty()):o.util.assertNever(dt);return{status:it.value,value:K.data}}gte(K,ye){return this.setLimit("min",K,!0,r.errorUtil.toString(ye))}gt(K,ye){return this.setLimit("min",K,!1,r.errorUtil.toString(ye))}lte(K,ye){return this.setLimit("max",K,!0,r.errorUtil.toString(ye))}lt(K,ye){return this.setLimit("max",K,!1,r.errorUtil.toString(ye))}setLimit(K,ye,Me,it){return new j({...this._def,checks:[...this._def.checks,{kind:K,value:ye,inclusive:Me,message:r.errorUtil.toString(it)}]})}_addCheck(K){return new j({...this._def,checks:[...this._def.checks,K]})}int(K){return this._addCheck({kind:"int",message:r.errorUtil.toString(K)})}positive(K){return this._addCheck({kind:"min",value:0,inclusive:!1,message:r.errorUtil.toString(K)})}negative(K){return this._addCheck({kind:"max",value:0,inclusive:!1,message:r.errorUtil.toString(K)})}nonpositive(K){return this._addCheck({kind:"max",value:0,inclusive:!0,message:r.errorUtil.toString(K)})}nonnegative(K){return this._addCheck({kind:"min",value:0,inclusive:!0,message:r.errorUtil.toString(K)})}multipleOf(K,ye){return this._addCheck({kind:"multipleOf",value:K,message:r.errorUtil.toString(ye)})}finite(K){return this._addCheck({kind:"finite",message:r.errorUtil.toString(K)})}safe(K){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:r.errorUtil.toString(K)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:r.errorUtil.toString(K)})}get minValue(){let K=null;for(const ye of this._def.checks)ye.kind==="min"&&(K===null||ye.value>K)&&(K=ye.value);return K}get maxValue(){let K=null;for(const ye of this._def.checks)ye.kind==="max"&&(K===null||ye.valueK.kind==="int"||K.kind==="multipleOf"&&o.util.isInteger(K.value))}get isFinite(){let K=null,ye=null;for(const Me of this._def.checks){if(Me.kind==="finite"||Me.kind==="int"||Me.kind==="multipleOf")return!0;Me.kind==="min"?(ye===null||Me.value>ye)&&(ye=Me.value):Me.kind==="max"&&(K===null||Me.valuenew j({checks:[],typeName:ie.ZodNumber,coerce:vt?.coerce||!1,...u(vt)});class F extends c{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(K){if(this._def.coerce&&(K.data=BigInt(K.data)),this._getType(K)!==o.ZodParsedType.bigint){const dt=this._getOrReturnCtx(K);return(0,i.addIssueToContext)(dt,{code:a.ZodIssueCode.invalid_type,expected:o.ZodParsedType.bigint,received:dt.parsedType}),i.INVALID}let Me;const it=new i.ParseStatus;for(const dt of this._def.checks)dt.kind==="min"?(dt.inclusive?K.datadt.value:K.data>=dt.value)&&(Me=this._getOrReturnCtx(K,Me),(0,i.addIssueToContext)(Me,{code:a.ZodIssueCode.too_big,type:"bigint",maximum:dt.value,inclusive:dt.inclusive,message:dt.message}),it.dirty()):dt.kind==="multipleOf"?K.data%dt.value!==BigInt(0)&&(Me=this._getOrReturnCtx(K,Me),(0,i.addIssueToContext)(Me,{code:a.ZodIssueCode.not_multiple_of,multipleOf:dt.value,message:dt.message}),it.dirty()):o.util.assertNever(dt);return{status:it.value,value:K.data}}gte(K,ye){return this.setLimit("min",K,!0,r.errorUtil.toString(ye))}gt(K,ye){return this.setLimit("min",K,!1,r.errorUtil.toString(ye))}lte(K,ye){return this.setLimit("max",K,!0,r.errorUtil.toString(ye))}lt(K,ye){return this.setLimit("max",K,!1,r.errorUtil.toString(ye))}setLimit(K,ye,Me,it){return new F({...this._def,checks:[...this._def.checks,{kind:K,value:ye,inclusive:Me,message:r.errorUtil.toString(it)}]})}_addCheck(K){return new F({...this._def,checks:[...this._def.checks,K]})}positive(K){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:r.errorUtil.toString(K)})}negative(K){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:r.errorUtil.toString(K)})}nonpositive(K){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:r.errorUtil.toString(K)})}nonnegative(K){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:r.errorUtil.toString(K)})}multipleOf(K,ye){return this._addCheck({kind:"multipleOf",value:K,message:r.errorUtil.toString(ye)})}get minValue(){let K=null;for(const ye of this._def.checks)ye.kind==="min"&&(K===null||ye.value>K)&&(K=ye.value);return K}get maxValue(){let K=null;for(const ye of this._def.checks)ye.kind==="max"&&(K===null||ye.value{var K;return new F({checks:[],typeName:ie.ZodBigInt,coerce:(K=vt?.coerce)!==null&&K!==void 0?K:!1,...u(vt)})};class H extends c{_parse(K){if(this._def.coerce&&(K.data=Boolean(K.data)),this._getType(K)!==o.ZodParsedType.boolean){const Me=this._getOrReturnCtx(K);return(0,i.addIssueToContext)(Me,{code:a.ZodIssueCode.invalid_type,expected:o.ZodParsedType.boolean,received:Me.parsedType}),i.INVALID}return(0,i.OK)(K.data)}}e.ZodBoolean=H,H.create=vt=>new H({typeName:ie.ZodBoolean,coerce:vt?.coerce||!1,...u(vt)});class W extends c{_parse(K){if(this._def.coerce&&(K.data=new Date(K.data)),this._getType(K)!==o.ZodParsedType.date){const dt=this._getOrReturnCtx(K);return(0,i.addIssueToContext)(dt,{code:a.ZodIssueCode.invalid_type,expected:o.ZodParsedType.date,received:dt.parsedType}),i.INVALID}if(isNaN(K.data.getTime())){const dt=this._getOrReturnCtx(K);return(0,i.addIssueToContext)(dt,{code:a.ZodIssueCode.invalid_date}),i.INVALID}const Me=new i.ParseStatus;let it;for(const dt of this._def.checks)dt.kind==="min"?K.data.getTime()dt.value&&(it=this._getOrReturnCtx(K,it),(0,i.addIssueToContext)(it,{code:a.ZodIssueCode.too_big,message:dt.message,inclusive:!0,exact:!1,maximum:dt.value,type:"date"}),Me.dirty()):o.util.assertNever(dt);return{status:Me.value,value:new Date(K.data.getTime())}}_addCheck(K){return new W({...this._def,checks:[...this._def.checks,K]})}min(K,ye){return this._addCheck({kind:"min",value:K.getTime(),message:r.errorUtil.toString(ye)})}max(K,ye){return this._addCheck({kind:"max",value:K.getTime(),message:r.errorUtil.toString(ye)})}get minDate(){let K=null;for(const ye of this._def.checks)ye.kind==="min"&&(K===null||ye.value>K)&&(K=ye.value);return K!=null?new Date(K):null}get maxDate(){let K=null;for(const ye of this._def.checks)ye.kind==="max"&&(K===null||ye.valuenew W({checks:[],coerce:vt?.coerce||!1,typeName:ie.ZodDate,...u(vt)});class G extends c{_parse(K){if(this._getType(K)!==o.ZodParsedType.symbol){const Me=this._getOrReturnCtx(K);return(0,i.addIssueToContext)(Me,{code:a.ZodIssueCode.invalid_type,expected:o.ZodParsedType.symbol,received:Me.parsedType}),i.INVALID}return(0,i.OK)(K.data)}}e.ZodSymbol=G,G.create=vt=>new G({typeName:ie.ZodSymbol,...u(vt)});class ae extends c{_parse(K){if(this._getType(K)!==o.ZodParsedType.undefined){const Me=this._getOrReturnCtx(K);return(0,i.addIssueToContext)(Me,{code:a.ZodIssueCode.invalid_type,expected:o.ZodParsedType.undefined,received:Me.parsedType}),i.INVALID}return(0,i.OK)(K.data)}}e.ZodUndefined=ae,ae.create=vt=>new ae({typeName:ie.ZodUndefined,...u(vt)});class V extends c{_parse(K){if(this._getType(K)!==o.ZodParsedType.null){const Me=this._getOrReturnCtx(K);return(0,i.addIssueToContext)(Me,{code:a.ZodIssueCode.invalid_type,expected:o.ZodParsedType.null,received:Me.parsedType}),i.INVALID}return(0,i.OK)(K.data)}}e.ZodNull=V,V.create=vt=>new V({typeName:ie.ZodNull,...u(vt)});class oe extends c{constructor(){super(...arguments),this._any=!0}_parse(K){return(0,i.OK)(K.data)}}e.ZodAny=oe,oe.create=vt=>new oe({typeName:ie.ZodAny,...u(vt)});class P extends c{constructor(){super(...arguments),this._unknown=!0}_parse(K){return(0,i.OK)(K.data)}}e.ZodUnknown=P,P.create=vt=>new P({typeName:ie.ZodUnknown,...u(vt)});class ee extends c{_parse(K){const ye=this._getOrReturnCtx(K);return(0,i.addIssueToContext)(ye,{code:a.ZodIssueCode.invalid_type,expected:o.ZodParsedType.never,received:ye.parsedType}),i.INVALID}}e.ZodNever=ee,ee.create=vt=>new ee({typeName:ie.ZodNever,...u(vt)});class le extends c{_parse(K){if(this._getType(K)!==o.ZodParsedType.undefined){const Me=this._getOrReturnCtx(K);return(0,i.addIssueToContext)(Me,{code:a.ZodIssueCode.invalid_type,expected:o.ZodParsedType.void,received:Me.parsedType}),i.INVALID}return(0,i.OK)(K.data)}}e.ZodVoid=le,le.create=vt=>new le({typeName:ie.ZodVoid,...u(vt)});class pe extends c{_parse(K){const{ctx:ye,status:Me}=this._processInputParams(K),it=this._def;if(ye.parsedType!==o.ZodParsedType.array)return(0,i.addIssueToContext)(ye,{code:a.ZodIssueCode.invalid_type,expected:o.ZodParsedType.array,received:ye.parsedType}),i.INVALID;if(it.exactLength!==null){const br=ye.data.length>it.exactLength.value,cr=ye.data.lengthit.maxLength.value&&((0,i.addIssueToContext)(ye,{code:a.ZodIssueCode.too_big,maximum:it.maxLength.value,type:"array",inclusive:!0,exact:!1,message:it.maxLength.message}),Me.dirty()),ye.common.async)return Promise.all([...ye.data].map((br,cr)=>it.type._parseAsync(new s(ye,br,ye.path,cr)))).then(br=>i.ParseStatus.mergeArray(Me,br));const dt=[...ye.data].map((br,cr)=>it.type._parseSync(new s(ye,br,ye.path,cr)));return i.ParseStatus.mergeArray(Me,dt)}get element(){return this._def.type}min(K,ye){return new pe({...this._def,minLength:{value:K,message:r.errorUtil.toString(ye)}})}max(K,ye){return new pe({...this._def,maxLength:{value:K,message:r.errorUtil.toString(ye)}})}length(K,ye){return new pe({...this._def,exactLength:{value:K,message:r.errorUtil.toString(ye)}})}nonempty(K){return this.min(1,K)}}e.ZodArray=pe,pe.create=(vt,K)=>new pe({type:vt,minLength:null,maxLength:null,exactLength:null,typeName:ie.ZodArray,...u(K)});function _e(vt){if(vt instanceof J){const K={};for(const ye in vt.shape){const Me=vt.shape[ye];K[ye]=Ie.create(_e(Me))}return new J({...vt._def,shape:()=>K})}else return vt instanceof pe?new pe({...vt._def,type:_e(vt.element)}):vt instanceof Ie?Ie.create(_e(vt.unwrap())):vt instanceof Ae?Ae.create(_e(vt.unwrap())):vt instanceof Rt?Rt.create(vt.items.map(K=>_e(K))):vt}class J extends c{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const K=this._def.shape(),ye=o.util.objectKeys(K);return this._cached={shape:K,keys:ye}}_parse(K){if(this._getType(K)!==o.ZodParsedType.object){const Sr=this._getOrReturnCtx(K);return(0,i.addIssueToContext)(Sr,{code:a.ZodIssueCode.invalid_type,expected:o.ZodParsedType.object,received:Sr.parsedType}),i.INVALID}const{status:Me,ctx:it}=this._processInputParams(K),{shape:dt,keys:br}=this._getCached(),cr=[];if(!(this._def.catchall instanceof ee&&this._def.unknownKeys==="strip"))for(const Sr in it.data)br.includes(Sr)||cr.push(Sr);const Or=[];for(const Sr of br){const Kr=dt[Sr],on=it.data[Sr];Or.push({key:{status:"valid",value:Sr},value:Kr._parse(new s(it,on,it.path,Sr)),alwaysSet:Sr in it.data})}if(this._def.catchall instanceof ee){const Sr=this._def.unknownKeys;if(Sr==="passthrough")for(const Kr of cr)Or.push({key:{status:"valid",value:Kr},value:{status:"valid",value:it.data[Kr]}});else if(Sr==="strict")cr.length>0&&((0,i.addIssueToContext)(it,{code:a.ZodIssueCode.unrecognized_keys,keys:cr}),Me.dirty());else if(Sr!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const Sr=this._def.catchall;for(const Kr of cr){const on=it.data[Kr];Or.push({key:{status:"valid",value:Kr},value:Sr._parse(new s(it,on,it.path,Kr)),alwaysSet:Kr in it.data})}}return it.common.async?Promise.resolve().then(async()=>{const Sr=[];for(const Kr of Or){const on=await Kr.key;Sr.push({key:on,value:await Kr.value,alwaysSet:Kr.alwaysSet})}return Sr}).then(Sr=>i.ParseStatus.mergeObjectSync(Me,Sr)):i.ParseStatus.mergeObjectSync(Me,Or)}get shape(){return this._def.shape()}strict(K){return r.errorUtil.errToObj,new J({...this._def,unknownKeys:"strict",...K!==void 0?{errorMap:(ye,Me)=>{var it,dt,br,cr;const Or=(br=(dt=(it=this._def).errorMap)===null||dt===void 0?void 0:dt.call(it,ye,Me).message)!==null&&br!==void 0?br:Me.defaultError;return ye.code==="unrecognized_keys"?{message:(cr=r.errorUtil.errToObj(K).message)!==null&&cr!==void 0?cr:Or}:{message:Or}}}:{}})}strip(){return new J({...this._def,unknownKeys:"strip"})}passthrough(){return new J({...this._def,unknownKeys:"passthrough"})}extend(K){return new J({...this._def,shape:()=>({...this._def.shape(),...K})})}merge(K){return new J({unknownKeys:K._def.unknownKeys,catchall:K._def.catchall,shape:()=>({...this._def.shape(),...K._def.shape()}),typeName:ie.ZodObject})}setKey(K,ye){return this.augment({[K]:ye})}catchall(K){return new J({...this._def,catchall:K})}pick(K){const ye={};return o.util.objectKeys(K).forEach(Me=>{K[Me]&&this.shape[Me]&&(ye[Me]=this.shape[Me])}),new J({...this._def,shape:()=>ye})}omit(K){const ye={};return o.util.objectKeys(this.shape).forEach(Me=>{K[Me]||(ye[Me]=this.shape[Me])}),new J({...this._def,shape:()=>ye})}deepPartial(){return _e(this)}partial(K){const ye={};return o.util.objectKeys(this.shape).forEach(Me=>{const it=this.shape[Me];K&&!K[Me]?ye[Me]=it:ye[Me]=it.optional()}),new J({...this._def,shape:()=>ye})}required(K){const ye={};return o.util.objectKeys(this.shape).forEach(Me=>{if(K&&!K[Me])ye[Me]=this.shape[Me];else{let dt=this.shape[Me];for(;dt instanceof Ie;)dt=dt._def.innerType;ye[Me]=dt}}),new J({...this._def,shape:()=>ye})}keyof(){return Kt(o.util.objectKeys(this.shape))}}e.ZodObject=J,J.create=(vt,K)=>new J({shape:()=>vt,unknownKeys:"strip",catchall:ee.create(),typeName:ie.ZodObject,...u(K)}),J.strictCreate=(vt,K)=>new J({shape:()=>vt,unknownKeys:"strict",catchall:ee.create(),typeName:ie.ZodObject,...u(K)}),J.lazycreate=(vt,K)=>new J({shape:vt,unknownKeys:"strip",catchall:ee.create(),typeName:ie.ZodObject,...u(K)});class ft extends c{_parse(K){const{ctx:ye}=this._processInputParams(K),Me=this._def.options;function it(dt){for(const cr of dt)if(cr.result.status==="valid")return cr.result;for(const cr of dt)if(cr.result.status==="dirty")return ye.common.issues.push(...cr.ctx.common.issues),cr.result;const br=dt.map(cr=>new a.ZodError(cr.ctx.common.issues));return(0,i.addIssueToContext)(ye,{code:a.ZodIssueCode.invalid_union,unionErrors:br}),i.INVALID}if(ye.common.async)return Promise.all(Me.map(async dt=>{const br={...ye,common:{...ye.common,issues:[]},parent:null};return{result:await dt._parseAsync({data:ye.data,path:ye.path,parent:br}),ctx:br}})).then(it);{let dt;const br=[];for(const Or of Me){const Sr={...ye,common:{...ye.common,issues:[]},parent:null},Kr=Or._parseSync({data:ye.data,path:ye.path,parent:Sr});if(Kr.status==="valid")return Kr;Kr.status==="dirty"&&!dt&&(dt={result:Kr,ctx:Sr}),Sr.common.issues.length&&br.push(Sr.common.issues)}if(dt)return ye.common.issues.push(...dt.ctx.common.issues),dt.result;const cr=br.map(Or=>new a.ZodError(Or));return(0,i.addIssueToContext)(ye,{code:a.ZodIssueCode.invalid_union,unionErrors:cr}),i.INVALID}}get options(){return this._def.options}}e.ZodUnion=ft,ft.create=(vt,K)=>new ft({options:vt,typeName:ie.ZodUnion,...u(K)});const Le=vt=>vt instanceof Ct?Le(vt.schema):vt instanceof Nt?Le(vt.innerType()):vt instanceof Lt?[vt.value]:vt instanceof yr?vt.options:vt instanceof ne?Object.keys(vt.enum):vt instanceof fe?Le(vt._def.innerType):vt instanceof ae?[void 0]:vt instanceof V?[null]:null;class He extends c{_parse(K){const{ctx:ye}=this._processInputParams(K);if(ye.parsedType!==o.ZodParsedType.object)return(0,i.addIssueToContext)(ye,{code:a.ZodIssueCode.invalid_type,expected:o.ZodParsedType.object,received:ye.parsedType}),i.INVALID;const Me=this.discriminator,it=ye.data[Me],dt=this.optionsMap.get(it);return dt?ye.common.async?dt._parseAsync({data:ye.data,path:ye.path,parent:ye}):dt._parseSync({data:ye.data,path:ye.path,parent:ye}):((0,i.addIssueToContext)(ye,{code:a.ZodIssueCode.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[Me]}),i.INVALID)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(K,ye,Me){const it=new Map;for(const dt of ye){const br=Le(dt.shape[K]);if(!br)throw new Error(`A discriminator value for key \`${K}\` could not be extracted from all schema options`);for(const cr of br){if(it.has(cr))throw new Error(`Discriminator property ${String(K)} has duplicate value ${String(cr)}`);it.set(cr,dt)}}return new He({typeName:ie.ZodDiscriminatedUnion,discriminator:K,options:ye,optionsMap:it,...u(Me)})}}e.ZodDiscriminatedUnion=He;function nr(vt,K){const ye=(0,o.getParsedType)(vt),Me=(0,o.getParsedType)(K);if(vt===K)return{valid:!0,data:vt};if(ye===o.ZodParsedType.object&&Me===o.ZodParsedType.object){const it=o.util.objectKeys(K),dt=o.util.objectKeys(vt).filter(cr=>it.indexOf(cr)!==-1),br={...vt,...K};for(const cr of dt){const Or=nr(vt[cr],K[cr]);if(!Or.valid)return{valid:!1};br[cr]=Or.data}return{valid:!0,data:br}}else if(ye===o.ZodParsedType.array&&Me===o.ZodParsedType.array){if(vt.length!==K.length)return{valid:!1};const it=[];for(let dt=0;dt{if((0,i.isAborted)(dt)||(0,i.isAborted)(br))return i.INVALID;const cr=nr(dt.value,br.value);return cr.valid?(((0,i.isDirty)(dt)||(0,i.isDirty)(br))&&ye.dirty(),{status:ye.value,value:cr.data}):((0,i.addIssueToContext)(Me,{code:a.ZodIssueCode.invalid_intersection_types}),i.INVALID)};return Me.common.async?Promise.all([this._def.left._parseAsync({data:Me.data,path:Me.path,parent:Me}),this._def.right._parseAsync({data:Me.data,path:Me.path,parent:Me})]).then(([dt,br])=>it(dt,br)):it(this._def.left._parseSync({data:Me.data,path:Me.path,parent:Me}),this._def.right._parseSync({data:Me.data,path:Me.path,parent:Me}))}}e.ZodIntersection=Bt,Bt.create=(vt,K,ye)=>new Bt({left:vt,right:K,typeName:ie.ZodIntersection,...u(ye)});class Rt extends c{_parse(K){const{status:ye,ctx:Me}=this._processInputParams(K);if(Me.parsedType!==o.ZodParsedType.array)return(0,i.addIssueToContext)(Me,{code:a.ZodIssueCode.invalid_type,expected:o.ZodParsedType.array,received:Me.parsedType}),i.INVALID;if(Me.data.lengththis._def.items.length&&((0,i.addIssueToContext)(Me,{code:a.ZodIssueCode.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),ye.dirty());const dt=[...Me.data].map((br,cr)=>{const Or=this._def.items[cr]||this._def.rest;return Or?Or._parse(new s(Me,br,Me.path,cr)):null}).filter(br=>!!br);return Me.common.async?Promise.all(dt).then(br=>i.ParseStatus.mergeArray(ye,br)):i.ParseStatus.mergeArray(ye,dt)}get items(){return this._def.items}rest(K){return new Rt({...this._def,rest:K})}}e.ZodTuple=Rt,Rt.create=(vt,K)=>{if(!Array.isArray(vt))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Rt({items:vt,typeName:ie.ZodTuple,rest:null,...u(K)})};class Jt extends c{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(K){const{status:ye,ctx:Me}=this._processInputParams(K);if(Me.parsedType!==o.ZodParsedType.object)return(0,i.addIssueToContext)(Me,{code:a.ZodIssueCode.invalid_type,expected:o.ZodParsedType.object,received:Me.parsedType}),i.INVALID;const it=[],dt=this._def.keyType,br=this._def.valueType;for(const cr in Me.data)it.push({key:dt._parse(new s(Me,cr,Me.path,cr)),value:br._parse(new s(Me,Me.data[cr],Me.path,cr))});return Me.common.async?i.ParseStatus.mergeObjectAsync(ye,it):i.ParseStatus.mergeObjectSync(ye,it)}get element(){return this._def.valueType}static create(K,ye,Me){return ye instanceof c?new Jt({keyType:K,valueType:ye,typeName:ie.ZodRecord,...u(Me)}):new Jt({keyType:U.create(),valueType:K,typeName:ie.ZodRecord,...u(ye)})}}e.ZodRecord=Jt;class vr extends c{_parse(K){const{status:ye,ctx:Me}=this._processInputParams(K);if(Me.parsedType!==o.ZodParsedType.map)return(0,i.addIssueToContext)(Me,{code:a.ZodIssueCode.invalid_type,expected:o.ZodParsedType.map,received:Me.parsedType}),i.INVALID;const it=this._def.keyType,dt=this._def.valueType,br=[...Me.data.entries()].map(([cr,Or],Sr)=>({key:it._parse(new s(Me,cr,Me.path,[Sr,"key"])),value:dt._parse(new s(Me,Or,Me.path,[Sr,"value"]))}));if(Me.common.async){const cr=new Map;return Promise.resolve().then(async()=>{for(const Or of br){const Sr=await Or.key,Kr=await Or.value;if(Sr.status==="aborted"||Kr.status==="aborted")return i.INVALID;(Sr.status==="dirty"||Kr.status==="dirty")&&ye.dirty(),cr.set(Sr.value,Kr.value)}return{status:ye.value,value:cr}})}else{const cr=new Map;for(const Or of br){const Sr=Or.key,Kr=Or.value;if(Sr.status==="aborted"||Kr.status==="aborted")return i.INVALID;(Sr.status==="dirty"||Kr.status==="dirty")&&ye.dirty(),cr.set(Sr.value,Kr.value)}return{status:ye.value,value:cr}}}}e.ZodMap=vr,vr.create=(vt,K,ye)=>new vr({valueType:K,keyType:vt,typeName:ie.ZodMap,...u(ye)});class At extends c{_parse(K){const{status:ye,ctx:Me}=this._processInputParams(K);if(Me.parsedType!==o.ZodParsedType.set)return(0,i.addIssueToContext)(Me,{code:a.ZodIssueCode.invalid_type,expected:o.ZodParsedType.set,received:Me.parsedType}),i.INVALID;const it=this._def;it.minSize!==null&&Me.data.sizeit.maxSize.value&&((0,i.addIssueToContext)(Me,{code:a.ZodIssueCode.too_big,maximum:it.maxSize.value,type:"set",inclusive:!0,exact:!1,message:it.maxSize.message}),ye.dirty());const dt=this._def.valueType;function br(Or){const Sr=new Set;for(const Kr of Or){if(Kr.status==="aborted")return i.INVALID;Kr.status==="dirty"&&ye.dirty(),Sr.add(Kr.value)}return{status:ye.value,value:Sr}}const cr=[...Me.data.values()].map((Or,Sr)=>dt._parse(new s(Me,Or,Me.path,Sr)));return Me.common.async?Promise.all(cr).then(Or=>br(Or)):br(cr)}min(K,ye){return new At({...this._def,minSize:{value:K,message:r.errorUtil.toString(ye)}})}max(K,ye){return new At({...this._def,maxSize:{value:K,message:r.errorUtil.toString(ye)}})}size(K,ye){return this.min(K,ye).max(K,ye)}nonempty(K){return this.min(1,K)}}e.ZodSet=At,At.create=(vt,K)=>new At({valueType:vt,minSize:null,maxSize:null,typeName:ie.ZodSet,...u(K)});class kt extends c{constructor(){super(...arguments),this.validate=this.implement}_parse(K){const{ctx:ye}=this._processInputParams(K);if(ye.parsedType!==o.ZodParsedType.function)return(0,i.addIssueToContext)(ye,{code:a.ZodIssueCode.invalid_type,expected:o.ZodParsedType.function,received:ye.parsedType}),i.INVALID;function Me(cr,Or){return(0,i.makeIssue)({data:cr,path:ye.path,errorMaps:[ye.common.contextualErrorMap,ye.schemaErrorMap,(0,t.getErrorMap)(),t.defaultErrorMap].filter(Sr=>!!Sr),issueData:{code:a.ZodIssueCode.invalid_arguments,argumentsError:Or}})}function it(cr,Or){return(0,i.makeIssue)({data:cr,path:ye.path,errorMaps:[ye.common.contextualErrorMap,ye.schemaErrorMap,(0,t.getErrorMap)(),t.defaultErrorMap].filter(Sr=>!!Sr),issueData:{code:a.ZodIssueCode.invalid_return_type,returnTypeError:Or}})}const dt={errorMap:ye.common.contextualErrorMap},br=ye.data;return this._def.returns instanceof Mt?(0,i.OK)(async(...cr)=>{const Or=new a.ZodError([]),Sr=await this._def.args.parseAsync(cr,dt).catch(Sn=>{throw Or.addIssue(Me(cr,Sn)),Or}),Kr=await br(...Sr);return await this._def.returns._def.type.parseAsync(Kr,dt).catch(Sn=>{throw Or.addIssue(it(Kr,Sn)),Or})}):(0,i.OK)((...cr)=>{const Or=this._def.args.safeParse(cr,dt);if(!Or.success)throw new a.ZodError([Me(cr,Or.error)]);const Sr=br(...Or.data),Kr=this._def.returns.safeParse(Sr,dt);if(!Kr.success)throw new a.ZodError([it(Sr,Kr.error)]);return Kr.data})}parameters(){return this._def.args}returnType(){return this._def.returns}args(...K){return new kt({...this._def,args:Rt.create(K).rest(P.create())})}returns(K){return new kt({...this._def,returns:K})}implement(K){return this.parse(K)}strictImplement(K){return this.parse(K)}static create(K,ye,Me){return new kt({args:K||Rt.create([]).rest(P.create()),returns:ye||P.create(),typeName:ie.ZodFunction,...u(Me)})}}e.ZodFunction=kt;class Ct extends c{get schema(){return this._def.getter()}_parse(K){const{ctx:ye}=this._processInputParams(K);return this._def.getter()._parse({data:ye.data,path:ye.path,parent:ye})}}e.ZodLazy=Ct,Ct.create=(vt,K)=>new Ct({getter:vt,typeName:ie.ZodLazy,...u(K)});class Lt extends c{_parse(K){if(K.data!==this._def.value){const ye=this._getOrReturnCtx(K);return(0,i.addIssueToContext)(ye,{received:ye.data,code:a.ZodIssueCode.invalid_literal,expected:this._def.value}),i.INVALID}return{status:"valid",value:K.data}}get value(){return this._def.value}}e.ZodLiteral=Lt,Lt.create=(vt,K)=>new Lt({value:vt,typeName:ie.ZodLiteral,...u(K)});function Kt(vt,K){return new yr({values:vt,typeName:ie.ZodEnum,...u(K)})}class yr extends c{_parse(K){if(typeof K.data!="string"){const ye=this._getOrReturnCtx(K),Me=this._def.values;return(0,i.addIssueToContext)(ye,{expected:o.util.joinValues(Me),received:ye.parsedType,code:a.ZodIssueCode.invalid_type}),i.INVALID}if(this._def.values.indexOf(K.data)===-1){const ye=this._getOrReturnCtx(K),Me=this._def.values;return(0,i.addIssueToContext)(ye,{received:ye.data,code:a.ZodIssueCode.invalid_enum_value,options:Me}),i.INVALID}return(0,i.OK)(K.data)}get options(){return this._def.values}get enum(){const K={};for(const ye of this._def.values)K[ye]=ye;return K}get Values(){const K={};for(const ye of this._def.values)K[ye]=ye;return K}get Enum(){const K={};for(const ye of this._def.values)K[ye]=ye;return K}extract(K){return yr.create(K)}exclude(K){return yr.create(this.options.filter(ye=>!K.includes(ye)))}}e.ZodEnum=yr,yr.create=Kt;class ne extends c{_parse(K){const ye=o.util.getValidEnumValues(this._def.values),Me=this._getOrReturnCtx(K);if(Me.parsedType!==o.ZodParsedType.string&&Me.parsedType!==o.ZodParsedType.number){const it=o.util.objectValues(ye);return(0,i.addIssueToContext)(Me,{expected:o.util.joinValues(it),received:Me.parsedType,code:a.ZodIssueCode.invalid_type}),i.INVALID}if(ye.indexOf(K.data)===-1){const it=o.util.objectValues(ye);return(0,i.addIssueToContext)(Me,{received:Me.data,code:a.ZodIssueCode.invalid_enum_value,options:it}),i.INVALID}return(0,i.OK)(K.data)}get enum(){return this._def.values}}e.ZodNativeEnum=ne,ne.create=(vt,K)=>new ne({values:vt,typeName:ie.ZodNativeEnum,...u(K)});class Mt extends c{unwrap(){return this._def.type}_parse(K){const{ctx:ye}=this._processInputParams(K);if(ye.parsedType!==o.ZodParsedType.promise&&ye.common.async===!1)return(0,i.addIssueToContext)(ye,{code:a.ZodIssueCode.invalid_type,expected:o.ZodParsedType.promise,received:ye.parsedType}),i.INVALID;const Me=ye.parsedType===o.ZodParsedType.promise?ye.data:Promise.resolve(ye.data);return(0,i.OK)(Me.then(it=>this._def.type.parseAsync(it,{path:ye.path,errorMap:ye.common.contextualErrorMap})))}}e.ZodPromise=Mt,Mt.create=(vt,K)=>new Mt({type:vt,typeName:ie.ZodPromise,...u(K)});class Nt extends c{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ie.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(K){const{status:ye,ctx:Me}=this._processInputParams(K),it=this._def.effect||null;if(it.type==="preprocess"){const br=it.transform(Me.data);return Me.common.async?Promise.resolve(br).then(cr=>this._def.schema._parseAsync({data:cr,path:Me.path,parent:Me})):this._def.schema._parseSync({data:br,path:Me.path,parent:Me})}const dt={addIssue:br=>{(0,i.addIssueToContext)(Me,br),br.fatal?ye.abort():ye.dirty()},get path(){return Me.path}};if(dt.addIssue=dt.addIssue.bind(dt),it.type==="refinement"){const br=cr=>{const Or=it.refinement(cr,dt);if(Me.common.async)return Promise.resolve(Or);if(Or instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return cr};if(Me.common.async===!1){const cr=this._def.schema._parseSync({data:Me.data,path:Me.path,parent:Me});return cr.status==="aborted"?i.INVALID:(cr.status==="dirty"&&ye.dirty(),br(cr.value),{status:ye.value,value:cr.value})}else return this._def.schema._parseAsync({data:Me.data,path:Me.path,parent:Me}).then(cr=>cr.status==="aborted"?i.INVALID:(cr.status==="dirty"&&ye.dirty(),br(cr.value).then(()=>({status:ye.value,value:cr.value}))))}if(it.type==="transform")if(Me.common.async===!1){const br=this._def.schema._parseSync({data:Me.data,path:Me.path,parent:Me});if(!(0,i.isValid)(br))return br;const cr=it.transform(br.value,dt);if(cr instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:ye.value,value:cr}}else return this._def.schema._parseAsync({data:Me.data,path:Me.path,parent:Me}).then(br=>(0,i.isValid)(br)?Promise.resolve(it.transform(br.value,dt)).then(cr=>({status:ye.value,value:cr})):br);o.util.assertNever(it)}}e.ZodEffects=Nt,e.ZodTransformer=Nt,Nt.create=(vt,K,ye)=>new Nt({schema:vt,typeName:ie.ZodEffects,effect:K,...u(ye)}),Nt.createWithPreprocess=(vt,K,ye)=>new Nt({schema:K,effect:{type:"preprocess",transform:vt},typeName:ie.ZodEffects,...u(ye)});class Ie extends c{_parse(K){return this._getType(K)===o.ZodParsedType.undefined?(0,i.OK)(void 0):this._def.innerType._parse(K)}unwrap(){return this._def.innerType}}e.ZodOptional=Ie,Ie.create=(vt,K)=>new Ie({innerType:vt,typeName:ie.ZodOptional,...u(K)});class Ae extends c{_parse(K){return this._getType(K)===o.ZodParsedType.null?(0,i.OK)(null):this._def.innerType._parse(K)}unwrap(){return this._def.innerType}}e.ZodNullable=Ae,Ae.create=(vt,K)=>new Ae({innerType:vt,typeName:ie.ZodNullable,...u(K)});class fe extends c{_parse(K){const{ctx:ye}=this._processInputParams(K);let Me=ye.data;return ye.parsedType===o.ZodParsedType.undefined&&(Me=this._def.defaultValue()),this._def.innerType._parse({data:Me,path:ye.path,parent:ye})}removeDefault(){return this._def.innerType}}e.ZodDefault=fe,fe.create=(vt,K)=>new fe({innerType:vt,typeName:ie.ZodDefault,defaultValue:typeof K.default=="function"?K.default:()=>K.default,...u(K)});class Be extends c{_parse(K){const{ctx:ye}=this._processInputParams(K),Me={...ye,common:{...ye.common,issues:[]}},it=this._def.innerType._parse({data:Me.data,path:Me.path,parent:{...Me}});return(0,i.isAsync)(it)?it.then(dt=>({status:"valid",value:dt.status==="valid"?dt.value:this._def.catchValue({get error(){return new a.ZodError(Me.common.issues)},input:Me.data})})):{status:"valid",value:it.status==="valid"?it.value:this._def.catchValue({get error(){return new a.ZodError(Me.common.issues)},input:Me.data})}}removeCatch(){return this._def.innerType}}e.ZodCatch=Be,Be.create=(vt,K)=>new Be({innerType:vt,typeName:ie.ZodCatch,catchValue:typeof K.catch=="function"?K.catch:()=>K.catch,...u(K)});class rt extends c{_parse(K){if(this._getType(K)!==o.ZodParsedType.nan){const Me=this._getOrReturnCtx(K);return(0,i.addIssueToContext)(Me,{code:a.ZodIssueCode.invalid_type,expected:o.ZodParsedType.nan,received:Me.parsedType}),i.INVALID}return{status:"valid",value:K.data}}}e.ZodNaN=rt,rt.create=vt=>new rt({typeName:ie.ZodNaN,...u(vt)}),e.BRAND=Symbol("zod_brand");class lt extends c{_parse(K){const{ctx:ye}=this._processInputParams(K),Me=ye.data;return this._def.type._parse({data:Me,path:ye.path,parent:ye})}unwrap(){return this._def.type}}e.ZodBranded=lt;class jt extends c{_parse(K){const{status:ye,ctx:Me}=this._processInputParams(K);if(Me.common.async)return(async()=>{const dt=await this._def.in._parseAsync({data:Me.data,path:Me.path,parent:Me});return dt.status==="aborted"?i.INVALID:dt.status==="dirty"?(ye.dirty(),(0,i.DIRTY)(dt.value)):this._def.out._parseAsync({data:dt.value,path:Me.path,parent:Me})})();{const it=this._def.in._parseSync({data:Me.data,path:Me.path,parent:Me});return it.status==="aborted"?i.INVALID:it.status==="dirty"?(ye.dirty(),{status:"dirty",value:it.value}):this._def.out._parseSync({data:it.value,path:Me.path,parent:Me})}}static create(K,ye){return new jt({in:K,out:ye,typeName:ie.ZodPipeline})}}e.ZodPipeline=jt;const ce=(vt,K={},ye)=>vt?oe.create().superRefine((Me,it)=>{var dt,br;if(!vt(Me)){const cr=typeof K=="function"?K(Me):typeof K=="string"?{message:K}:K,Or=(br=(dt=cr.fatal)!==null&&dt!==void 0?dt:ye)!==null&&br!==void 0?br:!0,Sr=typeof cr=="string"?{message:cr}:cr;it.addIssue({code:"custom",...Sr,fatal:Or})}}):oe.create();e.custom=ce,e.late={object:J.lazycreate};var ie;(function(vt){vt.ZodString="ZodString",vt.ZodNumber="ZodNumber",vt.ZodNaN="ZodNaN",vt.ZodBigInt="ZodBigInt",vt.ZodBoolean="ZodBoolean",vt.ZodDate="ZodDate",vt.ZodSymbol="ZodSymbol",vt.ZodUndefined="ZodUndefined",vt.ZodNull="ZodNull",vt.ZodAny="ZodAny",vt.ZodUnknown="ZodUnknown",vt.ZodNever="ZodNever",vt.ZodVoid="ZodVoid",vt.ZodArray="ZodArray",vt.ZodObject="ZodObject",vt.ZodUnion="ZodUnion",vt.ZodDiscriminatedUnion="ZodDiscriminatedUnion",vt.ZodIntersection="ZodIntersection",vt.ZodTuple="ZodTuple",vt.ZodRecord="ZodRecord",vt.ZodMap="ZodMap",vt.ZodSet="ZodSet",vt.ZodFunction="ZodFunction",vt.ZodLazy="ZodLazy",vt.ZodLiteral="ZodLiteral",vt.ZodEnum="ZodEnum",vt.ZodEffects="ZodEffects",vt.ZodNativeEnum="ZodNativeEnum",vt.ZodOptional="ZodOptional",vt.ZodNullable="ZodNullable",vt.ZodDefault="ZodDefault",vt.ZodCatch="ZodCatch",vt.ZodPromise="ZodPromise",vt.ZodBranded="ZodBranded",vt.ZodPipeline="ZodPipeline"})(ie=e.ZodFirstPartyTypeKind||(e.ZodFirstPartyTypeKind={}));const de=(vt,K={message:`Input not instance of ${vt.name}`})=>(0,e.custom)(ye=>ye instanceof vt,K);e.instanceof=de;const $=U.create;e.string=$;const C=j.create;e.number=C;const T=rt.create;e.nan=T;const Q=F.create;e.bigint=Q;const ve=H.create;e.boolean=ve;const je=W.create;e.date=je;const ct=G.create;e.symbol=ct;const ur=ae.create;e.undefined=ur;const Dr=V.create;e.null=Dr;const hr=oe.create;e.any=hr;const Rr=P.create;e.unknown=Rr;const Gr=ee.create;e.never=Gr;const Nr=le.create;e.void=Nr;const Kn=pe.create;e.array=Kn;const Tn=J.create;e.object=Tn;const In=J.strictCreate;e.strictObject=In;const yt=ft.create;e.union=yt;const Ei=He.create;e.discriminatedUnion=Ei;const Yn=Bt.create;e.intersection=Yn;const Pi=Rt.create;e.tuple=Pi;const Ji=Jt.create;e.record=Ji;const qo=vr.create;e.map=qo;const eo=At.create;e.set=eo;const Mo=kt.create;e.function=Mo;const Wi=Ct.create;e.lazy=Wi;const pa=Lt.create;e.literal=pa;const ue=yr.create;e.enum=ue;const Re=ne.create;e.nativeEnum=Re;const Ee=Mt.create;e.promise=Ee;const q=Nt.create;e.effect=q,e.transformer=q;const Fe=Ie.create;e.optional=Fe;const Xt=Ae.create;e.nullable=Xt;const ar=Nt.createWithPreprocess;e.preprocess=ar;const Br=jt.create;e.pipeline=Br;const Hr=()=>$().optional();e.ostring=Hr;const An=()=>C().optional();e.onumber=An;const un=()=>ve().optional();e.oboolean=un,e.coerce={string:vt=>U.create({...vt,coerce:!0}),number:vt=>j.create({...vt,coerce:!0}),boolean:vt=>H.create({...vt,coerce:!0}),bigint:vt=>F.create({...vt,coerce:!0}),date:vt=>W.create({...vt,coerce:!0})},e.NEVER=i.INVALID})(yL);(function(e){var t=_n&&_n.__createBinding||(Object.create?function(i,o,a,s){s===void 0&&(s=a),Object.defineProperty(i,s,{enumerable:!0,get:function(){return o[a]}})}:function(i,o,a,s){s===void 0&&(s=a),i[s]=o[a]}),r=_n&&_n.__exportStar||function(i,o){for(var a in i)a!=="default"&&!Object.prototype.hasOwnProperty.call(o,a)&&t(o,i,a)};Object.defineProperty(e,"__esModule",{value:!0}),r(ku,e),r(ok,e),r(mL,e),r(Ty,e),r(yL,e),r(Eu,e)})(QS);(function(e){var t=_n&&_n.__createBinding||(Object.create?function(s,l,u,c){c===void 0&&(c=u),Object.defineProperty(s,c,{enumerable:!0,get:function(){return l[u]}})}:function(s,l,u,c){c===void 0&&(c=u),s[c]=l[u]}),r=_n&&_n.__setModuleDefault||(Object.create?function(s,l){Object.defineProperty(s,"default",{enumerable:!0,value:l})}:function(s,l){s.default=l}),i=_n&&_n.__importStar||function(s){if(s&&s.__esModule)return s;var l={};if(s!=null)for(var u in s)u!=="default"&&Object.prototype.hasOwnProperty.call(s,u)&&t(l,s,u);return r(l,s),l},o=_n&&_n.__exportStar||function(s,l){for(var u in s)u!=="default"&&!Object.prototype.hasOwnProperty.call(l,u)&&t(l,s,u)};Object.defineProperty(e,"__esModule",{value:!0}),e.z=void 0;const a=i(QS);e.z=a,o(QS,e),e.default=a})(ik);const Ode="ton",Bde="13.5.0",Ude="https://github.com/ton-core/ton.git",Dde="Whales Corp. ",Lde="MIT",Nde="dist/index.js",jde=["dist"],$de={docs:"rm -fr docs && typedoc src/index.ts",build:"rm -fr dist && tsc --declaration",test:"jest --verbose --runInBand",release:"yarn build && yarn release-it --npm.yarn1"},Fde={"@release-it/keep-a-changelog":"^3.1.0","@types/jest":"^27.0.1","@types/node":"^16.7.10",buffer:"^6.0.3",expect:"^27.1.0",jest:"^27.1.0","jest-mock":"^27.1.0",karma:"^6.3.4","karma-chrome-launcher":"^3.1.0","karma-jasmine":"^4.0.1","karma-typescript":"^5.5.2","karma-webpack":"^5.0.0",prando:"^6.0.1","release-it":"^15.5.1","ton-core":"^0.48.0","ton-crypto":"3.2.0","ton-emulator":"^2.1.1","ts-jest":"^27.0.5","ts-loader":"^9.2.5","ts-node":"^10.7.0",typedoc:"^0.23.24",typescript:"^4.4.2",webpack:"^5.51.2"},zde={axios:"^0.25.0",dataloader:"^2.0.0","symbol.inspect":"1.0.1",teslabot:"^1.3.0",zod:"^3.21.4"},Hde={"ton-core":">=0.48.0","ton-crypto":">=3.2.0"},Wde={access:"public",registry:"https://registry.npmjs.org/"},Vde="yarn@3.4.1",qde={name:Ode,version:Bde,repository:Ude,author:Dde,license:Lde,main:Nde,files:jde,scripts:$de,devDependencies:Fde,dependencies:zde,peerDependencies:Hde,publishConfig:Wde,"release-it":{github:{release:!0},plugins:{"@release-it/keep-a-changelog":{filename:"CHANGELOG.md"}}},packageManager:Vde};var bL=_n&&_n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ey,"__esModule",{value:!0});Ey.HttpApi=void 0;const Kde=$2,DR=bL(Lce),Gde=bL(J6.exports),sn=ik,Yde=qde.version,qh=sn.z.object({"@type":sn.z.literal("ton.blockIdExt"),workchain:sn.z.number(),shard:sn.z.string(),seqno:sn.z.number(),root_hash:sn.z.string(),file_hash:sn.z.string()}),Qde=sn.z.object({balance:sn.z.union([sn.z.number(),sn.z.string()]),state:sn.z.union([sn.z.literal("active"),sn.z.literal("uninitialized"),sn.z.literal("frozen")]),data:sn.z.string(),code:sn.z.string(),last_transaction_id:sn.z.object({"@type":sn.z.literal("internal.transactionId"),lt:sn.z.string(),hash:sn.z.string()}),block_id:qh,sync_utime:sn.z.number()}),Zde=sn.z.object({"@type":sn.z.literal("ok")}),Xde=sn.z.object({"@type":sn.z.literal("query.fees"),source_fees:sn.z.object({"@type":sn.z.literal("fees"),in_fwd_fee:sn.z.number(),storage_fee:sn.z.number(),gas_fee:sn.z.number(),fwd_fee:sn.z.number()})}),Jde=sn.z.object({gas_used:sn.z.number(),exit_code:sn.z.number(),stack:sn.z.array(sn.z.unknown())}),efe=sn.z.union([sn.z.object({"@type":sn.z.literal("msg.dataRaw"),body:sn.z.string()}),sn.z.object({"@type":sn.z.literal("msg.dataText"),text:sn.z.string()}),sn.z.object({"@type":sn.z.literal("msg.dataDecryptedText"),text:sn.z.string()}),sn.z.object({"@type":sn.z.literal("msg.dataEncryptedText"),text:sn.z.string()})]),LR=sn.z.object({source:sn.z.string(),destination:sn.z.string(),value:sn.z.string(),fwd_fee:sn.z.string(),ihr_fee:sn.z.string(),created_lt:sn.z.string(),body_hash:sn.z.string(),msg_data:efe}),tfe=sn.z.object({data:sn.z.string(),utime:sn.z.number(),transaction_id:sn.z.object({lt:sn.z.string(),hash:sn.z.string()}),fee:sn.z.string(),storage_fee:sn.z.string(),other_fee:sn.z.string(),in_msg:sn.z.union([sn.z.undefined(),LR]),out_msgs:sn.z.array(LR)}),NR=sn.z.array(tfe),rfe=sn.z.object({state_root_hash:sn.z.string(),last:qh,init:qh}),nfe=sn.z.object({shards:sn.z.array(qh)}),ife=sn.z.object({"@type":sn.z.literal("blocks.shortTxId"),mode:sn.z.number(),account:sn.z.string(),lt:sn.z.string(),hash:sn.z.string()}),jR=sn.z.object({id:qh,req_count:sn.z.number(),incomplete:sn.z.boolean(),transactions:sn.z.array(ife)});class $R{constructor(t,r,i,o){this.namespace=t,this.cache=r,this.codec=i,this.keyEncoder=o}async get(t){let r=await this.cache.get(this.namespace,this.keyEncoder(t));if(r){let i=this.codec.safeParse(JSON.parse(r));if(i.success)return i.data}return null}async set(t,r){r!==null?await this.cache.set(this.namespace,this.keyEncoder(t),JSON.stringify(r)):await this.cache.set(this.namespace,this.keyEncoder(t),null)}}class ofe{constructor(t,r){this.endpoint=t,this.cache=new Kde.InMemoryCache,this.parameters={timeout:r?.timeout||3e4,apiKey:r?.apiKey},this.shardCache=new $R("ton-shard",this.cache,sn.z.array(qh),i=>i+""),this.shardLoader=new DR.default(async i=>await Promise.all(i.map(async o=>{const a=await this.shardCache.get(o);if(a)return a;let s=(await this.doCall("shards",{seqno:o},nfe)).shards;return await this.shardCache.set(o,s),s}))),this.shardTransactionsCache=new $R("ton-shard-tx",this.cache,jR,i=>i.workchain+":"+i.shard+":"+i.seqno),this.shardTransactionsLoader=new DR.default(async i=>await Promise.all(i.map(async o=>{const a=await this.shardTransactionsCache.get(o);if(a)return a;let s=await this.doCall("getBlockTransactions",{workchain:o.workchain,seqno:o.seqno,shard:o.shard},jR);return await this.shardTransactionsCache.set(o,s),s})),{cacheKeyFn:i=>i.workchain+":"+i.shard+":"+i.seqno})}getAddressInformation(t){return this.doCall("getAddressInformation",{address:t.toString()},Qde)}async getTransactions(t,r){const i=r.inclusive;delete r.inclusive;let o;r.hash&&(o=Buffer.from(r.hash,"base64").toString("hex"));let a=r.limit;r.hash&&r.lt&&i!==!0&&a++;let s=await this.doCall("getTransactions",{address:t.toString(),...r,limit:a,hash:o},NR);return s.length>a&&(s=s.slice(0,a)),r.hash&&r.lt&&i!==!0&&s.shift(),s}async getMasterchainInfo(){return await this.doCall("getMasterchainInfo",{},rfe)}async getShards(t){return await this.shardLoader.load(t)}async getBlockTransactions(t,r,i){return await this.shardTransactionsLoader.load({workchain:t,seqno:r,shard:i})}async getTransaction(t,r,i){let o=Buffer.from(i,"base64").toString("hex"),s=(await this.doCall("getTransactions",{address:t.toString(),lt:r,hash:o,limit:1},NR)).find(l=>l.transaction_id.lt===r&&l.transaction_id.hash===i);return s||null}async callGetMethod(t,r,i){return await this.doCall("runGetMethod",{address:t.toString(),method:r,stack:afe(i)},Jde)}async sendBoc(t){await this.doCall("sendBoc",{boc:t.toString("base64")},Zde)}async estimateFee(t,r){return await this.doCall("estimateFee",{address:t.toString(),body:r.body.toBoc().toString("base64"),init_data:r.initData?r.initData.toBoc().toString("base64"):"",init_code:r.initCode?r.initCode.toBoc().toString("base64"):"",ignore_chksig:r.ignoreSignature},Xde)}async doCall(t,r,i){let o={"Content-Type":"application/json","X-Ton-Client-Version":Yde};this.parameters.apiKey&&(o["X-API-Key"]=this.parameters.apiKey);let a=await Gde.default.post(this.endpoint,JSON.stringify({id:"1",jsonrpc:"2.0",method:t,params:r}),{headers:o,timeout:this.parameters.timeout});if(a.status!==200||!a.data.ok)throw Error("Received error: "+JSON.stringify(a.data));let s=i.safeParse(a.data.result);if(s.success)return s.data;throw Error("Malformed response: "+s.error.format()._errors.join(", "))}}Ey.HttpApi=ofe;function afe(e){let t=[];for(let r of e)if(r.type==="int")t.push(["num",r.value.toString()]);else if(r.type==="cell")t.push(["tvm.Cell",r.cell.toBoc().toString("base64")]);else if(r.type==="slice")t.push(["tvm.Slice",r.cell.toBoc().toString("base64")]);else if(r.type==="builder")t.push(["tvm.Builder",r.cell.toBoc().toString("base64")]);else throw Error("Unsupported stack item type: "+r.type);return t}var q2={},sfe=_n&&_n.__classPrivateFieldSet||function(e,t,r,i,o){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!o)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?o.call(e,r):o?o.value=r:t.set(e,r),r},Ul=_n&&_n.__classPrivateFieldGet||function(e,t,r,i){if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?i:r==="a"?i.call(e):i?i.value:t.get(e)},vs;Object.defineProperty(q2,"__esModule",{value:!0});q2.TonClient=void 0;const lfe=Ey,va=fo;class ufe{constructor(t){vs.set(this,void 0),this.parameters={endpoint:t.endpoint},sfe(this,vs,new lfe.HttpApi(this.parameters.endpoint,{timeout:t.timeout,apiKey:t.apiKey,adapter:t.httpAdapter}),"f")}async getBalance(t){return(await this.getContractState(t)).balance}async runMethod(t,r,i=[]){let o=await Ul(this,vs,"f").callGetMethod(t,r,i);if(o.exit_code!==0)throw Error("Unable to execute get method. Got exit_code: "+o.exit_code);return{gas_used:o.gas_used,stack:FR(o.stack)}}async callGetMethod(t,r,i=[]){return this.runMethod(t,r,i)}async runMethodWithError(t,r,i=[]){let o=await Ul(this,vs,"f").callGetMethod(t,r,i);return{gas_used:o.gas_used,stack:FR(o.stack),exit_code:o.exit_code}}async callGetMethodWithError(t,r,i=[]){return this.runMethodWithError(t,r,i)}async getTransactions(t,r){let i=await Ul(this,vs,"f").getTransactions(t,r),o=[];for(let a of i)o.push((0,va.loadTransaction)(va.Cell.fromBoc(Buffer.from(a.data,"base64"))[0].beginParse()));return o}async getTransaction(t,r,i){let o=await Ul(this,vs,"f").getTransaction(t,r,i);return o?(0,va.loadTransaction)(va.Cell.fromBoc(Buffer.from(o.data,"base64"))[0].beginParse()):null}async getMasterchainInfo(){let t=await Ul(this,vs,"f").getMasterchainInfo();return{workchain:t.init.workchain,shard:t.last.shard,initSeqno:t.init.seqno,latestSeqno:t.last.seqno}}async getWorkchainShards(t){return(await Ul(this,vs,"f").getShards(t)).map(i=>({workchain:i.workchain,shard:i.shard,seqno:i.seqno}))}async getShardTransactions(t,r,i){let o=await Ul(this,vs,"f").getBlockTransactions(t,r,i);if(o.incomplete)throw Error("Unsupported");return o.transactions.map(a=>({account:va.Address.parseRaw(a.account),lt:a.lt,hash:a.hash}))}async sendMessage(t){const r=(0,va.beginCell)().store((0,va.storeMessage)(t)).endCell().toBoc();await Ul(this,vs,"f").sendBoc(r)}async sendFile(t){await Ul(this,vs,"f").sendBoc(t)}async estimateExternalMessageFee(t,r){return await Ul(this,vs,"f").estimateFee(t,{body:r.body,initCode:r.initCode,initData:r.initData,ignoreSignature:r.ignoreSignature})}async sendExternalMessage(t,r){if(await this.isContractDeployed(t.address)||!t.init){const i=(0,va.external)({to:t.address,body:r});await this.sendMessage(i)}else{const i=(0,va.external)({to:t.address,init:{code:t.init.code,data:t.init.data},body:r});await this.sendMessage(i)}}async isContractDeployed(t){return(await this.getContractState(t)).state==="active"}async getContractState(t){let r=await Ul(this,vs,"f").getAddressInformation(t),i=BigInt(r.balance),o=r.state;return{balance:i,state:o,code:r.code!==""?Buffer.from(r.code,"base64"):null,data:r.data!==""?Buffer.from(r.data,"base64"):null,lastTransaction:r.last_transaction_id.lt!=="0"?{lt:r.last_transaction_id.lt,hash:r.last_transaction_id.hash}:null,blockId:{workchain:r.block_id.workchain,shard:r.block_id.shard,seqno:r.block_id.seqno},timestampt:r.sync_utime}}open(t){return(0,va.openContract)(t,r=>zR(this,r.address,r.init))}provider(t,r){return zR(this,t,r)}}q2.TonClient=ufe;vs=new WeakMap;function FR(e){let t=[];for(let r of e)if(r[0]==="num"){let i=r[1];i.startsWith("-")?t.push({type:"int",value:-BigInt(i.slice(1))}):t.push({type:"int",value:BigInt(i)})}else if(r[0]==="null")t.push({type:"null"});else if(r[0]==="cell")t.push({type:"cell",cell:va.Cell.fromBoc(Buffer.from(r[1].bytes,"base64"))[0]});else if(r[0]==="slice")t.push({type:"slice",cell:va.Cell.fromBoc(Buffer.from(r[1].bytes,"base64"))[0]});else if(r[0]==="builder")t.push({type:"builder",cell:va.Cell.fromBoc(Buffer.from(r[1].bytes,"base64"))[0]});else throw Error("Unsupported stack item type: "+r[0]);return new va.TupleReader(t)}function zR(e,t,r){return{async getState(){let i=await e.getContractState(t),o=i.balance,a=i.lastTransaction?{lt:BigInt(i.lastTransaction.lt),hash:Buffer.from(i.lastTransaction.hash,"base64")}:null,s;if(i.state==="active")s={type:"active",code:i.code?i.code:null,data:i.data?i.data:null};else if(i.state==="uninitialized")s={type:"uninit"};else if(i.state==="frozen")s={type:"frozen",stateHash:Buffer.alloc(0)};else throw Error("Unsupported state");return{balance:o,last:a,state:s}},async get(i,o){return{stack:(await e.callGetMethod(t,i,o)).stack}},async external(i){let o=null;r&&!await e.isContractDeployed(t)&&(o=r);const a=(0,va.external)({to:t,init:o?{code:o.code,data:o.data}:null,body:i});let s=(0,va.beginCell)().store((0,va.storeMessage)(a)).endCell().toBoc();await e.sendFile(s)},async internal(i,o){let a=null;r&&!await e.isContractDeployed(t)&&(a=r);let s=!0;o.bounce!==null&&o.bounce!==void 0&&(s=o.bounce);let l;typeof o.value=="string"?l=(0,va.toNano)(o.value):l=o.value;let u=null;typeof o.body=="string"?u=(0,va.comment)(o.body):o.body&&(u=o.body),await i.send({to:t,value:l,bounce:s,sendMode:o.sendMode,init:a,body:u})}}}var K2={},G2={};Object.defineProperty(G2,"__esModule",{value:!0});G2.toUrlSafe=void 0;function cfe(e){for(;e.indexOf("/")>=0;)e=e.replace("/","_");for(;e.indexOf("+")>=0;)e=e.replace("+","-");for(;e.indexOf("=")>=0;)e=e.replace("=","");return e}G2.toUrlSafe=cfe;var S5=_n&&_n.__classPrivateFieldSet||function(e,t,r,i,o){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!o)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?o.call(e,r):o?o.value=r:t.set(e,r),r},uo=_n&&_n.__classPrivateFieldGet||function(e,t,r,i){if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?i:r==="a"?i.call(e):i?i.value:t.get(e)},dfe=_n&&_n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},$s,Fs,zs;Object.defineProperty(K2,"__esModule",{value:!0});K2.TonClient4=void 0;const su=dfe(J6.exports),ws=fo,HR=G2,Ir=ik;class ffe{constructor(t){$s.set(this,void 0),Fs.set(this,void 0),zs.set(this,void 0),S5(this,$s,t.endpoint,"f"),S5(this,Fs,t.timeout||5e3,"f"),S5(this,zs,t.httpAdapter,"f")}async getLastBlock(){let t=await su.default.get(uo(this,$s,"f")+"/block/latest",{adapter:uo(this,zs,"f"),timeout:uo(this,Fs,"f")}),r=pfe.safeParse(t.data);if(!r.success)throw Error("Mailformed response: "+r.error.format()._errors.join(", "));return r.data}async getBlock(t){let r=await su.default.get(uo(this,$s,"f")+"/block/"+t,{adapter:uo(this,zs,"f"),timeout:uo(this,Fs,"f")}),i=WR.safeParse(r.data);if(!i.success)throw Error("Mailformed response");if(!i.data.exist)throw Error("Block is out of scope");return i.data.block}async getBlockByUtime(t){let r=await su.default.get(uo(this,$s,"f")+"/block/utime/"+t,{adapter:uo(this,zs,"f"),timeout:uo(this,Fs,"f")}),i=WR.safeParse(r.data);if(!i.success)throw Error("Mailformed response");if(!i.data.exist)throw Error("Block is out of scope");return i.data.block}async getAccount(t,r){let i=await su.default.get(uo(this,$s,"f")+"/block/"+t+"/"+r.toString({urlSafe:!0}),{adapter:uo(this,zs,"f"),timeout:uo(this,Fs,"f")}),o=hfe.safeParse(i.data);if(!o.success)throw Error("Mailformed response");return o.data}async getAccountLite(t,r){let i=await su.default.get(uo(this,$s,"f")+"/block/"+t+"/"+r.toString({urlSafe:!0})+"/lite",{adapter:uo(this,zs,"f"),timeout:uo(this,Fs,"f")}),o=gfe.safeParse(i.data);if(!o.success)throw Error("Mailformed response");return o.data}async isContractDeployed(t,r){return(await this.getAccountLite(t,r)).account.state.type==="active"}async isAccountChanged(t,r,i){let o=await su.default.get(uo(this,$s,"f")+"/block/"+t+"/"+r.toString({urlSafe:!0})+"/changed/"+i.toString(10),{adapter:uo(this,zs,"f"),timeout:uo(this,Fs,"f")}),a=mfe.safeParse(o.data);if(!a.success)throw Error("Mailformed response");return a.data}async getAccountTransactions(t,r,i){let o=await su.default.get(uo(this,$s,"f")+"/account/"+t.toString({urlSafe:!0})+"/tx/"+r.toString(10)+"/"+(0,HR.toUrlSafe)(i.toString("base64")),{adapter:uo(this,zs,"f"),timeout:uo(this,Fs,"f")}),a=wfe.safeParse(o.data);if(!a.success)throw Error("Mailformed response");let s=a.data,l=[],u=ws.Cell.fromBoc(Buffer.from(s.boc,"base64"));for(let c=0;c0&&(i="/"+[...r].sort().join(","));let o=await su.default.get(uo(this,$s,"f")+"/block/"+t+"/config"+i,{adapter:uo(this,zs,"f"),timeout:uo(this,Fs,"f")}),a=vfe.safeParse(o.data);if(!a.success)throw Error("Mailformed response");return a.data}async runMethod(t,r,i,o){let a=o&&o.length>0?"/"+(0,HR.toUrlSafe)((0,ws.serializeTuple)(o).toBoc({idx:!1,crc32:!1}).toString("base64")):"",s=uo(this,$s,"f")+"/block/"+t+"/"+r.toString({urlSafe:!0})+"/run/"+i+a,l=await su.default.get(s,{adapter:uo(this,zs,"f"),timeout:uo(this,Fs,"f")}),u=yfe.safeParse(l.data);if(!u.success)throw Error("Mailformed response");let c=u.data.resultRaw?(0,ws.parseTuple)(ws.Cell.fromBoc(Buffer.from(u.data.resultRaw,"base64"))[0]):[];return{exitCode:u.data.exitCode,result:c,resultRaw:u.data.resultRaw,block:u.data.block,shardBlock:u.data.shardBlock,reader:new ws.TupleReader(c)}}async sendMessage(t){let r=await su.default.post(uo(this,$s,"f")+"/send",{boc:t.toString("base64")},{adapter:uo(this,zs,"f"),timeout:uo(this,Fs,"f")});if(!bfe.safeParse(r.data).success)throw Error("Mailformed response");return{status:r.data.status}}open(t){return(0,ws.openContract)(t,r=>Rv(this,null,r.address,r.init))}openAt(t,r){return(0,ws.openContract)(r,i=>Rv(this,t,i.address,i.init))}provider(t,r){return Rv(this,null,t,r||null)}providerAt(t,r,i){return Rv(this,t,r,i||null)}}K2.TonClient4=ffe;$s=new WeakMap,Fs=new WeakMap,zs=new WeakMap;function Rv(e,t,r,i){return{async getState(){let o=t;o===null&&(o=(await e.getLastBlock()).last.seqno);let a=await e.getAccount(o,r),s=a.account.last?{lt:BigInt(a.account.last.lt),hash:Buffer.from(a.account.last.hash,"base64")}:null,l;if(a.account.state.type==="active")l={type:"active",code:a.account.state.code?Buffer.from(a.account.state.code,"base64"):null,data:a.account.state.data?Buffer.from(a.account.state.data,"base64"):null};else if(a.account.state.type==="uninit")l={type:"uninit"};else if(a.account.state.type==="frozen")l={type:"frozen",stateHash:Buffer.from(a.account.state.stateHash,"base64")};else throw Error("Unsupported state");return{balance:BigInt(a.account.balance.coins),last:s,state:l}},async get(o,a){let s=t;s===null&&(s=(await e.getLastBlock()).last.seqno);let l=await e.runMethod(s,r,o,a);if(l.exitCode!==0&&l.exitCode!==1)throw Error("Exit code: "+l.exitCode);return{stack:new ws.TupleReader(l.result)}},async external(o){let a=await e.getLastBlock(),s=null;i&&(await e.getAccountLite(a.last.seqno,r)).account.state.type!=="active"&&(s=i);const l=(0,ws.external)({to:r,init:s?{code:s.code,data:s.data}:null,body:o});let u=(0,ws.beginCell)().store((0,ws.storeMessage)(l)).endCell().toBoc();await e.sendMessage(u)},async internal(o,a){let s=await e.getLastBlock(),l=null;i&&(await e.getAccountLite(s.last.seqno,r)).account.state.type!=="active"&&(l=i);let u=!0;a.bounce!==null&&a.bounce!==void 0&&(u=a.bounce);let c;typeof a.value=="string"?c=(0,ws.toNano)(a.value):c=a.value;let d=null;typeof a.body=="string"?d=(0,ws.comment)(a.body):a.body&&(d=a.body),await o.send({to:r,value:c,bounce:u,sendMode:a.sendMode,init:l,body:d})}}}const pfe=Ir.z.object({last:Ir.z.object({seqno:Ir.z.number(),shard:Ir.z.string(),workchain:Ir.z.number(),fileHash:Ir.z.string(),rootHash:Ir.z.string()}),init:Ir.z.object({fileHash:Ir.z.string(),rootHash:Ir.z.string()}),stateRootHash:Ir.z.string(),now:Ir.z.number()}),WR=Ir.z.union([Ir.z.object({exist:Ir.z.literal(!1)}),Ir.z.object({exist:Ir.z.literal(!0),block:Ir.z.object({shards:Ir.z.array(Ir.z.object({workchain:Ir.z.number(),seqno:Ir.z.number(),shard:Ir.z.string(),rootHash:Ir.z.string(),fileHash:Ir.z.string(),transactions:Ir.z.array(Ir.z.object({account:Ir.z.string(),hash:Ir.z.string(),lt:Ir.z.string()}))}))})})]),wL=Ir.z.object({lastPaid:Ir.z.number(),duePayment:Ir.z.union([Ir.z.null(),Ir.z.string()]),used:Ir.z.object({bits:Ir.z.number(),cells:Ir.z.number(),publicCells:Ir.z.number()})}),hfe=Ir.z.object({account:Ir.z.object({state:Ir.z.union([Ir.z.object({type:Ir.z.literal("uninit")}),Ir.z.object({type:Ir.z.literal("active"),code:Ir.z.union([Ir.z.string(),Ir.z.null()]),data:Ir.z.union([Ir.z.string(),Ir.z.null()])}),Ir.z.object({type:Ir.z.literal("frozen"),stateHash:Ir.z.string()})]),balance:Ir.z.object({coins:Ir.z.string()}),last:Ir.z.union([Ir.z.null(),Ir.z.object({lt:Ir.z.string(),hash:Ir.z.string()})]),storageStat:Ir.z.union([Ir.z.null(),wL])}),block:Ir.z.object({workchain:Ir.z.number(),seqno:Ir.z.number(),shard:Ir.z.string(),rootHash:Ir.z.string(),fileHash:Ir.z.string()})}),gfe=Ir.z.object({account:Ir.z.object({state:Ir.z.union([Ir.z.object({type:Ir.z.literal("uninit")}),Ir.z.object({type:Ir.z.literal("active"),codeHash:Ir.z.string(),dataHash:Ir.z.string()}),Ir.z.object({type:Ir.z.literal("frozen"),stateHash:Ir.z.string()})]),balance:Ir.z.object({coins:Ir.z.string()}),last:Ir.z.union([Ir.z.null(),Ir.z.object({lt:Ir.z.string(),hash:Ir.z.string()})]),storageStat:Ir.z.union([Ir.z.null(),wL])})}),mfe=Ir.z.object({changed:Ir.z.boolean(),block:Ir.z.object({workchain:Ir.z.number(),seqno:Ir.z.number(),shard:Ir.z.string(),rootHash:Ir.z.string(),fileHash:Ir.z.string()})}),yfe=Ir.z.object({exitCode:Ir.z.number(),resultRaw:Ir.z.union([Ir.z.string(),Ir.z.null()]),block:Ir.z.object({workchain:Ir.z.number(),seqno:Ir.z.number(),shard:Ir.z.string(),rootHash:Ir.z.string(),fileHash:Ir.z.string()}),shardBlock:Ir.z.object({workchain:Ir.z.number(),seqno:Ir.z.number(),shard:Ir.z.string(),rootHash:Ir.z.string(),fileHash:Ir.z.string()})}),vfe=Ir.z.object({config:Ir.z.object({cell:Ir.z.string(),address:Ir.z.string(),globalBalance:Ir.z.object({coins:Ir.z.string()})})}),bfe=Ir.z.object({status:Ir.z.number()}),wfe=Ir.z.object({blocks:Ir.z.array(Ir.z.object({workchain:Ir.z.number(),seqno:Ir.z.number(),shard:Ir.z.string(),rootHash:Ir.z.string(),fileHash:Ir.z.string()})),boc:Ir.z.string()});var Y2={},Fa={};Object.defineProperty(Fa,"__esModule",{value:!0});Fa.createWalletTransferV4=Fa.createWalletTransferV3=Fa.createWalletTransferV2=Fa.createWalletTransferV1=void 0;const ns=fo,Q2=xg();function xfe(e){let t=(0,ns.beginCell)().storeUint(e.seqno,32);e.message&&(t.storeUint(e.sendMode,8),t.storeRef((0,ns.beginCell)().store((0,ns.storeMessageRelaxed)(e.message))));let r=(0,Q2.sign)(t.endCell().hash(),e.secretKey);return(0,ns.beginCell)().storeBuffer(r).storeBuilder(t).endCell()}Fa.createWalletTransferV1=xfe;function _fe(e){if(e.messages.length>4)throw Error("Maximum number of messages in a single transfer is 4");let t=(0,ns.beginCell)().storeUint(e.seqno,32);if(e.seqno===0)for(let o=0;o<32;o++)t.storeBit(1);else t.storeUint(e.timeout||Math.floor(Date.now()/1e3)+60,32);for(let o of e.messages)t.storeUint(e.sendMode,8),t.storeRef((0,ns.beginCell)().store((0,ns.storeMessageRelaxed)(o)));let r=(0,Q2.sign)(t.endCell().hash(),e.secretKey);return(0,ns.beginCell)().storeBuffer(r).storeBuilder(t).endCell()}Fa.createWalletTransferV2=_fe;function Sfe(e){if(e.messages.length>4)throw Error("Maximum number of messages in a single transfer is 4");let t=(0,ns.beginCell)().storeUint(e.walletId,32);if(e.seqno===0)for(let o=0;o<32;o++)t.storeBit(1);else t.storeUint(e.timeout||Math.floor(Date.now()/1e3)+60,32);t.storeUint(e.seqno,32);for(let o of e.messages)t.storeUint(e.sendMode,8),t.storeRef((0,ns.beginCell)().store((0,ns.storeMessageRelaxed)(o)));let r=(0,Q2.sign)(t.endCell().hash(),e.secretKey);return(0,ns.beginCell)().storeBuffer(r).storeBuilder(t).endCell()}Fa.createWalletTransferV3=Sfe;function Cfe(e){if(e.messages.length>4)throw Error("Maximum number of messages in a single transfer is 4");let t=(0,ns.beginCell)().storeUint(e.walletId,32);if(e.seqno===0)for(let o=0;o<32;o++)t.storeBit(1);else t.storeUint(e.timeout||Math.floor(Date.now()/1e3)+60,32);t.storeUint(e.seqno,32),t.storeUint(0,8);for(let o of e.messages)t.storeUint(e.sendMode,8),t.storeRef((0,ns.beginCell)().store((0,ns.storeMessageRelaxed)(o)));let r=(0,Q2.sign)(t.endCell().hash(),e.secretKey);return(0,ns.beginCell)().storeBuffer(r).storeBuilder(t).endCell()}Fa.createWalletTransferV4=Cfe;Object.defineProperty(Y2,"__esModule",{value:!0});Y2.WalletContractV1R1=void 0;const Lp=fo,kfe=Fa;class ak{constructor(t,r){this.workchain=t,this.publicKey=r;let i=Lp.Cell.fromBoc(Buffer.from("te6cckEBAQEARAAAhP8AIN2k8mCBAgDXGCDXCx/tRNDTH9P/0VESuvKhIvkBVBBE+RDyovgAAdMfMSDXSpbTB9QC+wDe0aTIyx/L/8ntVEH98Ik=","base64"))[0],o=(0,Lp.beginCell)().storeUint(0,32).storeBuffer(r).endCell();this.init={code:i,data:o},this.address=(0,Lp.contractAddress)(t,{code:i,data:o})}static create(t){return new ak(t.workchain,t.publicKey)}async getBalance(t){return(await t.getState()).balance}async getSeqno(t){let r=await t.getState();return r.state.type==="active"?Lp.Cell.fromBoc(r.state.data)[0].beginParse().loadUint(32):0}async send(t,r){await t.external(r)}async sendTransfer(t,r){let i=this.createTransfer(r);await this.send(t,i)}createTransfer(t){let r=Lp.SendMode.PAY_GAS_SEPARATELY;return t.sendMode!==null&&t.sendMode!==void 0&&(r=t.sendMode),(0,kfe.createWalletTransferV1)({seqno:t.seqno,sendMode:r,secretKey:t.secretKey,message:t.message})}sender(t,r){return{send:async i=>{let o=await this.getSeqno(t),a=this.createTransfer({seqno:o,secretKey:r,sendMode:i.sendMode,message:(0,Lp.internal)({to:i.to,value:i.value,init:i.init,body:i.body,bounce:i.bounce})});await this.send(t,a)}}}}Y2.WalletContractV1R1=ak;var Z2={};Object.defineProperty(Z2,"__esModule",{value:!0});Z2.WalletContractV1R2=void 0;const dm=fo,Efe=Fa;class sk{constructor(t,r){this.workchain=t,this.publicKey=r;let i=dm.Cell.fromBoc(Buffer.from("te6cckEBAQEAUwAAov8AIN0gggFMl7qXMO1E0NcLH+Ck8mCBAgDXGCDXCx/tRNDTH9P/0VESuvKhIvkBVBBE+RDyovgAAdMfMSDXSpbTB9QC+wDe0aTIyx/L/8ntVNDieG8=","base64"))[0],o=(0,dm.beginCell)().storeUint(0,32).storeBuffer(r).endCell();this.init={code:i,data:o},this.address=(0,dm.contractAddress)(t,{code:i,data:o})}static create(t){return new sk(t.workchain,t.publicKey)}async getBalance(t){return(await t.getState()).balance}async getSeqno(t){return(await t.getState()).state.type==="active"?(await t.get("seqno",[])).stack.readNumber():0}async send(t,r){await t.external(r)}async sendTransfer(t,r){let i=this.createTransfer(r);await this.send(t,i)}createTransfer(t){let r=dm.SendMode.PAY_GAS_SEPARATELY;return t.sendMode!==null&&t.sendMode!==void 0&&(r=t.sendMode),(0,Efe.createWalletTransferV1)({seqno:t.seqno,sendMode:r,secretKey:t.secretKey,message:t.message})}sender(t,r){return{send:async i=>{let o=await this.getSeqno(t),a=this.createTransfer({seqno:o,secretKey:r,sendMode:i.sendMode,message:(0,dm.internal)({to:i.to,value:i.value,init:i.init,body:i.body,bounce:i.bounce})});await this.send(t,a)}}}}Z2.WalletContractV1R2=sk;var X2={};Object.defineProperty(X2,"__esModule",{value:!0});X2.WalletContractV1R3=void 0;const fm=fo,Afe=Fa;class lk{constructor(t,r){this.workchain=t,this.publicKey=r;let i=fm.Cell.fromBoc(Buffer.from("te6cckEBAQEAXwAAuv8AIN0gggFMl7ohggEznLqxnHGw7UTQ0x/XC//jBOCk8mCBAgDXGCDXCx/tRNDTH9P/0VESuvKhIvkBVBBE+RDyovgAAdMfMSDXSpbTB9QC+wDe0aTIyx/L/8ntVLW4bkI=","base64"))[0],o=(0,fm.beginCell)().storeUint(0,32).storeBuffer(r).endCell();this.init={code:i,data:o},this.address=(0,fm.contractAddress)(t,{code:i,data:o})}static create(t){return new lk(t.workchain,t.publicKey)}async getBalance(t){return(await t.getState()).balance}async getSeqno(t){return(await t.getState()).state.type==="active"?(await t.get("seqno",[])).stack.readNumber():0}async send(t,r){await t.external(r)}async sendTransfer(t,r){let i=this.createTransfer(r);await this.send(t,i)}createTransfer(t){let r=fm.SendMode.PAY_GAS_SEPARATELY;return t.sendMode!==null&&t.sendMode!==void 0&&(r=t.sendMode),(0,Afe.createWalletTransferV1)({seqno:t.seqno,sendMode:r,secretKey:t.secretKey,message:t.message})}sender(t,r){return{send:async i=>{let o=await this.getSeqno(t),a=this.createTransfer({seqno:o,secretKey:r,sendMode:i.sendMode,message:(0,fm.internal)({to:i.to,value:i.value,init:i.init,body:i.body,bounce:i.bounce})});await this.send(t,a)}}}}X2.WalletContractV1R3=lk;var J2={};Object.defineProperty(J2,"__esModule",{value:!0});J2.WalletContractV2R1=void 0;const pm=fo,Tfe=Fa;class uk{constructor(t,r){this.workchain=t,this.publicKey=r;let i=pm.Cell.fromBoc(Buffer.from("te6cckEBAQEAVwAAqv8AIN0gggFMl7qXMO1E0NcLH+Ck8mCDCNcYINMf0x8B+CO78mPtRNDTH9P/0VExuvKhA/kBVBBC+RDyovgAApMg10qW0wfUAvsA6NGkyMsfy//J7VShNwu2","base64"))[0],o=(0,pm.beginCell)().storeUint(0,32).storeBuffer(r).endCell();this.init={code:i,data:o},this.address=(0,pm.contractAddress)(t,{code:i,data:o})}static create(t){return new uk(t.workchain,t.publicKey)}async getBalance(t){return(await t.getState()).balance}async getSeqno(t){return(await t.getState()).state.type==="active"?(await t.get("seqno",[])).stack.readNumber():0}async send(t,r){await t.external(r)}async sendTransfer(t,r){let i=this.createTransfer(r);await this.send(t,i)}createTransfer(t){let r=pm.SendMode.PAY_GAS_SEPARATELY;return t.sendMode!==null&&t.sendMode!==void 0&&(r=t.sendMode),(0,Tfe.createWalletTransferV2)({seqno:t.seqno,sendMode:r,secretKey:t.secretKey,messages:t.messages,timeout:t.timeout})}sender(t,r){return{send:async i=>{let o=await this.getSeqno(t),a=this.createTransfer({seqno:o,secretKey:r,sendMode:i.sendMode,messages:[(0,pm.internal)({to:i.to,value:i.value,init:i.init,body:i.body,bounce:i.bounce})]});await this.send(t,a)}}}}J2.WalletContractV2R1=uk;var ex={};Object.defineProperty(ex,"__esModule",{value:!0});ex.WalletContractV2R2=void 0;const hm=fo,Ife=Fa;class ck{constructor(t,r){this.workchain=t,this.publicKey=r;let i=hm.Cell.fromBoc(Buffer.from("te6cckEBAQEAYwAAwv8AIN0gggFMl7ohggEznLqxnHGw7UTQ0x/XC//jBOCk8mCDCNcYINMf0x8B+CO78mPtRNDTH9P/0VExuvKhA/kBVBBC+RDyovgAApMg10qW0wfUAvsA6NGkyMsfy//J7VQETNeh","base64"))[0],o=(0,hm.beginCell)().storeUint(0,32).storeBuffer(r).endCell();this.init={code:i,data:o},this.address=(0,hm.contractAddress)(t,{code:i,data:o})}static create(t){return new ck(t.workchain,t.publicKey)}async getBalance(t){return(await t.getState()).balance}async getSeqno(t){return(await t.getState()).state.type==="active"?(await t.get("seqno",[])).stack.readNumber():0}async send(t,r){await t.external(r)}async sendTransfer(t,r){let i=this.createTransfer(r);await this.send(t,i)}createTransfer(t){let r=hm.SendMode.PAY_GAS_SEPARATELY;return t.sendMode!==null&&t.sendMode!==void 0&&(r=t.sendMode),(0,Ife.createWalletTransferV2)({seqno:t.seqno,sendMode:r,secretKey:t.secretKey,messages:t.messages,timeout:t.timeout})}sender(t,r){return{send:async i=>{let o=await this.getSeqno(t),a=this.createTransfer({seqno:o,secretKey:r,sendMode:i.sendMode,messages:[(0,hm.internal)({to:i.to,value:i.value,init:i.init,body:i.body,bounce:i.bounce})]});await this.send(t,a)}}}}ex.WalletContractV2R2=ck;var tx={};Object.defineProperty(tx,"__esModule",{value:!0});tx.WalletContractV3R1=void 0;const gm=fo,Rfe=Fa;class dk{constructor(t,r,i){this.workchain=t,this.publicKey=r,i!=null?this.walletId=i:this.walletId=698983191+t;let o=gm.Cell.fromBoc(Buffer.from("te6cckEBAQEAYgAAwP8AIN0gggFMl7qXMO1E0NcLH+Ck8mCDCNcYINMf0x/TH/gjE7vyY+1E0NMf0x/T/9FRMrryoVFEuvKiBPkBVBBV+RDyo/gAkyDXSpbTB9QC+wDo0QGkyMsfyx/L/8ntVD++buA=","base64"))[0],a=(0,gm.beginCell)().storeUint(0,32).storeUint(this.walletId,32).storeBuffer(r).endCell();this.init={code:o,data:a},this.address=(0,gm.contractAddress)(t,{code:o,data:a})}static create(t){return new dk(t.workchain,t.publicKey,t.walletId)}async getBalance(t){return(await t.getState()).balance}async getSeqno(t){return(await t.getState()).state.type==="active"?(await t.get("seqno",[])).stack.readNumber():0}async send(t,r){await t.external(r)}async sendTransfer(t,r){let i=this.createTransfer(r);await this.send(t,i)}createTransfer(t){let r=gm.SendMode.PAY_GAS_SEPARATELY;return t.sendMode!==null&&t.sendMode!==void 0&&(r=t.sendMode),(0,Rfe.createWalletTransferV3)({seqno:t.seqno,sendMode:r,secretKey:t.secretKey,messages:t.messages,timeout:t.timeout,walletId:this.walletId})}sender(t,r){return{send:async i=>{let o=await this.getSeqno(t),a=this.createTransfer({seqno:o,secretKey:r,sendMode:i.sendMode,messages:[(0,gm.internal)({to:i.to,value:i.value,init:i.init,body:i.body,bounce:i.bounce})]});await this.send(t,a)}}}}tx.WalletContractV3R1=dk;var rx={};Object.defineProperty(rx,"__esModule",{value:!0});rx.WalletContractV3R2=void 0;const mm=fo,Pfe=Fa;class fk{constructor(t,r,i){this.workchain=t,this.publicKey=r,i!=null?this.walletId=i:this.walletId=698983191+t;let o=mm.Cell.fromBoc(Buffer.from("te6cckEBAQEAcQAA3v8AIN0gggFMl7ohggEznLqxn3Gw7UTQ0x/THzHXC//jBOCk8mCDCNcYINMf0x/TH/gjE7vyY+1E0NMf0x/T/9FRMrryoVFEuvKiBPkBVBBV+RDyo/gAkyDXSpbTB9QC+wDo0QGkyMsfyx/L/8ntVBC9ba0=","base64"))[0],a=(0,mm.beginCell)().storeUint(0,32).storeUint(this.walletId,32).storeBuffer(r).endCell();this.init={code:o,data:a},this.address=(0,mm.contractAddress)(t,{code:o,data:a})}static create(t){return new fk(t.workchain,t.publicKey,t.walletId)}async getBalance(t){return(await t.getState()).balance}async getSeqno(t){return(await t.getState()).state.type==="active"?(await t.get("seqno",[])).stack.readNumber():0}async send(t,r){await t.external(r)}async sendTransfer(t,r){let i=this.createTransfer(r);await this.send(t,i)}createTransfer(t){let r=mm.SendMode.PAY_GAS_SEPARATELY;return t.sendMode!==null&&t.sendMode!==void 0&&(r=t.sendMode),(0,Pfe.createWalletTransferV3)({seqno:t.seqno,sendMode:r,secretKey:t.secretKey,messages:t.messages,timeout:t.timeout,walletId:this.walletId})}sender(t,r){return{send:async i=>{let o=await this.getSeqno(t),a=this.createTransfer({seqno:o,secretKey:r,sendMode:i.sendMode,messages:[(0,mm.internal)({to:i.to,value:i.value,init:i.init,body:i.body,bounce:i.bounce})]});await this.send(t,a)}}}}rx.WalletContractV3R2=fk;var nx={};Object.defineProperty(nx,"__esModule",{value:!0});nx.WalletContractV4=void 0;const ym=fo,Mfe=Fa;class pk{constructor(t,r,i){this.workchain=t,this.publicKey=r,i!=null?this.walletId=i:this.walletId=698983191+t;let o=ym.Cell.fromBoc(Buffer.from("te6ccgECFAEAAtQAART/APSkE/S88sgLAQIBIAIDAgFIBAUE+PKDCNcYINMf0x/THwL4I7vyZO1E0NMf0x/T//QE0VFDuvKhUVG68qIF+QFUEGT5EPKj+AAkpMjLH1JAyx9SMMv/UhD0AMntVPgPAdMHIcAAn2xRkyDXSpbTB9QC+wDoMOAhwAHjACHAAuMAAcADkTDjDQOkyMsfEssfy/8QERITAubQAdDTAyFxsJJfBOAi10nBIJJfBOAC0x8hghBwbHVnvSKCEGRzdHK9sJJfBeAD+kAwIPpEAcjKB8v/ydDtRNCBAUDXIfQEMFyBAQj0Cm+hMbOSXwfgBdM/yCWCEHBsdWe6kjgw4w0DghBkc3RyupJfBuMNBgcCASAICQB4AfoA9AQw+CdvIjBQCqEhvvLgUIIQcGx1Z4MesXCAGFAEywUmzxZY+gIZ9ADLaRfLH1Jgyz8gyYBA+wAGAIpQBIEBCPRZMO1E0IEBQNcgyAHPFvQAye1UAXKwjiOCEGRzdHKDHrFwgBhQBcsFUAPPFiP6AhPLassfyz/JgED7AJJfA+ICASAKCwBZvSQrb2omhAgKBrkPoCGEcNQICEekk30pkQzmkD6f+YN4EoAbeBAUiYcVnzGEAgFYDA0AEbjJftRNDXCx+AA9sp37UTQgQFA1yH0BDACyMoHy//J0AGBAQj0Cm+hMYAIBIA4PABmtznaiaEAga5Drhf/AABmvHfaiaEAQa5DrhY/AAG7SB/oA1NQi+QAFyMoHFcv/ydB3dIAYyMsFywIizxZQBfoCFMtrEszMyXP7AMhAFIEBCPRR8qcCAHCBAQjXGPoA0z/IVCBHgQEI9FHyp4IQbm90ZXB0gBjIywXLAlAGzxZQBPoCFMtqEssfyz/Jc/sAAgBsgQEI1xj6ANM/MFIkgQEI9Fnyp4IQZHN0cnB0gBjIywXLAlAFzxZQA/oCE8tqyx8Syz/Jc/sAAAr0AMntVA==","base64"))[0],a=(0,ym.beginCell)().storeUint(0,32).storeUint(this.walletId,32).storeBuffer(this.publicKey).storeBit(0).endCell();this.init={code:o,data:a},this.address=(0,ym.contractAddress)(t,{code:o,data:a})}static create(t){return new pk(t.workchain,t.publicKey,t.walletId)}async getBalance(t){return(await t.getState()).balance}async getSeqno(t){return(await t.getState()).state.type==="active"?(await t.get("seqno",[])).stack.readNumber():0}async send(t,r){await t.external(r)}async sendTransfer(t,r){let i=this.createTransfer(r);await this.send(t,i)}createTransfer(t){let r=ym.SendMode.PAY_GAS_SEPARATELY;return t.sendMode!==null&&t.sendMode!==void 0&&(r=t.sendMode),(0,Mfe.createWalletTransferV4)({seqno:t.seqno,sendMode:r,secretKey:t.secretKey,messages:t.messages,timeout:t.timeout,walletId:this.walletId})}sender(t,r){return{send:async i=>{let o=await this.getSeqno(t),a=this.createTransfer({seqno:o,secretKey:r,sendMode:i.sendMode,messages:[(0,ym.internal)({to:i.to,value:i.value,init:i.init,body:i.body,bounce:i.bounce})]});await this.send(t,a)}}}}nx.WalletContractV4=pk;var ix={};Object.defineProperty(ix,"__esModule",{value:!0});ix.JettonMaster=void 0;const Ofe=fo;class hk{constructor(t){this.address=t}static create(t){return new hk(t)}async getWalletAddress(t,r){return(await t.get("get_wallet_address",[{type:"slice",cell:(0,Ofe.beginCell)().storeAddress(r).endCell()}])).stack.readAddress()}async getJettonData(t){let r=await t.get("get_jetton_data",[]),i=r.stack.readBigNumber(),o=r.stack.readBoolean(),a=r.stack.readAddress(),s=r.stack.readCell(),l=r.stack.readCell();return{totalSupply:i,mintable:o,adminAddress:a,content:s,walletCode:l}}}ix.JettonMaster=hk;var ox={};Object.defineProperty(ox,"__esModule",{value:!0});ox.JettonWallet=void 0;class gk{constructor(t){this.address=t}static create(t){return new gk(t)}async getBalance(t){return(await t.getState()).state.type!=="active"?0n:(await t.get("get_wallet_data",[])).stack.readBigNumber()}}ox.JettonWallet=gk;var Iy={};Object.defineProperty(Iy,"__esModule",{value:!0});Iy.MultisigOrder=void 0;const VR=xg(),Pv=fo;class lb{constructor(t){this.signatures={},this.payload=t}static fromCell(t){let r=t.beginParse(),i=r.loadMaybeRef()?.beginParse();const o=r.asCell();let a=new lb(o);if(i){for(;i.remainingBits>0;){const s=i.loadBuffer(64),l=i.loadUint(8);a.signatures[l]=s,i.remainingRefs>0?i=i.loadRef().asSlice():i.skip(1)}i.endParse()}return a}static fromPayload(t){return new lb(t)}addSignature(t,r,i){const o=this.payload.hash();if(!(0,VR.signVerify)(o,r,i.owners.get(t).slice(0,-1)))throw Error("invalid signature");this.signatures[t]=r}sign(t,r){const i=this.payload.hash();return this.signatures[t]=(0,VR.sign)(i,r),i}unionSignatures(t){this.signatures=Object.assign({},this.signatures,t.signatures)}clearSignatures(){this.signatures={}}toCell(t){let r=(0,Pv.beginCell)().storeBit(0);for(const i in this.signatures){const o=this.signatures[i];r=(0,Pv.beginCell)().storeBit(1).storeRef((0,Pv.beginCell)().storeBuffer(o).storeUint(parseInt(i),8).storeBuilder(r).endCell())}return(0,Pv.beginCell)().storeUint(t,8).storeBuilder(r).storeBuilder(this.payload.asBuilder()).endCell()}}Iy.MultisigOrder=lb;var ax={};Object.defineProperty(ax,"__esModule",{value:!0});ax.MultisigOrderBuilder=void 0;const vm=fo,Bfe=Iy;class Ufe{constructor(t,r){this.messages=(0,vm.beginCell)(),this.queryId=0n,this.walletId=t,this.queryOffset=r||7200}addMessage(t,r){if(this.messages.refs>=4)throw Error("only 4 refs are allowed");this.updateQueryId(),this.messages.storeUint(r,8),this.messages.storeRef((0,vm.beginCell)().store((0,vm.storeMessageRelaxed)(t)).endCell())}clearMessages(){this.messages=(0,vm.beginCell)()}build(){return Bfe.MultisigOrder.fromPayload((0,vm.beginCell)().storeUint(this.walletId,32).storeUint(this.queryId,64).storeBuilder(this.messages).endCell())}updateQueryId(){const t=BigInt(Math.floor(Date.now()/1e3+this.queryOffset));this.queryId=t<<32n}}ax.MultisigOrderBuilder=Ufe;var sx={};Object.defineProperty(sx,"__esModule",{value:!0});sx.MultisigWallet=void 0;const qR=xg(),sl=fo,Dfe=sl.Cell.fromBase64("te6ccgECKwEABBgAART/APSkE/S88sgLAQIBIAIDAgFIBAUE2vIgxwCOgzDbPOCDCNcYIPkBAdMH2zwiwAAToVNxePQOb6Hyn9s8VBq6+RDyoAb0BCD5AQHTH1EYuvKq0z9wUwHwCgHCCAGDCryx8mhTFYBA9A5voSCYDqQgwgryZw7f+COqH1NAufJhVCOjU04gIyEiAgLMBgcCASAMDQIBIAgJAgFmCgsAA9GEAiPymAvHoHN9CYbZ5S7Z4BPHohwhJQAtAKkItdJEqCTItdKlwLUAdAT8ArobBKAATwhbpEx4CBukTDgAdAg10rDAJrUAvALyFjPFszJ4HHXI8gBzxb0AMmACASAODwIBIBQVARW77ZbVA0cFUg2zyCoCAUgQEQIBIBITAXOxHXQgwjXGCD5AQHTB4IB1MTtQ9hTIHj0Dm+h8p/XC/9eMfkQ8qCuAfQEIW6TW3Ey4PkBWNs8AaQBgJwA9rtqA6ADoAPoCAXoCEfyAgPyA3XlP+AXkegAA54tkwAAXrhlXP8EA1WZ2oexAAgEgFhcCASAYGQFRtyVbZ4YmRmpGEAgegc30McJNhFpAADMaYeYuAFrgJhwLb+4cC3d0bhAjAYm1WZtnhqvgb+2xxsoicAgej430pBHEoFpAADHDhBACGuQkuuBk9kUWE5kAOeLKhACQCB6IYFImHFImHFImXEA2YlzNijAjAgEgGhsAF7UGtc4QQDVZnah7EAIBIBwdAgOZOB4fARGsGm2eL4G2CUAjABWt+UEAzJV2oewYQAENqTbPBVfBYCMAFa3f3CCAarM7UPYgAiDbPALyZfgAUENxQxPbPO1UIyoACtP/0wcwBKDbPC+uUyCw8mISsQKkJbNTHLmwJYEA4aojoCi8sPJpggGGoPgBBZcCERACPj4wjo0REB/bPEDXePRDEL0F4lQWW1Rz51YQU9zbPFRxClR6vCQlKCYAIO1E0NMf0wfTB9M/9AT0BNEAXgGOGjDSAAHyo9MH0wdQA9cBIPkBBfkBFbrypFAD4GwhIddKqgIi10m68qtwVCATAAwByMv/ywcE1ts87VT4D3AlblOJvrGYEG4QLVDHXwePGzBUJANQTds8UFWgRlAQSRA6SwlTuds8UFQWf+L4AAeDJaGOLCaAQPSWb6UglDBTA7neII4WODk5CNIAAZfTBzAW8AcFkTDifwgHBZJsMeKz5jAGKicoKQBgcI4pA9CDCNcY0wf0BDBTFnj0Dm+h8qXXC/9URUT5EPKmrlIgsVIDvRShI27mbCIyAH5SML6OIF8D+ACTItdKmALTB9QC+wAC6DJwyMoAQBSAQPRDAvAHjhdxyMsAFMsHEssHWM8BWM8WQBOAQPRDAeIBII6KEEUQNEMA2zztVJJfBuIqABzIyx/LB8sHyz/0APQAyQ==");class mk{constructor(t,r,i,o,a){this.provider=null,this.owners=sl.Dictionary.empty(),this.workchain=r,this.walletId=i,this.k=o;for(let s=0;s{t&&i&&o!==t&&e(`/${o}`,{replace:!0})},[t]),{contractAddress:o,contractAddressHex:a,isAddressEmpty:!t}}function xL(e){let t=!0;try{Vn.Address.parse(e??"")}catch{t=!1}return t}function KR(e,t){for(var r=0;r=0)&&(r[o]=e[o]);return r}function GR(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var _L=Gn.createContext(),jfe={mui:{root:{},anchorOriginTopCenter:{},anchorOriginBottomCenter:{},anchorOriginTopRight:{},anchorOriginBottomRight:{},anchorOriginTopLeft:{},anchorOriginBottomLeft:{}},container:{containerRoot:{},containerAnchorOriginTopCenter:{},containerAnchorOriginBottomCenter:{},containerAnchorOriginTopRight:{},containerAnchorOriginBottomRight:{},containerAnchorOriginTopLeft:{},containerAnchorOriginBottomLeft:{}}},Yu={view:{default:20,dense:4},snackbar:{default:6,dense:2}},bf={maxSnack:3,dense:!1,hideIconVariant:!1,variant:"default",autoHideDuration:5e3,anchorOrigin:{vertical:"bottom",horizontal:"left"},TransitionComponent:w7,transitionDuration:{enter:225,exit:195}},n0=function(t){return t.charAt(0).toUpperCase()+t.slice(1)},$fe=function(t){return""+n0(t.vertical)+n0(t.horizontal)},Ffe=function(t){return Object.keys(t).filter(function(r){return!jfe.container[r]}).reduce(function(r,i){var o;return Uo({},r,(o={},o[i]=t[i],o))},{})},Qc={TIMEOUT:"timeout",CLICKAWAY:"clickaway",MAXSNACK:"maxsnack",INSTRUCTED:"instructed"},h1={toContainerAnchorOrigin:function(t){return"containerAnchorOrigin"+t},toAnchorOrigin:function(t){var r=t.vertical,i=t.horizontal;return"anchorOrigin"+n0(r)+n0(i)},toVariant:function(t){return"variant"+n0(t)}},Mv=function(t){return!!t||t===0},YR=function(t){return typeof t=="number"||t===null},zfe=function(t,r,i){return function(o){return o==="autoHideDuration"?YR(t.autoHideDuration)?t.autoHideDuration:YR(r.autoHideDuration)?r.autoHideDuration:bf.autoHideDuration:t[o]||r[o]||i[o]}};function C5(e,t,r){return e===void 0&&(e={}),t===void 0&&(t={}),r===void 0&&(r={}),Uo({},r,{},t,{},e)}var Hfe="SnackbarContent",SL={root:Hfe+"-root"},Wfe=sr("div")(function(e){var t,r,i=e.theme;return r={},r["&."+SL.root]=(t={display:"flex",flexWrap:"wrap",flexGrow:1},t[i.breakpoints.up("sm")]={flexGrow:"initial",minWidth:288},t),r}),Vfe=X.exports.forwardRef(function(e,t){var r=e.className,i=xd(e,["className"]);return L(Wfe,{...Object.assign({ref:t,className:pn(SL.root,r)},i)})}),QR={right:"left",left:"right",bottom:"up",top:"down"},qfe=function(t){return t.horizontal!=="center"?QR[t.horizontal]:QR[t.vertical]},Kfe=function(t){return L(jh,{...Object.assign({},t),children:L("path",{d:"M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41 10.59L10 14.17L17.59 6.58L19 8L10 17Z"})})},Gfe=function(t){return L(jh,{...Object.assign({},t),children:L("path",{d:"M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z"})})},Yfe=function(t){return L(jh,{...Object.assign({},t),children:L("path",{d:"M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2, 6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12, 13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z"})})},Qfe=function(t){return L(jh,{...Object.assign({},t),children:L("path",{d:"M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12A10,10 0 0,0 12,2Z"})})},Ov={fontSize:20,marginInlineEnd:8},Zfe={default:void 0,success:L(Kfe,{style:Ov}),warning:L(Gfe,{style:Ov}),error:L(Yfe,{style:Ov}),info:L(Qfe,{style:Ov})};function i0(e,t){return e.reduce(function(r,i){return i==null?r:function(){for(var a=arguments.length,s=new Array(a),l=0;l .MuiCollapse-container, & > .MuiCollapse-root",wrapper:"& > .MuiCollapse-container > .MuiCollapse-wrapper, & > .MuiCollapse-root > .MuiCollapse-wrapper"},E5=16,rf="SnackbarContainer",Nl={root:rf+"-root",rootDense:rf+"-rootDense",top:rf+"-top",bottom:rf+"-bottom",left:rf+"-left",right:rf+"-right",center:rf+"-center"},rpe=sr("div")(function(e){var t,r,i,o,a,s,l=e.theme;return s={},s["&."+Nl.root]=(t={boxSizing:"border-box",display:"flex",maxHeight:"100%",position:"fixed",zIndex:l.zIndex.snackbar,height:"auto",width:"auto",transition:"top 300ms ease 0ms, right 300ms ease 0ms, bottom 300ms ease 0ms, left 300ms ease 0ms, margin 300ms ease 0ms, max-width 300ms ease 0ms",pointerEvents:"none"},t[k5.container]={pointerEvents:"all"},t[k5.wrapper]={padding:Yu.snackbar.default+"px 0px",transition:"padding 300ms ease 0ms"},t.maxWidth="calc(100% - "+Yu.view.default*2+"px)",t[l.breakpoints.down("sm")]={width:"100%",maxWidth:"calc(100% - "+E5*2+"px)"},t),s["&."+Nl.rootDense]=(r={},r[k5.wrapper]={padding:Yu.snackbar.dense+"px 0px"},r),s["&."+Nl.top]={top:Yu.view.default-Yu.snackbar.default,flexDirection:"column"},s["&."+Nl.bottom]={bottom:Yu.view.default-Yu.snackbar.default,flexDirection:"column-reverse"},s["&."+Nl.left]=(i={left:Yu.view.default},i[l.breakpoints.up("sm")]={alignItems:"flex-start"},i[l.breakpoints.down("sm")]={left:E5+"px"},i),s["&."+Nl.right]=(o={right:Yu.view.default},o[l.breakpoints.up("sm")]={alignItems:"flex-end"},o[l.breakpoints.down("sm")]={right:E5+"px"},o),s["&."+Nl.center]=(a={left:"50%",transform:"translateX(-50%)"},a[l.breakpoints.up("sm")]={alignItems:"center"},a),s}),npe=function(t){var r=t.className,i=t.anchorOrigin,o=t.dense,a=xd(t,["className","anchorOrigin","dense"]),s=pn(Nl[i.vertical],Nl[i.horizontal],Nl.root,r,o&&Nl.rootDense);return L(rpe,{...Object.assign({className:s},a)})},ipe=Gn.memo(npe),ope=function(e){Nfe(t,e);function t(i){var o;return o=e.call(this,i)||this,o.enqueueSnackbar=function(a,s){s===void 0&&(s={});var l=s,u=l.key,c=l.preventDuplicate,d=xd(l,["key","preventDuplicate"]),p=Mv(u),v=p?u:new Date().getTime()+Math.random(),x=zfe(d,o.props,bf),b=Uo({key:v},d,{message:a,open:!0,entered:!1,requestClose:!1,variant:x("variant"),anchorOrigin:x("anchorOrigin"),autoHideDuration:x("autoHideDuration")});return d.persist&&(b.autoHideDuration=void 0),o.setState(function(y){if(c===void 0&&o.props.preventDuplicate||c){var _=function(U){return p?U.key===u:U.message===a},k=y.queue.findIndex(_)>-1,E=y.snacks.findIndex(_)>-1;if(k||E)return y}return o.handleDisplaySnack(Uo({},y,{queue:[].concat(y.queue,[b])}))}),v},o.handleDisplaySnack=function(a){var s=a.snacks;return s.length>=o.maxSnack?o.handleDismissOldest(a):o.processQueue(a)},o.processQueue=function(a){var s=a.queue,l=a.snacks;return s.length>0?Uo({},a,{snacks:[].concat(l,[s[0]]),queue:s.slice(1,s.length)}):a},o.handleDismissOldest=function(a){if(a.snacks.some(function(d){return!d.open||d.requestClose}))return a;var s=!1,l=!1,u=a.snacks.reduce(function(d,p){return d+(p.open&&p.persist?1:0)},0);u===o.maxSnack&&(l=!0);var c=a.snacks.map(function(d){return!s&&(!d.persist||l)?(s=!0,d.entered?(d.onClose&&d.onClose(null,Qc.MAXSNACK,d.key),o.props.onClose&&o.props.onClose(null,Qc.MAXSNACK,d.key),Uo({},d,{open:!1})):Uo({},d,{requestClose:!0})):Uo({},d)});return Uo({},a,{snacks:c})},o.handleEnteredSnack=function(a,s,l){if(!Mv(l))throw new Error("handleEnteredSnack Cannot be called with undefined key");o.setState(function(u){var c=u.snacks;return{snacks:c.map(function(d){return d.key===l?Uo({},d,{entered:!0}):Uo({},d)})}})},o.handleCloseSnack=function(a,s,l){if(o.props.onClose&&o.props.onClose(a,s,l),s!==Qc.CLICKAWAY){var u=l===void 0;o.setState(function(c){var d=c.snacks,p=c.queue;return{snacks:d.map(function(v){return!u&&v.key!==l?Uo({},v):v.entered?Uo({},v,{open:!1}):Uo({},v,{requestClose:!0})}),queue:p.filter(function(v){return v.key!==l})}})}},o.closeSnackbar=function(a){var s=o.state.snacks.find(function(l){return l.key===a});Mv(a)&&s&&s.onClose&&s.onClose(null,Qc.INSTRUCTED,a),o.handleCloseSnack(null,Qc.INSTRUCTED,a)},o.handleExitedSnack=function(a,s,l){var u=s||l;if(!Mv(u))throw new Error("handleExitedSnack Cannot be called with undefined key");o.setState(function(c){var d=o.processQueue(Uo({},c,{snacks:c.snacks.filter(function(p){return p.key!==u})}));return d.queue.length===0?d:o.handleDismissOldest(d)})},o.state={snacks:[],queue:[],contextValue:{enqueueSnackbar:o.enqueueSnackbar.bind(GR(o)),closeSnackbar:o.closeSnackbar.bind(GR(o))}},o}var r=t.prototype;return r.render=function(){var o=this,a=this.state.contextValue,s=this.props,l=s.iconVariant,u=s.dense,c=u===void 0?bf.dense:u,d=s.hideIconVariant,p=d===void 0?bf.hideIconVariant:d,v=s.domRoot,x=s.children,b=s.classes,y=b===void 0?{}:b,_=xd(s,["maxSnack","preventDuplicate","variant","anchorOrigin","iconVariant","dense","hideIconVariant","domRoot","children","classes"]),k=this.state.snacks.reduce(function(B,U){var D,j=$fe(U.anchorOrigin),F=B[j]||[];return Uo({},B,(D={},D[j]=[].concat(F,[U]),D))},{}),E=Object.keys(k).map(function(B){var U=k[B];return L(ipe,{dense:c,anchorOrigin:U[0].anchorOrigin,className:pn(y.containerRoot,y[h1.toContainerAnchorOrigin(B)]),children:U.map(function(D){return L(tpe,{...Object.assign({},_,{key:D.key,snack:D,dense:c,iconVariant:l,hideIconVariant:p,classes:Ffe(y),onClose:o.handleCloseSnack,onExited:i0([o.handleExitedSnack,o.props.onExited]),onEntered:i0([o.handleEnteredSnack,o.props.onEntered])})})})},B)});return Ut(_L.Provider,{value:a,children:[x,v?ml.exports.createPortal(E,v):E]})},Lfe(t,[{key:"maxSnack",get:function(){return this.props.maxSnack||bf.maxSnack}}]),t}(X.exports.Component),ape=function(){return X.exports.useContext(_L)},yk={},lx={exports:{}};(function(e){function t(r){return r&&r.__esModule?r:{default:r}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(lx);var A5={};const spe=Gb(vJ);var XR;function vk(){return XR||(XR=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.createSvgIcon}});var t=spe}(A5)),A5}const bk=Gb(Iq);var lpe=lx.exports;Object.defineProperty(yk,"__esModule",{value:!0});var CL=yk.default=void 0,upe=lpe(vk()),cpe=bk,dpe=(0,upe.default)((0,cpe.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close");CL=yk.default=dpe;const fpe=sr(da)({"& &":{color:"white"},"& a":{color:"white"}});function Ry(){const{enqueueSnackbar:e,closeSnackbar:t}=ape();return{showNotification:X.exports.useCallback((i,o,a,s)=>{const l=e(L(fpe,{children:i}),{variant:o,autoHideDuration:s||5e3,onClose:a,onClick:()=>t(l),action:()=>L(Bs,{children:L(CL,{sx:{color:"#fff",stroke:"#fff",width:20,height:20}})})})},[t,e])}}const JR=e=>{let t;const r=new Set,i=(u,c)=>{const d=typeof u=="function"?u(t):u;if(!Object.is(d,t)){const p=t;t=c??typeof d!="object"?d:Object.assign({},t,d),r.forEach(v=>v(t,p))}},o=()=>t,l={setState:i,getState:o,subscribe:u=>(r.add(u),()=>r.delete(u)),destroy:()=>{({VITE_SHOW_MANUAL_VERIFICATION:"true",VITE_VERIFIER_ID:"orbs.com",VITE_BACKEND_URL:"https://ton-source-prod-1.herokuapp.com,https://ton-source-prod-2.herokuapp.com,https://ton-source-prod-3.herokuapp.com",VITE_SOURCES_REGISTRY:"EQD-BJSVUJviud_Qv7Ymfd3qzXdrmV525e3YDzWQoHIAiInL",VITE_VERIFIER_ID_TESTNET:"orbs-testnet",VITE_BACKEND_URL_TESTNET:"https://ton-source-prod-testnet-1.herokuapp.com",VITE_SOURCES_REGISTRY_TESTNET:"EQCsdKYwUaXkgJkz2l0ol6qT_WxeRbE_wBCwnEybmR0u5TO8",VITE_REDIRECT:"true",VITE_APP_GA:"G-2TB9KYGCFR",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"&&console.warn("[DEPRECATED] The destroy method will be unsupported in the future version. You should use unsubscribe function returned by subscribe. Everything will be garbage collected if store is garbage collected."),r.clear()}};return t=e(i,o,l),l},ppe=e=>e?JR(e):JR;var kL={exports:{}},EL={};/** +`),function(c){if(l=c.indexOf(":"),a=e.trim(c.substr(0,l)).toLowerCase(),s=e.trim(c.substr(l+1)),a){if(o[a]&&t.indexOf(a)>=0)return;a==="set-cookie"?o[a]=(o[a]?o[a]:[]).concat([s]):o[a]=o[a]?o[a]+", "+s:s}}),o},d5}var f5,xR;function ude(){if(xR)return f5;xR=1;var e=Us;return f5=e.isStandardBrowserEnv()?function(){var r=/(msie|trident)/i.test(navigator.userAgent),i=document.createElement("a"),o;function a(s){var l=s;return r&&(i.setAttribute("href",l),l=i.href),i.setAttribute("href",l),{href:i.href,protocol:i.protocol?i.protocol.replace(/:$/,""):"",host:i.host,search:i.search?i.search.replace(/^\?/,""):"",hash:i.hash?i.hash.replace(/^#/,""):"",hostname:i.hostname,port:i.port,pathname:i.pathname.charAt(0)==="/"?i.pathname:"/"+i.pathname}}return o=a(window.location.href),function(l){var u=e.isString(l)?a(l):l;return u.protocol===o.protocol&&u.host===o.host}}():function(){return function(){return!0}}(),f5}var p5,_R;function z2(){if(_R)return p5;_R=1;function e(t){this.message=t}return e.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},e.prototype.__CANCEL__=!0,p5=e,p5}var h5,SR;function CR(){if(SR)return h5;SR=1;var e=Us,t=nde(),r=ide(),i=iL,o=sde(),a=lde(),s=ude(),l=aL(),u=H2(),c=z2();return h5=function(p){return new Promise(function(x,b){var y=p.data,_=p.headers,k=p.responseType,E;function B(){p.cancelToken&&p.cancelToken.unsubscribe(E),p.signal&&p.signal.removeEventListener("abort",E)}e.isFormData(y)&&delete _["Content-Type"];var U=new XMLHttpRequest;if(p.auth){var D=p.auth.username||"",j=p.auth.password?unescape(encodeURIComponent(p.auth.password)):"";_.Authorization="Basic "+btoa(D+":"+j)}var F=o(p.baseURL,p.url);U.open(p.method.toUpperCase(),i(F,p.params,p.paramsSerializer),!0),U.timeout=p.timeout;function H(){if(!!U){var G="getAllResponseHeaders"in U?a(U.getAllResponseHeaders()):null,ae=!k||k==="text"||k==="json"?U.responseText:U.response,V={data:ae,status:U.status,statusText:U.statusText,headers:G,config:p,request:U};t(function(P){x(P),B()},function(P){b(P),B()},V),U=null}}if("onloadend"in U?U.onloadend=H:U.onreadystatechange=function(){!U||U.readyState!==4||U.status===0&&!(U.responseURL&&U.responseURL.indexOf("file:")===0)||setTimeout(H)},U.onabort=function(){!U||(b(l("Request aborted",p,"ECONNABORTED",U)),U=null)},U.onerror=function(){b(l("Network Error",p,null,U)),U=null},U.ontimeout=function(){var ae=p.timeout?"timeout of "+p.timeout+"ms exceeded":"timeout exceeded",V=p.transitional||u.transitional;p.timeoutErrorMessage&&(ae=p.timeoutErrorMessage),b(l(ae,p,V.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",U)),U=null},e.isStandardBrowserEnv()){var W=(p.withCredentials||s(F))&&p.xsrfCookieName?r.read(p.xsrfCookieName):void 0;W&&(_[p.xsrfHeaderName]=W)}"setRequestHeader"in U&&e.forEach(_,function(ae,V){typeof y>"u"&&V.toLowerCase()==="content-type"?delete _[V]:U.setRequestHeader(V,ae)}),e.isUndefined(p.withCredentials)||(U.withCredentials=!!p.withCredentials),k&&k!=="json"&&(U.responseType=p.responseType),typeof p.onDownloadProgress=="function"&&U.addEventListener("progress",p.onDownloadProgress),typeof p.onUploadProgress=="function"&&U.upload&&U.upload.addEventListener("progress",p.onUploadProgress),(p.cancelToken||p.signal)&&(E=function(G){!U||(b(!G||G&&G.type?new c("canceled"):G),U.abort(),U=null)},p.cancelToken&&p.cancelToken.subscribe(E),p.signal&&(p.signal.aborted?E():p.signal.addEventListener("abort",E))),y||(y=null),U.send(y)})},h5}var g5,kR;function H2(){if(kR)return g5;kR=1;var e=Us,t=rde,r=oL,i={"Content-Type":"application/x-www-form-urlencoded"};function o(u,c){!e.isUndefined(u)&&e.isUndefined(u["Content-Type"])&&(u["Content-Type"]=c)}function a(){var u;return(typeof XMLHttpRequest<"u"||typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]")&&(u=CR()),u}function s(u,c,d){if(e.isString(u))try{return(c||JSON.parse)(u),e.trim(u)}catch(p){if(p.name!=="SyntaxError")throw p}return(d||JSON.stringify)(u)}var l={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:a(),transformRequest:[function(c,d){return t(d,"Accept"),t(d,"Content-Type"),e.isFormData(c)||e.isArrayBuffer(c)||e.isBuffer(c)||e.isStream(c)||e.isFile(c)||e.isBlob(c)?c:e.isArrayBufferView(c)?c.buffer:e.isURLSearchParams(c)?(o(d,"application/x-www-form-urlencoded;charset=utf-8"),c.toString()):e.isObject(c)||d&&d["Content-Type"]==="application/json"?(o(d,"application/json"),s(c)):c}],transformResponse:[function(c){var d=this.transitional||l.transitional,p=d&&d.silentJSONParsing,v=d&&d.forcedJSONParsing,x=!p&&this.responseType==="json";if(x||v&&e.isString(c)&&c.length)try{return JSON.parse(c)}catch(b){if(x)throw b.name==="SyntaxError"?r(b,this,"E_JSON_PARSE"):b}return c}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(c){return c>=200&&c<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};return e.forEach(["delete","get","head"],function(c){l.headers[c]={}}),e.forEach(["post","put","patch"],function(c){l.headers[c]=e.merge(i)}),g5=l,g5}var cde=Us,dde=H2(),fde=function(t,r,i){var o=this||dde;return cde.forEach(i,function(s){t=s.call(o,t,r)}),t},m5,ER;function sL(){return ER||(ER=1,m5=function(t){return!!(t&&t.__CANCEL__)}),m5}var AR=Us,y5=fde,pde=sL(),hde=H2(),gde=z2();function v5(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new gde("canceled")}var mde=function(t){v5(t),t.headers=t.headers||{},t.data=y5.call(t,t.data,t.headers,t.transformRequest),t.headers=AR.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),AR.forEach(["delete","get","head","post","put","patch","common"],function(o){delete t.headers[o]});var r=t.adapter||hde.adapter;return r(t).then(function(o){return v5(t),o.data=y5.call(t,o.data,o.headers,t.transformResponse),o},function(o){return pde(o)||(v5(t),o&&o.response&&(o.response.data=y5.call(t,o.response.data,o.response.headers,t.transformResponse))),Promise.reject(o)})},Ls=Us,lL=function(t,r){r=r||{};var i={};function o(d,p){return Ls.isPlainObject(d)&&Ls.isPlainObject(p)?Ls.merge(d,p):Ls.isPlainObject(p)?Ls.merge({},p):Ls.isArray(p)?p.slice():p}function a(d){if(Ls.isUndefined(r[d])){if(!Ls.isUndefined(t[d]))return o(void 0,t[d])}else return o(t[d],r[d])}function s(d){if(!Ls.isUndefined(r[d]))return o(void 0,r[d])}function l(d){if(Ls.isUndefined(r[d])){if(!Ls.isUndefined(t[d]))return o(void 0,t[d])}else return o(void 0,r[d])}function u(d){if(d in r)return o(t[d],r[d]);if(d in t)return o(void 0,t[d])}var c={url:s,method:s,data:s,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,responseEncoding:l,validateStatus:u};return Ls.forEach(Object.keys(t).concat(Object.keys(r)),function(p){var v=c[p]||a,x=v(p);Ls.isUndefined(x)&&v!==u||(i[p]=x)}),i},b5,TR;function uL(){return TR||(TR=1,b5={version:"0.25.0"}),b5}var yde=uL().version,nk={};["object","boolean","number","function","string","symbol"].forEach(function(e,t){nk[e]=function(i){return typeof i===e||"a"+(t<1?"n ":" ")+e}});var IR={};nk.transitional=function(t,r,i){function o(a,s){return"[Axios v"+yde+"] Transitional option '"+a+"'"+s+(i?". "+i:"")}return function(a,s,l){if(t===!1)throw new Error(o(s," has been removed"+(r?" in "+r:"")));return r&&!IR[s]&&(IR[s]=!0,console.warn(o(s," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(a,s,l):!0}};function vde(e,t,r){if(typeof e!="object")throw new TypeError("options must be an object");for(var i=Object.keys(e),o=i.length;o-- >0;){var a=i[o],s=t[a];if(s){var l=e[a],u=l===void 0||s(l,a,e);if(u!==!0)throw new TypeError("option "+a+" must be "+u);continue}if(r!==!0)throw Error("Unknown option "+a)}}var bde={assertOptions:vde,validators:nk},cL=Us,wde=iL,RR=ede,PR=mde,W2=lL,dL=bde,Dp=dL.validators;function Ay(e){this.defaults=e,this.interceptors={request:new RR,response:new RR}}Ay.prototype.request=function(t,r){if(typeof t=="string"?(r=r||{},r.url=t):r=t||{},!r.url)throw new Error("Provided config url is not valid");r=W2(this.defaults,r),r.method?r.method=r.method.toLowerCase():this.defaults.method?r.method=this.defaults.method.toLowerCase():r.method="get";var i=r.transitional;i!==void 0&&dL.assertOptions(i,{silentJSONParsing:Dp.transitional(Dp.boolean),forcedJSONParsing:Dp.transitional(Dp.boolean),clarifyTimeoutError:Dp.transitional(Dp.boolean)},!1);var o=[],a=!0;this.interceptors.request.forEach(function(x){typeof x.runWhen=="function"&&x.runWhen(r)===!1||(a=a&&x.synchronous,o.unshift(x.fulfilled,x.rejected))});var s=[];this.interceptors.response.forEach(function(x){s.push(x.fulfilled,x.rejected)});var l;if(!a){var u=[PR,void 0];for(Array.prototype.unshift.apply(u,o),u=u.concat(s),l=Promise.resolve(r);u.length;)l=l.then(u.shift(),u.shift());return l}for(var c=r;o.length;){var d=o.shift(),p=o.shift();try{c=d(c)}catch(v){p(v);break}}try{l=PR(c)}catch(v){return Promise.reject(v)}for(;s.length;)l=l.then(s.shift(),s.shift());return l};Ay.prototype.getUri=function(t){if(!t.url)throw new Error("Provided config url is not valid");return t=W2(this.defaults,t),wde(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")};cL.forEach(["delete","get","head","options"],function(t){Ay.prototype[t]=function(r,i){return this.request(W2(i||{},{method:t,url:r,data:(i||{}).data}))}});cL.forEach(["post","put","patch"],function(t){Ay.prototype[t]=function(r,i,o){return this.request(W2(o||{},{method:t,url:r,data:i}))}});var xde=Ay,w5,MR;function _de(){if(MR)return w5;MR=1;var e=z2();function t(r){if(typeof r!="function")throw new TypeError("executor must be a function.");var i;this.promise=new Promise(function(s){i=s});var o=this;this.promise.then(function(a){if(!!o._listeners){var s,l=o._listeners.length;for(s=0;sl;function o(l){}i.assertIs=o;function a(l){throw new Error}i.assertNever=a,i.arrayToEnum=l=>{const u={};for(const c of l)u[c]=c;return u},i.getValidEnumValues=l=>{const u=i.objectKeys(l).filter(d=>typeof l[l[d]]!="number"),c={};for(const d of u)c[d]=l[d];return i.objectValues(c)},i.objectValues=l=>i.objectKeys(l).map(function(u){return l[u]}),i.objectKeys=typeof Object.keys=="function"?l=>Object.keys(l):l=>{const u=[];for(const c in l)Object.prototype.hasOwnProperty.call(l,c)&&u.push(c);return u},i.find=(l,u)=>{for(const c of l)if(u(c))return c},i.isInteger=typeof Number.isInteger=="function"?l=>Number.isInteger(l):l=>typeof l=="number"&&isFinite(l)&&Math.floor(l)===l;function s(l,u=" | "){return l.map(c=>typeof c=="string"?`'${c}'`:c).join(u)}i.joinValues=s,i.jsonStringifyReplacer=(l,u)=>typeof u=="bigint"?u.toString():u})(t=e.util||(e.util={})),function(i){i.mergeShapes=(o,a)=>({...o,...a})}(e.objectUtil||(e.objectUtil={})),e.ZodParsedType=t.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);const r=i=>{switch(typeof i){case"undefined":return e.ZodParsedType.undefined;case"string":return e.ZodParsedType.string;case"number":return isNaN(i)?e.ZodParsedType.nan:e.ZodParsedType.number;case"boolean":return e.ZodParsedType.boolean;case"function":return e.ZodParsedType.function;case"bigint":return e.ZodParsedType.bigint;case"symbol":return e.ZodParsedType.symbol;case"object":return Array.isArray(i)?e.ZodParsedType.array:i===null?e.ZodParsedType.null:i.then&&typeof i.then=="function"&&i.catch&&typeof i.catch=="function"?e.ZodParsedType.promise:typeof Map<"u"&&i instanceof Map?e.ZodParsedType.map:typeof Set<"u"&&i instanceof Set?e.ZodParsedType.set:typeof Date<"u"&&i instanceof Date?e.ZodParsedType.date:e.ZodParsedType.object;default:return e.ZodParsedType.unknown}};e.getParsedType=r})(Ty);var Eu={};Object.defineProperty(Eu,"__esModule",{value:!0});Eu.ZodError=Eu.quotelessJson=Eu.ZodIssueCode=void 0;const pL=Ty;Eu.ZodIssueCode=pL.util.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);const Tde=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");Eu.quotelessJson=Tde;class ZS extends Error{constructor(t){super(),this.issues=[],this.addIssue=i=>{this.issues=[...this.issues,i]},this.addIssues=(i=[])=>{this.issues=[...this.issues,...i]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const r=t||function(a){return a.message},i={_errors:[]},o=a=>{for(const s of a.issues)if(s.code==="invalid_union")s.unionErrors.map(o);else if(s.code==="invalid_return_type")o(s.returnTypeError);else if(s.code==="invalid_arguments")o(s.argumentsError);else if(s.path.length===0)i._errors.push(r(s));else{let l=i,u=0;for(;ur.message){const r={},i=[];for(const o of this.issues)o.path.length>0?(r[o.path[0]]=r[o.path[0]]||[],r[o.path[0]].push(t(o))):i.push(t(o));return{formErrors:i,fieldErrors:r}}get formErrors(){return this.flatten()}}Eu.ZodError=ZS;ZS.create=e=>new ZS(e);Object.defineProperty(V2,"__esModule",{value:!0});const tf=Ty,Qa=Eu,Ide=(e,t)=>{let r;switch(e.code){case Qa.ZodIssueCode.invalid_type:e.received===tf.ZodParsedType.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case Qa.ZodIssueCode.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,tf.util.jsonStringifyReplacer)}`;break;case Qa.ZodIssueCode.unrecognized_keys:r=`Unrecognized key(s) in object: ${tf.util.joinValues(e.keys,", ")}`;break;case Qa.ZodIssueCode.invalid_union:r="Invalid input";break;case Qa.ZodIssueCode.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${tf.util.joinValues(e.options)}`;break;case Qa.ZodIssueCode.invalid_enum_value:r=`Invalid enum value. Expected ${tf.util.joinValues(e.options)}, received '${e.received}'`;break;case Qa.ZodIssueCode.invalid_arguments:r="Invalid function arguments";break;case Qa.ZodIssueCode.invalid_return_type:r="Invalid function return type";break;case Qa.ZodIssueCode.invalid_date:r="Invalid date";break;case Qa.ZodIssueCode.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:tf.util.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case Qa.ZodIssueCode.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case Qa.ZodIssueCode.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case Qa.ZodIssueCode.custom:r="Invalid input";break;case Qa.ZodIssueCode.invalid_intersection_types:r="Intersection results could not be merged";break;case Qa.ZodIssueCode.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case Qa.ZodIssueCode.not_finite:r="Number must be finite";break;default:r=t.defaultError,tf.util.assertNever(e)}return{message:r}};V2.default=Ide;var Rde=_n&&_n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ku,"__esModule",{value:!0});ku.getErrorMap=ku.setErrorMap=ku.defaultErrorMap=void 0;const hL=Rde(V2);ku.defaultErrorMap=hL.default;let gL=hL.default;function Pde(e){gL=e}ku.setErrorMap=Pde;function Mde(){return gL}ku.getErrorMap=Mde;var ok={};(function(e){var t=_n&&_n.__importDefault||function(x){return x&&x.__esModule?x:{default:x}};Object.defineProperty(e,"__esModule",{value:!0}),e.isAsync=e.isValid=e.isDirty=e.isAborted=e.OK=e.DIRTY=e.INVALID=e.ParseStatus=e.addIssueToContext=e.EMPTY_PATH=e.makeIssue=void 0;const r=ku,i=t(V2),o=x=>{const{data:b,path:y,errorMaps:_,issueData:k}=x,E=[...y,...k.path||[]],B={...k,path:E};let U="";const D=_.filter(j=>!!j).slice().reverse();for(const j of D)U=j(B,{data:b,defaultError:U}).message;return{...k,path:E,message:k.message||U}};e.makeIssue=o,e.EMPTY_PATH=[];function a(x,b){const y=(0,e.makeIssue)({issueData:b,data:x.data,path:x.path,errorMaps:[x.common.contextualErrorMap,x.schemaErrorMap,(0,r.getErrorMap)(),i.default].filter(_=>!!_)});x.common.issues.push(y)}e.addIssueToContext=a;class s{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(b,y){const _=[];for(const k of y){if(k.status==="aborted")return e.INVALID;k.status==="dirty"&&b.dirty(),_.push(k.value)}return{status:b.value,value:_}}static async mergeObjectAsync(b,y){const _=[];for(const k of y)_.push({key:await k.key,value:await k.value});return s.mergeObjectSync(b,_)}static mergeObjectSync(b,y){const _={};for(const k of y){const{key:E,value:B}=k;if(E.status==="aborted"||B.status==="aborted")return e.INVALID;E.status==="dirty"&&b.dirty(),B.status==="dirty"&&b.dirty(),(typeof B.value<"u"||k.alwaysSet)&&(_[E.value]=B.value)}return{status:b.value,value:_}}}e.ParseStatus=s,e.INVALID=Object.freeze({status:"aborted"});const l=x=>({status:"dirty",value:x});e.DIRTY=l;const u=x=>({status:"valid",value:x});e.OK=u;const c=x=>x.status==="aborted";e.isAborted=c;const d=x=>x.status==="dirty";e.isDirty=d;const p=x=>x.status==="valid";e.isValid=p;const v=x=>typeof Promise<"u"&&x instanceof Promise;e.isAsync=v})(ok);var mL={};Object.defineProperty(mL,"__esModule",{value:!0});var yL={},vL={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.errorUtil=void 0,function(t){t.errToObj=r=>typeof r=="string"?{message:r}:r||{},t.toString=r=>typeof r=="string"?r:r?.message}(e.errorUtil||(e.errorUtil={}))})(vL);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.discriminatedUnion=e.date=e.boolean=e.bigint=e.array=e.any=e.coerce=e.ZodFirstPartyTypeKind=e.late=e.ZodSchema=e.Schema=e.custom=e.ZodPipeline=e.ZodBranded=e.BRAND=e.ZodNaN=e.ZodCatch=e.ZodDefault=e.ZodNullable=e.ZodOptional=e.ZodTransformer=e.ZodEffects=e.ZodPromise=e.ZodNativeEnum=e.ZodEnum=e.ZodLiteral=e.ZodLazy=e.ZodFunction=e.ZodSet=e.ZodMap=e.ZodRecord=e.ZodTuple=e.ZodIntersection=e.ZodDiscriminatedUnion=e.ZodUnion=e.ZodObject=e.ZodArray=e.ZodVoid=e.ZodNever=e.ZodUnknown=e.ZodAny=e.ZodNull=e.ZodUndefined=e.ZodSymbol=e.ZodDate=e.ZodBoolean=e.ZodBigInt=e.ZodNumber=e.ZodString=e.ZodType=void 0,e.NEVER=e.void=e.unknown=e.union=e.undefined=e.tuple=e.transformer=e.symbol=e.string=e.strictObject=e.set=e.record=e.promise=e.preprocess=e.pipeline=e.ostring=e.optional=e.onumber=e.oboolean=e.object=e.number=e.nullable=e.null=e.never=e.nativeEnum=e.nan=e.map=e.literal=e.lazy=e.intersection=e.instanceof=e.function=e.enum=e.effect=void 0;const t=ku,r=vL,i=ok,o=Ty,a=Eu;class s{constructor(K,ye,Me,it){this._cachedPath=[],this.parent=K,this.data=ye,this._path=Me,this._key=it}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const l=(vt,K)=>{if((0,i.isValid)(K))return{success:!0,data:K.value};if(!vt.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const ye=new a.ZodError(vt.common.issues);return this._error=ye,this._error}}};function u(vt){if(!vt)return{};const{errorMap:K,invalid_type_error:ye,required_error:Me,description:it}=vt;if(K&&(ye||Me))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return K?{errorMap:K,description:it}:{errorMap:(br,cr)=>br.code!=="invalid_type"?{message:cr.defaultError}:typeof cr.data>"u"?{message:Me??cr.defaultError}:{message:ye??cr.defaultError},description:it}}class c{constructor(K){this.spa=this.safeParseAsync,this._def=K,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(K){return(0,o.getParsedType)(K.data)}_getOrReturnCtx(K,ye){return ye||{common:K.parent.common,data:K.data,parsedType:(0,o.getParsedType)(K.data),schemaErrorMap:this._def.errorMap,path:K.path,parent:K.parent}}_processInputParams(K){return{status:new i.ParseStatus,ctx:{common:K.parent.common,data:K.data,parsedType:(0,o.getParsedType)(K.data),schemaErrorMap:this._def.errorMap,path:K.path,parent:K.parent}}}_parseSync(K){const ye=this._parse(K);if((0,i.isAsync)(ye))throw new Error("Synchronous parse encountered promise.");return ye}_parseAsync(K){const ye=this._parse(K);return Promise.resolve(ye)}parse(K,ye){const Me=this.safeParse(K,ye);if(Me.success)return Me.data;throw Me.error}safeParse(K,ye){var Me;const it={common:{issues:[],async:(Me=ye?.async)!==null&&Me!==void 0?Me:!1,contextualErrorMap:ye?.errorMap},path:ye?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:K,parsedType:(0,o.getParsedType)(K)},dt=this._parseSync({data:K,path:it.path,parent:it});return l(it,dt)}async parseAsync(K,ye){const Me=await this.safeParseAsync(K,ye);if(Me.success)return Me.data;throw Me.error}async safeParseAsync(K,ye){const Me={common:{issues:[],contextualErrorMap:ye?.errorMap,async:!0},path:ye?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:K,parsedType:(0,o.getParsedType)(K)},it=this._parse({data:K,path:Me.path,parent:Me}),dt=await((0,i.isAsync)(it)?it:Promise.resolve(it));return l(Me,dt)}refine(K,ye){const Me=it=>typeof ye=="string"||typeof ye>"u"?{message:ye}:typeof ye=="function"?ye(it):ye;return this._refinement((it,dt)=>{const br=K(it),cr=()=>dt.addIssue({code:a.ZodIssueCode.custom,...Me(it)});return typeof Promise<"u"&&br instanceof Promise?br.then(Or=>Or?!0:(cr(),!1)):br?!0:(cr(),!1)})}refinement(K,ye){return this._refinement((Me,it)=>K(Me)?!0:(it.addIssue(typeof ye=="function"?ye(Me,it):ye),!1))}_refinement(K){return new Nt({schema:this,typeName:ie.ZodEffects,effect:{type:"refinement",refinement:K}})}superRefine(K){return this._refinement(K)}optional(){return Ie.create(this,this._def)}nullable(){return Ae.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return pe.create(this,this._def)}promise(){return Mt.create(this,this._def)}or(K){return ft.create([this,K],this._def)}and(K){return Bt.create(this,K,this._def)}transform(K){return new Nt({...u(this._def),schema:this,typeName:ie.ZodEffects,effect:{type:"transform",transform:K}})}default(K){const ye=typeof K=="function"?K:()=>K;return new fe({...u(this._def),innerType:this,defaultValue:ye,typeName:ie.ZodDefault})}brand(){return new lt({typeName:ie.ZodBranded,type:this,...u(this._def)})}catch(K){const ye=typeof K=="function"?K:()=>K;return new Be({...u(this._def),innerType:this,catchValue:ye,typeName:ie.ZodCatch})}describe(K){const ye=this.constructor;return new ye({...this._def,description:K})}pipe(K){return jt.create(this,K)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}e.ZodType=c,e.Schema=c,e.ZodSchema=c;const d=/^c[^\s-]{8,}$/i,p=/^[a-z][a-z0-9]*$/,v=/[0-9A-HJKMNP-TV-Z]{26}/,x=/^([a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[a-f0-9]{4}-[a-f0-9]{12}|00000000-0000-0000-0000-000000000000)$/i,b=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\])|(\[IPv6:(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))\])|([A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])*(\.[A-Za-z]{2,})+))$/,y=/^(\p{Extended_Pictographic}|\p{Emoji_Component})+$/u,_=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,k=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,E=vt=>vt.precision?vt.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${vt.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${vt.precision}}Z$`):vt.precision===0?vt.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):vt.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");function B(vt,K){return!!((K==="v4"||!K)&&_.test(vt)||(K==="v6"||!K)&&k.test(vt))}class U extends c{constructor(){super(...arguments),this._regex=(K,ye,Me)=>this.refinement(it=>K.test(it),{validation:ye,code:a.ZodIssueCode.invalid_string,...r.errorUtil.errToObj(Me)}),this.nonempty=K=>this.min(1,r.errorUtil.errToObj(K)),this.trim=()=>new U({...this._def,checks:[...this._def.checks,{kind:"trim"}]}),this.toLowerCase=()=>new U({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]}),this.toUpperCase=()=>new U({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}_parse(K){if(this._def.coerce&&(K.data=String(K.data)),this._getType(K)!==o.ZodParsedType.string){const dt=this._getOrReturnCtx(K);return(0,i.addIssueToContext)(dt,{code:a.ZodIssueCode.invalid_type,expected:o.ZodParsedType.string,received:dt.parsedType}),i.INVALID}const Me=new i.ParseStatus;let it;for(const dt of this._def.checks)if(dt.kind==="min")K.data.lengthdt.value&&(it=this._getOrReturnCtx(K,it),(0,i.addIssueToContext)(it,{code:a.ZodIssueCode.too_big,maximum:dt.value,type:"string",inclusive:!0,exact:!1,message:dt.message}),Me.dirty());else if(dt.kind==="length"){const br=K.data.length>dt.value,cr=K.data.length"u"?null:K?.precision,offset:(ye=K?.offset)!==null&&ye!==void 0?ye:!1,...r.errorUtil.errToObj(K?.message)})}regex(K,ye){return this._addCheck({kind:"regex",regex:K,...r.errorUtil.errToObj(ye)})}includes(K,ye){return this._addCheck({kind:"includes",value:K,position:ye?.position,...r.errorUtil.errToObj(ye?.message)})}startsWith(K,ye){return this._addCheck({kind:"startsWith",value:K,...r.errorUtil.errToObj(ye)})}endsWith(K,ye){return this._addCheck({kind:"endsWith",value:K,...r.errorUtil.errToObj(ye)})}min(K,ye){return this._addCheck({kind:"min",value:K,...r.errorUtil.errToObj(ye)})}max(K,ye){return this._addCheck({kind:"max",value:K,...r.errorUtil.errToObj(ye)})}length(K,ye){return this._addCheck({kind:"length",value:K,...r.errorUtil.errToObj(ye)})}get isDatetime(){return!!this._def.checks.find(K=>K.kind==="datetime")}get isEmail(){return!!this._def.checks.find(K=>K.kind==="email")}get isURL(){return!!this._def.checks.find(K=>K.kind==="url")}get isEmoji(){return!!this._def.checks.find(K=>K.kind==="emoji")}get isUUID(){return!!this._def.checks.find(K=>K.kind==="uuid")}get isCUID(){return!!this._def.checks.find(K=>K.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(K=>K.kind==="cuid2")}get isULID(){return!!this._def.checks.find(K=>K.kind==="ulid")}get isIP(){return!!this._def.checks.find(K=>K.kind==="ip")}get minLength(){let K=null;for(const ye of this._def.checks)ye.kind==="min"&&(K===null||ye.value>K)&&(K=ye.value);return K}get maxLength(){let K=null;for(const ye of this._def.checks)ye.kind==="max"&&(K===null||ye.value{var K;return new U({checks:[],typeName:ie.ZodString,coerce:(K=vt?.coerce)!==null&&K!==void 0?K:!1,...u(vt)})};function D(vt,K){const ye=(vt.toString().split(".")[1]||"").length,Me=(K.toString().split(".")[1]||"").length,it=ye>Me?ye:Me,dt=parseInt(vt.toFixed(it).replace(".","")),br=parseInt(K.toFixed(it).replace(".",""));return dt%br/Math.pow(10,it)}class j extends c{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(K){if(this._def.coerce&&(K.data=Number(K.data)),this._getType(K)!==o.ZodParsedType.number){const dt=this._getOrReturnCtx(K);return(0,i.addIssueToContext)(dt,{code:a.ZodIssueCode.invalid_type,expected:o.ZodParsedType.number,received:dt.parsedType}),i.INVALID}let Me;const it=new i.ParseStatus;for(const dt of this._def.checks)dt.kind==="int"?o.util.isInteger(K.data)||(Me=this._getOrReturnCtx(K,Me),(0,i.addIssueToContext)(Me,{code:a.ZodIssueCode.invalid_type,expected:"integer",received:"float",message:dt.message}),it.dirty()):dt.kind==="min"?(dt.inclusive?K.datadt.value:K.data>=dt.value)&&(Me=this._getOrReturnCtx(K,Me),(0,i.addIssueToContext)(Me,{code:a.ZodIssueCode.too_big,maximum:dt.value,type:"number",inclusive:dt.inclusive,exact:!1,message:dt.message}),it.dirty()):dt.kind==="multipleOf"?D(K.data,dt.value)!==0&&(Me=this._getOrReturnCtx(K,Me),(0,i.addIssueToContext)(Me,{code:a.ZodIssueCode.not_multiple_of,multipleOf:dt.value,message:dt.message}),it.dirty()):dt.kind==="finite"?Number.isFinite(K.data)||(Me=this._getOrReturnCtx(K,Me),(0,i.addIssueToContext)(Me,{code:a.ZodIssueCode.not_finite,message:dt.message}),it.dirty()):o.util.assertNever(dt);return{status:it.value,value:K.data}}gte(K,ye){return this.setLimit("min",K,!0,r.errorUtil.toString(ye))}gt(K,ye){return this.setLimit("min",K,!1,r.errorUtil.toString(ye))}lte(K,ye){return this.setLimit("max",K,!0,r.errorUtil.toString(ye))}lt(K,ye){return this.setLimit("max",K,!1,r.errorUtil.toString(ye))}setLimit(K,ye,Me,it){return new j({...this._def,checks:[...this._def.checks,{kind:K,value:ye,inclusive:Me,message:r.errorUtil.toString(it)}]})}_addCheck(K){return new j({...this._def,checks:[...this._def.checks,K]})}int(K){return this._addCheck({kind:"int",message:r.errorUtil.toString(K)})}positive(K){return this._addCheck({kind:"min",value:0,inclusive:!1,message:r.errorUtil.toString(K)})}negative(K){return this._addCheck({kind:"max",value:0,inclusive:!1,message:r.errorUtil.toString(K)})}nonpositive(K){return this._addCheck({kind:"max",value:0,inclusive:!0,message:r.errorUtil.toString(K)})}nonnegative(K){return this._addCheck({kind:"min",value:0,inclusive:!0,message:r.errorUtil.toString(K)})}multipleOf(K,ye){return this._addCheck({kind:"multipleOf",value:K,message:r.errorUtil.toString(ye)})}finite(K){return this._addCheck({kind:"finite",message:r.errorUtil.toString(K)})}safe(K){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:r.errorUtil.toString(K)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:r.errorUtil.toString(K)})}get minValue(){let K=null;for(const ye of this._def.checks)ye.kind==="min"&&(K===null||ye.value>K)&&(K=ye.value);return K}get maxValue(){let K=null;for(const ye of this._def.checks)ye.kind==="max"&&(K===null||ye.valueK.kind==="int"||K.kind==="multipleOf"&&o.util.isInteger(K.value))}get isFinite(){let K=null,ye=null;for(const Me of this._def.checks){if(Me.kind==="finite"||Me.kind==="int"||Me.kind==="multipleOf")return!0;Me.kind==="min"?(ye===null||Me.value>ye)&&(ye=Me.value):Me.kind==="max"&&(K===null||Me.valuenew j({checks:[],typeName:ie.ZodNumber,coerce:vt?.coerce||!1,...u(vt)});class F extends c{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(K){if(this._def.coerce&&(K.data=BigInt(K.data)),this._getType(K)!==o.ZodParsedType.bigint){const dt=this._getOrReturnCtx(K);return(0,i.addIssueToContext)(dt,{code:a.ZodIssueCode.invalid_type,expected:o.ZodParsedType.bigint,received:dt.parsedType}),i.INVALID}let Me;const it=new i.ParseStatus;for(const dt of this._def.checks)dt.kind==="min"?(dt.inclusive?K.datadt.value:K.data>=dt.value)&&(Me=this._getOrReturnCtx(K,Me),(0,i.addIssueToContext)(Me,{code:a.ZodIssueCode.too_big,type:"bigint",maximum:dt.value,inclusive:dt.inclusive,message:dt.message}),it.dirty()):dt.kind==="multipleOf"?K.data%dt.value!==BigInt(0)&&(Me=this._getOrReturnCtx(K,Me),(0,i.addIssueToContext)(Me,{code:a.ZodIssueCode.not_multiple_of,multipleOf:dt.value,message:dt.message}),it.dirty()):o.util.assertNever(dt);return{status:it.value,value:K.data}}gte(K,ye){return this.setLimit("min",K,!0,r.errorUtil.toString(ye))}gt(K,ye){return this.setLimit("min",K,!1,r.errorUtil.toString(ye))}lte(K,ye){return this.setLimit("max",K,!0,r.errorUtil.toString(ye))}lt(K,ye){return this.setLimit("max",K,!1,r.errorUtil.toString(ye))}setLimit(K,ye,Me,it){return new F({...this._def,checks:[...this._def.checks,{kind:K,value:ye,inclusive:Me,message:r.errorUtil.toString(it)}]})}_addCheck(K){return new F({...this._def,checks:[...this._def.checks,K]})}positive(K){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:r.errorUtil.toString(K)})}negative(K){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:r.errorUtil.toString(K)})}nonpositive(K){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:r.errorUtil.toString(K)})}nonnegative(K){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:r.errorUtil.toString(K)})}multipleOf(K,ye){return this._addCheck({kind:"multipleOf",value:K,message:r.errorUtil.toString(ye)})}get minValue(){let K=null;for(const ye of this._def.checks)ye.kind==="min"&&(K===null||ye.value>K)&&(K=ye.value);return K}get maxValue(){let K=null;for(const ye of this._def.checks)ye.kind==="max"&&(K===null||ye.value{var K;return new F({checks:[],typeName:ie.ZodBigInt,coerce:(K=vt?.coerce)!==null&&K!==void 0?K:!1,...u(vt)})};class H extends c{_parse(K){if(this._def.coerce&&(K.data=Boolean(K.data)),this._getType(K)!==o.ZodParsedType.boolean){const Me=this._getOrReturnCtx(K);return(0,i.addIssueToContext)(Me,{code:a.ZodIssueCode.invalid_type,expected:o.ZodParsedType.boolean,received:Me.parsedType}),i.INVALID}return(0,i.OK)(K.data)}}e.ZodBoolean=H,H.create=vt=>new H({typeName:ie.ZodBoolean,coerce:vt?.coerce||!1,...u(vt)});class W extends c{_parse(K){if(this._def.coerce&&(K.data=new Date(K.data)),this._getType(K)!==o.ZodParsedType.date){const dt=this._getOrReturnCtx(K);return(0,i.addIssueToContext)(dt,{code:a.ZodIssueCode.invalid_type,expected:o.ZodParsedType.date,received:dt.parsedType}),i.INVALID}if(isNaN(K.data.getTime())){const dt=this._getOrReturnCtx(K);return(0,i.addIssueToContext)(dt,{code:a.ZodIssueCode.invalid_date}),i.INVALID}const Me=new i.ParseStatus;let it;for(const dt of this._def.checks)dt.kind==="min"?K.data.getTime()dt.value&&(it=this._getOrReturnCtx(K,it),(0,i.addIssueToContext)(it,{code:a.ZodIssueCode.too_big,message:dt.message,inclusive:!0,exact:!1,maximum:dt.value,type:"date"}),Me.dirty()):o.util.assertNever(dt);return{status:Me.value,value:new Date(K.data.getTime())}}_addCheck(K){return new W({...this._def,checks:[...this._def.checks,K]})}min(K,ye){return this._addCheck({kind:"min",value:K.getTime(),message:r.errorUtil.toString(ye)})}max(K,ye){return this._addCheck({kind:"max",value:K.getTime(),message:r.errorUtil.toString(ye)})}get minDate(){let K=null;for(const ye of this._def.checks)ye.kind==="min"&&(K===null||ye.value>K)&&(K=ye.value);return K!=null?new Date(K):null}get maxDate(){let K=null;for(const ye of this._def.checks)ye.kind==="max"&&(K===null||ye.valuenew W({checks:[],coerce:vt?.coerce||!1,typeName:ie.ZodDate,...u(vt)});class G extends c{_parse(K){if(this._getType(K)!==o.ZodParsedType.symbol){const Me=this._getOrReturnCtx(K);return(0,i.addIssueToContext)(Me,{code:a.ZodIssueCode.invalid_type,expected:o.ZodParsedType.symbol,received:Me.parsedType}),i.INVALID}return(0,i.OK)(K.data)}}e.ZodSymbol=G,G.create=vt=>new G({typeName:ie.ZodSymbol,...u(vt)});class ae extends c{_parse(K){if(this._getType(K)!==o.ZodParsedType.undefined){const Me=this._getOrReturnCtx(K);return(0,i.addIssueToContext)(Me,{code:a.ZodIssueCode.invalid_type,expected:o.ZodParsedType.undefined,received:Me.parsedType}),i.INVALID}return(0,i.OK)(K.data)}}e.ZodUndefined=ae,ae.create=vt=>new ae({typeName:ie.ZodUndefined,...u(vt)});class V extends c{_parse(K){if(this._getType(K)!==o.ZodParsedType.null){const Me=this._getOrReturnCtx(K);return(0,i.addIssueToContext)(Me,{code:a.ZodIssueCode.invalid_type,expected:o.ZodParsedType.null,received:Me.parsedType}),i.INVALID}return(0,i.OK)(K.data)}}e.ZodNull=V,V.create=vt=>new V({typeName:ie.ZodNull,...u(vt)});class oe extends c{constructor(){super(...arguments),this._any=!0}_parse(K){return(0,i.OK)(K.data)}}e.ZodAny=oe,oe.create=vt=>new oe({typeName:ie.ZodAny,...u(vt)});class P extends c{constructor(){super(...arguments),this._unknown=!0}_parse(K){return(0,i.OK)(K.data)}}e.ZodUnknown=P,P.create=vt=>new P({typeName:ie.ZodUnknown,...u(vt)});class ee extends c{_parse(K){const ye=this._getOrReturnCtx(K);return(0,i.addIssueToContext)(ye,{code:a.ZodIssueCode.invalid_type,expected:o.ZodParsedType.never,received:ye.parsedType}),i.INVALID}}e.ZodNever=ee,ee.create=vt=>new ee({typeName:ie.ZodNever,...u(vt)});class le extends c{_parse(K){if(this._getType(K)!==o.ZodParsedType.undefined){const Me=this._getOrReturnCtx(K);return(0,i.addIssueToContext)(Me,{code:a.ZodIssueCode.invalid_type,expected:o.ZodParsedType.void,received:Me.parsedType}),i.INVALID}return(0,i.OK)(K.data)}}e.ZodVoid=le,le.create=vt=>new le({typeName:ie.ZodVoid,...u(vt)});class pe extends c{_parse(K){const{ctx:ye,status:Me}=this._processInputParams(K),it=this._def;if(ye.parsedType!==o.ZodParsedType.array)return(0,i.addIssueToContext)(ye,{code:a.ZodIssueCode.invalid_type,expected:o.ZodParsedType.array,received:ye.parsedType}),i.INVALID;if(it.exactLength!==null){const br=ye.data.length>it.exactLength.value,cr=ye.data.lengthit.maxLength.value&&((0,i.addIssueToContext)(ye,{code:a.ZodIssueCode.too_big,maximum:it.maxLength.value,type:"array",inclusive:!0,exact:!1,message:it.maxLength.message}),Me.dirty()),ye.common.async)return Promise.all([...ye.data].map((br,cr)=>it.type._parseAsync(new s(ye,br,ye.path,cr)))).then(br=>i.ParseStatus.mergeArray(Me,br));const dt=[...ye.data].map((br,cr)=>it.type._parseSync(new s(ye,br,ye.path,cr)));return i.ParseStatus.mergeArray(Me,dt)}get element(){return this._def.type}min(K,ye){return new pe({...this._def,minLength:{value:K,message:r.errorUtil.toString(ye)}})}max(K,ye){return new pe({...this._def,maxLength:{value:K,message:r.errorUtil.toString(ye)}})}length(K,ye){return new pe({...this._def,exactLength:{value:K,message:r.errorUtil.toString(ye)}})}nonempty(K){return this.min(1,K)}}e.ZodArray=pe,pe.create=(vt,K)=>new pe({type:vt,minLength:null,maxLength:null,exactLength:null,typeName:ie.ZodArray,...u(K)});function _e(vt){if(vt instanceof J){const K={};for(const ye in vt.shape){const Me=vt.shape[ye];K[ye]=Ie.create(_e(Me))}return new J({...vt._def,shape:()=>K})}else return vt instanceof pe?new pe({...vt._def,type:_e(vt.element)}):vt instanceof Ie?Ie.create(_e(vt.unwrap())):vt instanceof Ae?Ae.create(_e(vt.unwrap())):vt instanceof Rt?Rt.create(vt.items.map(K=>_e(K))):vt}class J extends c{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const K=this._def.shape(),ye=o.util.objectKeys(K);return this._cached={shape:K,keys:ye}}_parse(K){if(this._getType(K)!==o.ZodParsedType.object){const Sr=this._getOrReturnCtx(K);return(0,i.addIssueToContext)(Sr,{code:a.ZodIssueCode.invalid_type,expected:o.ZodParsedType.object,received:Sr.parsedType}),i.INVALID}const{status:Me,ctx:it}=this._processInputParams(K),{shape:dt,keys:br}=this._getCached(),cr=[];if(!(this._def.catchall instanceof ee&&this._def.unknownKeys==="strip"))for(const Sr in it.data)br.includes(Sr)||cr.push(Sr);const Or=[];for(const Sr of br){const Kr=dt[Sr],on=it.data[Sr];Or.push({key:{status:"valid",value:Sr},value:Kr._parse(new s(it,on,it.path,Sr)),alwaysSet:Sr in it.data})}if(this._def.catchall instanceof ee){const Sr=this._def.unknownKeys;if(Sr==="passthrough")for(const Kr of cr)Or.push({key:{status:"valid",value:Kr},value:{status:"valid",value:it.data[Kr]}});else if(Sr==="strict")cr.length>0&&((0,i.addIssueToContext)(it,{code:a.ZodIssueCode.unrecognized_keys,keys:cr}),Me.dirty());else if(Sr!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const Sr=this._def.catchall;for(const Kr of cr){const on=it.data[Kr];Or.push({key:{status:"valid",value:Kr},value:Sr._parse(new s(it,on,it.path,Kr)),alwaysSet:Kr in it.data})}}return it.common.async?Promise.resolve().then(async()=>{const Sr=[];for(const Kr of Or){const on=await Kr.key;Sr.push({key:on,value:await Kr.value,alwaysSet:Kr.alwaysSet})}return Sr}).then(Sr=>i.ParseStatus.mergeObjectSync(Me,Sr)):i.ParseStatus.mergeObjectSync(Me,Or)}get shape(){return this._def.shape()}strict(K){return r.errorUtil.errToObj,new J({...this._def,unknownKeys:"strict",...K!==void 0?{errorMap:(ye,Me)=>{var it,dt,br,cr;const Or=(br=(dt=(it=this._def).errorMap)===null||dt===void 0?void 0:dt.call(it,ye,Me).message)!==null&&br!==void 0?br:Me.defaultError;return ye.code==="unrecognized_keys"?{message:(cr=r.errorUtil.errToObj(K).message)!==null&&cr!==void 0?cr:Or}:{message:Or}}}:{}})}strip(){return new J({...this._def,unknownKeys:"strip"})}passthrough(){return new J({...this._def,unknownKeys:"passthrough"})}extend(K){return new J({...this._def,shape:()=>({...this._def.shape(),...K})})}merge(K){return new J({unknownKeys:K._def.unknownKeys,catchall:K._def.catchall,shape:()=>({...this._def.shape(),...K._def.shape()}),typeName:ie.ZodObject})}setKey(K,ye){return this.augment({[K]:ye})}catchall(K){return new J({...this._def,catchall:K})}pick(K){const ye={};return o.util.objectKeys(K).forEach(Me=>{K[Me]&&this.shape[Me]&&(ye[Me]=this.shape[Me])}),new J({...this._def,shape:()=>ye})}omit(K){const ye={};return o.util.objectKeys(this.shape).forEach(Me=>{K[Me]||(ye[Me]=this.shape[Me])}),new J({...this._def,shape:()=>ye})}deepPartial(){return _e(this)}partial(K){const ye={};return o.util.objectKeys(this.shape).forEach(Me=>{const it=this.shape[Me];K&&!K[Me]?ye[Me]=it:ye[Me]=it.optional()}),new J({...this._def,shape:()=>ye})}required(K){const ye={};return o.util.objectKeys(this.shape).forEach(Me=>{if(K&&!K[Me])ye[Me]=this.shape[Me];else{let dt=this.shape[Me];for(;dt instanceof Ie;)dt=dt._def.innerType;ye[Me]=dt}}),new J({...this._def,shape:()=>ye})}keyof(){return Kt(o.util.objectKeys(this.shape))}}e.ZodObject=J,J.create=(vt,K)=>new J({shape:()=>vt,unknownKeys:"strip",catchall:ee.create(),typeName:ie.ZodObject,...u(K)}),J.strictCreate=(vt,K)=>new J({shape:()=>vt,unknownKeys:"strict",catchall:ee.create(),typeName:ie.ZodObject,...u(K)}),J.lazycreate=(vt,K)=>new J({shape:vt,unknownKeys:"strip",catchall:ee.create(),typeName:ie.ZodObject,...u(K)});class ft extends c{_parse(K){const{ctx:ye}=this._processInputParams(K),Me=this._def.options;function it(dt){for(const cr of dt)if(cr.result.status==="valid")return cr.result;for(const cr of dt)if(cr.result.status==="dirty")return ye.common.issues.push(...cr.ctx.common.issues),cr.result;const br=dt.map(cr=>new a.ZodError(cr.ctx.common.issues));return(0,i.addIssueToContext)(ye,{code:a.ZodIssueCode.invalid_union,unionErrors:br}),i.INVALID}if(ye.common.async)return Promise.all(Me.map(async dt=>{const br={...ye,common:{...ye.common,issues:[]},parent:null};return{result:await dt._parseAsync({data:ye.data,path:ye.path,parent:br}),ctx:br}})).then(it);{let dt;const br=[];for(const Or of Me){const Sr={...ye,common:{...ye.common,issues:[]},parent:null},Kr=Or._parseSync({data:ye.data,path:ye.path,parent:Sr});if(Kr.status==="valid")return Kr;Kr.status==="dirty"&&!dt&&(dt={result:Kr,ctx:Sr}),Sr.common.issues.length&&br.push(Sr.common.issues)}if(dt)return ye.common.issues.push(...dt.ctx.common.issues),dt.result;const cr=br.map(Or=>new a.ZodError(Or));return(0,i.addIssueToContext)(ye,{code:a.ZodIssueCode.invalid_union,unionErrors:cr}),i.INVALID}}get options(){return this._def.options}}e.ZodUnion=ft,ft.create=(vt,K)=>new ft({options:vt,typeName:ie.ZodUnion,...u(K)});const Le=vt=>vt instanceof Ct?Le(vt.schema):vt instanceof Nt?Le(vt.innerType()):vt instanceof Lt?[vt.value]:vt instanceof yr?vt.options:vt instanceof ne?Object.keys(vt.enum):vt instanceof fe?Le(vt._def.innerType):vt instanceof ae?[void 0]:vt instanceof V?[null]:null;class He extends c{_parse(K){const{ctx:ye}=this._processInputParams(K);if(ye.parsedType!==o.ZodParsedType.object)return(0,i.addIssueToContext)(ye,{code:a.ZodIssueCode.invalid_type,expected:o.ZodParsedType.object,received:ye.parsedType}),i.INVALID;const Me=this.discriminator,it=ye.data[Me],dt=this.optionsMap.get(it);return dt?ye.common.async?dt._parseAsync({data:ye.data,path:ye.path,parent:ye}):dt._parseSync({data:ye.data,path:ye.path,parent:ye}):((0,i.addIssueToContext)(ye,{code:a.ZodIssueCode.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[Me]}),i.INVALID)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(K,ye,Me){const it=new Map;for(const dt of ye){const br=Le(dt.shape[K]);if(!br)throw new Error(`A discriminator value for key \`${K}\` could not be extracted from all schema options`);for(const cr of br){if(it.has(cr))throw new Error(`Discriminator property ${String(K)} has duplicate value ${String(cr)}`);it.set(cr,dt)}}return new He({typeName:ie.ZodDiscriminatedUnion,discriminator:K,options:ye,optionsMap:it,...u(Me)})}}e.ZodDiscriminatedUnion=He;function nr(vt,K){const ye=(0,o.getParsedType)(vt),Me=(0,o.getParsedType)(K);if(vt===K)return{valid:!0,data:vt};if(ye===o.ZodParsedType.object&&Me===o.ZodParsedType.object){const it=o.util.objectKeys(K),dt=o.util.objectKeys(vt).filter(cr=>it.indexOf(cr)!==-1),br={...vt,...K};for(const cr of dt){const Or=nr(vt[cr],K[cr]);if(!Or.valid)return{valid:!1};br[cr]=Or.data}return{valid:!0,data:br}}else if(ye===o.ZodParsedType.array&&Me===o.ZodParsedType.array){if(vt.length!==K.length)return{valid:!1};const it=[];for(let dt=0;dt{if((0,i.isAborted)(dt)||(0,i.isAborted)(br))return i.INVALID;const cr=nr(dt.value,br.value);return cr.valid?(((0,i.isDirty)(dt)||(0,i.isDirty)(br))&&ye.dirty(),{status:ye.value,value:cr.data}):((0,i.addIssueToContext)(Me,{code:a.ZodIssueCode.invalid_intersection_types}),i.INVALID)};return Me.common.async?Promise.all([this._def.left._parseAsync({data:Me.data,path:Me.path,parent:Me}),this._def.right._parseAsync({data:Me.data,path:Me.path,parent:Me})]).then(([dt,br])=>it(dt,br)):it(this._def.left._parseSync({data:Me.data,path:Me.path,parent:Me}),this._def.right._parseSync({data:Me.data,path:Me.path,parent:Me}))}}e.ZodIntersection=Bt,Bt.create=(vt,K,ye)=>new Bt({left:vt,right:K,typeName:ie.ZodIntersection,...u(ye)});class Rt extends c{_parse(K){const{status:ye,ctx:Me}=this._processInputParams(K);if(Me.parsedType!==o.ZodParsedType.array)return(0,i.addIssueToContext)(Me,{code:a.ZodIssueCode.invalid_type,expected:o.ZodParsedType.array,received:Me.parsedType}),i.INVALID;if(Me.data.lengththis._def.items.length&&((0,i.addIssueToContext)(Me,{code:a.ZodIssueCode.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),ye.dirty());const dt=[...Me.data].map((br,cr)=>{const Or=this._def.items[cr]||this._def.rest;return Or?Or._parse(new s(Me,br,Me.path,cr)):null}).filter(br=>!!br);return Me.common.async?Promise.all(dt).then(br=>i.ParseStatus.mergeArray(ye,br)):i.ParseStatus.mergeArray(ye,dt)}get items(){return this._def.items}rest(K){return new Rt({...this._def,rest:K})}}e.ZodTuple=Rt,Rt.create=(vt,K)=>{if(!Array.isArray(vt))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Rt({items:vt,typeName:ie.ZodTuple,rest:null,...u(K)})};class Jt extends c{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(K){const{status:ye,ctx:Me}=this._processInputParams(K);if(Me.parsedType!==o.ZodParsedType.object)return(0,i.addIssueToContext)(Me,{code:a.ZodIssueCode.invalid_type,expected:o.ZodParsedType.object,received:Me.parsedType}),i.INVALID;const it=[],dt=this._def.keyType,br=this._def.valueType;for(const cr in Me.data)it.push({key:dt._parse(new s(Me,cr,Me.path,cr)),value:br._parse(new s(Me,Me.data[cr],Me.path,cr))});return Me.common.async?i.ParseStatus.mergeObjectAsync(ye,it):i.ParseStatus.mergeObjectSync(ye,it)}get element(){return this._def.valueType}static create(K,ye,Me){return ye instanceof c?new Jt({keyType:K,valueType:ye,typeName:ie.ZodRecord,...u(Me)}):new Jt({keyType:U.create(),valueType:K,typeName:ie.ZodRecord,...u(ye)})}}e.ZodRecord=Jt;class vr extends c{_parse(K){const{status:ye,ctx:Me}=this._processInputParams(K);if(Me.parsedType!==o.ZodParsedType.map)return(0,i.addIssueToContext)(Me,{code:a.ZodIssueCode.invalid_type,expected:o.ZodParsedType.map,received:Me.parsedType}),i.INVALID;const it=this._def.keyType,dt=this._def.valueType,br=[...Me.data.entries()].map(([cr,Or],Sr)=>({key:it._parse(new s(Me,cr,Me.path,[Sr,"key"])),value:dt._parse(new s(Me,Or,Me.path,[Sr,"value"]))}));if(Me.common.async){const cr=new Map;return Promise.resolve().then(async()=>{for(const Or of br){const Sr=await Or.key,Kr=await Or.value;if(Sr.status==="aborted"||Kr.status==="aborted")return i.INVALID;(Sr.status==="dirty"||Kr.status==="dirty")&&ye.dirty(),cr.set(Sr.value,Kr.value)}return{status:ye.value,value:cr}})}else{const cr=new Map;for(const Or of br){const Sr=Or.key,Kr=Or.value;if(Sr.status==="aborted"||Kr.status==="aborted")return i.INVALID;(Sr.status==="dirty"||Kr.status==="dirty")&&ye.dirty(),cr.set(Sr.value,Kr.value)}return{status:ye.value,value:cr}}}}e.ZodMap=vr,vr.create=(vt,K,ye)=>new vr({valueType:K,keyType:vt,typeName:ie.ZodMap,...u(ye)});class At extends c{_parse(K){const{status:ye,ctx:Me}=this._processInputParams(K);if(Me.parsedType!==o.ZodParsedType.set)return(0,i.addIssueToContext)(Me,{code:a.ZodIssueCode.invalid_type,expected:o.ZodParsedType.set,received:Me.parsedType}),i.INVALID;const it=this._def;it.minSize!==null&&Me.data.sizeit.maxSize.value&&((0,i.addIssueToContext)(Me,{code:a.ZodIssueCode.too_big,maximum:it.maxSize.value,type:"set",inclusive:!0,exact:!1,message:it.maxSize.message}),ye.dirty());const dt=this._def.valueType;function br(Or){const Sr=new Set;for(const Kr of Or){if(Kr.status==="aborted")return i.INVALID;Kr.status==="dirty"&&ye.dirty(),Sr.add(Kr.value)}return{status:ye.value,value:Sr}}const cr=[...Me.data.values()].map((Or,Sr)=>dt._parse(new s(Me,Or,Me.path,Sr)));return Me.common.async?Promise.all(cr).then(Or=>br(Or)):br(cr)}min(K,ye){return new At({...this._def,minSize:{value:K,message:r.errorUtil.toString(ye)}})}max(K,ye){return new At({...this._def,maxSize:{value:K,message:r.errorUtil.toString(ye)}})}size(K,ye){return this.min(K,ye).max(K,ye)}nonempty(K){return this.min(1,K)}}e.ZodSet=At,At.create=(vt,K)=>new At({valueType:vt,minSize:null,maxSize:null,typeName:ie.ZodSet,...u(K)});class kt extends c{constructor(){super(...arguments),this.validate=this.implement}_parse(K){const{ctx:ye}=this._processInputParams(K);if(ye.parsedType!==o.ZodParsedType.function)return(0,i.addIssueToContext)(ye,{code:a.ZodIssueCode.invalid_type,expected:o.ZodParsedType.function,received:ye.parsedType}),i.INVALID;function Me(cr,Or){return(0,i.makeIssue)({data:cr,path:ye.path,errorMaps:[ye.common.contextualErrorMap,ye.schemaErrorMap,(0,t.getErrorMap)(),t.defaultErrorMap].filter(Sr=>!!Sr),issueData:{code:a.ZodIssueCode.invalid_arguments,argumentsError:Or}})}function it(cr,Or){return(0,i.makeIssue)({data:cr,path:ye.path,errorMaps:[ye.common.contextualErrorMap,ye.schemaErrorMap,(0,t.getErrorMap)(),t.defaultErrorMap].filter(Sr=>!!Sr),issueData:{code:a.ZodIssueCode.invalid_return_type,returnTypeError:Or}})}const dt={errorMap:ye.common.contextualErrorMap},br=ye.data;return this._def.returns instanceof Mt?(0,i.OK)(async(...cr)=>{const Or=new a.ZodError([]),Sr=await this._def.args.parseAsync(cr,dt).catch(Sn=>{throw Or.addIssue(Me(cr,Sn)),Or}),Kr=await br(...Sr);return await this._def.returns._def.type.parseAsync(Kr,dt).catch(Sn=>{throw Or.addIssue(it(Kr,Sn)),Or})}):(0,i.OK)((...cr)=>{const Or=this._def.args.safeParse(cr,dt);if(!Or.success)throw new a.ZodError([Me(cr,Or.error)]);const Sr=br(...Or.data),Kr=this._def.returns.safeParse(Sr,dt);if(!Kr.success)throw new a.ZodError([it(Sr,Kr.error)]);return Kr.data})}parameters(){return this._def.args}returnType(){return this._def.returns}args(...K){return new kt({...this._def,args:Rt.create(K).rest(P.create())})}returns(K){return new kt({...this._def,returns:K})}implement(K){return this.parse(K)}strictImplement(K){return this.parse(K)}static create(K,ye,Me){return new kt({args:K||Rt.create([]).rest(P.create()),returns:ye||P.create(),typeName:ie.ZodFunction,...u(Me)})}}e.ZodFunction=kt;class Ct extends c{get schema(){return this._def.getter()}_parse(K){const{ctx:ye}=this._processInputParams(K);return this._def.getter()._parse({data:ye.data,path:ye.path,parent:ye})}}e.ZodLazy=Ct,Ct.create=(vt,K)=>new Ct({getter:vt,typeName:ie.ZodLazy,...u(K)});class Lt extends c{_parse(K){if(K.data!==this._def.value){const ye=this._getOrReturnCtx(K);return(0,i.addIssueToContext)(ye,{received:ye.data,code:a.ZodIssueCode.invalid_literal,expected:this._def.value}),i.INVALID}return{status:"valid",value:K.data}}get value(){return this._def.value}}e.ZodLiteral=Lt,Lt.create=(vt,K)=>new Lt({value:vt,typeName:ie.ZodLiteral,...u(K)});function Kt(vt,K){return new yr({values:vt,typeName:ie.ZodEnum,...u(K)})}class yr extends c{_parse(K){if(typeof K.data!="string"){const ye=this._getOrReturnCtx(K),Me=this._def.values;return(0,i.addIssueToContext)(ye,{expected:o.util.joinValues(Me),received:ye.parsedType,code:a.ZodIssueCode.invalid_type}),i.INVALID}if(this._def.values.indexOf(K.data)===-1){const ye=this._getOrReturnCtx(K),Me=this._def.values;return(0,i.addIssueToContext)(ye,{received:ye.data,code:a.ZodIssueCode.invalid_enum_value,options:Me}),i.INVALID}return(0,i.OK)(K.data)}get options(){return this._def.values}get enum(){const K={};for(const ye of this._def.values)K[ye]=ye;return K}get Values(){const K={};for(const ye of this._def.values)K[ye]=ye;return K}get Enum(){const K={};for(const ye of this._def.values)K[ye]=ye;return K}extract(K){return yr.create(K)}exclude(K){return yr.create(this.options.filter(ye=>!K.includes(ye)))}}e.ZodEnum=yr,yr.create=Kt;class ne extends c{_parse(K){const ye=o.util.getValidEnumValues(this._def.values),Me=this._getOrReturnCtx(K);if(Me.parsedType!==o.ZodParsedType.string&&Me.parsedType!==o.ZodParsedType.number){const it=o.util.objectValues(ye);return(0,i.addIssueToContext)(Me,{expected:o.util.joinValues(it),received:Me.parsedType,code:a.ZodIssueCode.invalid_type}),i.INVALID}if(ye.indexOf(K.data)===-1){const it=o.util.objectValues(ye);return(0,i.addIssueToContext)(Me,{received:Me.data,code:a.ZodIssueCode.invalid_enum_value,options:it}),i.INVALID}return(0,i.OK)(K.data)}get enum(){return this._def.values}}e.ZodNativeEnum=ne,ne.create=(vt,K)=>new ne({values:vt,typeName:ie.ZodNativeEnum,...u(K)});class Mt extends c{unwrap(){return this._def.type}_parse(K){const{ctx:ye}=this._processInputParams(K);if(ye.parsedType!==o.ZodParsedType.promise&&ye.common.async===!1)return(0,i.addIssueToContext)(ye,{code:a.ZodIssueCode.invalid_type,expected:o.ZodParsedType.promise,received:ye.parsedType}),i.INVALID;const Me=ye.parsedType===o.ZodParsedType.promise?ye.data:Promise.resolve(ye.data);return(0,i.OK)(Me.then(it=>this._def.type.parseAsync(it,{path:ye.path,errorMap:ye.common.contextualErrorMap})))}}e.ZodPromise=Mt,Mt.create=(vt,K)=>new Mt({type:vt,typeName:ie.ZodPromise,...u(K)});class Nt extends c{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ie.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(K){const{status:ye,ctx:Me}=this._processInputParams(K),it=this._def.effect||null;if(it.type==="preprocess"){const br=it.transform(Me.data);return Me.common.async?Promise.resolve(br).then(cr=>this._def.schema._parseAsync({data:cr,path:Me.path,parent:Me})):this._def.schema._parseSync({data:br,path:Me.path,parent:Me})}const dt={addIssue:br=>{(0,i.addIssueToContext)(Me,br),br.fatal?ye.abort():ye.dirty()},get path(){return Me.path}};if(dt.addIssue=dt.addIssue.bind(dt),it.type==="refinement"){const br=cr=>{const Or=it.refinement(cr,dt);if(Me.common.async)return Promise.resolve(Or);if(Or instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return cr};if(Me.common.async===!1){const cr=this._def.schema._parseSync({data:Me.data,path:Me.path,parent:Me});return cr.status==="aborted"?i.INVALID:(cr.status==="dirty"&&ye.dirty(),br(cr.value),{status:ye.value,value:cr.value})}else return this._def.schema._parseAsync({data:Me.data,path:Me.path,parent:Me}).then(cr=>cr.status==="aborted"?i.INVALID:(cr.status==="dirty"&&ye.dirty(),br(cr.value).then(()=>({status:ye.value,value:cr.value}))))}if(it.type==="transform")if(Me.common.async===!1){const br=this._def.schema._parseSync({data:Me.data,path:Me.path,parent:Me});if(!(0,i.isValid)(br))return br;const cr=it.transform(br.value,dt);if(cr instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:ye.value,value:cr}}else return this._def.schema._parseAsync({data:Me.data,path:Me.path,parent:Me}).then(br=>(0,i.isValid)(br)?Promise.resolve(it.transform(br.value,dt)).then(cr=>({status:ye.value,value:cr})):br);o.util.assertNever(it)}}e.ZodEffects=Nt,e.ZodTransformer=Nt,Nt.create=(vt,K,ye)=>new Nt({schema:vt,typeName:ie.ZodEffects,effect:K,...u(ye)}),Nt.createWithPreprocess=(vt,K,ye)=>new Nt({schema:K,effect:{type:"preprocess",transform:vt},typeName:ie.ZodEffects,...u(ye)});class Ie extends c{_parse(K){return this._getType(K)===o.ZodParsedType.undefined?(0,i.OK)(void 0):this._def.innerType._parse(K)}unwrap(){return this._def.innerType}}e.ZodOptional=Ie,Ie.create=(vt,K)=>new Ie({innerType:vt,typeName:ie.ZodOptional,...u(K)});class Ae extends c{_parse(K){return this._getType(K)===o.ZodParsedType.null?(0,i.OK)(null):this._def.innerType._parse(K)}unwrap(){return this._def.innerType}}e.ZodNullable=Ae,Ae.create=(vt,K)=>new Ae({innerType:vt,typeName:ie.ZodNullable,...u(K)});class fe extends c{_parse(K){const{ctx:ye}=this._processInputParams(K);let Me=ye.data;return ye.parsedType===o.ZodParsedType.undefined&&(Me=this._def.defaultValue()),this._def.innerType._parse({data:Me,path:ye.path,parent:ye})}removeDefault(){return this._def.innerType}}e.ZodDefault=fe,fe.create=(vt,K)=>new fe({innerType:vt,typeName:ie.ZodDefault,defaultValue:typeof K.default=="function"?K.default:()=>K.default,...u(K)});class Be extends c{_parse(K){const{ctx:ye}=this._processInputParams(K),Me={...ye,common:{...ye.common,issues:[]}},it=this._def.innerType._parse({data:Me.data,path:Me.path,parent:{...Me}});return(0,i.isAsync)(it)?it.then(dt=>({status:"valid",value:dt.status==="valid"?dt.value:this._def.catchValue({get error(){return new a.ZodError(Me.common.issues)},input:Me.data})})):{status:"valid",value:it.status==="valid"?it.value:this._def.catchValue({get error(){return new a.ZodError(Me.common.issues)},input:Me.data})}}removeCatch(){return this._def.innerType}}e.ZodCatch=Be,Be.create=(vt,K)=>new Be({innerType:vt,typeName:ie.ZodCatch,catchValue:typeof K.catch=="function"?K.catch:()=>K.catch,...u(K)});class rt extends c{_parse(K){if(this._getType(K)!==o.ZodParsedType.nan){const Me=this._getOrReturnCtx(K);return(0,i.addIssueToContext)(Me,{code:a.ZodIssueCode.invalid_type,expected:o.ZodParsedType.nan,received:Me.parsedType}),i.INVALID}return{status:"valid",value:K.data}}}e.ZodNaN=rt,rt.create=vt=>new rt({typeName:ie.ZodNaN,...u(vt)}),e.BRAND=Symbol("zod_brand");class lt extends c{_parse(K){const{ctx:ye}=this._processInputParams(K),Me=ye.data;return this._def.type._parse({data:Me,path:ye.path,parent:ye})}unwrap(){return this._def.type}}e.ZodBranded=lt;class jt extends c{_parse(K){const{status:ye,ctx:Me}=this._processInputParams(K);if(Me.common.async)return(async()=>{const dt=await this._def.in._parseAsync({data:Me.data,path:Me.path,parent:Me});return dt.status==="aborted"?i.INVALID:dt.status==="dirty"?(ye.dirty(),(0,i.DIRTY)(dt.value)):this._def.out._parseAsync({data:dt.value,path:Me.path,parent:Me})})();{const it=this._def.in._parseSync({data:Me.data,path:Me.path,parent:Me});return it.status==="aborted"?i.INVALID:it.status==="dirty"?(ye.dirty(),{status:"dirty",value:it.value}):this._def.out._parseSync({data:it.value,path:Me.path,parent:Me})}}static create(K,ye){return new jt({in:K,out:ye,typeName:ie.ZodPipeline})}}e.ZodPipeline=jt;const ce=(vt,K={},ye)=>vt?oe.create().superRefine((Me,it)=>{var dt,br;if(!vt(Me)){const cr=typeof K=="function"?K(Me):typeof K=="string"?{message:K}:K,Or=(br=(dt=cr.fatal)!==null&&dt!==void 0?dt:ye)!==null&&br!==void 0?br:!0,Sr=typeof cr=="string"?{message:cr}:cr;it.addIssue({code:"custom",...Sr,fatal:Or})}}):oe.create();e.custom=ce,e.late={object:J.lazycreate};var ie;(function(vt){vt.ZodString="ZodString",vt.ZodNumber="ZodNumber",vt.ZodNaN="ZodNaN",vt.ZodBigInt="ZodBigInt",vt.ZodBoolean="ZodBoolean",vt.ZodDate="ZodDate",vt.ZodSymbol="ZodSymbol",vt.ZodUndefined="ZodUndefined",vt.ZodNull="ZodNull",vt.ZodAny="ZodAny",vt.ZodUnknown="ZodUnknown",vt.ZodNever="ZodNever",vt.ZodVoid="ZodVoid",vt.ZodArray="ZodArray",vt.ZodObject="ZodObject",vt.ZodUnion="ZodUnion",vt.ZodDiscriminatedUnion="ZodDiscriminatedUnion",vt.ZodIntersection="ZodIntersection",vt.ZodTuple="ZodTuple",vt.ZodRecord="ZodRecord",vt.ZodMap="ZodMap",vt.ZodSet="ZodSet",vt.ZodFunction="ZodFunction",vt.ZodLazy="ZodLazy",vt.ZodLiteral="ZodLiteral",vt.ZodEnum="ZodEnum",vt.ZodEffects="ZodEffects",vt.ZodNativeEnum="ZodNativeEnum",vt.ZodOptional="ZodOptional",vt.ZodNullable="ZodNullable",vt.ZodDefault="ZodDefault",vt.ZodCatch="ZodCatch",vt.ZodPromise="ZodPromise",vt.ZodBranded="ZodBranded",vt.ZodPipeline="ZodPipeline"})(ie=e.ZodFirstPartyTypeKind||(e.ZodFirstPartyTypeKind={}));const de=(vt,K={message:`Input not instance of ${vt.name}`})=>(0,e.custom)(ye=>ye instanceof vt,K);e.instanceof=de;const $=U.create;e.string=$;const C=j.create;e.number=C;const T=rt.create;e.nan=T;const Q=F.create;e.bigint=Q;const ve=H.create;e.boolean=ve;const je=W.create;e.date=je;const ct=G.create;e.symbol=ct;const ur=ae.create;e.undefined=ur;const Dr=V.create;e.null=Dr;const hr=oe.create;e.any=hr;const Rr=P.create;e.unknown=Rr;const Gr=ee.create;e.never=Gr;const Nr=le.create;e.void=Nr;const Kn=pe.create;e.array=Kn;const Tn=J.create;e.object=Tn;const In=J.strictCreate;e.strictObject=In;const yt=ft.create;e.union=yt;const Ei=He.create;e.discriminatedUnion=Ei;const Yn=Bt.create;e.intersection=Yn;const Pi=Rt.create;e.tuple=Pi;const Ji=Jt.create;e.record=Ji;const qo=vr.create;e.map=qo;const eo=At.create;e.set=eo;const Mo=kt.create;e.function=Mo;const Wi=Ct.create;e.lazy=Wi;const pa=Lt.create;e.literal=pa;const ue=yr.create;e.enum=ue;const Re=ne.create;e.nativeEnum=Re;const Ee=Mt.create;e.promise=Ee;const q=Nt.create;e.effect=q,e.transformer=q;const Fe=Ie.create;e.optional=Fe;const Xt=Ae.create;e.nullable=Xt;const ar=Nt.createWithPreprocess;e.preprocess=ar;const Br=jt.create;e.pipeline=Br;const Hr=()=>$().optional();e.ostring=Hr;const An=()=>C().optional();e.onumber=An;const un=()=>ve().optional();e.oboolean=un,e.coerce={string:vt=>U.create({...vt,coerce:!0}),number:vt=>j.create({...vt,coerce:!0}),boolean:vt=>H.create({...vt,coerce:!0}),bigint:vt=>F.create({...vt,coerce:!0}),date:vt=>W.create({...vt,coerce:!0})},e.NEVER=i.INVALID})(yL);(function(e){var t=_n&&_n.__createBinding||(Object.create?function(i,o,a,s){s===void 0&&(s=a),Object.defineProperty(i,s,{enumerable:!0,get:function(){return o[a]}})}:function(i,o,a,s){s===void 0&&(s=a),i[s]=o[a]}),r=_n&&_n.__exportStar||function(i,o){for(var a in i)a!=="default"&&!Object.prototype.hasOwnProperty.call(o,a)&&t(o,i,a)};Object.defineProperty(e,"__esModule",{value:!0}),r(ku,e),r(ok,e),r(mL,e),r(Ty,e),r(yL,e),r(Eu,e)})(QS);(function(e){var t=_n&&_n.__createBinding||(Object.create?function(s,l,u,c){c===void 0&&(c=u),Object.defineProperty(s,c,{enumerable:!0,get:function(){return l[u]}})}:function(s,l,u,c){c===void 0&&(c=u),s[c]=l[u]}),r=_n&&_n.__setModuleDefault||(Object.create?function(s,l){Object.defineProperty(s,"default",{enumerable:!0,value:l})}:function(s,l){s.default=l}),i=_n&&_n.__importStar||function(s){if(s&&s.__esModule)return s;var l={};if(s!=null)for(var u in s)u!=="default"&&Object.prototype.hasOwnProperty.call(s,u)&&t(l,s,u);return r(l,s),l},o=_n&&_n.__exportStar||function(s,l){for(var u in s)u!=="default"&&!Object.prototype.hasOwnProperty.call(l,u)&&t(l,s,u)};Object.defineProperty(e,"__esModule",{value:!0}),e.z=void 0;const a=i(QS);e.z=a,o(QS,e),e.default=a})(ik);const Ode="ton",Bde="13.5.0",Ude="https://github.com/ton-core/ton.git",Dde="Whales Corp. ",Lde="MIT",Nde="dist/index.js",jde=["dist"],$de={docs:"rm -fr docs && typedoc src/index.ts",build:"rm -fr dist && tsc --declaration",test:"jest --verbose --runInBand",release:"yarn build && yarn release-it --npm.yarn1"},Fde={"@release-it/keep-a-changelog":"^3.1.0","@types/jest":"^27.0.1","@types/node":"^16.7.10",buffer:"^6.0.3",expect:"^27.1.0",jest:"^27.1.0","jest-mock":"^27.1.0",karma:"^6.3.4","karma-chrome-launcher":"^3.1.0","karma-jasmine":"^4.0.1","karma-typescript":"^5.5.2","karma-webpack":"^5.0.0",prando:"^6.0.1","release-it":"^15.5.1","ton-core":"^0.48.0","ton-crypto":"3.2.0","ton-emulator":"^2.1.1","ts-jest":"^27.0.5","ts-loader":"^9.2.5","ts-node":"^10.7.0",typedoc:"^0.23.24",typescript:"^4.4.2",webpack:"^5.51.2"},zde={axios:"^0.25.0",dataloader:"^2.0.0","symbol.inspect":"1.0.1",teslabot:"^1.3.0",zod:"^3.21.4"},Hde={"ton-core":">=0.48.0","ton-crypto":">=3.2.0"},Wde={access:"public",registry:"https://registry.npmjs.org/"},Vde="yarn@3.4.1",qde={name:Ode,version:Bde,repository:Ude,author:Dde,license:Lde,main:Nde,files:jde,scripts:$de,devDependencies:Fde,dependencies:zde,peerDependencies:Hde,publishConfig:Wde,"release-it":{github:{release:!0},plugins:{"@release-it/keep-a-changelog":{filename:"CHANGELOG.md"}}},packageManager:Vde};var bL=_n&&_n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ey,"__esModule",{value:!0});Ey.HttpApi=void 0;const Kde=$2,DR=bL(Lce),Gde=bL(J6.exports),sn=ik,Yde=qde.version,qh=sn.z.object({"@type":sn.z.literal("ton.blockIdExt"),workchain:sn.z.number(),shard:sn.z.string(),seqno:sn.z.number(),root_hash:sn.z.string(),file_hash:sn.z.string()}),Qde=sn.z.object({balance:sn.z.union([sn.z.number(),sn.z.string()]),state:sn.z.union([sn.z.literal("active"),sn.z.literal("uninitialized"),sn.z.literal("frozen")]),data:sn.z.string(),code:sn.z.string(),last_transaction_id:sn.z.object({"@type":sn.z.literal("internal.transactionId"),lt:sn.z.string(),hash:sn.z.string()}),block_id:qh,sync_utime:sn.z.number()}),Zde=sn.z.object({"@type":sn.z.literal("ok")}),Xde=sn.z.object({"@type":sn.z.literal("query.fees"),source_fees:sn.z.object({"@type":sn.z.literal("fees"),in_fwd_fee:sn.z.number(),storage_fee:sn.z.number(),gas_fee:sn.z.number(),fwd_fee:sn.z.number()})}),Jde=sn.z.object({gas_used:sn.z.number(),exit_code:sn.z.number(),stack:sn.z.array(sn.z.unknown())}),efe=sn.z.union([sn.z.object({"@type":sn.z.literal("msg.dataRaw"),body:sn.z.string()}),sn.z.object({"@type":sn.z.literal("msg.dataText"),text:sn.z.string()}),sn.z.object({"@type":sn.z.literal("msg.dataDecryptedText"),text:sn.z.string()}),sn.z.object({"@type":sn.z.literal("msg.dataEncryptedText"),text:sn.z.string()})]),LR=sn.z.object({source:sn.z.string(),destination:sn.z.string(),value:sn.z.string(),fwd_fee:sn.z.string(),ihr_fee:sn.z.string(),created_lt:sn.z.string(),body_hash:sn.z.string(),msg_data:efe}),tfe=sn.z.object({data:sn.z.string(),utime:sn.z.number(),transaction_id:sn.z.object({lt:sn.z.string(),hash:sn.z.string()}),fee:sn.z.string(),storage_fee:sn.z.string(),other_fee:sn.z.string(),in_msg:sn.z.union([sn.z.undefined(),LR]),out_msgs:sn.z.array(LR)}),NR=sn.z.array(tfe),rfe=sn.z.object({state_root_hash:sn.z.string(),last:qh,init:qh}),nfe=sn.z.object({shards:sn.z.array(qh)}),ife=sn.z.object({"@type":sn.z.literal("blocks.shortTxId"),mode:sn.z.number(),account:sn.z.string(),lt:sn.z.string(),hash:sn.z.string()}),jR=sn.z.object({id:qh,req_count:sn.z.number(),incomplete:sn.z.boolean(),transactions:sn.z.array(ife)});class $R{constructor(t,r,i,o){this.namespace=t,this.cache=r,this.codec=i,this.keyEncoder=o}async get(t){let r=await this.cache.get(this.namespace,this.keyEncoder(t));if(r){let i=this.codec.safeParse(JSON.parse(r));if(i.success)return i.data}return null}async set(t,r){r!==null?await this.cache.set(this.namespace,this.keyEncoder(t),JSON.stringify(r)):await this.cache.set(this.namespace,this.keyEncoder(t),null)}}class ofe{constructor(t,r){this.endpoint=t,this.cache=new Kde.InMemoryCache,this.parameters={timeout:r?.timeout||3e4,apiKey:r?.apiKey},this.shardCache=new $R("ton-shard",this.cache,sn.z.array(qh),i=>i+""),this.shardLoader=new DR.default(async i=>await Promise.all(i.map(async o=>{const a=await this.shardCache.get(o);if(a)return a;let s=(await this.doCall("shards",{seqno:o},nfe)).shards;return await this.shardCache.set(o,s),s}))),this.shardTransactionsCache=new $R("ton-shard-tx",this.cache,jR,i=>i.workchain+":"+i.shard+":"+i.seqno),this.shardTransactionsLoader=new DR.default(async i=>await Promise.all(i.map(async o=>{const a=await this.shardTransactionsCache.get(o);if(a)return a;let s=await this.doCall("getBlockTransactions",{workchain:o.workchain,seqno:o.seqno,shard:o.shard},jR);return await this.shardTransactionsCache.set(o,s),s})),{cacheKeyFn:i=>i.workchain+":"+i.shard+":"+i.seqno})}getAddressInformation(t){return this.doCall("getAddressInformation",{address:t.toString()},Qde)}async getTransactions(t,r){const i=r.inclusive;delete r.inclusive;let o;r.hash&&(o=Buffer.from(r.hash,"base64").toString("hex"));let a=r.limit;r.hash&&r.lt&&i!==!0&&a++;let s=await this.doCall("getTransactions",{address:t.toString(),...r,limit:a,hash:o},NR);return s.length>a&&(s=s.slice(0,a)),r.hash&&r.lt&&i!==!0&&s.shift(),s}async getMasterchainInfo(){return await this.doCall("getMasterchainInfo",{},rfe)}async getShards(t){return await this.shardLoader.load(t)}async getBlockTransactions(t,r,i){return await this.shardTransactionsLoader.load({workchain:t,seqno:r,shard:i})}async getTransaction(t,r,i){let o=Buffer.from(i,"base64").toString("hex"),s=(await this.doCall("getTransactions",{address:t.toString(),lt:r,hash:o,limit:1},NR)).find(l=>l.transaction_id.lt===r&&l.transaction_id.hash===i);return s||null}async callGetMethod(t,r,i){return await this.doCall("runGetMethod",{address:t.toString(),method:r,stack:afe(i)},Jde)}async sendBoc(t){await this.doCall("sendBoc",{boc:t.toString("base64")},Zde)}async estimateFee(t,r){return await this.doCall("estimateFee",{address:t.toString(),body:r.body.toBoc().toString("base64"),init_data:r.initData?r.initData.toBoc().toString("base64"):"",init_code:r.initCode?r.initCode.toBoc().toString("base64"):"",ignore_chksig:r.ignoreSignature},Xde)}async doCall(t,r,i){let o={"Content-Type":"application/json","X-Ton-Client-Version":Yde};this.parameters.apiKey&&(o["X-API-Key"]=this.parameters.apiKey);let a=await Gde.default.post(this.endpoint,JSON.stringify({id:"1",jsonrpc:"2.0",method:t,params:r}),{headers:o,timeout:this.parameters.timeout});if(a.status!==200||!a.data.ok)throw Error("Received error: "+JSON.stringify(a.data));let s=i.safeParse(a.data.result);if(s.success)return s.data;throw Error("Malformed response: "+s.error.format()._errors.join(", "))}}Ey.HttpApi=ofe;function afe(e){let t=[];for(let r of e)if(r.type==="int")t.push(["num",r.value.toString()]);else if(r.type==="cell")t.push(["tvm.Cell",r.cell.toBoc().toString("base64")]);else if(r.type==="slice")t.push(["tvm.Slice",r.cell.toBoc().toString("base64")]);else if(r.type==="builder")t.push(["tvm.Builder",r.cell.toBoc().toString("base64")]);else throw Error("Unsupported stack item type: "+r.type);return t}var q2={},sfe=_n&&_n.__classPrivateFieldSet||function(e,t,r,i,o){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!o)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?o.call(e,r):o?o.value=r:t.set(e,r),r},Ul=_n&&_n.__classPrivateFieldGet||function(e,t,r,i){if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?i:r==="a"?i.call(e):i?i.value:t.get(e)},vs;Object.defineProperty(q2,"__esModule",{value:!0});q2.TonClient=void 0;const lfe=Ey,va=fo;class ufe{constructor(t){vs.set(this,void 0),this.parameters={endpoint:t.endpoint},sfe(this,vs,new lfe.HttpApi(this.parameters.endpoint,{timeout:t.timeout,apiKey:t.apiKey,adapter:t.httpAdapter}),"f")}async getBalance(t){return(await this.getContractState(t)).balance}async runMethod(t,r,i=[]){let o=await Ul(this,vs,"f").callGetMethod(t,r,i);if(o.exit_code!==0)throw Error("Unable to execute get method. Got exit_code: "+o.exit_code);return{gas_used:o.gas_used,stack:FR(o.stack)}}async callGetMethod(t,r,i=[]){return this.runMethod(t,r,i)}async runMethodWithError(t,r,i=[]){let o=await Ul(this,vs,"f").callGetMethod(t,r,i);return{gas_used:o.gas_used,stack:FR(o.stack),exit_code:o.exit_code}}async callGetMethodWithError(t,r,i=[]){return this.runMethodWithError(t,r,i)}async getTransactions(t,r){let i=await Ul(this,vs,"f").getTransactions(t,r),o=[];for(let a of i)o.push((0,va.loadTransaction)(va.Cell.fromBoc(Buffer.from(a.data,"base64"))[0].beginParse()));return o}async getTransaction(t,r,i){let o=await Ul(this,vs,"f").getTransaction(t,r,i);return o?(0,va.loadTransaction)(va.Cell.fromBoc(Buffer.from(o.data,"base64"))[0].beginParse()):null}async getMasterchainInfo(){let t=await Ul(this,vs,"f").getMasterchainInfo();return{workchain:t.init.workchain,shard:t.last.shard,initSeqno:t.init.seqno,latestSeqno:t.last.seqno}}async getWorkchainShards(t){return(await Ul(this,vs,"f").getShards(t)).map(i=>({workchain:i.workchain,shard:i.shard,seqno:i.seqno}))}async getShardTransactions(t,r,i){let o=await Ul(this,vs,"f").getBlockTransactions(t,r,i);if(o.incomplete)throw Error("Unsupported");return o.transactions.map(a=>({account:va.Address.parseRaw(a.account),lt:a.lt,hash:a.hash}))}async sendMessage(t){const r=(0,va.beginCell)().store((0,va.storeMessage)(t)).endCell().toBoc();await Ul(this,vs,"f").sendBoc(r)}async sendFile(t){await Ul(this,vs,"f").sendBoc(t)}async estimateExternalMessageFee(t,r){return await Ul(this,vs,"f").estimateFee(t,{body:r.body,initCode:r.initCode,initData:r.initData,ignoreSignature:r.ignoreSignature})}async sendExternalMessage(t,r){if(await this.isContractDeployed(t.address)||!t.init){const i=(0,va.external)({to:t.address,body:r});await this.sendMessage(i)}else{const i=(0,va.external)({to:t.address,init:{code:t.init.code,data:t.init.data},body:r});await this.sendMessage(i)}}async isContractDeployed(t){return(await this.getContractState(t)).state==="active"}async getContractState(t){let r=await Ul(this,vs,"f").getAddressInformation(t),i=BigInt(r.balance),o=r.state;return{balance:i,state:o,code:r.code!==""?Buffer.from(r.code,"base64"):null,data:r.data!==""?Buffer.from(r.data,"base64"):null,lastTransaction:r.last_transaction_id.lt!=="0"?{lt:r.last_transaction_id.lt,hash:r.last_transaction_id.hash}:null,blockId:{workchain:r.block_id.workchain,shard:r.block_id.shard,seqno:r.block_id.seqno},timestampt:r.sync_utime}}open(t){return(0,va.openContract)(t,r=>zR(this,r.address,r.init))}provider(t,r){return zR(this,t,r)}}q2.TonClient=ufe;vs=new WeakMap;function FR(e){let t=[];for(let r of e)if(r[0]==="num"){let i=r[1];i.startsWith("-")?t.push({type:"int",value:-BigInt(i.slice(1))}):t.push({type:"int",value:BigInt(i)})}else if(r[0]==="null")t.push({type:"null"});else if(r[0]==="cell")t.push({type:"cell",cell:va.Cell.fromBoc(Buffer.from(r[1].bytes,"base64"))[0]});else if(r[0]==="slice")t.push({type:"slice",cell:va.Cell.fromBoc(Buffer.from(r[1].bytes,"base64"))[0]});else if(r[0]==="builder")t.push({type:"builder",cell:va.Cell.fromBoc(Buffer.from(r[1].bytes,"base64"))[0]});else throw Error("Unsupported stack item type: "+r[0]);return new va.TupleReader(t)}function zR(e,t,r){return{async getState(){let i=await e.getContractState(t),o=i.balance,a=i.lastTransaction?{lt:BigInt(i.lastTransaction.lt),hash:Buffer.from(i.lastTransaction.hash,"base64")}:null,s;if(i.state==="active")s={type:"active",code:i.code?i.code:null,data:i.data?i.data:null};else if(i.state==="uninitialized")s={type:"uninit"};else if(i.state==="frozen")s={type:"frozen",stateHash:Buffer.alloc(0)};else throw Error("Unsupported state");return{balance:o,last:a,state:s}},async get(i,o){return{stack:(await e.callGetMethod(t,i,o)).stack}},async external(i){let o=null;r&&!await e.isContractDeployed(t)&&(o=r);const a=(0,va.external)({to:t,init:o?{code:o.code,data:o.data}:null,body:i});let s=(0,va.beginCell)().store((0,va.storeMessage)(a)).endCell().toBoc();await e.sendFile(s)},async internal(i,o){let a=null;r&&!await e.isContractDeployed(t)&&(a=r);let s=!0;o.bounce!==null&&o.bounce!==void 0&&(s=o.bounce);let l;typeof o.value=="string"?l=(0,va.toNano)(o.value):l=o.value;let u=null;typeof o.body=="string"?u=(0,va.comment)(o.body):o.body&&(u=o.body),await i.send({to:t,value:l,bounce:s,sendMode:o.sendMode,init:a,body:u})}}}var K2={},G2={};Object.defineProperty(G2,"__esModule",{value:!0});G2.toUrlSafe=void 0;function cfe(e){for(;e.indexOf("/")>=0;)e=e.replace("/","_");for(;e.indexOf("+")>=0;)e=e.replace("+","-");for(;e.indexOf("=")>=0;)e=e.replace("=","");return e}G2.toUrlSafe=cfe;var S5=_n&&_n.__classPrivateFieldSet||function(e,t,r,i,o){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!o)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?o.call(e,r):o?o.value=r:t.set(e,r),r},uo=_n&&_n.__classPrivateFieldGet||function(e,t,r,i){if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?i:r==="a"?i.call(e):i?i.value:t.get(e)},dfe=_n&&_n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},$s,Fs,zs;Object.defineProperty(K2,"__esModule",{value:!0});K2.TonClient4=void 0;const su=dfe(J6.exports),ws=fo,HR=G2,Ir=ik;class ffe{constructor(t){$s.set(this,void 0),Fs.set(this,void 0),zs.set(this,void 0),S5(this,$s,t.endpoint,"f"),S5(this,Fs,t.timeout||5e3,"f"),S5(this,zs,t.httpAdapter,"f")}async getLastBlock(){let t=await su.default.get(uo(this,$s,"f")+"/block/latest",{adapter:uo(this,zs,"f"),timeout:uo(this,Fs,"f")}),r=pfe.safeParse(t.data);if(!r.success)throw Error("Mailformed response: "+r.error.format()._errors.join(", "));return r.data}async getBlock(t){let r=await su.default.get(uo(this,$s,"f")+"/block/"+t,{adapter:uo(this,zs,"f"),timeout:uo(this,Fs,"f")}),i=WR.safeParse(r.data);if(!i.success)throw Error("Mailformed response");if(!i.data.exist)throw Error("Block is out of scope");return i.data.block}async getBlockByUtime(t){let r=await su.default.get(uo(this,$s,"f")+"/block/utime/"+t,{adapter:uo(this,zs,"f"),timeout:uo(this,Fs,"f")}),i=WR.safeParse(r.data);if(!i.success)throw Error("Mailformed response");if(!i.data.exist)throw Error("Block is out of scope");return i.data.block}async getAccount(t,r){let i=await su.default.get(uo(this,$s,"f")+"/block/"+t+"/"+r.toString({urlSafe:!0}),{adapter:uo(this,zs,"f"),timeout:uo(this,Fs,"f")}),o=hfe.safeParse(i.data);if(!o.success)throw Error("Mailformed response");return o.data}async getAccountLite(t,r){let i=await su.default.get(uo(this,$s,"f")+"/block/"+t+"/"+r.toString({urlSafe:!0})+"/lite",{adapter:uo(this,zs,"f"),timeout:uo(this,Fs,"f")}),o=gfe.safeParse(i.data);if(!o.success)throw Error("Mailformed response");return o.data}async isContractDeployed(t,r){return(await this.getAccountLite(t,r)).account.state.type==="active"}async isAccountChanged(t,r,i){let o=await su.default.get(uo(this,$s,"f")+"/block/"+t+"/"+r.toString({urlSafe:!0})+"/changed/"+i.toString(10),{adapter:uo(this,zs,"f"),timeout:uo(this,Fs,"f")}),a=mfe.safeParse(o.data);if(!a.success)throw Error("Mailformed response");return a.data}async getAccountTransactions(t,r,i){let o=await su.default.get(uo(this,$s,"f")+"/account/"+t.toString({urlSafe:!0})+"/tx/"+r.toString(10)+"/"+(0,HR.toUrlSafe)(i.toString("base64")),{adapter:uo(this,zs,"f"),timeout:uo(this,Fs,"f")}),a=wfe.safeParse(o.data);if(!a.success)throw Error("Mailformed response");let s=a.data,l=[],u=ws.Cell.fromBoc(Buffer.from(s.boc,"base64"));for(let c=0;c0&&(i="/"+[...r].sort().join(","));let o=await su.default.get(uo(this,$s,"f")+"/block/"+t+"/config"+i,{adapter:uo(this,zs,"f"),timeout:uo(this,Fs,"f")}),a=vfe.safeParse(o.data);if(!a.success)throw Error("Mailformed response");return a.data}async runMethod(t,r,i,o){let a=o&&o.length>0?"/"+(0,HR.toUrlSafe)((0,ws.serializeTuple)(o).toBoc({idx:!1,crc32:!1}).toString("base64")):"",s=uo(this,$s,"f")+"/block/"+t+"/"+r.toString({urlSafe:!0})+"/run/"+i+a,l=await su.default.get(s,{adapter:uo(this,zs,"f"),timeout:uo(this,Fs,"f")}),u=yfe.safeParse(l.data);if(!u.success)throw Error("Mailformed response");let c=u.data.resultRaw?(0,ws.parseTuple)(ws.Cell.fromBoc(Buffer.from(u.data.resultRaw,"base64"))[0]):[];return{exitCode:u.data.exitCode,result:c,resultRaw:u.data.resultRaw,block:u.data.block,shardBlock:u.data.shardBlock,reader:new ws.TupleReader(c)}}async sendMessage(t){let r=await su.default.post(uo(this,$s,"f")+"/send",{boc:t.toString("base64")},{adapter:uo(this,zs,"f"),timeout:uo(this,Fs,"f")});if(!bfe.safeParse(r.data).success)throw Error("Mailformed response");return{status:r.data.status}}open(t){return(0,ws.openContract)(t,r=>Rv(this,null,r.address,r.init))}openAt(t,r){return(0,ws.openContract)(r,i=>Rv(this,t,i.address,i.init))}provider(t,r){return Rv(this,null,t,r||null)}providerAt(t,r,i){return Rv(this,t,r,i||null)}}K2.TonClient4=ffe;$s=new WeakMap,Fs=new WeakMap,zs=new WeakMap;function Rv(e,t,r,i){return{async getState(){let o=t;o===null&&(o=(await e.getLastBlock()).last.seqno);let a=await e.getAccount(o,r),s=a.account.last?{lt:BigInt(a.account.last.lt),hash:Buffer.from(a.account.last.hash,"base64")}:null,l;if(a.account.state.type==="active")l={type:"active",code:a.account.state.code?Buffer.from(a.account.state.code,"base64"):null,data:a.account.state.data?Buffer.from(a.account.state.data,"base64"):null};else if(a.account.state.type==="uninit")l={type:"uninit"};else if(a.account.state.type==="frozen")l={type:"frozen",stateHash:Buffer.from(a.account.state.stateHash,"base64")};else throw Error("Unsupported state");return{balance:BigInt(a.account.balance.coins),last:s,state:l}},async get(o,a){let s=t;s===null&&(s=(await e.getLastBlock()).last.seqno);let l=await e.runMethod(s,r,o,a);if(l.exitCode!==0&&l.exitCode!==1)throw Error("Exit code: "+l.exitCode);return{stack:new ws.TupleReader(l.result)}},async external(o){let a=await e.getLastBlock(),s=null;i&&(await e.getAccountLite(a.last.seqno,r)).account.state.type!=="active"&&(s=i);const l=(0,ws.external)({to:r,init:s?{code:s.code,data:s.data}:null,body:o});let u=(0,ws.beginCell)().store((0,ws.storeMessage)(l)).endCell().toBoc();await e.sendMessage(u)},async internal(o,a){let s=await e.getLastBlock(),l=null;i&&(await e.getAccountLite(s.last.seqno,r)).account.state.type!=="active"&&(l=i);let u=!0;a.bounce!==null&&a.bounce!==void 0&&(u=a.bounce);let c;typeof a.value=="string"?c=(0,ws.toNano)(a.value):c=a.value;let d=null;typeof a.body=="string"?d=(0,ws.comment)(a.body):a.body&&(d=a.body),await o.send({to:r,value:c,bounce:u,sendMode:a.sendMode,init:l,body:d})}}}const pfe=Ir.z.object({last:Ir.z.object({seqno:Ir.z.number(),shard:Ir.z.string(),workchain:Ir.z.number(),fileHash:Ir.z.string(),rootHash:Ir.z.string()}),init:Ir.z.object({fileHash:Ir.z.string(),rootHash:Ir.z.string()}),stateRootHash:Ir.z.string(),now:Ir.z.number()}),WR=Ir.z.union([Ir.z.object({exist:Ir.z.literal(!1)}),Ir.z.object({exist:Ir.z.literal(!0),block:Ir.z.object({shards:Ir.z.array(Ir.z.object({workchain:Ir.z.number(),seqno:Ir.z.number(),shard:Ir.z.string(),rootHash:Ir.z.string(),fileHash:Ir.z.string(),transactions:Ir.z.array(Ir.z.object({account:Ir.z.string(),hash:Ir.z.string(),lt:Ir.z.string()}))}))})})]),wL=Ir.z.object({lastPaid:Ir.z.number(),duePayment:Ir.z.union([Ir.z.null(),Ir.z.string()]),used:Ir.z.object({bits:Ir.z.number(),cells:Ir.z.number(),publicCells:Ir.z.number()})}),hfe=Ir.z.object({account:Ir.z.object({state:Ir.z.union([Ir.z.object({type:Ir.z.literal("uninit")}),Ir.z.object({type:Ir.z.literal("active"),code:Ir.z.union([Ir.z.string(),Ir.z.null()]),data:Ir.z.union([Ir.z.string(),Ir.z.null()])}),Ir.z.object({type:Ir.z.literal("frozen"),stateHash:Ir.z.string()})]),balance:Ir.z.object({coins:Ir.z.string()}),last:Ir.z.union([Ir.z.null(),Ir.z.object({lt:Ir.z.string(),hash:Ir.z.string()})]),storageStat:Ir.z.union([Ir.z.null(),wL])}),block:Ir.z.object({workchain:Ir.z.number(),seqno:Ir.z.number(),shard:Ir.z.string(),rootHash:Ir.z.string(),fileHash:Ir.z.string()})}),gfe=Ir.z.object({account:Ir.z.object({state:Ir.z.union([Ir.z.object({type:Ir.z.literal("uninit")}),Ir.z.object({type:Ir.z.literal("active"),codeHash:Ir.z.string(),dataHash:Ir.z.string()}),Ir.z.object({type:Ir.z.literal("frozen"),stateHash:Ir.z.string()})]),balance:Ir.z.object({coins:Ir.z.string()}),last:Ir.z.union([Ir.z.null(),Ir.z.object({lt:Ir.z.string(),hash:Ir.z.string()})]),storageStat:Ir.z.union([Ir.z.null(),wL])})}),mfe=Ir.z.object({changed:Ir.z.boolean(),block:Ir.z.object({workchain:Ir.z.number(),seqno:Ir.z.number(),shard:Ir.z.string(),rootHash:Ir.z.string(),fileHash:Ir.z.string()})}),yfe=Ir.z.object({exitCode:Ir.z.number(),resultRaw:Ir.z.union([Ir.z.string(),Ir.z.null()]),block:Ir.z.object({workchain:Ir.z.number(),seqno:Ir.z.number(),shard:Ir.z.string(),rootHash:Ir.z.string(),fileHash:Ir.z.string()}),shardBlock:Ir.z.object({workchain:Ir.z.number(),seqno:Ir.z.number(),shard:Ir.z.string(),rootHash:Ir.z.string(),fileHash:Ir.z.string()})}),vfe=Ir.z.object({config:Ir.z.object({cell:Ir.z.string(),address:Ir.z.string(),globalBalance:Ir.z.object({coins:Ir.z.string()})})}),bfe=Ir.z.object({status:Ir.z.number()}),wfe=Ir.z.object({blocks:Ir.z.array(Ir.z.object({workchain:Ir.z.number(),seqno:Ir.z.number(),shard:Ir.z.string(),rootHash:Ir.z.string(),fileHash:Ir.z.string()})),boc:Ir.z.string()});var Y2={},Fa={};Object.defineProperty(Fa,"__esModule",{value:!0});Fa.createWalletTransferV4=Fa.createWalletTransferV3=Fa.createWalletTransferV2=Fa.createWalletTransferV1=void 0;const ns=fo,Q2=xg();function xfe(e){let t=(0,ns.beginCell)().storeUint(e.seqno,32);e.message&&(t.storeUint(e.sendMode,8),t.storeRef((0,ns.beginCell)().store((0,ns.storeMessageRelaxed)(e.message))));let r=(0,Q2.sign)(t.endCell().hash(),e.secretKey);return(0,ns.beginCell)().storeBuffer(r).storeBuilder(t).endCell()}Fa.createWalletTransferV1=xfe;function _fe(e){if(e.messages.length>4)throw Error("Maximum number of messages in a single transfer is 4");let t=(0,ns.beginCell)().storeUint(e.seqno,32);if(e.seqno===0)for(let o=0;o<32;o++)t.storeBit(1);else t.storeUint(e.timeout||Math.floor(Date.now()/1e3)+60,32);for(let o of e.messages)t.storeUint(e.sendMode,8),t.storeRef((0,ns.beginCell)().store((0,ns.storeMessageRelaxed)(o)));let r=(0,Q2.sign)(t.endCell().hash(),e.secretKey);return(0,ns.beginCell)().storeBuffer(r).storeBuilder(t).endCell()}Fa.createWalletTransferV2=_fe;function Sfe(e){if(e.messages.length>4)throw Error("Maximum number of messages in a single transfer is 4");let t=(0,ns.beginCell)().storeUint(e.walletId,32);if(e.seqno===0)for(let o=0;o<32;o++)t.storeBit(1);else t.storeUint(e.timeout||Math.floor(Date.now()/1e3)+60,32);t.storeUint(e.seqno,32);for(let o of e.messages)t.storeUint(e.sendMode,8),t.storeRef((0,ns.beginCell)().store((0,ns.storeMessageRelaxed)(o)));let r=(0,Q2.sign)(t.endCell().hash(),e.secretKey);return(0,ns.beginCell)().storeBuffer(r).storeBuilder(t).endCell()}Fa.createWalletTransferV3=Sfe;function Cfe(e){if(e.messages.length>4)throw Error("Maximum number of messages in a single transfer is 4");let t=(0,ns.beginCell)().storeUint(e.walletId,32);if(e.seqno===0)for(let o=0;o<32;o++)t.storeBit(1);else t.storeUint(e.timeout||Math.floor(Date.now()/1e3)+60,32);t.storeUint(e.seqno,32),t.storeUint(0,8);for(let o of e.messages)t.storeUint(e.sendMode,8),t.storeRef((0,ns.beginCell)().store((0,ns.storeMessageRelaxed)(o)));let r=(0,Q2.sign)(t.endCell().hash(),e.secretKey);return(0,ns.beginCell)().storeBuffer(r).storeBuilder(t).endCell()}Fa.createWalletTransferV4=Cfe;Object.defineProperty(Y2,"__esModule",{value:!0});Y2.WalletContractV1R1=void 0;const Lp=fo,kfe=Fa;class ak{constructor(t,r){this.workchain=t,this.publicKey=r;let i=Lp.Cell.fromBoc(Buffer.from("te6cckEBAQEARAAAhP8AIN2k8mCBAgDXGCDXCx/tRNDTH9P/0VESuvKhIvkBVBBE+RDyovgAAdMfMSDXSpbTB9QC+wDe0aTIyx/L/8ntVEH98Ik=","base64"))[0],o=(0,Lp.beginCell)().storeUint(0,32).storeBuffer(r).endCell();this.init={code:i,data:o},this.address=(0,Lp.contractAddress)(t,{code:i,data:o})}static create(t){return new ak(t.workchain,t.publicKey)}async getBalance(t){return(await t.getState()).balance}async getSeqno(t){let r=await t.getState();return r.state.type==="active"?Lp.Cell.fromBoc(r.state.data)[0].beginParse().loadUint(32):0}async send(t,r){await t.external(r)}async sendTransfer(t,r){let i=this.createTransfer(r);await this.send(t,i)}createTransfer(t){let r=Lp.SendMode.PAY_GAS_SEPARATELY;return t.sendMode!==null&&t.sendMode!==void 0&&(r=t.sendMode),(0,kfe.createWalletTransferV1)({seqno:t.seqno,sendMode:r,secretKey:t.secretKey,message:t.message})}sender(t,r){return{send:async i=>{let o=await this.getSeqno(t),a=this.createTransfer({seqno:o,secretKey:r,sendMode:i.sendMode,message:(0,Lp.internal)({to:i.to,value:i.value,init:i.init,body:i.body,bounce:i.bounce})});await this.send(t,a)}}}}Y2.WalletContractV1R1=ak;var Z2={};Object.defineProperty(Z2,"__esModule",{value:!0});Z2.WalletContractV1R2=void 0;const dm=fo,Efe=Fa;class sk{constructor(t,r){this.workchain=t,this.publicKey=r;let i=dm.Cell.fromBoc(Buffer.from("te6cckEBAQEAUwAAov8AIN0gggFMl7qXMO1E0NcLH+Ck8mCBAgDXGCDXCx/tRNDTH9P/0VESuvKhIvkBVBBE+RDyovgAAdMfMSDXSpbTB9QC+wDe0aTIyx/L/8ntVNDieG8=","base64"))[0],o=(0,dm.beginCell)().storeUint(0,32).storeBuffer(r).endCell();this.init={code:i,data:o},this.address=(0,dm.contractAddress)(t,{code:i,data:o})}static create(t){return new sk(t.workchain,t.publicKey)}async getBalance(t){return(await t.getState()).balance}async getSeqno(t){return(await t.getState()).state.type==="active"?(await t.get("seqno",[])).stack.readNumber():0}async send(t,r){await t.external(r)}async sendTransfer(t,r){let i=this.createTransfer(r);await this.send(t,i)}createTransfer(t){let r=dm.SendMode.PAY_GAS_SEPARATELY;return t.sendMode!==null&&t.sendMode!==void 0&&(r=t.sendMode),(0,Efe.createWalletTransferV1)({seqno:t.seqno,sendMode:r,secretKey:t.secretKey,message:t.message})}sender(t,r){return{send:async i=>{let o=await this.getSeqno(t),a=this.createTransfer({seqno:o,secretKey:r,sendMode:i.sendMode,message:(0,dm.internal)({to:i.to,value:i.value,init:i.init,body:i.body,bounce:i.bounce})});await this.send(t,a)}}}}Z2.WalletContractV1R2=sk;var X2={};Object.defineProperty(X2,"__esModule",{value:!0});X2.WalletContractV1R3=void 0;const fm=fo,Afe=Fa;class lk{constructor(t,r){this.workchain=t,this.publicKey=r;let i=fm.Cell.fromBoc(Buffer.from("te6cckEBAQEAXwAAuv8AIN0gggFMl7ohggEznLqxnHGw7UTQ0x/XC//jBOCk8mCBAgDXGCDXCx/tRNDTH9P/0VESuvKhIvkBVBBE+RDyovgAAdMfMSDXSpbTB9QC+wDe0aTIyx/L/8ntVLW4bkI=","base64"))[0],o=(0,fm.beginCell)().storeUint(0,32).storeBuffer(r).endCell();this.init={code:i,data:o},this.address=(0,fm.contractAddress)(t,{code:i,data:o})}static create(t){return new lk(t.workchain,t.publicKey)}async getBalance(t){return(await t.getState()).balance}async getSeqno(t){return(await t.getState()).state.type==="active"?(await t.get("seqno",[])).stack.readNumber():0}async send(t,r){await t.external(r)}async sendTransfer(t,r){let i=this.createTransfer(r);await this.send(t,i)}createTransfer(t){let r=fm.SendMode.PAY_GAS_SEPARATELY;return t.sendMode!==null&&t.sendMode!==void 0&&(r=t.sendMode),(0,Afe.createWalletTransferV1)({seqno:t.seqno,sendMode:r,secretKey:t.secretKey,message:t.message})}sender(t,r){return{send:async i=>{let o=await this.getSeqno(t),a=this.createTransfer({seqno:o,secretKey:r,sendMode:i.sendMode,message:(0,fm.internal)({to:i.to,value:i.value,init:i.init,body:i.body,bounce:i.bounce})});await this.send(t,a)}}}}X2.WalletContractV1R3=lk;var J2={};Object.defineProperty(J2,"__esModule",{value:!0});J2.WalletContractV2R1=void 0;const pm=fo,Tfe=Fa;class uk{constructor(t,r){this.workchain=t,this.publicKey=r;let i=pm.Cell.fromBoc(Buffer.from("te6cckEBAQEAVwAAqv8AIN0gggFMl7qXMO1E0NcLH+Ck8mCDCNcYINMf0x8B+CO78mPtRNDTH9P/0VExuvKhA/kBVBBC+RDyovgAApMg10qW0wfUAvsA6NGkyMsfy//J7VShNwu2","base64"))[0],o=(0,pm.beginCell)().storeUint(0,32).storeBuffer(r).endCell();this.init={code:i,data:o},this.address=(0,pm.contractAddress)(t,{code:i,data:o})}static create(t){return new uk(t.workchain,t.publicKey)}async getBalance(t){return(await t.getState()).balance}async getSeqno(t){return(await t.getState()).state.type==="active"?(await t.get("seqno",[])).stack.readNumber():0}async send(t,r){await t.external(r)}async sendTransfer(t,r){let i=this.createTransfer(r);await this.send(t,i)}createTransfer(t){let r=pm.SendMode.PAY_GAS_SEPARATELY;return t.sendMode!==null&&t.sendMode!==void 0&&(r=t.sendMode),(0,Tfe.createWalletTransferV2)({seqno:t.seqno,sendMode:r,secretKey:t.secretKey,messages:t.messages,timeout:t.timeout})}sender(t,r){return{send:async i=>{let o=await this.getSeqno(t),a=this.createTransfer({seqno:o,secretKey:r,sendMode:i.sendMode,messages:[(0,pm.internal)({to:i.to,value:i.value,init:i.init,body:i.body,bounce:i.bounce})]});await this.send(t,a)}}}}J2.WalletContractV2R1=uk;var ex={};Object.defineProperty(ex,"__esModule",{value:!0});ex.WalletContractV2R2=void 0;const hm=fo,Ife=Fa;class ck{constructor(t,r){this.workchain=t,this.publicKey=r;let i=hm.Cell.fromBoc(Buffer.from("te6cckEBAQEAYwAAwv8AIN0gggFMl7ohggEznLqxnHGw7UTQ0x/XC//jBOCk8mCDCNcYINMf0x8B+CO78mPtRNDTH9P/0VExuvKhA/kBVBBC+RDyovgAApMg10qW0wfUAvsA6NGkyMsfy//J7VQETNeh","base64"))[0],o=(0,hm.beginCell)().storeUint(0,32).storeBuffer(r).endCell();this.init={code:i,data:o},this.address=(0,hm.contractAddress)(t,{code:i,data:o})}static create(t){return new ck(t.workchain,t.publicKey)}async getBalance(t){return(await t.getState()).balance}async getSeqno(t){return(await t.getState()).state.type==="active"?(await t.get("seqno",[])).stack.readNumber():0}async send(t,r){await t.external(r)}async sendTransfer(t,r){let i=this.createTransfer(r);await this.send(t,i)}createTransfer(t){let r=hm.SendMode.PAY_GAS_SEPARATELY;return t.sendMode!==null&&t.sendMode!==void 0&&(r=t.sendMode),(0,Ife.createWalletTransferV2)({seqno:t.seqno,sendMode:r,secretKey:t.secretKey,messages:t.messages,timeout:t.timeout})}sender(t,r){return{send:async i=>{let o=await this.getSeqno(t),a=this.createTransfer({seqno:o,secretKey:r,sendMode:i.sendMode,messages:[(0,hm.internal)({to:i.to,value:i.value,init:i.init,body:i.body,bounce:i.bounce})]});await this.send(t,a)}}}}ex.WalletContractV2R2=ck;var tx={};Object.defineProperty(tx,"__esModule",{value:!0});tx.WalletContractV3R1=void 0;const gm=fo,Rfe=Fa;class dk{constructor(t,r,i){this.workchain=t,this.publicKey=r,i!=null?this.walletId=i:this.walletId=698983191+t;let o=gm.Cell.fromBoc(Buffer.from("te6cckEBAQEAYgAAwP8AIN0gggFMl7qXMO1E0NcLH+Ck8mCDCNcYINMf0x/TH/gjE7vyY+1E0NMf0x/T/9FRMrryoVFEuvKiBPkBVBBV+RDyo/gAkyDXSpbTB9QC+wDo0QGkyMsfyx/L/8ntVD++buA=","base64"))[0],a=(0,gm.beginCell)().storeUint(0,32).storeUint(this.walletId,32).storeBuffer(r).endCell();this.init={code:o,data:a},this.address=(0,gm.contractAddress)(t,{code:o,data:a})}static create(t){return new dk(t.workchain,t.publicKey,t.walletId)}async getBalance(t){return(await t.getState()).balance}async getSeqno(t){return(await t.getState()).state.type==="active"?(await t.get("seqno",[])).stack.readNumber():0}async send(t,r){await t.external(r)}async sendTransfer(t,r){let i=this.createTransfer(r);await this.send(t,i)}createTransfer(t){let r=gm.SendMode.PAY_GAS_SEPARATELY;return t.sendMode!==null&&t.sendMode!==void 0&&(r=t.sendMode),(0,Rfe.createWalletTransferV3)({seqno:t.seqno,sendMode:r,secretKey:t.secretKey,messages:t.messages,timeout:t.timeout,walletId:this.walletId})}sender(t,r){return{send:async i=>{let o=await this.getSeqno(t),a=this.createTransfer({seqno:o,secretKey:r,sendMode:i.sendMode,messages:[(0,gm.internal)({to:i.to,value:i.value,init:i.init,body:i.body,bounce:i.bounce})]});await this.send(t,a)}}}}tx.WalletContractV3R1=dk;var rx={};Object.defineProperty(rx,"__esModule",{value:!0});rx.WalletContractV3R2=void 0;const mm=fo,Pfe=Fa;class fk{constructor(t,r,i){this.workchain=t,this.publicKey=r,i!=null?this.walletId=i:this.walletId=698983191+t;let o=mm.Cell.fromBoc(Buffer.from("te6cckEBAQEAcQAA3v8AIN0gggFMl7ohggEznLqxn3Gw7UTQ0x/THzHXC//jBOCk8mCDCNcYINMf0x/TH/gjE7vyY+1E0NMf0x/T/9FRMrryoVFEuvKiBPkBVBBV+RDyo/gAkyDXSpbTB9QC+wDo0QGkyMsfyx/L/8ntVBC9ba0=","base64"))[0],a=(0,mm.beginCell)().storeUint(0,32).storeUint(this.walletId,32).storeBuffer(r).endCell();this.init={code:o,data:a},this.address=(0,mm.contractAddress)(t,{code:o,data:a})}static create(t){return new fk(t.workchain,t.publicKey,t.walletId)}async getBalance(t){return(await t.getState()).balance}async getSeqno(t){return(await t.getState()).state.type==="active"?(await t.get("seqno",[])).stack.readNumber():0}async send(t,r){await t.external(r)}async sendTransfer(t,r){let i=this.createTransfer(r);await this.send(t,i)}createTransfer(t){let r=mm.SendMode.PAY_GAS_SEPARATELY;return t.sendMode!==null&&t.sendMode!==void 0&&(r=t.sendMode),(0,Pfe.createWalletTransferV3)({seqno:t.seqno,sendMode:r,secretKey:t.secretKey,messages:t.messages,timeout:t.timeout,walletId:this.walletId})}sender(t,r){return{send:async i=>{let o=await this.getSeqno(t),a=this.createTransfer({seqno:o,secretKey:r,sendMode:i.sendMode,messages:[(0,mm.internal)({to:i.to,value:i.value,init:i.init,body:i.body,bounce:i.bounce})]});await this.send(t,a)}}}}rx.WalletContractV3R2=fk;var nx={};Object.defineProperty(nx,"__esModule",{value:!0});nx.WalletContractV4=void 0;const ym=fo,Mfe=Fa;class pk{constructor(t,r,i){this.workchain=t,this.publicKey=r,i!=null?this.walletId=i:this.walletId=698983191+t;let o=ym.Cell.fromBoc(Buffer.from("te6ccgECFAEAAtQAART/APSkE/S88sgLAQIBIAIDAgFIBAUE+PKDCNcYINMf0x/THwL4I7vyZO1E0NMf0x/T//QE0VFDuvKhUVG68qIF+QFUEGT5EPKj+AAkpMjLH1JAyx9SMMv/UhD0AMntVPgPAdMHIcAAn2xRkyDXSpbTB9QC+wDoMOAhwAHjACHAAuMAAcADkTDjDQOkyMsfEssfy/8QERITAubQAdDTAyFxsJJfBOAi10nBIJJfBOAC0x8hghBwbHVnvSKCEGRzdHK9sJJfBeAD+kAwIPpEAcjKB8v/ydDtRNCBAUDXIfQEMFyBAQj0Cm+hMbOSXwfgBdM/yCWCEHBsdWe6kjgw4w0DghBkc3RyupJfBuMNBgcCASAICQB4AfoA9AQw+CdvIjBQCqEhvvLgUIIQcGx1Z4MesXCAGFAEywUmzxZY+gIZ9ADLaRfLH1Jgyz8gyYBA+wAGAIpQBIEBCPRZMO1E0IEBQNcgyAHPFvQAye1UAXKwjiOCEGRzdHKDHrFwgBhQBcsFUAPPFiP6AhPLassfyz/JgED7AJJfA+ICASAKCwBZvSQrb2omhAgKBrkPoCGEcNQICEekk30pkQzmkD6f+YN4EoAbeBAUiYcVnzGEAgFYDA0AEbjJftRNDXCx+AA9sp37UTQgQFA1yH0BDACyMoHy//J0AGBAQj0Cm+hMYAIBIA4PABmtznaiaEAga5Drhf/AABmvHfaiaEAQa5DrhY/AAG7SB/oA1NQi+QAFyMoHFcv/ydB3dIAYyMsFywIizxZQBfoCFMtrEszMyXP7AMhAFIEBCPRR8qcCAHCBAQjXGPoA0z/IVCBHgQEI9FHyp4IQbm90ZXB0gBjIywXLAlAGzxZQBPoCFMtqEssfyz/Jc/sAAgBsgQEI1xj6ANM/MFIkgQEI9Fnyp4IQZHN0cnB0gBjIywXLAlAFzxZQA/oCE8tqyx8Syz/Jc/sAAAr0AMntVA==","base64"))[0],a=(0,ym.beginCell)().storeUint(0,32).storeUint(this.walletId,32).storeBuffer(this.publicKey).storeBit(0).endCell();this.init={code:o,data:a},this.address=(0,ym.contractAddress)(t,{code:o,data:a})}static create(t){return new pk(t.workchain,t.publicKey,t.walletId)}async getBalance(t){return(await t.getState()).balance}async getSeqno(t){return(await t.getState()).state.type==="active"?(await t.get("seqno",[])).stack.readNumber():0}async send(t,r){await t.external(r)}async sendTransfer(t,r){let i=this.createTransfer(r);await this.send(t,i)}createTransfer(t){let r=ym.SendMode.PAY_GAS_SEPARATELY;return t.sendMode!==null&&t.sendMode!==void 0&&(r=t.sendMode),(0,Mfe.createWalletTransferV4)({seqno:t.seqno,sendMode:r,secretKey:t.secretKey,messages:t.messages,timeout:t.timeout,walletId:this.walletId})}sender(t,r){return{send:async i=>{let o=await this.getSeqno(t),a=this.createTransfer({seqno:o,secretKey:r,sendMode:i.sendMode,messages:[(0,ym.internal)({to:i.to,value:i.value,init:i.init,body:i.body,bounce:i.bounce})]});await this.send(t,a)}}}}nx.WalletContractV4=pk;var ix={};Object.defineProperty(ix,"__esModule",{value:!0});ix.JettonMaster=void 0;const Ofe=fo;class hk{constructor(t){this.address=t}static create(t){return new hk(t)}async getWalletAddress(t,r){return(await t.get("get_wallet_address",[{type:"slice",cell:(0,Ofe.beginCell)().storeAddress(r).endCell()}])).stack.readAddress()}async getJettonData(t){let r=await t.get("get_jetton_data",[]),i=r.stack.readBigNumber(),o=r.stack.readBoolean(),a=r.stack.readAddress(),s=r.stack.readCell(),l=r.stack.readCell();return{totalSupply:i,mintable:o,adminAddress:a,content:s,walletCode:l}}}ix.JettonMaster=hk;var ox={};Object.defineProperty(ox,"__esModule",{value:!0});ox.JettonWallet=void 0;class gk{constructor(t){this.address=t}static create(t){return new gk(t)}async getBalance(t){return(await t.getState()).state.type!=="active"?0n:(await t.get("get_wallet_data",[])).stack.readBigNumber()}}ox.JettonWallet=gk;var Iy={};Object.defineProperty(Iy,"__esModule",{value:!0});Iy.MultisigOrder=void 0;const VR=xg(),Pv=fo;class lb{constructor(t){this.signatures={},this.payload=t}static fromCell(t){let r=t.beginParse(),i=r.loadMaybeRef()?.beginParse();const o=r.asCell();let a=new lb(o);if(i){for(;i.remainingBits>0;){const s=i.loadBuffer(64),l=i.loadUint(8);a.signatures[l]=s,i.remainingRefs>0?i=i.loadRef().asSlice():i.skip(1)}i.endParse()}return a}static fromPayload(t){return new lb(t)}addSignature(t,r,i){const o=this.payload.hash();if(!(0,VR.signVerify)(o,r,i.owners.get(t).slice(0,-1)))throw Error("invalid signature");this.signatures[t]=r}sign(t,r){const i=this.payload.hash();return this.signatures[t]=(0,VR.sign)(i,r),i}unionSignatures(t){this.signatures=Object.assign({},this.signatures,t.signatures)}clearSignatures(){this.signatures={}}toCell(t){let r=(0,Pv.beginCell)().storeBit(0);for(const i in this.signatures){const o=this.signatures[i];r=(0,Pv.beginCell)().storeBit(1).storeRef((0,Pv.beginCell)().storeBuffer(o).storeUint(parseInt(i),8).storeBuilder(r).endCell())}return(0,Pv.beginCell)().storeUint(t,8).storeBuilder(r).storeBuilder(this.payload.asBuilder()).endCell()}}Iy.MultisigOrder=lb;var ax={};Object.defineProperty(ax,"__esModule",{value:!0});ax.MultisigOrderBuilder=void 0;const vm=fo,Bfe=Iy;class Ufe{constructor(t,r){this.messages=(0,vm.beginCell)(),this.queryId=0n,this.walletId=t,this.queryOffset=r||7200}addMessage(t,r){if(this.messages.refs>=4)throw Error("only 4 refs are allowed");this.updateQueryId(),this.messages.storeUint(r,8),this.messages.storeRef((0,vm.beginCell)().store((0,vm.storeMessageRelaxed)(t)).endCell())}clearMessages(){this.messages=(0,vm.beginCell)()}build(){return Bfe.MultisigOrder.fromPayload((0,vm.beginCell)().storeUint(this.walletId,32).storeUint(this.queryId,64).storeBuilder(this.messages).endCell())}updateQueryId(){const t=BigInt(Math.floor(Date.now()/1e3+this.queryOffset));this.queryId=t<<32n}}ax.MultisigOrderBuilder=Ufe;var sx={};Object.defineProperty(sx,"__esModule",{value:!0});sx.MultisigWallet=void 0;const qR=xg(),sl=fo,Dfe=sl.Cell.fromBase64("te6ccgECKwEABBgAART/APSkE/S88sgLAQIBIAIDAgFIBAUE2vIgxwCOgzDbPOCDCNcYIPkBAdMH2zwiwAAToVNxePQOb6Hyn9s8VBq6+RDyoAb0BCD5AQHTH1EYuvKq0z9wUwHwCgHCCAGDCryx8mhTFYBA9A5voSCYDqQgwgryZw7f+COqH1NAufJhVCOjU04gIyEiAgLMBgcCASAMDQIBIAgJAgFmCgsAA9GEAiPymAvHoHN9CYbZ5S7Z4BPHohwhJQAtAKkItdJEqCTItdKlwLUAdAT8ArobBKAATwhbpEx4CBukTDgAdAg10rDAJrUAvALyFjPFszJ4HHXI8gBzxb0AMmACASAODwIBIBQVARW77ZbVA0cFUg2zyCoCAUgQEQIBIBITAXOxHXQgwjXGCD5AQHTB4IB1MTtQ9hTIHj0Dm+h8p/XC/9eMfkQ8qCuAfQEIW6TW3Ey4PkBWNs8AaQBgJwA9rtqA6ADoAPoCAXoCEfyAgPyA3XlP+AXkegAA54tkwAAXrhlXP8EA1WZ2oexAAgEgFhcCASAYGQFRtyVbZ4YmRmpGEAgegc30McJNhFpAADMaYeYuAFrgJhwLb+4cC3d0bhAjAYm1WZtnhqvgb+2xxsoicAgej430pBHEoFpAADHDhBACGuQkuuBk9kUWE5kAOeLKhACQCB6IYFImHFImHFImXEA2YlzNijAjAgEgGhsAF7UGtc4QQDVZnah7EAIBIBwdAgOZOB4fARGsGm2eL4G2CUAjABWt+UEAzJV2oewYQAENqTbPBVfBYCMAFa3f3CCAarM7UPYgAiDbPALyZfgAUENxQxPbPO1UIyoACtP/0wcwBKDbPC+uUyCw8mISsQKkJbNTHLmwJYEA4aojoCi8sPJpggGGoPgBBZcCERACPj4wjo0REB/bPEDXePRDEL0F4lQWW1Rz51YQU9zbPFRxClR6vCQlKCYAIO1E0NMf0wfTB9M/9AT0BNEAXgGOGjDSAAHyo9MH0wdQA9cBIPkBBfkBFbrypFAD4GwhIddKqgIi10m68qtwVCATAAwByMv/ywcE1ts87VT4D3AlblOJvrGYEG4QLVDHXwePGzBUJANQTds8UFWgRlAQSRA6SwlTuds8UFQWf+L4AAeDJaGOLCaAQPSWb6UglDBTA7neII4WODk5CNIAAZfTBzAW8AcFkTDifwgHBZJsMeKz5jAGKicoKQBgcI4pA9CDCNcY0wf0BDBTFnj0Dm+h8qXXC/9URUT5EPKmrlIgsVIDvRShI27mbCIyAH5SML6OIF8D+ACTItdKmALTB9QC+wAC6DJwyMoAQBSAQPRDAvAHjhdxyMsAFMsHEssHWM8BWM8WQBOAQPRDAeIBII6KEEUQNEMA2zztVJJfBuIqABzIyx/LB8sHyz/0APQAyQ==");class mk{constructor(t,r,i,o,a){this.provider=null,this.owners=sl.Dictionary.empty(),this.workchain=r,this.walletId=i,this.k=o;for(let s=0;s{t&&i&&o!==t&&e(`/${o}`,{replace:!0})},[t]),{contractAddress:o,contractAddressHex:a,isAddressEmpty:!t}}function xL(e){let t=!0;try{Vn.Address.parse(e??"")}catch{t=!1}return t}function KR(e,t){for(var r=0;r=0)&&(r[o]=e[o]);return r}function GR(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var _L=Gn.createContext(),jfe={mui:{root:{},anchorOriginTopCenter:{},anchorOriginBottomCenter:{},anchorOriginTopRight:{},anchorOriginBottomRight:{},anchorOriginTopLeft:{},anchorOriginBottomLeft:{}},container:{containerRoot:{},containerAnchorOriginTopCenter:{},containerAnchorOriginBottomCenter:{},containerAnchorOriginTopRight:{},containerAnchorOriginBottomRight:{},containerAnchorOriginTopLeft:{},containerAnchorOriginBottomLeft:{}}},Yu={view:{default:20,dense:4},snackbar:{default:6,dense:2}},bf={maxSnack:3,dense:!1,hideIconVariant:!1,variant:"default",autoHideDuration:5e3,anchorOrigin:{vertical:"bottom",horizontal:"left"},TransitionComponent:w7,transitionDuration:{enter:225,exit:195}},n0=function(t){return t.charAt(0).toUpperCase()+t.slice(1)},$fe=function(t){return""+n0(t.vertical)+n0(t.horizontal)},Ffe=function(t){return Object.keys(t).filter(function(r){return!jfe.container[r]}).reduce(function(r,i){var o;return Uo({},r,(o={},o[i]=t[i],o))},{})},Qc={TIMEOUT:"timeout",CLICKAWAY:"clickaway",MAXSNACK:"maxsnack",INSTRUCTED:"instructed"},h1={toContainerAnchorOrigin:function(t){return"containerAnchorOrigin"+t},toAnchorOrigin:function(t){var r=t.vertical,i=t.horizontal;return"anchorOrigin"+n0(r)+n0(i)},toVariant:function(t){return"variant"+n0(t)}},Mv=function(t){return!!t||t===0},YR=function(t){return typeof t=="number"||t===null},zfe=function(t,r,i){return function(o){return o==="autoHideDuration"?YR(t.autoHideDuration)?t.autoHideDuration:YR(r.autoHideDuration)?r.autoHideDuration:bf.autoHideDuration:t[o]||r[o]||i[o]}};function C5(e,t,r){return e===void 0&&(e={}),t===void 0&&(t={}),r===void 0&&(r={}),Uo({},r,{},t,{},e)}var Hfe="SnackbarContent",SL={root:Hfe+"-root"},Wfe=sr("div")(function(e){var t,r,i=e.theme;return r={},r["&."+SL.root]=(t={display:"flex",flexWrap:"wrap",flexGrow:1},t[i.breakpoints.up("sm")]={flexGrow:"initial",minWidth:288},t),r}),Vfe=X.exports.forwardRef(function(e,t){var r=e.className,i=xd(e,["className"]);return L(Wfe,{...Object.assign({ref:t,className:pn(SL.root,r)},i)})}),QR={right:"left",left:"right",bottom:"up",top:"down"},qfe=function(t){return t.horizontal!=="center"?QR[t.horizontal]:QR[t.vertical]},Kfe=function(t){return L(jh,{...Object.assign({},t),children:L("path",{d:"M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41 10.59L10 14.17L17.59 6.58L19 8L10 17Z"})})},Gfe=function(t){return L(jh,{...Object.assign({},t),children:L("path",{d:"M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z"})})},Yfe=function(t){return L(jh,{...Object.assign({},t),children:L("path",{d:"M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2, 6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12, 13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z"})})},Qfe=function(t){return L(jh,{...Object.assign({},t),children:L("path",{d:"M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12A10,10 0 0,0 12,2Z"})})},Ov={fontSize:20,marginInlineEnd:8},Zfe={default:void 0,success:L(Kfe,{style:Ov}),warning:L(Gfe,{style:Ov}),error:L(Yfe,{style:Ov}),info:L(Qfe,{style:Ov})};function i0(e,t){return e.reduce(function(r,i){return i==null?r:function(){for(var a=arguments.length,s=new Array(a),l=0;l .MuiCollapse-container, & > .MuiCollapse-root",wrapper:"& > .MuiCollapse-container > .MuiCollapse-wrapper, & > .MuiCollapse-root > .MuiCollapse-wrapper"},E5=16,rf="SnackbarContainer",Nl={root:rf+"-root",rootDense:rf+"-rootDense",top:rf+"-top",bottom:rf+"-bottom",left:rf+"-left",right:rf+"-right",center:rf+"-center"},rpe=sr("div")(function(e){var t,r,i,o,a,s,l=e.theme;return s={},s["&."+Nl.root]=(t={boxSizing:"border-box",display:"flex",maxHeight:"100%",position:"fixed",zIndex:l.zIndex.snackbar,height:"auto",width:"auto",transition:"top 300ms ease 0ms, right 300ms ease 0ms, bottom 300ms ease 0ms, left 300ms ease 0ms, margin 300ms ease 0ms, max-width 300ms ease 0ms",pointerEvents:"none"},t[k5.container]={pointerEvents:"all"},t[k5.wrapper]={padding:Yu.snackbar.default+"px 0px",transition:"padding 300ms ease 0ms"},t.maxWidth="calc(100% - "+Yu.view.default*2+"px)",t[l.breakpoints.down("sm")]={width:"100%",maxWidth:"calc(100% - "+E5*2+"px)"},t),s["&."+Nl.rootDense]=(r={},r[k5.wrapper]={padding:Yu.snackbar.dense+"px 0px"},r),s["&."+Nl.top]={top:Yu.view.default-Yu.snackbar.default,flexDirection:"column"},s["&."+Nl.bottom]={bottom:Yu.view.default-Yu.snackbar.default,flexDirection:"column-reverse"},s["&."+Nl.left]=(i={left:Yu.view.default},i[l.breakpoints.up("sm")]={alignItems:"flex-start"},i[l.breakpoints.down("sm")]={left:E5+"px"},i),s["&."+Nl.right]=(o={right:Yu.view.default},o[l.breakpoints.up("sm")]={alignItems:"flex-end"},o[l.breakpoints.down("sm")]={right:E5+"px"},o),s["&."+Nl.center]=(a={left:"50%",transform:"translateX(-50%)"},a[l.breakpoints.up("sm")]={alignItems:"center"},a),s}),npe=function(t){var r=t.className,i=t.anchorOrigin,o=t.dense,a=xd(t,["className","anchorOrigin","dense"]),s=pn(Nl[i.vertical],Nl[i.horizontal],Nl.root,r,o&&Nl.rootDense);return L(rpe,{...Object.assign({className:s},a)})},ipe=Gn.memo(npe),ope=function(e){Nfe(t,e);function t(i){var o;return o=e.call(this,i)||this,o.enqueueSnackbar=function(a,s){s===void 0&&(s={});var l=s,u=l.key,c=l.preventDuplicate,d=xd(l,["key","preventDuplicate"]),p=Mv(u),v=p?u:new Date().getTime()+Math.random(),x=zfe(d,o.props,bf),b=Uo({key:v},d,{message:a,open:!0,entered:!1,requestClose:!1,variant:x("variant"),anchorOrigin:x("anchorOrigin"),autoHideDuration:x("autoHideDuration")});return d.persist&&(b.autoHideDuration=void 0),o.setState(function(y){if(c===void 0&&o.props.preventDuplicate||c){var _=function(U){return p?U.key===u:U.message===a},k=y.queue.findIndex(_)>-1,E=y.snacks.findIndex(_)>-1;if(k||E)return y}return o.handleDisplaySnack(Uo({},y,{queue:[].concat(y.queue,[b])}))}),v},o.handleDisplaySnack=function(a){var s=a.snacks;return s.length>=o.maxSnack?o.handleDismissOldest(a):o.processQueue(a)},o.processQueue=function(a){var s=a.queue,l=a.snacks;return s.length>0?Uo({},a,{snacks:[].concat(l,[s[0]]),queue:s.slice(1,s.length)}):a},o.handleDismissOldest=function(a){if(a.snacks.some(function(d){return!d.open||d.requestClose}))return a;var s=!1,l=!1,u=a.snacks.reduce(function(d,p){return d+(p.open&&p.persist?1:0)},0);u===o.maxSnack&&(l=!0);var c=a.snacks.map(function(d){return!s&&(!d.persist||l)?(s=!0,d.entered?(d.onClose&&d.onClose(null,Qc.MAXSNACK,d.key),o.props.onClose&&o.props.onClose(null,Qc.MAXSNACK,d.key),Uo({},d,{open:!1})):Uo({},d,{requestClose:!0})):Uo({},d)});return Uo({},a,{snacks:c})},o.handleEnteredSnack=function(a,s,l){if(!Mv(l))throw new Error("handleEnteredSnack Cannot be called with undefined key");o.setState(function(u){var c=u.snacks;return{snacks:c.map(function(d){return d.key===l?Uo({},d,{entered:!0}):Uo({},d)})}})},o.handleCloseSnack=function(a,s,l){if(o.props.onClose&&o.props.onClose(a,s,l),s!==Qc.CLICKAWAY){var u=l===void 0;o.setState(function(c){var d=c.snacks,p=c.queue;return{snacks:d.map(function(v){return!u&&v.key!==l?Uo({},v):v.entered?Uo({},v,{open:!1}):Uo({},v,{requestClose:!0})}),queue:p.filter(function(v){return v.key!==l})}})}},o.closeSnackbar=function(a){var s=o.state.snacks.find(function(l){return l.key===a});Mv(a)&&s&&s.onClose&&s.onClose(null,Qc.INSTRUCTED,a),o.handleCloseSnack(null,Qc.INSTRUCTED,a)},o.handleExitedSnack=function(a,s,l){var u=s||l;if(!Mv(u))throw new Error("handleExitedSnack Cannot be called with undefined key");o.setState(function(c){var d=o.processQueue(Uo({},c,{snacks:c.snacks.filter(function(p){return p.key!==u})}));return d.queue.length===0?d:o.handleDismissOldest(d)})},o.state={snacks:[],queue:[],contextValue:{enqueueSnackbar:o.enqueueSnackbar.bind(GR(o)),closeSnackbar:o.closeSnackbar.bind(GR(o))}},o}var r=t.prototype;return r.render=function(){var o=this,a=this.state.contextValue,s=this.props,l=s.iconVariant,u=s.dense,c=u===void 0?bf.dense:u,d=s.hideIconVariant,p=d===void 0?bf.hideIconVariant:d,v=s.domRoot,x=s.children,b=s.classes,y=b===void 0?{}:b,_=xd(s,["maxSnack","preventDuplicate","variant","anchorOrigin","iconVariant","dense","hideIconVariant","domRoot","children","classes"]),k=this.state.snacks.reduce(function(B,U){var D,j=$fe(U.anchorOrigin),F=B[j]||[];return Uo({},B,(D={},D[j]=[].concat(F,[U]),D))},{}),E=Object.keys(k).map(function(B){var U=k[B];return L(ipe,{dense:c,anchorOrigin:U[0].anchorOrigin,className:pn(y.containerRoot,y[h1.toContainerAnchorOrigin(B)]),children:U.map(function(D){return L(tpe,{...Object.assign({},_,{key:D.key,snack:D,dense:c,iconVariant:l,hideIconVariant:p,classes:Ffe(y),onClose:o.handleCloseSnack,onExited:i0([o.handleExitedSnack,o.props.onExited]),onEntered:i0([o.handleEnteredSnack,o.props.onEntered])})})})},B)});return Ut(_L.Provider,{value:a,children:[x,v?ml.exports.createPortal(E,v):E]})},Lfe(t,[{key:"maxSnack",get:function(){return this.props.maxSnack||bf.maxSnack}}]),t}(X.exports.Component),ape=function(){return X.exports.useContext(_L)},yk={},lx={exports:{}};(function(e){function t(r){return r&&r.__esModule?r:{default:r}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(lx);var A5={};const spe=Gb(vJ);var XR;function vk(){return XR||(XR=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.createSvgIcon}});var t=spe}(A5)),A5}const bk=Gb(Iq);var lpe=lx.exports;Object.defineProperty(yk,"__esModule",{value:!0});var CL=yk.default=void 0,upe=lpe(vk()),cpe=bk,dpe=(0,upe.default)((0,cpe.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close");CL=yk.default=dpe;const fpe=sr(da)({"& &":{color:"white"},"& a":{color:"white"}});function Ry(){const{enqueueSnackbar:e,closeSnackbar:t}=ape();return{showNotification:X.exports.useCallback((i,o,a,s)=>{const l=e(L(fpe,{children:i}),{variant:o,autoHideDuration:s||5e3,onClose:a,onClick:()=>t(l),action:()=>L(Bs,{children:L(CL,{sx:{color:"#fff",stroke:"#fff",width:20,height:20}})})})},[t,e])}}const JR=e=>{let t;const r=new Set,i=(u,c)=>{const d=typeof u=="function"?u(t):u;if(!Object.is(d,t)){const p=t;t=c??typeof d!="object"?d:Object.assign({},t,d),r.forEach(v=>v(t,p))}},o=()=>t,l={setState:i,getState:o,subscribe:u=>(r.add(u),()=>r.delete(u)),destroy:()=>{({VITE_SHOW_MANUAL_VERIFICATION:"true",VITE_VERIFIER_ID:"orbs.com",VITE_BACKEND_URL:"https://ton-source-prod-1.herokuapp.com,https://ton-source-prod-2.herokuapp.com,https://ton-source-prod-3.herokuapp.com",VITE_SOURCES_REGISTRY:"EQD-BJSVUJviud_Qv7Ymfd3qzXdrmV525e3YDzWQoHIAiInL",VITE_VERIFIER_ID_TESTNET:"orbs-testnet",VITE_BACKEND_URL_TESTNET:"https://ton-source-prod-testnet-1.herokuapp.com",VITE_SOURCES_REGISTRY_TESTNET:"EQCsdKYwUaXkgJkz2l0ol6qT_WxeRbE_wBCwnEybmR0u5TO8",VITE_REDIRECT:"true",VITE_APP_GA:"G-2TB9KYGCFR",BASE_URL:"/verifier/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"&&console.warn("[DEPRECATED] The destroy method will be unsupported in the future version. You should use unsubscribe function returned by subscribe. Everything will be garbage collected if store is garbage collected."),r.clear()}};return t=e(i,o,l),l},ppe=e=>e?JR(e):JR;var kL={exports:{}},EL={};/** * @license React * use-sync-external-store-shim/with-selector.production.min.js * @@ -270,7 +270,7 @@ Values: * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var ux=X.exports,hpe=VC.exports;function gpe(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var mpe=typeof Object.is=="function"?Object.is:gpe,ype=hpe.useSyncExternalStore,vpe=ux.useRef,bpe=ux.useEffect,wpe=ux.useMemo,xpe=ux.useDebugValue;EL.useSyncExternalStoreWithSelector=function(e,t,r,i,o){var a=vpe(null);if(a.current===null){var s={hasValue:!1,value:null};a.current=s}else s=a.current;a=wpe(function(){function u(x){if(!c){if(c=!0,d=x,x=i(x),o!==void 0&&s.hasValue){var b=s.value;if(o(b,x))return p=b}return p=x}if(b=p,mpe(d,x))return b;var y=i(x);return o!==void 0&&o(b,y)?b:(d=x,p=y)}var c=!1,d,p,v=r===void 0?null:r;return[function(){return u(t())},v===null?void 0:function(){return u(v())}]},[t,r,i,o]);var l=ype(e,a[0],a[1]);return bpe(function(){s.hasValue=!0,s.value=l},[l]),xpe(l),l};(function(e){e.exports=EL})(kL);const _pe=Kb(kL.exports),{useSyncExternalStoreWithSelector:Spe}=_pe;function Cpe(e,t=e.getState,r){const i=Spe(e.subscribe,e.getState,e.getServerState||e.getState,t,r);return X.exports.useDebugValue(i),i}const eP=e=>{({VITE_SHOW_MANUAL_VERIFICATION:"true",VITE_VERIFIER_ID:"orbs.com",VITE_BACKEND_URL:"https://ton-source-prod-1.herokuapp.com,https://ton-source-prod-2.herokuapp.com,https://ton-source-prod-3.herokuapp.com",VITE_SOURCES_REGISTRY:"EQD-BJSVUJviud_Qv7Ymfd3qzXdrmV525e3YDzWQoHIAiInL",VITE_VERIFIER_ID_TESTNET:"orbs-testnet",VITE_BACKEND_URL_TESTNET:"https://ton-source-prod-testnet-1.herokuapp.com",VITE_SOURCES_REGISTRY_TESTNET:"EQCsdKYwUaXkgJkz2l0ol6qT_WxeRbE_wBCwnEybmR0u5TO8",VITE_REDIRECT:"true",VITE_APP_GA:"G-2TB9KYGCFR",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"&&typeof e!="function"&&console.warn('[DEPRECATED] Passing a vanilla store will be unsupported in the future version. Please use `import { useStore } from "zustand"` to use the vanilla store in React.');const t=typeof e=="function"?ppe(e):e,r=(i,o)=>Cpe(t,i,o);return Object.assign(r,t),r},_g=e=>e?eP(e):eP;var Py=e=>(({VITE_SHOW_MANUAL_VERIFICATION:"true",VITE_VERIFIER_ID:"orbs.com",VITE_BACKEND_URL:"https://ton-source-prod-1.herokuapp.com,https://ton-source-prod-2.herokuapp.com,https://ton-source-prod-3.herokuapp.com",VITE_SOURCES_REGISTRY:"EQD-BJSVUJviud_Qv7Ymfd3qzXdrmV525e3YDzWQoHIAiInL",VITE_VERIFIER_ID_TESTNET:"orbs-testnet",VITE_BACKEND_URL_TESTNET:"https://ton-source-prod-testnet-1.herokuapp.com",VITE_SOURCES_REGISTRY_TESTNET:"EQCsdKYwUaXkgJkz2l0ol6qT_WxeRbE_wBCwnEybmR0u5TO8",VITE_REDIRECT:"true",VITE_APP_GA:"G-2TB9KYGCFR",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"&&console.warn("[DEPRECATED] default export is deprecated, instead import { create } from'zustand'"),_g(e));const kpe=Py(e=>({value:"",active:!1,setValue:t=>e({value:t}),setActive:t=>e({active:t})}));function wk(){const{showNotification:e}=Ry(),t=Ac(),{value:r,setValue:i,active:o,setActive:a}=kpe(u=>u),s=X.exports.useCallback(()=>{i("")},[]);return{onSubmit:()=>{if(!xL(r)){e("Invalid address","error");return}i(""),a(!1),t(`/${r}`)},onClear:s,setActive:a,setValue:i,active:o,value:r}}function Epe(e){let t;try{t=e()}catch{return}return{getItem:i=>{var o;const a=l=>l===null?null:JSON.parse(l),s=(o=t.getItem(i))!=null?o:null;return s instanceof Promise?s.then(a):a(s)},setItem:(i,o)=>t.setItem(i,JSON.stringify(o)),removeItem:i=>t.removeItem(i)}}const $0=e=>t=>{try{const r=e(t);return r instanceof Promise?r:{then(i){return $0(i)(r)},catch(i){return this}}}catch(r){return{then(i){return this},catch(i){return $0(i)(r)}}}},Ape=(e,t)=>(r,i,o)=>{let a={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:_=>_,version:0,merge:(_,k)=>({...k,..._}),...t},s=!1;const l=new Set,u=new Set;let c;try{c=a.getStorage()}catch{}if(!c)return e((..._)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),r(..._)},i,o);const d=$0(a.serialize),p=()=>{const _=a.partialize({...i()});let k;const E=d({state:_,version:a.version}).then(B=>c.setItem(a.name,B)).catch(B=>{k=B});if(k)throw k;return E},v=o.setState;o.setState=(_,k)=>{v(_,k),p()};const x=e((..._)=>{r(..._),p()},i,o);let b;const y=()=>{var _;if(!c)return;s=!1,l.forEach(E=>E(i()));const k=((_=a.onRehydrateStorage)==null?void 0:_.call(a,i()))||void 0;return $0(c.getItem.bind(c))(a.name).then(E=>{if(E)return a.deserialize(E)}).then(E=>{if(E)if(typeof E.version=="number"&&E.version!==a.version){if(a.migrate)return a.migrate(E.state,E.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return E.state}).then(E=>{var B;return b=a.merge(E,(B=i())!=null?B:x),r(b,!0),p()}).then(()=>{k?.(b,void 0),s=!0,u.forEach(E=>E(b))}).catch(E=>{k?.(void 0,E)})};return o.persist={setOptions:_=>{a={...a,..._},_.getStorage&&(c=_.getStorage())},clearStorage:()=>{c?.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>y(),hasHydrated:()=>s,onHydrate:_=>(l.add(_),()=>{l.delete(_)}),onFinishHydration:_=>(u.add(_),()=>{u.delete(_)})},y(),b||x},Tpe=(e,t)=>(r,i,o)=>{let a={storage:Epe(()=>localStorage),partialize:y=>y,version:0,merge:(y,_)=>({..._,...y}),...t},s=!1;const l=new Set,u=new Set;let c=a.storage;if(!c)return e((...y)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),r(...y)},i,o);const d=()=>{const y=a.partialize({...i()});return c.setItem(a.name,{state:y,version:a.version})},p=o.setState;o.setState=(y,_)=>{p(y,_),d()};const v=e((...y)=>{r(...y),d()},i,o);let x;const b=()=>{var y;if(!c)return;s=!1,l.forEach(k=>k(i()));const _=((y=a.onRehydrateStorage)==null?void 0:y.call(a,i()))||void 0;return $0(c.getItem.bind(c))(a.name).then(k=>{if(k)if(typeof k.version=="number"&&k.version!==a.version){if(a.migrate)return a.migrate(k.state,k.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return k.state}).then(k=>{var E;return x=a.merge(k,(E=i())!=null?E:v),r(x,!0),d()}).then(()=>{_?.(x,void 0),s=!0,u.forEach(k=>k(x))}).catch(k=>{_?.(void 0,k)})};return o.persist={setOptions:y=>{a={...a,...y},y.storage&&(c=y.storage)},clearStorage:()=>{c?.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>b(),hasHydrated:()=>s,onHydrate:y=>(l.add(y),()=>{l.delete(y)}),onFinishHydration:y=>(u.add(y),()=>{u.delete(y)})},b(),x||v},Ipe=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?(({VITE_SHOW_MANUAL_VERIFICATION:"true",VITE_VERIFIER_ID:"orbs.com",VITE_BACKEND_URL:"https://ton-source-prod-1.herokuapp.com,https://ton-source-prod-2.herokuapp.com,https://ton-source-prod-3.herokuapp.com",VITE_SOURCES_REGISTRY:"EQD-BJSVUJviud_Qv7Ymfd3qzXdrmV525e3YDzWQoHIAiInL",VITE_VERIFIER_ID_TESTNET:"orbs-testnet",VITE_BACKEND_URL_TESTNET:"https://ton-source-prod-testnet-1.herokuapp.com",VITE_SOURCES_REGISTRY_TESTNET:"EQCsdKYwUaXkgJkz2l0ol6qT_WxeRbE_wBCwnEybmR0u5TO8",VITE_REDIRECT:"true",VITE_APP_GA:"G-2TB9KYGCFR",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"&&console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Please use `storage` option instead."),Ape(e,t)):Tpe(e,t),Rpe=Ipe,Ppe=Py()(Rpe((e,t)=>({addresses:[],addAddress:r=>e({addresses:[r,...t().addresses.filter(i=>i!==r)].slice(0,20)}),clear:()=>e({addresses:[]}),removeItem:r=>{const{addresses:i}=t(),o=i.filter(a=>a!==r);e({addresses:o})}}),{name:"addressHistory",getStorage:()=>localStorage}));function AL(){const e=Ac(),{setValue:t,setActive:r}=wk(),{addresses:i,addAddress:o,clear:a,removeItem:s}=Ppe(),{contractAddress:l}=$u(),u=X.exports.useCallback(()=>{a()},[a]),c=X.exports.useCallback(p=>{t(""),r(!1),e(`/${p}`)},[]),d=X.exports.useCallback((p,v)=>{p.stopPropagation(),s(v)},[s]);return X.exports.useEffect(()=>{l&&o(l)},[l]),{onHistoryClear:u,onItemClick:c,onItemDelete:d,addressHistory:i,addAddress:o}}const Mpe=sr(kn)({display:"flex",alignItems:"center",height:48,background:"#F7F9FB",borderRadius:40,border:"0.5px solid rgba(114, 138, 150, 0.16)",padding:"0 10px 0 20px",zIndex:9}),Ope=sr("input")(({theme:e})=>({flex:1,marginLeft:10,width:"100%",height:48,fontSize:16,fontWeight:500,outline:"unset",fontFamily:"Mulish",color:"#000",border:"none",background:"transparent",caretColor:"#728A96","&::placeholder":{color:"#728A96",fontWeight:500},[e.breakpoints.down("sm")]:{fontSize:16}}));function Bpe(){const{onSubmit:e,onClear:t,setActive:r,setValue:i,active:o,value:a}=wk(),{onItemDelete:s,onItemClick:l,onHistoryClear:u,addressHistory:c}=AL(),[d]=yw(),p=d.get("devExamples")!==null;return L(w6,{onClickAway:()=>r(!1),children:Ut(ta,{children:[Ut(kn,{sx:{position:"relative",maxWidth:1160,width:"100%",zIndex:3},children:[Ut(Mpe,{children:[L("img",{width:24,height:24,src:wZ,alt:"Search icon"}),L(Ope,{onKeyDown:v=>{v.key==="Enter"&&(v.preventDefault(),e())},placeholder:"Contract address",value:a,onChange:v=>i(v.target.value),onSubmit:e,onFocus:()=>r(!0),spellCheck:!1}),L(vy,{in:!!a,timeout:zae,children:Ut($n,{children:[L(Bs,{onClick:t,children:L("img",{src:b6,width:16,height:16,alt:"Close icon"})}),L(Ha,{height:34,width:40,textColor:"#fff",background:"rgb(0, 136, 204)",hoverBackground:"rgb(0, 95, 142)",fontWeight:600,onClick:e,children:"Go"})]})})]}),o&&!!c?.length&&L(Kae,{searchResults:c,onItemClick:l,onItemDelete:s,onHistoryClear:u}),(p||!1)&&o&&L(Qae,{})]}),L(u2,{sx:{color:"#fff",zIndex:1,overflow:"hidden"},invisible:!c?.length,open:o,onClick:()=>r(!1)})]})})}const Upe=250,tP=188,Dpe=sr(kn)(({theme:e})=>t=>({display:t.isMobile?"flex":"inherit",alignItems:t.isMobile?"center":"inherit",fontWight:700,color:"#fff",minHeight:t.isMobile?80:tP,height:t.showExpanded&&!t.isMobile?Upe:t.isMobile?80:tP,background:"#fff",borderBottomLeftRadius:e.spacing(6),borderBottomRightRadius:e.spacing(6),border:"0.5px solid rgba(114, 138, 150, 0.24)",boxShadow:"rgb(114 138 150 / 8%) 0px 2px 16px"})),TL=sr($n)(()=>({gap:10})),ap=sr(uc)(()=>({display:"flex",alignItems:"center",gap:10,color:"#000",textDecoration:"none",cursor:"pointer"})),IL=sr($n)(({theme:e})=>({margin:"auto",maxWidth:W7,height:100,width:"100%",justifyContent:"space-between",gap:10})),cx=sr("h4")(({theme:e})=>({color:"#000",fontSize:20,fontWeight:800,[e.breakpoints.down("sm")]:{fontSize:16}})),xk=sr("h5")(()=>({color:"#000",fontWeight:700,fontSize:18})),Lpe=sr("h3")(({theme:e})=>({color:"#000",fontSize:26,marginTop:0,textAlign:"center",fontWeight:800})),Npe=sr($n)({margin:"auto",maxWidth:W7,width:"100%"});var _k={},jpe=lx.exports;Object.defineProperty(_k,"__esModule",{value:!0});var RL=_k.default=void 0,$pe=jpe(vk()),Fpe=bk,zpe=(0,$pe.default)((0,Fpe.jsx)("path",{d:"M4 18h16c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1s.45 1 1 1zm0-5h16c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1s.45 1 1 1zM3 7c0 .55.45 1 1 1h16c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1z"}),"MenuRounded");RL=_k.default=zpe;var Sk={},Hpe=lx.exports;Object.defineProperty(Sk,"__esModule",{value:!0});var Ck=Sk.default=void 0,Wpe=Hpe(vk()),Vpe=bk,qpe=(0,Wpe.default)((0,Vpe.jsx)("path",{d:"M18.3 5.71a.9959.9959 0 0 0-1.41 0L12 10.59 7.11 5.7a.9959.9959 0 0 0-1.41 0c-.39.39-.39 1.02 0 1.41L10.59 12 5.7 16.89c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L12 13.41l4.89 4.89c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4z"}),"CloseRounded");Ck=Sk.default=qpe;var PL={exports:{}};(function(e){(function(t,r){e.exports?e.exports=r():(t.nacl||(t.nacl={}),t.nacl.util=r())})(_n,function(){var t={};function r(i){if(!/^(?:[A-Za-z0-9+\/]{2}[A-Za-z0-9+\/]{2})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.test(i))throw new TypeError("invalid encoding")}return t.decodeUTF8=function(i){if(typeof i!="string")throw new TypeError("expected string");var o,a=unescape(encodeURIComponent(i)),s=new Uint8Array(a.length);for(o=0;o"u"?typeof Buffer.from<"u"?(t.encodeBase64=function(i){return Buffer.from(i).toString("base64")},t.decodeBase64=function(i){return r(i),new Uint8Array(Array.prototype.slice.call(Buffer.from(i,"base64"),0))}):(t.encodeBase64=function(i){return new Buffer(i).toString("base64")},t.decodeBase64=function(i){return r(i),new Uint8Array(Array.prototype.slice.call(new Buffer(i,"base64"),0))}):(t.encodeBase64=function(i){var o,a=[],s=i.length;for(o=0;o=e.length)throw new Error("Index is out of buffer");const r=e.slice(0,t),i=e.slice(t);return[r,i]}function T5(e){let t="";return e.forEach(r=>{t+=("0"+(r&255).toString(16)).slice(-2)}),t}function ub(e){if(e.length%2!==0)throw new Error(`Cannot convert ${e} to bytesArray`);const t=new Uint8Array(e.length/2);for(let r=0;r{({VITE_SHOW_MANUAL_VERIFICATION:"true",VITE_VERIFIER_ID:"orbs.com",VITE_BACKEND_URL:"https://ton-source-prod-1.herokuapp.com,https://ton-source-prod-2.herokuapp.com,https://ton-source-prod-3.herokuapp.com",VITE_SOURCES_REGISTRY:"EQD-BJSVUJviud_Qv7Ymfd3qzXdrmV525e3YDzWQoHIAiInL",VITE_VERIFIER_ID_TESTNET:"orbs-testnet",VITE_BACKEND_URL_TESTNET:"https://ton-source-prod-testnet-1.herokuapp.com",VITE_SOURCES_REGISTRY_TESTNET:"EQCsdKYwUaXkgJkz2l0ol6qT_WxeRbE_wBCwnEybmR0u5TO8",VITE_REDIRECT:"true",VITE_APP_GA:"G-2TB9KYGCFR",BASE_URL:"/verifier/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"&&typeof e!="function"&&console.warn('[DEPRECATED] Passing a vanilla store will be unsupported in the future version. Please use `import { useStore } from "zustand"` to use the vanilla store in React.');const t=typeof e=="function"?ppe(e):e,r=(i,o)=>Cpe(t,i,o);return Object.assign(r,t),r},_g=e=>e?eP(e):eP;var Py=e=>(({VITE_SHOW_MANUAL_VERIFICATION:"true",VITE_VERIFIER_ID:"orbs.com",VITE_BACKEND_URL:"https://ton-source-prod-1.herokuapp.com,https://ton-source-prod-2.herokuapp.com,https://ton-source-prod-3.herokuapp.com",VITE_SOURCES_REGISTRY:"EQD-BJSVUJviud_Qv7Ymfd3qzXdrmV525e3YDzWQoHIAiInL",VITE_VERIFIER_ID_TESTNET:"orbs-testnet",VITE_BACKEND_URL_TESTNET:"https://ton-source-prod-testnet-1.herokuapp.com",VITE_SOURCES_REGISTRY_TESTNET:"EQCsdKYwUaXkgJkz2l0ol6qT_WxeRbE_wBCwnEybmR0u5TO8",VITE_REDIRECT:"true",VITE_APP_GA:"G-2TB9KYGCFR",BASE_URL:"/verifier/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"&&console.warn("[DEPRECATED] default export is deprecated, instead import { create } from'zustand'"),_g(e));const kpe=Py(e=>({value:"",active:!1,setValue:t=>e({value:t}),setActive:t=>e({active:t})}));function wk(){const{showNotification:e}=Ry(),t=Ac(),{value:r,setValue:i,active:o,setActive:a}=kpe(u=>u),s=X.exports.useCallback(()=>{i("")},[]);return{onSubmit:()=>{if(!xL(r)){e("Invalid address","error");return}i(""),a(!1),t(`/${r}`)},onClear:s,setActive:a,setValue:i,active:o,value:r}}function Epe(e){let t;try{t=e()}catch{return}return{getItem:i=>{var o;const a=l=>l===null?null:JSON.parse(l),s=(o=t.getItem(i))!=null?o:null;return s instanceof Promise?s.then(a):a(s)},setItem:(i,o)=>t.setItem(i,JSON.stringify(o)),removeItem:i=>t.removeItem(i)}}const $0=e=>t=>{try{const r=e(t);return r instanceof Promise?r:{then(i){return $0(i)(r)},catch(i){return this}}}catch(r){return{then(i){return this},catch(i){return $0(i)(r)}}}},Ape=(e,t)=>(r,i,o)=>{let a={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:_=>_,version:0,merge:(_,k)=>({...k,..._}),...t},s=!1;const l=new Set,u=new Set;let c;try{c=a.getStorage()}catch{}if(!c)return e((..._)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),r(..._)},i,o);const d=$0(a.serialize),p=()=>{const _=a.partialize({...i()});let k;const E=d({state:_,version:a.version}).then(B=>c.setItem(a.name,B)).catch(B=>{k=B});if(k)throw k;return E},v=o.setState;o.setState=(_,k)=>{v(_,k),p()};const x=e((..._)=>{r(..._),p()},i,o);let b;const y=()=>{var _;if(!c)return;s=!1,l.forEach(E=>E(i()));const k=((_=a.onRehydrateStorage)==null?void 0:_.call(a,i()))||void 0;return $0(c.getItem.bind(c))(a.name).then(E=>{if(E)return a.deserialize(E)}).then(E=>{if(E)if(typeof E.version=="number"&&E.version!==a.version){if(a.migrate)return a.migrate(E.state,E.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return E.state}).then(E=>{var B;return b=a.merge(E,(B=i())!=null?B:x),r(b,!0),p()}).then(()=>{k?.(b,void 0),s=!0,u.forEach(E=>E(b))}).catch(E=>{k?.(void 0,E)})};return o.persist={setOptions:_=>{a={...a,..._},_.getStorage&&(c=_.getStorage())},clearStorage:()=>{c?.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>y(),hasHydrated:()=>s,onHydrate:_=>(l.add(_),()=>{l.delete(_)}),onFinishHydration:_=>(u.add(_),()=>{u.delete(_)})},y(),b||x},Tpe=(e,t)=>(r,i,o)=>{let a={storage:Epe(()=>localStorage),partialize:y=>y,version:0,merge:(y,_)=>({..._,...y}),...t},s=!1;const l=new Set,u=new Set;let c=a.storage;if(!c)return e((...y)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),r(...y)},i,o);const d=()=>{const y=a.partialize({...i()});return c.setItem(a.name,{state:y,version:a.version})},p=o.setState;o.setState=(y,_)=>{p(y,_),d()};const v=e((...y)=>{r(...y),d()},i,o);let x;const b=()=>{var y;if(!c)return;s=!1,l.forEach(k=>k(i()));const _=((y=a.onRehydrateStorage)==null?void 0:y.call(a,i()))||void 0;return $0(c.getItem.bind(c))(a.name).then(k=>{if(k)if(typeof k.version=="number"&&k.version!==a.version){if(a.migrate)return a.migrate(k.state,k.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return k.state}).then(k=>{var E;return x=a.merge(k,(E=i())!=null?E:v),r(x,!0),d()}).then(()=>{_?.(x,void 0),s=!0,u.forEach(k=>k(x))}).catch(k=>{_?.(void 0,k)})};return o.persist={setOptions:y=>{a={...a,...y},y.storage&&(c=y.storage)},clearStorage:()=>{c?.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>b(),hasHydrated:()=>s,onHydrate:y=>(l.add(y),()=>{l.delete(y)}),onFinishHydration:y=>(u.add(y),()=>{u.delete(y)})},b(),x||v},Ipe=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?(({VITE_SHOW_MANUAL_VERIFICATION:"true",VITE_VERIFIER_ID:"orbs.com",VITE_BACKEND_URL:"https://ton-source-prod-1.herokuapp.com,https://ton-source-prod-2.herokuapp.com,https://ton-source-prod-3.herokuapp.com",VITE_SOURCES_REGISTRY:"EQD-BJSVUJviud_Qv7Ymfd3qzXdrmV525e3YDzWQoHIAiInL",VITE_VERIFIER_ID_TESTNET:"orbs-testnet",VITE_BACKEND_URL_TESTNET:"https://ton-source-prod-testnet-1.herokuapp.com",VITE_SOURCES_REGISTRY_TESTNET:"EQCsdKYwUaXkgJkz2l0ol6qT_WxeRbE_wBCwnEybmR0u5TO8",VITE_REDIRECT:"true",VITE_APP_GA:"G-2TB9KYGCFR",BASE_URL:"/verifier/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"&&console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Please use `storage` option instead."),Ape(e,t)):Tpe(e,t),Rpe=Ipe,Ppe=Py()(Rpe((e,t)=>({addresses:[],addAddress:r=>e({addresses:[r,...t().addresses.filter(i=>i!==r)].slice(0,20)}),clear:()=>e({addresses:[]}),removeItem:r=>{const{addresses:i}=t(),o=i.filter(a=>a!==r);e({addresses:o})}}),{name:"addressHistory",getStorage:()=>localStorage}));function AL(){const e=Ac(),{setValue:t,setActive:r}=wk(),{addresses:i,addAddress:o,clear:a,removeItem:s}=Ppe(),{contractAddress:l}=$u(),u=X.exports.useCallback(()=>{a()},[a]),c=X.exports.useCallback(p=>{t(""),r(!1),e(`/${p}`)},[]),d=X.exports.useCallback((p,v)=>{p.stopPropagation(),s(v)},[s]);return X.exports.useEffect(()=>{l&&o(l)},[l]),{onHistoryClear:u,onItemClick:c,onItemDelete:d,addressHistory:i,addAddress:o}}const Mpe=sr(kn)({display:"flex",alignItems:"center",height:48,background:"#F7F9FB",borderRadius:40,border:"0.5px solid rgba(114, 138, 150, 0.16)",padding:"0 10px 0 20px",zIndex:9}),Ope=sr("input")(({theme:e})=>({flex:1,marginLeft:10,width:"100%",height:48,fontSize:16,fontWeight:500,outline:"unset",fontFamily:"Mulish",color:"#000",border:"none",background:"transparent",caretColor:"#728A96","&::placeholder":{color:"#728A96",fontWeight:500},[e.breakpoints.down("sm")]:{fontSize:16}}));function Bpe(){const{onSubmit:e,onClear:t,setActive:r,setValue:i,active:o,value:a}=wk(),{onItemDelete:s,onItemClick:l,onHistoryClear:u,addressHistory:c}=AL(),[d]=yw(),p=d.get("devExamples")!==null;return L(w6,{onClickAway:()=>r(!1),children:Ut(ta,{children:[Ut(kn,{sx:{position:"relative",maxWidth:1160,width:"100%",zIndex:3},children:[Ut(Mpe,{children:[L("img",{width:24,height:24,src:wZ,alt:"Search icon"}),L(Ope,{onKeyDown:v=>{v.key==="Enter"&&(v.preventDefault(),e())},placeholder:"Contract address",value:a,onChange:v=>i(v.target.value),onSubmit:e,onFocus:()=>r(!0),spellCheck:!1}),L(vy,{in:!!a,timeout:zae,children:Ut($n,{children:[L(Bs,{onClick:t,children:L("img",{src:b6,width:16,height:16,alt:"Close icon"})}),L(Ha,{height:34,width:40,textColor:"#fff",background:"rgb(0, 136, 204)",hoverBackground:"rgb(0, 95, 142)",fontWeight:600,onClick:e,children:"Go"})]})})]}),o&&!!c?.length&&L(Kae,{searchResults:c,onItemClick:l,onItemDelete:s,onHistoryClear:u}),(p||!1)&&o&&L(Qae,{})]}),L(u2,{sx:{color:"#fff",zIndex:1,overflow:"hidden"},invisible:!c?.length,open:o,onClick:()=>r(!1)})]})})}const Upe=250,tP=188,Dpe=sr(kn)(({theme:e})=>t=>({display:t.isMobile?"flex":"inherit",alignItems:t.isMobile?"center":"inherit",fontWight:700,color:"#fff",minHeight:t.isMobile?80:tP,height:t.showExpanded&&!t.isMobile?Upe:t.isMobile?80:tP,background:"#fff",borderBottomLeftRadius:e.spacing(6),borderBottomRightRadius:e.spacing(6),border:"0.5px solid rgba(114, 138, 150, 0.24)",boxShadow:"rgb(114 138 150 / 8%) 0px 2px 16px"})),TL=sr($n)(()=>({gap:10})),ap=sr(uc)(()=>({display:"flex",alignItems:"center",gap:10,color:"#000",textDecoration:"none",cursor:"pointer"})),IL=sr($n)(({theme:e})=>({margin:"auto",maxWidth:W7,height:100,width:"100%",justifyContent:"space-between",gap:10})),cx=sr("h4")(({theme:e})=>({color:"#000",fontSize:20,fontWeight:800,[e.breakpoints.down("sm")]:{fontSize:16}})),xk=sr("h5")(()=>({color:"#000",fontWeight:700,fontSize:18})),Lpe=sr("h3")(({theme:e})=>({color:"#000",fontSize:26,marginTop:0,textAlign:"center",fontWeight:800})),Npe=sr($n)({margin:"auto",maxWidth:W7,width:"100%"});var _k={},jpe=lx.exports;Object.defineProperty(_k,"__esModule",{value:!0});var RL=_k.default=void 0,$pe=jpe(vk()),Fpe=bk,zpe=(0,$pe.default)((0,Fpe.jsx)("path",{d:"M4 18h16c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1s.45 1 1 1zm0-5h16c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1s.45 1 1 1zM3 7c0 .55.45 1 1 1h16c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1z"}),"MenuRounded");RL=_k.default=zpe;var Sk={},Hpe=lx.exports;Object.defineProperty(Sk,"__esModule",{value:!0});var Ck=Sk.default=void 0,Wpe=Hpe(vk()),Vpe=bk,qpe=(0,Wpe.default)((0,Vpe.jsx)("path",{d:"M18.3 5.71a.9959.9959 0 0 0-1.41 0L12 10.59 7.11 5.7a.9959.9959 0 0 0-1.41 0c-.39.39-.39 1.02 0 1.41L10.59 12 5.7 16.89c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L12 13.41l4.89 4.89c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4z"}),"CloseRounded");Ck=Sk.default=qpe;var PL={exports:{}};(function(e){(function(t,r){e.exports?e.exports=r():(t.nacl||(t.nacl={}),t.nacl.util=r())})(_n,function(){var t={};function r(i){if(!/^(?:[A-Za-z0-9+\/]{2}[A-Za-z0-9+\/]{2})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.test(i))throw new TypeError("invalid encoding")}return t.decodeUTF8=function(i){if(typeof i!="string")throw new TypeError("expected string");var o,a=unescape(encodeURIComponent(i)),s=new Uint8Array(a.length);for(o=0;o"u"?typeof Buffer.from<"u"?(t.encodeBase64=function(i){return Buffer.from(i).toString("base64")},t.decodeBase64=function(i){return r(i),new Uint8Array(Array.prototype.slice.call(Buffer.from(i,"base64"),0))}):(t.encodeBase64=function(i){return new Buffer(i).toString("base64")},t.decodeBase64=function(i){return r(i),new Uint8Array(Array.prototype.slice.call(new Buffer(i,"base64"),0))}):(t.encodeBase64=function(i){var o,a=[],s=i.length;for(o=0;o=e.length)throw new Error("Index is out of buffer");const r=e.slice(0,t),i=e.slice(t);return[r,i]}function T5(e){let t="";return e.forEach(r=>{t+=("0"+(r&255).toString(16)).slice(-2)}),t}function ub(e){if(e.length%2!==0)throw new Error(`Cannot convert ${e} to bytesArray`);const t=new Uint8Array(e.length/2);for(let r=0;roe.length)&&(P=oe.length);for(var ee=0,le=new Array(P);ee"u"||typeof document>"u")&&!P._hasLoadedGA){var pe=document.createElement("script");pe.async=!0,pe.src="https://www.googletagmanager.com/gtag/js?id=".concat(ee),le&&pe.setAttribute("nonce",le),document.body.appendChild(pe),window.dataLayer=window.dataLayer||[],window.gtag=function(){window.dataLayer.push(arguments)},P._hasLoadedGA=!0}}),G(this,"_toGtagOptions",function(ee){if(!!ee){var le={cookieUpdate:"cookie_update",cookieExpires:"cookie_expires",cookieDomain:"cookie_domain",cookieFlags:"cookie_flags",userId:"user_id",clientId:"client_id",anonymizeIp:"anonymize_ip",contentGroup1:"content_group1",contentGroup2:"content_group2",contentGroup3:"content_group3",contentGroup4:"content_group4",contentGroup5:"content_group5",allowAdFeatures:"allow_google_signals",allowAdPersonalizationSignals:"allow_ad_personalization_signals",nonInteraction:"non_interaction",page:"page_path",hitCallback:"event_callback"},pe=Object.entries(ee).reduce(function(_e,J){var ft=k(J,2),Le=ft[0],He=ft[1];return le[Le]?_e[le[Le]]=He:_e[Le]=He,_e},{});return pe}}),G(this,"initialize",function(ee){var le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!ee)throw new Error("Require GA_MEASUREMENT_ID");var pe=typeof ee=="string"?[{trackingId:ee}]:ee;P._currentMeasurementId=pe[0].trackingId;var _e=le.gaOptions,J=le.gtagOptions,ft=le.legacyDimensionMetric,Le=ft===void 0?!0:ft,He=le.nonce,nr=le.testMode,Bt=nr===void 0?!1:nr;if(P._testMode=Bt,Bt||P._loadGA(P._currentMeasurementId,He),P.isInitialized||(P._gtag("js",new Date),pe.forEach(function(vr){var At=P._appendCustomMap(_(_(_({send_page_view:!1},P._toGtagOptions(_(_({},_e),vr.gaOptions))),J),vr.gtagOptions),Le);P._gtag("config",vr.trackingId,At)})),P.isInitialized=!0,!Bt){var Rt=p(P._queueGtag);for(P._queueGtag=[],P._isQueuing=!1;Rt.length;){var Jt=Rt.shift();P._gtag.apply(P,p(Jt)),Jt[0]==="get"&&(P._isQueuing=!0)}}}),G(this,"set",function(ee){if(!ee){console.warn("`fieldsObject` is required in .set()");return}if(d(ee)!=="object"){console.warn("Expected `fieldsObject` arg to be an Object");return}Object.keys(ee).length===0&&console.warn("empty `fieldsObject` given to .set()"),P._gaCommand("set",ee)}),G(this,"_gaCommandSendEvent",function(ee,le,pe,_e,J){P._gtag("event",le,_(_({event_category:ee,event_label:pe,value:_e},J&&{non_interaction:J.nonInteraction}),P._toGtagOptions(J)))}),G(this,"_gaCommandSendEventParameters",function(){for(var ee=arguments.length,le=new Array(ee),pe=0;pe1?le-1:0),_e=1;_e1&&arguments[1]!==void 0?arguments[1]:!0;if(!le)return ee;ee.custom_map||(ee.custom_map={});for(var pe=1;pe<=200;pe++)ee.custom_map["dimension".concat(pe)]||(ee.custom_map["dimension".concat(pe)]="dimension".concat(pe)),ee.custom_map["metric".concat(pe)]||(ee.custom_map["metric".concat(pe)]="metric".concat(pe));return ee}},{key:"outboundLink",value:function(ee,le){var pe=ee.label;if(typeof le!="function"){console.warn("hitCallback function is required");return}if(!pe){console.warn("args.label is required in outboundLink()");return}var _e={hitType:"event",eventCategory:"Outbound",eventAction:"Click",eventLabel:(0,r.default)(pe)},J=!1,ft=function(){J=!0,le()},Le=setTimeout(ft,250),He=function(){clearTimeout(Le),J||le()};_e.hitCallback=He,this._gaCommand("send",_e)}}]),oe}();e.GA4=ae;var V=new ae;e.default=V})(YN);(function(e){function t(l){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?t=function(c){return typeof c}:t=function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},t(l)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.ReactGAImplementation=void 0;var r=o(YN);function i(l){if(typeof WeakMap!="function")return null;var u=new WeakMap,c=new WeakMap;return(i=function(p){return p?c:u})(l)}function o(l,u){if(!u&&l&&l.__esModule)return l;if(l===null||t(l)!=="object"&&typeof l!="function")return{default:l};var c=i(u);if(c&&c.has(l))return c.get(l);var d={},p=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var v in l)if(v!=="default"&&Object.prototype.hasOwnProperty.call(l,v)){var x=p?Object.getOwnPropertyDescriptor(l,v):null;x&&(x.get||x.set)?Object.defineProperty(d,v,x):d[v]=l[v]}return d.default=l,c&&c.set(l,d),d}var a=r.GA4;e.ReactGAImplementation=a;var s=r.default;e.default=s})(GN);const Ab=Kb(GN);var ha=(e=>(e.ADD_FILE="ADD_FILE",e.CONNECT_WALLET_POPUP="CONNECT_WALLET_POPUP",e.WALLET_CONNECTED="WALLET_CONNECTED",e.SELECT_WALLET="SELECT_WALLET",e.COMPILE_SUBMIT="COMPILE_SUBMIT",e.COMPILE_SERVER_ERROR="COMPILE_SERVER_ERROR",e.SIGN_SERVER_ERROR="SIGN_SERVER_ERROR",e.SIGN_SERVER_SUCCESS="SIGN_SERVER_SUCCESS",e.COMPILE_HASHES_NOT_SIMILAR="COMPILE_HASHES_NOT_SIMILAR",e.COMPILE_COMPILATION_ERROR="COMPILE_COMPILATION_ERROR",e.COMPILE_SUCCESS_HASHES_MATCH="COMPILE_SUCCESS_HASHES_MATCH",e.PUBLISH_CLICK="PUBLISH_CLICK",e.TRANSACTION_ISSUED="TRANSACTION_ISSUED",e.TRANSACTION_REJECTED="TRANSACTION_REJECTED",e.TRANSACTION_ERROR="TRANSACTION_ERROR",e.TRANSACTION_EXPIRED="TRANSACTION_EXPIRED",e.CONTRACT_DEPLOYED="CONTRACT_DEPLOYED",e.IN_BROWSER_COMPILE_ERROR="IN_BROWSER_COMPILE_ERROR",e.IN_BROWSER_COMPILE_START="IN_BROWSER_COMPILE_START",e.IN_BROWSER_COMPILE_SUCCESS="IN_BROWSER_COMPILE_SUCCESS",e.GETTER_PARSE_START="GETTER_PARSE_START",e.RUN_GETTER="RUN_GETTER",e))(ha||{});const wa=(e,t="")=>{if(!!Ab.isInitialized)try{Ab.event({category:"VERIFIER",action:e,label:t})}catch(r){console.log(r)}},P1e=()=>{try{Ab.initialize("G-2TB9KYGCFR"),Ab.send(window.location.pathname+window.location.search)}catch{}};let Tb=["fc","func","pkg"];({}).VITE_ALLOW_FIFT&&Tb.push("fift");const zu=_g($x((e,t)=>({files:[],hasFiles:()=>t().files.length>0,addFiles:async r=>{const i=await Promise.all(r.map(async o=>{const a=await o.text(),s=o.path?.split("/").filter(l=>l)??[];return{fileObj:o,includeInCommand:!0,folder:s.slice(0,s.length-1).join("/"),hasIncludeDirectives:a.includes("#include"),isEntrypoint:/\(\)\s*(recv_internal|main)\s*\(/.test(a),isStdlib:/stdlib.(fc|func)/i.test(o.name)}}));e(o=>{const a=i.filter(s=>s.fileObj.name.match(new RegExp(`.*.(${Tb.join("|")})$`))&&!o.files.find(l=>l.fileObj.name===s.fileObj.name));a&&(wa(ha.ADD_FILE),o.files.push(...a))})},setInclueInCommand:(r,i)=>{e(o=>{o.files.find(a=>a.fileObj.name===r).includeInCommand=i})},setDirectory:(r,i)=>{e(o=>{o.files.find(a=>a.fileObj.name===r).folder=i})},removeFile:r=>{e(i=>{i.files=i.files.filter(o=>o.fileObj.name!==r)})},reorderFiles:(r,i)=>{e(o=>{const a=o.files,s=a.findIndex(c=>c.fileObj.name===r),l=a.findIndex(c=>c.fileObj.name===i),[u]=a.splice(s,1);a.splice(l,0,u)})},reset:()=>{e(r=>{r.files=[]})}}))),M1e="https://raw.githubusercontent.com/ton-community/contract-verifier-config/main/config.json";function uE(){const[e,t]=X.exports.useState(!0);return bc(["remoteConfig"],async()=>{const{funcVersions:r,tactVersions:i}=await(await fetch(M1e)).json();return t(!1),{funcVersions:r,tactVersions:i}},{enabled:e,initialData:{funcVersions:[],tactVersions:[]}})}const O1e=_g($x((e,t)=>({compiler:"func",compilerSettings:{funcVersion:"",commandLine:""},_defaultFuncVersion:"",initialize:r=>{e(i=>{i._defaultFuncVersion=r,i.compilerSettings={funcVersion:i._defaultFuncVersion,commandLine:"",overrideCommandLine:null}})},setCompilerSettings:r=>{e(i=>{i.compilerSettings=r})},setOverrideCommandLine:r=>{e(i=>{if(i.compiler!=="func")throw new Error("not func compiler");i.compilerSettings.overrideCommandLine=r})},setFuncCliVersion:r=>{e(i=>{if(i.compiler!=="func")throw new Error("not func compiler");i.compilerSettings.funcVersion=r})},setTactCliVersion:r=>{e(i=>{if(i.compiler!=="tact")throw new Error("not tact compiler");i.compilerSettings={tactVersion:r}})},setCompiler:r=>{e(i=>{i.compiler=r,r==="func"?i.compilerSettings={funcVersion:i._defaultFuncVersion,commandLine:"",overrideCommandLine:null}:r==="tact"&&(i.compilerSettings={tactVersion:""})})}})));function cE(){const{files:e,setInclueInCommand:t}=zu(),r=O1e(),{data:{tactVersions:i}}=uE();function o(){const s=e.filter(l=>l.includeInCommand).map(l=>(l.folder?l.folder+"/":"")+l.fileObj.name).join(" ");return e?`-SPA ${s}`:""}X.exports.useEffect(()=>{const s=e.find(l=>l.fileObj.name.endsWith(".pkg"));(async()=>{if(!s)return;const l=await s.fileObj.text(),u=JSON.parse(l);if(r.setCompiler("tact"),!i.includes(u.compiler.version))throw new Error("Unsupported tact version "+u.compiler.version);r.setCompilerSettings({tactVersion:u.compiler.version})})()},[e]);const a={};return r.compiler==="func"&&(a.commandLine=r.compilerSettings.overrideCommandLine??o()),{...r,compilerSettings:{...r.compilerSettings,...a}}}const B1e=(e,t,r)=>{const i=()=>{o.invalidateQueries(["CustomMutation",e]),o.invalidateQueries(["CustomMutationError",e])},o=hw(),a=bc(["CustomMutation",e],async()=>await Promise.resolve(!1),{retry:!1,cacheTime:1/0,staleTime:1/0}),s=bc(["CustomMutationError",e],async()=>await Promise.resolve(!1),{retry:!1,cacheTime:1/0,staleTime:1/0}),l=hU(e,async(...c)=>(i(),o.setQueryData(["CustomMutationError",e],!1),await t(...c)),{...r,onSuccess:(c,d,p)=>{o.setQueryData(["CustomMutation",e],c),r?.onSuccess&&r.onSuccess(c,d,p)},onError:(c,d,p)=>{o.setQueryData(["CustomMutationError",e],c),r?.onError&&r.onError(c,d,p)}}),u=Hq(e);return{...l,data:a.data,isLoading:!!u,error:s.data,isError:!!s.data,invalidate:i}};var Uy={};Object.defineProperty(Uy,"__esModule",{value:!0});function U1e(e){{const t=Buffer.from(e);t.reverse();const r=t.toString("hex");return r.length===0?BigInt(0):BigInt(`0x${r}`)}}Uy.toBigIntLE=U1e;function D1e(e){{const t=e.toString("hex");return t.length===0?BigInt(0):BigInt(`0x${t}`)}}var Ib=Uy.toBigIntBE=D1e;function L1e(e,t){{const r=e.toString(16),i=Buffer.from(r.padStart(t*2,"0").slice(0,t*2),"hex");return i.reverse(),i}}Uy.toBufferLE=L1e;function N1e(e,t){{const r=e.toString(16);return Buffer.from(r.padStart(t*2,"0").slice(0,t*2),"hex")}}var XN=Uy.toBufferBE=N1e;function j1e(e){let t=XN(e,4);return[t[0].toString(),t[1].toString(),t[2].toString(),t[3].toString()].join(".")}function $1e(){return{serialize:(e,t)=>{t.storeSlice(e)},parse:e=>e}}class dE{constructor(t,r){this.address=t,this.init=r}static createFromAddress(t){return new dE(t)}async sendInternalMessage(t,r,i,o){await t.internal(r,{value:o,sendMode:fo.SendMode.PAY_GAS_SEPARATELY,body:i})}async sendDeploy(t,r,i){await t.internal(r,{value:i,sendMode:fo.SendMode.PAY_GAS_SEPARATELY,body:fo.beginCell().endCell()})}async getVerifier(t,r){let i=await t.get("get_verifier",[{type:"int",value:r}]);const o=i.stack.readCell(),a=i.stack.readCellOpt();return i.stack.readNumber()==0?{admin:null,settings:null}:{admin:o.beginParse().loadAddress(),settings:a}}async getVerifiersNum(t){return(await t.get("get_verifiers_num",[])).stack.readNumber()}async getVerifiers(t){const a=(await t.get("get_verifiers",[])).stack.readCell().beginParse().loadDict(fo.Dictionary.Keys.BigUint(256),$1e());return Array.from(a.values()).map(s=>{const l=s.loadAddress(),u=s.loadUint(8),c=s.loadDict(fo.Dictionary.Keys.BigUint(256),fo.Dictionary.Values.BigUint(32));return{admin:l,quorum:u,pubKeyEndpoints:Object.fromEntries(Array.from(c).map(([d,p])=>[XN(d,32).toString("base64"),j1e(p)])),name:s.loadRef().beginParse().loadStringTail(),url:s.loadRef().beginParse().loadStringTail()}})}}const F1e=e=>{const t=new Xk.Sha256;return t.update(e),Buffer.from(t.digestSync())};class Fx{constructor(t,r){this.address=t,this.init=r}static createFromAddress(t){return new Fx(t)}async sendInternalMessage(t,r,i,o){await t.internal(r,{value:o,sendMode:fo.SendMode.PAY_GAS_SEPARATELY,body:i})}async sendDeploy(t,r,i,o=!0){await t.internal(r,{value:i,sendMode:fo.SendMode.PAY_GAS_SEPARATELY,body:fo.beginCell().endCell(),bounce:o})}async getChildAddressFromChain(t,r,i){return(await t.get("get_source_item_address",[{type:"int",value:Ib(F1e(r))},{type:"int",value:Ib(Buffer.from(i,"base64"))}])).stack.readCell().beginParse().loadAddress()}async getVerifierRegistryAddress(t){return(await t.get("get_verifier_registry_address",[])).stack.readCell().beginParse().loadAddress()}async getAdminAddress(t){return(await t.get("get_admin_address",[])).stack.readCell().beginParse().loadMaybeAddress()}async getCodeOpt(t){const r=await t.getState();return r.state.type!="active"?null:r.state.code}async getDeploymentCosts(t){const r=await t.get("get_deployment_costs",[]),i=r.stack.readBigNumber(),o=r.stack.readBigNumber();return{min:fo.fromNano(i),max:fo.fromNano(o)}}}async function JN(e,t){return(await t.open(Fx.createFromAddress(e)).getAdminAddress())?.toString()}function Dy(){const e=Vn.Address.parse(window.sourcesRegistryAddress);return bc(["sourcesRegistry",e],async()=>{const t=await yp(),r=await JN(e,t),i=t.open(Fx.createFromAddress(e)),o=(await i.getVerifierRegistryAddress()).toString(),a=await i.getDeploymentCosts(),s=Vn.Cell.fromBoc((await t.getContractState(e)).code)[0].hash().toString("base64");return{admin:r,verifierRegistry:o,codeCellHash:s,address:e,deploymentCosts:a}})}function zx(){const{data:e}=Dy();return bc(["verifierRegistry",e?.verifierRegistry],async()=>await(await yp()).open(dE.createFromAddress(Vn.Address.parse(e.verifierRegistry))).getVerifiers())}function ej(e){return e[Math.floor(Math.random()*e.length)]}function z1e(e){return new Blob([JSON.stringify(e)],{type:"application/json"})}const m1=window.isTestnet?"https://ton-source-prod-testnet-1.herokuapp.com".split(","):"https://ton-source-prod-1.herokuapp.com,https://ton-source-prod-2.herokuapp.com,https://ton-source-prod-3.herokuapp.com".split(","),H1e=Py(e=>({status:null,setStatus:t=>e({status:t}),clear:()=>e({status:null})}));function Hu(){const{contractAddress:e}=$u(),{data:t}=vp(),{hasFiles:r,files:i}=zu(),{compiler:o,compilerSettings:a}=cE(),s=Bx(),{clear:l,setStatus:u,status:c}=H1e(),{data:d}=zx(),p=d?.find(x=>x.name===window.verifierId);return{...B1e(["submitSources"],async()=>{if(!e||!t?.codeCellHash.base64||!r()||!p)return;if(!s)throw new Error("Wallet is not connected");l();const x=p.quorum;let b=x,y;wa(ha.COMPILE_SUBMIT);const _=new FormData;for(const j of i)_.append((j.folder?j.folder+"/":"")+j.fileObj.name,j.fileObj);_.append("json",z1e({compiler:o,compilerSettings:a,knownContractAddress:e,knownContractHash:t.codeCellHash.base64,sources:i.map(j=>({includeInCommand:j.includeInCommand,isEntrypoint:j.isEntrypoint,isStdLib:j.isStdlib,hasIncludeDirectives:j.hasIncludeDirectives,folder:j.folder})),senderAddress:s}));const k=m1[Math.floor(Math.random()*m1.length)],E=await fetch(`${k}/source`,{method:"POST",body:_});if(E.status!==200)throw wa(ha.COMPILE_SERVER_ERROR),new Error(`Error compiling on ${k} ${await E.text()}`);const B=await E.json(),U=[];["unknown_error","compile_error"].includes(B.compileResult.result)&&(wa(ha.COMPILE_COMPILATION_ERROR),i.some(j=>j.isStdlib)?i[0].isStdlib||U.push(Na.STDLIB_ORDER):Na.STDLIB_MISSING,i.some(j=>j.isEntrypoint)||U.push(Na.ENTRYPOINT_MISSING),U.push(Na.COMPILER_VERSION),U.push(Na.REQUIRED_FILES),U.push(Na.FILE_ORDER)),B.compileResult.result==="not_similar"&&(wa(ha.COMPILE_HASHES_NOT_SIMILAR),U.push(Na.NOT_SIMILAR)),B.compileResult.result!=="similar"&&U.push(Na.SUPPORT_GROUP),B.compileResult.result==="similar"&&wa(ha.COMPILE_SUCCESS_HASHES_MATCH);let D;if(B.msgCell){b--;const j=new Set([k]);for(y=B.msgCell;b;){u(`Compile successful. Collected ${x-b}/${x}`);const H=ej(m1.filter(ae=>!j.has(ae)));if(!H)throw new Error("Not enough backends to collect signatures");console.log("Backends used: "+[...j],"; next backend",H);const W=await fetch(`${H}/sign`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({messageCell:y})});if(W.status!==200)throw wa(ha.SIGN_SERVER_ERROR),new Error(`Error collecting signatures from ${H} ${await W.text()}`);wa(ha.SIGN_SERVER_SUCCESS),y=(await W.json()).msgCell,b--}u(`Compile successful. Collected ${x-b}/${x}`),D=Vn.Cell.fromBoc(Buffer.from(B.msgCell))[0].beginParse().loadUint(64)}return{result:{...B,msgCell:y},hints:U,queryId:D,status:c}}),compileStatus:c}}var Na=(e=>(e[e.STDLIB_ORDER=0]="STDLIB_ORDER",e[e.STDLIB_MISSING=1]="STDLIB_MISSING",e[e.NOT_SIMILAR=2]="NOT_SIMILAR",e[e.COMPILER_VERSION=3]="COMPILER_VERSION",e[e.REQUIRED_FILES=4]="REQUIRED_FILES",e[e.FILE_ORDER=5]="FILE_ORDER",e[e.ENTRYPOINT_MISSING=6]="ENTRYPOINT_MISSING",e[e.SUPPORT_GROUP=7]="SUPPORT_GROUP",e))(Na||{});const fE=()=>{const[e]=kg();return async(t,r,i,o)=>{try{let a;if(o){const l=Vn.beginCell();Vn.storeStateInit(o)(l),a=l.asCell()}const s={validUntil:Date.now()+5*60*1e3,messages:[{address:t,amount:r.toString(),stateInit:a?a.toBoc().toString("base64"):void 0,payload:i?.toBoc().toString("base64")}]};return await e.sendTransaction(s),"issued"}catch(a){return console.error(a),"rejected"}}},W1e=Py((e,t)=>({txns:{},updateTxn:(r,i)=>{e(o=>({txns:{...t().txns,[r]:i}}))}}));function tj(e,t){const r=fE(),{updateTxn:i,txns:o}=W1e();return X.exports.useEffect(()=>{o[e]||i(e,"initial")},[]),{sendTXN:async(a,s,l,u)=>{i(e,"pending");const c=await r(a.toString(),s,l,u);let d=1;if(c==="issued"){i(e,"issued");const p=setInterval(async()=>{const v=await t(d);d++,i(e,v),v!=="issued"&&clearInterval(p)},2e3)}else c==="rejected"&&i(e,"rejected")},data:{status:o[e]},clearTXN:()=>{i(e,"initial")}}}function rj(){const{data:e}=Hu(),{data:t}=vp(),{data:r}=Dy(),{sendTXN:i,data:o,clearTXN:a}=tj("publishProof",async s=>{const l=await pE(t.codeCellHash.base64);return s>20?"error":l?"success":"issued"});return X.exports.useEffect(()=>{switch(o.status){case"pending":wa(ha.PUBLISH_CLICK);break;case"issued":wa(ha.TRANSACTION_ISSUED);break;case"rejected":wa(ha.TRANSACTION_REJECTED);break;case"error":wa(ha.TRANSACTION_ERROR);break;case"expired":wa(ha.TRANSACTION_EXPIRED);break;case"success":wa(ha.CONTRACT_DEPLOYED);break}},[o.status]),{sendTXN:()=>{i(Vn.Address.parse(r.verifierRegistry),Vn.toNano("0.5"),Vn.Cell.fromBoc(Buffer.from(e.result.msgCell))[0])},status:o.status,clearTXN:a}}const V1e=e=>{const t=new Xk.Sha256;return t.update(e),Buffer.from(t.digestSync())};async function pE(e){return ContractVerifier.getSourcesJsonUrl(e,{verifier:window.verifierId,testnet:window.isTestnet})}function Pc(){const{contractAddress:e}=$u(),{data:t,error:r}=vp(),{status:i}=rj(),{isLoading:o,error:a,data:s,refetch:l}=bc([e,"proof"],async()=>{if(!e)return{hasOnchainProof:!1};const u=await pE(t.codeCellHash.base64);return u?{hasOnchainProof:!0,...await ContractVerifier.getSourcesData(u,{testnet:window.isTestnet})}:{hasOnchainProof:!1,ipfsLink:u}},{enabled:!!e&&!!t?.codeCellHash.base64&&i==="initial",retry:2});return{isLoading:o,error:a??r,data:s,refetch:l}}function q1e(){const{data:e}=Pc();return X.exports.useEffect(()=>{!e?.files||ContractVerifierUI.loadSourcesData(e,{containerSelector:"#myVerifierContainer",fileListSelector:"#myVerifierFiles",contentSelector:"#myVerifierContent",theme:"light"})},[e?.files]),{hasOnchainProof:e?.hasOnchainProof}}function K1e({button:e}){return q1e(),Ut("div",{id:"myVerifierContainer",style:{color:"black"},children:[L("div",{id:"myVerifierFiles"}),Ut("div",{style:{position:"relative",overflow:"hidden",width:"100%"},children:[L("div",{id:"myVerifierContent"}),L("div",{style:{position:"absolute",top:-73,right:-24,zIndex:3},children:e})]})]})}var hE={exports:{}};function gE(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(function(t){var r=e[t];typeof r=="object"&&!Object.isFrozen(r)&&gE(r)}),e}hE.exports=gE;hE.exports.default=gE;class sM{constructor(t){t.data===void 0&&(t.data={}),this.data=t.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function nj(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function rd(e,...t){const r=Object.create(null);for(const i in e)r[i]=e[i];return t.forEach(function(i){for(const o in i)r[o]=i[o]}),r}const G1e="",lM=e=>!!e.scope||e.sublanguage&&e.language,Y1e=(e,{prefix:t})=>{if(e.includes(".")){const r=e.split(".");return[`${t}${r.shift()}`,...r.map((i,o)=>`${i}${"_".repeat(o+1)}`)].join(" ")}return`${t}${e}`};class Q1e{constructor(t,r){this.buffer="",this.classPrefix=r.classPrefix,t.walk(this)}addText(t){this.buffer+=nj(t)}openNode(t){if(!lM(t))return;let r="";t.sublanguage?r=`language-${t.language}`:r=Y1e(t.scope,{prefix:this.classPrefix}),this.span(r)}closeNode(t){!lM(t)||(this.buffer+=G1e)}value(){return this.buffer}span(t){this.buffer+=``}}const uM=(e={})=>{const t={children:[]};return Object.assign(t,e),t};class mE{constructor(){this.rootNode=uM(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(t){this.top.children.push(t)}openNode(t){const r=uM({scope:t});this.add(r),this.stack.push(r)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(t){return this.constructor._walk(t,this.rootNode)}static _walk(t,r){return typeof r=="string"?t.addText(r):r.children&&(t.openNode(r),r.children.forEach(i=>this._walk(t,i)),t.closeNode(r)),t}static _collapse(t){typeof t!="string"&&(!t.children||(t.children.every(r=>typeof r=="string")?t.children=[t.children.join("")]:t.children.forEach(r=>{mE._collapse(r)})))}}class Z1e extends mE{constructor(t){super(),this.options=t}addKeyword(t,r){t!==""&&(this.openNode(r),this.addText(t),this.closeNode())}addText(t){t!==""&&this.add(t)}addSublanguage(t,r){const i=t.root;i.sublanguage=!0,i.language=r,this.add(i)}toHTML(){return new Q1e(this,this.options).value()}finalize(){return!0}}function X0(e){return e?typeof e=="string"?e:e.source:null}function ij(e){return bp("(?=",e,")")}function X1e(e){return bp("(?:",e,")*")}function J1e(e){return bp("(?:",e,")?")}function bp(...e){return e.map(r=>X0(r)).join("")}function ebe(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function yE(...e){return"("+(ebe(e).capture?"":"?:")+e.map(i=>X0(i)).join("|")+")"}function oj(e){return new RegExp(e.toString()+"|").exec("").length-1}function tbe(e,t){const r=e&&e.exec(t);return r&&r.index===0}const rbe=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function vE(e,{joinWith:t}){let r=0;return e.map(i=>{r+=1;const o=r;let a=X0(i),s="";for(;a.length>0;){const l=rbe.exec(a);if(!l){s+=a;break}s+=a.substring(0,l.index),a=a.substring(l.index+l[0].length),l[0][0]==="\\"&&l[1]?s+="\\"+String(Number(l[1])+o):(s+=l[0],l[0]==="("&&r++)}return s}).map(i=>`(${i})`).join(t)}const nbe=/\b\B/,aj="[a-zA-Z]\\w*",bE="[a-zA-Z_]\\w*",sj="\\b\\d+(\\.\\d+)?",lj="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",uj="\\b(0b[01]+)",ibe="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",obe=(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=bp(t,/.*\b/,e.binary,/\b.*/)),rd({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(r,i)=>{r.index!==0&&i.ignoreMatch()}},e)},J0={begin:"\\\\[\\s\\S]",relevance:0},abe={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[J0]},sbe={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[J0]},lbe={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},Hx=function(e,t,r={}){const i=rd({scope:"comment",begin:e,end:t,contains:[]},r);i.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const o=yE("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return i.contains.push({begin:bp(/[ ]+/,"(",o,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),i},ube=Hx("//","$"),cbe=Hx("/\\*","\\*/"),dbe=Hx("#","$"),fbe={scope:"number",begin:sj,relevance:0},pbe={scope:"number",begin:lj,relevance:0},hbe={scope:"number",begin:uj,relevance:0},gbe={begin:/(?=\/[^/\n]*\/)/,contains:[{scope:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[J0,{begin:/\[/,end:/\]/,relevance:0,contains:[J0]}]}]},mbe={scope:"title",begin:aj,relevance:0},ybe={scope:"title",begin:bE,relevance:0},vbe={begin:"\\.\\s*"+bE,relevance:0},bbe=function(e){return Object.assign(e,{"on:begin":(t,r)=>{r.data._beginMatch=t[1]},"on:end":(t,r)=>{r.data._beginMatch!==t[1]&&r.ignoreMatch()}})};var jv=Object.freeze({__proto__:null,MATCH_NOTHING_RE:nbe,IDENT_RE:aj,UNDERSCORE_IDENT_RE:bE,NUMBER_RE:sj,C_NUMBER_RE:lj,BINARY_NUMBER_RE:uj,RE_STARTERS_RE:ibe,SHEBANG:obe,BACKSLASH_ESCAPE:J0,APOS_STRING_MODE:abe,QUOTE_STRING_MODE:sbe,PHRASAL_WORDS_MODE:lbe,COMMENT:Hx,C_LINE_COMMENT_MODE:ube,C_BLOCK_COMMENT_MODE:cbe,HASH_COMMENT_MODE:dbe,NUMBER_MODE:fbe,C_NUMBER_MODE:pbe,BINARY_NUMBER_MODE:hbe,REGEXP_MODE:gbe,TITLE_MODE:mbe,UNDERSCORE_TITLE_MODE:ybe,METHOD_GUARD:vbe,END_SAME_AS_BEGIN:bbe});function wbe(e,t){e.input[e.index-1]==="."&&t.ignoreMatch()}function xbe(e,t){e.className!==void 0&&(e.scope=e.className,delete e.className)}function _be(e,t){!t||!e.beginKeywords||(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=wbe,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function Sbe(e,t){!Array.isArray(e.illegal)||(e.illegal=yE(...e.illegal))}function Cbe(e,t){if(!!e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function kbe(e,t){e.relevance===void 0&&(e.relevance=1)}const Ebe=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");const r=Object.assign({},e);Object.keys(e).forEach(i=>{delete e[i]}),e.keywords=r.keywords,e.begin=bp(r.beforeMatch,ij(r.begin)),e.starts={relevance:0,contains:[Object.assign(r,{endsParent:!0})]},e.relevance=0,delete r.beforeMatch},Abe=["of","and","for","in","not","or","if","then","parent","list","value"],Tbe="keyword";function cj(e,t,r=Tbe){const i=Object.create(null);return typeof e=="string"?o(r,e.split(" ")):Array.isArray(e)?o(r,e):Object.keys(e).forEach(function(a){Object.assign(i,cj(e[a],t,a))}),i;function o(a,s){t&&(s=s.map(l=>l.toLowerCase())),s.forEach(function(l){const u=l.split("|");i[u[0]]=[a,Ibe(u[0],u[1])]})}}function Ibe(e,t){return t?Number(t):Rbe(e)?0:1}function Rbe(e){return Abe.includes(e.toLowerCase())}const cM={},Af=e=>{console.error(e)},dM=(e,...t)=>{console.log(`WARN: ${e}`,...t)},jp=(e,t)=>{cM[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),cM[`${e}/${t}`]=!0)},Rb=new Error;function dj(e,t,{key:r}){let i=0;const o=e[r],a={},s={};for(let l=1;l<=t.length;l++)s[l+i]=o[l],a[l+i]=!0,i+=oj(t[l-1]);e[r]=s,e[r]._emit=a,e[r]._multi=!0}function Pbe(e){if(!!Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw Af("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Rb;if(typeof e.beginScope!="object"||e.beginScope===null)throw Af("beginScope must be object"),Rb;dj(e,e.begin,{key:"beginScope"}),e.begin=vE(e.begin,{joinWith:""})}}function Mbe(e){if(!!Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw Af("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Rb;if(typeof e.endScope!="object"||e.endScope===null)throw Af("endScope must be object"),Rb;dj(e,e.end,{key:"endScope"}),e.end=vE(e.end,{joinWith:""})}}function Obe(e){e.scope&&typeof e.scope=="object"&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function Bbe(e){Obe(e),typeof e.beginScope=="string"&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope=="string"&&(e.endScope={_wrap:e.endScope}),Pbe(e),Mbe(e)}function Ube(e){function t(s,l){return new RegExp(X0(s),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(l?"g":""))}class r{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(l,u){u.position=this.position++,this.matchIndexes[this.matchAt]=u,this.regexes.push([u,l]),this.matchAt+=oj(l)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const l=this.regexes.map(u=>u[1]);this.matcherRe=t(vE(l,{joinWith:"|"}),!0),this.lastIndex=0}exec(l){this.matcherRe.lastIndex=this.lastIndex;const u=this.matcherRe.exec(l);if(!u)return null;const c=u.findIndex((p,v)=>v>0&&p!==void 0),d=this.matchIndexes[c];return u.splice(0,c),Object.assign(u,d)}}class i{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(l){if(this.multiRegexes[l])return this.multiRegexes[l];const u=new r;return this.rules.slice(l).forEach(([c,d])=>u.addRule(c,d)),u.compile(),this.multiRegexes[l]=u,u}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(l,u){this.rules.push([l,u]),u.type==="begin"&&this.count++}exec(l){const u=this.getMatcher(this.regexIndex);u.lastIndex=this.lastIndex;let c=u.exec(l);if(this.resumingScanAtSamePosition()&&!(c&&c.index===this.lastIndex)){const d=this.getMatcher(0);d.lastIndex=this.lastIndex+1,c=d.exec(l)}return c&&(this.regexIndex+=c.position+1,this.regexIndex===this.count&&this.considerAll()),c}}function o(s){const l=new i;return s.contains.forEach(u=>l.addRule(u.begin,{rule:u,type:"begin"})),s.terminatorEnd&&l.addRule(s.terminatorEnd,{type:"end"}),s.illegal&&l.addRule(s.illegal,{type:"illegal"}),l}function a(s,l){const u=s;if(s.isCompiled)return u;[xbe,Cbe,Bbe,Ebe].forEach(d=>d(s,l)),e.compilerExtensions.forEach(d=>d(s,l)),s.__beforeBegin=null,[_be,Sbe,kbe].forEach(d=>d(s,l)),s.isCompiled=!0;let c=null;return typeof s.keywords=="object"&&s.keywords.$pattern&&(s.keywords=Object.assign({},s.keywords),c=s.keywords.$pattern,delete s.keywords.$pattern),c=c||/\w+/,s.keywords&&(s.keywords=cj(s.keywords,e.case_insensitive)),u.keywordPatternRe=t(c,!0),l&&(s.begin||(s.begin=/\B|\b/),u.beginRe=t(u.begin),!s.end&&!s.endsWithParent&&(s.end=/\B|\b/),s.end&&(u.endRe=t(u.end)),u.terminatorEnd=X0(u.end)||"",s.endsWithParent&&l.terminatorEnd&&(u.terminatorEnd+=(s.end?"|":"")+l.terminatorEnd)),s.illegal&&(u.illegalRe=t(s.illegal)),s.contains||(s.contains=[]),s.contains=[].concat(...s.contains.map(function(d){return Dbe(d==="self"?s:d)})),s.contains.forEach(function(d){a(d,u)}),s.starts&&a(s.starts,l),u.matcher=o(u),u}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=rd(e.classNameAliases||{}),a(e)}function fj(e){return e?e.endsWithParent||fj(e.starts):!1}function Dbe(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return rd(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:fj(e)?rd(e,{starts:e.starts?rd(e.starts):null}):Object.isFrozen(e)?rd(e):e}var Lbe="11.6.0";class Nbe extends Error{constructor(t,r){super(t),this.name="HTMLInjectionError",this.html=r}}const q5=nj,fM=rd,pM=Symbol("nomatch"),jbe=7,$be=function(e){const t=Object.create(null),r=Object.create(null),i=[];let o=!0;const a="Could not find the language '{}', did you forget to load/include a language module?",s={disableAutodetect:!0,name:"Plain text",contains:[]};let l={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:Z1e};function u(le){return l.noHighlightRe.test(le)}function c(le){let pe=le.className+" ";pe+=le.parentNode?le.parentNode.className:"";const _e=l.languageDetectRe.exec(pe);if(_e){const J=W(_e[1]);return J||(dM(a.replace("{}",_e[1])),dM("Falling back to no-highlight mode for this block.",le)),J?_e[1]:"no-highlight"}return pe.split(/\s+/).find(J=>u(J)||W(J))}function d(le,pe,_e){let J="",ft="";typeof pe=="object"?(J=le,_e=pe.ignoreIllegals,ft=pe.language):(jp("10.7.0","highlight(lang, code, ...args) has been deprecated."),jp("10.7.0",`Please use highlight(code, options) instead. https://github.com/highlightjs/highlight.js/issues/2277`),ft=le,J=pe),_e===void 0&&(_e=!0);const Le={code:J,language:ft};P("before:highlight",Le);const He=Le.result?Le.result:p(Le.language,Le.code,_e);return He.code=Le.code,P("after:highlight",He),He}function p(le,pe,_e,J){const ft=Object.create(null);function Le(ie,de){return ie.keywords[de]}function He(){if(!Ie.keywords){fe.addText(Be);return}let ie=0;Ie.keywordPatternRe.lastIndex=0;let de=Ie.keywordPatternRe.exec(Be),$="";for(;de;){$+=Be.substring(ie,de.index);const C=ne.case_insensitive?de[0].toLowerCase():de[0],T=Le(Ie,C);if(T){const[Q,ve]=T;if(fe.addText($),$="",ft[C]=(ft[C]||0)+1,ft[C]<=jbe&&(rt+=ve),Q.startsWith("_"))$+=de[0];else{const je=ne.classNameAliases[Q]||Q;fe.addKeyword(de[0],je)}}else $+=de[0];ie=Ie.keywordPatternRe.lastIndex,de=Ie.keywordPatternRe.exec(Be)}$+=Be.substring(ie),fe.addText($)}function nr(){if(Be==="")return;let ie=null;if(typeof Ie.subLanguage=="string"){if(!t[Ie.subLanguage]){fe.addText(Be);return}ie=p(Ie.subLanguage,Be,!0,Ae[Ie.subLanguage]),Ae[Ie.subLanguage]=ie._top}else ie=x(Be,Ie.subLanguage.length?Ie.subLanguage:null);Ie.relevance>0&&(rt+=ie.relevance),fe.addSublanguage(ie._emitter,ie.language)}function Bt(){Ie.subLanguage!=null?nr():He(),Be=""}function Rt(ie,de){let $=1;const C=de.length-1;for(;$<=C;){if(!ie._emit[$]){$++;continue}const T=ne.classNameAliases[ie[$]]||ie[$],Q=de[$];T?fe.addKeyword(Q,T):(Be=Q,He(),Be=""),$++}}function Jt(ie,de){return ie.scope&&typeof ie.scope=="string"&&fe.openNode(ne.classNameAliases[ie.scope]||ie.scope),ie.beginScope&&(ie.beginScope._wrap?(fe.addKeyword(Be,ne.classNameAliases[ie.beginScope._wrap]||ie.beginScope._wrap),Be=""):ie.beginScope._multi&&(Rt(ie.beginScope,de),Be="")),Ie=Object.create(ie,{parent:{value:Ie}}),Ie}function vr(ie,de,$){let C=tbe(ie.endRe,$);if(C){if(ie["on:end"]){const T=new sM(ie);ie["on:end"](de,T),T.isMatchIgnored&&(C=!1)}if(C){for(;ie.endsParent&&ie.parent;)ie=ie.parent;return ie}}if(ie.endsWithParent)return vr(ie.parent,de,$)}function At(ie){return Ie.matcher.regexIndex===0?(Be+=ie[0],1):(ce=!0,0)}function kt(ie){const de=ie[0],$=ie.rule,C=new sM($),T=[$.__beforeBegin,$["on:begin"]];for(const Q of T)if(!!Q&&(Q(ie,C),C.isMatchIgnored))return At(de);return $.skip?Be+=de:($.excludeBegin&&(Be+=de),Bt(),!$.returnBegin&&!$.excludeBegin&&(Be=de)),Jt($,ie),$.returnBegin?0:de.length}function Ct(ie){const de=ie[0],$=pe.substring(ie.index),C=vr(Ie,ie,$);if(!C)return pM;const T=Ie;Ie.endScope&&Ie.endScope._wrap?(Bt(),fe.addKeyword(de,Ie.endScope._wrap)):Ie.endScope&&Ie.endScope._multi?(Bt(),Rt(Ie.endScope,ie)):T.skip?Be+=de:(T.returnEnd||T.excludeEnd||(Be+=de),Bt(),T.excludeEnd&&(Be=de));do Ie.scope&&fe.closeNode(),!Ie.skip&&!Ie.subLanguage&&(rt+=Ie.relevance),Ie=Ie.parent;while(Ie!==C.parent);return C.starts&&Jt(C.starts,ie),T.returnEnd?0:de.length}function Lt(){const ie=[];for(let de=Ie;de!==ne;de=de.parent)de.scope&&ie.unshift(de.scope);ie.forEach(de=>fe.openNode(de))}let Kt={};function yr(ie,de){const $=de&&de[0];if(Be+=ie,$==null)return Bt(),0;if(Kt.type==="begin"&&de.type==="end"&&Kt.index===de.index&&$===""){if(Be+=pe.slice(de.index,de.index+1),!o){const C=new Error(`0 width match regex (${le})`);throw C.languageName=le,C.badRule=Kt.rule,C}return 1}if(Kt=de,de.type==="begin")return kt(de);if(de.type==="illegal"&&!_e){const C=new Error('Illegal lexeme "'+$+'" for mode "'+(Ie.scope||"")+'"');throw C.mode=Ie,C}else if(de.type==="end"){const C=Ct(de);if(C!==pM)return C}if(de.type==="illegal"&&$==="")return 1;if(jt>1e5&&jt>de.index*3)throw new Error("potential infinite loop, way more iterations than matches");return Be+=$,$.length}const ne=W(le);if(!ne)throw Af(a.replace("{}",le)),new Error('Unknown language: "'+le+'"');const Mt=Ube(ne);let Nt="",Ie=J||Mt;const Ae={},fe=new l.__emitter(l);Lt();let Be="",rt=0,lt=0,jt=0,ce=!1;try{for(Ie.matcher.considerAll();;){jt++,ce?ce=!1:Ie.matcher.considerAll(),Ie.matcher.lastIndex=lt;const ie=Ie.matcher.exec(pe);if(!ie)break;const de=pe.substring(lt,ie.index),$=yr(de,ie);lt=ie.index+$}return yr(pe.substring(lt)),fe.closeAllNodes(),fe.finalize(),Nt=fe.toHTML(),{language:le,value:Nt,relevance:rt,illegal:!1,_emitter:fe,_top:Ie}}catch(ie){if(ie.message&&ie.message.includes("Illegal"))return{language:le,value:q5(pe),illegal:!0,relevance:0,_illegalBy:{message:ie.message,index:lt,context:pe.slice(lt-100,lt+100),mode:ie.mode,resultSoFar:Nt},_emitter:fe};if(o)return{language:le,value:q5(pe),illegal:!1,relevance:0,errorRaised:ie,_emitter:fe,_top:Ie};throw ie}}function v(le){const pe={value:q5(le),illegal:!1,relevance:0,_top:s,_emitter:new l.__emitter(l)};return pe._emitter.addText(le),pe}function x(le,pe){pe=pe||l.languages||Object.keys(t);const _e=v(le),J=pe.filter(W).filter(ae).map(Bt=>p(Bt,le,!1));J.unshift(_e);const ft=J.sort((Bt,Rt)=>{if(Bt.relevance!==Rt.relevance)return Rt.relevance-Bt.relevance;if(Bt.language&&Rt.language){if(W(Bt.language).supersetOf===Rt.language)return 1;if(W(Rt.language).supersetOf===Bt.language)return-1}return 0}),[Le,He]=ft,nr=Le;return nr.secondBest=He,nr}function b(le,pe,_e){const J=pe&&r[pe]||_e;le.classList.add("hljs"),le.classList.add(`language-${J}`)}function y(le){let pe=null;const _e=c(le);if(u(_e))return;if(P("before:highlightElement",{el:le,language:_e}),le.children.length>0&&(l.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(le)),l.throwUnescapedHTML))throw new Nbe("One of your code blocks includes unescaped HTML.",le.innerHTML);pe=le;const J=pe.textContent,ft=_e?d(J,{language:_e,ignoreIllegals:!0}):x(J);le.innerHTML=ft.value,b(le,_e,ft.language),le.result={language:ft.language,re:ft.relevance,relevance:ft.relevance},ft.secondBest&&(le.secondBest={language:ft.secondBest.language,relevance:ft.secondBest.relevance}),P("after:highlightElement",{el:le,result:ft,text:J})}function _(le){l=fM(l,le)}const k=()=>{U(),jp("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function E(){U(),jp("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let B=!1;function U(){if(document.readyState==="loading"){B=!0;return}document.querySelectorAll(l.cssSelector).forEach(y)}function D(){B&&U()}typeof window<"u"&&window.addEventListener&&window.addEventListener("DOMContentLoaded",D,!1);function j(le,pe){let _e=null;try{_e=pe(e)}catch(J){if(Af("Language definition for '{}' could not be registered.".replace("{}",le)),o)Af(J);else throw J;_e=s}_e.name||(_e.name=le),t[le]=_e,_e.rawDefinition=pe.bind(null,e),_e.aliases&&G(_e.aliases,{languageName:le})}function F(le){delete t[le];for(const pe of Object.keys(r))r[pe]===le&&delete r[pe]}function H(){return Object.keys(t)}function W(le){return le=(le||"").toLowerCase(),t[le]||t[r[le]]}function G(le,{languageName:pe}){typeof le=="string"&&(le=[le]),le.forEach(_e=>{r[_e.toLowerCase()]=pe})}function ae(le){const pe=W(le);return pe&&!pe.disableAutodetect}function V(le){le["before:highlightBlock"]&&!le["before:highlightElement"]&&(le["before:highlightElement"]=pe=>{le["before:highlightBlock"](Object.assign({block:pe.el},pe))}),le["after:highlightBlock"]&&!le["after:highlightElement"]&&(le["after:highlightElement"]=pe=>{le["after:highlightBlock"](Object.assign({block:pe.el},pe))})}function oe(le){V(le),i.push(le)}function P(le,pe){const _e=le;i.forEach(function(J){J[_e]&&J[_e](pe)})}function ee(le){return jp("10.7.0","highlightBlock will be removed entirely in v12.0"),jp("10.7.0","Please use highlightElement now."),y(le)}Object.assign(e,{highlight:d,highlightAuto:x,highlightAll:U,highlightElement:y,highlightBlock:ee,configure:_,initHighlighting:k,initHighlightingOnLoad:E,registerLanguage:j,unregisterLanguage:F,listLanguages:H,getLanguage:W,registerAliases:G,autoDetection:ae,inherit:fM,addPlugin:oe}),e.debugMode=function(){o=!1},e.safeMode=function(){o=!0},e.versionString=Lbe,e.regex={concat:bp,lookahead:ij,either:yE,optional:J1e,anyNumberOfTimes:X1e};for(const le in jv)typeof jv[le]=="object"&&hE.exports(jv[le]);return Object.assign(e,jv),e};var ey=$be({}),Fbe=ey;ey.HighlightJS=ey;ey.default=ey;const pj=Fbe,hM='(?!")(`([^`]+)`|((?=_)_|(?=\\{)\\{|(?=\\})\\}|(?![_`{}]))([^;,\\[\\]\\(\\)\\s~.]+))',gM=/\"[^\n\"]+\"[Hhcusa]?/;let y4;try{y4=new RegExp("(-?(?!_)([\\d_]+|0x[\\d_a-fA-F]+)|0b[1_0]+)(?=/,/<=/,/=/,/>/,//,/>=/,/<=/,/!=/,/==/,/\^>>/,/~>>/,/>>/,/<>=/,/~>>=/,/\^>>=/,/&=/,/\^=/,/\|=/,/\^/,/=/,/~/,/\//,/%/,/-/,/\*/,/\+/,/>/,//,/#s/,/\$#/,/#/,/\$\+/,/\$,/,/\$\d/,/\$=/,/\$(?=\()/,/\$>smca/,/\$>s/,/\$@\+/,/\$@\?\+/,/\$@\?/,/\$@/,/\$cmp/,/\$len/,/\$pos/,/\$reverse/,/%1<>c/,/\*>>r/,/\*>>/,/\*mod/,/\*/,/\+!/,/\+/,/,/,/-!/,/-/,/-1</,/0=/,/0>/,/1\+!/,/1\+/,/1-!/,/1-/,/1</,/=/,/>>c/,/>>r/,/>>/,/>/,/\?dup/,/@'/,/@/,/B\+/,/B,/,/B=/,/B>Li@\+/,/B>Li@/,/B>Lu@\+/,/B>Lu@/,/B>boc/,/B>file/,/B>i@\+/,/B>i@/,/B>u@\+/,/B>u@/,/B@\?\+/,/B@\+/,/B@\?/,/B@/,/Bcmp/,/BhashB/,/Bhashu/,/Bhash/,/Blen/,/Bx\./,/B\|/,/Li>B/,/Lu>B/,/\[\]/,/\[compile\]/,/\[/,/\]/,/atom\?/,/b\+/,/b\._/,/b\./,/b>idict!\+/,/b>idict!/,/b>sdict!\+/,/b>sdict!/,/b>udict!\+/,/b>udict!/,/b>/,/boc+>B/,/boc>B/,/csr\./,/def\?/,/empty\?/,/eq\?/,/file-exists\?/,/file>B/,/i,/,/i>B/,/i@\+/,/i@/,/i@\?\+/,/i@\?/,/idict!\+/,/idict!/,/idict-/,/idict@-/,/idict@/,/null!/,/null\?/,/pfxdict!\+/,/pfxdict!/,/pfxdict@/,/priv>pub/,/ref@\+/,/ref@/,/ref@\?\+/,/ref@\?/,/s,/,/s>c/,/s>/,/sdict!\+/,/sdict!/,/sdict-/,/sdict@-/,/sdict@/,/smca>\$/,/sr,/,/tuple\?/,/u,/,/u>B/,/u@\+/,/u@\?\+/,/u@\?/,/udict!\+/,/udict!/,/udict-/,/udict@-/,/udict@/,/undef\?/,/x\._/,/x\./,/\|\+/,/\|/,/\|_/,new RegExp("(?<=\\s)\\.(?=\\s)"))},{scope:"number",match:e.regex.either(/(0[xX][0-9a-fA-F]+)/,/(0[bB][01]+)/,/(-?[0-9]+(\/-?[0-9]+)?)/)},{scope:"string",match:/"([^"\r\n\\]|\\.)*"/},{scope:"symbol",match:/[xX]\{[0-9a-fA-F_]*}/,relevance:10},{scope:"symbol",match:/[bB]\{[01]*}/,relevance:10},{scope:"symbol",match:/'[^\s]+/},{scope:"punctuation",match:/[\[\{\}\],]/}]}}const yM=/[a-zA-Z_][0-9a-zA-Z_]*/;function Wbe(e){return{name:"TL-B",aliases:["Tlb","tlb","TLB","tl-b","TL-b","Tl-B","Tl-b"],case_insensitive:!1,keywords:{keyword:[],literal:["True","BoolTrue","False","BoolFalse","Null"],type:["Type","Bool","Unit","Maybe","Either","Both","Cell","uint8","uint15","uint16","uint32","uint63","uint64","int8","int16","int32","int64","bits256","bits512"],built_in:[]},contains:[{scope:"comment",variants:[e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},{scope:"symbol",match:e.regex.either(/#[0-9a-f]*_?/,/\$[01]*_?/,/##/,/#<=/,/#=/,//)},{scope:"number",match:/[0-9]+/},{scope:"punctuation",match:/[;\(\):\[\]\{\}]/}]}}function Vbe(e){e.registerLanguage("fift",Hbe),e.registerLanguage("func",zbe),e.registerLanguage("tlb",Wbe)}Vbe(pj);function qbe({button:e}){const{data:t}=vp(),r=la(),i=aa(r.breakpoints.down("lg")),o=X.exports.useRef(null);return X.exports.useEffect(()=>{pj.highlightElement(o.current)},[t?.decompiled,o.current]),Ut("pre",{style:{overflow:"auto",height:800,marginTop:0,lineHeight:"25px",fontSize:14,paddingTop:"0.5em",fontFamily:"monospace"},children:[Ut("code",{className:"language-fift",style:{background:"#fff",display:"flex"},children:[L("div",{style:{textAlign:"right",color:"#728a96",paddingLeft:i?0:20},children:t?.decompiled?.trim().split(` `).map((a,s)=>s+1).join(` -`)}),L("div",{style:{background:"transparent",paddingLeft:20},ref:o,children:t?.decompiled})]}),e]})}const Kbe="/assets/verified-light.2c74da9f.svg",Gbe="/assets/download.62d50798.svg",Wx="/assets/copy.da496d78.svg";var hj={exports:{}};/*! +`)}),L("div",{style:{background:"transparent",paddingLeft:20},ref:o,children:t?.decompiled})]}),e]})}const Kbe="/verifier/assets/verified-light.2c74da9f.svg",Gbe="/verifier/assets/download.62d50798.svg",Wx="/verifier/assets/copy.da496d78.svg";var hj={exports:{}};/*! JSZip v3.10.1 - A JavaScript class for generating and reading zip files @@ -1227,7 +1227,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE `)[0];let Un,xo=$i.match(Fn)[0];switch(ii){case 2:Un=new RangeError(`Bad node name '${xo}'`);break;case 3:Un=new RangeError(`Bad field name '${xo}'`);break;case 4:Un=new RangeError(`Bad capture name @${xo}`);break;case 5:Un=new TypeError(`Bad pattern structure at offset ${Oi}: '${$i}'...`),xo="";break;default:Un=new SyntaxError(`Bad syntax at offset ${Oi}: '${$i}'...`),xo=""}throw Un.index=Oi,Un.length=xo.length,ir._free(Ht),Un}const kr=ir._ts_query_string_count(or),$r=ir._ts_query_capture_count(or),Vr=ir._ts_query_pattern_count(or),dn=new Array($r),yi=new Array(kr);for(let ii=0;ii<$r;ii++){const Oi=ir._ts_query_capture_name_for_id(or,ii,cn),$i=J(cn,"i32");dn[ii]=Kt(Oi,$i)}for(let ii=0;ii0){if(Un[0].type!=="string")throw new Error("Predicates must begin with a literal value");const Kd=Un[0].value;let Mc=!0;switch(Kd){case"not-eq?":Mc=!1;case"eq?":if(Un.length!==3)throw new Error(`Wrong number of arguments to \`#eq?\` predicate. Expected 2, got ${Un.length-1}`);if(Un[1].type!=="capture")throw new Error(`First argument of \`#eq?\` predicate must be a capture. Got "${Un[1].value}"`);if(Un[2].type==="capture"){const Ml=Un[1].name,Vu=Un[2].name;Aa[ii].push(function(xp){let qu,Bg;for(const _p of xp)_p.name===Ml&&(qu=_p.node),_p.name===Vu&&(Bg=_p.node);return qu===void 0||Bg===void 0||qu.text===Bg.text===Mc})}else{const Ml=Un[1].name,Vu=Un[2].value;Aa[ii].push(function(xp){for(const qu of xp)if(qu.name===Ml)return qu.node.text===Vu===Mc;return!0})}break;case"not-match?":Mc=!1;case"match?":if(Un.length!==3)throw new Error(`Wrong number of arguments to \`#match?\` predicate. Expected 2, got ${Un.length-1}.`);if(Un[1].type!=="capture")throw new Error(`First argument of \`#match?\` predicate must be a capture. Got "${Un[1].value}".`);if(Un[2].type!=="string")throw new Error(`Second argument of \`#match?\` predicate must be a string. Got @${Un[2].value}.`);const qy=Un[1].name,Xx=new RegExp(Un[2].value);Aa[ii].push(function(Ml){for(const Vu of Ml)if(Vu.name===qy)return Xx.test(Vu.node.text)===Mc;return!0});break;case"set!":if(Un.length<2||Un.length>3)throw new Error(`Wrong number of arguments to \`#set!\` predicate. Expected 1 or 2. Got ${Un.length-1}.`);if(Un.some(Ml=>Ml.type!=="string"))throw new Error('Arguments to `#set!` predicate must be a strings.".');qn[ii]||(qn[ii]={}),qn[ii][Un[1].value]=Un[2]?Un[2].value:null;break;case"is?":case"is-not?":if(Un.length<2||Un.length>3)throw new Error(`Wrong number of arguments to \`#${Kd}\` predicate. Expected 1 or 2. Got ${Un.length-1}.`);if(Un.some(Ml=>Ml.type!=="string"))throw new Error(`Arguments to \`#${Kd}\` predicate must be a strings.".`);const wp=Kd==="is?"?wi:so;wp[ii]||(wp[ii]={}),wp[ii][Un[1].value]=Un[2]?Un[2].value:null;break;default:Ko[ii].push({operator:Kd,operands:Un.slice(1)})}Un.length=0}}Object.freeze(qn[ii]),Object.freeze(wi[ii]),Object.freeze(so[ii])}return ir._free(Ht),new bo(gr,or,dn,Aa,Ko,Object.freeze(qn),Object.freeze(wi),Object.freeze(so))}static load(ke){let Ze;if(ke instanceof Uint8Array)Ze=Promise.resolve(ke);else{const or=ke;if(typeof process<"u"&&process.versions&&process.versions.node){const kr=Nm;Ze=Promise.resolve(kr.readFileSync(or))}else Ze=fetch(or).then(kr=>kr.arrayBuffer().then($r=>{if(kr.ok)return new Uint8Array($r);{const Vr=new TextDecoder("utf-8").decode($r);throw new Error(`Language.load failed with status ${kr.status}. ${Vr}`)}}))}const Ht=typeof loadSideModule=="function"?loadSideModule:Wi;return Ze.then(or=>Ht(or,{loadAsync:!0})).then(or=>{const kr=Object.keys(or),$r=kr.find(dn=>si.test(dn)&&!dn.includes("external_scanner_"));$r||console.log(`Couldn't find language function in WASM file. Symbols: -${JSON.stringify(kr,null,2)}`);const Vr=or[$r]();return new Li(gr,Vr)})}}class bo{constructor(ke,Ze,Ht,or,kr,$r,Vr,dn){To(ke),this[0]=Ze,this.captureNames=Ht,this.textPredicates=or,this.predicates=kr,this.setProperties=$r,this.assertedProperties=Vr,this.refutedProperties=dn,this.exceededMatchLimit=!1}delete(){ir._ts_query_delete(this[0]),this[0]=0}matches(ke,Ze,Ht,or){Ze||(Ze=Wr),Ht||(Ht=Wr),or||(or={});let kr=or.matchLimit;if(kr===void 0)kr=0;else if(typeof kr!="number")throw new Error("Arguments must be numbers");Qn(ke),ir._ts_query_matches_wasm(this[0],ke.tree[0],Ze.row,Ze.column,Ht.row,Ht.column,kr);const $r=J(cn,"i32"),Vr=J(cn+Gt,"i32"),dn=J(cn+2*Gt,"i32"),yi=new Array($r);this.exceededMatchLimit=!!dn;let qn=0,wi=Vr;for(let so=0;so<$r;so++){const Ko=J(wi,"i32"),Aa=J(wi+=Gt,"i32");wi+=Gt;const ii=new Array(Aa);if(wi=$o(this,ke.tree,wi,ii),this.textPredicates[Ko].every(Oi=>Oi(ii))){yi[qn++]={pattern:Ko,captures:ii};const Oi=this.setProperties[Ko];Oi&&(yi[so].setProperties=Oi);const $i=this.assertedProperties[Ko];$i&&(yi[so].assertedProperties=$i);const Un=this.refutedProperties[Ko];Un&&(yi[so].refutedProperties=Un)}}return yi.length=qn,ir._free(Vr),yi}captures(ke,Ze,Ht,or){Ze||(Ze=Wr),Ht||(Ht=Wr),or||(or={});let kr=or.matchLimit;if(kr===void 0)kr=0;else if(typeof kr!="number")throw new Error("Arguments must be numbers");Qn(ke),ir._ts_query_captures_wasm(this[0],ke.tree[0],Ze.row,Ze.column,Ht.row,Ht.column,kr);const $r=J(cn,"i32"),Vr=J(cn+Gt,"i32"),dn=J(cn+2*Gt,"i32"),yi=[];this.exceededMatchLimit=!!dn;const qn=[];let wi=Vr;for(let so=0;so<$r;so++){const Ko=J(wi,"i32"),Aa=J(wi+=Gt,"i32"),ii=J(wi+=Gt,"i32");if(wi+=Gt,qn.length=Aa,wi=$o(this,ke.tree,wi,qn),this.textPredicates[Ko].every(Oi=>Oi(qn))){const Oi=qn[ii],$i=this.setProperties[Ko];$i&&(Oi.setProperties=$i);const Un=this.assertedProperties[Ko];Un&&(Oi.assertedProperties=Un);const xo=this.refutedProperties[Ko];xo&&(Oi.refutedProperties=xo),yi.push(Oi)}}return ir._free(Vr),yi}predicatesForPattern(ke){return this.predicates[ke]}didExceedMatchLimit(){return this.exceededMatchLimit}}function wo(Ge,ke,Ze){const Ht=Ze-ke;let or=Ge.textCallback(ke,null,Ze);for(ke+=or.length;ke0))break;ke+=kr.length,or+=kr}return ke>Ze&&(or=or.slice(0,Ht)),or}function $o(Ge,ke,Ze,Ht){for(let or=0,kr=Ht.length;or{Ai.init(),c()}}))}}return s}();e.exports=i})(wj);const v4=wj.exports,xj=()=>(()=>{try{if(typeof WebAssembly=="object"&&typeof WebAssembly.instantiate=="function"){const e=new WebAssembly.Module(Uint8Array.of(0,97,115,109,1,0,0,0));if(e instanceof WebAssembly.Module)return new WebAssembly.Instance(e)instanceof WebAssembly.Instance}}catch{}return!1})(),nwe=()=>window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1";let b4;const iwe=async(e,t)=>{if(b4)return;const r={locateFile(){return e}};await v4.init(r),b4=await v4.Language.load(t)},owe=()=>{const e=new v4;return e.setLanguage(b4),e.setTimeoutMicros(1e3*1e3),e};async function awe(e){return xj()?(wa(ha.GETTER_PARSE_START),await iwe("./tree-sitter.wasm","./tree-sitter-func.wasm"),owe().parse(e).rootNode.children.filter(a=>a.type==="function_definition"&&a.children.find(s=>s.type==="specifiers_list")?.text.includes("method_id")).map(a=>{const s=a.children[0].children.filter(c=>!c.type.match(/[,()]/)).map(c=>c.text),l=a.children.find(c=>c.type==="function_name").text,u=a.children.find(c=>c.type==="parameter_list").children.filter(c=>c.type==="parameter_declaration").map(c=>({type:c.child(0).text,name:c.child(1).text}));return{returnTypes:s,name:l,parameters:u}})):[]}const swe=_g($x((e,t)=>({name:"",setName:r=>{e(i=>{i.name=r})},parameters:[],addParameter:()=>{e(r=>{const i=Math.random();r.parameters.push({name:"",_id:i,possibleTypes:["int","slice","address"],selectedTypeIdx:0,setValue:o=>r.parameters.find(a=>a._id===i).value=o,setName:o=>{e(a=>{a.parameters.find(s=>s._id===i).name=o})},toggleNextType:()=>{e(o=>{const a=o.parameters.find(s=>s._id===i);a.selectedTypeIdx=(a.selectedTypeIdx+1)%a.possibleTypes.length})},type:()=>{const o=t().parameters.find(a=>a._id===i);return o.possibleTypes[o.selectedTypeIdx]},originalType:()=>t().parameters.find(a=>a._id===i).possibleTypes[0],value:""})})},returnTypes:[],removeParameter:()=>{e(r=>{r.parameters.pop()})},clear:()=>{e(r=>{r.name="",r.parameters=[]})}})));function _j(){return swe()}const $v=(e,t,r)=>e.find(i=>i.name===t).parameters.find(i=>i.name===r),Sj=_g($x((e,t)=>({getters:[],setGetters:r=>{e(i=>{const o=r.map(a=>({name:a.name,parameters:a.parameters.map(s=>{const l=[s.type];return["cell","slice"].includes(s.type)&&l.push("address"),{name:s.name,value:"",possibleTypes:l,selectedTypeIdx:0,toggleNextType:()=>{e(u=>{const c=$v(u.getters,a.name,s.name);c.selectedTypeIdx=(c.selectedTypeIdx+1)%c.possibleTypes.length})},type:()=>{const u=$v(t().getters,a.name,s.name);return u.possibleTypes[u.selectedTypeIdx]},originalType:()=>$v(t().getters,a.name,s.name).possibleTypes[0],setValue:u=>{e(c=>{const d=$v(c.getters,a.name,s.name);d.value=u})}}}),returnTypes:a.returnTypes}));i.getters=o})}})));function xE(){const{getters:e}=Sj();return{getters:e}}function lwe(){const{data:e}=Pc(),{setGetters:t}=Sj(),{clear:r}=_j(),{contractAddress:i}=$u();X.exports.useEffect(()=>{t([]),r()},[i]),X.exports.useEffect(()=>{(async()=>{const o=[];for(const a of e?.files??[])!a.name.match(/\.(fc|func)/)||o.push(...await awe(a.content));t(o),r()})()},[e?.files])}function uwe(e=[]){const t=new Vn.TupleBuilder;return e.forEach(r=>{if(r instanceof Vn.Cell)t.writeSlice(r);else if(typeof r=="bigint")t.writeNumber(r);else throw new Error("unknown type!")}),t.build()}function cwe(e){const t=[];for(;e.remaining;){const r=e.pop();switch(r.type){case"int":{t.push(r.value);break}case"cell":{t.push(r.cell);break}case"tuple":{if(r.items.length===0)t.push(null);else throw new Error("list parsing not supported");break}default:throw new Error(`unknown type: ${r.type}`)}}return t}async function dwe(e,t,r,i,o){const{stack:a}=await o.runMethod(e,t,uwe(r));return i(cwe(a))}function Cj(e){const{contractAddress:t}=$u(),{getters:r}=xE();return hU([t,"getter",e.name],async()=>{const i=await yp();return!t||!r?void 0:(wa(ha.RUN_GETTER),dwe(Vn.Address.parse(t),e.name,e.parameters.map(a=>{switch(a.possibleTypes[a.selectedTypeIdx]){case"int":return BigInt(a.value);case"address":return Vn.beginCell().storeAddress(Vn.Address.parse(a.value)).endCell();default:return Vn.Cell.fromBoc(Buffer.from(a.value,"base64"))[0]}}),a=>a.map(s=>{const l=[];if(s instanceof Vn.Cell){try{s.beginParse().remainingBits===267&&l.push({type:"address",value:s.beginParse().loadAddress().toString()})}catch{}l.push({type:"base64",value:s.toBoc().toString("base64")}),l.push({type:"boc",value:s.toString()})}else typeof s=="bigint"?(l.push({type:"int",value:s.toString()}),l.push({type:"coins",value:Vn.fromNano(s)}),l.push({type:"hex",value:s.toString(16)}),l.push({type:"base64",value:Buffer.from(s.toString(16),"hex").toString("base64")})):l.push({type:"raw",value:String(s)});return l}),i))})}var ps=(e=>(e.ERROR="Error",e.HINT="Hint",e.SUCCESS="Success",e.INFO="Info",e))(ps||{});const fwe=Xi(da)(e=>({padding:`${e.singleLine?0:15}px 25px`,marginBottom:e.noBottomMargin?0:24,marginTop:e.noTopMargin?0:24,background:e.backgroundColor||"",border:`1px solid ${e.borderColor||"#D8D8D8"}`,borderRadius:12}));function Cs({title:e,type:t,notificationBody:r,singleLine:i,noBottomMargin:o,noTopMargin:a}){let s,l;switch(t){case"Info":l="rgba(216, 216, 216, 0.2);";break;case"Error":s="rgba(252, 86, 86, 0.42);",l="rgba(252, 86, 86, 0.08);";break;case"Hint":l="rgba(94, 117, 232, 0.1);";break;case"Success":l="#D6FFCE";break}return Ut(fwe,{singleLine:i,borderColor:s,backgroundColor:l,noBottomMargin:o,noTopMargin:a,children:[e,r]})}function pwe({parameter:e}){return Ut(Cc,{sx:{gap:1},children:[Ut(Cc,{sx:{gap:.5,flexDirection:"row"},children:[L(kn,{children:e.name}),L(bj,{sx:{cursor:e.possibleTypes.length>1?"pointer":"inherit"},onClick:()=>{e.toggleNextType()},children:e.type()})]}),L(twe,{onChange:t=>{e.setValue(t.target.value)}})]})}function kj({getter:e}){return Ut(kn,{children:[L(kn,{sx:{mb:1},children:L("b",{children:"Request"})}),Ut(Cc,{sx:{gap:2},children:[e.parameters.map((t,r)=>L(pwe,{parameter:t},t.name)),(e.parameters.length??0)===0&&L(kn,{sx:{color:"#949597"},children:"(No params)"})]})]})}function hwe({value:e}){const[t,r]=X.exports.useState(0);return{onClick:()=>{r((t+1)%e.length)},type:e[t]?.type??"unknown",value:e[t].value}}function gwe({type:e,value:t}){const{type:r,value:i,onClick:o}=hwe({value:t}),{showNotification:a}=Ry();return Ut(xc,{sx:{gap:1,cursor:t.length>1?"pointer":"initial"},onClick:o,children:[L(G5,{children:L(bj,{children:r})}),L(G5,{width:"100%",children:L(ewe,{children:i})}),L(G5,{children:L(Bs,{sx:{padding:0,opacity:.8},onClick:s=>{s.stopPropagation(),navigator.clipboard.writeText(i),a("Copied to clipboard!","success")},children:L("img",{src:Wx,alt:"Copy icon",width:15,height:15})})})]})}function Ej({returnTypes:e,values:t,isLoading:r}){return Ut(ta,{children:[(t.length>0||r)&&L(kn,{children:L("b",{children:"Response"})}),t.length>0&&L(Cc,{sx:{gap:1.5},children:L(L6,{children:L(N6,{children:t.map((i,o)=>L(gwe,{type:e[o],value:i}))})})}),t.length===0&&r&&L(Cc,{sx:{gap:1},children:e.map(i=>L(Xa,{variant:"rounded",height:20}))})]})}function mwe({getter:e}){const{data:t,isLoading:r,mutate:i,error:o}=Cj(e);return Ut(mj,{children:[Ut(yj,{children:[Ut(kn,{sx:{flexGrow:1},children:[Ut(Xbe,{children:[e.name,"(",e.parameters.map(a=>a.originalType()).join(", "),")"]}),Ut(Jbe,{children:[L("b",{children:"returns"})," ",e.returnTypes.join(", ")]})]}),L(kn,{children:L(Ha,{fontSize:12,fontWeight:800,textColor:"#fff",height:32,width:60,background:"#1976d2",hoverBackground:"#156cc2",onClick:()=>{i()},children:"Run"})})]}),Ut(vj,{sx:{padding:"10px 20px",gap:2},children:[L(kj,{getter:e}),L(Ej,{returnTypes:e.returnTypes,values:t??[],isLoading:r}),!!o&&L(Cs,{noBottomMargin:!0,noTopMargin:!0,title:L(kn,{children:o.toString()}),type:ps.ERROR,notificationBody:L(kn,{})})]})]})}function ywe({getter:e}){const{data:t,isLoading:r,mutate:i,error:o}=Cj(e);return Ut(mj,{children:[Ut(yj,{children:[L(kn,{sx:{flexGrow:1},children:L(rwe,{value:e.name,placeholder:"Get method name",onChange:a=>e.setName(a.target.value)})}),L(kn,{children:L(Ha,{fontSize:12,fontWeight:800,textColor:"#fff",height:32,width:60,background:"#1976d2",hoverBackground:"#156cc2",onClick:()=>{i()},children:"Run"})})]}),Ut(vj,{sx:{padding:"10px 20px",gap:2},children:[L(kj,{getter:e}),Ut("div",{style:{width:300,display:"flex",gap:10},children:[L(Ha,{fontSize:12,fontWeight:700,height:32,textColor:"#50A7EA",transparent:!0,onClick:()=>{e.addParameter()},children:"Add parameter"}),L(Ha,{fontSize:12,fontWeight:700,height:32,textColor:"#50A7EA",transparent:!0,onClick:()=>{e.removeParameter()},children:"Remove parameter"})]}),L(Ej,{returnTypes:e.returnTypes,values:t??[],isLoading:r}),!!o&&L(Cs,{noBottomMargin:!0,noTopMargin:!0,title:L(kn,{children:o.toString()}),type:ps.ERROR,notificationBody:L(kn,{})})]})]})}function vwe(){const{getters:e}=xE(),t=_j();return Ut(kn,{sx:{display:"flex",gap:4,flexDirection:"column",mt:2},children:[e?.map(r=>L(mwe,{getter:r})),L(ywe,{getter:t})]})}const bwe=Xi($n)({justifyContent:"space-between",width:"100%"}),wwe=Xi(kn)({position:"relative"}),xwe=Xi(kn)({position:"absolute",top:"80px",right:"40px",zIndex:3}),_we=Xi(H7)({borderBottom:"1px solid #E8E8E8","& .MuiTabs-indicator":{borderBottom:"4px solid #0088CC",borderRadius:20},"& .MuiTab-root.Mui-selected":{color:"#000",fontWeight:800}});function Swe(){const{data:e}=Pc(),[t,r]=X.exports.useState(void 0),i=aa("(max-width: 450px)"),o=aa("(max-width: 600px)"),{showNotification:a}=Ry(),s=(c,d)=>{r(d)},l=X.exports.useCallback(async c=>{const d=document.querySelector(c===1?"#myVerifierContent > pre > code > .contract-verifier-code-content":"pre > code > div.hljs.language-fift");navigator.clipboard.writeText(d?.innerText),a("Copied to clipboard!","success")},[]);X.exports.useEffect(()=>{r(e?.hasOnchainProof?0:1)},[e?.hasOnchainProof]);const{getters:u}=xE();return Ut(kn,{sx:{border:"0.5px solid rgba(114, 138, 150, 0.24)",boxShadow:"rgb(114 138 150 / 8%) 0px 2px 16px",borderRadius:"20px",position:"relative"},children:[L(p2,{mb:1,children:Ut(bwe,{children:[Ut($n,{mb:i?2:0,sx:{width:"100%"},children:[L(cg,{children:L("img",{src:Kbe,alt:"Block icon",width:41,height:41})}),Ut(Fd,{children:[!!e?.hasOnchainProof&&"Verified"," Source ",i&&L("br",{})," ","Code"]})]}),t===0&&L(kn,{sx:{alignSelf:"baseline",position:"relative",top:o?"5px":"3px"},children:Ut(Ha,{fontSize:12,fontWeight:500,hoverBackground:"#F5F5F5",background:"#F2F2F2",height:o?30:37,width:o?30:167,onClick:()=>{e?.files?.length&&Zbe(e.files)},children:[L("img",{src:Gbe,alt:"Download icon",width:19,height:19}),o?"":"Download sources"]})})]})}),Ut(wwe,{p:3,children:[Ut(_we,{value:t,onChange:s,children:[L(Z_,{sx:{textTransform:"none"},disabled:!e?.hasOnchainProof,label:"Sources"}),L(Z_,{sx:{textTransform:"none"},label:"Disassembled"}),L(Z_,{sx:{textTransform:"none"},label:`Getters (${u?.length??0})`})]}),L(kn,{sx:{display:t===0?"block":"none"},children:L(K1e,{button:L(vM,{onCopy:l,copyText:1})})}),L(kn,{sx:{display:t===1?"block":"none"},children:L(qbe,{button:L(vM,{onCopy:l,copyText:0})})}),L(kn,{sx:{display:t===2?"block":"none"},children:L(vwe,{})})]})]})}const vM=({copyText:e,onCopy:t})=>L(xwe,{children:L(Bs,{onClick:()=>t(e),children:L("img",{alt:"Copy Icon",src:Wx,width:16,height:16})})});function Cwe(){const{contractAddress:e}=$u(),t=Bx(),[r]=yw(),[i,o]=X.exports.useState(!1);return X.exports.useEffect(()=>{(async()=>{if(!(!t||!e)){if(r.get("override")!==null){const a=await yp();if(await JN(Vn.Address.parse(window.sourcesRegistryAddress),a)===t){o(!0);return}}o(!1)}})()},[t,e]),i}const hc={COMPILE:"COMPILE",PUBLISH:"PUBLISH"},sc={SOURCES:"SOURCES",PUBLISH:"PUBLISH"},bM=()=>({step:hc.COMPILE,currentSection:sc.SOURCES}),kwe=e=>({...bM(),proceedToPublish:()=>{e({step:hc.PUBLISH,currentSection:sc.PUBLISH})},toggleSection:t=>{e({currentSection:t})},reset:()=>{e(bM())}}),Vx=Py(kwe),Aj=_g(e=>({isPreloaded:!1,markPreloaded:()=>{e({isPreloaded:!0})},clearPreloaded:()=>{e({isPreloaded:!1})}}));function Ewe(){const{contractAddress:e}=$u(),t=Hu(),{reset:r}=zu(),{reset:i}=Vx(),{isPreloaded:o,clearPreloaded:a}=Aj();X.exports.useEffect(()=>{o?a():r(),i(),t.invalidate()},[e])}const _E="/assets/contract.ff46c407.svg",Awe=Xi(ug)({minWidth:100}),Twe=Xi(kn)(e=>({display:e.isShrinked&&!e.isExtraSmallScreen?"flex":"inherit",flexWrap:e.isShrinked&&!e.isExtraSmallScreen?"wrap":"inherit",columnGap:e.isShrinked&&!e.isExtraSmallScreen?30:"",padding:e.isShrinked&&!e.isExtraSmallScreen?"0 30px":"","&>*:last-child":{borderBottom:e.isShrinked?"":"none !important"},"&:last-child":{marginBottom:3}})),Iwe=Xi($n)(e=>({boxSizing:e.isShrinked?"border-box":"inherit",flex:e.isShrinked?"40%":"inherit",width:e.isShrinked&&!e.isExtraSmallScreen?0:e.isShrinked&&e.isExtraSmallScreen?"100%":"",minHeight:38,padding:"10px 24px",transition:"background .15s",borderTop:"1px solid rgba(114, 138, 150, 0.2)"})),Tj=Xi(jo)({fontSize:14,color:"#000",minWidth:90,fontWeight:800}),Ij=Xi(jo)({width:"100%",wordBreak:"break-word",fontSize:14,color:"#728A96"}),Rwe=Xi($n)({minWidth:25,justifyContent:"flex-end"}),Pwe=(e,t,r,i)=>Ut(({children:s})=>r?L($7,{placement:"top-start",title:e,children:L("span",{children:s})}):L(ta,{children:s}),{children:[L(({children:s})=>t&&!!e?L(uc,{target:"_blank",href:t,sx:{textDecoration:"none",cursor:"pointer"},children:s}):L(ta,{children:s}),{children:e??"-"}),L(kn,{sx:{fontSize:12,opacity:.8},children:i??""})]});function SE({isFlexibleWrapper:e,icon:t,title:r,dataRows:i,isLoading:o}){const a=e?Awe:ug,{showNotification:s}=Ry(),l=aa("(max-width: 500px)"),u=X.exports.useCallback(async c=>{navigator.clipboard.writeText(c),s("Copied to clipboard!","success")},[]);return Ut(a,{pb:e?0:2,children:[Ut(p2,{mb:1,children:[L(cg,{children:L("img",{src:t,alt:"Block icon",width:41,height:41})}),L(Fd,{children:r})]}),L(Twe,{mt:2.5,isShrinked:!e,isExtraSmallScreen:l,children:i.map(({title:c,value:d,showIcon:p,color:v,customLink:x,tooltip:b,onClick:y,subtitle:_})=>Ut(Iwe,{isExtraSmallScreen:l,isShrinked:!e,children:[L(Tj,{children:c}),L(Ij,{sx:{cursor:y?"pointer":"initial"},onClick:y,children:Pwe(d,x,b,_)}),p&&L(Rwe,{children:d&&L(Bs,{sx:{padding:0},onClick:()=>u(d),children:L("img",{src:Wx,alt:"Copy icon",width:15,height:15})})})]},c))})]})}function Rj(e){try{const t=Vn.Address.parse(e);switch(t.workChain){case-1:return"Masterchain (-1)";case 0:return"Basic Workchain (0)";default:return`${t.workChain}`}}catch{return""}}const Mwe=new Intl.NumberFormat("en-US",{minimumFractionDigits:4});function Y5(e,t){const[r,i]=X.exports.useState(e);return X.exports.useEffect(()=>{i(e)},[e,t]),[r,()=>{i(r===e?t:e)}]}function Owe(){const{contractAddress:e,contractAddressHex:t}=$u(),{data:r,isLoading:i}=vp(),{data:o}=Pc(),a=[],[s,l]=Y5(e,t),[u,c]=Y5(r?.codeCellHash.base64,r?.codeCellHash.hex),[d,p]=Y5(r?.dataCellHash.base64,r?.dataCellHash.hex);return r&&(a.push({title:"Address",value:s??"",showIcon:!0,onClick:()=>{l()},tooltip:!0,subtitle:Rj(e||"")}),a.push({title:"Balance",value:`${Mwe.format(parseFloat(r.balance))} TON`}),a.push({title:"Code Hash",value:u??"",showIcon:!0,onClick:()=>{c()},tooltip:!0}),a.push({title:"Data Hash",value:d??"",showIcon:!0,onClick:()=>{p()},tooltip:!0})),L(SE,{title:"Contract",icon:_E,dataRows:a,isLoading:i,isFlexibleWrapper:!!o?.hasOnchainProof})}const Bwe="/assets/compiler.05d3a143.svg";var Pj="en",CE={},w4={};function Mj(){return Pj}function Uwe(e){Pj=e}function Dwe(e){return CE[e]}function Lwe(e){if(!e)throw new Error("No locale data passed");CE[e.locale]=e,w4[e.locale.toLowerCase()]=e.locale}function wM(e){if(CE[e])return e;if(w4[e.toLowerCase()])return w4[e.toLowerCase()]}function Oj(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.localeMatcher||"lookup";switch(r){case"lookup":return xM(e);case"best fit":return xM(e);default:throw new RangeError('Invalid "localeMatcher" option: '.concat(r))}}function xM(e){var t=wM(e);if(t)return t;for(var r=e.split("-");e.length>1;){r.pop(),e=r.join("-");var i=wM(e);if(i)return i}}var er={af:function(t){return t==1?"one":"other"},am:function(t){return t>=0&&t<=1?"one":"other"},ar:function(t){var r=String(t).split("."),i=Number(r[0])==t,o=i&&r[0].slice(-2);return t==0?"zero":t==1?"one":t==2?"two":o>=3&&o<=10?"few":o>=11&&o<=99?"many":"other"},ast:function(t){var r=String(t).split("."),i=!r[1];return t==1&&i?"one":"other"},be:function(t){var r=String(t).split("."),i=Number(r[0])==t,o=i&&r[0].slice(-1),a=i&&r[0].slice(-2);return o==1&&a!=11?"one":o>=2&&o<=4&&(a<12||a>14)?"few":i&&o==0||o>=5&&o<=9||a>=11&&a<=14?"many":"other"},br:function(t){var r=String(t).split("."),i=Number(r[0])==t,o=i&&r[0].slice(-1),a=i&&r[0].slice(-2),s=i&&r[0].slice(-6);return o==1&&a!=11&&a!=71&&a!=91?"one":o==2&&a!=12&&a!=72&&a!=92?"two":(o==3||o==4||o==9)&&(a<10||a>19)&&(a<70||a>79)&&(a<90||a>99)?"few":t!=0&&i&&s==0?"many":"other"},bs:function(t){var r=String(t).split("."),i=r[0],o=r[1]||"",a=!r[1],s=i.slice(-1),l=i.slice(-2),u=o.slice(-1),c=o.slice(-2);return a&&s==1&&l!=11||u==1&&c!=11?"one":a&&s>=2&&s<=4&&(l<12||l>14)||u>=2&&u<=4&&(c<12||c>14)?"few":"other"},ca:function(t){var r=String(t).split("."),i=r[0],o=!r[1],a=i.slice(-6);return t==1&&o?"one":i!=0&&a==0&&o?"many":"other"},ceb:function(t){var r=String(t).split("."),i=r[0],o=r[1]||"",a=!r[1],s=i.slice(-1),l=o.slice(-1);return a&&(i==1||i==2||i==3)||a&&s!=4&&s!=6&&s!=9||!a&&l!=4&&l!=6&&l!=9?"one":"other"},cs:function(t){var r=String(t).split("."),i=r[0],o=!r[1];return t==1&&o?"one":i>=2&&i<=4&&o?"few":o?"other":"many"},cy:function(t){return t==0?"zero":t==1?"one":t==2?"two":t==3?"few":t==6?"many":"other"},da:function(t){var r=String(t).split("."),i=r[0],o=Number(r[0])==t;return t==1||!o&&(i==0||i==1)?"one":"other"},dsb:function(t){var r=String(t).split("."),i=r[0],o=r[1]||"",a=!r[1],s=i.slice(-2),l=o.slice(-2);return a&&s==1||l==1?"one":a&&s==2||l==2?"two":a&&(s==3||s==4)||l==3||l==4?"few":"other"},dz:function(t){return"other"},es:function(t){var r=String(t).split("."),i=r[0],o=!r[1],a=i.slice(-6);return t==1?"one":i!=0&&a==0&&o?"many":"other"},ff:function(t){return t>=0&&t<2?"one":"other"},fr:function(t){var r=String(t).split("."),i=r[0],o=!r[1],a=i.slice(-6);return t>=0&&t<2?"one":i!=0&&a==0&&o?"many":"other"},ga:function(t){var r=String(t).split("."),i=Number(r[0])==t;return t==1?"one":t==2?"two":i&&t>=3&&t<=6?"few":i&&t>=7&&t<=10?"many":"other"},gd:function(t){var r=String(t).split("."),i=Number(r[0])==t;return t==1||t==11?"one":t==2||t==12?"two":i&&t>=3&&t<=10||i&&t>=13&&t<=19?"few":"other"},he:function(t){var r=String(t).split("."),i=r[0],o=!r[1];return i==1&&o||i==0&&!o?"one":i==2&&o?"two":"other"},is:function(t){var r=String(t).split("."),i=r[0],o=(r[1]||"").replace(/0+$/,""),a=Number(r[0])==t,s=i.slice(-1),l=i.slice(-2);return a&&s==1&&l!=11||o%10==1&&o%100!=11?"one":"other"},ksh:function(t){return t==0?"zero":t==1?"one":"other"},lt:function(t){var r=String(t).split("."),i=r[1]||"",o=Number(r[0])==t,a=o&&r[0].slice(-1),s=o&&r[0].slice(-2);return a==1&&(s<11||s>19)?"one":a>=2&&a<=9&&(s<11||s>19)?"few":i!=0?"many":"other"},lv:function(t){var r=String(t).split("."),i=r[1]||"",o=i.length,a=Number(r[0])==t,s=a&&r[0].slice(-1),l=a&&r[0].slice(-2),u=i.slice(-2),c=i.slice(-1);return a&&s==0||l>=11&&l<=19||o==2&&u>=11&&u<=19?"zero":s==1&&l!=11||o==2&&c==1&&u!=11||o!=2&&c==1?"one":"other"},mk:function(t){var r=String(t).split("."),i=r[0],o=r[1]||"",a=!r[1],s=i.slice(-1),l=i.slice(-2),u=o.slice(-1),c=o.slice(-2);return a&&s==1&&l!=11||u==1&&c!=11?"one":"other"},mt:function(t){var r=String(t).split("."),i=Number(r[0])==t,o=i&&r[0].slice(-2);return t==1?"one":t==2?"two":t==0||o>=3&&o<=10?"few":o>=11&&o<=19?"many":"other"},pa:function(t){return t==0||t==1?"one":"other"},pl:function(t){var r=String(t).split("."),i=r[0],o=!r[1],a=i.slice(-1),s=i.slice(-2);return t==1&&o?"one":o&&a>=2&&a<=4&&(s<12||s>14)?"few":o&&i!=1&&(a==0||a==1)||o&&a>=5&&a<=9||o&&s>=12&&s<=14?"many":"other"},pt:function(t){var r=String(t).split("."),i=r[0],o=!r[1],a=i.slice(-6);return i==0||i==1?"one":i!=0&&a==0&&o?"many":"other"},ro:function(t){var r=String(t).split("."),i=!r[1],o=Number(r[0])==t,a=o&&r[0].slice(-2);return t==1&&i?"one":!i||t==0||t!=1&&a>=1&&a<=19?"few":"other"},ru:function(t){var r=String(t).split("."),i=r[0],o=!r[1],a=i.slice(-1),s=i.slice(-2);return o&&a==1&&s!=11?"one":o&&a>=2&&a<=4&&(s<12||s>14)?"few":o&&a==0||o&&a>=5&&a<=9||o&&s>=11&&s<=14?"many":"other"},se:function(t){return t==1?"one":t==2?"two":"other"},si:function(t){var r=String(t).split("."),i=r[0],o=r[1]||"";return t==0||t==1||i==0&&o==1?"one":"other"},sl:function(t){var r=String(t).split("."),i=r[0],o=!r[1],a=i.slice(-2);return o&&a==1?"one":o&&a==2?"two":o&&(a==3||a==4)||!o?"few":"other"}};er.as=er.am;er.az=er.af;er.bg=er.af;er.bn=er.am;er.brx=er.af;er.ce=er.af;er.chr=er.af;er.de=er.ast;er.ee=er.af;er.el=er.af;er.en=er.ast;er.et=er.ast;er.eu=er.af;er.fa=er.am;er.fi=er.ast;er.fil=er.ceb;er.fo=er.af;er.fur=er.af;er.fy=er.ast;er.gl=er.ast;er.gu=er.am;er.ha=er.af;er.hi=er.am;er.hr=er.bs;er.hsb=er.dsb;er.hu=er.af;er.hy=er.ff;er.ia=er.ast;er.id=er.dz;er.ig=er.dz;er.it=er.ca;er.ja=er.dz;er.jgo=er.af;er.jv=er.dz;er.ka=er.af;er.kea=er.dz;er.kk=er.af;er.kl=er.af;er.km=er.dz;er.kn=er.am;er.ko=er.dz;er.ks=er.af;er.ku=er.af;er.ky=er.af;er.lb=er.af;er.lkt=er.dz;er.lo=er.dz;er.ml=er.af;er.mn=er.af;er.mr=er.af;er.ms=er.dz;er.my=er.dz;er.nb=er.af;er.ne=er.af;er.nl=er.ast;er.nn=er.af;er.no=er.af;er.or=er.af;er.pcm=er.am;er.ps=er.af;er.rm=er.af;er.sah=er.dz;er.sc=er.ast;er.sd=er.af;er.sk=er.cs;er.so=er.af;er.sq=er.af;er.sr=er.bs;er.su=er.dz;er.sv=er.ast;er.sw=er.ast;er.ta=er.af;er.te=er.af;er.th=er.dz;er.ti=er.pa;er.tk=er.af;er.to=er.dz;er.tr=er.af;er.ug=er.af;er.uk=er.ru;er.ur=er.ast;er.uz=er.af;er.vi=er.dz;er.wae=er.af;er.wo=er.dz;er.xh=er.af;er.yi=er.ast;er.yo=er.dz;er.yue=er.dz;er.zh=er.dz;er.zu=er.am;const _M=er;function SM(e){return e==="pt-PT"?e:jwe(e)}var Nwe=/^([a-z0-9]+)/i;function jwe(e){var t=e.match(Nwe);if(!t)throw new TypeError("Invalid locale: ".concat(e));return t[1]}function $we(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function CM(e,t){for(var r=0;rOi(ii))){yi[qn++]={pattern:Ko,captures:ii};const Oi=this.setProperties[Ko];Oi&&(yi[so].setProperties=Oi);const $i=this.assertedProperties[Ko];$i&&(yi[so].assertedProperties=$i);const Un=this.refutedProperties[Ko];Un&&(yi[so].refutedProperties=Un)}}return yi.length=qn,ir._free(Vr),yi}captures(ke,Ze,Ht,or){Ze||(Ze=Wr),Ht||(Ht=Wr),or||(or={});let kr=or.matchLimit;if(kr===void 0)kr=0;else if(typeof kr!="number")throw new Error("Arguments must be numbers");Qn(ke),ir._ts_query_captures_wasm(this[0],ke.tree[0],Ze.row,Ze.column,Ht.row,Ht.column,kr);const $r=J(cn,"i32"),Vr=J(cn+Gt,"i32"),dn=J(cn+2*Gt,"i32"),yi=[];this.exceededMatchLimit=!!dn;const qn=[];let wi=Vr;for(let so=0;so<$r;so++){const Ko=J(wi,"i32"),Aa=J(wi+=Gt,"i32"),ii=J(wi+=Gt,"i32");if(wi+=Gt,qn.length=Aa,wi=$o(this,ke.tree,wi,qn),this.textPredicates[Ko].every(Oi=>Oi(qn))){const Oi=qn[ii],$i=this.setProperties[Ko];$i&&(Oi.setProperties=$i);const Un=this.assertedProperties[Ko];Un&&(Oi.assertedProperties=Un);const xo=this.refutedProperties[Ko];xo&&(Oi.refutedProperties=xo),yi.push(Oi)}}return ir._free(Vr),yi}predicatesForPattern(ke){return this.predicates[ke]}didExceedMatchLimit(){return this.exceededMatchLimit}}function wo(Ge,ke,Ze){const Ht=Ze-ke;let or=Ge.textCallback(ke,null,Ze);for(ke+=or.length;ke0))break;ke+=kr.length,or+=kr}return ke>Ze&&(or=or.slice(0,Ht)),or}function $o(Ge,ke,Ze,Ht){for(let or=0,kr=Ht.length;or{Ai.init(),c()}}))}}return s}();e.exports=i})(wj);const v4=wj.exports,xj=()=>(()=>{try{if(typeof WebAssembly=="object"&&typeof WebAssembly.instantiate=="function"){const e=new WebAssembly.Module(Uint8Array.of(0,97,115,109,1,0,0,0));if(e instanceof WebAssembly.Module)return new WebAssembly.Instance(e)instanceof WebAssembly.Instance}}catch{}return!1})(),nwe=()=>window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1";let b4;const iwe=async(e,t)=>{if(b4)return;const r={locateFile(){return e}};await v4.init(r),b4=await v4.Language.load(t)},owe=()=>{const e=new v4;return e.setLanguage(b4),e.setTimeoutMicros(1e3*1e3),e};async function awe(e){return xj()?(wa(ha.GETTER_PARSE_START),await iwe("./tree-sitter.wasm","./tree-sitter-func.wasm"),owe().parse(e).rootNode.children.filter(a=>a.type==="function_definition"&&a.children.find(s=>s.type==="specifiers_list")?.text.includes("method_id")).map(a=>{const s=a.children[0].children.filter(c=>!c.type.match(/[,()]/)).map(c=>c.text),l=a.children.find(c=>c.type==="function_name").text,u=a.children.find(c=>c.type==="parameter_list").children.filter(c=>c.type==="parameter_declaration").map(c=>({type:c.child(0).text,name:c.child(1).text}));return{returnTypes:s,name:l,parameters:u}})):[]}const swe=_g($x((e,t)=>({name:"",setName:r=>{e(i=>{i.name=r})},parameters:[],addParameter:()=>{e(r=>{const i=Math.random();r.parameters.push({name:"",_id:i,possibleTypes:["int","slice","address"],selectedTypeIdx:0,setValue:o=>r.parameters.find(a=>a._id===i).value=o,setName:o=>{e(a=>{a.parameters.find(s=>s._id===i).name=o})},toggleNextType:()=>{e(o=>{const a=o.parameters.find(s=>s._id===i);a.selectedTypeIdx=(a.selectedTypeIdx+1)%a.possibleTypes.length})},type:()=>{const o=t().parameters.find(a=>a._id===i);return o.possibleTypes[o.selectedTypeIdx]},originalType:()=>t().parameters.find(a=>a._id===i).possibleTypes[0],value:""})})},returnTypes:[],removeParameter:()=>{e(r=>{r.parameters.pop()})},clear:()=>{e(r=>{r.name="",r.parameters=[]})}})));function _j(){return swe()}const $v=(e,t,r)=>e.find(i=>i.name===t).parameters.find(i=>i.name===r),Sj=_g($x((e,t)=>({getters:[],setGetters:r=>{e(i=>{const o=r.map(a=>({name:a.name,parameters:a.parameters.map(s=>{const l=[s.type];return["cell","slice"].includes(s.type)&&l.push("address"),{name:s.name,value:"",possibleTypes:l,selectedTypeIdx:0,toggleNextType:()=>{e(u=>{const c=$v(u.getters,a.name,s.name);c.selectedTypeIdx=(c.selectedTypeIdx+1)%c.possibleTypes.length})},type:()=>{const u=$v(t().getters,a.name,s.name);return u.possibleTypes[u.selectedTypeIdx]},originalType:()=>$v(t().getters,a.name,s.name).possibleTypes[0],setValue:u=>{e(c=>{const d=$v(c.getters,a.name,s.name);d.value=u})}}}),returnTypes:a.returnTypes}));i.getters=o})}})));function xE(){const{getters:e}=Sj();return{getters:e}}function lwe(){const{data:e}=Pc(),{setGetters:t}=Sj(),{clear:r}=_j(),{contractAddress:i}=$u();X.exports.useEffect(()=>{t([]),r()},[i]),X.exports.useEffect(()=>{(async()=>{const o=[];for(const a of e?.files??[])!a.name.match(/\.(fc|func)/)||o.push(...await awe(a.content));t(o),r()})()},[e?.files])}function uwe(e=[]){const t=new Vn.TupleBuilder;return e.forEach(r=>{if(r instanceof Vn.Cell)t.writeSlice(r);else if(typeof r=="bigint")t.writeNumber(r);else throw new Error("unknown type!")}),t.build()}function cwe(e){const t=[];for(;e.remaining;){const r=e.pop();switch(r.type){case"int":{t.push(r.value);break}case"cell":{t.push(r.cell);break}case"tuple":{if(r.items.length===0)t.push(null);else throw new Error("list parsing not supported");break}default:throw new Error(`unknown type: ${r.type}`)}}return t}async function dwe(e,t,r,i,o){const{stack:a}=await o.runMethod(e,t,uwe(r));return i(cwe(a))}function Cj(e){const{contractAddress:t}=$u(),{getters:r}=xE();return hU([t,"getter",e.name],async()=>{const i=await yp();return!t||!r?void 0:(wa(ha.RUN_GETTER),dwe(Vn.Address.parse(t),e.name,e.parameters.map(a=>{switch(a.possibleTypes[a.selectedTypeIdx]){case"int":return BigInt(a.value);case"address":return Vn.beginCell().storeAddress(Vn.Address.parse(a.value)).endCell();default:return Vn.Cell.fromBoc(Buffer.from(a.value,"base64"))[0]}}),a=>a.map(s=>{const l=[];if(s instanceof Vn.Cell){try{s.beginParse().remainingBits===267&&l.push({type:"address",value:s.beginParse().loadAddress().toString()})}catch{}l.push({type:"base64",value:s.toBoc().toString("base64")}),l.push({type:"boc",value:s.toString()})}else typeof s=="bigint"?(l.push({type:"int",value:s.toString()}),l.push({type:"coins",value:Vn.fromNano(s)}),l.push({type:"hex",value:s.toString(16)}),l.push({type:"base64",value:Buffer.from(s.toString(16),"hex").toString("base64")})):l.push({type:"raw",value:String(s)});return l}),i))})}var ps=(e=>(e.ERROR="Error",e.HINT="Hint",e.SUCCESS="Success",e.INFO="Info",e))(ps||{});const fwe=Xi(da)(e=>({padding:`${e.singleLine?0:15}px 25px`,marginBottom:e.noBottomMargin?0:24,marginTop:e.noTopMargin?0:24,background:e.backgroundColor||"",border:`1px solid ${e.borderColor||"#D8D8D8"}`,borderRadius:12}));function Cs({title:e,type:t,notificationBody:r,singleLine:i,noBottomMargin:o,noTopMargin:a}){let s,l;switch(t){case"Info":l="rgba(216, 216, 216, 0.2);";break;case"Error":s="rgba(252, 86, 86, 0.42);",l="rgba(252, 86, 86, 0.08);";break;case"Hint":l="rgba(94, 117, 232, 0.1);";break;case"Success":l="#D6FFCE";break}return Ut(fwe,{singleLine:i,borderColor:s,backgroundColor:l,noBottomMargin:o,noTopMargin:a,children:[e,r]})}function pwe({parameter:e}){return Ut(Cc,{sx:{gap:1},children:[Ut(Cc,{sx:{gap:.5,flexDirection:"row"},children:[L(kn,{children:e.name}),L(bj,{sx:{cursor:e.possibleTypes.length>1?"pointer":"inherit"},onClick:()=>{e.toggleNextType()},children:e.type()})]}),L(twe,{onChange:t=>{e.setValue(t.target.value)}})]})}function kj({getter:e}){return Ut(kn,{children:[L(kn,{sx:{mb:1},children:L("b",{children:"Request"})}),Ut(Cc,{sx:{gap:2},children:[e.parameters.map((t,r)=>L(pwe,{parameter:t},t.name)),(e.parameters.length??0)===0&&L(kn,{sx:{color:"#949597"},children:"(No params)"})]})]})}function hwe({value:e}){const[t,r]=X.exports.useState(0);return{onClick:()=>{r((t+1)%e.length)},type:e[t]?.type??"unknown",value:e[t].value}}function gwe({type:e,value:t}){const{type:r,value:i,onClick:o}=hwe({value:t}),{showNotification:a}=Ry();return Ut(xc,{sx:{gap:1,cursor:t.length>1?"pointer":"initial"},onClick:o,children:[L(G5,{children:L(bj,{children:r})}),L(G5,{width:"100%",children:L(ewe,{children:i})}),L(G5,{children:L(Bs,{sx:{padding:0,opacity:.8},onClick:s=>{s.stopPropagation(),navigator.clipboard.writeText(i),a("Copied to clipboard!","success")},children:L("img",{src:Wx,alt:"Copy icon",width:15,height:15})})})]})}function Ej({returnTypes:e,values:t,isLoading:r}){return Ut(ta,{children:[(t.length>0||r)&&L(kn,{children:L("b",{children:"Response"})}),t.length>0&&L(Cc,{sx:{gap:1.5},children:L(L6,{children:L(N6,{children:t.map((i,o)=>L(gwe,{type:e[o],value:i}))})})}),t.length===0&&r&&L(Cc,{sx:{gap:1},children:e.map(i=>L(Xa,{variant:"rounded",height:20}))})]})}function mwe({getter:e}){const{data:t,isLoading:r,mutate:i,error:o}=Cj(e);return Ut(mj,{children:[Ut(yj,{children:[Ut(kn,{sx:{flexGrow:1},children:[Ut(Xbe,{children:[e.name,"(",e.parameters.map(a=>a.originalType()).join(", "),")"]}),Ut(Jbe,{children:[L("b",{children:"returns"})," ",e.returnTypes.join(", ")]})]}),L(kn,{children:L(Ha,{fontSize:12,fontWeight:800,textColor:"#fff",height:32,width:60,background:"#1976d2",hoverBackground:"#156cc2",onClick:()=>{i()},children:"Run"})})]}),Ut(vj,{sx:{padding:"10px 20px",gap:2},children:[L(kj,{getter:e}),L(Ej,{returnTypes:e.returnTypes,values:t??[],isLoading:r}),!!o&&L(Cs,{noBottomMargin:!0,noTopMargin:!0,title:L(kn,{children:o.toString()}),type:ps.ERROR,notificationBody:L(kn,{})})]})]})}function ywe({getter:e}){const{data:t,isLoading:r,mutate:i,error:o}=Cj(e);return Ut(mj,{children:[Ut(yj,{children:[L(kn,{sx:{flexGrow:1},children:L(rwe,{value:e.name,placeholder:"Get method name",onChange:a=>e.setName(a.target.value)})}),L(kn,{children:L(Ha,{fontSize:12,fontWeight:800,textColor:"#fff",height:32,width:60,background:"#1976d2",hoverBackground:"#156cc2",onClick:()=>{i()},children:"Run"})})]}),Ut(vj,{sx:{padding:"10px 20px",gap:2},children:[L(kj,{getter:e}),Ut("div",{style:{width:300,display:"flex",gap:10},children:[L(Ha,{fontSize:12,fontWeight:700,height:32,textColor:"#50A7EA",transparent:!0,onClick:()=>{e.addParameter()},children:"Add parameter"}),L(Ha,{fontSize:12,fontWeight:700,height:32,textColor:"#50A7EA",transparent:!0,onClick:()=>{e.removeParameter()},children:"Remove parameter"})]}),L(Ej,{returnTypes:e.returnTypes,values:t??[],isLoading:r}),!!o&&L(Cs,{noBottomMargin:!0,noTopMargin:!0,title:L(kn,{children:o.toString()}),type:ps.ERROR,notificationBody:L(kn,{})})]})]})}function vwe(){const{getters:e}=xE(),t=_j();return Ut(kn,{sx:{display:"flex",gap:4,flexDirection:"column",mt:2},children:[e?.map(r=>L(mwe,{getter:r})),L(ywe,{getter:t})]})}const bwe=Xi($n)({justifyContent:"space-between",width:"100%"}),wwe=Xi(kn)({position:"relative"}),xwe=Xi(kn)({position:"absolute",top:"80px",right:"40px",zIndex:3}),_we=Xi(H7)({borderBottom:"1px solid #E8E8E8","& .MuiTabs-indicator":{borderBottom:"4px solid #0088CC",borderRadius:20},"& .MuiTab-root.Mui-selected":{color:"#000",fontWeight:800}});function Swe(){const{data:e}=Pc(),[t,r]=X.exports.useState(void 0),i=aa("(max-width: 450px)"),o=aa("(max-width: 600px)"),{showNotification:a}=Ry(),s=(c,d)=>{r(d)},l=X.exports.useCallback(async c=>{const d=document.querySelector(c===1?"#myVerifierContent > pre > code > .contract-verifier-code-content":"pre > code > div.hljs.language-fift");navigator.clipboard.writeText(d?.innerText),a("Copied to clipboard!","success")},[]);X.exports.useEffect(()=>{r(e?.hasOnchainProof?0:1)},[e?.hasOnchainProof]);const{getters:u}=xE();return Ut(kn,{sx:{border:"0.5px solid rgba(114, 138, 150, 0.24)",boxShadow:"rgb(114 138 150 / 8%) 0px 2px 16px",borderRadius:"20px",position:"relative"},children:[L(p2,{mb:1,children:Ut(bwe,{children:[Ut($n,{mb:i?2:0,sx:{width:"100%"},children:[L(cg,{children:L("img",{src:Kbe,alt:"Block icon",width:41,height:41})}),Ut(Fd,{children:[!!e?.hasOnchainProof&&"Verified"," Source ",i&&L("br",{})," ","Code"]})]}),t===0&&L(kn,{sx:{alignSelf:"baseline",position:"relative",top:o?"5px":"3px"},children:Ut(Ha,{fontSize:12,fontWeight:500,hoverBackground:"#F5F5F5",background:"#F2F2F2",height:o?30:37,width:o?30:167,onClick:()=>{e?.files?.length&&Zbe(e.files)},children:[L("img",{src:Gbe,alt:"Download icon",width:19,height:19}),o?"":"Download sources"]})})]})}),Ut(wwe,{p:3,children:[Ut(_we,{value:t,onChange:s,children:[L(Z_,{sx:{textTransform:"none"},disabled:!e?.hasOnchainProof,label:"Sources"}),L(Z_,{sx:{textTransform:"none"},label:"Disassembled"}),L(Z_,{sx:{textTransform:"none"},label:`Getters (${u?.length??0})`})]}),L(kn,{sx:{display:t===0?"block":"none"},children:L(K1e,{button:L(vM,{onCopy:l,copyText:1})})}),L(kn,{sx:{display:t===1?"block":"none"},children:L(qbe,{button:L(vM,{onCopy:l,copyText:0})})}),L(kn,{sx:{display:t===2?"block":"none"},children:L(vwe,{})})]})]})}const vM=({copyText:e,onCopy:t})=>L(xwe,{children:L(Bs,{onClick:()=>t(e),children:L("img",{alt:"Copy Icon",src:Wx,width:16,height:16})})});function Cwe(){const{contractAddress:e}=$u(),t=Bx(),[r]=yw(),[i,o]=X.exports.useState(!1);return X.exports.useEffect(()=>{(async()=>{if(!(!t||!e)){if(r.get("override")!==null){const a=await yp();if(await JN(Vn.Address.parse(window.sourcesRegistryAddress),a)===t){o(!0);return}}o(!1)}})()},[t,e]),i}const hc={COMPILE:"COMPILE",PUBLISH:"PUBLISH"},sc={SOURCES:"SOURCES",PUBLISH:"PUBLISH"},bM=()=>({step:hc.COMPILE,currentSection:sc.SOURCES}),kwe=e=>({...bM(),proceedToPublish:()=>{e({step:hc.PUBLISH,currentSection:sc.PUBLISH})},toggleSection:t=>{e({currentSection:t})},reset:()=>{e(bM())}}),Vx=Py(kwe),Aj=_g(e=>({isPreloaded:!1,markPreloaded:()=>{e({isPreloaded:!0})},clearPreloaded:()=>{e({isPreloaded:!1})}}));function Ewe(){const{contractAddress:e}=$u(),t=Hu(),{reset:r}=zu(),{reset:i}=Vx(),{isPreloaded:o,clearPreloaded:a}=Aj();X.exports.useEffect(()=>{o?a():r(),i(),t.invalidate()},[e])}const _E="/verifier/assets/contract.ff46c407.svg",Awe=Xi(ug)({minWidth:100}),Twe=Xi(kn)(e=>({display:e.isShrinked&&!e.isExtraSmallScreen?"flex":"inherit",flexWrap:e.isShrinked&&!e.isExtraSmallScreen?"wrap":"inherit",columnGap:e.isShrinked&&!e.isExtraSmallScreen?30:"",padding:e.isShrinked&&!e.isExtraSmallScreen?"0 30px":"","&>*:last-child":{borderBottom:e.isShrinked?"":"none !important"},"&:last-child":{marginBottom:3}})),Iwe=Xi($n)(e=>({boxSizing:e.isShrinked?"border-box":"inherit",flex:e.isShrinked?"40%":"inherit",width:e.isShrinked&&!e.isExtraSmallScreen?0:e.isShrinked&&e.isExtraSmallScreen?"100%":"",minHeight:38,padding:"10px 24px",transition:"background .15s",borderTop:"1px solid rgba(114, 138, 150, 0.2)"})),Tj=Xi(jo)({fontSize:14,color:"#000",minWidth:90,fontWeight:800}),Ij=Xi(jo)({width:"100%",wordBreak:"break-word",fontSize:14,color:"#728A96"}),Rwe=Xi($n)({minWidth:25,justifyContent:"flex-end"}),Pwe=(e,t,r,i)=>Ut(({children:s})=>r?L($7,{placement:"top-start",title:e,children:L("span",{children:s})}):L(ta,{children:s}),{children:[L(({children:s})=>t&&!!e?L(uc,{target:"_blank",href:t,sx:{textDecoration:"none",cursor:"pointer"},children:s}):L(ta,{children:s}),{children:e??"-"}),L(kn,{sx:{fontSize:12,opacity:.8},children:i??""})]});function SE({isFlexibleWrapper:e,icon:t,title:r,dataRows:i,isLoading:o}){const a=e?Awe:ug,{showNotification:s}=Ry(),l=aa("(max-width: 500px)"),u=X.exports.useCallback(async c=>{navigator.clipboard.writeText(c),s("Copied to clipboard!","success")},[]);return Ut(a,{pb:e?0:2,children:[Ut(p2,{mb:1,children:[L(cg,{children:L("img",{src:t,alt:"Block icon",width:41,height:41})}),L(Fd,{children:r})]}),L(Twe,{mt:2.5,isShrinked:!e,isExtraSmallScreen:l,children:i.map(({title:c,value:d,showIcon:p,color:v,customLink:x,tooltip:b,onClick:y,subtitle:_})=>Ut(Iwe,{isExtraSmallScreen:l,isShrinked:!e,children:[L(Tj,{children:c}),L(Ij,{sx:{cursor:y?"pointer":"initial"},onClick:y,children:Pwe(d,x,b,_)}),p&&L(Rwe,{children:d&&L(Bs,{sx:{padding:0},onClick:()=>u(d),children:L("img",{src:Wx,alt:"Copy icon",width:15,height:15})})})]},c))})]})}function Rj(e){try{const t=Vn.Address.parse(e);switch(t.workChain){case-1:return"Masterchain (-1)";case 0:return"Basic Workchain (0)";default:return`${t.workChain}`}}catch{return""}}const Mwe=new Intl.NumberFormat("en-US",{minimumFractionDigits:4});function Y5(e,t){const[r,i]=X.exports.useState(e);return X.exports.useEffect(()=>{i(e)},[e,t]),[r,()=>{i(r===e?t:e)}]}function Owe(){const{contractAddress:e,contractAddressHex:t}=$u(),{data:r,isLoading:i}=vp(),{data:o}=Pc(),a=[],[s,l]=Y5(e,t),[u,c]=Y5(r?.codeCellHash.base64,r?.codeCellHash.hex),[d,p]=Y5(r?.dataCellHash.base64,r?.dataCellHash.hex);return r&&(a.push({title:"Address",value:s??"",showIcon:!0,onClick:()=>{l()},tooltip:!0,subtitle:Rj(e||"")}),a.push({title:"Balance",value:`${Mwe.format(parseFloat(r.balance))} TON`}),a.push({title:"Code Hash",value:u??"",showIcon:!0,onClick:()=>{c()},tooltip:!0}),a.push({title:"Data Hash",value:d??"",showIcon:!0,onClick:()=>{p()},tooltip:!0})),L(SE,{title:"Contract",icon:_E,dataRows:a,isLoading:i,isFlexibleWrapper:!!o?.hasOnchainProof})}const Bwe="/verifier/assets/compiler.05d3a143.svg";var Pj="en",CE={},w4={};function Mj(){return Pj}function Uwe(e){Pj=e}function Dwe(e){return CE[e]}function Lwe(e){if(!e)throw new Error("No locale data passed");CE[e.locale]=e,w4[e.locale.toLowerCase()]=e.locale}function wM(e){if(CE[e])return e;if(w4[e.toLowerCase()])return w4[e.toLowerCase()]}function Oj(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.localeMatcher||"lookup";switch(r){case"lookup":return xM(e);case"best fit":return xM(e);default:throw new RangeError('Invalid "localeMatcher" option: '.concat(r))}}function xM(e){var t=wM(e);if(t)return t;for(var r=e.split("-");e.length>1;){r.pop(),e=r.join("-");var i=wM(e);if(i)return i}}var er={af:function(t){return t==1?"one":"other"},am:function(t){return t>=0&&t<=1?"one":"other"},ar:function(t){var r=String(t).split("."),i=Number(r[0])==t,o=i&&r[0].slice(-2);return t==0?"zero":t==1?"one":t==2?"two":o>=3&&o<=10?"few":o>=11&&o<=99?"many":"other"},ast:function(t){var r=String(t).split("."),i=!r[1];return t==1&&i?"one":"other"},be:function(t){var r=String(t).split("."),i=Number(r[0])==t,o=i&&r[0].slice(-1),a=i&&r[0].slice(-2);return o==1&&a!=11?"one":o>=2&&o<=4&&(a<12||a>14)?"few":i&&o==0||o>=5&&o<=9||a>=11&&a<=14?"many":"other"},br:function(t){var r=String(t).split("."),i=Number(r[0])==t,o=i&&r[0].slice(-1),a=i&&r[0].slice(-2),s=i&&r[0].slice(-6);return o==1&&a!=11&&a!=71&&a!=91?"one":o==2&&a!=12&&a!=72&&a!=92?"two":(o==3||o==4||o==9)&&(a<10||a>19)&&(a<70||a>79)&&(a<90||a>99)?"few":t!=0&&i&&s==0?"many":"other"},bs:function(t){var r=String(t).split("."),i=r[0],o=r[1]||"",a=!r[1],s=i.slice(-1),l=i.slice(-2),u=o.slice(-1),c=o.slice(-2);return a&&s==1&&l!=11||u==1&&c!=11?"one":a&&s>=2&&s<=4&&(l<12||l>14)||u>=2&&u<=4&&(c<12||c>14)?"few":"other"},ca:function(t){var r=String(t).split("."),i=r[0],o=!r[1],a=i.slice(-6);return t==1&&o?"one":i!=0&&a==0&&o?"many":"other"},ceb:function(t){var r=String(t).split("."),i=r[0],o=r[1]||"",a=!r[1],s=i.slice(-1),l=o.slice(-1);return a&&(i==1||i==2||i==3)||a&&s!=4&&s!=6&&s!=9||!a&&l!=4&&l!=6&&l!=9?"one":"other"},cs:function(t){var r=String(t).split("."),i=r[0],o=!r[1];return t==1&&o?"one":i>=2&&i<=4&&o?"few":o?"other":"many"},cy:function(t){return t==0?"zero":t==1?"one":t==2?"two":t==3?"few":t==6?"many":"other"},da:function(t){var r=String(t).split("."),i=r[0],o=Number(r[0])==t;return t==1||!o&&(i==0||i==1)?"one":"other"},dsb:function(t){var r=String(t).split("."),i=r[0],o=r[1]||"",a=!r[1],s=i.slice(-2),l=o.slice(-2);return a&&s==1||l==1?"one":a&&s==2||l==2?"two":a&&(s==3||s==4)||l==3||l==4?"few":"other"},dz:function(t){return"other"},es:function(t){var r=String(t).split("."),i=r[0],o=!r[1],a=i.slice(-6);return t==1?"one":i!=0&&a==0&&o?"many":"other"},ff:function(t){return t>=0&&t<2?"one":"other"},fr:function(t){var r=String(t).split("."),i=r[0],o=!r[1],a=i.slice(-6);return t>=0&&t<2?"one":i!=0&&a==0&&o?"many":"other"},ga:function(t){var r=String(t).split("."),i=Number(r[0])==t;return t==1?"one":t==2?"two":i&&t>=3&&t<=6?"few":i&&t>=7&&t<=10?"many":"other"},gd:function(t){var r=String(t).split("."),i=Number(r[0])==t;return t==1||t==11?"one":t==2||t==12?"two":i&&t>=3&&t<=10||i&&t>=13&&t<=19?"few":"other"},he:function(t){var r=String(t).split("."),i=r[0],o=!r[1];return i==1&&o||i==0&&!o?"one":i==2&&o?"two":"other"},is:function(t){var r=String(t).split("."),i=r[0],o=(r[1]||"").replace(/0+$/,""),a=Number(r[0])==t,s=i.slice(-1),l=i.slice(-2);return a&&s==1&&l!=11||o%10==1&&o%100!=11?"one":"other"},ksh:function(t){return t==0?"zero":t==1?"one":"other"},lt:function(t){var r=String(t).split("."),i=r[1]||"",o=Number(r[0])==t,a=o&&r[0].slice(-1),s=o&&r[0].slice(-2);return a==1&&(s<11||s>19)?"one":a>=2&&a<=9&&(s<11||s>19)?"few":i!=0?"many":"other"},lv:function(t){var r=String(t).split("."),i=r[1]||"",o=i.length,a=Number(r[0])==t,s=a&&r[0].slice(-1),l=a&&r[0].slice(-2),u=i.slice(-2),c=i.slice(-1);return a&&s==0||l>=11&&l<=19||o==2&&u>=11&&u<=19?"zero":s==1&&l!=11||o==2&&c==1&&u!=11||o!=2&&c==1?"one":"other"},mk:function(t){var r=String(t).split("."),i=r[0],o=r[1]||"",a=!r[1],s=i.slice(-1),l=i.slice(-2),u=o.slice(-1),c=o.slice(-2);return a&&s==1&&l!=11||u==1&&c!=11?"one":"other"},mt:function(t){var r=String(t).split("."),i=Number(r[0])==t,o=i&&r[0].slice(-2);return t==1?"one":t==2?"two":t==0||o>=3&&o<=10?"few":o>=11&&o<=19?"many":"other"},pa:function(t){return t==0||t==1?"one":"other"},pl:function(t){var r=String(t).split("."),i=r[0],o=!r[1],a=i.slice(-1),s=i.slice(-2);return t==1&&o?"one":o&&a>=2&&a<=4&&(s<12||s>14)?"few":o&&i!=1&&(a==0||a==1)||o&&a>=5&&a<=9||o&&s>=12&&s<=14?"many":"other"},pt:function(t){var r=String(t).split("."),i=r[0],o=!r[1],a=i.slice(-6);return i==0||i==1?"one":i!=0&&a==0&&o?"many":"other"},ro:function(t){var r=String(t).split("."),i=!r[1],o=Number(r[0])==t,a=o&&r[0].slice(-2);return t==1&&i?"one":!i||t==0||t!=1&&a>=1&&a<=19?"few":"other"},ru:function(t){var r=String(t).split("."),i=r[0],o=!r[1],a=i.slice(-1),s=i.slice(-2);return o&&a==1&&s!=11?"one":o&&a>=2&&a<=4&&(s<12||s>14)?"few":o&&a==0||o&&a>=5&&a<=9||o&&s>=11&&s<=14?"many":"other"},se:function(t){return t==1?"one":t==2?"two":"other"},si:function(t){var r=String(t).split("."),i=r[0],o=r[1]||"";return t==0||t==1||i==0&&o==1?"one":"other"},sl:function(t){var r=String(t).split("."),i=r[0],o=!r[1],a=i.slice(-2);return o&&a==1?"one":o&&a==2?"two":o&&(a==3||a==4)||!o?"few":"other"}};er.as=er.am;er.az=er.af;er.bg=er.af;er.bn=er.am;er.brx=er.af;er.ce=er.af;er.chr=er.af;er.de=er.ast;er.ee=er.af;er.el=er.af;er.en=er.ast;er.et=er.ast;er.eu=er.af;er.fa=er.am;er.fi=er.ast;er.fil=er.ceb;er.fo=er.af;er.fur=er.af;er.fy=er.ast;er.gl=er.ast;er.gu=er.am;er.ha=er.af;er.hi=er.am;er.hr=er.bs;er.hsb=er.dsb;er.hu=er.af;er.hy=er.ff;er.ia=er.ast;er.id=er.dz;er.ig=er.dz;er.it=er.ca;er.ja=er.dz;er.jgo=er.af;er.jv=er.dz;er.ka=er.af;er.kea=er.dz;er.kk=er.af;er.kl=er.af;er.km=er.dz;er.kn=er.am;er.ko=er.dz;er.ks=er.af;er.ku=er.af;er.ky=er.af;er.lb=er.af;er.lkt=er.dz;er.lo=er.dz;er.ml=er.af;er.mn=er.af;er.mr=er.af;er.ms=er.dz;er.my=er.dz;er.nb=er.af;er.ne=er.af;er.nl=er.ast;er.nn=er.af;er.no=er.af;er.or=er.af;er.pcm=er.am;er.ps=er.af;er.rm=er.af;er.sah=er.dz;er.sc=er.ast;er.sd=er.af;er.sk=er.cs;er.so=er.af;er.sq=er.af;er.sr=er.bs;er.su=er.dz;er.sv=er.ast;er.sw=er.ast;er.ta=er.af;er.te=er.af;er.th=er.dz;er.ti=er.pa;er.tk=er.af;er.to=er.dz;er.tr=er.af;er.ug=er.af;er.uk=er.ru;er.ur=er.ast;er.uz=er.af;er.vi=er.dz;er.wae=er.af;er.wo=er.dz;er.xh=er.af;er.yi=er.ast;er.yo=er.dz;er.yue=er.dz;er.zh=er.dz;er.zu=er.am;const _M=er;function SM(e){return e==="pt-PT"?e:jwe(e)}var Nwe=/^([a-z0-9]+)/i;function jwe(e){var t=e.match(Nwe);if(!t)throw new TypeError("Invalid locale: ".concat(e));return t[1]}function $we(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function CM(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,i=new Array(t);r0&&arguments[0]!==void 0?arguments[0]:[],r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Kwe(this,e);var i=r.numeric,o=r.style,a=r.localeMatcher;if(this.numeric="always",this.style="long",this.localeMatcher="lookup",i!==void 0){if(Qwe.indexOf(i)<0)throw new RangeError('Invalid "numeric" option: '.concat(i));this.numeric=i}if(o!==void 0){if(Zwe.indexOf(o)<0)throw new RangeError('Invalid "style" option: '.concat(o));this.style=o}if(a!==void 0){if(Xwe.indexOf(a)<0)throw new RangeError('Invalid "localeMatcher" option: '.concat(a));this.localeMatcher=a}if(typeof t=="string"&&(t=[t]),t.push(Mj()),this.locale=e.supportedLocalesOf(t,{localeMatcher:this.localeMatcher})[0],!this.locale)throw new Error("No supported locale was found");x4.supportedLocalesOf(this.locale).length>0?this.pluralRules=new x4(this.locale):console.warn('"'.concat(this.locale,'" locale is not supported')),typeof Intl<"u"&&Intl.NumberFormat?(this.numberFormat=new Intl.NumberFormat(this.locale),this.numberingSystem=this.numberFormat.resolvedOptions().numberingSystem):this.numberingSystem="latn",this.locale=Oj(this.locale,{localeMatcher:this.localeMatcher})}return Gwe(e,[{key:"format",value:function(){var r=RM(arguments),i=AM(r,2),o=i[0],a=i[1];return this.getRule(o,a).replace("{0}",this.formatNumber(Math.abs(o)))}},{key:"formatToParts",value:function(){var r=RM(arguments),i=AM(r,2),o=i[0],a=i[1],s=this.getRule(o,a),l=s.indexOf("{0}");if(l<0)return[{type:"literal",value:s}];var u=[];return l>0&&u.push({type:"literal",value:s.slice(0,l)}),u=u.concat(this.formatNumberToParts(Math.abs(o)).map(function(c){return EM(EM({},c),{},{unit:a})})),l+31&&arguments[1]!==void 0?arguments[1]:{};if(typeof e=="string")e=[e];else if(!Array.isArray(e))throw new TypeError('Invalid "locales" argument');return e.filter(function(r){return Oj(r,t)})};Ud.addLocale=Lwe;Ud.setDefaultLocale=Uwe;Ud.getDefaultLocale=Mj;Ud.PluralRules=x4;var Q5='Invalid "unit" argument';function Jwe(e){if(_4(e)==="symbol")throw new TypeError(Q5);if(typeof e!="string")throw new RangeError("".concat(Q5,": ").concat(e));if(e[e.length-1]==="s"&&(e=e.slice(0,e.length-1)),Ywe.indexOf(e)<0)throw new RangeError("".concat(Q5,": ").concat(e));return e}var e2e='Invalid "number" argument';function t2e(e){if(e=Number(e),Number.isFinite&&!Number.isFinite(e))throw new RangeError("".concat(e2e,": ").concat(e));return e}function r2e(e){return 1/e===-1/0}function n2e(e){return e<0||e===0&&r2e(e)}function RM(e){if(e.length<2)throw new TypeError('"unit" argument is required');return[t2e(e[0]),Jwe(e[1])]}function Pb(e){return Pb=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pb(e)}function i2e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function PM(e,t){for(var r=0;r=e.length?{done:!0}:{done:!1,value:e[i++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function s2e(e,t){if(!!e){if(typeof e=="string")return OM(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return OM(e,t)}}function OM(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,i=new Array(t);r1;)if(a.pop(),o=a.join("-"),t(o))return o}throw new Error("No locale data has been registered for any of the locales: ".concat(e.join(", ")))}function u2e(){var e=(typeof Intl>"u"?"undefined":S4(Intl))==="object";return e&&typeof Intl.DateTimeFormat=="function"}function C4(e){return C4=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},C4(e)}function c2e(e){return f2e(e)&&(Array.isArray(e.steps)||Array.isArray(e.gradation)||Array.isArray(e.flavour)||typeof e.flavour=="string"||Array.isArray(e.labels)||typeof e.labels=="string"||Array.isArray(e.units)||typeof e.custom=="function")}var d2e={}.constructor;function f2e(e){return C4(e)!==void 0&&e!==null&&e.constructor===d2e}var nc=60,Mb=60*nc,Tf=24*Mb,k4=7*Tf,E4=30.44*Tf,Bj=146097/400*Tf;function xh(e){switch(e){case"second":return 1;case"minute":return nc;case"hour":return Mb;case"day":return Tf;case"week":return k4;case"month":return E4;case"year":return Bj}}function Uj(e){return e.factor!==void 0?e.factor:xh(e.unit||e.formatAs)||1}function ty(e){switch(e){case"floor":return Math.floor;default:return Math.round}}function kE(e){switch(e){case"floor":return 1;default:return .5}}function A4(e){return A4=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},A4(e)}function Dj(e,t){var r=t.prevStep,i=t.timestamp,o=t.now,a=t.future,s=t.round,l;return r&&(r.id||r.unit)&&(l=e["threshold_for_".concat(r.id||r.unit)]),l===void 0&&e.threshold!==void 0&&(l=e.threshold,typeof l=="function"&&(l=l(o,a))),l===void 0&&(l=e.minTime),A4(l)==="object"&&(r&&r.id&&l[r.id]!==void 0?l=l[r.id]:l=l.default),typeof l=="function"&&(l=l(i,{future:a,getMinTimeForUnit:function(c,d){return BM(c,d||r&&r.formatAs,{round:s})}})),l===void 0&&e.test&&(e.test(i,{now:o,future:a})?l=0:l=9007199254740991),l===void 0&&(r?e.formatAs&&r.formatAs&&(l=BM(e.formatAs,r.formatAs,{round:s})):l=0),l===void 0&&console.warn("[javascript-time-ago] A step should specify `minTime`:\n"+JSON.stringify(e,null,2)),l}function BM(e,t,r){var i=r.round,o=xh(e),a;if(t==="now"?a=xh(e):a=xh(t),o!==void 0&&a!==void 0)return o-a*(1-kE(i))}function UM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function p2e(e){for(var t=1;t0)return e[s-1]}return l}}}function Lj(e,t,r){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,o=Dj(e[i],p2e({prevStep:e[i-1],timestamp:r.now-t*1e3},r));return o===void 0||Math.abs(t)=0:!0})}function v2e(e,t,r){var i=r.now,o=r.round;if(!!xh(e)){var a=xh(e)*1e3,s=t>i,l=Math.abs(t-i),u=ty(o)(l/a)*a;return s?u>0?l-u+w2e(o,a):l-u+1:-(l-u)+b2e(o,a)}}function b2e(e,t){return kE(e)*t}function w2e(e,t){return(1-kE(e))*t+1}var x2e=365*24*60*60*1e3,Nj=1e3*x2e;function _2e(e,t,r){var i=r.prevStep,o=r.nextStep,a=r.now,s=r.future,l=r.round,u=e.getTime?e.getTime():e,c=function(b){return v2e(b,u,{now:a,round:l})},d=C2e(s?t:o,u,{future:s,now:a,round:l,prevStep:s?i:t});if(d!==void 0){var p;if(t&&(t.getTimeToNextUpdate&&(p=t.getTimeToNextUpdate(u,{getTimeToNextUpdateForUnit:c,getRoundFunction:ty,now:a,future:s,round:l})),p===void 0)){var v=t.unit||t.formatAs;v&&(p=c(v))}return p===void 0?d:Math.min(p,d)}}function S2e(e,t,r){var i=r.now,o=r.future,a=r.round,s=r.prevStep,l=Dj(e,{timestamp:t,now:i,future:o,round:a,prevStep:s});if(l!==void 0)return o?t-l*1e3+1:l===0&&t===i?Nj:t+l*1e3}function C2e(e,t,r){var i=r.now,o=r.future,a=r.round,s=r.prevStep;if(e){var l=S2e(e,t,{now:i,future:o,round:a,prevStep:s});return l===void 0?void 0:l-i}else return o?t-i+1:Nj}var jj={};function uh(e){return jj[e]}function $j(e){if(!e)throw new Error("[javascript-time-ago] No locale data passed.");jj[e.locale]=e}const k2e=[{formatAs:"now"},{formatAs:"second"},{formatAs:"minute"},{formatAs:"hour"},{formatAs:"day"},{formatAs:"week"},{formatAs:"month"},{formatAs:"year"}],T4={steps:k2e,labels:"long"};function DM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function LM(e){for(var t=1;t=e.length?{done:!0}:{done:!1,value:e[i++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function W2e(e,t){return K2e(e)||q2e(e,t)||Hj(e,t)||V2e()}function V2e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. @@ -1235,8 +1235,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wxe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function xxe(e){if(Array.isArray(e))return B4(e)}function aO(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function sO(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,i=new Array(t);rr)return[!1,lO(r)];if(e.sizer)return[!1,lO(r)]}return[!0,null]}function pf(e){return e!=null}function Pxe(e){var t=e.files,r=e.accept,i=e.minSize,o=e.maxSize,a=e.multiple,s=e.maxFiles,l=e.validator;return!a&&t.length>1||a&&s>=1&&t.length>s?!1:t.every(function(u){var c=Yj(u,r),d=ny(c,1),p=d[0],v=Qj(u,i,o),x=ny(v,1),b=x[0],y=l?l(u):null;return p&&b&&!y})}function Ub(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function zv(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function cO(e){e.preventDefault()}function Mxe(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function Oxe(e){return e.indexOf("Edge/")!==-1}function Bxe(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return Mxe(e)||Oxe(e)}function lu(){for(var e=arguments.length,t=new Array(e),r=0;r1?o-1:0),s=1;se.length)&&(t=e.length);for(var r=0,i=new Array(t);r=0)&&(!Object.prototype.propertyIsEnumerable.call(e,i)||(r[i]=e[i]))}return r}function Zxe(e,t){if(e==null)return{};var r={},i=Object.keys(e),o,a;for(a=0;a=0)&&(r[o]=e[o]);return r}var EE=X.exports.forwardRef(function(e,t){var r=e.children,i=Db(e,$xe),o=t$(i),a=o.open,s=Db(o,Fxe);return X.exports.useImperativeHandle(t,function(){return{open:a}},[a]),L(X.exports.Fragment,{children:r(Go(Go({},s),{},{open:a}))})});EE.displayName="Dropzone";var e$={disabled:!1,getFilesFromEvent:uxe,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};EE.defaultProps=e$;EE.propTypes={children:Co.exports.func,accept:Co.exports.objectOf(Co.exports.arrayOf(Co.exports.string)),multiple:Co.exports.bool,preventDropOnDocument:Co.exports.bool,noClick:Co.exports.bool,noKeyboard:Co.exports.bool,noDrag:Co.exports.bool,noDragEventsBubbling:Co.exports.bool,minSize:Co.exports.number,maxSize:Co.exports.number,maxFiles:Co.exports.number,disabled:Co.exports.bool,getFilesFromEvent:Co.exports.func,onFileDialogCancel:Co.exports.func,onFileDialogOpen:Co.exports.func,useFsAccessApi:Co.exports.bool,autoFocus:Co.exports.bool,onDragEnter:Co.exports.func,onDragLeave:Co.exports.func,onDragOver:Co.exports.func,onDrop:Co.exports.func,onDropAccepted:Co.exports.func,onDropRejected:Co.exports.func,onError:Co.exports.func,validator:Co.exports.func};var L4={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function t$(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Go(Go({},e$),e),r=t.accept,i=t.disabled,o=t.getFilesFromEvent,a=t.maxSize,s=t.minSize,l=t.multiple,u=t.maxFiles,c=t.onDragEnter,d=t.onDragLeave,p=t.onDragOver,v=t.onDrop,x=t.onDropAccepted,b=t.onDropRejected,y=t.onFileDialogCancel,_=t.onFileDialogOpen,k=t.useFsAccessApi,E=t.autoFocus,B=t.preventDropOnDocument,U=t.noClick,D=t.noKeyboard,j=t.noDrag,F=t.noDragEventsBubbling,H=t.onError,W=t.validator,G=X.exports.useMemo(function(){return Lxe(r)},[r]),ae=X.exports.useMemo(function(){return Dxe(r)},[r]),V=X.exports.useMemo(function(){return typeof _=="function"?_:fO},[_]),oe=X.exports.useMemo(function(){return typeof y=="function"?y:fO},[y]),P=X.exports.useRef(null),ee=X.exports.useRef(null),le=X.exports.useReducer(Xxe,L4),pe=Z5(le,2),_e=pe[0],J=pe[1],ft=_e.isFocused,Le=_e.isFileDialogActive,He=X.exports.useRef(typeof window<"u"&&window.isSecureContext&&k&&Uxe()),nr=function(){!He.current&&Le&&setTimeout(function(){if(ee.current){var ie=ee.current.files;ie.length||(J({type:"closeDialog"}),oe())}},300)};X.exports.useEffect(function(){return window.addEventListener("focus",nr,!1),function(){window.removeEventListener("focus",nr,!1)}},[ee,Le,oe,He]);var Bt=X.exports.useRef([]),Rt=function(ie){P.current&&P.current.contains(ie.target)||(ie.preventDefault(),Bt.current=[])};X.exports.useEffect(function(){return B&&(document.addEventListener("dragover",cO,!1),document.addEventListener("drop",Rt,!1)),function(){B&&(document.removeEventListener("dragover",cO),document.removeEventListener("drop",Rt))}},[P,B]),X.exports.useEffect(function(){return!i&&E&&P.current&&P.current.focus(),function(){}},[P,E,i]);var Jt=X.exports.useCallback(function(ce){H?H(ce):console.error(ce)},[H]),vr=X.exports.useCallback(function(ce){ce.preventDefault(),ce.persist(),Be(ce),Bt.current=[].concat(Wxe(Bt.current),[ce.target]),zv(ce)&&Promise.resolve(o(ce)).then(function(ie){if(!(Ub(ce)&&!F)){var de=ie.length,$=de>0&&Pxe({files:ie,accept:G,minSize:s,maxSize:a,multiple:l,maxFiles:u,validator:W}),C=de>0&&!$;J({isDragAccept:$,isDragReject:C,isDragActive:!0,type:"setDraggedFiles"}),c&&c(ce)}}).catch(function(ie){return Jt(ie)})},[o,c,Jt,F,G,s,a,l,u,W]),At=X.exports.useCallback(function(ce){ce.preventDefault(),ce.persist(),Be(ce);var ie=zv(ce);if(ie&&ce.dataTransfer)try{ce.dataTransfer.dropEffect="copy"}catch{}return ie&&p&&p(ce),!1},[p,F]),kt=X.exports.useCallback(function(ce){ce.preventDefault(),ce.persist(),Be(ce);var ie=Bt.current.filter(function($){return P.current&&P.current.contains($)}),de=ie.indexOf(ce.target);de!==-1&&ie.splice(de,1),Bt.current=ie,!(ie.length>0)&&(J({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),zv(ce)&&d&&d(ce))},[P,d,F]),Ct=X.exports.useCallback(function(ce,ie){var de=[],$=[];ce.forEach(function(C){var T=Yj(C,G),Q=Z5(T,2),ve=Q[0],je=Q[1],ct=Qj(C,s,a),ur=Z5(ct,2),Dr=ur[0],hr=ur[1],Rr=W?W(C):null;if(ve&&Dr&&!Rr)de.push(C);else{var Gr=[je,hr];Rr&&(Gr=Gr.concat(Rr)),$.push({file:C,errors:Gr.filter(function(Nr){return Nr})})}}),(!l&&de.length>1||l&&u>=1&&de.length>u)&&(de.forEach(function(C){$.push({file:C,errors:[Rxe]})}),de.splice(0)),J({acceptedFiles:de,fileRejections:$,type:"setFiles"}),v&&v(de,$,ie),$.length>0&&b&&b($,ie),de.length>0&&x&&x(de,ie)},[J,l,G,s,a,u,v,x,b,W]),Lt=X.exports.useCallback(function(ce){ce.preventDefault(),ce.persist(),Be(ce),Bt.current=[],zv(ce)&&Promise.resolve(o(ce)).then(function(ie){Ub(ce)&&!F||Ct(ie,ce)}).catch(function(ie){return Jt(ie)}),J({type:"reset"})},[o,Ct,Jt,F]),Kt=X.exports.useCallback(function(){if(He.current){J({type:"openDialog"}),V();var ce={multiple:l,types:ae};window.showOpenFilePicker(ce).then(function(ie){return o(ie)}).then(function(ie){Ct(ie,null),J({type:"closeDialog"})}).catch(function(ie){Nxe(ie)?(oe(ie),J({type:"closeDialog"})):jxe(ie)?(He.current=!1,ee.current?(ee.current.value=null,ee.current.click()):Jt(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no was provided."))):Jt(ie)});return}ee.current&&(J({type:"openDialog"}),V(),ee.current.value=null,ee.current.click())},[J,V,oe,k,Ct,Jt,ae,l]),yr=X.exports.useCallback(function(ce){!P.current||!P.current.isEqualNode(ce.target)||(ce.key===" "||ce.key==="Enter"||ce.keyCode===32||ce.keyCode===13)&&(ce.preventDefault(),Kt())},[P,Kt]),ne=X.exports.useCallback(function(){J({type:"focus"})},[]),Mt=X.exports.useCallback(function(){J({type:"blur"})},[]),Nt=X.exports.useCallback(function(){U||(Bxe()?setTimeout(Kt,0):Kt())},[U,Kt]),Ie=function(ie){return i?null:ie},Ae=function(ie){return D?null:Ie(ie)},fe=function(ie){return j?null:Ie(ie)},Be=function(ie){F&&ie.stopPropagation()},rt=X.exports.useMemo(function(){return function(){var ce=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ie=ce.refKey,de=ie===void 0?"ref":ie,$=ce.role,C=ce.onKeyDown,T=ce.onFocus,Q=ce.onBlur,ve=ce.onClick,je=ce.onDragEnter,ct=ce.onDragOver,ur=ce.onDragLeave,Dr=ce.onDrop,hr=Db(ce,zxe);return Go(Go(D4({onKeyDown:Ae(lu(C,yr)),onFocus:Ae(lu(T,ne)),onBlur:Ae(lu(Q,Mt)),onClick:Ie(lu(ve,Nt)),onDragEnter:fe(lu(je,vr)),onDragOver:fe(lu(ct,At)),onDragLeave:fe(lu(ur,kt)),onDrop:fe(lu(Dr,Lt)),role:typeof $=="string"&&$!==""?$:"presentation"},de,P),!i&&!D?{tabIndex:0}:{}),hr)}},[P,yr,ne,Mt,Nt,vr,At,kt,Lt,D,j,i]),lt=X.exports.useCallback(function(ce){ce.stopPropagation()},[]),jt=X.exports.useMemo(function(){return function(){var ce=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ie=ce.refKey,de=ie===void 0?"ref":ie,$=ce.onChange,C=ce.onClick,T=Db(ce,Hxe),Q=D4({accept:G,multiple:l,type:"file",style:{display:"none"},onChange:Ie(lu($,Lt)),onClick:Ie(lu(C,lt)),tabIndex:-1},de,ee);return Go(Go({},Q),T)}},[ee,r,l,Lt,i]);return Go(Go({},_e),{},{isFocused:ft&&!i,getRootProps:rt,getInputProps:jt,rootRef:P,inputRef:ee,open:Ie(Kt)})}function Xxe(e,t){switch(t.type){case"focus":return Go(Go({},e),{},{isFocused:!0});case"blur":return Go(Go({},e),{},{isFocused:!1});case"openDialog":return Go(Go({},L4),{},{isFileDialogActive:!0});case"closeDialog":return Go(Go({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Go(Go({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Go(Go({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return Go({},L4);default:return e}}function fO(){}const Jxe="/assets/sources.bdd55da1.svg",r$="/assets/verified-bold.54828026.svg",e_e="/assets/upload.c0ad3052.svg",t_e=Xi($n)({justifyContent:"center",backgroundColor:"#F7F9FB",textAlign:"center",height:148,overflow:"hidden",border:"1px dashed #E3E8EA",color:"#728A96",borderRadius:20,lineHeight:148,cursor:"pointer","&:hover":{border:"1px dashed #9da3a5"}});function r_e(){const{addFiles:e,hasFiles:t}=zu(),{step:r}=Vx(),i=aa("(max-width: 450px)"),{active:o}=wk(),a=c=>{e(c)},{getRootProps:s,getInputProps:l,isDragActive:u}=t$({onDrop:a,accept:{"text/plain":Tb.map(c=>`.${c}`)}});return Ut(ta,{children:[L(p2,{mb:1,children:Ut($n,{sx:{justifyContent:"space-between",width:"100%",flexDirection:i?"column":"inherit"},children:[Ut($n,{mb:i?2:0,sx:{width:"100%"},children:[L(cg,{children:L("img",{src:r===hc.PUBLISH?r$:Jxe,alt:"Block icon",width:41,height:41})}),L(Fd,{children:"Add sources"})]}),t()&&r!==hc.PUBLISH&&L("div",{...s(),children:Ut(Ha,{fontSize:12,fontWeight:700,hoverBackground:"#e3e3e3",background:"#F8F8F8",height:44,width:159,children:[L("img",{src:e_e,alt:"Sources icon",width:19,height:19}),"Upload source"]})})]})}),Ut(kn,{sx:{padding:"15px 30px"},children:[L(kn,{sx:{position:"relative",zIndex:o?0:4,transition:o?"":"1.5s z-index"},children:!t()&&Ut(t_e,{...s(),children:["Drop sources (",Tb.map(c=>`.${c}`).join(", "),") here"]})}),L("input",{...l(),onClick:c=>{c.target.value=""},style:{display:"none"},id:"fileUpload",type:"file",multiple:!0,accept:".fc,.func,.fif"})]})]})}function n_e(){for(var e=arguments.length,t=new Array(e),r=0;ri=>{t.forEach(o=>o(i))},t)}const qx=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Rg(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function AE(e){return"nodeType"in e}function Ds(e){var t,r;return e?Rg(e)?e:AE(e)&&(t=(r=e.ownerDocument)==null?void 0:r.defaultView)!=null?t:window:window}function TE(e){const{Document:t}=Ds(e);return e instanceof t}function Ny(e){return Rg(e)?!1:e instanceof Ds(e).HTMLElement}function i_e(e){return e instanceof Ds(e).SVGElement}function Pg(e){return e?Rg(e)?e.document:AE(e)?TE(e)?e:Ny(e)?e.ownerDocument:document:document:document}const Jl=qx?X.exports.useLayoutEffect:X.exports.useEffect;function IE(e){const t=X.exports.useRef(e);return Jl(()=>{t.current=e}),X.exports.useCallback(function(){for(var r=arguments.length,i=new Array(r),o=0;o{e.current=setInterval(i,o)},[]),r=X.exports.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,r]}function iy(e,t){t===void 0&&(t=[e]);const r=X.exports.useRef(e);return Jl(()=>{r.current!==e&&(r.current=e)},t),r}function jy(e,t){const r=X.exports.useRef();return X.exports.useMemo(()=>{const i=e(r.current);return r.current=i,i},[...t])}function Lb(e){const t=IE(e),r=X.exports.useRef(null),i=X.exports.useCallback(o=>{o!==r.current&&t?.(o,r.current),r.current=o},[]);return[r,i]}function N4(e){const t=X.exports.useRef();return X.exports.useEffect(()=>{t.current=e},[e]),t.current}let X5={};function $y(e,t){return X.exports.useMemo(()=>{if(t)return t;const r=X5[e]==null?0:X5[e]+1;return X5[e]=r,e+"-"+r},[e,t])}function n$(e){return function(t){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o{const l=Object.entries(s);for(const[u,c]of l){const d=a[u];d!=null&&(a[u]=d+e*c)}return a},{...t})}}const _h=n$(1),oy=n$(-1);function a_e(e){return"clientX"in e&&"clientY"in e}function RE(e){if(!e)return!1;const{KeyboardEvent:t}=Ds(e.target);return t&&e instanceof t}function s_e(e){if(!e)return!1;const{TouchEvent:t}=Ds(e.target);return t&&e instanceof t}function j4(e){if(s_e(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:r}=e.touches[0];return{x:t,y:r}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:r}=e.changedTouches[0];return{x:t,y:r}}}return a_e(e)?{x:e.clientX,y:e.clientY}:null}const ay=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:r}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(r?Math.round(r):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:r}=e;return"scaleX("+t+") scaleY("+r+")"}},Transform:{toString(e){if(!!e)return[ay.Translate.toString(e),ay.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:r,easing:i}=e;return t+" "+r+"ms "+i}}}),pO="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function l_e(e){return e.matches(pO)?e:e.querySelector(pO)}function u_e(e,t,r){const i={...e};return t.top+e.y<=r.top?i.y=r.top-t.top:t.bottom+e.y>=r.top+r.height&&(i.y=r.top+r.height-t.bottom),t.left+e.x<=r.left?i.x=r.left-t.left:t.right+e.x>=r.left+r.width&&(i.x=r.left+r.width-t.right),i}const c_e=e=>{let{containerNodeRect:t,draggingNodeRect:r,transform:i}=e;return!r||!t?i:u_e(i,r,t)},d_e=e=>{let{transform:t}=e;return{...t,x:0}},f_e={display:"none"};function p_e(e){let{id:t,value:r}=e;return L("div",{id:t,style:f_e,children:r})}const h_e={position:"fixed",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};function g_e(e){let{id:t,announcement:r}=e;return L("div",{id:t,style:h_e,role:"status","aria-live":"assertive","aria-atomic":!0,children:r})}function m_e(){const[e,t]=X.exports.useState("");return{announce:X.exports.useCallback(i=>{i!=null&&t(i)},[]),announcement:e}}const i$=X.exports.createContext(null);function y_e(e){const t=X.exports.useContext(i$);X.exports.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of ");return t(e)},[e,t])}function v_e(){const[e]=X.exports.useState(()=>new Set),t=X.exports.useCallback(i=>(e.add(i),()=>e.delete(i)),[e]);return[X.exports.useCallback(i=>{let{type:o,event:a}=i;e.forEach(s=>{var l;return(l=s[o])==null?void 0:l.call(s,a)})},[e]),t]}const b_e={draggable:` +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Jj(e,t){if(!!e){if(typeof e=="string")return U4(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return U4(e,t)}}function U4(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,i=new Array(t);r=0)&&(!Object.prototype.propertyIsEnumerable.call(e,i)||(r[i]=e[i]))}return r}function Zxe(e,t){if(e==null)return{};var r={},i=Object.keys(e),o,a;for(a=0;a=0)&&(r[o]=e[o]);return r}var EE=X.exports.forwardRef(function(e,t){var r=e.children,i=Db(e,$xe),o=t$(i),a=o.open,s=Db(o,Fxe);return X.exports.useImperativeHandle(t,function(){return{open:a}},[a]),L(X.exports.Fragment,{children:r(Go(Go({},s),{},{open:a}))})});EE.displayName="Dropzone";var e$={disabled:!1,getFilesFromEvent:uxe,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};EE.defaultProps=e$;EE.propTypes={children:Co.exports.func,accept:Co.exports.objectOf(Co.exports.arrayOf(Co.exports.string)),multiple:Co.exports.bool,preventDropOnDocument:Co.exports.bool,noClick:Co.exports.bool,noKeyboard:Co.exports.bool,noDrag:Co.exports.bool,noDragEventsBubbling:Co.exports.bool,minSize:Co.exports.number,maxSize:Co.exports.number,maxFiles:Co.exports.number,disabled:Co.exports.bool,getFilesFromEvent:Co.exports.func,onFileDialogCancel:Co.exports.func,onFileDialogOpen:Co.exports.func,useFsAccessApi:Co.exports.bool,autoFocus:Co.exports.bool,onDragEnter:Co.exports.func,onDragLeave:Co.exports.func,onDragOver:Co.exports.func,onDrop:Co.exports.func,onDropAccepted:Co.exports.func,onDropRejected:Co.exports.func,onError:Co.exports.func,validator:Co.exports.func};var L4={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function t$(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Go(Go({},e$),e),r=t.accept,i=t.disabled,o=t.getFilesFromEvent,a=t.maxSize,s=t.minSize,l=t.multiple,u=t.maxFiles,c=t.onDragEnter,d=t.onDragLeave,p=t.onDragOver,v=t.onDrop,x=t.onDropAccepted,b=t.onDropRejected,y=t.onFileDialogCancel,_=t.onFileDialogOpen,k=t.useFsAccessApi,E=t.autoFocus,B=t.preventDropOnDocument,U=t.noClick,D=t.noKeyboard,j=t.noDrag,F=t.noDragEventsBubbling,H=t.onError,W=t.validator,G=X.exports.useMemo(function(){return Lxe(r)},[r]),ae=X.exports.useMemo(function(){return Dxe(r)},[r]),V=X.exports.useMemo(function(){return typeof _=="function"?_:fO},[_]),oe=X.exports.useMemo(function(){return typeof y=="function"?y:fO},[y]),P=X.exports.useRef(null),ee=X.exports.useRef(null),le=X.exports.useReducer(Xxe,L4),pe=Z5(le,2),_e=pe[0],J=pe[1],ft=_e.isFocused,Le=_e.isFileDialogActive,He=X.exports.useRef(typeof window<"u"&&window.isSecureContext&&k&&Uxe()),nr=function(){!He.current&&Le&&setTimeout(function(){if(ee.current){var ie=ee.current.files;ie.length||(J({type:"closeDialog"}),oe())}},300)};X.exports.useEffect(function(){return window.addEventListener("focus",nr,!1),function(){window.removeEventListener("focus",nr,!1)}},[ee,Le,oe,He]);var Bt=X.exports.useRef([]),Rt=function(ie){P.current&&P.current.contains(ie.target)||(ie.preventDefault(),Bt.current=[])};X.exports.useEffect(function(){return B&&(document.addEventListener("dragover",cO,!1),document.addEventListener("drop",Rt,!1)),function(){B&&(document.removeEventListener("dragover",cO),document.removeEventListener("drop",Rt))}},[P,B]),X.exports.useEffect(function(){return!i&&E&&P.current&&P.current.focus(),function(){}},[P,E,i]);var Jt=X.exports.useCallback(function(ce){H?H(ce):console.error(ce)},[H]),vr=X.exports.useCallback(function(ce){ce.preventDefault(),ce.persist(),Be(ce),Bt.current=[].concat(Wxe(Bt.current),[ce.target]),zv(ce)&&Promise.resolve(o(ce)).then(function(ie){if(!(Ub(ce)&&!F)){var de=ie.length,$=de>0&&Pxe({files:ie,accept:G,minSize:s,maxSize:a,multiple:l,maxFiles:u,validator:W}),C=de>0&&!$;J({isDragAccept:$,isDragReject:C,isDragActive:!0,type:"setDraggedFiles"}),c&&c(ce)}}).catch(function(ie){return Jt(ie)})},[o,c,Jt,F,G,s,a,l,u,W]),At=X.exports.useCallback(function(ce){ce.preventDefault(),ce.persist(),Be(ce);var ie=zv(ce);if(ie&&ce.dataTransfer)try{ce.dataTransfer.dropEffect="copy"}catch{}return ie&&p&&p(ce),!1},[p,F]),kt=X.exports.useCallback(function(ce){ce.preventDefault(),ce.persist(),Be(ce);var ie=Bt.current.filter(function($){return P.current&&P.current.contains($)}),de=ie.indexOf(ce.target);de!==-1&&ie.splice(de,1),Bt.current=ie,!(ie.length>0)&&(J({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),zv(ce)&&d&&d(ce))},[P,d,F]),Ct=X.exports.useCallback(function(ce,ie){var de=[],$=[];ce.forEach(function(C){var T=Yj(C,G),Q=Z5(T,2),ve=Q[0],je=Q[1],ct=Qj(C,s,a),ur=Z5(ct,2),Dr=ur[0],hr=ur[1],Rr=W?W(C):null;if(ve&&Dr&&!Rr)de.push(C);else{var Gr=[je,hr];Rr&&(Gr=Gr.concat(Rr)),$.push({file:C,errors:Gr.filter(function(Nr){return Nr})})}}),(!l&&de.length>1||l&&u>=1&&de.length>u)&&(de.forEach(function(C){$.push({file:C,errors:[Rxe]})}),de.splice(0)),J({acceptedFiles:de,fileRejections:$,type:"setFiles"}),v&&v(de,$,ie),$.length>0&&b&&b($,ie),de.length>0&&x&&x(de,ie)},[J,l,G,s,a,u,v,x,b,W]),Lt=X.exports.useCallback(function(ce){ce.preventDefault(),ce.persist(),Be(ce),Bt.current=[],zv(ce)&&Promise.resolve(o(ce)).then(function(ie){Ub(ce)&&!F||Ct(ie,ce)}).catch(function(ie){return Jt(ie)}),J({type:"reset"})},[o,Ct,Jt,F]),Kt=X.exports.useCallback(function(){if(He.current){J({type:"openDialog"}),V();var ce={multiple:l,types:ae};window.showOpenFilePicker(ce).then(function(ie){return o(ie)}).then(function(ie){Ct(ie,null),J({type:"closeDialog"})}).catch(function(ie){Nxe(ie)?(oe(ie),J({type:"closeDialog"})):jxe(ie)?(He.current=!1,ee.current?(ee.current.value=null,ee.current.click()):Jt(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no was provided."))):Jt(ie)});return}ee.current&&(J({type:"openDialog"}),V(),ee.current.value=null,ee.current.click())},[J,V,oe,k,Ct,Jt,ae,l]),yr=X.exports.useCallback(function(ce){!P.current||!P.current.isEqualNode(ce.target)||(ce.key===" "||ce.key==="Enter"||ce.keyCode===32||ce.keyCode===13)&&(ce.preventDefault(),Kt())},[P,Kt]),ne=X.exports.useCallback(function(){J({type:"focus"})},[]),Mt=X.exports.useCallback(function(){J({type:"blur"})},[]),Nt=X.exports.useCallback(function(){U||(Bxe()?setTimeout(Kt,0):Kt())},[U,Kt]),Ie=function(ie){return i?null:ie},Ae=function(ie){return D?null:Ie(ie)},fe=function(ie){return j?null:Ie(ie)},Be=function(ie){F&&ie.stopPropagation()},rt=X.exports.useMemo(function(){return function(){var ce=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ie=ce.refKey,de=ie===void 0?"ref":ie,$=ce.role,C=ce.onKeyDown,T=ce.onFocus,Q=ce.onBlur,ve=ce.onClick,je=ce.onDragEnter,ct=ce.onDragOver,ur=ce.onDragLeave,Dr=ce.onDrop,hr=Db(ce,zxe);return Go(Go(D4({onKeyDown:Ae(lu(C,yr)),onFocus:Ae(lu(T,ne)),onBlur:Ae(lu(Q,Mt)),onClick:Ie(lu(ve,Nt)),onDragEnter:fe(lu(je,vr)),onDragOver:fe(lu(ct,At)),onDragLeave:fe(lu(ur,kt)),onDrop:fe(lu(Dr,Lt)),role:typeof $=="string"&&$!==""?$:"presentation"},de,P),!i&&!D?{tabIndex:0}:{}),hr)}},[P,yr,ne,Mt,Nt,vr,At,kt,Lt,D,j,i]),lt=X.exports.useCallback(function(ce){ce.stopPropagation()},[]),jt=X.exports.useMemo(function(){return function(){var ce=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ie=ce.refKey,de=ie===void 0?"ref":ie,$=ce.onChange,C=ce.onClick,T=Db(ce,Hxe),Q=D4({accept:G,multiple:l,type:"file",style:{display:"none"},onChange:Ie(lu($,Lt)),onClick:Ie(lu(C,lt)),tabIndex:-1},de,ee);return Go(Go({},Q),T)}},[ee,r,l,Lt,i]);return Go(Go({},_e),{},{isFocused:ft&&!i,getRootProps:rt,getInputProps:jt,rootRef:P,inputRef:ee,open:Ie(Kt)})}function Xxe(e,t){switch(t.type){case"focus":return Go(Go({},e),{},{isFocused:!0});case"blur":return Go(Go({},e),{},{isFocused:!1});case"openDialog":return Go(Go({},L4),{},{isFileDialogActive:!0});case"closeDialog":return Go(Go({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Go(Go({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Go(Go({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return Go({},L4);default:return e}}function fO(){}const Jxe="/verifier/assets/sources.bdd55da1.svg",r$="/verifier/assets/verified-bold.54828026.svg",e_e="/verifier/assets/upload.c0ad3052.svg",t_e=Xi($n)({justifyContent:"center",backgroundColor:"#F7F9FB",textAlign:"center",height:148,overflow:"hidden",border:"1px dashed #E3E8EA",color:"#728A96",borderRadius:20,lineHeight:148,cursor:"pointer","&:hover":{border:"1px dashed #9da3a5"}});function r_e(){const{addFiles:e,hasFiles:t}=zu(),{step:r}=Vx(),i=aa("(max-width: 450px)"),{active:o}=wk(),a=c=>{e(c)},{getRootProps:s,getInputProps:l,isDragActive:u}=t$({onDrop:a,accept:{"text/plain":Tb.map(c=>`.${c}`)}});return Ut(ta,{children:[L(p2,{mb:1,children:Ut($n,{sx:{justifyContent:"space-between",width:"100%",flexDirection:i?"column":"inherit"},children:[Ut($n,{mb:i?2:0,sx:{width:"100%"},children:[L(cg,{children:L("img",{src:r===hc.PUBLISH?r$:Jxe,alt:"Block icon",width:41,height:41})}),L(Fd,{children:"Add sources"})]}),t()&&r!==hc.PUBLISH&&L("div",{...s(),children:Ut(Ha,{fontSize:12,fontWeight:700,hoverBackground:"#e3e3e3",background:"#F8F8F8",height:44,width:159,children:[L("img",{src:e_e,alt:"Sources icon",width:19,height:19}),"Upload source"]})})]})}),Ut(kn,{sx:{padding:"15px 30px"},children:[L(kn,{sx:{position:"relative",zIndex:o?0:4,transition:o?"":"1.5s z-index"},children:!t()&&Ut(t_e,{...s(),children:["Drop sources (",Tb.map(c=>`.${c}`).join(", "),") here"]})}),L("input",{...l(),onClick:c=>{c.target.value=""},style:{display:"none"},id:"fileUpload",type:"file",multiple:!0,accept:".fc,.func,.fif"})]})]})}function n_e(){for(var e=arguments.length,t=new Array(e),r=0;ri=>{t.forEach(o=>o(i))},t)}const qx=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Rg(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function AE(e){return"nodeType"in e}function Ds(e){var t,r;return e?Rg(e)?e:AE(e)&&(t=(r=e.ownerDocument)==null?void 0:r.defaultView)!=null?t:window:window}function TE(e){const{Document:t}=Ds(e);return e instanceof t}function Ny(e){return Rg(e)?!1:e instanceof Ds(e).HTMLElement}function i_e(e){return e instanceof Ds(e).SVGElement}function Pg(e){return e?Rg(e)?e.document:AE(e)?TE(e)?e:Ny(e)?e.ownerDocument:document:document:document}const Jl=qx?X.exports.useLayoutEffect:X.exports.useEffect;function IE(e){const t=X.exports.useRef(e);return Jl(()=>{t.current=e}),X.exports.useCallback(function(){for(var r=arguments.length,i=new Array(r),o=0;o{e.current=setInterval(i,o)},[]),r=X.exports.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,r]}function iy(e,t){t===void 0&&(t=[e]);const r=X.exports.useRef(e);return Jl(()=>{r.current!==e&&(r.current=e)},t),r}function jy(e,t){const r=X.exports.useRef();return X.exports.useMemo(()=>{const i=e(r.current);return r.current=i,i},[...t])}function Lb(e){const t=IE(e),r=X.exports.useRef(null),i=X.exports.useCallback(o=>{o!==r.current&&t?.(o,r.current),r.current=o},[]);return[r,i]}function N4(e){const t=X.exports.useRef();return X.exports.useEffect(()=>{t.current=e},[e]),t.current}let X5={};function $y(e,t){return X.exports.useMemo(()=>{if(t)return t;const r=X5[e]==null?0:X5[e]+1;return X5[e]=r,e+"-"+r},[e,t])}function n$(e){return function(t){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o{const l=Object.entries(s);for(const[u,c]of l){const d=a[u];d!=null&&(a[u]=d+e*c)}return a},{...t})}}const _h=n$(1),oy=n$(-1);function a_e(e){return"clientX"in e&&"clientY"in e}function RE(e){if(!e)return!1;const{KeyboardEvent:t}=Ds(e.target);return t&&e instanceof t}function s_e(e){if(!e)return!1;const{TouchEvent:t}=Ds(e.target);return t&&e instanceof t}function j4(e){if(s_e(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:r}=e.touches[0];return{x:t,y:r}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:r}=e.changedTouches[0];return{x:t,y:r}}}return a_e(e)?{x:e.clientX,y:e.clientY}:null}const ay=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:r}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(r?Math.round(r):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:r}=e;return"scaleX("+t+") scaleY("+r+")"}},Transform:{toString(e){if(!!e)return[ay.Translate.toString(e),ay.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:r,easing:i}=e;return t+" "+r+"ms "+i}}}),pO="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function l_e(e){return e.matches(pO)?e:e.querySelector(pO)}function u_e(e,t,r){const i={...e};return t.top+e.y<=r.top?i.y=r.top-t.top:t.bottom+e.y>=r.top+r.height&&(i.y=r.top+r.height-t.bottom),t.left+e.x<=r.left?i.x=r.left-t.left:t.right+e.x>=r.left+r.width&&(i.x=r.left+r.width-t.right),i}const c_e=e=>{let{containerNodeRect:t,draggingNodeRect:r,transform:i}=e;return!r||!t?i:u_e(i,r,t)},d_e=e=>{let{transform:t}=e;return{...t,x:0}},f_e={display:"none"};function p_e(e){let{id:t,value:r}=e;return L("div",{id:t,style:f_e,children:r})}const h_e={position:"fixed",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};function g_e(e){let{id:t,announcement:r}=e;return L("div",{id:t,style:h_e,role:"status","aria-live":"assertive","aria-atomic":!0,children:r})}function m_e(){const[e,t]=X.exports.useState("");return{announce:X.exports.useCallback(i=>{i!=null&&t(i)},[]),announcement:e}}const i$=X.exports.createContext(null);function y_e(e){const t=X.exports.useContext(i$);X.exports.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of ");return t(e)},[e,t])}function v_e(){const[e]=X.exports.useState(()=>new Set),t=X.exports.useCallback(i=>(e.add(i),()=>e.delete(i)),[e]);return[X.exports.useCallback(i=>{let{type:o,event:a}=i;e.forEach(s=>{var l;return(l=s[o])==null?void 0:l.call(s,a)})},[e]),t]}const b_e={draggable:` To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel. - `},w_e={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:r}=e;return r?"Draggable item "+t.id+" was moved over droppable area "+r.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:r}=e;return r?"Draggable item "+t.id+" was dropped over droppable area "+r.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function x_e(e){let{announcements:t=w_e,container:r,hiddenTextDescribedById:i,screenReaderInstructions:o=b_e}=e;const{announce:a,announcement:s}=m_e(),l=$y("DndLiveRegion"),[u,c]=X.exports.useState(!1);if(X.exports.useEffect(()=>{c(!0)},[]),y_e(X.exports.useMemo(()=>({onDragStart(p){let{active:v}=p;a(t.onDragStart({active:v}))},onDragMove(p){let{active:v,over:x}=p;t.onDragMove&&a(t.onDragMove({active:v,over:x}))},onDragOver(p){let{active:v,over:x}=p;a(t.onDragOver({active:v,over:x}))},onDragEnd(p){let{active:v,over:x}=p;a(t.onDragEnd({active:v,over:x}))},onDragCancel(p){let{active:v,over:x}=p;a(t.onDragCancel({active:v,over:x}))}}),[a,t])),!u)return null;const d=Ut(ta,{children:[L(p_e,{id:i,value:o.draggable}),L(g_e,{id:l,announcement:s})]});return r?ml.exports.createPortal(d,r):d}var xa;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(xa||(xa={}));function Nb(){}function J5(e,t){return X.exports.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function __e(){for(var e=arguments.length,t=new Array(e),r=0;r[...t].filter(i=>i!=null),[...t])}const eu=Object.freeze({x:0,y:0});function o$(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function a$(e,t){let{data:{value:r}}=e,{data:{value:i}}=t;return r-i}function S_e(e,t){let{data:{value:r}}=e,{data:{value:i}}=t;return i-r}function hO(e){let{left:t,top:r,height:i,width:o}=e;return[{x:t,y:r},{x:t+o,y:r},{x:t,y:r+i},{x:t+o,y:r+i}]}function s$(e,t){if(!e||e.length===0)return null;const[r]=e;return t?r[t]:r}function gO(e,t,r){return t===void 0&&(t=e.left),r===void 0&&(r=e.top),{x:t+e.width*.5,y:r+e.height*.5}}const C_e=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:i}=e;const o=gO(t,t.left,t.top),a=[];for(const s of i){const{id:l}=s,u=r.get(l);if(u){const c=o$(gO(u),o);a.push({id:l,data:{droppableContainer:s,value:c}})}}return a.sort(a$)},k_e=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:i}=e;const o=hO(t),a=[];for(const s of i){const{id:l}=s,u=r.get(l);if(u){const c=hO(u),d=o.reduce((v,x,b)=>v+o$(c[b],x),0),p=Number((d/4).toFixed(4));a.push({id:l,data:{droppableContainer:s,value:p}})}}return a.sort(a$)};function E_e(e,t){const r=Math.max(t.top,e.top),i=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),a=Math.min(t.top+t.height,e.top+e.height),s=o-i,l=a-r;if(i{let{collisionRect:t,droppableRects:r,droppableContainers:i}=e;const o=[];for(const a of i){const{id:s}=a,l=r.get(s);if(l){const u=E_e(l,t);u>0&&o.push({id:s,data:{droppableContainer:a,value:u}})}}return o.sort(S_e)};function T_e(e,t,r){return{...e,scaleX:t&&r?t.width/r.width:1,scaleY:t&&r?t.height/r.height:1}}function l$(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:eu}function I_e(e){return function(r){for(var i=arguments.length,o=new Array(i>1?i-1:0),a=1;a({...s,top:s.top+e*l.y,bottom:s.bottom+e*l.y,left:s.left+e*l.x,right:s.right+e*l.x}),{...r})}}const R_e=I_e(1);function P_e(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function M_e(e,t,r){const i=P_e(t);if(!i)return e;const{scaleX:o,scaleY:a,x:s,y:l}=i,u=e.left-s-(1-o)*parseFloat(r),c=e.top-l-(1-a)*parseFloat(r.slice(r.indexOf(" ")+1)),d=o?e.width/o:e.width,p=a?e.height/a:e.height;return{width:d,height:p,top:c,right:u+d,bottom:c+p,left:u}}const O_e={ignoreTransform:!1};function Mg(e,t){t===void 0&&(t=O_e);let r=e.getBoundingClientRect();if(t.ignoreTransform){const{getComputedStyle:c}=Ds(e),{transform:d,transformOrigin:p}=c(e);d&&(r=M_e(r,d,p))}const{top:i,left:o,width:a,height:s,bottom:l,right:u}=r;return{top:i,left:o,width:a,height:s,bottom:l,right:u}}function mO(e){return Mg(e,{ignoreTransform:!0})}function B_e(e){const t=e.innerWidth,r=e.innerHeight;return{top:0,left:0,right:t,bottom:r,width:t,height:r}}function U_e(e,t){return t===void 0&&(t=Ds(e).getComputedStyle(e)),t.position==="fixed"}function D_e(e,t){t===void 0&&(t=Ds(e).getComputedStyle(e));const r=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(o=>{const a=t[o];return typeof a=="string"?r.test(a):!1})}function Kx(e,t){const r=[];function i(o){if(t!=null&&r.length>=t||!o)return r;if(TE(o)&&o.scrollingElement!=null&&!r.includes(o.scrollingElement))return r.push(o.scrollingElement),r;if(!Ny(o)||i_e(o)||r.includes(o))return r;const{getComputedStyle:a}=Ds(o),s=a(o);return o!==e&&D_e(o,s)&&r.push(o),U_e(o,s)?r:i(o.parentNode)}return e?i(e):r}function u$(e){const[t]=Kx(e,1);return t??null}function e3(e){return!qx||!e?null:Rg(e)?e:AE(e)?TE(e)||e===Pg(e).scrollingElement?window:Ny(e)?e:null:null}function c$(e){return Rg(e)?e.scrollX:e.scrollLeft}function d$(e){return Rg(e)?e.scrollY:e.scrollTop}function $4(e){return{x:c$(e),y:d$(e)}}var Ma;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(Ma||(Ma={}));function f$(e){return!qx||!e?!1:e===document.scrollingElement}function p$(e){const t={x:0,y:0},r=f$(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},i={x:e.scrollWidth-r.width,y:e.scrollHeight-r.height},o=e.scrollTop<=t.y,a=e.scrollLeft<=t.x,s=e.scrollTop>=i.y,l=e.scrollLeft>=i.x;return{isTop:o,isLeft:a,isBottom:s,isRight:l,maxScroll:i,minScroll:t}}const L_e={x:.2,y:.2};function N_e(e,t,r,i,o){let{top:a,left:s,right:l,bottom:u}=r;i===void 0&&(i=10),o===void 0&&(o=L_e);const{isTop:c,isBottom:d,isLeft:p,isRight:v}=p$(e),x={x:0,y:0},b={x:0,y:0},y={height:t.height*o.y,width:t.width*o.x};return!c&&a<=t.top+y.height?(x.y=Ma.Backward,b.y=i*Math.abs((t.top+y.height-a)/y.height)):!d&&u>=t.bottom-y.height&&(x.y=Ma.Forward,b.y=i*Math.abs((t.bottom-y.height-u)/y.height)),!v&&l>=t.right-y.width?(x.x=Ma.Forward,b.x=i*Math.abs((t.right-y.width-l)/y.width)):!p&&s<=t.left+y.width&&(x.x=Ma.Backward,b.x=i*Math.abs((t.left+y.width-s)/y.width)),{direction:x,speed:b}}function j_e(e){if(e===document.scrollingElement){const{innerWidth:a,innerHeight:s}=window;return{top:0,left:0,right:a,bottom:s,width:a,height:s}}const{top:t,left:r,right:i,bottom:o}=e.getBoundingClientRect();return{top:t,left:r,right:i,bottom:o,width:e.clientWidth,height:e.clientHeight}}function h$(e){return e.reduce((t,r)=>_h(t,$4(r)),eu)}function $_e(e){return e.reduce((t,r)=>t+c$(r),0)}function F_e(e){return e.reduce((t,r)=>t+d$(r),0)}function z_e(e,t){if(t===void 0&&(t=Mg),!e)return;const{top:r,left:i,bottom:o,right:a}=t(e);!u$(e)||(o<=0||a<=0||r>=window.innerHeight||i>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const H_e=[["x",["left","right"],$_e],["y",["top","bottom"],F_e]];class PE{constructor(t,r){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const i=Kx(r),o=h$(i);this.rect={...t},this.width=t.width,this.height=t.height;for(const[a,s,l]of H_e)for(const u of s)Object.defineProperty(this,u,{get:()=>{const c=l(i),d=o[a]-c;return this.rect[u]+d},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class l0{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(r=>{var i;return(i=this.target)==null?void 0:i.removeEventListener(...r)})},this.target=t}add(t,r,i){var o;(o=this.target)==null||o.addEventListener(t,r,i),this.listeners.push([t,r,i])}}function W_e(e){const{EventTarget:t}=Ds(e);return e instanceof t?e:Pg(e)}function t3(e,t){const r=Math.abs(e.x),i=Math.abs(e.y);return typeof t=="number"?Math.sqrt(r**2+i**2)>t:"x"in t&&"y"in t?r>t.x&&i>t.y:"x"in t?r>t.x:"y"in t?i>t.y:!1}var pl;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(pl||(pl={}));function yO(e){e.preventDefault()}function V_e(e){e.stopPropagation()}var zi;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter"})(zi||(zi={}));const g$={start:[zi.Space,zi.Enter],cancel:[zi.Esc],end:[zi.Space,zi.Enter]},q_e=(e,t)=>{let{currentCoordinates:r}=t;switch(e.code){case zi.Right:return{...r,x:r.x+25};case zi.Left:return{...r,x:r.x-25};case zi.Down:return{...r,y:r.y+25};case zi.Up:return{...r,y:r.y-25}}};class ME{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:r}}=t;this.props=t,this.listeners=new l0(Pg(r)),this.windowListeners=new l0(Ds(r)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(pl.Resize,this.handleCancel),this.windowListeners.add(pl.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(pl.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:r}=this.props,i=t.node.current;i&&z_e(i),r(eu)}handleKeyDown(t){if(RE(t)){const{active:r,context:i,options:o}=this.props,{keyboardCodes:a=g$,coordinateGetter:s=q_e,scrollBehavior:l="smooth"}=o,{code:u}=t;if(a.end.includes(u)){this.handleEnd(t);return}if(a.cancel.includes(u)){this.handleCancel(t);return}const{collisionRect:c}=i.current,d=c?{x:c.left,y:c.top}:eu;this.referenceCoordinates||(this.referenceCoordinates=d);const p=s(t,{active:r,context:i.current,currentCoordinates:d});if(p){const v=oy(p,d),x={x:0,y:0},{scrollableAncestors:b}=i.current;for(const y of b){const _=t.code,{isTop:k,isRight:E,isLeft:B,isBottom:U,maxScroll:D,minScroll:j}=p$(y),F=j_e(y),H={x:Math.min(_===zi.Right?F.right-F.width/2:F.right,Math.max(_===zi.Right?F.left:F.left+F.width/2,p.x)),y:Math.min(_===zi.Down?F.bottom-F.height/2:F.bottom,Math.max(_===zi.Down?F.top:F.top+F.height/2,p.y))},W=_===zi.Right&&!E||_===zi.Left&&!B,G=_===zi.Down&&!U||_===zi.Up&&!k;if(W&&H.x!==p.x){const ae=y.scrollLeft+v.x,V=_===zi.Right&&ae<=D.x||_===zi.Left&&ae>=j.x;if(V&&!v.y){y.scrollTo({left:ae,behavior:l});return}V?x.x=y.scrollLeft-ae:x.x=_===zi.Right?y.scrollLeft-D.x:y.scrollLeft-j.x,x.x&&y.scrollBy({left:-x.x,behavior:l});break}else if(G&&H.y!==p.y){const ae=y.scrollTop+v.y,V=_===zi.Down&&ae<=D.y||_===zi.Up&&ae>=j.y;if(V&&!v.x){y.scrollTo({top:ae,behavior:l});return}V?x.y=y.scrollTop-ae:x.y=_===zi.Down?y.scrollTop-D.y:y.scrollTop-j.y,x.y&&y.scrollBy({top:-x.y,behavior:l});break}}this.handleMove(t,_h(oy(p,this.referenceCoordinates),x))}}}handleMove(t,r){const{onMove:i}=this.props;t.preventDefault(),i(r)}handleEnd(t){const{onEnd:r}=this.props;t.preventDefault(),this.detach(),r()}handleCancel(t){const{onCancel:r}=this.props;t.preventDefault(),this.detach(),r()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}ME.activators=[{eventName:"onKeyDown",handler:(e,t,r)=>{let{keyboardCodes:i=g$,onActivation:o}=t,{active:a}=r;const{code:s}=e.nativeEvent;if(i.start.includes(s)){const l=a.activatorNode.current;return l&&e.target!==l?!1:(e.preventDefault(),o?.({event:e.nativeEvent}),!0)}return!1}}];function vO(e){return Boolean(e&&"distance"in e)}function bO(e){return Boolean(e&&"delay"in e)}class OE{constructor(t,r,i){var o;i===void 0&&(i=W_e(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=r;const{event:a}=t,{target:s}=a;this.props=t,this.events=r,this.document=Pg(s),this.documentListeners=new l0(this.document),this.listeners=new l0(i),this.windowListeners=new l0(Ds(s)),this.initialCoordinates=(o=j4(a))!=null?o:eu,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:r}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),this.windowListeners.add(pl.Resize,this.handleCancel),this.windowListeners.add(pl.DragStart,yO),this.windowListeners.add(pl.VisibilityChange,this.handleCancel),this.windowListeners.add(pl.ContextMenu,yO),this.documentListeners.add(pl.Keydown,this.handleKeydown),r){if(vO(r))return;if(bO(r)){this.timeoutId=setTimeout(this.handleStart,r.delay);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handleStart(){const{initialCoordinates:t}=this,{onStart:r}=this.props;t&&(this.activated=!0,this.documentListeners.add(pl.Click,V_e,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(pl.SelectionChange,this.removeTextSelection),r(t))}handleMove(t){var r;const{activated:i,initialCoordinates:o,props:a}=this,{onMove:s,options:{activationConstraint:l}}=a;if(!o)return;const u=(r=j4(t))!=null?r:eu,c=oy(o,u);if(!i&&l){if(bO(l))return t3(c,l.tolerance)?this.handleCancel():void 0;if(vO(l))return l.tolerance!=null&&t3(c,l.tolerance)?this.handleCancel():t3(c,l.distance)?this.handleStart():void 0}t.cancelable&&t.preventDefault(),s(u)}handleEnd(){const{onEnd:t}=this.props;this.detach(),t()}handleCancel(){const{onCancel:t}=this.props;this.detach(),t()}handleKeydown(t){t.code===zi.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const K_e={move:{name:"pointermove"},end:{name:"pointerup"}};class m$ extends OE{constructor(t){const{event:r}=t,i=Pg(r.target);super(t,K_e,i)}}m$.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:i}=t;return!r.isPrimary||r.button!==0?!1:(i?.({event:r}),!0)}}];const G_e={move:{name:"mousemove"},end:{name:"mouseup"}};var F4;(function(e){e[e.RightClick=2]="RightClick"})(F4||(F4={}));class y$ extends OE{constructor(t){super(t,G_e,Pg(t.event.target))}}y$.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:i}=t;return r.button===F4.RightClick?!1:(i?.({event:r}),!0)}}];const r3={move:{name:"touchmove"},end:{name:"touchend"}};class v$ extends OE{constructor(t){super(t,r3)}static setup(){return window.addEventListener(r3.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(r3.move.name,t)};function t(){}}}v$.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:i}=t;const{touches:o}=r;return o.length>1?!1:(i?.({event:r}),!0)}}];var u0;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(u0||(u0={}));var jb;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(jb||(jb={}));function Y_e(e){let{acceleration:t,activator:r=u0.Pointer,canScroll:i,draggingRect:o,enabled:a,interval:s=5,order:l=jb.TreeOrder,pointerCoordinates:u,scrollableAncestors:c,scrollableAncestorRects:d,delta:p,threshold:v}=e;const x=Z_e({delta:p,disabled:!a}),[b,y]=o_e(),_=X.exports.useRef({x:0,y:0}),k=X.exports.useRef({x:0,y:0}),E=X.exports.useMemo(()=>{switch(r){case u0.Pointer:return u?{top:u.y,bottom:u.y,left:u.x,right:u.x}:null;case u0.DraggableRect:return o}},[r,o,u]),B=X.exports.useRef(null),U=X.exports.useCallback(()=>{const j=B.current;if(!j)return;const F=_.current.x*k.current.x,H=_.current.y*k.current.y;j.scrollBy(F,H)},[]),D=X.exports.useMemo(()=>l===jb.TreeOrder?[...c].reverse():c,[l,c]);X.exports.useEffect(()=>{if(!a||!c.length||!E){y();return}for(const j of D){if(i?.(j)===!1)continue;const F=c.indexOf(j),H=d[F];if(!H)continue;const{direction:W,speed:G}=N_e(j,H,E,t,v);for(const ae of["x","y"])x[ae][W[ae]]||(G[ae]=0,W[ae]=0);if(G.x>0||G.y>0){y(),B.current=j,b(U,s),_.current=G,k.current=W;return}}_.current={x:0,y:0},k.current={x:0,y:0},y()},[t,U,i,y,a,s,JSON.stringify(E),JSON.stringify(x),b,c,D,d,JSON.stringify(v)])}const Q_e={x:{[Ma.Backward]:!1,[Ma.Forward]:!1},y:{[Ma.Backward]:!1,[Ma.Forward]:!1}};function Z_e(e){let{delta:t,disabled:r}=e;const i=N4(t);return jy(o=>{if(r||!i||!o)return Q_e;const a={x:Math.sign(t.x-i.x),y:Math.sign(t.y-i.y)};return{x:{[Ma.Backward]:o.x[Ma.Backward]||a.x===-1,[Ma.Forward]:o.x[Ma.Forward]||a.x===1},y:{[Ma.Backward]:o.y[Ma.Backward]||a.y===-1,[Ma.Forward]:o.y[Ma.Forward]||a.y===1}}},[r,t,i])}function X_e(e,t){const r=t!==null?e.get(t):void 0,i=r?r.node.current:null;return jy(o=>{var a;return t===null?null:(a=i??o)!=null?a:null},[i,t])}function J_e(e,t){return X.exports.useMemo(()=>e.reduce((r,i)=>{const{sensor:o}=i,a=o.activators.map(s=>({eventName:s.eventName,handler:t(s.handler,i)}));return[...r,...a]},[]),[e,t])}var sy;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(sy||(sy={}));var z4;(function(e){e.Optimized="optimized"})(z4||(z4={}));const wO=new Map;function e5e(e,t){let{dragging:r,dependencies:i,config:o}=t;const[a,s]=X.exports.useState(null),{frequency:l,measure:u,strategy:c}=o,d=X.exports.useRef(e),p=_(),v=iy(p),x=X.exports.useCallback(function(k){k===void 0&&(k=[]),!v.current&&s(E=>E===null?k:E.concat(k.filter(B=>!E.includes(B))))},[v]),b=X.exports.useRef(null),y=jy(k=>{if(p&&!r)return wO;if(!k||k===wO||d.current!==e||a!=null){const E=new Map;for(let B of e){if(!B)continue;if(a&&a.length>0&&!a.includes(B.id)&&B.rect.current){E.set(B.id,B.rect.current);continue}const U=B.node.current,D=U?new PE(u(U),U):null;B.rect.current=D,D&&E.set(B.id,D)}return E}return k},[e,a,r,p,u]);return X.exports.useEffect(()=>{d.current=e},[e]),X.exports.useEffect(()=>{p||x()},[r,p]),X.exports.useEffect(()=>{a&&a.length>0&&s(null)},[JSON.stringify(a)]),X.exports.useEffect(()=>{p||typeof l!="number"||b.current!==null||(b.current=setTimeout(()=>{x(),b.current=null},l))},[l,p,x,...i]),{droppableRects:y,measureDroppableContainers:x,measuringScheduled:a!=null};function _(){switch(c){case sy.Always:return!1;case sy.BeforeDragging:return r;default:return!r}}}function b$(e,t){return jy(r=>e?r||(typeof t=="function"?t(e):e):null,[t,e])}function t5e(e,t){return b$(e,t)}function r5e(e){let{callback:t,disabled:r}=e;const i=IE(t),o=X.exports.useMemo(()=>{if(r||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:a}=window;return new a(i)},[i,r]);return X.exports.useEffect(()=>()=>o?.disconnect(),[o]),o}function Gx(e){let{callback:t,disabled:r}=e;const i=IE(t),o=X.exports.useMemo(()=>{if(r||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:a}=window;return new a(i)},[r]);return X.exports.useEffect(()=>()=>o?.disconnect(),[o]),o}function n5e(e){return new PE(Mg(e),e)}function xO(e,t,r){t===void 0&&(t=n5e);const[i,o]=X.exports.useReducer(l,null),a=r5e({callback(u){if(!!e)for(const c of u){const{type:d,target:p}=c;if(d==="childList"&&p instanceof HTMLElement&&p.contains(e)){o();break}}}}),s=Gx({callback:o});return Jl(()=>{o(),e?(s?.observe(e),a?.observe(document.body,{childList:!0,subtree:!0})):(s?.disconnect(),a?.disconnect())},[e]),i;function l(u){if(!e)return null;if(e.isConnected===!1){var c;return(c=u??r)!=null?c:null}const d=t(e);return JSON.stringify(u)===JSON.stringify(d)?u:d}}function i5e(e){const t=b$(e);return l$(e,t)}const _O=[];function o5e(e){const t=X.exports.useRef(e),r=jy(i=>e?i&&i!==_O&&e&&t.current&&e.parentNode===t.current.parentNode?i:Kx(e):_O,[e]);return X.exports.useEffect(()=>{t.current=e},[e]),r}function a5e(e){const[t,r]=X.exports.useState(null),i=X.exports.useRef(e),o=X.exports.useCallback(a=>{const s=e3(a.target);!s||r(l=>l?(l.set(s,$4(s)),new Map(l)):null)},[]);return X.exports.useEffect(()=>{const a=i.current;if(e!==a){s(a);const l=e.map(u=>{const c=e3(u);return c?(c.addEventListener("scroll",o,{passive:!0}),[c,$4(c)]):null}).filter(u=>u!=null);r(l.length?new Map(l):null),i.current=e}return()=>{s(e),s(a)};function s(l){l.forEach(u=>{const c=e3(u);c?.removeEventListener("scroll",o)})}},[o,e]),X.exports.useMemo(()=>e.length?t?Array.from(t.values()).reduce((a,s)=>_h(a,s),eu):h$(e):eu,[e,t])}function SO(e,t){t===void 0&&(t=[]);const r=X.exports.useRef(null);return X.exports.useEffect(()=>{r.current=null},t),X.exports.useEffect(()=>{const i=e!==eu;i&&!r.current&&(r.current=e),!i&&r.current&&(r.current=null)},[e]),r.current?oy(e,r.current):eu}function s5e(e){X.exports.useEffect(()=>{if(!qx)return;const t=e.map(r=>{let{sensor:i}=r;return i.setup==null?void 0:i.setup()});return()=>{for(const r of t)r?.()}},e.map(t=>{let{sensor:r}=t;return r}))}function l5e(e,t){return X.exports.useMemo(()=>e.reduce((r,i)=>{let{eventName:o,handler:a}=i;return r[o]=s=>{a(s,t)},r},{}),[e,t])}function w$(e){return X.exports.useMemo(()=>e?B_e(e):null,[e])}const n3=[];function u5e(e,t){t===void 0&&(t=Mg);const[r]=e,i=w$(r?Ds(r):null),[o,a]=X.exports.useReducer(l,n3),s=Gx({callback:a});return e.length>0&&o===n3&&a(),Jl(()=>{e.length?e.forEach(u=>s?.observe(u)):(s?.disconnect(),a())},[e]),o;function l(){return e.length?e.map(u=>f$(u)?i:new PE(t(u),u)):n3}}function c5e(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return Ny(t)?t:e}function d5e(e){let{measure:t}=e;const[r,i]=X.exports.useState(null),o=X.exports.useCallback(c=>{for(const{target:d}of c)if(Ny(d)){i(p=>{const v=t(d);return p?{...p,width:v.width,height:v.height}:v});break}},[t]),a=Gx({callback:o}),s=X.exports.useCallback(c=>{const d=c5e(c);a?.disconnect(),d&&a?.observe(d),i(d?t(d):null)},[t,a]),[l,u]=Lb(s);return X.exports.useMemo(()=>({nodeRef:l,rect:r,setRef:u}),[r,l,u])}const f5e=[{sensor:m$,options:{}},{sensor:ME,options:{}}],p5e={current:{}},y1={draggable:{measure:mO},droppable:{measure:mO,strategy:sy.WhileDragging,frequency:z4.Optimized},dragOverlay:{measure:Mg}};class c0 extends Map{get(t){var r;return t!=null&&(r=super.get(t))!=null?r:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:r}=t;return!r})}getNodeFor(t){var r,i;return(r=(i=this.get(t))==null?void 0:i.node.current)!=null?r:void 0}}const h5e={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new c0,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Nb},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:y1,measureDroppableContainers:Nb,windowRect:null,measuringScheduled:!1},g5e={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Nb,draggableNodes:new Map,over:null,measureDroppableContainers:Nb},Yx=X.exports.createContext(g5e),x$=X.exports.createContext(h5e);function m5e(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new c0}}}function y5e(e,t){switch(t.type){case xa.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case xa.DragMove:return e.draggable.active?{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}}:e;case xa.DragEnd:case xa.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case xa.RegisterDroppable:{const{element:r}=t,{id:i}=r,o=new c0(e.droppable.containers);return o.set(i,r),{...e,droppable:{...e.droppable,containers:o}}}case xa.SetDroppableDisabled:{const{id:r,key:i,disabled:o}=t,a=e.droppable.containers.get(r);if(!a||i!==a.key)return e;const s=new c0(e.droppable.containers);return s.set(r,{...a,disabled:o}),{...e,droppable:{...e.droppable,containers:s}}}case xa.UnregisterDroppable:{const{id:r,key:i}=t,o=e.droppable.containers.get(r);if(!o||i!==o.key)return e;const a=new c0(e.droppable.containers);return a.delete(r),{...e,droppable:{...e.droppable,containers:a}}}default:return e}}function v5e(e){let{disabled:t}=e;const{active:r,activatorEvent:i,draggableNodes:o}=X.exports.useContext(Yx),a=N4(i),s=N4(r?.id);return X.exports.useEffect(()=>{if(!t&&!i&&a&&s!=null){if(!RE(a)||document.activeElement===a.target)return;const l=o.get(s);if(!l)return;const{activatorNode:u,node:c}=l;if(!u.current&&!c.current)return;requestAnimationFrame(()=>{for(const d of[u.current,c.current]){if(!d)continue;const p=l_e(d);if(p){p.focus();break}}})}},[i,t,o,s,a]),null}function b5e(e,t){let{transform:r,...i}=t;return e!=null&&e.length?e.reduce((o,a)=>a({transform:o,...i}),r):r}function w5e(e){return X.exports.useMemo(()=>({draggable:{...y1.draggable,...e?.draggable},droppable:{...y1.droppable,...e?.droppable},dragOverlay:{...y1.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function x5e(e){let{activeNode:t,measure:r,initialRect:i,config:o=!0}=e;const a=X.exports.useRef(!1),{x:s,y:l}=typeof o=="boolean"?{x:o,y:o}:o;Jl(()=>{if(!s&&!l||!t){a.current=!1;return}if(a.current||!i)return;const c=t?.node.current;if(!c||c.isConnected===!1)return;const d=r(c),p=l$(d,i);if(s||(p.x=0),l||(p.y=0),a.current=!0,Math.abs(p.x)>0||Math.abs(p.y)>0){const v=u$(c);v&&v.scrollBy({top:p.y,left:p.x})}},[t,s,l,i,r])}const _$=X.exports.createContext({...eu,scaleX:1,scaleY:1});var Kc;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(Kc||(Kc={}));const _5e=X.exports.memo(function(t){var r,i,o,a;let{id:s,accessibility:l,autoScroll:u=!0,children:c,sensors:d=f5e,collisionDetection:p=A_e,measuring:v,modifiers:x,...b}=t;const y=X.exports.useReducer(y5e,void 0,m5e),[_,k]=y,[E,B]=v_e(),[U,D]=X.exports.useState(Kc.Uninitialized),j=U===Kc.Initialized,{draggable:{active:F,nodes:H,translate:W},droppable:{containers:G}}=_,ae=F?H.get(F):null,V=X.exports.useRef({initial:null,translated:null}),oe=X.exports.useMemo(()=>{var Tn;return F!=null?{id:F,data:(Tn=ae?.data)!=null?Tn:p5e,rect:V}:null},[F,ae]),P=X.exports.useRef(null),[ee,le]=X.exports.useState(null),[pe,_e]=X.exports.useState(null),J=iy(b,Object.values(b)),ft=$y("DndDescribedBy",s),Le=X.exports.useMemo(()=>G.getEnabled(),[G]),He=w5e(v),{droppableRects:nr,measureDroppableContainers:Bt,measuringScheduled:Rt}=e5e(Le,{dragging:j,dependencies:[W.x,W.y],config:He.droppable}),Jt=X_e(H,F),vr=X.exports.useMemo(()=>pe?j4(pe):null,[pe]),At=Kn(),kt=t5e(Jt,He.draggable.measure);x5e({activeNode:F?H.get(F):null,config:At.layoutShiftCompensation,initialRect:kt,measure:He.draggable.measure});const Ct=xO(Jt,He.draggable.measure,kt),Lt=xO(Jt?Jt.parentElement:null),Kt=X.exports.useRef({activatorEvent:null,active:null,activeNode:Jt,collisionRect:null,collisions:null,droppableRects:nr,draggableNodes:H,draggingNode:null,draggingNodeRect:null,droppableContainers:G,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),yr=G.getNodeFor((r=Kt.current.over)==null?void 0:r.id),ne=d5e({measure:He.dragOverlay.measure}),Mt=(i=ne.nodeRef.current)!=null?i:Jt,Nt=j?(o=ne.rect)!=null?o:Ct:null,Ie=Boolean(ne.nodeRef.current&&ne.rect),Ae=i5e(Ie?null:Ct),fe=w$(Mt?Ds(Mt):null),Be=o5e(j?yr??Jt:null),rt=u5e(Be),lt=b5e(x,{transform:{x:W.x-Ae.x,y:W.y-Ae.y,scaleX:1,scaleY:1},activatorEvent:pe,active:oe,activeNodeRect:Ct,containerNodeRect:Lt,draggingNodeRect:Nt,over:Kt.current.over,overlayNodeRect:ne.rect,scrollableAncestors:Be,scrollableAncestorRects:rt,windowRect:fe}),jt=vr?_h(vr,W):null,ce=a5e(Be),ie=SO(ce),de=SO(ce,[Ct]),$=_h(lt,ie),C=Nt?R_e(Nt,lt):null,T=oe&&C?p({active:oe,collisionRect:C,droppableRects:nr,droppableContainers:Le,pointerCoordinates:jt}):null,Q=s$(T,"id"),[ve,je]=X.exports.useState(null),ct=Ie?lt:_h(lt,de),ur=T_e(ct,(a=ve?.rect)!=null?a:null,Ct),Dr=X.exports.useCallback((Tn,In)=>{let{sensor:yt,options:Ei}=In;if(P.current==null)return;const Yn=H.get(P.current);if(!Yn)return;const Pi=Tn.nativeEvent,Ji=new yt({active:P.current,activeNode:Yn,event:Pi,options:Ei,context:Kt,onStart(eo){const Mo=P.current;if(Mo==null)return;const Wi=H.get(Mo);if(!Wi)return;const{onDragStart:pa}=J.current,ue={active:{id:Mo,data:Wi.data,rect:V}};ml.exports.unstable_batchedUpdates(()=>{pa?.(ue),D(Kc.Initializing),k({type:xa.DragStart,initialCoordinates:eo,active:Mo}),E({type:"onDragStart",event:ue})})},onMove(eo){k({type:xa.DragMove,coordinates:eo})},onEnd:qo(xa.DragEnd),onCancel:qo(xa.DragCancel)});ml.exports.unstable_batchedUpdates(()=>{le(Ji),_e(Tn.nativeEvent)});function qo(eo){return async function(){const{active:Wi,collisions:pa,over:ue,scrollAdjustedTranslate:Re}=Kt.current;let Ee=null;if(Wi&&Re){const{cancelDrop:q}=J.current;Ee={activatorEvent:Pi,active:Wi,collisions:pa,delta:Re,over:ue},eo===xa.DragEnd&&typeof q=="function"&&await Promise.resolve(q(Ee))&&(eo=xa.DragCancel)}P.current=null,ml.exports.unstable_batchedUpdates(()=>{k({type:eo}),D(Kc.Uninitialized),je(null),le(null),_e(null);const q=eo===xa.DragEnd?"onDragEnd":"onDragCancel";if(Ee){const Fe=J.current[q];Fe?.(Ee),E({type:q,event:Ee})}})}}},[H]),hr=X.exports.useCallback((Tn,In)=>(yt,Ei)=>{const Yn=yt.nativeEvent,Pi=H.get(Ei);if(P.current!==null||!Pi||Yn.dndKit||Yn.defaultPrevented)return;const Ji={active:Pi};Tn(yt,In.options,Ji)===!0&&(Yn.dndKit={capturedBy:In.sensor},P.current=Ei,Dr(yt,In))},[H,Dr]),Rr=J_e(d,hr);s5e(d),Jl(()=>{Ct&&U===Kc.Initializing&&D(Kc.Initialized)},[Ct,U]),X.exports.useEffect(()=>{const{onDragMove:Tn}=J.current,{active:In,activatorEvent:yt,collisions:Ei,over:Yn}=Kt.current;if(!In||!yt)return;const Pi={active:In,activatorEvent:yt,collisions:Ei,delta:{x:$.x,y:$.y},over:Yn};ml.exports.unstable_batchedUpdates(()=>{Tn?.(Pi),E({type:"onDragMove",event:Pi})})},[$.x,$.y]),X.exports.useEffect(()=>{const{active:Tn,activatorEvent:In,collisions:yt,droppableContainers:Ei,scrollAdjustedTranslate:Yn}=Kt.current;if(!Tn||P.current==null||!In||!Yn)return;const{onDragOver:Pi}=J.current,Ji=Ei.get(Q),qo=Ji&&Ji.rect.current?{id:Ji.id,rect:Ji.rect.current,data:Ji.data,disabled:Ji.disabled}:null,eo={active:Tn,activatorEvent:In,collisions:yt,delta:{x:Yn.x,y:Yn.y},over:qo};ml.exports.unstable_batchedUpdates(()=>{je(qo),Pi?.(eo),E({type:"onDragOver",event:eo})})},[Q]),Jl(()=>{Kt.current={activatorEvent:pe,active:oe,activeNode:Jt,collisionRect:C,collisions:T,droppableRects:nr,draggableNodes:H,draggingNode:Mt,draggingNodeRect:Nt,droppableContainers:G,over:ve,scrollableAncestors:Be,scrollAdjustedTranslate:$},V.current={initial:Nt,translated:C}},[oe,Jt,T,C,H,Mt,Nt,nr,G,ve,Be,$]),Y_e({...At,delta:W,draggingRect:C,pointerCoordinates:jt,scrollableAncestors:Be,scrollableAncestorRects:rt});const Gr=X.exports.useMemo(()=>({active:oe,activeNode:Jt,activeNodeRect:Ct,activatorEvent:pe,collisions:T,containerNodeRect:Lt,dragOverlay:ne,draggableNodes:H,droppableContainers:G,droppableRects:nr,over:ve,measureDroppableContainers:Bt,scrollableAncestors:Be,scrollableAncestorRects:rt,measuringConfiguration:He,measuringScheduled:Rt,windowRect:fe}),[oe,Jt,Ct,pe,T,Lt,ne,H,G,nr,ve,Bt,Be,rt,He,Rt,fe]),Nr=X.exports.useMemo(()=>({activatorEvent:pe,activators:Rr,active:oe,activeNodeRect:Ct,ariaDescribedById:{draggable:ft},dispatch:k,draggableNodes:H,over:ve,measureDroppableContainers:Bt}),[pe,Rr,oe,Ct,k,ft,H,ve,Bt]);return Ut(i$.Provider,{value:B,children:[Ut(Yx.Provider,{value:Nr,children:[L(x$.Provider,{value:Gr,children:L(_$.Provider,{value:ur,children:c})}),L(v5e,{disabled:l?.restoreFocus===!1})]}),L(x_e,{...l,hiddenTextDescribedById:ft})]});function Kn(){const Tn=ee?.autoScrollEnabled===!1,In=typeof u=="object"?u.enabled===!1:u===!1,yt=j&&!Tn&&!In;return typeof u=="object"?{...u,enabled:yt}:{enabled:yt}}}),S5e=X.exports.createContext(null),CO="button",C5e="Droppable";function k5e(e){let{id:t,data:r,disabled:i=!1,attributes:o}=e;const a=$y(C5e),{activators:s,activatorEvent:l,active:u,activeNodeRect:c,ariaDescribedById:d,draggableNodes:p,over:v}=X.exports.useContext(Yx),{role:x=CO,roleDescription:b="draggable",tabIndex:y=0}=o??{},_=u?.id===t,k=X.exports.useContext(_?_$:S5e),[E,B]=Lb(),[U,D]=Lb(),j=l5e(s,t),F=iy(r);Jl(()=>(p.set(t,{id:t,key:a,node:E,activatorNode:U,data:F}),()=>{const W=p.get(t);W&&W.key===a&&p.delete(t)}),[p,t]);const H=X.exports.useMemo(()=>({role:x,tabIndex:y,"aria-disabled":i,"aria-pressed":_&&x===CO?!0:void 0,"aria-roledescription":b,"aria-describedby":d.draggable}),[i,x,y,_,b,d.draggable]);return{active:u,activatorEvent:l,activeNodeRect:c,attributes:H,isDragging:_,listeners:i?void 0:j,node:E,over:v,setNodeRef:B,setActivatorNodeRef:D,transform:k}}function E5e(){return X.exports.useContext(x$)}const A5e="Droppable",T5e={timeout:25};function I5e(e){let{data:t,disabled:r=!1,id:i,resizeObserverConfig:o}=e;const a=$y(A5e),{active:s,dispatch:l,over:u,measureDroppableContainers:c}=X.exports.useContext(Yx),d=X.exports.useRef({disabled:r}),p=X.exports.useRef(!1),v=X.exports.useRef(null),x=X.exports.useRef(null),{disabled:b,updateMeasurementsFor:y,timeout:_}={...T5e,...o},k=iy(y??i),E=X.exports.useCallback(()=>{if(!p.current){p.current=!0;return}x.current!=null&&clearTimeout(x.current),x.current=setTimeout(()=>{c(Array.isArray(k.current)?k.current:[k.current]),x.current=null},_)},[_]),B=Gx({callback:E,disabled:b||!s}),U=X.exports.useCallback((H,W)=>{!B||(W&&(B.unobserve(W),p.current=!1),H&&B.observe(H))},[B]),[D,j]=Lb(U),F=iy(t);return X.exports.useEffect(()=>{!B||!D.current||(B.disconnect(),p.current=!1,B.observe(D.current))},[D,B]),Jl(()=>(l({type:xa.RegisterDroppable,element:{id:i,key:a,disabled:r,node:D,rect:v,data:F}}),()=>l({type:xa.UnregisterDroppable,key:a,id:i})),[i]),X.exports.useEffect(()=>{r!==d.current.disabled&&(l({type:xa.SetDroppableDisabled,id:i,key:a,disabled:r}),d.current.disabled=r)},[i,a,r,l]),{active:s,rect:v,isOver:u?.id===i,node:D,over:u,setNodeRef:j}}function S$(e,t,r){const i=e.slice();return i.splice(r<0?i.length+r:r,0,i.splice(t,1)[0]),i}function R5e(e,t){return e.reduce((r,i,o)=>{const a=t.get(i);return a&&(r[o]=a),r},Array(e.length))}function Hv(e){return e!==null&&e>=0}function P5e(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let r=0;r{let{rects:t,activeIndex:r,overIndex:i,index:o}=e;const a=S$(t,i,r),s=t[o],l=a[o];return!l||!s?null:{x:l.left-s.left,y:l.top-s.top,scaleX:l.width/s.width,scaleY:l.height/s.height}},Wv={scaleX:1,scaleY:1},O5e=e=>{var t;let{activeIndex:r,activeNodeRect:i,index:o,rects:a,overIndex:s}=e;const l=(t=a[r])!=null?t:i;if(!l)return null;if(o===r){const c=a[s];return c?{x:0,y:rr&&o<=s?{x:0,y:-l.height-u,...Wv}:o=s?{x:0,y:l.height+u,...Wv}:{x:0,y:0,...Wv}};function B5e(e,t,r){const i=e[t],o=e[t-1],a=e[t+1];return i?ri.map(j=>typeof j=="object"&&"id"in j?j.id:j),[i]),b=s!=null,y=s?x.indexOf(s.id):-1,_=c?x.indexOf(c.id):-1,k=X.exports.useRef(x),E=!P5e(x,k.current),B=_!==-1&&y===-1||E,U=M5e(a);Jl(()=>{E&&b&&d(x)},[E,x,b,d]),X.exports.useEffect(()=>{k.current=x},[x]);const D=X.exports.useMemo(()=>({activeIndex:y,containerId:p,disabled:U,disableTransforms:B,items:x,overIndex:_,useDragOverlay:v,sortedRects:R5e(x,u),strategy:o}),[y,p,U.draggable,U.droppable,B,x,_,u,v,o]);return L(E$.Provider,{value:D,children:t})}const D5e=e=>{let{id:t,items:r,activeIndex:i,overIndex:o}=e;return S$(r,i,o).indexOf(t)},L5e=e=>{let{containerId:t,isSorting:r,wasDragging:i,index:o,items:a,newIndex:s,previousItems:l,previousContainerId:u,transition:c}=e;return!c||!i||l!==a&&o===s?!1:r?!0:s!==o&&t===u},N5e={duration:200,easing:"ease"},A$="transform",j5e=ay.Transition.toString({property:A$,duration:0,easing:"linear"}),$5e={roleDescription:"sortable"};function F5e(e){let{disabled:t,index:r,node:i,rect:o}=e;const[a,s]=X.exports.useState(null),l=X.exports.useRef(r);return Jl(()=>{if(!t&&r!==l.current&&i.current){const u=o.current;if(u){const c=Mg(i.current,{ignoreTransform:!0}),d={x:u.left-c.left,y:u.top-c.top,scaleX:u.width/c.width,scaleY:u.height/c.height};(d.x||d.y)&&s(d)}}r!==l.current&&(l.current=r)},[t,r,i,o]),X.exports.useEffect(()=>{a&&s(null)},[a]),a}function T$(e){let{animateLayoutChanges:t=L5e,attributes:r,disabled:i,data:o,getNewIndex:a=D5e,id:s,strategy:l,resizeObserverConfig:u,transition:c=N5e}=e;const{items:d,containerId:p,activeIndex:v,disabled:x,disableTransforms:b,sortedRects:y,overIndex:_,useDragOverlay:k,strategy:E}=X.exports.useContext(E$),B=z5e(i,x),U=d.indexOf(s),D=X.exports.useMemo(()=>({sortable:{containerId:p,index:U,items:d},...o}),[p,o,U,d]),j=X.exports.useMemo(()=>d.slice(d.indexOf(s)),[d,s]),{rect:F,node:H,isOver:W,setNodeRef:G}=I5e({id:s,data:D,disabled:B.droppable,resizeObserverConfig:{updateMeasurementsFor:j,...u}}),{active:ae,activatorEvent:V,activeNodeRect:oe,attributes:P,setNodeRef:ee,listeners:le,isDragging:pe,over:_e,setActivatorNodeRef:J,transform:ft}=k5e({id:s,data:D,attributes:{...$5e,...r},disabled:B.draggable}),Le=n_e(G,ee),He=Boolean(ae),nr=He&&!b&&Hv(v)&&Hv(_),Bt=!k&&pe,Rt=Bt&&nr?ft:null,vr=nr?Rt??(l??E)({rects:y,activeNodeRect:oe,activeIndex:v,overIndex:_,index:U}):null,At=Hv(v)&&Hv(_)?a({id:s,items:d,activeIndex:v,overIndex:_}):U,kt=ae?.id,Ct=X.exports.useRef({activeId:kt,items:d,newIndex:At,containerId:p}),Lt=d!==Ct.current.items,Kt=t({active:ae,containerId:p,isDragging:pe,isSorting:He,id:s,index:U,items:d,newIndex:Ct.current.newIndex,previousItems:Ct.current.items,previousContainerId:Ct.current.containerId,transition:c,wasDragging:Ct.current.activeId!=null}),yr=F5e({disabled:!Kt,index:U,node:H,rect:F});return X.exports.useEffect(()=>{He&&Ct.current.newIndex!==At&&(Ct.current.newIndex=At),p!==Ct.current.containerId&&(Ct.current.containerId=p),d!==Ct.current.items&&(Ct.current.items=d)},[He,At,p,d]),X.exports.useEffect(()=>{if(kt===Ct.current.activeId)return;if(kt&&!Ct.current.activeId){Ct.current.activeId=kt;return}const Mt=setTimeout(()=>{Ct.current.activeId=kt},50);return()=>clearTimeout(Mt)},[kt]),{active:ae,activeIndex:v,attributes:P,data:D,rect:F,index:U,newIndex:At,items:d,isOver:W,isSorting:He,isDragging:pe,listeners:le,node:H,overIndex:_,over:_e,setNodeRef:Le,setActivatorNodeRef:J,setDroppableNodeRef:G,setDraggableNodeRef:ee,transform:yr??vr,transition:ne()};function ne(){if(yr||Lt&&Ct.current.newIndex===U)return j5e;if(!(Bt&&!RE(V)||!c)&&(He||Kt))return ay.Transition.toString({...c,property:A$})}}function z5e(e,t){var r,i;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(r=e?.draggable)!=null?r:t.draggable,droppable:(i=e?.droppable)!=null?i:t.droppable}}function $b(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&typeof t.sortable=="object"&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const H5e=[zi.Down,zi.Right,zi.Up,zi.Left],W5e=(e,t)=>{let{context:{active:r,collisionRect:i,droppableRects:o,droppableContainers:a,over:s,scrollableAncestors:l}}=t;if(H5e.includes(e.code)){if(e.preventDefault(),!r||!i)return;const u=[];a.getEnabled().forEach(p=>{if(!p||p!=null&&p.disabled)return;const v=o.get(p.id);if(!!v)switch(e.code){case zi.Down:i.topv.top&&u.push(p);break;case zi.Left:i.left>v.left&&u.push(p);break;case zi.Right:i.left1&&(d=c[1].id),d!=null){const p=a.get(r.id),v=a.get(d),x=v?o.get(v.id):null,b=v?.node.current;if(b&&x&&p&&v){const _=Kx(b).some((j,F)=>l[F]!==j),k=I$(p,v),E=V5e(p,v),B=_||!k?{x:0,y:0}:{x:E?i.width-x.width:0,y:E?i.height-x.height:0},U={x:x.left,y:x.top};return B.x&&B.y?U:oy(U,B)}}}};function I$(e,t){return!$b(e)||!$b(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function V5e(e,t){return!$b(e)||!$b(t)||!I$(e,t)?!1:e.data.current.sortable.indext(!0),o=()=>t(!1);return X.exports.useEffect(()=>{const a=r.current;if(a)return a.addEventListener("mouseover",i),a.addEventListener("mouseout",o),()=>{a.removeEventListener("mouseover",i),a.removeEventListener("mouseout",o)}},[r.current]),{hoverRef:r,isHover:e}}const K5e="/assets/delete.42fb1897.svg",G5e="/assets/dnd.dcf4594c.svg",Y5e=Xi("input")({display:"flex",alignItems:"center",width:300,height:44,background:"#FFFFFF",border:"1px solid #D8D8D8",borderRadius:"12px",fontSize:14,fontFamily:"Mulish",paddingLeft:10,outline:"none","&:hover":{border:"1px solid #b0b0b0"},"&:focus":{border:"1px solid #807e7e"}}),rs=Xi(j6)({border:"none",padding:0}),qp=Xi(j6)({fontWeight:700}),Fl=Xi("hr")({display:"block",width:"100%",height:1,backgroundColor:"#ccc",border:"none"}),Q5e=e=>e.replace(/\/+/g,"/").replace(/^\/[^\/]/,"").replace(/\/$/,"");function kO({file:e,pos:t,isHover:r}){const i=e.fileObj.name,{attributes:o,listeners:a}=T$({id:i}),s=la(),l=aa(s.breakpoints.down("lg")),{setInclueInCommand:u,setDirectory:c,removeFile:d}=zu(),{data:p}=Hu(),v=!!p?.result?.msgCell;return Ut(ta,{children:[L(rs,{sx:{paddingLeft:1},...o,...a,children:Ut($n,{sx:{color:"#D8D8D8"},children:[t,".",L($n,{ml:5,style:{cursor:"pointer",visibility:r?"visible":"hidden"},children:L("img",{src:G5e,alt:"Drag n drop icon",width:24,height:24})})]})}),L(rs,{children:L(Y5e,{disabled:v,value:e.folder,onBlur:x=>{c(i,Q5e(x.target.value))},onChange:x=>{c(i,x.target.value)}})}),L(rs,{sx:{paddingLeft:l?2:0},children:Ut($n,{sx:{flexDirection:"column",justifyContent:"center",alignItems:"flex-start"},children:[L(jo,{sx:{fontSize:14},children:e.fileObj.name}),Ut(jo,{sx:{fontSize:12,color:"#C1C1C1"},children:[e.fileObj.size," bytes"]})]})}),L(rs,{children:L(woe,{disabled:v,checked:e.includeInCommand,onChange:x=>{u(i,x.target.checked)}})}),L(rs,{align:"right",children:L(Bs,{sx:{visibility:r?"visible":"hidden",opacity:.5,cursor:"pointer",marginRight:1},onClick:()=>{d(i)},children:L("img",{src:K5e,alt:"Delete icon",width:18,height:18})})})]})}function Z5e({file:e,pos:t}){const r=e.fileObj.name,{hoverRef:i,isHover:o}=q5e(),{data:a}=Hu(),s=!!a?.result?.msgCell,{setNodeRef:l,transform:u,transition:c,isDragging:d}=T$({id:r}),p={transform:ay.Transform.toString(u),transition:c};return s?L(xc,{sx:{height:60},children:L(kO,{file:e,pos:t,isDragging:!1,isHover:!1})}):L(xc,{sx:{height:60,transition:".15s all","&:hover":{background:"#FAFAFA"}},ref:v=>{l(v),i.current=v},style:p,children:L(kO,{file:e,pos:t,isDragging:d,isHover:o})},r)}function X5e(){const{files:e,reorderFiles:t}=zu(),{data:r}=Hu(),i=la(),o=aa(i.breakpoints.down("lg")),a=!!r?.result?.msgCell,s=__e(J5(y$,{}),J5(v$,{}),J5(ME,{coordinateGetter:W5e}));function l(u){const{active:c,over:d}=u;c.id!==d.id&&t(c.id,d.id)}return L(_5e,{sensors:s,collisionDetection:C_e,onDragEnd:l,modifiers:[d_e,c_e],children:L(Xoe,{children:Ut(L6,{sx:{minWidth:650},children:[Ut(z7,{sx:{"&.MuiTableHead-root th":{border:"none"}},children:[Ut(xc,{sx:{fontWeight:700},children:[L(qp,{sx:{paddingLeft:0,paddingBottom:o?0:2,width:100},children:"Order"}),L(qp,{sx:{paddingLeft:0,paddingBottom:o?0:2},children:"Directory"}),L(qp,{sx:{paddingLeft:o?2:0,width:300,paddingBottom:o?0:2},children:"File"}),L(qp,{sx:{paddingLeft:0,width:150,paddingBottom:o?0:2},children:"Include in command"}),L(qp,{sx:{paddingLeft:0,width:100,paddingBottom:o?0:2}})]}),Ut(xc,{children:[L(rs,{sx:{paddingBottom:o?0:2},children:L(Fl,{})}),L(rs,{sx:{paddingBottom:o?0:2},children:L(Fl,{})}),L(rs,{sx:{paddingBottom:o?0:2},children:L(Fl,{})}),L(rs,{sx:{paddingBottom:o?0:2},children:L(Fl,{})}),L(rs,{sx:{paddingBottom:o?0:2},children:L(Fl,{})})]})]}),L(N6,{children:L(U5e,{disabled:a,items:e.map(u=>u.fileObj.name),strategy:O5e,children:e.map((u,c)=>L(Z5e,{file:u,pos:c+1},u.fileObj.name))})})]})})})}const i3=Xi(k7)({flexGrow:1}),o3=Xi(j7)(({theme:e})=>({borderRadius:e.spacing(1.2),height:e.spacing(5.3),minWidth:150,".MuiOutlinedInput-notchedOutline":{border:"1px solid #D8D8D8"},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{border:"1px solid #807e7e"},"&:hover .MuiOutlinedInput-notchedOutline":{border:"1px solid #b0b0b0"}})),Vv=Xi(E7)(({theme:e})=>({color:"#000",fontSize:12,marginLeft:e.spacing(1),marginBottom:e.spacing(1)})),J5e=Xi("input")(({theme:e})=>({display:"flex",alignItems:"center",boxSizing:"border-box",width:"100%",flex:2,height:e.spacing(5.3),borderRadius:e.spacing(1.2),border:"1px solid #D8D8D8",outline:"none",padding:"0 40px 0 125px",color:"#000",background:"transparent",fontFamily:"Mulish",fontSize:14,"&:hover":{border:"1px solid #b0b0b0"},"&:focus":{border:"1px solid #807e7e"}})),e3e="/assets/undo.944d3e45.svg";function t3e(){const{compilerSettings:e,setOverrideCommandLine:t,setFuncCliVersion:r,setTactCliVersion:i,compiler:o,setCompiler:a}=cE(),{data:s}=Hu(),l=la(),u=aa(l.breakpoints.down("md")),c=!!s?.result?.msgCell,{data:{funcVersions:d,tactVersions:p}}=uE();return Ut(da,{mt:4,children:[L(jo,{variant:"h5",style:{fontWeight:800,fontSize:16,marginBottom:16},children:"Compiler"}),Ut($n,{sx:{gap:1,alignItems:u?"center":"flex-end",flexDirection:u?"column":"inherit"},children:[L($n,{mb:u?1:0,sx:{width:u?"100%":"inherit"},children:Ut(i3,{children:[L(Vv,{children:"Compiler"}),Ut(o3,{value:o,onChange:v=>{a(v.target.value)},children:[L(rm,{value:"func",children:"func"}),L(rm,{value:"tact",children:"tact"}),{}.VITE_ALLOW_FIFT&&L(rm,{value:"fift",children:"fift"})]})]})}),o==="func"&&Ut(ta,{children:[L($n,{mb:u?1:0,sx:{width:u?"100%":"inherit"},children:Ut(i3,{disabled:c,children:[L(Vv,{children:"Version"}),L(o3,{value:e.funcVersion,onChange:v=>{r(v.target.value)},children:d?.map(v=>L(rm,{value:v,children:v},v))})]})}),Ut(da,{sx:{width:"100%",position:"relative"},children:[L(Vv,{sx:{display:"block"},children:"Func command"}),L(J5e,{disabled:c,value:e.commandLine,onChange:v=>{t(v.target.value)}}),L(Fee,{sx:{position:"absolute",left:3,top:28,height:37,background:"#F5F5F5",borderRadius:1.5,color:"#000",fontSize:14},label:"func -o tmp.fif"}),!!e.overrideCommandLine&&L(Bs,{sx:{color:"blue",position:"absolute",right:10,top:31},onClick:()=>{t(null)},children:L("img",{src:e3e,alt:"Undo icon",width:15,height:15})})]})]}),o==="tact"&&L(ta,{children:L($n,{mb:u?1:0,sx:{width:u?"100%":"inherit"},children:Ut(i3,{disabled:c,children:[L(Vv,{children:"Version"}),L(o3,{value:e.tactVersion,disabled:!0,children:p?.map(v=>L(rm,{value:v,children:v},v))})]})})})]})]})}const r3e="/assets/reorder-hint.5f3a54fb.svg",n3e="/assets/light-bulb.7768be40.svg",R$="/assets/like.af7e7b33.svg",i3e=sr(kn)({maxWidth:1160,width:"calc(100% - 50px)",margin:"auto"}),o3e=sr(kn)({display:"flex",justifyContent:"space-between",height:73}),a3e=sr(kn)(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"space-between",gap:e.spacing(1.5)})),s3e=sr(kn)(({theme:e})=>({display:"flex",flexWrap:"wrap",justifyContent:"space-between",marginTop:e.spacing(3),marginBottom:e.spacing(2),color:"#728A96",fontSize:14,[e.breakpoints.down("md")]:{"& > *":{marginBottom:`${e.spacing(1)} !important`}}})),l3e=sr("hr")({height:"1px",backgroundColor:"#e6e6e6",border:"none"}),EO=sr(uc)(({theme:e})=>({display:"inline-flex",alignItems:"center",color:"inherit",textDecoration:"none",[e.breakpoints.down("md")]:{justifyContent:"flex-end"}})),Fy=sr(kn)({display:"flex",justifyContent:"center",alignItems:"center"}),u3e=sr(Fy)(({theme:e})=>({[e.breakpoints.down("md")]:{minWidth:"100%",flex:2,order:3}})),P$=sr(Fy)(({theme:e})=>({[e.breakpoints.down("md")]:{minWidth:"50%"}})),c3e=sr(P$)(({theme:e})=>({[e.breakpoints.down("md")]:{justifyContent:"start"},[e.breakpoints.down("sm")]:{minWidth:100}})),d3e=sr(P$)(({theme:e})=>({[e.breakpoints.down("md")]:{justifyContent:"end"},[e.breakpoints.down("sm")]:{minWidth:100}})),f3e="/assets/heart.52fe96d0.svg",p3e="/assets/orbs.eb35e74b.svg",h3e="/assets/telegram.bcba2ca3.svg",g3e="/assets/telegram-hover.72b9d3ce.svg",m3e="/assets/github-footer.0bd3bbab.svg",y3e="/assets/github-hover.33daf3ef.svg",AO=sr(kn)(e=>({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"center",width:t.spacing(3),height:t.spacing(3),background:`url(${e.iconUrl})`,"&:hover":{transitionDuration:".25s",background:`url(${e.disabled?e.iconUrl:e.hoveredIconUrl})`,cursor:e.disabled?"cursor":"pointer"}})),TO=({iconUrl:e,hoveredIconUrl:t,link:r})=>r.length?L(uc,{target:"_blank",href:r,children:L(AO,{iconUrl:e,hoveredIconUrl:t})}):L(AO,{iconUrl:e,hoveredIconUrl:t,disabled:!0});function M$(){const e=QC(),[t,r]=yw();return()=>{t.has("testnet")?t.delete("testnet"):t.append("testnet",""),r(t),e(0)}}function BE(){const e=M$();return L(kn,{sx:{background:"red",color:"white",py:2},children:Ut(wE,{sx:{gap:4,px:4},children:[L(jo,{sx:{fontWeight:"bold",flexGrow:1},children:"Testnet"}),L(jo,{onClick:()=>{e()},sx:{cursor:"pointer"},children:"Switch to mainnet"})]})})}const H4="https://t.me/tonverifier";function Fb(){const e=aa("(max-width: 450px)"),t=Ac(),r=M$();return Ut(i3e,{children:[Ut(o3e,{mb:e?5:"inherit",sx:{flexDirection:e?"column":"inherit",alignItems:e?"center":"inherit"},children:[L($n,{children:Ut(ap,{sx:{color:"#000"},onClick:()=>t("/"),children:[L("img",{src:vw,alt:"App icon",width:30,height:30}),L(cx,{children:"TON VERIFIER"})]})}),Ut(a3e,{children:[L(TO,{iconUrl:h3e,hoveredIconUrl:g3e,link:H4}),L(TO,{iconUrl:m3e,hoveredIconUrl:y3e,link:"https://github.com/orbs-network/ton-contract-verifier"})]})]}),L(l3e,{}),Ut(s3e,{children:[L(c3e,{children:L(jo,{variant:"body2",children:"\xA9 2023"})}),L(u3e,{children:Ut($n,{sx:{gap:.1},children:["Contributed with",L($n,{mx:.4,children:L("img",{src:f3e,alt:"Heart",width:12,height:12})}),"by",L($n,{mx:.4,children:L("img",{src:p3e,alt:"Orbs logo",width:12,height:12})}),L(EO,{sx:{color:"#5E75E8"},target:"_blank",href:"https://orbs.com/powered-by",children:"Orbs"})]})}),Ut(d3e,{children:[L(EO,{target:"_blank",href:H4,children:L(jo,{variant:"body2",children:"Support"})}),!window.isTestnet&&L(jo,{onClick:()=>{r()},sx:{ml:2,cursor:"pointer"},variant:"body2",children:"Switch to Testnet"})]})]})]})}const v3e=sr("li")({maxWidth:650,fontSize:14,fontWeight:400,marginBottom:10});function b3e(e,t){switch(e){case Na.ENTRYPOINT_MISSING:return"There usually should be at least one file containing an entrypoint (recv_internal, main)";case Na.STDLIB_ORDER:return"stdlib.fc should usually be the first file in the list (unless it's imported from another file)";case Na.STDLIB_MISSING:return"You can try to add stdlib.fc to your sources.";case Na.NOT_SIMILAR:return"Source code compiles correctly but does not match the on-chain contract hash. Make sure you are using the correct compiler version, command line and file order.";case Na.FILE_ORDER:return"Make sure all files in the command line are in the correct order";case Na.COMPILER_VERSION:return"Try to use the same compiler version as the contract was compiled with";case Na.REQUIRED_FILES:return"Make sure all required files are included in the command line";case Na.SUPPORT_GROUP:return Ut("div",{children:["If you are still facing issues, you can use the"," ",L(uc,{target:"_blank",href:H4,sx:{textDecoration:"none",cursor:"pointer"},children:"Telegram support group"})]})}}const w3e=({hint:e})=>{const{data:t}=Hu();return L(v3e,{children:b3e(e,t?.result.compileResult)})},Dd=sr(jo)({fontSize:14,fontWeight:400,marginBottom:"10px"}),IO=sr(jo)({fontSize:14,fontWeight:700}),O$=sr(jo)({fontSize:14,fontWeight:400}),RO=sr($n)({padding:"20px 30px",paddingLeft:0,"&:hover":{background:"transparent"}}),PO=sr(Tj)({minWidth:200,fontSize:14,fontWeight:600}),x3e=sr(da)({borderBottom:"1px solid rgba(0, 0, 0, 0.2)"}),MO=sr(Ij)({color:"#000",fontSize:14,fontWeight:400});function _3e(){const{data:e,error:t}=Hu(),{data:r}=vp(),i=e?.result?.compileResult,o=e?.hints??[];return Ut(da,{my:3,children:[["similar"].includes(i?.result??"")&&L(Cs,{singleLine:!0,type:ps.SUCCESS,title:Ut($n,{sx:{height:42},children:[L($n,{mr:1,children:L("img",{src:R$,alt:"Like icon",width:31,height:31})}),Ut(O$,{children:[" ",L("b",{children:"Great!"})," Compile output hash matches this on-chain contract"]})]}),notificationBody:L(da,{})}),["not_similar"].includes(i?.result??"")&&L(Cs,{type:ps.ERROR,title:Ut($n,{children:[L($n,{mr:1,children:L("img",{src:r3e,alt:"Reorder icon",width:39,height:26})}),L(IO,{children:"Hashes are not similar"})]}),notificationBody:Ut(da,{sx:{display:"flex",flexDirection:"column"},children:[Ut(RO,{children:[L(PO,{children:"Contract hash"}),L(MO,{children:r?.codeCellHash.base64??"-"})]}),L(x3e,{}),Ut(RO,{children:[L(PO,{children:"Compile output hash"}),L(MO,{children:i?.hash??"-"})]})]})}),i?.error&&L(Cs,{type:ps.ERROR,title:Ut(Dd,{children:[L("span",{style:{color:"#FC5656"},children:"Error: "}),"Compile error"]}),notificationBody:L(da,{sx:{overflow:"auto",maxHeight:300},children:L("div",{children:L("code",{children:i.error})})})}),!!t&&L(Cs,{type:ps.ERROR,title:Ut(Dd,{children:[L("span",{style:{color:"#FC5656"},children:"Error: "}),"Server error"]}),notificationBody:L(da,{sx:{overflow:"auto",maxHeight:300},children:L("div",{children:L("code",{children:t.toString()})})})}),o.length>0&&L(Cs,{type:ps.HINT,title:Ut($n,{mb:2,children:[L($n,{mr:1,children:L("img",{src:n3e,alt:"Light bulb icon",width:21,height:22})}),L(IO,{children:"Possible reasons for failure"})]}),notificationBody:L("ul",{style:{paddingLeft:25},children:o.map(a=>L(w3e,{hint:a},a))})})]})}function B$(){const[e]=kg();return L(Ha,{background:"#1976d2",hoverBackground:"#156cc2",height:37,fontSize:14,fontWeight:700,textColor:"#fff",type:"button",onClick:()=>e.connectWallet(),children:"Connect wallet"})}const S3e=Xi(da)({padding:"15px 24px"});function C3e(){const e=Bx(),{hasFiles:t}=zu(),{step:r,proceedToPublish:i,toggleSection:o,currentSection:a}=Vx(),{mutate:s,data:l,error:u,isLoading:c,compileStatus:d}=Hu(),p=!!l?.result?.msgCell,v=()=>o(sc.SOURCES);return Ut(ug,{children:[L(da,{sx:{cursor:r===hc.PUBLISH&&p?"pointer":"inherit"},onClick:v,children:L(r_e,{})}),a===sc.SOURCES&&L(vy,{in:a===sc.SOURCES,children:L(S3e,{children:Ut(ta,{children:[t()&&Ut(ta,{children:[L(X5e,{}),L(t3e,{})]}),(l||u)&&L(_3e,{}),t()&&L($n,{sx:{justifyContent:"center"},mt:3,mb:"9px",children:e?l?.result?.msgCell?L(Ha,{disabled:r===hc.PUBLISH,fontSize:14,fontWeight:800,textColor:"#fff",height:44,width:144,background:"#1976d2",hoverBackground:"#156cc2",onClick:i,children:"Ready to publish"}):Ut(Ha,{disabled:!t(),fontSize:14,fontWeight:800,textColor:"#fff",height:44,width:144,background:"#1976d2",hoverBackground:"#156cc2",onClick:()=>{s(null)},children:[c&&L(lg,{sx:{color:"#fff",height:"20px !important",width:"20px !important"}}),"Compile"]}):L(B$,{})})]})})})]})}const k3e=sr(c2)({borderRadius:40,fontFamily:"inherit",fontWeight:700,textTransform:"none",background:"#0088CC","&:disabled":{backgroundColor:"#e0e0e0"}});function nd(e){return L(k3e,{disableElevation:!0,disableRipple:!0,disableFocusRipple:!0,disableTouchRipple:!0,variant:"contained",disabled:e.disabled,onClick:e.disabled?void 0:e.onClick,...e,children:e.text})}const E3e="/assets/publish.83df630b.svg";function A3e(){const{data:e}=Hu(),{sendTXN:t,status:r,clearTXN:i}=rj(),{step:o,toggleSection:a,currentSection:s}=Vx();zu();const l=!!e?.result?.msgCell;let u;const c=()=>o===hc.PUBLISH&&l&&a(sc.PUBLISH);switch(r){case"initial":u=L("span",{children:"To store your contract\u2019s verification proof on-chain, you will need to issue a transaction. This will cost 0.5 TON"});break;case"rejected":u="Transaction rejected, please retry.";break;case"pending":u="Check your wallet for a pending transaction.";break;case"issued":u="Transaction issued, monitoring proof deployment on-chain.";break;case"success":u="Your contract is now verified! Click below to view it.";break;case"expired":u="Transaction expired, please retry.";break;case"error":u="The transaction is taking too long to complete or have failed. Please use a blockchain explorer to monitor it. You can also use our telegram support group."}return Ut(ug,{mb:6,children:[Ut($n,{p:s===sc.PUBLISH?"30px 24px 0 24px":"20px 24px",onClick:c,sx:{opacity:o===hc.PUBLISH&&l?1:.25,cursor:o===hc.PUBLISH&&l?"pointer":"inherit"},children:[L(cg,{children:L("img",{src:r==="success"?r$:E3e,alt:"publish icon",width:41,height:41})}),L(Fd,{children:"Publish"})]}),s===sc.PUBLISH&&l&&L(vy,{in:s===sc.PUBLISH,children:Ut(da,{children:[L(da,{sx:{padding:"0 30px"},children:L(Cs,{type:ps.INFO,title:L(ta,{}),notificationBody:L($n,{sx:{overflow:"auto",maxHeight:300},children:L(Dd,{sx:{marginBottom:0},children:u})})})}),Ut($n,{mb:3,sx:{justifyContent:"center"},children:[r!=="success"&&Ut(Ha,{disabled:r==="pending"||r==="issued",fontSize:14,fontWeight:800,textColor:"#fff",height:44,width:144,background:"#1976d2",hoverBackground:"#156cc2",onClick:()=>{t()},children:[(r==="pending"||r==="issued")&&L(lg,{sx:{color:"#fff",height:"20px !important",width:"20px !important"}}),"Publish"]}),r==="success"&&L(nd,{sx:{height:44},text:"View verified contract",onClick:()=>{location.reload()}})]})]})})]})}const T3e="/assets/verification-alert.0ebcec4f.svg",I3e="/assets/verification-binary.d6844d86.svg",R3e="/assets/verification-bomb.3bf48d9c.svg",P3e="/assets/verification-paper.34a39e79.svg",M3e="/assets/show.836c8f4f.svg",O3e="/assets/verification.fbd44dba.svg",B3e=Xi(Bs)(()=>({color:"#000"})),U3e=Xi(da)({display:"flex",alignItems:"center",flexDirection:"column","& .title":{texAlign:"center",fontWeight:500,fontSize:20,marginBottom:20},"& .base-button":{height:40,marginTop:30}});function D3e({open:e,onClose:t,children:r,backgroundColor:i="rgba(48, 48, 48, 0.4)",blur:o=!0,className:a="",maxWidth:s,hideCloseButton:l,paddingTop:u}){return L(rre,{className:`${a} ${o&&"popup-filter"}`,fullWidth:!0,onClose:t,open:e,PaperProps:{style:{maxWidth:s||"unset",width:"100%",borderRadius:"10px",padding:0,overflow:"unset",margin:20}},BackdropProps:{style:{backgroundColor:i}},children:Ut(da,{sx:{overflow:"scroll","::-webkit-scrollbar":{display:"none"}},children:[!l&&L(da,{sx:{display:"flex",justifyContent:"end",width:"100%"},children:L(B3e,{onClick:t,children:L(Ck,{style:{width:23,height:23}})})}),L(U3e,{px:3,pb:3,pt:u?3:0,children:r})]})})}const L3e="/assets/verification-popup.1a3fc640.svg",N3e=sr(L6)({overflow:"scroll",background:"#F7F9FB",borderRadius:"5px",width:"100%"}),j3e=sr(kn)({background:"#F7F9FB",borderRadius:"5px",width:"100%"}),$3e=sr(z7)({"&.MuiTableHead-root th":{border:"none",fontSize:13}}),F3e=sr(xc)({fontWeight:700}),$p=sr(qp)({paddingLeft:0,paddingBottom:"2px"}),Fp=sr(rs)({paddingBottom:10}),z3e=sr($n)({width:59,height:21,background:"#08D088",borderRadius:40,color:"#fff",justifyContent:"space-around",fontSize:12}),id=sr(rs)({paddingBottom:16}),H3e=sr(uc)({textDecoration:"none",cursor:"pointer",color:"#0088CC"}),W3e=sr(kn)({width:"100%",display:"flex",justifyContent:"flex-end"}),a3=sr(jo)({color:"#728A96",fontSize:14}),V3e=sr(Fd)({fontSize:18,fontWeight:800,color:"#000",textAlign:"center"}),q3e=sr(kn)({display:"inline-flex",alignItems:"center",height:"20px",padding:"0 7px",background:"rgba(146, 146, 146, 0.3)",borderRadius:"10px",color:"#212121",fontWeight:400,fontSize:"14px",fontFamily:"IBM Plex Mono, monospace"});sr(q3e)({position:"relative",top:5,display:"inline-block",whiteSpace:"nowrap",lineHeight:"20px",width:"100%",maxWidth:600,overflow:"hidden",textOverflow:"ellipsis"});const K3e="/assets/verified.4e0dc210.svg",Am=()=>L(Xa,{width:"85%",variant:"text",sx:{transform:"none",background:"#e6e8eb"}}),G3e=()=>Ut($3e,{children:[Ut(F3e,{children:[L($p,{sx:{width:80,paddingLeft:3},children:"Status"}),L($p,{sx:{width:370},children:"Public Key"}),L($p,{sx:{width:35}}),L($p,{sx:{width:105},children:"IP"}),L($p,{sx:{width:150},children:"Verification date"}),L($p,{sx:{width:100},children:"Verifier"})]}),Ut(xc,{children:[L(Fp,{children:L(Fl,{})}),L(Fp,{children:L(Fl,{})}),L(Fp,{children:L(Fl,{})}),L(Fp,{children:L(Fl,{})}),L(Fp,{children:L(Fl,{})}),L(Fp,{children:L(Fl,{})})]})]}),OO=()=>Ut(xc,{children:[L(rs,{sx:{paddingLeft:3,paddingBottom:2},children:L(Am,{})}),L(id,{children:L(Am,{})}),L(id,{children:L(Xa,{width:25,variant:"text",sx:{transform:"none",background:"#e6e8eb"}})}),L(id,{children:L(Am,{})}),L(id,{children:L(Am,{})}),L(rs,{sx:{paddingRight:3,paddingBottom:2},children:L(Am,{})})]}),Y3e=({pubKey:e,endpoint:t,name:r,onCopy:i,date:o,url:a})=>Ut(xc,{children:[L(rs,{sx:{paddingLeft:3,paddingBottom:2},children:Ut(z3e,{px:1,children:[L("img",{src:K3e,alt:"Verified icon",width:11,height:11}),"Verified"]})}),L(id,{children:L(a3,{children:e})}),L(id,{children:L(Bs,{onClick:()=>i(e),sx:{padding:.5},children:L("img",{src:Wx,alt:"Copy icon",width:16,height:16})})}),L(id,{children:L(a3,{children:t})}),L(id,{children:L(a3,{children:o})}),L(rs,{sx:{paddingRight:3,paddingBottom:2},children:L($n,{children:L(H3e,{target:"_blank",href:a,children:r})})})]});function Q3e(){const{data:e,isLoading:t,error:r}=Pc(),{data:i,isLoading:o,error:a}=zx(),{showNotification:s}=Ry(),l=i?.find(c=>c.name===window.verifierId),u=X.exports.useCallback(async c=>{navigator.clipboard.writeText(c),s("Copied to clipboard!","success")},[]);return Ut(kn,{sx:{overflow:"scroll",borderRadius:"5px","::-webkit-scrollbar":{display:"none"}},children:[Ut(N3e,{sx:{minWidth:900},children:[L(G3e,{}),L(N6,{children:t||o?Ut(ta,{children:[L(OO,{}),L(OO,{})]}):l&&e&&Object.entries(l.pubKeyEndpoints).map(([c,d])=>L(Y3e,{pubKey:c,onCopy:u,url:l.url,date:e?.verificationDate?.toLocaleDateString()||"",endpoint:d,name:l.name},c))})]}),(!!r||!!a)&&`${r} ${a} (App notification)`]})}const Z3e="modulepreload",X3e=function(e){return"/"+e},BO={},Tm=function(t,r,i){if(!r||r.length===0)return t();const o=document.getElementsByTagName("link");return Promise.all(r.map(a=>{if(a=X3e(a),a in BO)return;BO[a]=!0;const s=a.endsWith(".css"),l=s?'[rel="stylesheet"]':"";if(!!i)for(let d=o.length-1;d>=0;d--){const p=o[d];if(p.href===a&&(!s||p.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${a}"]${l}`))return;const c=document.createElement("link");if(c.rel=s?"stylesheet":Z3e,s||(c.as="script",c.crossOrigin=""),c.href=a,document.head.appendChild(c),s)return new Promise((d,p)=>{c.addEventListener("load",d),c.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${a}`)))})})).then(()=>t())};var v1=(e=>(e.VALID="VALID",e.WASM="WebAssembly is not supported",e.COMPILER="Only FunC contracts can be verified",e.VERSION="FunC version is not supported",e))(v1||{});const J3e=["0.2.0","0.3.0","0.4.0","0.4.1"];function eSe(){const{data:e}=Pc(),{data:t}=vp(),[r,i]=X.exports.useState(null),[o,a]=X.exports.useState(!1),[s,l]=X.exports.useState(null),u=async()=>{wa(ha.IN_BROWSER_COMPILE_START),i(null),a(!0);const{FuncCompiler:p}=await Tm(()=>import("./index.9dd948c7.js").then(E=>E.i),[]),v=e?.files?.map(E=>({filename:E.name,content:E.content}))??[],x=e?.compilerSettings?.funcVersion;if(!x){i("FunC is not available for in-browser verification"),a(!1);return}let b;switch(x){case"0.2.0":{let{object:E}=await Tm(()=>import("./index.fbca1507.js").then(B=>B.i),[]);b=E;break}case"0.3.0":{let{object:E}=await Tm(()=>import("./index.f65cb428.js").then(B=>B.i),[]);b=E;break}case"0.4.0":{let{object:E}=await Tm(()=>import("./index.fb59a6c3.js").then(B=>B.i),[]);b=E;break}case"0.4.1":{let{object:E}=await Tm(()=>import("./index.bf0da248.js").then(B=>B.i),[]);b=E;break}}let _=await new p(b).compileFunc({sources:v,targets:(e?.compilerSettings).commandLine.split(" ").filter(E=>E.match(/\.(fc|func)$/))});if(_.status==="error"){i(_.message),a(!1),wa(ha.IN_BROWSER_COMPILE_ERROR);return}const k=Vn.Cell.fromBoc(Buffer.from(_.codeBoc,"base64"))[0];a(!1),t?.codeCellHash.base64===k.hash().toString("base64")&&l(k.hash().toString("base64")),wa(ha.IN_BROWSER_COMPILE_SUCCESS)},c=()=>xj()?e?.compiler!=="func"?"Only FunC contracts can be verified":d()?"VALID":"FunC version is not supported":"WebAssembly is not supported",d=()=>J3e.some(p=>p===e?.compilerSettings?.funcVersion);return{verifyContract:u,isVerificationEnabled:c,loading:o,error:r,hash:s}}function tSe(){const{verifyContract:e,isVerificationEnabled:t,error:r,loading:i,hash:o}=eSe(),a=la(),s=aa(a.breakpoints.down("md"));return Ut(kn,{p:2,children:[Ut(jo,{sx:{fontSize:14},children:["You are not required to rely on third-party validators. You can now verify this contract by yourself by having your browser download the sources and compile them locally in-browser using"," ",L(uc,{sx:{textDecoration:"none"},href:"https://github.com/ton-community/func-js",target:"_blank",children:"WASM"}),".",!nwe()&&L($n,{mt:1,sx:{overflow:"auto",maxHeight:300},children:Ut(Dd,{sx:{margin:0},children:["The web page you're looking at is"," ",L(uc,{sx:{textDecoration:"none"},href:"https://github.com/ton-community/contract-verifier",target:"_blank",children:"open source"}),", you can also fork or run it locally if you wish to have absolute control."]})})]}),t()!==v1.VALID?L($7,{arrow:!0,title:L(jo,{sx:{fontSize:13},children:t()}),placement:"top",children:L(kn,{sx:{width:144,margin:"auto"},children:L(Ha,{onClick:()=>e(),disabled:t()!==v1.VALID||i||!!o,fontSize:14,fontWeight:800,textColor:"#fff",height:44,width:144,background:"#1976d2",hoverBackground:"#156cc2",children:"Verify"})})}):Ut(Ha,{onClick:()=>e(),disabled:t()!==v1.VALID||i||!!o,fontSize:14,fontWeight:800,textColor:"#fff",height:44,width:144,background:"#1976d2",hoverBackground:"#156cc2",children:[i&&L(lg,{sx:{color:"#fff",height:"20px !important",width:"20px !important"}}),"Verify"]}),r&&Ut(ta,{children:[L(Cs,{noBottomMargin:!0,type:ps.ERROR,title:Ut(Dd,{children:[L("span",{style:{color:"#FC5656"},children:"Error: "}),"Compile error"]}),notificationBody:L(kn,{sx:{overflow:"auto",maxHeight:300},children:L("div",{children:L("code",{children:r})})})}),Ut(jo,{sx:{marginTop:1,fontSize:13},children:["You can ask for help in our"," ",L(uc,{sx:{textDecoration:"none",cursor:"pointer",color:"#0088CC"},href:"https://t.me/tonverifier",target:"_blank",children:"Telegram support group"})]})]}),!!o&&L(Cs,{noBottomMargin:!0,singleLine:!s,type:ps.SUCCESS,title:Ut($n,{sx:{height:42},children:[L($n,{mr:1,children:L("img",{src:R$,alt:"Like icon",width:31,height:31})}),Ut(O$,{children:[" ",L("b",{children:"Great!"})," Compile output hash matches this on-chain contract"]})]}),notificationBody:L(kn,{})})]})}function rSe(){const{data:e,isLoading:t}=Pc(),{isLoading:r}=zx();return Ut(kn,{sx:{width:"100%"},children:[e&&!r&&Ut(j3e,{pt:3,pb:1,children:[L(V3e,{children:"Verify manually"}),L(nSe,{})]}),(t||r)&&L(Xa,{width:"100%",height:250,sx:{transform:"none",borderRadius:"20px",background:"#e6e8eb"}})]})}Xi(H7)({borderBottom:"none","& .MuiTabs-indicator":{borderBottom:"4px solid #0088CC",borderRadius:20},"& .MuiTab-root.Mui-selected":{color:"#000",fontWeight:800}});function nSe(){return L(kn,{sx:{width:"100%"},children:L(tSe,{})})}function iSe({onClose:e}){const t=la(),r=aa(t.breakpoints.down("lg"));return L(D3e,{open:!0,maxWidth:r?"88%":1e3,hideCloseButton:!0,children:L(w6,{onClickAway:e,children:Ut(kn,{sx:{width:"100%"},children:[L(W3e,{pt:2,children:L(Bs,{sx:{padding:0},onClick:e,children:L("img",{src:b6,alt:"Close icon",width:15,height:15})})}),Ut($n,{mb:4,justifyContent:"center",children:[L("img",{src:L3e,alt:"Popup icon",width:41,height:41}),L(Fd,{pl:2,sx:{fontSize:18,fontWeight:800},children:"Verification Proof"})]}),L(Q3e,{}),L($n,{mt:3,children:L(rSe,{})})]})})})}const oSe=Xi($n)(({theme:e})=>t=>({flexWrap:t.makeFlexible?"wrap":"inherit",gap:t.makeFlexible?20:"inherit",justifyContent:t.makeFlexible?"center":"space-between",padding:24,[e.breakpoints.down("lg")]:{width:"70%",margin:"auto"}})),aSe=Xi(Fy)({boxSizing:"border-box",display:"flex",minWidth:200,maxWidth:260,height:108,background:"#F7F9FB",borderRadius:14,padding:"28px 13px"}),sSe=Xi(jo)({fontSize:14,color:"#000"}),lSe=[{icon:P3e,description:"This source code compiles to the same exact bytecode that is found on-chain."},{icon:R3e,description:"You can review verification proofs and perform your own client-side verification."},{icon:T3e,description:"Variable/function names may not reflect actual usage. compiler may remove unused code."},{icon:I3e,description:"Comments may not be honest and should generally be ignored."}],uSe=()=>{const[e]=yw(),[t,r]=Gn.useState(e.get("showProof")!==null),i=la(),o=aa(i.breakpoints.down("lg")),a=aa(i.breakpoints.down("md")),s=aa("(max-width: 450px)");return Ut(ug,{children:[L(p2,{mb:1,children:Ut($n,{sx:{justifyContent:"space-between",flexDirection:s?"column":"inherit",width:"100%"},children:[Ut($n,{mb:s?2:0,sx:{width:"100%"},children:[L(cg,{children:L("img",{src:O3e,alt:"Verification icon",width:41,height:41})}),L(Fd,{children:"How is this contract verified?"})]}),Ut("div",{children:[Ut(Ha,{fontSize:12,fontWeight:800,textColor:"#fff",background:"#1976d2",hoverBackground:"#156cc2",height:37,width:132,onClick:()=>{r(!0)},children:[L("img",{src:M3e,alt:"Show icon",width:19,height:19}),"Show Proof"]}),t&&L(iSe,{onClose:()=>r(!1)})]})]})}),L(oSe,{makeFlexible:o,isMobile:a,children:lSe.map(u=>Ut(aSe,{children:[L(Fy,{sx:{alignSelf:"flex-start"},mr:1.5,children:L("img",{alt:"Icon",src:u.icon,width:41,height:41})}),L(sSe,{children:u.description})]},u.description))})]})};function cSe(){const e=ej(m1),{isLoading:t,error:r,data:i}=bc(["latestVerifiedContracts"],async()=>(await(await fetch(`${e}/latestVerified`,{method:"GET"})).json()).slice(0,100));return{isLoading:t,error:r,data:i}}const dSe=sr(kn)(({theme:e})=>({background:"white",padding:"16px 20px",borderRadius:10,boxShadow:"rgb(114 138 150 / 8%) 0px 2px 16px",border:"0.5px solid rgba(114, 138, 150, 0.24)",cursor:"pointer",[e.breakpoints.down("sm")]:{width:280}})),fSe=sr(kn)(({theme:e})=>({maxWidth:1160,width:"calc(100% - 50px)",paddingTop:20,margin:"0 auto"})),pSe=sr(kn)({display:"flex",flexDirection:"row",flexWrap:"wrap",gap:24,margin:"0 auto",justifyContent:"left",overflow:"auto",marginTop:24,"-webkit-text-size-adjust":"100%"}),hSe=sr(kn)({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:16,color:"#728A96"}),gSe=sr(kn)({marginLeft:"auto",fontSize:14,background:"#F0F0F099",color:"#728A9699",padding:"2px 12px",borderRadius:4});function mSe(){const{data:e,isLoading:t}=cSe(),r=Ac(),i=X.exports.useRef(new Array(30).fill(null).map(o=>Math.random()*100));return Ut(fSe,{children:[L(jo,{variant:"h6",children:L("b",{children:"Latest verified contracts"})}),Ut(pSe,{children:[t&&i.current.map(o=>L(Xa,{sx:{borderRadius:2},variant:"rectangular",width:400+o,height:70})),e?.map(o=>Ut(dSe,{onClick:a=>{r(`/${o.address}`)},children:[L(hSe,{children:o.address}),Ut("div",{style:{display:"flex",alignItems:"center",marginTop:6.5},children:[L(jo,{sx:{fontSize:14,color:"#728A9699"},children:o.mainFile}),L(gSe,{children:o.compiler})]})]}))]})]})}const U$=Xi(kn)({maxWidth:1160,margin:"auto"}),D$=Xi(kn)(e=>({display:e.isMobile?"inherit":"flex",gap:20})),qv=Xi(kn)({boxSizing:"border-box",maxWidth:1160,width:"100%",marginTop:20,backgroundColor:"#fff",borderRadius:20,padding:20,color:"#000"});function UO(){const{isLoading:e,data:t,error:r}=Pc(),[i,o]=X.exports.useState(!1),a=la(),s=Cwe(),{contractAddress:l,isAddressEmpty:u}=$u(),{hasFiles:c}=zu(),d=X.exports.useRef(),p=aa(a.breakpoints.down("lg")),v=aa(a.breakpoints.down("md")),x=!r&&e&&l;AL(),Ewe(),lwe(),X.exports.useEffect(()=>{window.scrollTo({behavior:"auto",top:d.current?.offsetTop})},[window.location.pathname]);const{initialize:b}=cE(),{data:{funcVersions:y}}=uE();return X.exports.useEffect(()=>{(y?.length??0)>0&&b(y[0])},[y]),Ut(kn,{onDragEnter:()=>o(!0),onDrop:()=>o(!1),onClick:()=>o(!1),children:[L(u2,{sx:{color:"#fff",zIndex:4},open:i,onDragEnd:()=>o(!1)}),L(kn,{ref:d}),window.isTestnet&&L(BE,{}),L(gve,{}),l===null&&u&&L(mSe,{}),l===null&&!u&&L(kn,{m:4,children:L(Cs,{singleLine:!0,type:ps.ERROR,title:Ut($n,{sx:{height:42},children:[L("span",{style:{color:"#FC5656",marginRight:4},children:"Error: "}),"Invalid address"]}),notificationBody:L(kn,{})})}),Ut(U$,{px:p?"20px":0,children:[!!r&&L(kn,{mt:4,children:L(Cs,{type:ps.ERROR,title:Ut(Dd,{children:[L("span",{style:{color:"#FC5656"},children:"Error: "}),"Unable to fetch contract data"]}),notificationBody:L(kn,{sx:{overflow:"auto",maxHeight:300},children:L("pre",{children:L("code",{children:r.toString()})})})})}),x&&Ut(qv,{sx:{padding:"30px 24px 24px 24px"},mb:3,children:[Ut($n,{mb:3,children:[L(Xa,{variant:"circular",width:41,height:41,sx:{marginRight:2}}),L(Xa,{variant:"text",sx:{fontSize:"20px",width:200}})]}),L(Xa,{variant:"rectangular",width:"100%",height:250})]}),Ut(D$,{isMobile:v,children:[L(Owe,{}),t?.hasOnchainProof&&L(oxe,{})]}),x&&Ut(qv,{sx:{padding:"30px 24px 24px 24px"},mb:3,children:[Ut($n,{mb:3,children:[L(Xa,{variant:"circular",width:41,height:41,sx:{marginRight:2}}),L(Xa,{variant:"text",sx:{fontSize:"20px",width:200}})]}),L(Xa,{variant:"rectangular",width:"100%",height:250})]}),!e&&t?.hasOnchainProof&&L(uSe,{}),t&&(!t.hasOnchainProof||s)&&Ut(ta,{children:[L(C3e,{}),c()&&L(A3e,{})]}),t&&!c()?L(qv,{sx:{padding:0},mb:5,children:L(Swe,{})}):L(ta,{children:x&&Ut(qv,{sx:{padding:"30px 24px 24px 24px"},mb:5,children:[Ut($n,{mb:3,children:[L(Xa,{variant:"circular",width:41,height:41,sx:{marginRight:2}}),L(Xa,{variant:"text",sx:{fontSize:"20px",width:250}})]}),L(Xa,{variant:"rectangular",width:"100%",height:500})]})}),t&&L(Fb,{})]}),!t&&L(Fy,{sx:{bottom:0,width:"100%"},children:L(Fb,{})})]})}function L$({space:e}){return L("div",{style:{height:e}})}function ySe(){const[e,t]=X.exports.useState({spec:[],builder:Vn.beginCell()});return Ut("div",{children:[L("h4",{children:"Build the cell"}),L(wh,{required:!0,id:"outlined-required",label:"UINT",fullWidth:!0,onKeyUp:r=>{if(r.code==="Enter"){const[i,o]=r.target.value.split(",");t(a=>({spec:[...a.spec,{type:"uint"+o,value:i}],builder:a.builder.storeUint(i,o)})),r.target.value=""}}}),L(wh,{required:!0,id:"outlined-required",label:"Address",fullWidth:!0,onKeyUp:r=>{if(r.code==="Enter"){const i=r.target.value;t(o=>({spec:[...o.spec,{type:"address",value:i}],builder:o.builder.storeAddress(Vn.Address.parse(i))})),r.target.value=""}}}),L("div",{children:JSON.stringify(e.spec)}),L(L$,{space:30}),L(c2,{variant:"outlined",children:"Send the message"})]})}function vSe(){return Ut("div",{style:{margin:"0 auto",maxWidth:1100,padding:40},children:[L(B$,{}),L(L$,{space:35}),L(wh,{required:!0,id:"outlined-required",label:"Contract address",fullWidth:!0}),L(wh,{required:!0,id:"outlined-required",label:"Value",fullWidth:!0,type:"number"}),Ut("div",{children:[L("h3",{children:"OPs"}),L(wh,{required:!0,id:"outlined-required",label:"Value",fullWidth:!0,type:"number"}),L(ySe,{})]})]})}const bSe=v6({typography:{fontFamily:"Mulish"},components:{MuiSwitch:{styleOverrides:{switchBase:{color:"#ccc"},colorPrimary:{"&.Mui-checked":{color:"#fff"}},track:{opacity:1,backgroundColor:"#D1D1D6",".Mui-checked.Mui-checked + &":{opacity:1,backgroundColor:"#0088CC"}},thumb:{background:"#fff",boxShadow:"0px 2px 8px rgba(0, 0, 0, 0.16)"}}}}});function UE({label:e,data:t}){return Ut("div",{className:"InfoPiece",children:[L("div",{className:"InfoPiece-Label",children:e}),L("div",{className:"InfoPiece-Data",children:t})]})}var zy=e=>e.type==="checkbox",ch=e=>e instanceof Date,ds=e=>e==null;const N$=e=>typeof e=="object";var ka=e=>!ds(e)&&!Array.isArray(e)&&N$(e)&&!ch(e),j$=e=>ka(e)&&e.target?zy(e.target)?e.target.checked:e.target.value:e,wSe=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,$$=(e,t)=>e.has(wSe(t)),xSe=e=>{const t=e.constructor&&e.constructor.prototype;return ka(t)&&t.hasOwnProperty("isPrototypeOf")},DE=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Ja(e){let t;const r=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(DE&&(e instanceof Blob||e instanceof FileList))&&(r||ka(e)))if(t=r?[]:{},!r&&!xSe(e))t=e;else for(const i in e)e.hasOwnProperty(i)&&(t[i]=Ja(e[i]));else return e;return t}var Og=e=>Array.isArray(e)?e.filter(Boolean):[],Ro=e=>e===void 0,vn=(e,t,r)=>{if(!t||!ka(e))return r;const i=Og(t.split(/[,[\].]+?/)).reduce((o,a)=>ds(o)?o:o[a],e);return Ro(i)||i===e?Ro(e[t])?r:e[t]:i},vu=e=>typeof e=="boolean";const zb={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},yl={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Xu={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},_Se=Gn.createContext(null),Qx=()=>Gn.useContext(_Se);var F$=(e,t,r,i=!0)=>{const o={defaultValues:t._defaultValues};for(const a in e)Object.defineProperty(o,a,{get:()=>{const s=a;return t._proxyFormState[s]!==yl.all&&(t._proxyFormState[s]=!i||yl.all),r&&(r[s]=!0),e[s]}});return o},Vs=e=>ka(e)&&!Object.keys(e).length,z$=(e,t,r,i)=>{r(e);const{name:o,...a}=e;return Vs(a)||Object.keys(a).length>=Object.keys(t).length||Object.keys(a).find(s=>t[s]===(!i||yl.all))},Gs=e=>Array.isArray(e)?e:[e],H$=(e,t,r)=>!e||!t||e===t||Gs(e).some(i=>i&&(r?i===t:i.startsWith(t)||t.startsWith(i)));function Zx(e){const t=Gn.useRef(e);t.current=e,Gn.useEffect(()=>{const r=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{r&&r.unsubscribe()}},[e.disabled])}function SSe(e){const t=Qx(),{control:r=t.control,disabled:i,name:o,exact:a}=e||{},[s,l]=Gn.useState(r._formState),u=Gn.useRef(!0),c=Gn.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1}),d=Gn.useRef(o);return d.current=o,Zx({disabled:i,next:p=>u.current&&H$(d.current,p.name,a)&&z$(p,c.current,r._updateFormState)&&l({...r._formState,...p}),subject:r._subjects.state}),Gn.useEffect(()=>(u.current=!0,c.current.isValid&&r._updateValid(!0),()=>{u.current=!1}),[r]),F$(s,r,c.current,!1)}var bu=e=>typeof e=="string",W$=(e,t,r,i,o)=>bu(e)?(i&&t.watch.add(e),vn(r,e,o)):Array.isArray(e)?e.map(a=>(i&&t.watch.add(a),vn(r,a))):(i&&(t.watchAll=!0),r);function CSe(e){const t=Qx(),{control:r=t.control,name:i,defaultValue:o,disabled:a,exact:s}=e||{},l=Gn.useRef(i);l.current=i,Zx({disabled:a,subject:r._subjects.values,next:d=>{H$(l.current,d.name,s)&&c(Ja(W$(l.current,r._names,d.values||r._formValues,!1,o)))}});const[u,c]=Gn.useState(r._getWatch(i,o));return Gn.useEffect(()=>r._removeUnmounted()),u}var LE=e=>/^\w*$/.test(e),V$=e=>Og(e.replace(/["|']|\]/g,"").split(/\.|\[/));function Ao(e,t,r){let i=-1;const o=LE(t)?[t]:V$(t),a=o.length,s=a-1;for(;++i{const d=o._options.shouldUnregister||a,p=(v,x)=>{const b=vn(o._fields,v);b&&(b._f.mount=x)};if(p(r,!0),d){const v=Ja(vn(o._options.defaultValues,r));Ao(o._defaultValues,r,v),Ro(vn(o._formValues,r))&&Ao(o._formValues,r,v)}return()=>{(s?d&&!o._state.action:d)?o.unregister(r):p(r,!1)}},[r,o,s,a]),Gn.useEffect(()=>{vn(o._fields,r)&&o._updateDisabledField({disabled:i,fields:o._fields,name:r,value:vn(o._fields,r)._f.value})},[i,r,o]),{field:{name:r,value:l,...vu(i)||vu(u.disabled)?{disabled:u.disabled||i}:{},onChange:Gn.useCallback(d=>c.current.onChange({target:{value:j$(d),name:r},type:zb.CHANGE}),[r]),onBlur:Gn.useCallback(()=>c.current.onBlur({target:{value:vn(o._formValues,r),name:r},type:zb.BLUR}),[r,o]),ref:d=>{const p=vn(o._fields,r);p&&d&&(p._f.ref={focus:()=>d.focus(),select:()=>d.select(),setCustomValidity:v=>d.setCustomValidity(v),reportValidity:()=>d.reportValidity()})}},formState:u,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!vn(u.errors,r)},isDirty:{enumerable:!0,get:()=>!!vn(u.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!vn(u.touchedFields,r)},error:{enumerable:!0,get:()=>vn(u.errors,r)}})}}const ESe=e=>e.render(kSe(e));var ASe=(e,t,r,i,o)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[i]:o||!0}}:{},zc=()=>{const e=typeof performance>"u"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const r=(Math.random()*16+e)%16|0;return(t=="x"?r:r&3|8).toString(16)})},s3=(e,t,r={})=>r.shouldFocus||Ro(r.shouldFocus)?r.focusName||`${e}.${Ro(r.focusIndex)?t:r.focusIndex}.`:"",W4=e=>({isOnSubmit:!e||e===yl.onSubmit,isOnBlur:e===yl.onBlur,isOnChange:e===yl.onChange,isOnAll:e===yl.all,isOnTouch:e===yl.onTouched}),V4=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(i=>e.startsWith(i)&&/^\.\w+/.test(e.slice(i.length))));const d0=(e,t,r,i)=>{for(const o of r||Object.keys(e)){const a=vn(e,o);if(a){const{_f:s,...l}=a;if(s){if(s.refs&&s.refs[0]&&t(s.refs[0],o)&&!i)break;if(s.ref&&t(s.ref,s.name)&&!i)break}else ka(l)&&d0(l,t)}}};var q$=(e,t,r)=>{const i=Og(vn(e,r));return Ao(i,"root",t[r]),Ao(e,r,i),e},NE=e=>e.type==="file",od=e=>typeof e=="function",Hb=e=>{if(!DE)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},b1=e=>bu(e),jE=e=>e.type==="radio",Wb=e=>e instanceof RegExp;const DO={value:!1,isValid:!1},LO={value:!0,isValid:!0};var K$=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Ro(e[0].attributes.value)?Ro(e[0].value)||e[0].value===""?LO:{value:e[0].value,isValid:!0}:LO:DO}return DO};const NO={isValid:!1,value:null};var G$=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,NO):NO;function jO(e,t,r="validate"){if(b1(e)||Array.isArray(e)&&e.every(b1)||vu(e)&&!e)return{type:r,message:b1(e)?e:"",ref:t}}var zp=e=>ka(e)&&!Wb(e)?e:{value:e,message:""},q4=async(e,t,r,i,o)=>{const{ref:a,refs:s,required:l,maxLength:u,minLength:c,min:d,max:p,pattern:v,validate:x,name:b,valueAsNumber:y,mount:_,disabled:k}=e._f,E=vn(t,b);if(!_||k)return{};const B=s?s[0]:a,U=V=>{i&&B.reportValidity&&(B.setCustomValidity(vu(V)?"":V||""),B.reportValidity())},D={},j=jE(a),F=zy(a),H=j||F,W=(y||NE(a))&&Ro(a.value)&&Ro(E)||Hb(a)&&a.value===""||E===""||Array.isArray(E)&&!E.length,G=ASe.bind(null,b,r,D),ae=(V,oe,P,ee=Xu.maxLength,le=Xu.minLength)=>{const pe=V?oe:P;D[b]={type:V?ee:le,message:pe,ref:a,...G(V?ee:le,pe)}};if(o?!Array.isArray(E)||!E.length:l&&(!H&&(W||ds(E))||vu(E)&&!E||F&&!K$(s).isValid||j&&!G$(s).isValid)){const{value:V,message:oe}=b1(l)?{value:!!l,message:l}:zp(l);if(V&&(D[b]={type:Xu.required,message:oe,ref:B,...G(Xu.required,oe)},!r))return U(oe),D}if(!W&&(!ds(d)||!ds(p))){let V,oe;const P=zp(p),ee=zp(d);if(!ds(E)&&!isNaN(E)){const le=a.valueAsNumber||E&&+E;ds(P.value)||(V=le>P.value),ds(ee.value)||(oe=lenew Date(new Date().toDateString()+" "+ft),_e=a.type=="time",J=a.type=="week";bu(P.value)&&E&&(V=_e?pe(E)>pe(P.value):J?E>P.value:le>new Date(P.value)),bu(ee.value)&&E&&(oe=_e?pe(E)+V.value,ee=!ds(oe.value)&&E.length<+oe.value;if((P||ee)&&(ae(P,V.message,oe.message),!r))return U(D[b].message),D}if(v&&!W&&bu(E)){const{value:V,message:oe}=zp(v);if(Wb(V)&&!E.match(V)&&(D[b]={type:Xu.pattern,message:oe,ref:a,...G(Xu.pattern,oe)},!r))return U(oe),D}if(x){if(od(x)){const V=await x(E,t),oe=jO(V,B);if(oe&&(D[b]={...oe,...G(Xu.validate,oe.message)},!r))return U(oe.message),D}else if(ka(x)){let V={};for(const oe in x){if(!Vs(V)&&!r)break;const P=jO(await x[oe](E,t),B,oe);P&&(V={...P,...G(oe,P.message)},U(P.message),r&&(D[b]=V))}if(!Vs(V)&&(D[b]={ref:B,...V},!r))return D}}return U(!0),D};function l3(e,t){return[...e,...Gs(t)]}var u3=e=>Array.isArray(e)?e.map(()=>{}):void 0;function c3(e,t,r){return[...e.slice(0,t),...Gs(r),...e.slice(t)]}var d3=(e,t,r)=>Array.isArray(e)?(Ro(e[r])&&(e[r]=void 0),e.splice(r,0,e.splice(t,1)[0]),e):[];function f3(e,t){return[...Gs(t),...Gs(e)]}function TSe(e,t){let r=0;const i=[...e];for(const o of t)i.splice(o-r,1),r++;return Og(i).length?i:[]}var p3=(e,t)=>Ro(t)?[]:TSe(e,Gs(t).sort((r,i)=>r-i)),h3=(e,t,r)=>{e[t]=[e[r],e[r]=e[t]][0]};function ISe(e,t){const r=t.slice(0,-1).length;let i=0;for(;i(e[t]=r,e);function PSe(e){const t=Qx(),{control:r=t.control,name:i,keyName:o="id",shouldUnregister:a}=e,[s,l]=Gn.useState(r._getFieldArray(i)),u=Gn.useRef(r._getFieldArray(i).map(zc)),c=Gn.useRef(s),d=Gn.useRef(i),p=Gn.useRef(!1);d.current=i,c.current=s,r._names.array.add(i),e.rules&&r.register(i,e.rules),Zx({next:({values:D,name:j})=>{if(j===d.current||!j){const F=vn(D,d.current);Array.isArray(F)&&(l(F),u.current=F.map(zc))}},subject:r._subjects.array});const v=Gn.useCallback(D=>{p.current=!0,r._updateFieldArray(i,D)},[r,i]),x=(D,j)=>{const F=Gs(Ja(D)),H=l3(r._getFieldArray(i),F);r._names.focus=s3(i,H.length-1,j),u.current=l3(u.current,F.map(zc)),v(H),l(H),r._updateFieldArray(i,H,l3,{argA:u3(D)})},b=(D,j)=>{const F=Gs(Ja(D)),H=f3(r._getFieldArray(i),F);r._names.focus=s3(i,0,j),u.current=f3(u.current,F.map(zc)),v(H),l(H),r._updateFieldArray(i,H,f3,{argA:u3(D)})},y=D=>{const j=p3(r._getFieldArray(i),D);u.current=p3(u.current,D),v(j),l(j),r._updateFieldArray(i,j,p3,{argA:D})},_=(D,j,F)=>{const H=Gs(Ja(j)),W=c3(r._getFieldArray(i),D,H);r._names.focus=s3(i,D,F),u.current=c3(u.current,D,H.map(zc)),v(W),l(W),r._updateFieldArray(i,W,c3,{argA:D,argB:u3(j)})},k=(D,j)=>{const F=r._getFieldArray(i);h3(F,D,j),h3(u.current,D,j),v(F),l(F),r._updateFieldArray(i,F,h3,{argA:D,argB:j},!1)},E=(D,j)=>{const F=r._getFieldArray(i);d3(F,D,j),d3(u.current,D,j),v(F),l(F),r._updateFieldArray(i,F,d3,{argA:D,argB:j},!1)},B=(D,j)=>{const F=Ja(j),H=$O(r._getFieldArray(i),D,F);u.current=[...H].map((W,G)=>!W||G===D?zc():u.current[G]),v(H),l([...H]),r._updateFieldArray(i,H,$O,{argA:D,argB:F},!0,!1)},U=D=>{const j=Gs(Ja(D));u.current=j.map(zc),v([...j]),l([...j]),r._updateFieldArray(i,[...j],F=>F,{},!0,!1)};return Gn.useEffect(()=>{if(r._state.action=!1,V4(i,r._names)&&r._subjects.state.next({...r._formState}),p.current&&(!W4(r._options.mode).isOnSubmit||r._formState.isSubmitted))if(r._options.resolver)r._executeSchema([i]).then(D=>{const j=vn(D.errors,i),F=vn(r._formState.errors,i);(F?!j&&F.type||j&&(F.type!==j.type||F.message!==j.message):j&&j.type)&&(j?Ao(r._formState.errors,i,j):Ra(r._formState.errors,i),r._subjects.state.next({errors:r._formState.errors}))});else{const D=vn(r._fields,i);D&&D._f&&q4(D,r._formValues,r._options.criteriaMode===yl.all,r._options.shouldUseNativeValidation,!0).then(j=>!Vs(j)&&r._subjects.state.next({errors:q$(r._formState.errors,j,i)}))}r._subjects.values.next({name:i,values:{...r._formValues}}),r._names.focus&&d0(r._fields,(D,j)=>{if(r._names.focus&&j.startsWith(r._names.focus)&&D.focus)return D.focus(),1}),r._names.focus="",r._updateValid(),p.current=!1},[s,i,r]),Gn.useEffect(()=>(!vn(r._formValues,i)&&r._updateFieldArray(i),()=>{(r._options.shouldUnregister||a)&&r.unregister(i)}),[i,r,o,a]),{swap:Gn.useCallback(k,[v,i,r]),move:Gn.useCallback(E,[v,i,r]),prepend:Gn.useCallback(b,[v,i,r]),append:Gn.useCallback(x,[v,i,r]),remove:Gn.useCallback(y,[v,i,r]),insert:Gn.useCallback(_,[v,i,r]),update:Gn.useCallback(B,[v,i,r]),replace:Gn.useCallback(U,[v,i,r]),fields:Gn.useMemo(()=>s.map((D,j)=>({...D,[o]:u.current[j]||zc()})),[s,o])}}function g3(){let e=[];return{get observers(){return e},next:o=>{for(const a of e)a.next&&a.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(a=>a!==o)}}),unsubscribe:()=>{e=[]}}}var Vb=e=>ds(e)||!N$(e);function wf(e,t){if(Vb(e)||Vb(t))return e===t;if(ch(e)&&ch(t))return e.getTime()===t.getTime();const r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;for(const o of r){const a=e[o];if(!i.includes(o))return!1;if(o!=="ref"){const s=t[o];if(ch(a)&&ch(s)||ka(a)&&ka(s)||Array.isArray(a)&&Array.isArray(s)?!wf(a,s):a!==s)return!1}}return!0}var Y$=e=>e.type==="select-multiple",MSe=e=>jE(e)||zy(e),m3=e=>Hb(e)&&e.isConnected,Q$=e=>{for(const t in e)if(od(e[t]))return!0;return!1};function qb(e,t={}){const r=Array.isArray(e);if(ka(e)||r)for(const i in e)Array.isArray(e[i])||ka(e[i])&&!Q$(e[i])?(t[i]=Array.isArray(e[i])?[]:{},qb(e[i],t[i])):ds(e[i])||(t[i]=!0);return t}function Z$(e,t,r){const i=Array.isArray(e);if(ka(e)||i)for(const o in e)Array.isArray(e[o])||ka(e[o])&&!Q$(e[o])?Ro(t)||Vb(r[o])?r[o]=Array.isArray(e[o])?qb(e[o],[]):{...qb(e[o])}:Z$(e[o],ds(t)?{}:t[o],r[o]):r[o]=!wf(e[o],t[o]);return r}var y3=(e,t)=>Z$(e,t,qb(t)),X$=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:i})=>Ro(e)?e:t?e===""?NaN:e&&+e:r&&bu(e)?new Date(e):i?i(e):e;function v3(e){const t=e.ref;if(!(e.refs?e.refs.every(r=>r.disabled):t.disabled))return NE(t)?t.files:jE(t)?G$(e.refs).value:Y$(t)?[...t.selectedOptions].map(({value:r})=>r):zy(t)?K$(e.refs).value:X$(Ro(t.value)?e.ref.value:t.value,e)}var OSe=(e,t,r,i)=>{const o={};for(const a of e){const s=vn(t,a);s&&Ao(o,a,s._f)}return{criteriaMode:r,names:[...e],fields:o,shouldUseNativeValidation:i}},Im=e=>Ro(e)?e:Wb(e)?e.source:ka(e)?Wb(e.value)?e.value.source:e.value:e,BSe=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function FO(e,t,r){const i=vn(e,r);if(i||LE(r))return{error:i,name:r};const o=r.split(".");for(;o.length;){const a=o.join("."),s=vn(t,a),l=vn(e,a);if(s&&!Array.isArray(s)&&r!==a)return{name:r};if(l&&l.type)return{name:a,error:l};o.pop()}return{name:r}}var USe=(e,t,r,i,o)=>o.isOnAll?!1:!r&&o.isOnTouch?!(t||e):(r?i.isOnBlur:o.isOnBlur)?!e:(r?i.isOnChange:o.isOnChange)?e:!0,DSe=(e,t)=>!Og(vn(e,t)).length&&Ra(e,t);const LSe={mode:yl.onSubmit,reValidateMode:yl.onChange,shouldFocusError:!0};function NSe(e={},t){let r={...LSe,...e},i={submitCount:0,isDirty:!1,isLoading:od(r.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},errors:{},disabled:!1},o={},a=ka(r.defaultValues)||ka(r.values)?Ja(r.defaultValues||r.values)||{}:{},s=r.shouldUnregister?{}:Ja(a),l={action:!1,mount:!1,watch:!1},u={mount:new Set,unMount:new Set,array:new Set,watch:new Set},c,d=0;const p={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},v={values:g3(),array:g3(),state:g3()},x=e.resetOptions&&e.resetOptions.keepDirtyValues,b=W4(r.mode),y=W4(r.reValidateMode),_=r.criteriaMode===yl.all,k=fe=>Be=>{clearTimeout(d),d=setTimeout(fe,Be)},E=async fe=>{if(p.isValid||fe){const Be=r.resolver?Vs((await W()).errors):await ae(o,!0);Be!==i.isValid&&v.state.next({isValid:Be})}},B=fe=>p.isValidating&&v.state.next({isValidating:fe}),U=(fe,Be=[],rt,lt,jt=!0,ce=!0)=>{if(lt&&rt){if(l.action=!0,ce&&Array.isArray(vn(o,fe))){const ie=rt(vn(o,fe),lt.argA,lt.argB);jt&&Ao(o,fe,ie)}if(ce&&Array.isArray(vn(i.errors,fe))){const ie=rt(vn(i.errors,fe),lt.argA,lt.argB);jt&&Ao(i.errors,fe,ie),DSe(i.errors,fe)}if(p.touchedFields&&ce&&Array.isArray(vn(i.touchedFields,fe))){const ie=rt(vn(i.touchedFields,fe),lt.argA,lt.argB);jt&&Ao(i.touchedFields,fe,ie)}p.dirtyFields&&(i.dirtyFields=y3(a,s)),v.state.next({name:fe,isDirty:oe(fe,Be),dirtyFields:i.dirtyFields,errors:i.errors,isValid:i.isValid})}else Ao(s,fe,Be)},D=(fe,Be)=>{Ao(i.errors,fe,Be),v.state.next({errors:i.errors})},j=(fe,Be,rt,lt)=>{const jt=vn(o,fe);if(jt){const ce=vn(s,fe,Ro(rt)?vn(a,fe):rt);Ro(ce)||lt&<.defaultChecked||Be?Ao(s,fe,Be?ce:v3(jt._f)):le(fe,ce),l.mount&&E()}},F=(fe,Be,rt,lt,jt)=>{let ce=!1,ie=!1;const de={name:fe};if(!rt||lt){p.isDirty&&(ie=i.isDirty,i.isDirty=de.isDirty=oe(),ce=ie!==de.isDirty);const $=wf(vn(a,fe),Be);ie=vn(i.dirtyFields,fe),$?Ra(i.dirtyFields,fe):Ao(i.dirtyFields,fe,!0),de.dirtyFields=i.dirtyFields,ce=ce||p.dirtyFields&&ie!==!$}if(rt){const $=vn(i.touchedFields,fe);$||(Ao(i.touchedFields,fe,rt),de.touchedFields=i.touchedFields,ce=ce||p.touchedFields&&$!==rt)}return ce&&jt&&v.state.next(de),ce?de:{}},H=(fe,Be,rt,lt)=>{const jt=vn(i.errors,fe),ce=p.isValid&&vu(Be)&&i.isValid!==Be;if(e.delayError&&rt?(c=k(()=>D(fe,rt)),c(e.delayError)):(clearTimeout(d),c=null,rt?Ao(i.errors,fe,rt):Ra(i.errors,fe)),(rt?!wf(jt,rt):jt)||!Vs(lt)||ce){const ie={...lt,...ce&&vu(Be)?{isValid:Be}:{},errors:i.errors,name:fe};i={...i,...ie},v.state.next(ie)}B(!1)},W=async fe=>r.resolver(s,r.context,OSe(fe||u.mount,o,r.criteriaMode,r.shouldUseNativeValidation)),G=async fe=>{const{errors:Be}=await W(fe);if(fe)for(const rt of fe){const lt=vn(Be,rt);lt?Ao(i.errors,rt,lt):Ra(i.errors,rt)}else i.errors=Be;return Be},ae=async(fe,Be,rt={valid:!0})=>{for(const lt in fe){const jt=fe[lt];if(jt){const{_f:ce,...ie}=jt;if(ce){const de=u.array.has(ce.name),$=await q4(jt,s,_,r.shouldUseNativeValidation&&!Be,de);if($[ce.name]&&(rt.valid=!1,Be))break;!Be&&(vn($,ce.name)?de?q$(i.errors,$,ce.name):Ao(i.errors,ce.name,$[ce.name]):Ra(i.errors,ce.name))}ie&&await ae(ie,Be,rt)}}return rt.valid},V=()=>{for(const fe of u.unMount){const Be=vn(o,fe);Be&&(Be._f.refs?Be._f.refs.every(rt=>!m3(rt)):!m3(Be._f.ref))&&vr(fe)}u.unMount=new Set},oe=(fe,Be)=>(fe&&Be&&Ao(s,fe,Be),!wf(He(),a)),P=(fe,Be,rt)=>W$(fe,u,{...l.mount?s:Ro(Be)?a:bu(fe)?{[fe]:Be}:Be},rt,Be),ee=fe=>Og(vn(l.mount?s:a,fe,e.shouldUnregister?vn(a,fe,[]):[])),le=(fe,Be,rt={})=>{const lt=vn(o,fe);let jt=Be;if(lt){const ce=lt._f;ce&&(!ce.disabled&&Ao(s,fe,X$(Be,ce)),jt=Hb(ce.ref)&&ds(Be)?"":Be,Y$(ce.ref)?[...ce.ref.options].forEach(ie=>ie.selected=jt.includes(ie.value)):ce.refs?zy(ce.ref)?ce.refs.length>1?ce.refs.forEach(ie=>(!ie.defaultChecked||!ie.disabled)&&(ie.checked=Array.isArray(jt)?!!jt.find(de=>de===ie.value):jt===ie.value)):ce.refs[0]&&(ce.refs[0].checked=!!jt):ce.refs.forEach(ie=>ie.checked=ie.value===jt):NE(ce.ref)?ce.ref.value="":(ce.ref.value=jt,ce.ref.type||v.values.next({name:fe,values:{...s}})))}(rt.shouldDirty||rt.shouldTouch)&&F(fe,jt,rt.shouldTouch,rt.shouldDirty,!0),rt.shouldValidate&&Le(fe)},pe=(fe,Be,rt)=>{for(const lt in Be){const jt=Be[lt],ce=`${fe}.${lt}`,ie=vn(o,ce);(u.array.has(fe)||!Vb(jt)||ie&&!ie._f)&&!ch(jt)?pe(ce,jt,rt):le(ce,jt,rt)}},_e=(fe,Be,rt={})=>{const lt=vn(o,fe),jt=u.array.has(fe),ce=Ja(Be);Ao(s,fe,ce),jt?(v.array.next({name:fe,values:{...s}}),(p.isDirty||p.dirtyFields)&&rt.shouldDirty&&v.state.next({name:fe,dirtyFields:y3(a,s),isDirty:oe(fe,ce)})):lt&&!lt._f&&!ds(ce)?pe(fe,ce,rt):le(fe,ce,rt),V4(fe,u)&&v.state.next({...i}),v.values.next({name:fe,values:{...s}}),!l.mount&&t()},J=async fe=>{const Be=fe.target;let rt=Be.name,lt=!0;const jt=vn(o,rt),ce=()=>Be.type?v3(jt._f):j$(fe),ie=de=>{lt=Number.isNaN(de)||de===vn(s,rt,de)};if(jt){let de,$;const C=ce(),T=fe.type===zb.BLUR||fe.type===zb.FOCUS_OUT,Q=!BSe(jt._f)&&!r.resolver&&!vn(i.errors,rt)&&!jt._f.deps||USe(T,vn(i.touchedFields,rt),i.isSubmitted,y,b),ve=V4(rt,u,T);Ao(s,rt,C),T?(jt._f.onBlur&&jt._f.onBlur(fe),c&&c(0)):jt._f.onChange&&jt._f.onChange(fe);const je=F(rt,C,T,!1),ct=!Vs(je)||ve;if(!T&&v.values.next({name:rt,type:fe.type,values:{...s}}),Q)return p.isValid&&E(),ct&&v.state.next({name:rt,...ve?{}:je});if(!T&&ve&&v.state.next({...i}),B(!0),r.resolver){const{errors:ur}=await W([rt]);if(ie(C),lt){const Dr=FO(i.errors,o,rt),hr=FO(ur,o,Dr.name||rt);de=hr.error,rt=hr.name,$=Vs(ur)}}else de=(await q4(jt,s,_,r.shouldUseNativeValidation))[rt],ie(C),lt&&(de?$=!1:p.isValid&&($=await ae(o,!0)));lt&&(jt._f.deps&&Le(jt._f.deps),H(rt,$,de,je))}},ft=(fe,Be)=>{if(vn(i.errors,Be)&&fe.focus)return fe.focus(),1},Le=async(fe,Be={})=>{let rt,lt;const jt=Gs(fe);if(B(!0),r.resolver){const ce=await G(Ro(fe)?fe:jt);rt=Vs(ce),lt=fe?!jt.some(ie=>vn(ce,ie)):rt}else fe?(lt=(await Promise.all(jt.map(async ce=>{const ie=vn(o,ce);return await ae(ie&&ie._f?{[ce]:ie}:ie)}))).every(Boolean),!(!lt&&!i.isValid)&&E()):lt=rt=await ae(o);return v.state.next({...!bu(fe)||p.isValid&&rt!==i.isValid?{}:{name:fe},...r.resolver||!fe?{isValid:rt}:{},errors:i.errors,isValidating:!1}),Be.shouldFocus&&!lt&&d0(o,ft,fe?jt:u.mount),lt},He=fe=>{const Be={...a,...l.mount?s:{}};return Ro(fe)?Be:bu(fe)?vn(Be,fe):fe.map(rt=>vn(Be,rt))},nr=(fe,Be)=>({invalid:!!vn((Be||i).errors,fe),isDirty:!!vn((Be||i).dirtyFields,fe),isTouched:!!vn((Be||i).touchedFields,fe),error:vn((Be||i).errors,fe)}),Bt=fe=>{fe&&Gs(fe).forEach(Be=>Ra(i.errors,Be)),v.state.next({errors:fe?i.errors:{}})},Rt=(fe,Be,rt)=>{const lt=(vn(o,fe,{_f:{}})._f||{}).ref;Ao(i.errors,fe,{...Be,ref:lt}),v.state.next({name:fe,errors:i.errors,isValid:!1}),rt&&rt.shouldFocus&<&<.focus&<.focus()},Jt=(fe,Be)=>od(fe)?v.values.subscribe({next:rt=>fe(P(void 0,Be),rt)}):P(fe,Be,!0),vr=(fe,Be={})=>{for(const rt of fe?Gs(fe):u.mount)u.mount.delete(rt),u.array.delete(rt),Be.keepValue||(Ra(o,rt),Ra(s,rt)),!Be.keepError&&Ra(i.errors,rt),!Be.keepDirty&&Ra(i.dirtyFields,rt),!Be.keepTouched&&Ra(i.touchedFields,rt),!r.shouldUnregister&&!Be.keepDefaultValue&&Ra(a,rt);v.values.next({values:{...s}}),v.state.next({...i,...Be.keepDirty?{isDirty:oe()}:{}}),!Be.keepIsValid&&E()},At=({disabled:fe,name:Be,field:rt,fields:lt,value:jt})=>{if(vu(fe)){const ce=fe?void 0:Ro(jt)?v3(rt?rt._f:vn(lt,Be)._f):jt;Ao(s,Be,ce),F(Be,ce,!1,!1,!0)}},kt=(fe,Be={})=>{let rt=vn(o,fe);const lt=vu(Be.disabled);return Ao(o,fe,{...rt||{},_f:{...rt&&rt._f?rt._f:{ref:{name:fe}},name:fe,mount:!0,...Be}}),u.mount.add(fe),rt?At({field:rt,disabled:Be.disabled,name:fe}):j(fe,!0,Be.value),{...lt?{disabled:Be.disabled}:{},...r.progressive?{required:!!Be.required,min:Im(Be.min),max:Im(Be.max),minLength:Im(Be.minLength),maxLength:Im(Be.maxLength),pattern:Im(Be.pattern)}:{},name:fe,onChange:J,onBlur:J,ref:jt=>{if(jt){kt(fe,Be),rt=vn(o,fe);const ce=Ro(jt.value)&&jt.querySelectorAll&&jt.querySelectorAll("input,select,textarea")[0]||jt,ie=MSe(ce),de=rt._f.refs||[];if(ie?de.find($=>$===ce):ce===rt._f.ref)return;Ao(o,fe,{_f:{...rt._f,...ie?{refs:[...de.filter(m3),ce,...Array.isArray(vn(a,fe))?[{}]:[]],ref:{type:ce.type,name:fe}}:{ref:ce}}}),j(fe,!1,void 0,ce)}else rt=vn(o,fe,{}),rt._f&&(rt._f.mount=!1),(r.shouldUnregister||Be.shouldUnregister)&&!($$(u.array,fe)&&l.action)&&u.unMount.add(fe)}}},Ct=()=>r.shouldFocusError&&d0(o,ft,u.mount),Lt=fe=>{vu(fe)&&(v.state.next({disabled:fe}),d0(o,Be=>{Be.disabled=fe},0,!1))},Kt=(fe,Be)=>async rt=>{rt&&(rt.preventDefault&&rt.preventDefault(),rt.persist&&rt.persist());let lt=Ja(s);if(v.state.next({isSubmitting:!0}),r.resolver){const{errors:jt,values:ce}=await W();i.errors=jt,lt=ce}else await ae(o);Ra(i.errors,"root"),Vs(i.errors)?(v.state.next({errors:{}}),await fe(lt,rt)):(Be&&await Be({...i.errors},rt),Ct(),setTimeout(Ct)),v.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Vs(i.errors),submitCount:i.submitCount+1,errors:i.errors})},yr=(fe,Be={})=>{vn(o,fe)&&(Ro(Be.defaultValue)?_e(fe,vn(a,fe)):(_e(fe,Be.defaultValue),Ao(a,fe,Be.defaultValue)),Be.keepTouched||Ra(i.touchedFields,fe),Be.keepDirty||(Ra(i.dirtyFields,fe),i.isDirty=Be.defaultValue?oe(fe,vn(a,fe)):oe()),Be.keepError||(Ra(i.errors,fe),p.isValid&&E()),v.state.next({...i}))},ne=(fe,Be={})=>{const rt=fe?Ja(fe):a,lt=Ja(rt),jt=fe&&!Vs(fe)?lt:a;if(Be.keepDefaultValues||(a=rt),!Be.keepValues){if(Be.keepDirtyValues||x)for(const ce of u.mount)vn(i.dirtyFields,ce)?Ao(jt,ce,vn(s,ce)):_e(ce,vn(jt,ce));else{if(DE&&Ro(fe))for(const ce of u.mount){const ie=vn(o,ce);if(ie&&ie._f){const de=Array.isArray(ie._f.refs)?ie._f.refs[0]:ie._f.ref;if(Hb(de)){const $=de.closest("form");if($){$.reset();break}}}}o={}}s=e.shouldUnregister?Be.keepDefaultValues?Ja(a):{}:Ja(jt),v.array.next({values:{...jt}}),v.values.next({values:{...jt}})}u={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},!l.mount&&t(),l.mount=!p.isValid||!!Be.keepIsValid,l.watch=!!e.shouldUnregister,v.state.next({submitCount:Be.keepSubmitCount?i.submitCount:0,isDirty:Be.keepDirty?i.isDirty:!!(Be.keepDefaultValues&&!wf(fe,a)),isSubmitted:Be.keepIsSubmitted?i.isSubmitted:!1,dirtyFields:Be.keepDirtyValues?i.dirtyFields:Be.keepDefaultValues&&fe?y3(a,fe):{},touchedFields:Be.keepTouched?i.touchedFields:{},errors:Be.keepErrors?i.errors:{},isSubmitSuccessful:Be.keepIsSubmitSuccessful?i.isSubmitSuccessful:!1,isSubmitting:!1})},Mt=(fe,Be)=>ne(od(fe)?fe(s):fe,Be);return{control:{register:kt,unregister:vr,getFieldState:nr,handleSubmit:Kt,setError:Rt,_executeSchema:W,_getWatch:P,_getDirty:oe,_updateValid:E,_removeUnmounted:V,_updateFieldArray:U,_updateDisabledField:At,_getFieldArray:ee,_reset:ne,_resetDefaultValues:()=>od(r.defaultValues)&&r.defaultValues().then(fe=>{Mt(fe,r.resetOptions),v.state.next({isLoading:!1})}),_updateFormState:fe=>{i={...i,...fe}},_disableForm:Lt,_subjects:v,_proxyFormState:p,get _fields(){return o},get _formValues(){return s},get _state(){return l},set _state(fe){l=fe},get _defaultValues(){return a},get _names(){return u},set _names(fe){u=fe},get _formState(){return i},set _formState(fe){i=fe},get _options(){return r},set _options(fe){r={...r,...fe}}},trigger:Le,register:kt,handleSubmit:Kt,watch:Jt,setValue:_e,getValues:He,reset:Mt,resetField:yr,clearErrors:Bt,unregister:vr,setError:Rt,setFocus:(fe,Be={})=>{const rt=vn(o,fe),lt=rt&&rt._f;if(lt){const jt=lt.refs?lt.refs[0]:lt.ref;jt.focus&&(jt.focus(),Be.shouldSelect&&jt.select())}},getFieldState:nr}}function w1(e={}){const t=Gn.useRef(),r=Gn.useRef(),[i,o]=Gn.useState({isDirty:!1,isValidating:!1,isLoading:od(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},errors:{},disabled:!1,defaultValues:od(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...NSe(e,()=>o(s=>({...s}))),formState:i});const a=t.current.control;return a._options=e,Zx({subject:a._subjects.state,next:s=>{z$(s,a._proxyFormState,a._updateFormState,!0)&&o({...a._formState})}}),Gn.useEffect(()=>a._disableForm(e.disabled),[a,e.disabled]),Gn.useEffect(()=>{if(a._proxyFormState.isDirty){const s=a._getDirty();s!==i.isDirty&&a._subjects.state.next({isDirty:s})}},[a,i.isDirty]),Gn.useEffect(()=>{e.values&&!wf(e.values,r.current)?(a._reset(e.values,a._options.resetOptions),r.current=e.values):a._resetDefaultValues()},[e.values,a]),Gn.useEffect(()=>{a._state.mount||(a._updateValid(),a._state.mount=!0),a._state.watch&&(a._state.watch=!1,a._subjects.state.next({...a._formState})),a._removeUnmounted()}),t.current.formState=F$(i,a),t.current}function ic({label:e,name:t,control:r}){return L(ESe,{name:t,control:r,render:({field:i,fieldState:{error:o}})=>L(wh,{helperText:o?o.message:null,error:!!o,fullWidth:!0,label:e,variant:"outlined",...i})})}function jSe(e){return Vn.beginCell().storeUint(2003,32).storeUint(0,64).storeAddress(e).endCell()}function $Se(e){return Vn.beginCell().storeUint(3004,32).storeUint(0,64).storeAddress(e).endCell()}function FSe(e,t){return Vn.beginCell().storeUint(6007,32).storeUint(0,64).storeCoins(e).storeCoins(t).endCell()}function zSe(){const{data:e,isLoading:t}=Dy();kg();const r=fE(),i=w1({defaultValues:{admin:e?.admin||""}}),o=w1({defaultValues:{verifierRegistry:e?.verifierRegistry||""}}),a=w1({defaultValues:{minTon:e?.deploymentCosts.min||"",maxTon:e?.deploymentCosts.max||""}});async function s(c){if(!e?.address)throw new Error("no address");if(c.admin!==e?.admin)try{const d=$Se(Vn.Address.parse(c.admin));await r(e.address.toString(),Vn.toNano("0.01"),d)==="rejected"&&i.setError("admin",{message:"Failed to change admin"})}catch(d){let p="Failed to change admin";"message"in d&&(p=d.message),i.setError("admin",{message:p})}}async function l(c){if(!e?.address)throw new Error("no address");if(c.verifierRegistry!==e?.verifierRegistry)try{const d=jSe(Vn.Address.parse(c.verifierRegistry));await r(e.address.toString(),Vn.toNano("0.01"),d)==="rejected"&&o.setError("verifierRegistry",{message:"Failed to change verifier registry"})}catch(d){let p="Failed to change verifier registry";"message"in d&&(p=d.message),o.setError("verifierRegistry",{message:p})}}async function u(c){if(!e?.address)throw new Error("no address");if(c.minTon!==e?.deploymentCosts.min||c.maxTon!==e?.deploymentCosts.max)try{const d=FSe(Vn.toNano(c.minTon),Vn.toNano(c.maxTon));await r(e.address.toString(),Vn.toNano("0.01"),d)==="rejected"&&a.setError("root",{message:"Failed to change deployment costs"})}catch(d){let p="Failed to change deployment costs";"message"in d&&(p=d.message),a.setError("root",{message:p})}}return X.exports.useEffect(()=>{e&&(i.reset({admin:e.admin}),o.reset({verifierRegistry:e.verifierRegistry}),a.reset({minTon:e.deploymentCosts.min,maxTon:e.deploymentCosts.max}))},[e]),Ut(xs,{spacing:4,p:4,children:[L("h1",{children:"Sources Registry"}),t&&L(lg,{}),e&&Ut(ta,{children:[L(UE,{label:"Address",data:e.address.toString()}),L("form",{id:"adminForm",onSubmit:i.handleSubmit(s),children:Ut(xs,{spacing:2,children:[!i.formState.isValid&&L(d1,{severity:"error",children:Object.entries(i.formState.errors).map(([c,d])=>L("div",{children:d.message},c))}),Ut(xs,{direction:"row",spacing:2,alignItems:"center",children:[L(ic,{...i.register("admin"),control:i.control,label:"Admin"}),L(nd,{text:"Save",type:"submit",disabled:!i.formState.isDirty})]})]})}),L("form",{id:"verifierRegistryForm",onSubmit:o.handleSubmit(l),children:Ut(xs,{spacing:2,children:[!o.formState.isValid&&L(d1,{severity:"error",children:Object.entries(o.formState.errors).map(([c,d])=>L("div",{children:d.message},c))}),Ut(xs,{direction:"row",spacing:2,alignItems:"center",children:[L(ic,{...o.register("verifierRegistry"),control:o.control,label:"Verifier Reg."}),L(nd,{text:"Save",type:"submit",disabled:!o.formState.isDirty})]})]})}),L("form",{id:"sourcesRegistryForm",onSubmit:a.handleSubmit(u),children:Ut(xs,{spacing:2,children:[!a.formState.isValid&&L(d1,{severity:"error",children:Object.entries(a.formState.errors).map(([c,d])=>L("div",{children:d.message},c))}),Ut(xs,{direction:"row",spacing:2,alignItems:"center",children:[L(ic,{...a.register("minTon"),control:a.control,label:"Min Ton"}),L(ic,{...a.register("maxTon"),control:a.control,label:"Max Ton"}),L(nd,{text:"Save",type:"submit",disabled:!a.formState.isDirty})]})]})})]})]})}const J$={removeVerifier:435836471,updateVerifier:1610798618,forwardMessage:1965127512};function zO(e){return Ib(V1e(e))}function HSe(e){let t=e.split(".");return((+t[0]*256+ +t[1])*256+ +t[2])*256+ +t[3]}function WSe(){return{serialize:(e,t)=>{t.storeSlice(e)},parse:e=>e}}function VSe(e){let t=Vn.beginCell();t.storeUint(J$.updateVerifier,32),t.storeUint(e.queryId||0,64),t.storeUint(e.id,256),t.storeUint(e.quorum,8);let r=Vn.Dictionary.empty(Vn.Dictionary.Keys.BigUint(256),WSe());return e.endpoints.forEach(function(i,o){r.set(o,Vn.beginCell().storeUint(i,32).endCell().beginParse())}),t.storeDict(r),t.storeRef(Vn.beginCell().storeBuffer(Buffer.from(e.name)).endCell()),t.storeRef(Vn.beginCell().storeBuffer(Buffer.from(e.marketingUrl)).endCell()),t.endCell()}function qSe(e){let t=Vn.beginCell();return t.storeUint(J$.removeVerifier,32),t.storeUint(e.queryId||0,64),t.storeUint(e.id,256),t.endCell()}function HO({verifier:e,altColor:t,isNew:r}){const i=fE(),{data:o}=Dy(),a=X.exports.useMemo(()=>Object.entries(e.pubKeyEndpoints).map(([p,v])=>({pubKey:p,ip:v})),[e.pubKeyEndpoints]),s=w1({defaultValues:{quorum:e.quorum.toString()||"",name:e.name||"",url:e.url||"",pubKeyEndpoints:a||[]},mode:"onChange"});async function l(p){if(!p.name){s.setError("name",{message:"Name is required"});return}if(!p.url){s.setError("url",{message:"Url is required"});return}if(!p.quorum||Number(p.quorum)<1){s.setError("quorum",{message:"Quorum is required and should be at least 1"});return}try{await i(o?.verifierRegistry??"",Vn.toNano(r?"1000":"0.01"),VSe({id:zO(p.name),quorum:Number(p.quorum),endpoints:new Map(p.pubKeyEndpoints.map(({pubKey:x,ip:b})=>[Ib(Buffer.from(x,"base64")),HSe(b)])),name:p.name,marketingUrl:p.url}))==="rejected"&&s.setError("root",{message:`Failed to update config of ${p.name}`})}catch(v){let x=`Failed to update config of ${p.name}`;"message"in v&&(x=v.message),s.setError("root",{message:x})}}const{fields:u,append:c,remove:d}=PSe({control:s.control,name:"pubKeyEndpoints"});return L("form",{id:e.admin.toString(),onSubmit:s.handleSubmit(l),children:Ut(xs,{spacing:4,px:4,py:6,style:{backgroundColor:t?"#eeeeef":"transparent"},children:[!s.formState.isValid&&L(d1,{severity:"error",children:Object.entries(s.formState.errors).map(([p,v])=>L("div",{children:v.message},p))}),Ut(xs,{flexDirection:"row",alignItems:"center",gap:2,children:[L("h3",{style:{margin:0},children:r?"Add Verifier":s.getValues("name")}),!r&&L(nd,{text:"Remove",onClick:()=>{i(o.verifierRegistry,Vn.toNano("0.01"),qSe({id:zO(s.getValues("name"))}))}})]}),L(UE,{label:"Admin",data:e.admin.toString()}),r&&L(ic,{label:"Name",name:"name",control:s.control}),L(ic,{label:"Url",name:"url",control:s.control}),L(ic,{label:"Quorum",name:"quorum",control:s.control}),Ut(xs,{spacing:2,alignItems:"flex-start",children:[Ut(xs,{direction:"row",spacing:4,alignItems:"center",children:[L("h4",{children:"Public Key Endpoints"}),L(nd,{size:"small",text:"Add",onClick:()=>{c({pubKey:"",ip:""})}})]}),u.map((p,v)=>Ut(Cv,{container:!0,alignItems:"center",gap:2,wrap:"nowrap",children:[L(Cv,{item:!0,xs:6,children:L(ic,{label:`PubKey-${v}`,name:`pubKeyEndpoints.${v}.pubKey`,control:s.control})}),L(Cv,{item:!0,xs:5,children:L(ic,{label:`IP-${v}`,name:`pubKeyEndpoints.${v}.ip`,control:s.control})}),L(Cv,{item:!0,xs:1,children:L(nd,{text:"Remove",onClick:()=>d(v)})})]},p.id))]}),L(nd,{text:r?"Add verifier":"Update config",type:"submit",disabled:!s.formState.isDirty})]})})}function KSe(){const{data:e,isLoading:t}=zx(),{data:r}=Dy(),[i]=kg();return Ut(xs,{spacing:4,p:4,children:[L("h1",{children:"Verifier Registry"}),L(UE,{label:"Address",data:r?.verifierRegistry??""}),t&&L(lg,{}),Ut(xs,{children:[t&&"Loading...",e?.map((o,a)=>L(HO,{verifier:o,altColor:a%2!==1,isNew:!1}))]}),i.account?.address&&L(HO,{isNew:!0,altColor:!0,verifier:{admin:Vn.Address.parse(i.account?.address),name:"",quorum:0,url:"",pubKeyEndpoints:{}}})]})}function GSe(){return Ut("div",{children:[window.isTestnet&&L(BE,{}),Ut(xs,{direction:"row",justifyContent:"space-between",alignItems:"center",p:4,children:[L("h1",{children:"Admin"}),L(Ux,{})]}),L(zSe,{}),L(KSe,{}),L(Fb,{})]})}const YSe=sr(kn)(({theme:e})=>t=>({display:t.isMobile?"flex":"inherit",alignItems:t.isMobile?"center":"inherit",fontWight:700,color:"#fff",height:t.isMobile?90:100,background:"#fff",borderBottomLeftRadius:e.spacing(6),borderBottomRightRadius:e.spacing(6),border:"0.5px solid rgba(114, 138, 150, 0.24)",boxShadow:"rgb(114 138 150 / 8%) 0px 2px 16px"}));function QSe(){const e=la(),t=aa(e.breakpoints.down("md")),r=aa(e.breakpoints.down("lg"));return L(YSe,{px:r?3.4:0,isMobile:t,children:Ut(IL,{mb:5,children:[Ut(ap,{children:[L("img",{src:vw,width:30,height:30,alt:"App icon"}),L(cx,{children:"TACT DEPLOYER"})]}),Ut(TL,{children:[L($n,{mr:t?0:2,children:L(Ux,{})}),!t&&Ut(ap,{href:$6,target:"_blank",children:[L("img",{src:ZC,alt:"Github icon",width:20,height:20}),L(xk,{children:"GitHub"})]})]})]})})}const ZSe=sr("input")({display:"flex",alignItems:"center",paddingLeft:14,boxSizing:"border-box",height:34,background:"#FFFFFF",border:"1px solid #D8D8D8",borderRadius:"12px",fontSize:14,fontFamily:"Mulish",outline:"none","&:hover":{border:"1px solid #b0b0b0"},"&:focus":{border:"1px solid #807e7e"}}),XSe=Vn.Cell.fromBoc(Buffer.from("te6cckEBAQEADgAAGJRqmLYAAAAAAAAAAOnNeQ0=","base64"))[0];async function b3(e){const t=`https://tact-deployer${window.isTestnet?"-testnet":""}.infura-ipfs.io`;return fetch(`${t}/ipfs/${e}`)}function $E({workchain:e}){const{ipfsHash:t}=xU(),{data:r,error:i,isLoading:o}=bc(["tactDeploy",t],async()=>{if(!t)return null;const a=await yp(),s=await b3(t).then(_=>_.json()),l=await b3(s.pkg).then(_=>_.json()),u=await b3(s.dataCell).then(_=>_.arrayBuffer()).then(_=>Vn.Cell.fromBoc(Buffer.from(_))[0]),c=Vn.Cell.fromBoc(Buffer.from(l.code,"base64"))[0],d=Vn.contractAddress(e,{code:c,data:u}),p={code:c,data:u},v=u.hash().toString("base64"),x=c.hash().toString("base64"),b=await a.isContractDeployed(d),y=b&&await pE(x);return{address:d,stateInit:p,pkg:l,codeCellHash:x,dataCellHash:v,isDeployed:b,hasProof:y}});return{data:r,error:i,isLoading:o}}function JSe(e,t,r){const{sendTXN:i,data:o,clearTXN:a}=tj("deployContract",async s=>{if(!r)throw new Error("No address");const l=await yp();return s>20?"error":await l.isContractDeployed(r)?"success":"issued"});return{sendTXN:()=>{!r||i(r,Vn.toNano(e),XSe,t)},status:o.status,clearTXN:a}}function e4e(){const e=[],{data:t,error:r}=$E({workchain:0});return t&&(e.push({title:"Name",value:t.pkg.name}),e.push({title:"Compiler",value:`Tact ${t.pkg.compiler.version}`}),e.push({title:"Code Hash",value:t.codeCellHash}),e.push({title:"Data Hash",value:t.dataCellHash}),e.push({title:"Workchain",value:Rj(t.address.toString())})),L(SE,{title:"Contract",icon:_E,dataRows:e,isLoading:!1,isFlexibleWrapper:!0})}function t4e(){const[e,t]=X.exports.useState("0.5"),{data:r,error:i}=$E({workchain:0}),{sendTXN:o,status:a}=JSe(e,r?.stateInit,r?.address),{markPreloaded:s}=Aj(),l=Ac(),u=zu();let c="";if(i)c=i.toString();else if(r?.isDeployed)c=Ut("div",{children:["Contract is already deployed.",!r.hasProof&&" You can publish its sources to verify it."]});else switch(a){case"initial":c="Contract is ready for deployment";break;case"pending":c="Please approve the transaction in your wallet";break;case"issued":c="Transaction was issued. Monitoring deployment...";break;case"rejected":c="Transaction was rejected. Please retry.";break;case"error":c="Transaction failed. Please retry.";break;case"expired":c="Transaction expired. Please retry.";break;case"success":c="Contract deployed successfully! You can now publish its sources to verify it.";break}let d=Ut(Ha,{disabled:a==="pending"||a==="issued"||r?.isDeployed,fontSize:14,fontWeight:800,textColor:"#fff",height:44,width:144,background:"#1976d2",hoverBackground:"#156cc2",onClick:()=>{o()},children:[(a==="pending"||a==="issued")&&L(lg,{sx:{color:"#fff",height:"20px !important",width:"20px !important"}}),"Deploy"]});return(a==="success"||r?.isDeployed&&!r.hasProof)&&(d=L(Ha,{fontSize:14,fontWeight:800,textColor:"#fff",height:44,width:144,background:"#1976d2",hoverBackground:"#156cc2",onClick:()=>{s(),l("/"+r.address.toString()),u.addFiles([new File([JSON.stringify(r.pkg)],r.pkg.name+".pkg",{type:"text/plain"})])},children:"Verify"})),Ut(ug,{mb:6,children:[Ut($n,{p:"30px 24px 0 24px",children:[L(cg,{children:L("img",{src:_E,alt:"publish icon",width:41,height:41})}),L(Fd,{children:"Deploy"})]}),Ut(kn,{children:[Ut(kn,{sx:{padding:"0 30px"},children:[Ut(wE,{gap:2,sx:{mt:2},children:[L(Cc,{children:L("div",{children:"Value to initialize contract (TON)"})}),L(Cc,{children:L(ZSe,{disabled:!!r?.isDeployed||a==="issued"||a=="pending",value:e,type:"number",onChange:p=>{t(p.target.value)}})})]}),L(Cs,{type:ps.HINT,title:L(ta,{}),notificationBody:L($n,{sx:{overflow:"auto",maxHeight:300},children:Ut(Dd,{sx:{marginBottom:0},children:[L(kn,{sx:{fontWeight:600},children:"Contract Address"}),L(kn,{sx:{fontSize:18,fontWeight:700,wordBreak:"break-all"},children:r?.address.toString()})]})})}),L(Cs,{type:ps.INFO,title:L(ta,{}),notificationBody:L($n,{sx:{overflow:"auto",maxHeight:300},children:L(Dd,{sx:{marginBottom:0},children:c})})}),d]}),L($n,{mb:3,sx:{justifyContent:"center"}})]})]})}function r4e(){const e=la(),t=aa(e.breakpoints.down("md")),r=aa(e.breakpoints.down("lg")),{data:i,error:o,isLoading:a}=$E({workchain:0});return Ut(kn,{children:[window.isTestnet&&L(BE,{}),L(QSe,{}),Ut(U$,{px:r?"20px":0,children:[a&&Ut(Cc,{sx:{marginTop:3},children:[L(Xa,{height:330,variant:"rounded",sx:{marginBottom:3}}),L(Xa,{height:280,variant:"rounded"})]}),!a&&Ut(ta,{children:[L(D$,{isMobile:t,children:L(e4e,{})}),L(t4e,{})]})]}),")",L(Fb,{})]})}const n4e=new KH({defaultOptions:{queries:{refetchOnWindowFocus:!1}}});P1e();yS.createRoot(document.getElementById("root")).render(L(ope,{maxSnack:3,children:L(BQ,{theme:bSe,children:L(Rq,{client:n4e,children:L(uve,{manifestUrl:"https://verifier.ton.org/tonconnect-manifest.json",children:L(HK,{basename:"/",children:Ut(FK,{children:[L(Hp,{path:"/interact",element:L(vSe,{})}),L(Hp,{path:"/admin",element:L(GSe,{})}),L(Hp,{path:"/tactDeployer/:ipfsHash",element:L(r4e,{})}),L(Hp,{path:"/:contractAddress",element:L(UO,{})}),L(Hp,{path:"/",element:L(UO,{})})]})})})})})}));export{Kb as g}; + `},w_e={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:r}=e;return r?"Draggable item "+t.id+" was moved over droppable area "+r.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:r}=e;return r?"Draggable item "+t.id+" was dropped over droppable area "+r.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function x_e(e){let{announcements:t=w_e,container:r,hiddenTextDescribedById:i,screenReaderInstructions:o=b_e}=e;const{announce:a,announcement:s}=m_e(),l=$y("DndLiveRegion"),[u,c]=X.exports.useState(!1);if(X.exports.useEffect(()=>{c(!0)},[]),y_e(X.exports.useMemo(()=>({onDragStart(p){let{active:v}=p;a(t.onDragStart({active:v}))},onDragMove(p){let{active:v,over:x}=p;t.onDragMove&&a(t.onDragMove({active:v,over:x}))},onDragOver(p){let{active:v,over:x}=p;a(t.onDragOver({active:v,over:x}))},onDragEnd(p){let{active:v,over:x}=p;a(t.onDragEnd({active:v,over:x}))},onDragCancel(p){let{active:v,over:x}=p;a(t.onDragCancel({active:v,over:x}))}}),[a,t])),!u)return null;const d=Ut(ta,{children:[L(p_e,{id:i,value:o.draggable}),L(g_e,{id:l,announcement:s})]});return r?ml.exports.createPortal(d,r):d}var xa;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(xa||(xa={}));function Nb(){}function J5(e,t){return X.exports.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function __e(){for(var e=arguments.length,t=new Array(e),r=0;r[...t].filter(i=>i!=null),[...t])}const eu=Object.freeze({x:0,y:0});function o$(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function a$(e,t){let{data:{value:r}}=e,{data:{value:i}}=t;return r-i}function S_e(e,t){let{data:{value:r}}=e,{data:{value:i}}=t;return i-r}function hO(e){let{left:t,top:r,height:i,width:o}=e;return[{x:t,y:r},{x:t+o,y:r},{x:t,y:r+i},{x:t+o,y:r+i}]}function s$(e,t){if(!e||e.length===0)return null;const[r]=e;return t?r[t]:r}function gO(e,t,r){return t===void 0&&(t=e.left),r===void 0&&(r=e.top),{x:t+e.width*.5,y:r+e.height*.5}}const C_e=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:i}=e;const o=gO(t,t.left,t.top),a=[];for(const s of i){const{id:l}=s,u=r.get(l);if(u){const c=o$(gO(u),o);a.push({id:l,data:{droppableContainer:s,value:c}})}}return a.sort(a$)},k_e=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:i}=e;const o=hO(t),a=[];for(const s of i){const{id:l}=s,u=r.get(l);if(u){const c=hO(u),d=o.reduce((v,x,b)=>v+o$(c[b],x),0),p=Number((d/4).toFixed(4));a.push({id:l,data:{droppableContainer:s,value:p}})}}return a.sort(a$)};function E_e(e,t){const r=Math.max(t.top,e.top),i=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),a=Math.min(t.top+t.height,e.top+e.height),s=o-i,l=a-r;if(i{let{collisionRect:t,droppableRects:r,droppableContainers:i}=e;const o=[];for(const a of i){const{id:s}=a,l=r.get(s);if(l){const u=E_e(l,t);u>0&&o.push({id:s,data:{droppableContainer:a,value:u}})}}return o.sort(S_e)};function T_e(e,t,r){return{...e,scaleX:t&&r?t.width/r.width:1,scaleY:t&&r?t.height/r.height:1}}function l$(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:eu}function I_e(e){return function(r){for(var i=arguments.length,o=new Array(i>1?i-1:0),a=1;a({...s,top:s.top+e*l.y,bottom:s.bottom+e*l.y,left:s.left+e*l.x,right:s.right+e*l.x}),{...r})}}const R_e=I_e(1);function P_e(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function M_e(e,t,r){const i=P_e(t);if(!i)return e;const{scaleX:o,scaleY:a,x:s,y:l}=i,u=e.left-s-(1-o)*parseFloat(r),c=e.top-l-(1-a)*parseFloat(r.slice(r.indexOf(" ")+1)),d=o?e.width/o:e.width,p=a?e.height/a:e.height;return{width:d,height:p,top:c,right:u+d,bottom:c+p,left:u}}const O_e={ignoreTransform:!1};function Mg(e,t){t===void 0&&(t=O_e);let r=e.getBoundingClientRect();if(t.ignoreTransform){const{getComputedStyle:c}=Ds(e),{transform:d,transformOrigin:p}=c(e);d&&(r=M_e(r,d,p))}const{top:i,left:o,width:a,height:s,bottom:l,right:u}=r;return{top:i,left:o,width:a,height:s,bottom:l,right:u}}function mO(e){return Mg(e,{ignoreTransform:!0})}function B_e(e){const t=e.innerWidth,r=e.innerHeight;return{top:0,left:0,right:t,bottom:r,width:t,height:r}}function U_e(e,t){return t===void 0&&(t=Ds(e).getComputedStyle(e)),t.position==="fixed"}function D_e(e,t){t===void 0&&(t=Ds(e).getComputedStyle(e));const r=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(o=>{const a=t[o];return typeof a=="string"?r.test(a):!1})}function Kx(e,t){const r=[];function i(o){if(t!=null&&r.length>=t||!o)return r;if(TE(o)&&o.scrollingElement!=null&&!r.includes(o.scrollingElement))return r.push(o.scrollingElement),r;if(!Ny(o)||i_e(o)||r.includes(o))return r;const{getComputedStyle:a}=Ds(o),s=a(o);return o!==e&&D_e(o,s)&&r.push(o),U_e(o,s)?r:i(o.parentNode)}return e?i(e):r}function u$(e){const[t]=Kx(e,1);return t??null}function e3(e){return!qx||!e?null:Rg(e)?e:AE(e)?TE(e)||e===Pg(e).scrollingElement?window:Ny(e)?e:null:null}function c$(e){return Rg(e)?e.scrollX:e.scrollLeft}function d$(e){return Rg(e)?e.scrollY:e.scrollTop}function $4(e){return{x:c$(e),y:d$(e)}}var Ma;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(Ma||(Ma={}));function f$(e){return!qx||!e?!1:e===document.scrollingElement}function p$(e){const t={x:0,y:0},r=f$(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},i={x:e.scrollWidth-r.width,y:e.scrollHeight-r.height},o=e.scrollTop<=t.y,a=e.scrollLeft<=t.x,s=e.scrollTop>=i.y,l=e.scrollLeft>=i.x;return{isTop:o,isLeft:a,isBottom:s,isRight:l,maxScroll:i,minScroll:t}}const L_e={x:.2,y:.2};function N_e(e,t,r,i,o){let{top:a,left:s,right:l,bottom:u}=r;i===void 0&&(i=10),o===void 0&&(o=L_e);const{isTop:c,isBottom:d,isLeft:p,isRight:v}=p$(e),x={x:0,y:0},b={x:0,y:0},y={height:t.height*o.y,width:t.width*o.x};return!c&&a<=t.top+y.height?(x.y=Ma.Backward,b.y=i*Math.abs((t.top+y.height-a)/y.height)):!d&&u>=t.bottom-y.height&&(x.y=Ma.Forward,b.y=i*Math.abs((t.bottom-y.height-u)/y.height)),!v&&l>=t.right-y.width?(x.x=Ma.Forward,b.x=i*Math.abs((t.right-y.width-l)/y.width)):!p&&s<=t.left+y.width&&(x.x=Ma.Backward,b.x=i*Math.abs((t.left+y.width-s)/y.width)),{direction:x,speed:b}}function j_e(e){if(e===document.scrollingElement){const{innerWidth:a,innerHeight:s}=window;return{top:0,left:0,right:a,bottom:s,width:a,height:s}}const{top:t,left:r,right:i,bottom:o}=e.getBoundingClientRect();return{top:t,left:r,right:i,bottom:o,width:e.clientWidth,height:e.clientHeight}}function h$(e){return e.reduce((t,r)=>_h(t,$4(r)),eu)}function $_e(e){return e.reduce((t,r)=>t+c$(r),0)}function F_e(e){return e.reduce((t,r)=>t+d$(r),0)}function z_e(e,t){if(t===void 0&&(t=Mg),!e)return;const{top:r,left:i,bottom:o,right:a}=t(e);!u$(e)||(o<=0||a<=0||r>=window.innerHeight||i>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const H_e=[["x",["left","right"],$_e],["y",["top","bottom"],F_e]];class PE{constructor(t,r){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const i=Kx(r),o=h$(i);this.rect={...t},this.width=t.width,this.height=t.height;for(const[a,s,l]of H_e)for(const u of s)Object.defineProperty(this,u,{get:()=>{const c=l(i),d=o[a]-c;return this.rect[u]+d},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class l0{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(r=>{var i;return(i=this.target)==null?void 0:i.removeEventListener(...r)})},this.target=t}add(t,r,i){var o;(o=this.target)==null||o.addEventListener(t,r,i),this.listeners.push([t,r,i])}}function W_e(e){const{EventTarget:t}=Ds(e);return e instanceof t?e:Pg(e)}function t3(e,t){const r=Math.abs(e.x),i=Math.abs(e.y);return typeof t=="number"?Math.sqrt(r**2+i**2)>t:"x"in t&&"y"in t?r>t.x&&i>t.y:"x"in t?r>t.x:"y"in t?i>t.y:!1}var pl;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(pl||(pl={}));function yO(e){e.preventDefault()}function V_e(e){e.stopPropagation()}var zi;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter"})(zi||(zi={}));const g$={start:[zi.Space,zi.Enter],cancel:[zi.Esc],end:[zi.Space,zi.Enter]},q_e=(e,t)=>{let{currentCoordinates:r}=t;switch(e.code){case zi.Right:return{...r,x:r.x+25};case zi.Left:return{...r,x:r.x-25};case zi.Down:return{...r,y:r.y+25};case zi.Up:return{...r,y:r.y-25}}};class ME{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:r}}=t;this.props=t,this.listeners=new l0(Pg(r)),this.windowListeners=new l0(Ds(r)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(pl.Resize,this.handleCancel),this.windowListeners.add(pl.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(pl.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:r}=this.props,i=t.node.current;i&&z_e(i),r(eu)}handleKeyDown(t){if(RE(t)){const{active:r,context:i,options:o}=this.props,{keyboardCodes:a=g$,coordinateGetter:s=q_e,scrollBehavior:l="smooth"}=o,{code:u}=t;if(a.end.includes(u)){this.handleEnd(t);return}if(a.cancel.includes(u)){this.handleCancel(t);return}const{collisionRect:c}=i.current,d=c?{x:c.left,y:c.top}:eu;this.referenceCoordinates||(this.referenceCoordinates=d);const p=s(t,{active:r,context:i.current,currentCoordinates:d});if(p){const v=oy(p,d),x={x:0,y:0},{scrollableAncestors:b}=i.current;for(const y of b){const _=t.code,{isTop:k,isRight:E,isLeft:B,isBottom:U,maxScroll:D,minScroll:j}=p$(y),F=j_e(y),H={x:Math.min(_===zi.Right?F.right-F.width/2:F.right,Math.max(_===zi.Right?F.left:F.left+F.width/2,p.x)),y:Math.min(_===zi.Down?F.bottom-F.height/2:F.bottom,Math.max(_===zi.Down?F.top:F.top+F.height/2,p.y))},W=_===zi.Right&&!E||_===zi.Left&&!B,G=_===zi.Down&&!U||_===zi.Up&&!k;if(W&&H.x!==p.x){const ae=y.scrollLeft+v.x,V=_===zi.Right&&ae<=D.x||_===zi.Left&&ae>=j.x;if(V&&!v.y){y.scrollTo({left:ae,behavior:l});return}V?x.x=y.scrollLeft-ae:x.x=_===zi.Right?y.scrollLeft-D.x:y.scrollLeft-j.x,x.x&&y.scrollBy({left:-x.x,behavior:l});break}else if(G&&H.y!==p.y){const ae=y.scrollTop+v.y,V=_===zi.Down&&ae<=D.y||_===zi.Up&&ae>=j.y;if(V&&!v.x){y.scrollTo({top:ae,behavior:l});return}V?x.y=y.scrollTop-ae:x.y=_===zi.Down?y.scrollTop-D.y:y.scrollTop-j.y,x.y&&y.scrollBy({top:-x.y,behavior:l});break}}this.handleMove(t,_h(oy(p,this.referenceCoordinates),x))}}}handleMove(t,r){const{onMove:i}=this.props;t.preventDefault(),i(r)}handleEnd(t){const{onEnd:r}=this.props;t.preventDefault(),this.detach(),r()}handleCancel(t){const{onCancel:r}=this.props;t.preventDefault(),this.detach(),r()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}ME.activators=[{eventName:"onKeyDown",handler:(e,t,r)=>{let{keyboardCodes:i=g$,onActivation:o}=t,{active:a}=r;const{code:s}=e.nativeEvent;if(i.start.includes(s)){const l=a.activatorNode.current;return l&&e.target!==l?!1:(e.preventDefault(),o?.({event:e.nativeEvent}),!0)}return!1}}];function vO(e){return Boolean(e&&"distance"in e)}function bO(e){return Boolean(e&&"delay"in e)}class OE{constructor(t,r,i){var o;i===void 0&&(i=W_e(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=r;const{event:a}=t,{target:s}=a;this.props=t,this.events=r,this.document=Pg(s),this.documentListeners=new l0(this.document),this.listeners=new l0(i),this.windowListeners=new l0(Ds(s)),this.initialCoordinates=(o=j4(a))!=null?o:eu,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:r}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),this.windowListeners.add(pl.Resize,this.handleCancel),this.windowListeners.add(pl.DragStart,yO),this.windowListeners.add(pl.VisibilityChange,this.handleCancel),this.windowListeners.add(pl.ContextMenu,yO),this.documentListeners.add(pl.Keydown,this.handleKeydown),r){if(vO(r))return;if(bO(r)){this.timeoutId=setTimeout(this.handleStart,r.delay);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handleStart(){const{initialCoordinates:t}=this,{onStart:r}=this.props;t&&(this.activated=!0,this.documentListeners.add(pl.Click,V_e,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(pl.SelectionChange,this.removeTextSelection),r(t))}handleMove(t){var r;const{activated:i,initialCoordinates:o,props:a}=this,{onMove:s,options:{activationConstraint:l}}=a;if(!o)return;const u=(r=j4(t))!=null?r:eu,c=oy(o,u);if(!i&&l){if(bO(l))return t3(c,l.tolerance)?this.handleCancel():void 0;if(vO(l))return l.tolerance!=null&&t3(c,l.tolerance)?this.handleCancel():t3(c,l.distance)?this.handleStart():void 0}t.cancelable&&t.preventDefault(),s(u)}handleEnd(){const{onEnd:t}=this.props;this.detach(),t()}handleCancel(){const{onCancel:t}=this.props;this.detach(),t()}handleKeydown(t){t.code===zi.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const K_e={move:{name:"pointermove"},end:{name:"pointerup"}};class m$ extends OE{constructor(t){const{event:r}=t,i=Pg(r.target);super(t,K_e,i)}}m$.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:i}=t;return!r.isPrimary||r.button!==0?!1:(i?.({event:r}),!0)}}];const G_e={move:{name:"mousemove"},end:{name:"mouseup"}};var F4;(function(e){e[e.RightClick=2]="RightClick"})(F4||(F4={}));class y$ extends OE{constructor(t){super(t,G_e,Pg(t.event.target))}}y$.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:i}=t;return r.button===F4.RightClick?!1:(i?.({event:r}),!0)}}];const r3={move:{name:"touchmove"},end:{name:"touchend"}};class v$ extends OE{constructor(t){super(t,r3)}static setup(){return window.addEventListener(r3.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(r3.move.name,t)};function t(){}}}v$.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:i}=t;const{touches:o}=r;return o.length>1?!1:(i?.({event:r}),!0)}}];var u0;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(u0||(u0={}));var jb;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(jb||(jb={}));function Y_e(e){let{acceleration:t,activator:r=u0.Pointer,canScroll:i,draggingRect:o,enabled:a,interval:s=5,order:l=jb.TreeOrder,pointerCoordinates:u,scrollableAncestors:c,scrollableAncestorRects:d,delta:p,threshold:v}=e;const x=Z_e({delta:p,disabled:!a}),[b,y]=o_e(),_=X.exports.useRef({x:0,y:0}),k=X.exports.useRef({x:0,y:0}),E=X.exports.useMemo(()=>{switch(r){case u0.Pointer:return u?{top:u.y,bottom:u.y,left:u.x,right:u.x}:null;case u0.DraggableRect:return o}},[r,o,u]),B=X.exports.useRef(null),U=X.exports.useCallback(()=>{const j=B.current;if(!j)return;const F=_.current.x*k.current.x,H=_.current.y*k.current.y;j.scrollBy(F,H)},[]),D=X.exports.useMemo(()=>l===jb.TreeOrder?[...c].reverse():c,[l,c]);X.exports.useEffect(()=>{if(!a||!c.length||!E){y();return}for(const j of D){if(i?.(j)===!1)continue;const F=c.indexOf(j),H=d[F];if(!H)continue;const{direction:W,speed:G}=N_e(j,H,E,t,v);for(const ae of["x","y"])x[ae][W[ae]]||(G[ae]=0,W[ae]=0);if(G.x>0||G.y>0){y(),B.current=j,b(U,s),_.current=G,k.current=W;return}}_.current={x:0,y:0},k.current={x:0,y:0},y()},[t,U,i,y,a,s,JSON.stringify(E),JSON.stringify(x),b,c,D,d,JSON.stringify(v)])}const Q_e={x:{[Ma.Backward]:!1,[Ma.Forward]:!1},y:{[Ma.Backward]:!1,[Ma.Forward]:!1}};function Z_e(e){let{delta:t,disabled:r}=e;const i=N4(t);return jy(o=>{if(r||!i||!o)return Q_e;const a={x:Math.sign(t.x-i.x),y:Math.sign(t.y-i.y)};return{x:{[Ma.Backward]:o.x[Ma.Backward]||a.x===-1,[Ma.Forward]:o.x[Ma.Forward]||a.x===1},y:{[Ma.Backward]:o.y[Ma.Backward]||a.y===-1,[Ma.Forward]:o.y[Ma.Forward]||a.y===1}}},[r,t,i])}function X_e(e,t){const r=t!==null?e.get(t):void 0,i=r?r.node.current:null;return jy(o=>{var a;return t===null?null:(a=i??o)!=null?a:null},[i,t])}function J_e(e,t){return X.exports.useMemo(()=>e.reduce((r,i)=>{const{sensor:o}=i,a=o.activators.map(s=>({eventName:s.eventName,handler:t(s.handler,i)}));return[...r,...a]},[]),[e,t])}var sy;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(sy||(sy={}));var z4;(function(e){e.Optimized="optimized"})(z4||(z4={}));const wO=new Map;function e5e(e,t){let{dragging:r,dependencies:i,config:o}=t;const[a,s]=X.exports.useState(null),{frequency:l,measure:u,strategy:c}=o,d=X.exports.useRef(e),p=_(),v=iy(p),x=X.exports.useCallback(function(k){k===void 0&&(k=[]),!v.current&&s(E=>E===null?k:E.concat(k.filter(B=>!E.includes(B))))},[v]),b=X.exports.useRef(null),y=jy(k=>{if(p&&!r)return wO;if(!k||k===wO||d.current!==e||a!=null){const E=new Map;for(let B of e){if(!B)continue;if(a&&a.length>0&&!a.includes(B.id)&&B.rect.current){E.set(B.id,B.rect.current);continue}const U=B.node.current,D=U?new PE(u(U),U):null;B.rect.current=D,D&&E.set(B.id,D)}return E}return k},[e,a,r,p,u]);return X.exports.useEffect(()=>{d.current=e},[e]),X.exports.useEffect(()=>{p||x()},[r,p]),X.exports.useEffect(()=>{a&&a.length>0&&s(null)},[JSON.stringify(a)]),X.exports.useEffect(()=>{p||typeof l!="number"||b.current!==null||(b.current=setTimeout(()=>{x(),b.current=null},l))},[l,p,x,...i]),{droppableRects:y,measureDroppableContainers:x,measuringScheduled:a!=null};function _(){switch(c){case sy.Always:return!1;case sy.BeforeDragging:return r;default:return!r}}}function b$(e,t){return jy(r=>e?r||(typeof t=="function"?t(e):e):null,[t,e])}function t5e(e,t){return b$(e,t)}function r5e(e){let{callback:t,disabled:r}=e;const i=IE(t),o=X.exports.useMemo(()=>{if(r||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:a}=window;return new a(i)},[i,r]);return X.exports.useEffect(()=>()=>o?.disconnect(),[o]),o}function Gx(e){let{callback:t,disabled:r}=e;const i=IE(t),o=X.exports.useMemo(()=>{if(r||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:a}=window;return new a(i)},[r]);return X.exports.useEffect(()=>()=>o?.disconnect(),[o]),o}function n5e(e){return new PE(Mg(e),e)}function xO(e,t,r){t===void 0&&(t=n5e);const[i,o]=X.exports.useReducer(l,null),a=r5e({callback(u){if(!!e)for(const c of u){const{type:d,target:p}=c;if(d==="childList"&&p instanceof HTMLElement&&p.contains(e)){o();break}}}}),s=Gx({callback:o});return Jl(()=>{o(),e?(s?.observe(e),a?.observe(document.body,{childList:!0,subtree:!0})):(s?.disconnect(),a?.disconnect())},[e]),i;function l(u){if(!e)return null;if(e.isConnected===!1){var c;return(c=u??r)!=null?c:null}const d=t(e);return JSON.stringify(u)===JSON.stringify(d)?u:d}}function i5e(e){const t=b$(e);return l$(e,t)}const _O=[];function o5e(e){const t=X.exports.useRef(e),r=jy(i=>e?i&&i!==_O&&e&&t.current&&e.parentNode===t.current.parentNode?i:Kx(e):_O,[e]);return X.exports.useEffect(()=>{t.current=e},[e]),r}function a5e(e){const[t,r]=X.exports.useState(null),i=X.exports.useRef(e),o=X.exports.useCallback(a=>{const s=e3(a.target);!s||r(l=>l?(l.set(s,$4(s)),new Map(l)):null)},[]);return X.exports.useEffect(()=>{const a=i.current;if(e!==a){s(a);const l=e.map(u=>{const c=e3(u);return c?(c.addEventListener("scroll",o,{passive:!0}),[c,$4(c)]):null}).filter(u=>u!=null);r(l.length?new Map(l):null),i.current=e}return()=>{s(e),s(a)};function s(l){l.forEach(u=>{const c=e3(u);c?.removeEventListener("scroll",o)})}},[o,e]),X.exports.useMemo(()=>e.length?t?Array.from(t.values()).reduce((a,s)=>_h(a,s),eu):h$(e):eu,[e,t])}function SO(e,t){t===void 0&&(t=[]);const r=X.exports.useRef(null);return X.exports.useEffect(()=>{r.current=null},t),X.exports.useEffect(()=>{const i=e!==eu;i&&!r.current&&(r.current=e),!i&&r.current&&(r.current=null)},[e]),r.current?oy(e,r.current):eu}function s5e(e){X.exports.useEffect(()=>{if(!qx)return;const t=e.map(r=>{let{sensor:i}=r;return i.setup==null?void 0:i.setup()});return()=>{for(const r of t)r?.()}},e.map(t=>{let{sensor:r}=t;return r}))}function l5e(e,t){return X.exports.useMemo(()=>e.reduce((r,i)=>{let{eventName:o,handler:a}=i;return r[o]=s=>{a(s,t)},r},{}),[e,t])}function w$(e){return X.exports.useMemo(()=>e?B_e(e):null,[e])}const n3=[];function u5e(e,t){t===void 0&&(t=Mg);const[r]=e,i=w$(r?Ds(r):null),[o,a]=X.exports.useReducer(l,n3),s=Gx({callback:a});return e.length>0&&o===n3&&a(),Jl(()=>{e.length?e.forEach(u=>s?.observe(u)):(s?.disconnect(),a())},[e]),o;function l(){return e.length?e.map(u=>f$(u)?i:new PE(t(u),u)):n3}}function c5e(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return Ny(t)?t:e}function d5e(e){let{measure:t}=e;const[r,i]=X.exports.useState(null),o=X.exports.useCallback(c=>{for(const{target:d}of c)if(Ny(d)){i(p=>{const v=t(d);return p?{...p,width:v.width,height:v.height}:v});break}},[t]),a=Gx({callback:o}),s=X.exports.useCallback(c=>{const d=c5e(c);a?.disconnect(),d&&a?.observe(d),i(d?t(d):null)},[t,a]),[l,u]=Lb(s);return X.exports.useMemo(()=>({nodeRef:l,rect:r,setRef:u}),[r,l,u])}const f5e=[{sensor:m$,options:{}},{sensor:ME,options:{}}],p5e={current:{}},y1={draggable:{measure:mO},droppable:{measure:mO,strategy:sy.WhileDragging,frequency:z4.Optimized},dragOverlay:{measure:Mg}};class c0 extends Map{get(t){var r;return t!=null&&(r=super.get(t))!=null?r:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:r}=t;return!r})}getNodeFor(t){var r,i;return(r=(i=this.get(t))==null?void 0:i.node.current)!=null?r:void 0}}const h5e={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new c0,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Nb},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:y1,measureDroppableContainers:Nb,windowRect:null,measuringScheduled:!1},g5e={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Nb,draggableNodes:new Map,over:null,measureDroppableContainers:Nb},Yx=X.exports.createContext(g5e),x$=X.exports.createContext(h5e);function m5e(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new c0}}}function y5e(e,t){switch(t.type){case xa.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case xa.DragMove:return e.draggable.active?{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}}:e;case xa.DragEnd:case xa.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case xa.RegisterDroppable:{const{element:r}=t,{id:i}=r,o=new c0(e.droppable.containers);return o.set(i,r),{...e,droppable:{...e.droppable,containers:o}}}case xa.SetDroppableDisabled:{const{id:r,key:i,disabled:o}=t,a=e.droppable.containers.get(r);if(!a||i!==a.key)return e;const s=new c0(e.droppable.containers);return s.set(r,{...a,disabled:o}),{...e,droppable:{...e.droppable,containers:s}}}case xa.UnregisterDroppable:{const{id:r,key:i}=t,o=e.droppable.containers.get(r);if(!o||i!==o.key)return e;const a=new c0(e.droppable.containers);return a.delete(r),{...e,droppable:{...e.droppable,containers:a}}}default:return e}}function v5e(e){let{disabled:t}=e;const{active:r,activatorEvent:i,draggableNodes:o}=X.exports.useContext(Yx),a=N4(i),s=N4(r?.id);return X.exports.useEffect(()=>{if(!t&&!i&&a&&s!=null){if(!RE(a)||document.activeElement===a.target)return;const l=o.get(s);if(!l)return;const{activatorNode:u,node:c}=l;if(!u.current&&!c.current)return;requestAnimationFrame(()=>{for(const d of[u.current,c.current]){if(!d)continue;const p=l_e(d);if(p){p.focus();break}}})}},[i,t,o,s,a]),null}function b5e(e,t){let{transform:r,...i}=t;return e!=null&&e.length?e.reduce((o,a)=>a({transform:o,...i}),r):r}function w5e(e){return X.exports.useMemo(()=>({draggable:{...y1.draggable,...e?.draggable},droppable:{...y1.droppable,...e?.droppable},dragOverlay:{...y1.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function x5e(e){let{activeNode:t,measure:r,initialRect:i,config:o=!0}=e;const a=X.exports.useRef(!1),{x:s,y:l}=typeof o=="boolean"?{x:o,y:o}:o;Jl(()=>{if(!s&&!l||!t){a.current=!1;return}if(a.current||!i)return;const c=t?.node.current;if(!c||c.isConnected===!1)return;const d=r(c),p=l$(d,i);if(s||(p.x=0),l||(p.y=0),a.current=!0,Math.abs(p.x)>0||Math.abs(p.y)>0){const v=u$(c);v&&v.scrollBy({top:p.y,left:p.x})}},[t,s,l,i,r])}const _$=X.exports.createContext({...eu,scaleX:1,scaleY:1});var Kc;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(Kc||(Kc={}));const _5e=X.exports.memo(function(t){var r,i,o,a;let{id:s,accessibility:l,autoScroll:u=!0,children:c,sensors:d=f5e,collisionDetection:p=A_e,measuring:v,modifiers:x,...b}=t;const y=X.exports.useReducer(y5e,void 0,m5e),[_,k]=y,[E,B]=v_e(),[U,D]=X.exports.useState(Kc.Uninitialized),j=U===Kc.Initialized,{draggable:{active:F,nodes:H,translate:W},droppable:{containers:G}}=_,ae=F?H.get(F):null,V=X.exports.useRef({initial:null,translated:null}),oe=X.exports.useMemo(()=>{var Tn;return F!=null?{id:F,data:(Tn=ae?.data)!=null?Tn:p5e,rect:V}:null},[F,ae]),P=X.exports.useRef(null),[ee,le]=X.exports.useState(null),[pe,_e]=X.exports.useState(null),J=iy(b,Object.values(b)),ft=$y("DndDescribedBy",s),Le=X.exports.useMemo(()=>G.getEnabled(),[G]),He=w5e(v),{droppableRects:nr,measureDroppableContainers:Bt,measuringScheduled:Rt}=e5e(Le,{dragging:j,dependencies:[W.x,W.y],config:He.droppable}),Jt=X_e(H,F),vr=X.exports.useMemo(()=>pe?j4(pe):null,[pe]),At=Kn(),kt=t5e(Jt,He.draggable.measure);x5e({activeNode:F?H.get(F):null,config:At.layoutShiftCompensation,initialRect:kt,measure:He.draggable.measure});const Ct=xO(Jt,He.draggable.measure,kt),Lt=xO(Jt?Jt.parentElement:null),Kt=X.exports.useRef({activatorEvent:null,active:null,activeNode:Jt,collisionRect:null,collisions:null,droppableRects:nr,draggableNodes:H,draggingNode:null,draggingNodeRect:null,droppableContainers:G,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),yr=G.getNodeFor((r=Kt.current.over)==null?void 0:r.id),ne=d5e({measure:He.dragOverlay.measure}),Mt=(i=ne.nodeRef.current)!=null?i:Jt,Nt=j?(o=ne.rect)!=null?o:Ct:null,Ie=Boolean(ne.nodeRef.current&&ne.rect),Ae=i5e(Ie?null:Ct),fe=w$(Mt?Ds(Mt):null),Be=o5e(j?yr??Jt:null),rt=u5e(Be),lt=b5e(x,{transform:{x:W.x-Ae.x,y:W.y-Ae.y,scaleX:1,scaleY:1},activatorEvent:pe,active:oe,activeNodeRect:Ct,containerNodeRect:Lt,draggingNodeRect:Nt,over:Kt.current.over,overlayNodeRect:ne.rect,scrollableAncestors:Be,scrollableAncestorRects:rt,windowRect:fe}),jt=vr?_h(vr,W):null,ce=a5e(Be),ie=SO(ce),de=SO(ce,[Ct]),$=_h(lt,ie),C=Nt?R_e(Nt,lt):null,T=oe&&C?p({active:oe,collisionRect:C,droppableRects:nr,droppableContainers:Le,pointerCoordinates:jt}):null,Q=s$(T,"id"),[ve,je]=X.exports.useState(null),ct=Ie?lt:_h(lt,de),ur=T_e(ct,(a=ve?.rect)!=null?a:null,Ct),Dr=X.exports.useCallback((Tn,In)=>{let{sensor:yt,options:Ei}=In;if(P.current==null)return;const Yn=H.get(P.current);if(!Yn)return;const Pi=Tn.nativeEvent,Ji=new yt({active:P.current,activeNode:Yn,event:Pi,options:Ei,context:Kt,onStart(eo){const Mo=P.current;if(Mo==null)return;const Wi=H.get(Mo);if(!Wi)return;const{onDragStart:pa}=J.current,ue={active:{id:Mo,data:Wi.data,rect:V}};ml.exports.unstable_batchedUpdates(()=>{pa?.(ue),D(Kc.Initializing),k({type:xa.DragStart,initialCoordinates:eo,active:Mo}),E({type:"onDragStart",event:ue})})},onMove(eo){k({type:xa.DragMove,coordinates:eo})},onEnd:qo(xa.DragEnd),onCancel:qo(xa.DragCancel)});ml.exports.unstable_batchedUpdates(()=>{le(Ji),_e(Tn.nativeEvent)});function qo(eo){return async function(){const{active:Wi,collisions:pa,over:ue,scrollAdjustedTranslate:Re}=Kt.current;let Ee=null;if(Wi&&Re){const{cancelDrop:q}=J.current;Ee={activatorEvent:Pi,active:Wi,collisions:pa,delta:Re,over:ue},eo===xa.DragEnd&&typeof q=="function"&&await Promise.resolve(q(Ee))&&(eo=xa.DragCancel)}P.current=null,ml.exports.unstable_batchedUpdates(()=>{k({type:eo}),D(Kc.Uninitialized),je(null),le(null),_e(null);const q=eo===xa.DragEnd?"onDragEnd":"onDragCancel";if(Ee){const Fe=J.current[q];Fe?.(Ee),E({type:q,event:Ee})}})}}},[H]),hr=X.exports.useCallback((Tn,In)=>(yt,Ei)=>{const Yn=yt.nativeEvent,Pi=H.get(Ei);if(P.current!==null||!Pi||Yn.dndKit||Yn.defaultPrevented)return;const Ji={active:Pi};Tn(yt,In.options,Ji)===!0&&(Yn.dndKit={capturedBy:In.sensor},P.current=Ei,Dr(yt,In))},[H,Dr]),Rr=J_e(d,hr);s5e(d),Jl(()=>{Ct&&U===Kc.Initializing&&D(Kc.Initialized)},[Ct,U]),X.exports.useEffect(()=>{const{onDragMove:Tn}=J.current,{active:In,activatorEvent:yt,collisions:Ei,over:Yn}=Kt.current;if(!In||!yt)return;const Pi={active:In,activatorEvent:yt,collisions:Ei,delta:{x:$.x,y:$.y},over:Yn};ml.exports.unstable_batchedUpdates(()=>{Tn?.(Pi),E({type:"onDragMove",event:Pi})})},[$.x,$.y]),X.exports.useEffect(()=>{const{active:Tn,activatorEvent:In,collisions:yt,droppableContainers:Ei,scrollAdjustedTranslate:Yn}=Kt.current;if(!Tn||P.current==null||!In||!Yn)return;const{onDragOver:Pi}=J.current,Ji=Ei.get(Q),qo=Ji&&Ji.rect.current?{id:Ji.id,rect:Ji.rect.current,data:Ji.data,disabled:Ji.disabled}:null,eo={active:Tn,activatorEvent:In,collisions:yt,delta:{x:Yn.x,y:Yn.y},over:qo};ml.exports.unstable_batchedUpdates(()=>{je(qo),Pi?.(eo),E({type:"onDragOver",event:eo})})},[Q]),Jl(()=>{Kt.current={activatorEvent:pe,active:oe,activeNode:Jt,collisionRect:C,collisions:T,droppableRects:nr,draggableNodes:H,draggingNode:Mt,draggingNodeRect:Nt,droppableContainers:G,over:ve,scrollableAncestors:Be,scrollAdjustedTranslate:$},V.current={initial:Nt,translated:C}},[oe,Jt,T,C,H,Mt,Nt,nr,G,ve,Be,$]),Y_e({...At,delta:W,draggingRect:C,pointerCoordinates:jt,scrollableAncestors:Be,scrollableAncestorRects:rt});const Gr=X.exports.useMemo(()=>({active:oe,activeNode:Jt,activeNodeRect:Ct,activatorEvent:pe,collisions:T,containerNodeRect:Lt,dragOverlay:ne,draggableNodes:H,droppableContainers:G,droppableRects:nr,over:ve,measureDroppableContainers:Bt,scrollableAncestors:Be,scrollableAncestorRects:rt,measuringConfiguration:He,measuringScheduled:Rt,windowRect:fe}),[oe,Jt,Ct,pe,T,Lt,ne,H,G,nr,ve,Bt,Be,rt,He,Rt,fe]),Nr=X.exports.useMemo(()=>({activatorEvent:pe,activators:Rr,active:oe,activeNodeRect:Ct,ariaDescribedById:{draggable:ft},dispatch:k,draggableNodes:H,over:ve,measureDroppableContainers:Bt}),[pe,Rr,oe,Ct,k,ft,H,ve,Bt]);return Ut(i$.Provider,{value:B,children:[Ut(Yx.Provider,{value:Nr,children:[L(x$.Provider,{value:Gr,children:L(_$.Provider,{value:ur,children:c})}),L(v5e,{disabled:l?.restoreFocus===!1})]}),L(x_e,{...l,hiddenTextDescribedById:ft})]});function Kn(){const Tn=ee?.autoScrollEnabled===!1,In=typeof u=="object"?u.enabled===!1:u===!1,yt=j&&!Tn&&!In;return typeof u=="object"?{...u,enabled:yt}:{enabled:yt}}}),S5e=X.exports.createContext(null),CO="button",C5e="Droppable";function k5e(e){let{id:t,data:r,disabled:i=!1,attributes:o}=e;const a=$y(C5e),{activators:s,activatorEvent:l,active:u,activeNodeRect:c,ariaDescribedById:d,draggableNodes:p,over:v}=X.exports.useContext(Yx),{role:x=CO,roleDescription:b="draggable",tabIndex:y=0}=o??{},_=u?.id===t,k=X.exports.useContext(_?_$:S5e),[E,B]=Lb(),[U,D]=Lb(),j=l5e(s,t),F=iy(r);Jl(()=>(p.set(t,{id:t,key:a,node:E,activatorNode:U,data:F}),()=>{const W=p.get(t);W&&W.key===a&&p.delete(t)}),[p,t]);const H=X.exports.useMemo(()=>({role:x,tabIndex:y,"aria-disabled":i,"aria-pressed":_&&x===CO?!0:void 0,"aria-roledescription":b,"aria-describedby":d.draggable}),[i,x,y,_,b,d.draggable]);return{active:u,activatorEvent:l,activeNodeRect:c,attributes:H,isDragging:_,listeners:i?void 0:j,node:E,over:v,setNodeRef:B,setActivatorNodeRef:D,transform:k}}function E5e(){return X.exports.useContext(x$)}const A5e="Droppable",T5e={timeout:25};function I5e(e){let{data:t,disabled:r=!1,id:i,resizeObserverConfig:o}=e;const a=$y(A5e),{active:s,dispatch:l,over:u,measureDroppableContainers:c}=X.exports.useContext(Yx),d=X.exports.useRef({disabled:r}),p=X.exports.useRef(!1),v=X.exports.useRef(null),x=X.exports.useRef(null),{disabled:b,updateMeasurementsFor:y,timeout:_}={...T5e,...o},k=iy(y??i),E=X.exports.useCallback(()=>{if(!p.current){p.current=!0;return}x.current!=null&&clearTimeout(x.current),x.current=setTimeout(()=>{c(Array.isArray(k.current)?k.current:[k.current]),x.current=null},_)},[_]),B=Gx({callback:E,disabled:b||!s}),U=X.exports.useCallback((H,W)=>{!B||(W&&(B.unobserve(W),p.current=!1),H&&B.observe(H))},[B]),[D,j]=Lb(U),F=iy(t);return X.exports.useEffect(()=>{!B||!D.current||(B.disconnect(),p.current=!1,B.observe(D.current))},[D,B]),Jl(()=>(l({type:xa.RegisterDroppable,element:{id:i,key:a,disabled:r,node:D,rect:v,data:F}}),()=>l({type:xa.UnregisterDroppable,key:a,id:i})),[i]),X.exports.useEffect(()=>{r!==d.current.disabled&&(l({type:xa.SetDroppableDisabled,id:i,key:a,disabled:r}),d.current.disabled=r)},[i,a,r,l]),{active:s,rect:v,isOver:u?.id===i,node:D,over:u,setNodeRef:j}}function S$(e,t,r){const i=e.slice();return i.splice(r<0?i.length+r:r,0,i.splice(t,1)[0]),i}function R5e(e,t){return e.reduce((r,i,o)=>{const a=t.get(i);return a&&(r[o]=a),r},Array(e.length))}function Hv(e){return e!==null&&e>=0}function P5e(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let r=0;r{let{rects:t,activeIndex:r,overIndex:i,index:o}=e;const a=S$(t,i,r),s=t[o],l=a[o];return!l||!s?null:{x:l.left-s.left,y:l.top-s.top,scaleX:l.width/s.width,scaleY:l.height/s.height}},Wv={scaleX:1,scaleY:1},O5e=e=>{var t;let{activeIndex:r,activeNodeRect:i,index:o,rects:a,overIndex:s}=e;const l=(t=a[r])!=null?t:i;if(!l)return null;if(o===r){const c=a[s];return c?{x:0,y:rr&&o<=s?{x:0,y:-l.height-u,...Wv}:o=s?{x:0,y:l.height+u,...Wv}:{x:0,y:0,...Wv}};function B5e(e,t,r){const i=e[t],o=e[t-1],a=e[t+1];return i?ri.map(j=>typeof j=="object"&&"id"in j?j.id:j),[i]),b=s!=null,y=s?x.indexOf(s.id):-1,_=c?x.indexOf(c.id):-1,k=X.exports.useRef(x),E=!P5e(x,k.current),B=_!==-1&&y===-1||E,U=M5e(a);Jl(()=>{E&&b&&d(x)},[E,x,b,d]),X.exports.useEffect(()=>{k.current=x},[x]);const D=X.exports.useMemo(()=>({activeIndex:y,containerId:p,disabled:U,disableTransforms:B,items:x,overIndex:_,useDragOverlay:v,sortedRects:R5e(x,u),strategy:o}),[y,p,U.draggable,U.droppable,B,x,_,u,v,o]);return L(E$.Provider,{value:D,children:t})}const D5e=e=>{let{id:t,items:r,activeIndex:i,overIndex:o}=e;return S$(r,i,o).indexOf(t)},L5e=e=>{let{containerId:t,isSorting:r,wasDragging:i,index:o,items:a,newIndex:s,previousItems:l,previousContainerId:u,transition:c}=e;return!c||!i||l!==a&&o===s?!1:r?!0:s!==o&&t===u},N5e={duration:200,easing:"ease"},A$="transform",j5e=ay.Transition.toString({property:A$,duration:0,easing:"linear"}),$5e={roleDescription:"sortable"};function F5e(e){let{disabled:t,index:r,node:i,rect:o}=e;const[a,s]=X.exports.useState(null),l=X.exports.useRef(r);return Jl(()=>{if(!t&&r!==l.current&&i.current){const u=o.current;if(u){const c=Mg(i.current,{ignoreTransform:!0}),d={x:u.left-c.left,y:u.top-c.top,scaleX:u.width/c.width,scaleY:u.height/c.height};(d.x||d.y)&&s(d)}}r!==l.current&&(l.current=r)},[t,r,i,o]),X.exports.useEffect(()=>{a&&s(null)},[a]),a}function T$(e){let{animateLayoutChanges:t=L5e,attributes:r,disabled:i,data:o,getNewIndex:a=D5e,id:s,strategy:l,resizeObserverConfig:u,transition:c=N5e}=e;const{items:d,containerId:p,activeIndex:v,disabled:x,disableTransforms:b,sortedRects:y,overIndex:_,useDragOverlay:k,strategy:E}=X.exports.useContext(E$),B=z5e(i,x),U=d.indexOf(s),D=X.exports.useMemo(()=>({sortable:{containerId:p,index:U,items:d},...o}),[p,o,U,d]),j=X.exports.useMemo(()=>d.slice(d.indexOf(s)),[d,s]),{rect:F,node:H,isOver:W,setNodeRef:G}=I5e({id:s,data:D,disabled:B.droppable,resizeObserverConfig:{updateMeasurementsFor:j,...u}}),{active:ae,activatorEvent:V,activeNodeRect:oe,attributes:P,setNodeRef:ee,listeners:le,isDragging:pe,over:_e,setActivatorNodeRef:J,transform:ft}=k5e({id:s,data:D,attributes:{...$5e,...r},disabled:B.draggable}),Le=n_e(G,ee),He=Boolean(ae),nr=He&&!b&&Hv(v)&&Hv(_),Bt=!k&&pe,Rt=Bt&&nr?ft:null,vr=nr?Rt??(l??E)({rects:y,activeNodeRect:oe,activeIndex:v,overIndex:_,index:U}):null,At=Hv(v)&&Hv(_)?a({id:s,items:d,activeIndex:v,overIndex:_}):U,kt=ae?.id,Ct=X.exports.useRef({activeId:kt,items:d,newIndex:At,containerId:p}),Lt=d!==Ct.current.items,Kt=t({active:ae,containerId:p,isDragging:pe,isSorting:He,id:s,index:U,items:d,newIndex:Ct.current.newIndex,previousItems:Ct.current.items,previousContainerId:Ct.current.containerId,transition:c,wasDragging:Ct.current.activeId!=null}),yr=F5e({disabled:!Kt,index:U,node:H,rect:F});return X.exports.useEffect(()=>{He&&Ct.current.newIndex!==At&&(Ct.current.newIndex=At),p!==Ct.current.containerId&&(Ct.current.containerId=p),d!==Ct.current.items&&(Ct.current.items=d)},[He,At,p,d]),X.exports.useEffect(()=>{if(kt===Ct.current.activeId)return;if(kt&&!Ct.current.activeId){Ct.current.activeId=kt;return}const Mt=setTimeout(()=>{Ct.current.activeId=kt},50);return()=>clearTimeout(Mt)},[kt]),{active:ae,activeIndex:v,attributes:P,data:D,rect:F,index:U,newIndex:At,items:d,isOver:W,isSorting:He,isDragging:pe,listeners:le,node:H,overIndex:_,over:_e,setNodeRef:Le,setActivatorNodeRef:J,setDroppableNodeRef:G,setDraggableNodeRef:ee,transform:yr??vr,transition:ne()};function ne(){if(yr||Lt&&Ct.current.newIndex===U)return j5e;if(!(Bt&&!RE(V)||!c)&&(He||Kt))return ay.Transition.toString({...c,property:A$})}}function z5e(e,t){var r,i;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(r=e?.draggable)!=null?r:t.draggable,droppable:(i=e?.droppable)!=null?i:t.droppable}}function $b(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&typeof t.sortable=="object"&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const H5e=[zi.Down,zi.Right,zi.Up,zi.Left],W5e=(e,t)=>{let{context:{active:r,collisionRect:i,droppableRects:o,droppableContainers:a,over:s,scrollableAncestors:l}}=t;if(H5e.includes(e.code)){if(e.preventDefault(),!r||!i)return;const u=[];a.getEnabled().forEach(p=>{if(!p||p!=null&&p.disabled)return;const v=o.get(p.id);if(!!v)switch(e.code){case zi.Down:i.topv.top&&u.push(p);break;case zi.Left:i.left>v.left&&u.push(p);break;case zi.Right:i.left1&&(d=c[1].id),d!=null){const p=a.get(r.id),v=a.get(d),x=v?o.get(v.id):null,b=v?.node.current;if(b&&x&&p&&v){const _=Kx(b).some((j,F)=>l[F]!==j),k=I$(p,v),E=V5e(p,v),B=_||!k?{x:0,y:0}:{x:E?i.width-x.width:0,y:E?i.height-x.height:0},U={x:x.left,y:x.top};return B.x&&B.y?U:oy(U,B)}}}};function I$(e,t){return!$b(e)||!$b(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function V5e(e,t){return!$b(e)||!$b(t)||!I$(e,t)?!1:e.data.current.sortable.indext(!0),o=()=>t(!1);return X.exports.useEffect(()=>{const a=r.current;if(a)return a.addEventListener("mouseover",i),a.addEventListener("mouseout",o),()=>{a.removeEventListener("mouseover",i),a.removeEventListener("mouseout",o)}},[r.current]),{hoverRef:r,isHover:e}}const K5e="/verifier/assets/delete.42fb1897.svg",G5e="/verifier/assets/dnd.dcf4594c.svg",Y5e=Xi("input")({display:"flex",alignItems:"center",width:300,height:44,background:"#FFFFFF",border:"1px solid #D8D8D8",borderRadius:"12px",fontSize:14,fontFamily:"Mulish",paddingLeft:10,outline:"none","&:hover":{border:"1px solid #b0b0b0"},"&:focus":{border:"1px solid #807e7e"}}),rs=Xi(j6)({border:"none",padding:0}),qp=Xi(j6)({fontWeight:700}),Fl=Xi("hr")({display:"block",width:"100%",height:1,backgroundColor:"#ccc",border:"none"}),Q5e=e=>e.replace(/\/+/g,"/").replace(/^\/[^\/]/,"").replace(/\/$/,"");function kO({file:e,pos:t,isHover:r}){const i=e.fileObj.name,{attributes:o,listeners:a}=T$({id:i}),s=la(),l=aa(s.breakpoints.down("lg")),{setInclueInCommand:u,setDirectory:c,removeFile:d}=zu(),{data:p}=Hu(),v=!!p?.result?.msgCell;return Ut(ta,{children:[L(rs,{sx:{paddingLeft:1},...o,...a,children:Ut($n,{sx:{color:"#D8D8D8"},children:[t,".",L($n,{ml:5,style:{cursor:"pointer",visibility:r?"visible":"hidden"},children:L("img",{src:G5e,alt:"Drag n drop icon",width:24,height:24})})]})}),L(rs,{children:L(Y5e,{disabled:v,value:e.folder,onBlur:x=>{c(i,Q5e(x.target.value))},onChange:x=>{c(i,x.target.value)}})}),L(rs,{sx:{paddingLeft:l?2:0},children:Ut($n,{sx:{flexDirection:"column",justifyContent:"center",alignItems:"flex-start"},children:[L(jo,{sx:{fontSize:14},children:e.fileObj.name}),Ut(jo,{sx:{fontSize:12,color:"#C1C1C1"},children:[e.fileObj.size," bytes"]})]})}),L(rs,{children:L(woe,{disabled:v,checked:e.includeInCommand,onChange:x=>{u(i,x.target.checked)}})}),L(rs,{align:"right",children:L(Bs,{sx:{visibility:r?"visible":"hidden",opacity:.5,cursor:"pointer",marginRight:1},onClick:()=>{d(i)},children:L("img",{src:K5e,alt:"Delete icon",width:18,height:18})})})]})}function Z5e({file:e,pos:t}){const r=e.fileObj.name,{hoverRef:i,isHover:o}=q5e(),{data:a}=Hu(),s=!!a?.result?.msgCell,{setNodeRef:l,transform:u,transition:c,isDragging:d}=T$({id:r}),p={transform:ay.Transform.toString(u),transition:c};return s?L(xc,{sx:{height:60},children:L(kO,{file:e,pos:t,isDragging:!1,isHover:!1})}):L(xc,{sx:{height:60,transition:".15s all","&:hover":{background:"#FAFAFA"}},ref:v=>{l(v),i.current=v},style:p,children:L(kO,{file:e,pos:t,isDragging:d,isHover:o})},r)}function X5e(){const{files:e,reorderFiles:t}=zu(),{data:r}=Hu(),i=la(),o=aa(i.breakpoints.down("lg")),a=!!r?.result?.msgCell,s=__e(J5(y$,{}),J5(v$,{}),J5(ME,{coordinateGetter:W5e}));function l(u){const{active:c,over:d}=u;c.id!==d.id&&t(c.id,d.id)}return L(_5e,{sensors:s,collisionDetection:C_e,onDragEnd:l,modifiers:[d_e,c_e],children:L(Xoe,{children:Ut(L6,{sx:{minWidth:650},children:[Ut(z7,{sx:{"&.MuiTableHead-root th":{border:"none"}},children:[Ut(xc,{sx:{fontWeight:700},children:[L(qp,{sx:{paddingLeft:0,paddingBottom:o?0:2,width:100},children:"Order"}),L(qp,{sx:{paddingLeft:0,paddingBottom:o?0:2},children:"Directory"}),L(qp,{sx:{paddingLeft:o?2:0,width:300,paddingBottom:o?0:2},children:"File"}),L(qp,{sx:{paddingLeft:0,width:150,paddingBottom:o?0:2},children:"Include in command"}),L(qp,{sx:{paddingLeft:0,width:100,paddingBottom:o?0:2}})]}),Ut(xc,{children:[L(rs,{sx:{paddingBottom:o?0:2},children:L(Fl,{})}),L(rs,{sx:{paddingBottom:o?0:2},children:L(Fl,{})}),L(rs,{sx:{paddingBottom:o?0:2},children:L(Fl,{})}),L(rs,{sx:{paddingBottom:o?0:2},children:L(Fl,{})}),L(rs,{sx:{paddingBottom:o?0:2},children:L(Fl,{})})]})]}),L(N6,{children:L(U5e,{disabled:a,items:e.map(u=>u.fileObj.name),strategy:O5e,children:e.map((u,c)=>L(Z5e,{file:u,pos:c+1},u.fileObj.name))})})]})})})}const i3=Xi(k7)({flexGrow:1}),o3=Xi(j7)(({theme:e})=>({borderRadius:e.spacing(1.2),height:e.spacing(5.3),minWidth:150,".MuiOutlinedInput-notchedOutline":{border:"1px solid #D8D8D8"},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{border:"1px solid #807e7e"},"&:hover .MuiOutlinedInput-notchedOutline":{border:"1px solid #b0b0b0"}})),Vv=Xi(E7)(({theme:e})=>({color:"#000",fontSize:12,marginLeft:e.spacing(1),marginBottom:e.spacing(1)})),J5e=Xi("input")(({theme:e})=>({display:"flex",alignItems:"center",boxSizing:"border-box",width:"100%",flex:2,height:e.spacing(5.3),borderRadius:e.spacing(1.2),border:"1px solid #D8D8D8",outline:"none",padding:"0 40px 0 125px",color:"#000",background:"transparent",fontFamily:"Mulish",fontSize:14,"&:hover":{border:"1px solid #b0b0b0"},"&:focus":{border:"1px solid #807e7e"}})),e3e="/verifier/assets/undo.944d3e45.svg";function t3e(){const{compilerSettings:e,setOverrideCommandLine:t,setFuncCliVersion:r,setTactCliVersion:i,compiler:o,setCompiler:a}=cE(),{data:s}=Hu(),l=la(),u=aa(l.breakpoints.down("md")),c=!!s?.result?.msgCell,{data:{funcVersions:d,tactVersions:p}}=uE();return Ut(da,{mt:4,children:[L(jo,{variant:"h5",style:{fontWeight:800,fontSize:16,marginBottom:16},children:"Compiler"}),Ut($n,{sx:{gap:1,alignItems:u?"center":"flex-end",flexDirection:u?"column":"inherit"},children:[L($n,{mb:u?1:0,sx:{width:u?"100%":"inherit"},children:Ut(i3,{children:[L(Vv,{children:"Compiler"}),Ut(o3,{value:o,onChange:v=>{a(v.target.value)},children:[L(rm,{value:"func",children:"func"}),L(rm,{value:"tact",children:"tact"}),{}.VITE_ALLOW_FIFT&&L(rm,{value:"fift",children:"fift"})]})]})}),o==="func"&&Ut(ta,{children:[L($n,{mb:u?1:0,sx:{width:u?"100%":"inherit"},children:Ut(i3,{disabled:c,children:[L(Vv,{children:"Version"}),L(o3,{value:e.funcVersion,onChange:v=>{r(v.target.value)},children:d?.map(v=>L(rm,{value:v,children:v},v))})]})}),Ut(da,{sx:{width:"100%",position:"relative"},children:[L(Vv,{sx:{display:"block"},children:"Func command"}),L(J5e,{disabled:c,value:e.commandLine,onChange:v=>{t(v.target.value)}}),L(Fee,{sx:{position:"absolute",left:3,top:28,height:37,background:"#F5F5F5",borderRadius:1.5,color:"#000",fontSize:14},label:"func -o tmp.fif"}),!!e.overrideCommandLine&&L(Bs,{sx:{color:"blue",position:"absolute",right:10,top:31},onClick:()=>{t(null)},children:L("img",{src:e3e,alt:"Undo icon",width:15,height:15})})]})]}),o==="tact"&&L(ta,{children:L($n,{mb:u?1:0,sx:{width:u?"100%":"inherit"},children:Ut(i3,{disabled:c,children:[L(Vv,{children:"Version"}),L(o3,{value:e.tactVersion,disabled:!0,children:p?.map(v=>L(rm,{value:v,children:v},v))})]})})})]})]})}const r3e="/verifier/assets/reorder-hint.5f3a54fb.svg",n3e="/verifier/assets/light-bulb.7768be40.svg",R$="/verifier/assets/like.af7e7b33.svg",i3e=sr(kn)({maxWidth:1160,width:"calc(100% - 50px)",margin:"auto"}),o3e=sr(kn)({display:"flex",justifyContent:"space-between",height:73}),a3e=sr(kn)(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"space-between",gap:e.spacing(1.5)})),s3e=sr(kn)(({theme:e})=>({display:"flex",flexWrap:"wrap",justifyContent:"space-between",marginTop:e.spacing(3),marginBottom:e.spacing(2),color:"#728A96",fontSize:14,[e.breakpoints.down("md")]:{"& > *":{marginBottom:`${e.spacing(1)} !important`}}})),l3e=sr("hr")({height:"1px",backgroundColor:"#e6e6e6",border:"none"}),EO=sr(uc)(({theme:e})=>({display:"inline-flex",alignItems:"center",color:"inherit",textDecoration:"none",[e.breakpoints.down("md")]:{justifyContent:"flex-end"}})),Fy=sr(kn)({display:"flex",justifyContent:"center",alignItems:"center"}),u3e=sr(Fy)(({theme:e})=>({[e.breakpoints.down("md")]:{minWidth:"100%",flex:2,order:3}})),P$=sr(Fy)(({theme:e})=>({[e.breakpoints.down("md")]:{minWidth:"50%"}})),c3e=sr(P$)(({theme:e})=>({[e.breakpoints.down("md")]:{justifyContent:"start"},[e.breakpoints.down("sm")]:{minWidth:100}})),d3e=sr(P$)(({theme:e})=>({[e.breakpoints.down("md")]:{justifyContent:"end"},[e.breakpoints.down("sm")]:{minWidth:100}})),f3e="/verifier/assets/heart.52fe96d0.svg",p3e="/verifier/assets/orbs.eb35e74b.svg",h3e="/verifier/assets/telegram.bcba2ca3.svg",g3e="/verifier/assets/telegram-hover.72b9d3ce.svg",m3e="/verifier/assets/github-footer.0bd3bbab.svg",y3e="/verifier/assets/github-hover.33daf3ef.svg",AO=sr(kn)(e=>({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"center",width:t.spacing(3),height:t.spacing(3),background:`url(${e.iconUrl})`,"&:hover":{transitionDuration:".25s",background:`url(${e.disabled?e.iconUrl:e.hoveredIconUrl})`,cursor:e.disabled?"cursor":"pointer"}})),TO=({iconUrl:e,hoveredIconUrl:t,link:r})=>r.length?L(uc,{target:"_blank",href:r,children:L(AO,{iconUrl:e,hoveredIconUrl:t})}):L(AO,{iconUrl:e,hoveredIconUrl:t,disabled:!0});function M$(){const e=QC(),[t,r]=yw();return()=>{t.has("testnet")?t.delete("testnet"):t.append("testnet",""),r(t),e(0)}}function BE(){const e=M$();return L(kn,{sx:{background:"red",color:"white",py:2},children:Ut(wE,{sx:{gap:4,px:4},children:[L(jo,{sx:{fontWeight:"bold",flexGrow:1},children:"Testnet"}),L(jo,{onClick:()=>{e()},sx:{cursor:"pointer"},children:"Switch to mainnet"})]})})}const H4="https://t.me/tonverifier";function Fb(){const e=aa("(max-width: 450px)"),t=Ac(),r=M$();return Ut(i3e,{children:[Ut(o3e,{mb:e?5:"inherit",sx:{flexDirection:e?"column":"inherit",alignItems:e?"center":"inherit"},children:[L($n,{children:Ut(ap,{sx:{color:"#000"},onClick:()=>t("/"),children:[L("img",{src:vw,alt:"App icon",width:30,height:30}),L(cx,{children:"TON VERIFIER"})]})}),Ut(a3e,{children:[L(TO,{iconUrl:h3e,hoveredIconUrl:g3e,link:H4}),L(TO,{iconUrl:m3e,hoveredIconUrl:y3e,link:"https://github.com/orbs-network/ton-contract-verifier"})]})]}),L(l3e,{}),Ut(s3e,{children:[L(c3e,{children:L(jo,{variant:"body2",children:"\xA9 2023"})}),L(u3e,{children:Ut($n,{sx:{gap:.1},children:["Contributed with",L($n,{mx:.4,children:L("img",{src:f3e,alt:"Heart",width:12,height:12})}),"by",L($n,{mx:.4,children:L("img",{src:p3e,alt:"Orbs logo",width:12,height:12})}),L(EO,{sx:{color:"#5E75E8"},target:"_blank",href:"https://orbs.com/powered-by",children:"Orbs"})]})}),Ut(d3e,{children:[L(EO,{target:"_blank",href:H4,children:L(jo,{variant:"body2",children:"Support"})}),!window.isTestnet&&L(jo,{onClick:()=>{r()},sx:{ml:2,cursor:"pointer"},variant:"body2",children:"Switch to Testnet"})]})]})]})}const v3e=sr("li")({maxWidth:650,fontSize:14,fontWeight:400,marginBottom:10});function b3e(e,t){switch(e){case Na.ENTRYPOINT_MISSING:return"There usually should be at least one file containing an entrypoint (recv_internal, main)";case Na.STDLIB_ORDER:return"stdlib.fc should usually be the first file in the list (unless it's imported from another file)";case Na.STDLIB_MISSING:return"You can try to add stdlib.fc to your sources.";case Na.NOT_SIMILAR:return"Source code compiles correctly but does not match the on-chain contract hash. Make sure you are using the correct compiler version, command line and file order.";case Na.FILE_ORDER:return"Make sure all files in the command line are in the correct order";case Na.COMPILER_VERSION:return"Try to use the same compiler version as the contract was compiled with";case Na.REQUIRED_FILES:return"Make sure all required files are included in the command line";case Na.SUPPORT_GROUP:return Ut("div",{children:["If you are still facing issues, you can use the"," ",L(uc,{target:"_blank",href:H4,sx:{textDecoration:"none",cursor:"pointer"},children:"Telegram support group"})]})}}const w3e=({hint:e})=>{const{data:t}=Hu();return L(v3e,{children:b3e(e,t?.result.compileResult)})},Dd=sr(jo)({fontSize:14,fontWeight:400,marginBottom:"10px"}),IO=sr(jo)({fontSize:14,fontWeight:700}),O$=sr(jo)({fontSize:14,fontWeight:400}),RO=sr($n)({padding:"20px 30px",paddingLeft:0,"&:hover":{background:"transparent"}}),PO=sr(Tj)({minWidth:200,fontSize:14,fontWeight:600}),x3e=sr(da)({borderBottom:"1px solid rgba(0, 0, 0, 0.2)"}),MO=sr(Ij)({color:"#000",fontSize:14,fontWeight:400});function _3e(){const{data:e,error:t}=Hu(),{data:r}=vp(),i=e?.result?.compileResult,o=e?.hints??[];return Ut(da,{my:3,children:[["similar"].includes(i?.result??"")&&L(Cs,{singleLine:!0,type:ps.SUCCESS,title:Ut($n,{sx:{height:42},children:[L($n,{mr:1,children:L("img",{src:R$,alt:"Like icon",width:31,height:31})}),Ut(O$,{children:[" ",L("b",{children:"Great!"})," Compile output hash matches this on-chain contract"]})]}),notificationBody:L(da,{})}),["not_similar"].includes(i?.result??"")&&L(Cs,{type:ps.ERROR,title:Ut($n,{children:[L($n,{mr:1,children:L("img",{src:r3e,alt:"Reorder icon",width:39,height:26})}),L(IO,{children:"Hashes are not similar"})]}),notificationBody:Ut(da,{sx:{display:"flex",flexDirection:"column"},children:[Ut(RO,{children:[L(PO,{children:"Contract hash"}),L(MO,{children:r?.codeCellHash.base64??"-"})]}),L(x3e,{}),Ut(RO,{children:[L(PO,{children:"Compile output hash"}),L(MO,{children:i?.hash??"-"})]})]})}),i?.error&&L(Cs,{type:ps.ERROR,title:Ut(Dd,{children:[L("span",{style:{color:"#FC5656"},children:"Error: "}),"Compile error"]}),notificationBody:L(da,{sx:{overflow:"auto",maxHeight:300},children:L("div",{children:L("code",{children:i.error})})})}),!!t&&L(Cs,{type:ps.ERROR,title:Ut(Dd,{children:[L("span",{style:{color:"#FC5656"},children:"Error: "}),"Server error"]}),notificationBody:L(da,{sx:{overflow:"auto",maxHeight:300},children:L("div",{children:L("code",{children:t.toString()})})})}),o.length>0&&L(Cs,{type:ps.HINT,title:Ut($n,{mb:2,children:[L($n,{mr:1,children:L("img",{src:n3e,alt:"Light bulb icon",width:21,height:22})}),L(IO,{children:"Possible reasons for failure"})]}),notificationBody:L("ul",{style:{paddingLeft:25},children:o.map(a=>L(w3e,{hint:a},a))})})]})}function B$(){const[e]=kg();return L(Ha,{background:"#1976d2",hoverBackground:"#156cc2",height:37,fontSize:14,fontWeight:700,textColor:"#fff",type:"button",onClick:()=>e.connectWallet(),children:"Connect wallet"})}const S3e=Xi(da)({padding:"15px 24px"});function C3e(){const e=Bx(),{hasFiles:t}=zu(),{step:r,proceedToPublish:i,toggleSection:o,currentSection:a}=Vx(),{mutate:s,data:l,error:u,isLoading:c,compileStatus:d}=Hu(),p=!!l?.result?.msgCell,v=()=>o(sc.SOURCES);return Ut(ug,{children:[L(da,{sx:{cursor:r===hc.PUBLISH&&p?"pointer":"inherit"},onClick:v,children:L(r_e,{})}),a===sc.SOURCES&&L(vy,{in:a===sc.SOURCES,children:L(S3e,{children:Ut(ta,{children:[t()&&Ut(ta,{children:[L(X5e,{}),L(t3e,{})]}),(l||u)&&L(_3e,{}),t()&&L($n,{sx:{justifyContent:"center"},mt:3,mb:"9px",children:e?l?.result?.msgCell?L(Ha,{disabled:r===hc.PUBLISH,fontSize:14,fontWeight:800,textColor:"#fff",height:44,width:144,background:"#1976d2",hoverBackground:"#156cc2",onClick:i,children:"Ready to publish"}):Ut(Ha,{disabled:!t(),fontSize:14,fontWeight:800,textColor:"#fff",height:44,width:144,background:"#1976d2",hoverBackground:"#156cc2",onClick:()=>{s(null)},children:[c&&L(lg,{sx:{color:"#fff",height:"20px !important",width:"20px !important"}}),"Compile"]}):L(B$,{})})]})})})]})}const k3e=sr(c2)({borderRadius:40,fontFamily:"inherit",fontWeight:700,textTransform:"none",background:"#0088CC","&:disabled":{backgroundColor:"#e0e0e0"}});function nd(e){return L(k3e,{disableElevation:!0,disableRipple:!0,disableFocusRipple:!0,disableTouchRipple:!0,variant:"contained",disabled:e.disabled,onClick:e.disabled?void 0:e.onClick,...e,children:e.text})}const E3e="/verifier/assets/publish.83df630b.svg";function A3e(){const{data:e}=Hu(),{sendTXN:t,status:r,clearTXN:i}=rj(),{step:o,toggleSection:a,currentSection:s}=Vx();zu();const l=!!e?.result?.msgCell;let u;const c=()=>o===hc.PUBLISH&&l&&a(sc.PUBLISH);switch(r){case"initial":u=L("span",{children:"To store your contract\u2019s verification proof on-chain, you will need to issue a transaction. This will cost 0.5 TON"});break;case"rejected":u="Transaction rejected, please retry.";break;case"pending":u="Check your wallet for a pending transaction.";break;case"issued":u="Transaction issued, monitoring proof deployment on-chain.";break;case"success":u="Your contract is now verified! Click below to view it.";break;case"expired":u="Transaction expired, please retry.";break;case"error":u="The transaction is taking too long to complete or have failed. Please use a blockchain explorer to monitor it. You can also use our telegram support group."}return Ut(ug,{mb:6,children:[Ut($n,{p:s===sc.PUBLISH?"30px 24px 0 24px":"20px 24px",onClick:c,sx:{opacity:o===hc.PUBLISH&&l?1:.25,cursor:o===hc.PUBLISH&&l?"pointer":"inherit"},children:[L(cg,{children:L("img",{src:r==="success"?r$:E3e,alt:"publish icon",width:41,height:41})}),L(Fd,{children:"Publish"})]}),s===sc.PUBLISH&&l&&L(vy,{in:s===sc.PUBLISH,children:Ut(da,{children:[L(da,{sx:{padding:"0 30px"},children:L(Cs,{type:ps.INFO,title:L(ta,{}),notificationBody:L($n,{sx:{overflow:"auto",maxHeight:300},children:L(Dd,{sx:{marginBottom:0},children:u})})})}),Ut($n,{mb:3,sx:{justifyContent:"center"},children:[r!=="success"&&Ut(Ha,{disabled:r==="pending"||r==="issued",fontSize:14,fontWeight:800,textColor:"#fff",height:44,width:144,background:"#1976d2",hoverBackground:"#156cc2",onClick:()=>{t()},children:[(r==="pending"||r==="issued")&&L(lg,{sx:{color:"#fff",height:"20px !important",width:"20px !important"}}),"Publish"]}),r==="success"&&L(nd,{sx:{height:44},text:"View verified contract",onClick:()=>{location.reload()}})]})]})})]})}const T3e="/verifier/assets/verification-alert.0ebcec4f.svg",I3e="/verifier/assets/verification-binary.d6844d86.svg",R3e="/verifier/assets/verification-bomb.3bf48d9c.svg",P3e="/verifier/assets/verification-paper.34a39e79.svg",M3e="/verifier/assets/show.836c8f4f.svg",O3e="/verifier/assets/verification.fbd44dba.svg",B3e=Xi(Bs)(()=>({color:"#000"})),U3e=Xi(da)({display:"flex",alignItems:"center",flexDirection:"column","& .title":{texAlign:"center",fontWeight:500,fontSize:20,marginBottom:20},"& .base-button":{height:40,marginTop:30}});function D3e({open:e,onClose:t,children:r,backgroundColor:i="rgba(48, 48, 48, 0.4)",blur:o=!0,className:a="",maxWidth:s,hideCloseButton:l,paddingTop:u}){return L(rre,{className:`${a} ${o&&"popup-filter"}`,fullWidth:!0,onClose:t,open:e,PaperProps:{style:{maxWidth:s||"unset",width:"100%",borderRadius:"10px",padding:0,overflow:"unset",margin:20}},BackdropProps:{style:{backgroundColor:i}},children:Ut(da,{sx:{overflow:"scroll","::-webkit-scrollbar":{display:"none"}},children:[!l&&L(da,{sx:{display:"flex",justifyContent:"end",width:"100%"},children:L(B3e,{onClick:t,children:L(Ck,{style:{width:23,height:23}})})}),L(U3e,{px:3,pb:3,pt:u?3:0,children:r})]})})}const L3e="/verifier/assets/verification-popup.1a3fc640.svg",N3e=sr(L6)({overflow:"scroll",background:"#F7F9FB",borderRadius:"5px",width:"100%"}),j3e=sr(kn)({background:"#F7F9FB",borderRadius:"5px",width:"100%"}),$3e=sr(z7)({"&.MuiTableHead-root th":{border:"none",fontSize:13}}),F3e=sr(xc)({fontWeight:700}),$p=sr(qp)({paddingLeft:0,paddingBottom:"2px"}),Fp=sr(rs)({paddingBottom:10}),z3e=sr($n)({width:59,height:21,background:"#08D088",borderRadius:40,color:"#fff",justifyContent:"space-around",fontSize:12}),id=sr(rs)({paddingBottom:16}),H3e=sr(uc)({textDecoration:"none",cursor:"pointer",color:"#0088CC"}),W3e=sr(kn)({width:"100%",display:"flex",justifyContent:"flex-end"}),a3=sr(jo)({color:"#728A96",fontSize:14}),V3e=sr(Fd)({fontSize:18,fontWeight:800,color:"#000",textAlign:"center"}),q3e=sr(kn)({display:"inline-flex",alignItems:"center",height:"20px",padding:"0 7px",background:"rgba(146, 146, 146, 0.3)",borderRadius:"10px",color:"#212121",fontWeight:400,fontSize:"14px",fontFamily:"IBM Plex Mono, monospace"});sr(q3e)({position:"relative",top:5,display:"inline-block",whiteSpace:"nowrap",lineHeight:"20px",width:"100%",maxWidth:600,overflow:"hidden",textOverflow:"ellipsis"});const K3e="/verifier/assets/verified.4e0dc210.svg",Am=()=>L(Xa,{width:"85%",variant:"text",sx:{transform:"none",background:"#e6e8eb"}}),G3e=()=>Ut($3e,{children:[Ut(F3e,{children:[L($p,{sx:{width:80,paddingLeft:3},children:"Status"}),L($p,{sx:{width:370},children:"Public Key"}),L($p,{sx:{width:35}}),L($p,{sx:{width:105},children:"IP"}),L($p,{sx:{width:150},children:"Verification date"}),L($p,{sx:{width:100},children:"Verifier"})]}),Ut(xc,{children:[L(Fp,{children:L(Fl,{})}),L(Fp,{children:L(Fl,{})}),L(Fp,{children:L(Fl,{})}),L(Fp,{children:L(Fl,{})}),L(Fp,{children:L(Fl,{})}),L(Fp,{children:L(Fl,{})})]})]}),OO=()=>Ut(xc,{children:[L(rs,{sx:{paddingLeft:3,paddingBottom:2},children:L(Am,{})}),L(id,{children:L(Am,{})}),L(id,{children:L(Xa,{width:25,variant:"text",sx:{transform:"none",background:"#e6e8eb"}})}),L(id,{children:L(Am,{})}),L(id,{children:L(Am,{})}),L(rs,{sx:{paddingRight:3,paddingBottom:2},children:L(Am,{})})]}),Y3e=({pubKey:e,endpoint:t,name:r,onCopy:i,date:o,url:a})=>Ut(xc,{children:[L(rs,{sx:{paddingLeft:3,paddingBottom:2},children:Ut(z3e,{px:1,children:[L("img",{src:K3e,alt:"Verified icon",width:11,height:11}),"Verified"]})}),L(id,{children:L(a3,{children:e})}),L(id,{children:L(Bs,{onClick:()=>i(e),sx:{padding:.5},children:L("img",{src:Wx,alt:"Copy icon",width:16,height:16})})}),L(id,{children:L(a3,{children:t})}),L(id,{children:L(a3,{children:o})}),L(rs,{sx:{paddingRight:3,paddingBottom:2},children:L($n,{children:L(H3e,{target:"_blank",href:a,children:r})})})]});function Q3e(){const{data:e,isLoading:t,error:r}=Pc(),{data:i,isLoading:o,error:a}=zx(),{showNotification:s}=Ry(),l=i?.find(c=>c.name===window.verifierId),u=X.exports.useCallback(async c=>{navigator.clipboard.writeText(c),s("Copied to clipboard!","success")},[]);return Ut(kn,{sx:{overflow:"scroll",borderRadius:"5px","::-webkit-scrollbar":{display:"none"}},children:[Ut(N3e,{sx:{minWidth:900},children:[L(G3e,{}),L(N6,{children:t||o?Ut(ta,{children:[L(OO,{}),L(OO,{})]}):l&&e&&Object.entries(l.pubKeyEndpoints).map(([c,d])=>L(Y3e,{pubKey:c,onCopy:u,url:l.url,date:e?.verificationDate?.toLocaleDateString()||"",endpoint:d,name:l.name},c))})]}),(!!r||!!a)&&`${r} ${a} (App notification)`]})}const Z3e="modulepreload",X3e=function(e){return"/verifier/"+e},BO={},Tm=function(t,r,i){if(!r||r.length===0)return t();const o=document.getElementsByTagName("link");return Promise.all(r.map(a=>{if(a=X3e(a),a in BO)return;BO[a]=!0;const s=a.endsWith(".css"),l=s?'[rel="stylesheet"]':"";if(!!i)for(let d=o.length-1;d>=0;d--){const p=o[d];if(p.href===a&&(!s||p.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${a}"]${l}`))return;const c=document.createElement("link");if(c.rel=s?"stylesheet":Z3e,s||(c.as="script",c.crossOrigin=""),c.href=a,document.head.appendChild(c),s)return new Promise((d,p)=>{c.addEventListener("load",d),c.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${a}`)))})})).then(()=>t())};var v1=(e=>(e.VALID="VALID",e.WASM="WebAssembly is not supported",e.COMPILER="Only FunC contracts can be verified",e.VERSION="FunC version is not supported",e))(v1||{});const J3e=["0.2.0","0.3.0","0.4.0","0.4.1"];function eSe(){const{data:e}=Pc(),{data:t}=vp(),[r,i]=X.exports.useState(null),[o,a]=X.exports.useState(!1),[s,l]=X.exports.useState(null),u=async()=>{wa(ha.IN_BROWSER_COMPILE_START),i(null),a(!0);const{FuncCompiler:p}=await Tm(()=>import("./index.a8990815.js").then(E=>E.i),[]),v=e?.files?.map(E=>({filename:E.name,content:E.content}))??[],x=e?.compilerSettings?.funcVersion;if(!x){i("FunC is not available for in-browser verification"),a(!1);return}let b;switch(x){case"0.2.0":{let{object:E}=await Tm(()=>import("./index.fbca1507.js").then(B=>B.i),[]);b=E;break}case"0.3.0":{let{object:E}=await Tm(()=>import("./index.f65cb428.js").then(B=>B.i),[]);b=E;break}case"0.4.0":{let{object:E}=await Tm(()=>import("./index.fb59a6c3.js").then(B=>B.i),[]);b=E;break}case"0.4.1":{let{object:E}=await Tm(()=>import("./index.bf0da248.js").then(B=>B.i),[]);b=E;break}}let _=await new p(b).compileFunc({sources:v,targets:(e?.compilerSettings).commandLine.split(" ").filter(E=>E.match(/\.(fc|func)$/))});if(_.status==="error"){i(_.message),a(!1),wa(ha.IN_BROWSER_COMPILE_ERROR);return}const k=Vn.Cell.fromBoc(Buffer.from(_.codeBoc,"base64"))[0];a(!1),t?.codeCellHash.base64===k.hash().toString("base64")&&l(k.hash().toString("base64")),wa(ha.IN_BROWSER_COMPILE_SUCCESS)},c=()=>xj()?e?.compiler!=="func"?"Only FunC contracts can be verified":d()?"VALID":"FunC version is not supported":"WebAssembly is not supported",d=()=>J3e.some(p=>p===e?.compilerSettings?.funcVersion);return{verifyContract:u,isVerificationEnabled:c,loading:o,error:r,hash:s}}function tSe(){const{verifyContract:e,isVerificationEnabled:t,error:r,loading:i,hash:o}=eSe(),a=la(),s=aa(a.breakpoints.down("md"));return Ut(kn,{p:2,children:[Ut(jo,{sx:{fontSize:14},children:["You are not required to rely on third-party validators. You can now verify this contract by yourself by having your browser download the sources and compile them locally in-browser using"," ",L(uc,{sx:{textDecoration:"none"},href:"https://github.com/ton-community/func-js",target:"_blank",children:"WASM"}),".",!nwe()&&L($n,{mt:1,sx:{overflow:"auto",maxHeight:300},children:Ut(Dd,{sx:{margin:0},children:["The web page you're looking at is"," ",L(uc,{sx:{textDecoration:"none"},href:"https://github.com/ton-community/contract-verifier",target:"_blank",children:"open source"}),", you can also fork or run it locally if you wish to have absolute control."]})})]}),t()!==v1.VALID?L($7,{arrow:!0,title:L(jo,{sx:{fontSize:13},children:t()}),placement:"top",children:L(kn,{sx:{width:144,margin:"auto"},children:L(Ha,{onClick:()=>e(),disabled:t()!==v1.VALID||i||!!o,fontSize:14,fontWeight:800,textColor:"#fff",height:44,width:144,background:"#1976d2",hoverBackground:"#156cc2",children:"Verify"})})}):Ut(Ha,{onClick:()=>e(),disabled:t()!==v1.VALID||i||!!o,fontSize:14,fontWeight:800,textColor:"#fff",height:44,width:144,background:"#1976d2",hoverBackground:"#156cc2",children:[i&&L(lg,{sx:{color:"#fff",height:"20px !important",width:"20px !important"}}),"Verify"]}),r&&Ut(ta,{children:[L(Cs,{noBottomMargin:!0,type:ps.ERROR,title:Ut(Dd,{children:[L("span",{style:{color:"#FC5656"},children:"Error: "}),"Compile error"]}),notificationBody:L(kn,{sx:{overflow:"auto",maxHeight:300},children:L("div",{children:L("code",{children:r})})})}),Ut(jo,{sx:{marginTop:1,fontSize:13},children:["You can ask for help in our"," ",L(uc,{sx:{textDecoration:"none",cursor:"pointer",color:"#0088CC"},href:"https://t.me/tonverifier",target:"_blank",children:"Telegram support group"})]})]}),!!o&&L(Cs,{noBottomMargin:!0,singleLine:!s,type:ps.SUCCESS,title:Ut($n,{sx:{height:42},children:[L($n,{mr:1,children:L("img",{src:R$,alt:"Like icon",width:31,height:31})}),Ut(O$,{children:[" ",L("b",{children:"Great!"})," Compile output hash matches this on-chain contract"]})]}),notificationBody:L(kn,{})})]})}function rSe(){const{data:e,isLoading:t}=Pc(),{isLoading:r}=zx();return Ut(kn,{sx:{width:"100%"},children:[e&&!r&&Ut(j3e,{pt:3,pb:1,children:[L(V3e,{children:"Verify manually"}),L(nSe,{})]}),(t||r)&&L(Xa,{width:"100%",height:250,sx:{transform:"none",borderRadius:"20px",background:"#e6e8eb"}})]})}Xi(H7)({borderBottom:"none","& .MuiTabs-indicator":{borderBottom:"4px solid #0088CC",borderRadius:20},"& .MuiTab-root.Mui-selected":{color:"#000",fontWeight:800}});function nSe(){return L(kn,{sx:{width:"100%"},children:L(tSe,{})})}function iSe({onClose:e}){const t=la(),r=aa(t.breakpoints.down("lg"));return L(D3e,{open:!0,maxWidth:r?"88%":1e3,hideCloseButton:!0,children:L(w6,{onClickAway:e,children:Ut(kn,{sx:{width:"100%"},children:[L(W3e,{pt:2,children:L(Bs,{sx:{padding:0},onClick:e,children:L("img",{src:b6,alt:"Close icon",width:15,height:15})})}),Ut($n,{mb:4,justifyContent:"center",children:[L("img",{src:L3e,alt:"Popup icon",width:41,height:41}),L(Fd,{pl:2,sx:{fontSize:18,fontWeight:800},children:"Verification Proof"})]}),L(Q3e,{}),L($n,{mt:3,children:L(rSe,{})})]})})})}const oSe=Xi($n)(({theme:e})=>t=>({flexWrap:t.makeFlexible?"wrap":"inherit",gap:t.makeFlexible?20:"inherit",justifyContent:t.makeFlexible?"center":"space-between",padding:24,[e.breakpoints.down("lg")]:{width:"70%",margin:"auto"}})),aSe=Xi(Fy)({boxSizing:"border-box",display:"flex",minWidth:200,maxWidth:260,height:108,background:"#F7F9FB",borderRadius:14,padding:"28px 13px"}),sSe=Xi(jo)({fontSize:14,color:"#000"}),lSe=[{icon:P3e,description:"This source code compiles to the same exact bytecode that is found on-chain."},{icon:R3e,description:"You can review verification proofs and perform your own client-side verification."},{icon:T3e,description:"Variable/function names may not reflect actual usage. compiler may remove unused code."},{icon:I3e,description:"Comments may not be honest and should generally be ignored."}],uSe=()=>{const[e]=yw(),[t,r]=Gn.useState(e.get("showProof")!==null),i=la(),o=aa(i.breakpoints.down("lg")),a=aa(i.breakpoints.down("md")),s=aa("(max-width: 450px)");return Ut(ug,{children:[L(p2,{mb:1,children:Ut($n,{sx:{justifyContent:"space-between",flexDirection:s?"column":"inherit",width:"100%"},children:[Ut($n,{mb:s?2:0,sx:{width:"100%"},children:[L(cg,{children:L("img",{src:O3e,alt:"Verification icon",width:41,height:41})}),L(Fd,{children:"How is this contract verified?"})]}),Ut("div",{children:[Ut(Ha,{fontSize:12,fontWeight:800,textColor:"#fff",background:"#1976d2",hoverBackground:"#156cc2",height:37,width:132,onClick:()=>{r(!0)},children:[L("img",{src:M3e,alt:"Show icon",width:19,height:19}),"Show Proof"]}),t&&L(iSe,{onClose:()=>r(!1)})]})]})}),L(oSe,{makeFlexible:o,isMobile:a,children:lSe.map(u=>Ut(aSe,{children:[L(Fy,{sx:{alignSelf:"flex-start"},mr:1.5,children:L("img",{alt:"Icon",src:u.icon,width:41,height:41})}),L(sSe,{children:u.description})]},u.description))})]})};function cSe(){const e=ej(m1),{isLoading:t,error:r,data:i}=bc(["latestVerifiedContracts"],async()=>(await(await fetch(`${e}/latestVerified`,{method:"GET"})).json()).slice(0,100));return{isLoading:t,error:r,data:i}}const dSe=sr(kn)(({theme:e})=>({background:"white",padding:"16px 20px",borderRadius:10,boxShadow:"rgb(114 138 150 / 8%) 0px 2px 16px",border:"0.5px solid rgba(114, 138, 150, 0.24)",cursor:"pointer",[e.breakpoints.down("sm")]:{width:280}})),fSe=sr(kn)(({theme:e})=>({maxWidth:1160,width:"calc(100% - 50px)",paddingTop:20,margin:"0 auto"})),pSe=sr(kn)({display:"flex",flexDirection:"row",flexWrap:"wrap",gap:24,margin:"0 auto",justifyContent:"left",overflow:"auto",marginTop:24,"-webkit-text-size-adjust":"100%"}),hSe=sr(kn)({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:16,color:"#728A96"}),gSe=sr(kn)({marginLeft:"auto",fontSize:14,background:"#F0F0F099",color:"#728A9699",padding:"2px 12px",borderRadius:4});function mSe(){const{data:e,isLoading:t}=cSe(),r=Ac(),i=X.exports.useRef(new Array(30).fill(null).map(o=>Math.random()*100));return Ut(fSe,{children:[L(jo,{variant:"h6",children:L("b",{children:"Latest verified contracts"})}),Ut(pSe,{children:[t&&i.current.map(o=>L(Xa,{sx:{borderRadius:2},variant:"rectangular",width:400+o,height:70})),e?.map(o=>Ut(dSe,{onClick:a=>{r(`/${o.address}`)},children:[L(hSe,{children:o.address}),Ut("div",{style:{display:"flex",alignItems:"center",marginTop:6.5},children:[L(jo,{sx:{fontSize:14,color:"#728A9699"},children:o.mainFile}),L(gSe,{children:o.compiler})]})]}))]})]})}const U$=Xi(kn)({maxWidth:1160,margin:"auto"}),D$=Xi(kn)(e=>({display:e.isMobile?"inherit":"flex",gap:20})),qv=Xi(kn)({boxSizing:"border-box",maxWidth:1160,width:"100%",marginTop:20,backgroundColor:"#fff",borderRadius:20,padding:20,color:"#000"});function UO(){const{isLoading:e,data:t,error:r}=Pc(),[i,o]=X.exports.useState(!1),a=la(),s=Cwe(),{contractAddress:l,isAddressEmpty:u}=$u(),{hasFiles:c}=zu(),d=X.exports.useRef(),p=aa(a.breakpoints.down("lg")),v=aa(a.breakpoints.down("md")),x=!r&&e&&l;AL(),Ewe(),lwe(),X.exports.useEffect(()=>{window.scrollTo({behavior:"auto",top:d.current?.offsetTop})},[window.location.pathname]);const{initialize:b}=cE(),{data:{funcVersions:y}}=uE();return X.exports.useEffect(()=>{(y?.length??0)>0&&b(y[0])},[y]),Ut(kn,{onDragEnter:()=>o(!0),onDrop:()=>o(!1),onClick:()=>o(!1),children:[L(u2,{sx:{color:"#fff",zIndex:4},open:i,onDragEnd:()=>o(!1)}),L(kn,{ref:d}),window.isTestnet&&L(BE,{}),L(gve,{}),l===null&&u&&L(mSe,{}),l===null&&!u&&L(kn,{m:4,children:L(Cs,{singleLine:!0,type:ps.ERROR,title:Ut($n,{sx:{height:42},children:[L("span",{style:{color:"#FC5656",marginRight:4},children:"Error: "}),"Invalid address"]}),notificationBody:L(kn,{})})}),Ut(U$,{px:p?"20px":0,children:[!!r&&L(kn,{mt:4,children:L(Cs,{type:ps.ERROR,title:Ut(Dd,{children:[L("span",{style:{color:"#FC5656"},children:"Error: "}),"Unable to fetch contract data"]}),notificationBody:L(kn,{sx:{overflow:"auto",maxHeight:300},children:L("pre",{children:L("code",{children:r.toString()})})})})}),x&&Ut(qv,{sx:{padding:"30px 24px 24px 24px"},mb:3,children:[Ut($n,{mb:3,children:[L(Xa,{variant:"circular",width:41,height:41,sx:{marginRight:2}}),L(Xa,{variant:"text",sx:{fontSize:"20px",width:200}})]}),L(Xa,{variant:"rectangular",width:"100%",height:250})]}),Ut(D$,{isMobile:v,children:[L(Owe,{}),t?.hasOnchainProof&&L(oxe,{})]}),x&&Ut(qv,{sx:{padding:"30px 24px 24px 24px"},mb:3,children:[Ut($n,{mb:3,children:[L(Xa,{variant:"circular",width:41,height:41,sx:{marginRight:2}}),L(Xa,{variant:"text",sx:{fontSize:"20px",width:200}})]}),L(Xa,{variant:"rectangular",width:"100%",height:250})]}),!e&&t?.hasOnchainProof&&L(uSe,{}),t&&(!t.hasOnchainProof||s)&&Ut(ta,{children:[L(C3e,{}),c()&&L(A3e,{})]}),t&&!c()?L(qv,{sx:{padding:0},mb:5,children:L(Swe,{})}):L(ta,{children:x&&Ut(qv,{sx:{padding:"30px 24px 24px 24px"},mb:5,children:[Ut($n,{mb:3,children:[L(Xa,{variant:"circular",width:41,height:41,sx:{marginRight:2}}),L(Xa,{variant:"text",sx:{fontSize:"20px",width:250}})]}),L(Xa,{variant:"rectangular",width:"100%",height:500})]})}),t&&L(Fb,{})]}),!t&&L(Fy,{sx:{bottom:0,width:"100%"},children:L(Fb,{})})]})}function L$({space:e}){return L("div",{style:{height:e}})}function ySe(){const[e,t]=X.exports.useState({spec:[],builder:Vn.beginCell()});return Ut("div",{children:[L("h4",{children:"Build the cell"}),L(wh,{required:!0,id:"outlined-required",label:"UINT",fullWidth:!0,onKeyUp:r=>{if(r.code==="Enter"){const[i,o]=r.target.value.split(",");t(a=>({spec:[...a.spec,{type:"uint"+o,value:i}],builder:a.builder.storeUint(i,o)})),r.target.value=""}}}),L(wh,{required:!0,id:"outlined-required",label:"Address",fullWidth:!0,onKeyUp:r=>{if(r.code==="Enter"){const i=r.target.value;t(o=>({spec:[...o.spec,{type:"address",value:i}],builder:o.builder.storeAddress(Vn.Address.parse(i))})),r.target.value=""}}}),L("div",{children:JSON.stringify(e.spec)}),L(L$,{space:30}),L(c2,{variant:"outlined",children:"Send the message"})]})}function vSe(){return Ut("div",{style:{margin:"0 auto",maxWidth:1100,padding:40},children:[L(B$,{}),L(L$,{space:35}),L(wh,{required:!0,id:"outlined-required",label:"Contract address",fullWidth:!0}),L(wh,{required:!0,id:"outlined-required",label:"Value",fullWidth:!0,type:"number"}),Ut("div",{children:[L("h3",{children:"OPs"}),L(wh,{required:!0,id:"outlined-required",label:"Value",fullWidth:!0,type:"number"}),L(ySe,{})]})]})}const bSe=v6({typography:{fontFamily:"Mulish"},components:{MuiSwitch:{styleOverrides:{switchBase:{color:"#ccc"},colorPrimary:{"&.Mui-checked":{color:"#fff"}},track:{opacity:1,backgroundColor:"#D1D1D6",".Mui-checked.Mui-checked + &":{opacity:1,backgroundColor:"#0088CC"}},thumb:{background:"#fff",boxShadow:"0px 2px 8px rgba(0, 0, 0, 0.16)"}}}}});function UE({label:e,data:t}){return Ut("div",{className:"InfoPiece",children:[L("div",{className:"InfoPiece-Label",children:e}),L("div",{className:"InfoPiece-Data",children:t})]})}var zy=e=>e.type==="checkbox",ch=e=>e instanceof Date,ds=e=>e==null;const N$=e=>typeof e=="object";var ka=e=>!ds(e)&&!Array.isArray(e)&&N$(e)&&!ch(e),j$=e=>ka(e)&&e.target?zy(e.target)?e.target.checked:e.target.value:e,wSe=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,$$=(e,t)=>e.has(wSe(t)),xSe=e=>{const t=e.constructor&&e.constructor.prototype;return ka(t)&&t.hasOwnProperty("isPrototypeOf")},DE=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Ja(e){let t;const r=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(DE&&(e instanceof Blob||e instanceof FileList))&&(r||ka(e)))if(t=r?[]:{},!r&&!xSe(e))t=e;else for(const i in e)e.hasOwnProperty(i)&&(t[i]=Ja(e[i]));else return e;return t}var Og=e=>Array.isArray(e)?e.filter(Boolean):[],Ro=e=>e===void 0,vn=(e,t,r)=>{if(!t||!ka(e))return r;const i=Og(t.split(/[,[\].]+?/)).reduce((o,a)=>ds(o)?o:o[a],e);return Ro(i)||i===e?Ro(e[t])?r:e[t]:i},vu=e=>typeof e=="boolean";const zb={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},yl={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Xu={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},_Se=Gn.createContext(null),Qx=()=>Gn.useContext(_Se);var F$=(e,t,r,i=!0)=>{const o={defaultValues:t._defaultValues};for(const a in e)Object.defineProperty(o,a,{get:()=>{const s=a;return t._proxyFormState[s]!==yl.all&&(t._proxyFormState[s]=!i||yl.all),r&&(r[s]=!0),e[s]}});return o},Vs=e=>ka(e)&&!Object.keys(e).length,z$=(e,t,r,i)=>{r(e);const{name:o,...a}=e;return Vs(a)||Object.keys(a).length>=Object.keys(t).length||Object.keys(a).find(s=>t[s]===(!i||yl.all))},Gs=e=>Array.isArray(e)?e:[e],H$=(e,t,r)=>!e||!t||e===t||Gs(e).some(i=>i&&(r?i===t:i.startsWith(t)||t.startsWith(i)));function Zx(e){const t=Gn.useRef(e);t.current=e,Gn.useEffect(()=>{const r=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{r&&r.unsubscribe()}},[e.disabled])}function SSe(e){const t=Qx(),{control:r=t.control,disabled:i,name:o,exact:a}=e||{},[s,l]=Gn.useState(r._formState),u=Gn.useRef(!0),c=Gn.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1}),d=Gn.useRef(o);return d.current=o,Zx({disabled:i,next:p=>u.current&&H$(d.current,p.name,a)&&z$(p,c.current,r._updateFormState)&&l({...r._formState,...p}),subject:r._subjects.state}),Gn.useEffect(()=>(u.current=!0,c.current.isValid&&r._updateValid(!0),()=>{u.current=!1}),[r]),F$(s,r,c.current,!1)}var bu=e=>typeof e=="string",W$=(e,t,r,i,o)=>bu(e)?(i&&t.watch.add(e),vn(r,e,o)):Array.isArray(e)?e.map(a=>(i&&t.watch.add(a),vn(r,a))):(i&&(t.watchAll=!0),r);function CSe(e){const t=Qx(),{control:r=t.control,name:i,defaultValue:o,disabled:a,exact:s}=e||{},l=Gn.useRef(i);l.current=i,Zx({disabled:a,subject:r._subjects.values,next:d=>{H$(l.current,d.name,s)&&c(Ja(W$(l.current,r._names,d.values||r._formValues,!1,o)))}});const[u,c]=Gn.useState(r._getWatch(i,o));return Gn.useEffect(()=>r._removeUnmounted()),u}var LE=e=>/^\w*$/.test(e),V$=e=>Og(e.replace(/["|']|\]/g,"").split(/\.|\[/));function Ao(e,t,r){let i=-1;const o=LE(t)?[t]:V$(t),a=o.length,s=a-1;for(;++i{const d=o._options.shouldUnregister||a,p=(v,x)=>{const b=vn(o._fields,v);b&&(b._f.mount=x)};if(p(r,!0),d){const v=Ja(vn(o._options.defaultValues,r));Ao(o._defaultValues,r,v),Ro(vn(o._formValues,r))&&Ao(o._formValues,r,v)}return()=>{(s?d&&!o._state.action:d)?o.unregister(r):p(r,!1)}},[r,o,s,a]),Gn.useEffect(()=>{vn(o._fields,r)&&o._updateDisabledField({disabled:i,fields:o._fields,name:r,value:vn(o._fields,r)._f.value})},[i,r,o]),{field:{name:r,value:l,...vu(i)||vu(u.disabled)?{disabled:u.disabled||i}:{},onChange:Gn.useCallback(d=>c.current.onChange({target:{value:j$(d),name:r},type:zb.CHANGE}),[r]),onBlur:Gn.useCallback(()=>c.current.onBlur({target:{value:vn(o._formValues,r),name:r},type:zb.BLUR}),[r,o]),ref:d=>{const p=vn(o._fields,r);p&&d&&(p._f.ref={focus:()=>d.focus(),select:()=>d.select(),setCustomValidity:v=>d.setCustomValidity(v),reportValidity:()=>d.reportValidity()})}},formState:u,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!vn(u.errors,r)},isDirty:{enumerable:!0,get:()=>!!vn(u.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!vn(u.touchedFields,r)},error:{enumerable:!0,get:()=>vn(u.errors,r)}})}}const ESe=e=>e.render(kSe(e));var ASe=(e,t,r,i,o)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[i]:o||!0}}:{},zc=()=>{const e=typeof performance>"u"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const r=(Math.random()*16+e)%16|0;return(t=="x"?r:r&3|8).toString(16)})},s3=(e,t,r={})=>r.shouldFocus||Ro(r.shouldFocus)?r.focusName||`${e}.${Ro(r.focusIndex)?t:r.focusIndex}.`:"",W4=e=>({isOnSubmit:!e||e===yl.onSubmit,isOnBlur:e===yl.onBlur,isOnChange:e===yl.onChange,isOnAll:e===yl.all,isOnTouch:e===yl.onTouched}),V4=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(i=>e.startsWith(i)&&/^\.\w+/.test(e.slice(i.length))));const d0=(e,t,r,i)=>{for(const o of r||Object.keys(e)){const a=vn(e,o);if(a){const{_f:s,...l}=a;if(s){if(s.refs&&s.refs[0]&&t(s.refs[0],o)&&!i)break;if(s.ref&&t(s.ref,s.name)&&!i)break}else ka(l)&&d0(l,t)}}};var q$=(e,t,r)=>{const i=Og(vn(e,r));return Ao(i,"root",t[r]),Ao(e,r,i),e},NE=e=>e.type==="file",od=e=>typeof e=="function",Hb=e=>{if(!DE)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},b1=e=>bu(e),jE=e=>e.type==="radio",Wb=e=>e instanceof RegExp;const DO={value:!1,isValid:!1},LO={value:!0,isValid:!0};var K$=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Ro(e[0].attributes.value)?Ro(e[0].value)||e[0].value===""?LO:{value:e[0].value,isValid:!0}:LO:DO}return DO};const NO={isValid:!1,value:null};var G$=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,NO):NO;function jO(e,t,r="validate"){if(b1(e)||Array.isArray(e)&&e.every(b1)||vu(e)&&!e)return{type:r,message:b1(e)?e:"",ref:t}}var zp=e=>ka(e)&&!Wb(e)?e:{value:e,message:""},q4=async(e,t,r,i,o)=>{const{ref:a,refs:s,required:l,maxLength:u,minLength:c,min:d,max:p,pattern:v,validate:x,name:b,valueAsNumber:y,mount:_,disabled:k}=e._f,E=vn(t,b);if(!_||k)return{};const B=s?s[0]:a,U=V=>{i&&B.reportValidity&&(B.setCustomValidity(vu(V)?"":V||""),B.reportValidity())},D={},j=jE(a),F=zy(a),H=j||F,W=(y||NE(a))&&Ro(a.value)&&Ro(E)||Hb(a)&&a.value===""||E===""||Array.isArray(E)&&!E.length,G=ASe.bind(null,b,r,D),ae=(V,oe,P,ee=Xu.maxLength,le=Xu.minLength)=>{const pe=V?oe:P;D[b]={type:V?ee:le,message:pe,ref:a,...G(V?ee:le,pe)}};if(o?!Array.isArray(E)||!E.length:l&&(!H&&(W||ds(E))||vu(E)&&!E||F&&!K$(s).isValid||j&&!G$(s).isValid)){const{value:V,message:oe}=b1(l)?{value:!!l,message:l}:zp(l);if(V&&(D[b]={type:Xu.required,message:oe,ref:B,...G(Xu.required,oe)},!r))return U(oe),D}if(!W&&(!ds(d)||!ds(p))){let V,oe;const P=zp(p),ee=zp(d);if(!ds(E)&&!isNaN(E)){const le=a.valueAsNumber||E&&+E;ds(P.value)||(V=le>P.value),ds(ee.value)||(oe=lenew Date(new Date().toDateString()+" "+ft),_e=a.type=="time",J=a.type=="week";bu(P.value)&&E&&(V=_e?pe(E)>pe(P.value):J?E>P.value:le>new Date(P.value)),bu(ee.value)&&E&&(oe=_e?pe(E)+V.value,ee=!ds(oe.value)&&E.length<+oe.value;if((P||ee)&&(ae(P,V.message,oe.message),!r))return U(D[b].message),D}if(v&&!W&&bu(E)){const{value:V,message:oe}=zp(v);if(Wb(V)&&!E.match(V)&&(D[b]={type:Xu.pattern,message:oe,ref:a,...G(Xu.pattern,oe)},!r))return U(oe),D}if(x){if(od(x)){const V=await x(E,t),oe=jO(V,B);if(oe&&(D[b]={...oe,...G(Xu.validate,oe.message)},!r))return U(oe.message),D}else if(ka(x)){let V={};for(const oe in x){if(!Vs(V)&&!r)break;const P=jO(await x[oe](E,t),B,oe);P&&(V={...P,...G(oe,P.message)},U(P.message),r&&(D[b]=V))}if(!Vs(V)&&(D[b]={ref:B,...V},!r))return D}}return U(!0),D};function l3(e,t){return[...e,...Gs(t)]}var u3=e=>Array.isArray(e)?e.map(()=>{}):void 0;function c3(e,t,r){return[...e.slice(0,t),...Gs(r),...e.slice(t)]}var d3=(e,t,r)=>Array.isArray(e)?(Ro(e[r])&&(e[r]=void 0),e.splice(r,0,e.splice(t,1)[0]),e):[];function f3(e,t){return[...Gs(t),...Gs(e)]}function TSe(e,t){let r=0;const i=[...e];for(const o of t)i.splice(o-r,1),r++;return Og(i).length?i:[]}var p3=(e,t)=>Ro(t)?[]:TSe(e,Gs(t).sort((r,i)=>r-i)),h3=(e,t,r)=>{e[t]=[e[r],e[r]=e[t]][0]};function ISe(e,t){const r=t.slice(0,-1).length;let i=0;for(;i(e[t]=r,e);function PSe(e){const t=Qx(),{control:r=t.control,name:i,keyName:o="id",shouldUnregister:a}=e,[s,l]=Gn.useState(r._getFieldArray(i)),u=Gn.useRef(r._getFieldArray(i).map(zc)),c=Gn.useRef(s),d=Gn.useRef(i),p=Gn.useRef(!1);d.current=i,c.current=s,r._names.array.add(i),e.rules&&r.register(i,e.rules),Zx({next:({values:D,name:j})=>{if(j===d.current||!j){const F=vn(D,d.current);Array.isArray(F)&&(l(F),u.current=F.map(zc))}},subject:r._subjects.array});const v=Gn.useCallback(D=>{p.current=!0,r._updateFieldArray(i,D)},[r,i]),x=(D,j)=>{const F=Gs(Ja(D)),H=l3(r._getFieldArray(i),F);r._names.focus=s3(i,H.length-1,j),u.current=l3(u.current,F.map(zc)),v(H),l(H),r._updateFieldArray(i,H,l3,{argA:u3(D)})},b=(D,j)=>{const F=Gs(Ja(D)),H=f3(r._getFieldArray(i),F);r._names.focus=s3(i,0,j),u.current=f3(u.current,F.map(zc)),v(H),l(H),r._updateFieldArray(i,H,f3,{argA:u3(D)})},y=D=>{const j=p3(r._getFieldArray(i),D);u.current=p3(u.current,D),v(j),l(j),r._updateFieldArray(i,j,p3,{argA:D})},_=(D,j,F)=>{const H=Gs(Ja(j)),W=c3(r._getFieldArray(i),D,H);r._names.focus=s3(i,D,F),u.current=c3(u.current,D,H.map(zc)),v(W),l(W),r._updateFieldArray(i,W,c3,{argA:D,argB:u3(j)})},k=(D,j)=>{const F=r._getFieldArray(i);h3(F,D,j),h3(u.current,D,j),v(F),l(F),r._updateFieldArray(i,F,h3,{argA:D,argB:j},!1)},E=(D,j)=>{const F=r._getFieldArray(i);d3(F,D,j),d3(u.current,D,j),v(F),l(F),r._updateFieldArray(i,F,d3,{argA:D,argB:j},!1)},B=(D,j)=>{const F=Ja(j),H=$O(r._getFieldArray(i),D,F);u.current=[...H].map((W,G)=>!W||G===D?zc():u.current[G]),v(H),l([...H]),r._updateFieldArray(i,H,$O,{argA:D,argB:F},!0,!1)},U=D=>{const j=Gs(Ja(D));u.current=j.map(zc),v([...j]),l([...j]),r._updateFieldArray(i,[...j],F=>F,{},!0,!1)};return Gn.useEffect(()=>{if(r._state.action=!1,V4(i,r._names)&&r._subjects.state.next({...r._formState}),p.current&&(!W4(r._options.mode).isOnSubmit||r._formState.isSubmitted))if(r._options.resolver)r._executeSchema([i]).then(D=>{const j=vn(D.errors,i),F=vn(r._formState.errors,i);(F?!j&&F.type||j&&(F.type!==j.type||F.message!==j.message):j&&j.type)&&(j?Ao(r._formState.errors,i,j):Ra(r._formState.errors,i),r._subjects.state.next({errors:r._formState.errors}))});else{const D=vn(r._fields,i);D&&D._f&&q4(D,r._formValues,r._options.criteriaMode===yl.all,r._options.shouldUseNativeValidation,!0).then(j=>!Vs(j)&&r._subjects.state.next({errors:q$(r._formState.errors,j,i)}))}r._subjects.values.next({name:i,values:{...r._formValues}}),r._names.focus&&d0(r._fields,(D,j)=>{if(r._names.focus&&j.startsWith(r._names.focus)&&D.focus)return D.focus(),1}),r._names.focus="",r._updateValid(),p.current=!1},[s,i,r]),Gn.useEffect(()=>(!vn(r._formValues,i)&&r._updateFieldArray(i),()=>{(r._options.shouldUnregister||a)&&r.unregister(i)}),[i,r,o,a]),{swap:Gn.useCallback(k,[v,i,r]),move:Gn.useCallback(E,[v,i,r]),prepend:Gn.useCallback(b,[v,i,r]),append:Gn.useCallback(x,[v,i,r]),remove:Gn.useCallback(y,[v,i,r]),insert:Gn.useCallback(_,[v,i,r]),update:Gn.useCallback(B,[v,i,r]),replace:Gn.useCallback(U,[v,i,r]),fields:Gn.useMemo(()=>s.map((D,j)=>({...D,[o]:u.current[j]||zc()})),[s,o])}}function g3(){let e=[];return{get observers(){return e},next:o=>{for(const a of e)a.next&&a.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(a=>a!==o)}}),unsubscribe:()=>{e=[]}}}var Vb=e=>ds(e)||!N$(e);function wf(e,t){if(Vb(e)||Vb(t))return e===t;if(ch(e)&&ch(t))return e.getTime()===t.getTime();const r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;for(const o of r){const a=e[o];if(!i.includes(o))return!1;if(o!=="ref"){const s=t[o];if(ch(a)&&ch(s)||ka(a)&&ka(s)||Array.isArray(a)&&Array.isArray(s)?!wf(a,s):a!==s)return!1}}return!0}var Y$=e=>e.type==="select-multiple",MSe=e=>jE(e)||zy(e),m3=e=>Hb(e)&&e.isConnected,Q$=e=>{for(const t in e)if(od(e[t]))return!0;return!1};function qb(e,t={}){const r=Array.isArray(e);if(ka(e)||r)for(const i in e)Array.isArray(e[i])||ka(e[i])&&!Q$(e[i])?(t[i]=Array.isArray(e[i])?[]:{},qb(e[i],t[i])):ds(e[i])||(t[i]=!0);return t}function Z$(e,t,r){const i=Array.isArray(e);if(ka(e)||i)for(const o in e)Array.isArray(e[o])||ka(e[o])&&!Q$(e[o])?Ro(t)||Vb(r[o])?r[o]=Array.isArray(e[o])?qb(e[o],[]):{...qb(e[o])}:Z$(e[o],ds(t)?{}:t[o],r[o]):r[o]=!wf(e[o],t[o]);return r}var y3=(e,t)=>Z$(e,t,qb(t)),X$=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:i})=>Ro(e)?e:t?e===""?NaN:e&&+e:r&&bu(e)?new Date(e):i?i(e):e;function v3(e){const t=e.ref;if(!(e.refs?e.refs.every(r=>r.disabled):t.disabled))return NE(t)?t.files:jE(t)?G$(e.refs).value:Y$(t)?[...t.selectedOptions].map(({value:r})=>r):zy(t)?K$(e.refs).value:X$(Ro(t.value)?e.ref.value:t.value,e)}var OSe=(e,t,r,i)=>{const o={};for(const a of e){const s=vn(t,a);s&&Ao(o,a,s._f)}return{criteriaMode:r,names:[...e],fields:o,shouldUseNativeValidation:i}},Im=e=>Ro(e)?e:Wb(e)?e.source:ka(e)?Wb(e.value)?e.value.source:e.value:e,BSe=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function FO(e,t,r){const i=vn(e,r);if(i||LE(r))return{error:i,name:r};const o=r.split(".");for(;o.length;){const a=o.join("."),s=vn(t,a),l=vn(e,a);if(s&&!Array.isArray(s)&&r!==a)return{name:r};if(l&&l.type)return{name:a,error:l};o.pop()}return{name:r}}var USe=(e,t,r,i,o)=>o.isOnAll?!1:!r&&o.isOnTouch?!(t||e):(r?i.isOnBlur:o.isOnBlur)?!e:(r?i.isOnChange:o.isOnChange)?e:!0,DSe=(e,t)=>!Og(vn(e,t)).length&&Ra(e,t);const LSe={mode:yl.onSubmit,reValidateMode:yl.onChange,shouldFocusError:!0};function NSe(e={},t){let r={...LSe,...e},i={submitCount:0,isDirty:!1,isLoading:od(r.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},errors:{},disabled:!1},o={},a=ka(r.defaultValues)||ka(r.values)?Ja(r.defaultValues||r.values)||{}:{},s=r.shouldUnregister?{}:Ja(a),l={action:!1,mount:!1,watch:!1},u={mount:new Set,unMount:new Set,array:new Set,watch:new Set},c,d=0;const p={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},v={values:g3(),array:g3(),state:g3()},x=e.resetOptions&&e.resetOptions.keepDirtyValues,b=W4(r.mode),y=W4(r.reValidateMode),_=r.criteriaMode===yl.all,k=fe=>Be=>{clearTimeout(d),d=setTimeout(fe,Be)},E=async fe=>{if(p.isValid||fe){const Be=r.resolver?Vs((await W()).errors):await ae(o,!0);Be!==i.isValid&&v.state.next({isValid:Be})}},B=fe=>p.isValidating&&v.state.next({isValidating:fe}),U=(fe,Be=[],rt,lt,jt=!0,ce=!0)=>{if(lt&&rt){if(l.action=!0,ce&&Array.isArray(vn(o,fe))){const ie=rt(vn(o,fe),lt.argA,lt.argB);jt&&Ao(o,fe,ie)}if(ce&&Array.isArray(vn(i.errors,fe))){const ie=rt(vn(i.errors,fe),lt.argA,lt.argB);jt&&Ao(i.errors,fe,ie),DSe(i.errors,fe)}if(p.touchedFields&&ce&&Array.isArray(vn(i.touchedFields,fe))){const ie=rt(vn(i.touchedFields,fe),lt.argA,lt.argB);jt&&Ao(i.touchedFields,fe,ie)}p.dirtyFields&&(i.dirtyFields=y3(a,s)),v.state.next({name:fe,isDirty:oe(fe,Be),dirtyFields:i.dirtyFields,errors:i.errors,isValid:i.isValid})}else Ao(s,fe,Be)},D=(fe,Be)=>{Ao(i.errors,fe,Be),v.state.next({errors:i.errors})},j=(fe,Be,rt,lt)=>{const jt=vn(o,fe);if(jt){const ce=vn(s,fe,Ro(rt)?vn(a,fe):rt);Ro(ce)||lt&<.defaultChecked||Be?Ao(s,fe,Be?ce:v3(jt._f)):le(fe,ce),l.mount&&E()}},F=(fe,Be,rt,lt,jt)=>{let ce=!1,ie=!1;const de={name:fe};if(!rt||lt){p.isDirty&&(ie=i.isDirty,i.isDirty=de.isDirty=oe(),ce=ie!==de.isDirty);const $=wf(vn(a,fe),Be);ie=vn(i.dirtyFields,fe),$?Ra(i.dirtyFields,fe):Ao(i.dirtyFields,fe,!0),de.dirtyFields=i.dirtyFields,ce=ce||p.dirtyFields&&ie!==!$}if(rt){const $=vn(i.touchedFields,fe);$||(Ao(i.touchedFields,fe,rt),de.touchedFields=i.touchedFields,ce=ce||p.touchedFields&&$!==rt)}return ce&&jt&&v.state.next(de),ce?de:{}},H=(fe,Be,rt,lt)=>{const jt=vn(i.errors,fe),ce=p.isValid&&vu(Be)&&i.isValid!==Be;if(e.delayError&&rt?(c=k(()=>D(fe,rt)),c(e.delayError)):(clearTimeout(d),c=null,rt?Ao(i.errors,fe,rt):Ra(i.errors,fe)),(rt?!wf(jt,rt):jt)||!Vs(lt)||ce){const ie={...lt,...ce&&vu(Be)?{isValid:Be}:{},errors:i.errors,name:fe};i={...i,...ie},v.state.next(ie)}B(!1)},W=async fe=>r.resolver(s,r.context,OSe(fe||u.mount,o,r.criteriaMode,r.shouldUseNativeValidation)),G=async fe=>{const{errors:Be}=await W(fe);if(fe)for(const rt of fe){const lt=vn(Be,rt);lt?Ao(i.errors,rt,lt):Ra(i.errors,rt)}else i.errors=Be;return Be},ae=async(fe,Be,rt={valid:!0})=>{for(const lt in fe){const jt=fe[lt];if(jt){const{_f:ce,...ie}=jt;if(ce){const de=u.array.has(ce.name),$=await q4(jt,s,_,r.shouldUseNativeValidation&&!Be,de);if($[ce.name]&&(rt.valid=!1,Be))break;!Be&&(vn($,ce.name)?de?q$(i.errors,$,ce.name):Ao(i.errors,ce.name,$[ce.name]):Ra(i.errors,ce.name))}ie&&await ae(ie,Be,rt)}}return rt.valid},V=()=>{for(const fe of u.unMount){const Be=vn(o,fe);Be&&(Be._f.refs?Be._f.refs.every(rt=>!m3(rt)):!m3(Be._f.ref))&&vr(fe)}u.unMount=new Set},oe=(fe,Be)=>(fe&&Be&&Ao(s,fe,Be),!wf(He(),a)),P=(fe,Be,rt)=>W$(fe,u,{...l.mount?s:Ro(Be)?a:bu(fe)?{[fe]:Be}:Be},rt,Be),ee=fe=>Og(vn(l.mount?s:a,fe,e.shouldUnregister?vn(a,fe,[]):[])),le=(fe,Be,rt={})=>{const lt=vn(o,fe);let jt=Be;if(lt){const ce=lt._f;ce&&(!ce.disabled&&Ao(s,fe,X$(Be,ce)),jt=Hb(ce.ref)&&ds(Be)?"":Be,Y$(ce.ref)?[...ce.ref.options].forEach(ie=>ie.selected=jt.includes(ie.value)):ce.refs?zy(ce.ref)?ce.refs.length>1?ce.refs.forEach(ie=>(!ie.defaultChecked||!ie.disabled)&&(ie.checked=Array.isArray(jt)?!!jt.find(de=>de===ie.value):jt===ie.value)):ce.refs[0]&&(ce.refs[0].checked=!!jt):ce.refs.forEach(ie=>ie.checked=ie.value===jt):NE(ce.ref)?ce.ref.value="":(ce.ref.value=jt,ce.ref.type||v.values.next({name:fe,values:{...s}})))}(rt.shouldDirty||rt.shouldTouch)&&F(fe,jt,rt.shouldTouch,rt.shouldDirty,!0),rt.shouldValidate&&Le(fe)},pe=(fe,Be,rt)=>{for(const lt in Be){const jt=Be[lt],ce=`${fe}.${lt}`,ie=vn(o,ce);(u.array.has(fe)||!Vb(jt)||ie&&!ie._f)&&!ch(jt)?pe(ce,jt,rt):le(ce,jt,rt)}},_e=(fe,Be,rt={})=>{const lt=vn(o,fe),jt=u.array.has(fe),ce=Ja(Be);Ao(s,fe,ce),jt?(v.array.next({name:fe,values:{...s}}),(p.isDirty||p.dirtyFields)&&rt.shouldDirty&&v.state.next({name:fe,dirtyFields:y3(a,s),isDirty:oe(fe,ce)})):lt&&!lt._f&&!ds(ce)?pe(fe,ce,rt):le(fe,ce,rt),V4(fe,u)&&v.state.next({...i}),v.values.next({name:fe,values:{...s}}),!l.mount&&t()},J=async fe=>{const Be=fe.target;let rt=Be.name,lt=!0;const jt=vn(o,rt),ce=()=>Be.type?v3(jt._f):j$(fe),ie=de=>{lt=Number.isNaN(de)||de===vn(s,rt,de)};if(jt){let de,$;const C=ce(),T=fe.type===zb.BLUR||fe.type===zb.FOCUS_OUT,Q=!BSe(jt._f)&&!r.resolver&&!vn(i.errors,rt)&&!jt._f.deps||USe(T,vn(i.touchedFields,rt),i.isSubmitted,y,b),ve=V4(rt,u,T);Ao(s,rt,C),T?(jt._f.onBlur&&jt._f.onBlur(fe),c&&c(0)):jt._f.onChange&&jt._f.onChange(fe);const je=F(rt,C,T,!1),ct=!Vs(je)||ve;if(!T&&v.values.next({name:rt,type:fe.type,values:{...s}}),Q)return p.isValid&&E(),ct&&v.state.next({name:rt,...ve?{}:je});if(!T&&ve&&v.state.next({...i}),B(!0),r.resolver){const{errors:ur}=await W([rt]);if(ie(C),lt){const Dr=FO(i.errors,o,rt),hr=FO(ur,o,Dr.name||rt);de=hr.error,rt=hr.name,$=Vs(ur)}}else de=(await q4(jt,s,_,r.shouldUseNativeValidation))[rt],ie(C),lt&&(de?$=!1:p.isValid&&($=await ae(o,!0)));lt&&(jt._f.deps&&Le(jt._f.deps),H(rt,$,de,je))}},ft=(fe,Be)=>{if(vn(i.errors,Be)&&fe.focus)return fe.focus(),1},Le=async(fe,Be={})=>{let rt,lt;const jt=Gs(fe);if(B(!0),r.resolver){const ce=await G(Ro(fe)?fe:jt);rt=Vs(ce),lt=fe?!jt.some(ie=>vn(ce,ie)):rt}else fe?(lt=(await Promise.all(jt.map(async ce=>{const ie=vn(o,ce);return await ae(ie&&ie._f?{[ce]:ie}:ie)}))).every(Boolean),!(!lt&&!i.isValid)&&E()):lt=rt=await ae(o);return v.state.next({...!bu(fe)||p.isValid&&rt!==i.isValid?{}:{name:fe},...r.resolver||!fe?{isValid:rt}:{},errors:i.errors,isValidating:!1}),Be.shouldFocus&&!lt&&d0(o,ft,fe?jt:u.mount),lt},He=fe=>{const Be={...a,...l.mount?s:{}};return Ro(fe)?Be:bu(fe)?vn(Be,fe):fe.map(rt=>vn(Be,rt))},nr=(fe,Be)=>({invalid:!!vn((Be||i).errors,fe),isDirty:!!vn((Be||i).dirtyFields,fe),isTouched:!!vn((Be||i).touchedFields,fe),error:vn((Be||i).errors,fe)}),Bt=fe=>{fe&&Gs(fe).forEach(Be=>Ra(i.errors,Be)),v.state.next({errors:fe?i.errors:{}})},Rt=(fe,Be,rt)=>{const lt=(vn(o,fe,{_f:{}})._f||{}).ref;Ao(i.errors,fe,{...Be,ref:lt}),v.state.next({name:fe,errors:i.errors,isValid:!1}),rt&&rt.shouldFocus&<&<.focus&<.focus()},Jt=(fe,Be)=>od(fe)?v.values.subscribe({next:rt=>fe(P(void 0,Be),rt)}):P(fe,Be,!0),vr=(fe,Be={})=>{for(const rt of fe?Gs(fe):u.mount)u.mount.delete(rt),u.array.delete(rt),Be.keepValue||(Ra(o,rt),Ra(s,rt)),!Be.keepError&&Ra(i.errors,rt),!Be.keepDirty&&Ra(i.dirtyFields,rt),!Be.keepTouched&&Ra(i.touchedFields,rt),!r.shouldUnregister&&!Be.keepDefaultValue&&Ra(a,rt);v.values.next({values:{...s}}),v.state.next({...i,...Be.keepDirty?{isDirty:oe()}:{}}),!Be.keepIsValid&&E()},At=({disabled:fe,name:Be,field:rt,fields:lt,value:jt})=>{if(vu(fe)){const ce=fe?void 0:Ro(jt)?v3(rt?rt._f:vn(lt,Be)._f):jt;Ao(s,Be,ce),F(Be,ce,!1,!1,!0)}},kt=(fe,Be={})=>{let rt=vn(o,fe);const lt=vu(Be.disabled);return Ao(o,fe,{...rt||{},_f:{...rt&&rt._f?rt._f:{ref:{name:fe}},name:fe,mount:!0,...Be}}),u.mount.add(fe),rt?At({field:rt,disabled:Be.disabled,name:fe}):j(fe,!0,Be.value),{...lt?{disabled:Be.disabled}:{},...r.progressive?{required:!!Be.required,min:Im(Be.min),max:Im(Be.max),minLength:Im(Be.minLength),maxLength:Im(Be.maxLength),pattern:Im(Be.pattern)}:{},name:fe,onChange:J,onBlur:J,ref:jt=>{if(jt){kt(fe,Be),rt=vn(o,fe);const ce=Ro(jt.value)&&jt.querySelectorAll&&jt.querySelectorAll("input,select,textarea")[0]||jt,ie=MSe(ce),de=rt._f.refs||[];if(ie?de.find($=>$===ce):ce===rt._f.ref)return;Ao(o,fe,{_f:{...rt._f,...ie?{refs:[...de.filter(m3),ce,...Array.isArray(vn(a,fe))?[{}]:[]],ref:{type:ce.type,name:fe}}:{ref:ce}}}),j(fe,!1,void 0,ce)}else rt=vn(o,fe,{}),rt._f&&(rt._f.mount=!1),(r.shouldUnregister||Be.shouldUnregister)&&!($$(u.array,fe)&&l.action)&&u.unMount.add(fe)}}},Ct=()=>r.shouldFocusError&&d0(o,ft,u.mount),Lt=fe=>{vu(fe)&&(v.state.next({disabled:fe}),d0(o,Be=>{Be.disabled=fe},0,!1))},Kt=(fe,Be)=>async rt=>{rt&&(rt.preventDefault&&rt.preventDefault(),rt.persist&&rt.persist());let lt=Ja(s);if(v.state.next({isSubmitting:!0}),r.resolver){const{errors:jt,values:ce}=await W();i.errors=jt,lt=ce}else await ae(o);Ra(i.errors,"root"),Vs(i.errors)?(v.state.next({errors:{}}),await fe(lt,rt)):(Be&&await Be({...i.errors},rt),Ct(),setTimeout(Ct)),v.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Vs(i.errors),submitCount:i.submitCount+1,errors:i.errors})},yr=(fe,Be={})=>{vn(o,fe)&&(Ro(Be.defaultValue)?_e(fe,vn(a,fe)):(_e(fe,Be.defaultValue),Ao(a,fe,Be.defaultValue)),Be.keepTouched||Ra(i.touchedFields,fe),Be.keepDirty||(Ra(i.dirtyFields,fe),i.isDirty=Be.defaultValue?oe(fe,vn(a,fe)):oe()),Be.keepError||(Ra(i.errors,fe),p.isValid&&E()),v.state.next({...i}))},ne=(fe,Be={})=>{const rt=fe?Ja(fe):a,lt=Ja(rt),jt=fe&&!Vs(fe)?lt:a;if(Be.keepDefaultValues||(a=rt),!Be.keepValues){if(Be.keepDirtyValues||x)for(const ce of u.mount)vn(i.dirtyFields,ce)?Ao(jt,ce,vn(s,ce)):_e(ce,vn(jt,ce));else{if(DE&&Ro(fe))for(const ce of u.mount){const ie=vn(o,ce);if(ie&&ie._f){const de=Array.isArray(ie._f.refs)?ie._f.refs[0]:ie._f.ref;if(Hb(de)){const $=de.closest("form");if($){$.reset();break}}}}o={}}s=e.shouldUnregister?Be.keepDefaultValues?Ja(a):{}:Ja(jt),v.array.next({values:{...jt}}),v.values.next({values:{...jt}})}u={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},!l.mount&&t(),l.mount=!p.isValid||!!Be.keepIsValid,l.watch=!!e.shouldUnregister,v.state.next({submitCount:Be.keepSubmitCount?i.submitCount:0,isDirty:Be.keepDirty?i.isDirty:!!(Be.keepDefaultValues&&!wf(fe,a)),isSubmitted:Be.keepIsSubmitted?i.isSubmitted:!1,dirtyFields:Be.keepDirtyValues?i.dirtyFields:Be.keepDefaultValues&&fe?y3(a,fe):{},touchedFields:Be.keepTouched?i.touchedFields:{},errors:Be.keepErrors?i.errors:{},isSubmitSuccessful:Be.keepIsSubmitSuccessful?i.isSubmitSuccessful:!1,isSubmitting:!1})},Mt=(fe,Be)=>ne(od(fe)?fe(s):fe,Be);return{control:{register:kt,unregister:vr,getFieldState:nr,handleSubmit:Kt,setError:Rt,_executeSchema:W,_getWatch:P,_getDirty:oe,_updateValid:E,_removeUnmounted:V,_updateFieldArray:U,_updateDisabledField:At,_getFieldArray:ee,_reset:ne,_resetDefaultValues:()=>od(r.defaultValues)&&r.defaultValues().then(fe=>{Mt(fe,r.resetOptions),v.state.next({isLoading:!1})}),_updateFormState:fe=>{i={...i,...fe}},_disableForm:Lt,_subjects:v,_proxyFormState:p,get _fields(){return o},get _formValues(){return s},get _state(){return l},set _state(fe){l=fe},get _defaultValues(){return a},get _names(){return u},set _names(fe){u=fe},get _formState(){return i},set _formState(fe){i=fe},get _options(){return r},set _options(fe){r={...r,...fe}}},trigger:Le,register:kt,handleSubmit:Kt,watch:Jt,setValue:_e,getValues:He,reset:Mt,resetField:yr,clearErrors:Bt,unregister:vr,setError:Rt,setFocus:(fe,Be={})=>{const rt=vn(o,fe),lt=rt&&rt._f;if(lt){const jt=lt.refs?lt.refs[0]:lt.ref;jt.focus&&(jt.focus(),Be.shouldSelect&&jt.select())}},getFieldState:nr}}function w1(e={}){const t=Gn.useRef(),r=Gn.useRef(),[i,o]=Gn.useState({isDirty:!1,isValidating:!1,isLoading:od(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},errors:{},disabled:!1,defaultValues:od(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...NSe(e,()=>o(s=>({...s}))),formState:i});const a=t.current.control;return a._options=e,Zx({subject:a._subjects.state,next:s=>{z$(s,a._proxyFormState,a._updateFormState,!0)&&o({...a._formState})}}),Gn.useEffect(()=>a._disableForm(e.disabled),[a,e.disabled]),Gn.useEffect(()=>{if(a._proxyFormState.isDirty){const s=a._getDirty();s!==i.isDirty&&a._subjects.state.next({isDirty:s})}},[a,i.isDirty]),Gn.useEffect(()=>{e.values&&!wf(e.values,r.current)?(a._reset(e.values,a._options.resetOptions),r.current=e.values):a._resetDefaultValues()},[e.values,a]),Gn.useEffect(()=>{a._state.mount||(a._updateValid(),a._state.mount=!0),a._state.watch&&(a._state.watch=!1,a._subjects.state.next({...a._formState})),a._removeUnmounted()}),t.current.formState=F$(i,a),t.current}function ic({label:e,name:t,control:r}){return L(ESe,{name:t,control:r,render:({field:i,fieldState:{error:o}})=>L(wh,{helperText:o?o.message:null,error:!!o,fullWidth:!0,label:e,variant:"outlined",...i})})}function jSe(e){return Vn.beginCell().storeUint(2003,32).storeUint(0,64).storeAddress(e).endCell()}function $Se(e){return Vn.beginCell().storeUint(3004,32).storeUint(0,64).storeAddress(e).endCell()}function FSe(e,t){return Vn.beginCell().storeUint(6007,32).storeUint(0,64).storeCoins(e).storeCoins(t).endCell()}function zSe(){const{data:e,isLoading:t}=Dy();kg();const r=fE(),i=w1({defaultValues:{admin:e?.admin||""}}),o=w1({defaultValues:{verifierRegistry:e?.verifierRegistry||""}}),a=w1({defaultValues:{minTon:e?.deploymentCosts.min||"",maxTon:e?.deploymentCosts.max||""}});async function s(c){if(!e?.address)throw new Error("no address");if(c.admin!==e?.admin)try{const d=$Se(Vn.Address.parse(c.admin));await r(e.address.toString(),Vn.toNano("0.01"),d)==="rejected"&&i.setError("admin",{message:"Failed to change admin"})}catch(d){let p="Failed to change admin";"message"in d&&(p=d.message),i.setError("admin",{message:p})}}async function l(c){if(!e?.address)throw new Error("no address");if(c.verifierRegistry!==e?.verifierRegistry)try{const d=jSe(Vn.Address.parse(c.verifierRegistry));await r(e.address.toString(),Vn.toNano("0.01"),d)==="rejected"&&o.setError("verifierRegistry",{message:"Failed to change verifier registry"})}catch(d){let p="Failed to change verifier registry";"message"in d&&(p=d.message),o.setError("verifierRegistry",{message:p})}}async function u(c){if(!e?.address)throw new Error("no address");if(c.minTon!==e?.deploymentCosts.min||c.maxTon!==e?.deploymentCosts.max)try{const d=FSe(Vn.toNano(c.minTon),Vn.toNano(c.maxTon));await r(e.address.toString(),Vn.toNano("0.01"),d)==="rejected"&&a.setError("root",{message:"Failed to change deployment costs"})}catch(d){let p="Failed to change deployment costs";"message"in d&&(p=d.message),a.setError("root",{message:p})}}return X.exports.useEffect(()=>{e&&(i.reset({admin:e.admin}),o.reset({verifierRegistry:e.verifierRegistry}),a.reset({minTon:e.deploymentCosts.min,maxTon:e.deploymentCosts.max}))},[e]),Ut(xs,{spacing:4,p:4,children:[L("h1",{children:"Sources Registry"}),t&&L(lg,{}),e&&Ut(ta,{children:[L(UE,{label:"Address",data:e.address.toString()}),L("form",{id:"adminForm",onSubmit:i.handleSubmit(s),children:Ut(xs,{spacing:2,children:[!i.formState.isValid&&L(d1,{severity:"error",children:Object.entries(i.formState.errors).map(([c,d])=>L("div",{children:d.message},c))}),Ut(xs,{direction:"row",spacing:2,alignItems:"center",children:[L(ic,{...i.register("admin"),control:i.control,label:"Admin"}),L(nd,{text:"Save",type:"submit",disabled:!i.formState.isDirty})]})]})}),L("form",{id:"verifierRegistryForm",onSubmit:o.handleSubmit(l),children:Ut(xs,{spacing:2,children:[!o.formState.isValid&&L(d1,{severity:"error",children:Object.entries(o.formState.errors).map(([c,d])=>L("div",{children:d.message},c))}),Ut(xs,{direction:"row",spacing:2,alignItems:"center",children:[L(ic,{...o.register("verifierRegistry"),control:o.control,label:"Verifier Reg."}),L(nd,{text:"Save",type:"submit",disabled:!o.formState.isDirty})]})]})}),L("form",{id:"sourcesRegistryForm",onSubmit:a.handleSubmit(u),children:Ut(xs,{spacing:2,children:[!a.formState.isValid&&L(d1,{severity:"error",children:Object.entries(a.formState.errors).map(([c,d])=>L("div",{children:d.message},c))}),Ut(xs,{direction:"row",spacing:2,alignItems:"center",children:[L(ic,{...a.register("minTon"),control:a.control,label:"Min Ton"}),L(ic,{...a.register("maxTon"),control:a.control,label:"Max Ton"}),L(nd,{text:"Save",type:"submit",disabled:!a.formState.isDirty})]})]})})]})]})}const J$={removeVerifier:435836471,updateVerifier:1610798618,forwardMessage:1965127512};function zO(e){return Ib(V1e(e))}function HSe(e){let t=e.split(".");return((+t[0]*256+ +t[1])*256+ +t[2])*256+ +t[3]}function WSe(){return{serialize:(e,t)=>{t.storeSlice(e)},parse:e=>e}}function VSe(e){let t=Vn.beginCell();t.storeUint(J$.updateVerifier,32),t.storeUint(e.queryId||0,64),t.storeUint(e.id,256),t.storeUint(e.quorum,8);let r=Vn.Dictionary.empty(Vn.Dictionary.Keys.BigUint(256),WSe());return e.endpoints.forEach(function(i,o){r.set(o,Vn.beginCell().storeUint(i,32).endCell().beginParse())}),t.storeDict(r),t.storeRef(Vn.beginCell().storeBuffer(Buffer.from(e.name)).endCell()),t.storeRef(Vn.beginCell().storeBuffer(Buffer.from(e.marketingUrl)).endCell()),t.endCell()}function qSe(e){let t=Vn.beginCell();return t.storeUint(J$.removeVerifier,32),t.storeUint(e.queryId||0,64),t.storeUint(e.id,256),t.endCell()}function HO({verifier:e,altColor:t,isNew:r}){const i=fE(),{data:o}=Dy(),a=X.exports.useMemo(()=>Object.entries(e.pubKeyEndpoints).map(([p,v])=>({pubKey:p,ip:v})),[e.pubKeyEndpoints]),s=w1({defaultValues:{quorum:e.quorum.toString()||"",name:e.name||"",url:e.url||"",pubKeyEndpoints:a||[]},mode:"onChange"});async function l(p){if(!p.name){s.setError("name",{message:"Name is required"});return}if(!p.url){s.setError("url",{message:"Url is required"});return}if(!p.quorum||Number(p.quorum)<1){s.setError("quorum",{message:"Quorum is required and should be at least 1"});return}try{await i(o?.verifierRegistry??"",Vn.toNano(r?"1000":"0.01"),VSe({id:zO(p.name),quorum:Number(p.quorum),endpoints:new Map(p.pubKeyEndpoints.map(({pubKey:x,ip:b})=>[Ib(Buffer.from(x,"base64")),HSe(b)])),name:p.name,marketingUrl:p.url}))==="rejected"&&s.setError("root",{message:`Failed to update config of ${p.name}`})}catch(v){let x=`Failed to update config of ${p.name}`;"message"in v&&(x=v.message),s.setError("root",{message:x})}}const{fields:u,append:c,remove:d}=PSe({control:s.control,name:"pubKeyEndpoints"});return L("form",{id:e.admin.toString(),onSubmit:s.handleSubmit(l),children:Ut(xs,{spacing:4,px:4,py:6,style:{backgroundColor:t?"#eeeeef":"transparent"},children:[!s.formState.isValid&&L(d1,{severity:"error",children:Object.entries(s.formState.errors).map(([p,v])=>L("div",{children:v.message},p))}),Ut(xs,{flexDirection:"row",alignItems:"center",gap:2,children:[L("h3",{style:{margin:0},children:r?"Add Verifier":s.getValues("name")}),!r&&L(nd,{text:"Remove",onClick:()=>{i(o.verifierRegistry,Vn.toNano("0.01"),qSe({id:zO(s.getValues("name"))}))}})]}),L(UE,{label:"Admin",data:e.admin.toString()}),r&&L(ic,{label:"Name",name:"name",control:s.control}),L(ic,{label:"Url",name:"url",control:s.control}),L(ic,{label:"Quorum",name:"quorum",control:s.control}),Ut(xs,{spacing:2,alignItems:"flex-start",children:[Ut(xs,{direction:"row",spacing:4,alignItems:"center",children:[L("h4",{children:"Public Key Endpoints"}),L(nd,{size:"small",text:"Add",onClick:()=>{c({pubKey:"",ip:""})}})]}),u.map((p,v)=>Ut(Cv,{container:!0,alignItems:"center",gap:2,wrap:"nowrap",children:[L(Cv,{item:!0,xs:6,children:L(ic,{label:`PubKey-${v}`,name:`pubKeyEndpoints.${v}.pubKey`,control:s.control})}),L(Cv,{item:!0,xs:5,children:L(ic,{label:`IP-${v}`,name:`pubKeyEndpoints.${v}.ip`,control:s.control})}),L(Cv,{item:!0,xs:1,children:L(nd,{text:"Remove",onClick:()=>d(v)})})]},p.id))]}),L(nd,{text:r?"Add verifier":"Update config",type:"submit",disabled:!s.formState.isDirty})]})})}function KSe(){const{data:e,isLoading:t}=zx(),{data:r}=Dy(),[i]=kg();return Ut(xs,{spacing:4,p:4,children:[L("h1",{children:"Verifier Registry"}),L(UE,{label:"Address",data:r?.verifierRegistry??""}),t&&L(lg,{}),Ut(xs,{children:[t&&"Loading...",e?.map((o,a)=>L(HO,{verifier:o,altColor:a%2!==1,isNew:!1}))]}),i.account?.address&&L(HO,{isNew:!0,altColor:!0,verifier:{admin:Vn.Address.parse(i.account?.address),name:"",quorum:0,url:"",pubKeyEndpoints:{}}})]})}function GSe(){return Ut("div",{children:[window.isTestnet&&L(BE,{}),Ut(xs,{direction:"row",justifyContent:"space-between",alignItems:"center",p:4,children:[L("h1",{children:"Admin"}),L(Ux,{})]}),L(zSe,{}),L(KSe,{}),L(Fb,{})]})}const YSe=sr(kn)(({theme:e})=>t=>({display:t.isMobile?"flex":"inherit",alignItems:t.isMobile?"center":"inherit",fontWight:700,color:"#fff",height:t.isMobile?90:100,background:"#fff",borderBottomLeftRadius:e.spacing(6),borderBottomRightRadius:e.spacing(6),border:"0.5px solid rgba(114, 138, 150, 0.24)",boxShadow:"rgb(114 138 150 / 8%) 0px 2px 16px"}));function QSe(){const e=la(),t=aa(e.breakpoints.down("md")),r=aa(e.breakpoints.down("lg"));return L(YSe,{px:r?3.4:0,isMobile:t,children:Ut(IL,{mb:5,children:[Ut(ap,{children:[L("img",{src:vw,width:30,height:30,alt:"App icon"}),L(cx,{children:"TACT DEPLOYER"})]}),Ut(TL,{children:[L($n,{mr:t?0:2,children:L(Ux,{})}),!t&&Ut(ap,{href:$6,target:"_blank",children:[L("img",{src:ZC,alt:"Github icon",width:20,height:20}),L(xk,{children:"GitHub"})]})]})]})})}const ZSe=sr("input")({display:"flex",alignItems:"center",paddingLeft:14,boxSizing:"border-box",height:34,background:"#FFFFFF",border:"1px solid #D8D8D8",borderRadius:"12px",fontSize:14,fontFamily:"Mulish",outline:"none","&:hover":{border:"1px solid #b0b0b0"},"&:focus":{border:"1px solid #807e7e"}}),XSe=Vn.Cell.fromBoc(Buffer.from("te6cckEBAQEADgAAGJRqmLYAAAAAAAAAAOnNeQ0=","base64"))[0];async function b3(e){const t=`https://tact-deployer${window.isTestnet?"-testnet":""}.infura-ipfs.io`;return fetch(`${t}/ipfs/${e}`)}function $E({workchain:e}){const{ipfsHash:t}=xU(),{data:r,error:i,isLoading:o}=bc(["tactDeploy",t],async()=>{if(!t)return null;const a=await yp(),s=await b3(t).then(_=>_.json()),l=await b3(s.pkg).then(_=>_.json()),u=await b3(s.dataCell).then(_=>_.arrayBuffer()).then(_=>Vn.Cell.fromBoc(Buffer.from(_))[0]),c=Vn.Cell.fromBoc(Buffer.from(l.code,"base64"))[0],d=Vn.contractAddress(e,{code:c,data:u}),p={code:c,data:u},v=u.hash().toString("base64"),x=c.hash().toString("base64"),b=await a.isContractDeployed(d),y=b&&await pE(x);return{address:d,stateInit:p,pkg:l,codeCellHash:x,dataCellHash:v,isDeployed:b,hasProof:y}});return{data:r,error:i,isLoading:o}}function JSe(e,t,r){const{sendTXN:i,data:o,clearTXN:a}=tj("deployContract",async s=>{if(!r)throw new Error("No address");const l=await yp();return s>20?"error":await l.isContractDeployed(r)?"success":"issued"});return{sendTXN:()=>{!r||i(r,Vn.toNano(e),XSe,t)},status:o.status,clearTXN:a}}function e4e(){const e=[],{data:t,error:r}=$E({workchain:0});return t&&(e.push({title:"Name",value:t.pkg.name}),e.push({title:"Compiler",value:`Tact ${t.pkg.compiler.version}`}),e.push({title:"Code Hash",value:t.codeCellHash}),e.push({title:"Data Hash",value:t.dataCellHash}),e.push({title:"Workchain",value:Rj(t.address.toString())})),L(SE,{title:"Contract",icon:_E,dataRows:e,isLoading:!1,isFlexibleWrapper:!0})}function t4e(){const[e,t]=X.exports.useState("0.5"),{data:r,error:i}=$E({workchain:0}),{sendTXN:o,status:a}=JSe(e,r?.stateInit,r?.address),{markPreloaded:s}=Aj(),l=Ac(),u=zu();let c="";if(i)c=i.toString();else if(r?.isDeployed)c=Ut("div",{children:["Contract is already deployed.",!r.hasProof&&" You can publish its sources to verify it."]});else switch(a){case"initial":c="Contract is ready for deployment";break;case"pending":c="Please approve the transaction in your wallet";break;case"issued":c="Transaction was issued. Monitoring deployment...";break;case"rejected":c="Transaction was rejected. Please retry.";break;case"error":c="Transaction failed. Please retry.";break;case"expired":c="Transaction expired. Please retry.";break;case"success":c="Contract deployed successfully! You can now publish its sources to verify it.";break}let d=Ut(Ha,{disabled:a==="pending"||a==="issued"||r?.isDeployed,fontSize:14,fontWeight:800,textColor:"#fff",height:44,width:144,background:"#1976d2",hoverBackground:"#156cc2",onClick:()=>{o()},children:[(a==="pending"||a==="issued")&&L(lg,{sx:{color:"#fff",height:"20px !important",width:"20px !important"}}),"Deploy"]});return(a==="success"||r?.isDeployed&&!r.hasProof)&&(d=L(Ha,{fontSize:14,fontWeight:800,textColor:"#fff",height:44,width:144,background:"#1976d2",hoverBackground:"#156cc2",onClick:()=>{s(),l("/"+r.address.toString()),u.addFiles([new File([JSON.stringify(r.pkg)],r.pkg.name+".pkg",{type:"text/plain"})])},children:"Verify"})),Ut(ug,{mb:6,children:[Ut($n,{p:"30px 24px 0 24px",children:[L(cg,{children:L("img",{src:_E,alt:"publish icon",width:41,height:41})}),L(Fd,{children:"Deploy"})]}),Ut(kn,{children:[Ut(kn,{sx:{padding:"0 30px"},children:[Ut(wE,{gap:2,sx:{mt:2},children:[L(Cc,{children:L("div",{children:"Value to initialize contract (TON)"})}),L(Cc,{children:L(ZSe,{disabled:!!r?.isDeployed||a==="issued"||a=="pending",value:e,type:"number",onChange:p=>{t(p.target.value)}})})]}),L(Cs,{type:ps.HINT,title:L(ta,{}),notificationBody:L($n,{sx:{overflow:"auto",maxHeight:300},children:Ut(Dd,{sx:{marginBottom:0},children:[L(kn,{sx:{fontWeight:600},children:"Contract Address"}),L(kn,{sx:{fontSize:18,fontWeight:700,wordBreak:"break-all"},children:r?.address.toString()})]})})}),L(Cs,{type:ps.INFO,title:L(ta,{}),notificationBody:L($n,{sx:{overflow:"auto",maxHeight:300},children:L(Dd,{sx:{marginBottom:0},children:c})})}),d]}),L($n,{mb:3,sx:{justifyContent:"center"}})]})]})}function r4e(){const e=la(),t=aa(e.breakpoints.down("md")),r=aa(e.breakpoints.down("lg")),{data:i,error:o,isLoading:a}=$E({workchain:0});return Ut(kn,{children:[window.isTestnet&&L(BE,{}),L(QSe,{}),Ut(U$,{px:r?"20px":0,children:[a&&Ut(Cc,{sx:{marginTop:3},children:[L(Xa,{height:330,variant:"rounded",sx:{marginBottom:3}}),L(Xa,{height:280,variant:"rounded"})]}),!a&&Ut(ta,{children:[L(D$,{isMobile:t,children:L(e4e,{})}),L(t4e,{})]})]}),")",L(Fb,{})]})}const n4e=new KH({defaultOptions:{queries:{refetchOnWindowFocus:!1}}});P1e();yS.createRoot(document.getElementById("root")).render(L(ope,{maxSnack:3,children:L(BQ,{theme:bSe,children:L(Rq,{client:n4e,children:L(uve,{manifestUrl:"https://verifier.ton.org/tonconnect-manifest.json",children:L(HK,{basename:"/verifier/",children:Ut(FK,{children:[L(Hp,{path:"/interact",element:L(vSe,{})}),L(Hp,{path:"/admin",element:L(GSe,{})}),L(Hp,{path:"/tactDeployer/:ipfsHash",element:L(r4e,{})}),L(Hp,{path:"/:contractAddress",element:L(UO,{})}),L(Hp,{path:"/",element:L(UO,{})})]})})})})})}));export{Kb as g}; diff --git a/assets/index.9dd948c7.js b/assets/index.a8990815.js similarity index 99% rename from assets/index.9dd948c7.js rename to assets/index.a8990815.js index ce2318b..dc7ec06 100644 --- a/assets/index.9dd948c7.js +++ b/assets/index.a8990815.js @@ -1,4 +1,4 @@ -import{g as HI}from"./index.5bdfee9b.js";function sI(S,t){for(var L=0;Ln[f]})}}}return Object.freeze(Object.defineProperty(S,Symbol.toStringTag,{value:"Module"}))}var FB={},uA={};Object.defineProperty(uA,"__esModule",{value:!0});uA.normalize=void 0;const tA=47,GB=46,KI=(S,t)=>{let L="",n=0,f=-1,G=0,u;for(let T=0;T<=S.length;++T){if(T2){const v=L.lastIndexOf("/");if(v!==L.length-1){v===-1?(L="",n=0):(L=L.slice(0,v),n=L.length-1-L.lastIndexOf("/")),f=T,G=0;continue}}else if(L.length===2||L.length===1){L="",n=0,f=T,G=0;continue}}t&&(L.length>0?L+="/..":L="..",n=2)}else L.length>0?L+="/"+S.slice(f+1,T):L=S.slice(f+1,T),n=T-f-1;f=T,G=0}else u===GB&&G!==-1?++G:G=-1}return L},LI=S=>{let t=S;if(t.length===0)return".";const L=t.charCodeAt(0)===tA,n=t.charCodeAt(t.length-1)===tA;return t=KI(t,!L),t.length===0&&!L&&(t="."),t.length>0&&n&&(t+="/"),L?"/"+t:t};uA.normalize=LI;var PA={};Object.defineProperty(PA,"__esModule",{value:!0});PA.base64Decode=void 0;function VI(S){return S>64&&S<91?S-65:S>96&&S<123?S-71:S>47&&S<58?S+4:S===43?62:S===47?63:0}function ZI(S){const t=S.replace(/[^A-Za-z0-9+/]/g,""),L=t.length,n=L*3+1>>2,f=new Uint8Array(n);let G,u,T=0,v=0;for(let _=0;_>>(16>>>G&24)&255,G++,v++;T=0}return f}PA.base64Decode=ZI;var _A={},$B={exports:{}};(function(S,t){var L=(()=>{var n=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return function(f){f=f||{};var G=typeof f<"u"?f:{},u,T;G.ready=new Promise(function(A,B){u=A,T=B});var v=Object.assign({},G),_="./this.program",WA=(A,B)=>{throw B},z=!0,b="";function $(A){return G.locateFile?G.locateFile(A,b):b+A}var r,RA,NA;typeof document<"u"&&document.currentScript&&(b=document.currentScript.src),n&&(b=n),b.indexOf("blob:")!==0?b=b.substr(0,b.replace(/[?#].*/,"").lastIndexOf("/")+1):b="",r=A=>{var B=new XMLHttpRequest;return B.open("GET",A,!1),B.send(null),B.responseText},RA=(A,B,g)=>{var Q=new XMLHttpRequest;Q.open("GET",A,!0),Q.responseType="arraybuffer",Q.onload=()=>{if(Q.status==200||Q.status==0&&Q.response){B(Q.response);return}g()},Q.onerror=g,Q.send(null)};var wA=G.print||console.log.bind(console),p=G.printErr||console.warn.bind(console);Object.assign(G,v),v=null,G.arguments&&G.arguments,G.thisProgram&&(_=G.thisProgram),G.quit&&(WA=G.quit);var AA;G.wasmBinary&&(AA=G.wasmBinary);var dA=G.noExitRuntime||!0;typeof WebAssembly!="object"&&oA("no native wasm support detected");var HA,sA=!1;function $A(A,B){A||oA(B)}var mA=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function CA(A,B,g){for(var Q=B+g,C=B;A[C]&&!(C>=Q);)++C;if(C-B>16&&A.buffer&&mA)return mA.decode(A.subarray(B,C));for(var E="";B>10,56320|o&1023)}}return E}function GA(A,B){return A?CA(gA,A,B):""}function aA(A,B,g,Q){if(!(Q>0))return 0;for(var C=g,E=g+Q-1,D=0;D=55296&&N<=57343){var F=A.charCodeAt(++D);N=65536+((N&1023)<<10)|F&1023}if(N<=127){if(g>=E)break;B[g++]=N}else if(N<=2047){if(g+1>=E)break;B[g++]=192|N>>6,B[g++]=128|N&63}else if(N<=65535){if(g+2>=E)break;B[g++]=224|N>>12,B[g++]=128|N>>6&63,B[g++]=128|N&63}else{if(g+3>=E)break;B[g++]=240|N>>18,B[g++]=128|N>>12&63,B[g++]=128|N>>6&63,B[g++]=128|N&63}}return B[g]=0,g-C}function KA(A,B,g){return aA(A,gA,B,g)}function e(A){for(var B=0,g=0;g=55296&&Q<=57343?(B+=4,++g):B+=3}return B}var FA,W,gA,hA,R,d,MA,kA;function Ag(A){FA=A,G.HEAP8=W=new Int8Array(A),G.HEAP16=hA=new Int16Array(A),G.HEAP32=R=new Int32Array(A),G.HEAPU8=gA=new Uint8Array(A),G.HEAPU16=new Uint16Array(A),G.HEAPU32=d=new Uint32Array(A),G.HEAPF32=MA=new Float32Array(A),G.HEAPF64=kA=new Float64Array(A)}G.INITIAL_MEMORY;var LA,oB=[],UB=[],YB=[];function Bg(){return dA}function gg(){if(G.preRun)for(typeof G.preRun=="function"&&(G.preRun=[G.preRun]);G.preRun.length;)Cg(G.preRun.shift());AB(oB)}function Qg(){!G.noFSInit&&!I.init.initialized&&I.init(),I.ignorePermissions=!1,AB(UB)}function Ig(){if(G.postRun)for(typeof G.postRun=="function"&&(G.postRun=[G.postRun]);G.postRun.length;)Dg(G.postRun.shift());AB(YB)}function Cg(A){oB.unshift(A)}function Eg(A){UB.unshift(A)}function Dg(A){YB.unshift(A)}var SA=0,jA=null;function mI(A){return A}function TA(A){SA++,G.monitorRunDependencies&&G.monitorRunDependencies(SA)}function lA(A){if(SA--,G.monitorRunDependencies&&G.monitorRunDependencies(SA),SA==0&&jA){var B=jA;jA=null,B()}}function oA(A){G.onAbort&&G.onAbort(A),A="Aborted("+A+")",p(A),sA=!0,A+=". Build with -sASSERTIONS for more info.";var B=new WebAssembly.RuntimeError(A);throw T(B),B}var Ng="data:application/octet-stream;base64,";function iB(A){return A.startsWith(Ng)}var QA;QA="funcfiftlib.wasm",iB(QA)||(QA=$(QA));function RB(A){try{if(A==QA&&AA)return new Uint8Array(AA);throw"both async and sync fetching of the wasm failed"}catch(B){oA(B)}}function Gg(){return!AA&&z&&typeof fetch=="function"?fetch(QA,{credentials:"same-origin"}).then(function(A){if(!A.ok)throw"failed to load wasm binary file at '"+QA+"'";return A.arrayBuffer()}).catch(function(){return RB(QA)}):Promise.resolve().then(function(){return RB(QA)})}function Fg(){var A={a:bQ};function B(D,N){var F=D.exports;G.asm=F,HA=G.asm.Ea,Ag(HA.buffer),LA=G.asm.Ia,Eg(G.asm.Fa),lA()}TA();function g(D){B(D.instance)}function Q(D){return Gg().then(function(N){return WebAssembly.instantiate(N,A)}).then(function(N){return N}).then(D,function(N){p("failed to asynchronously prepare wasm: "+N),oA(N)})}function C(){return!AA&&typeof WebAssembly.instantiateStreaming=="function"&&!iB(QA)&&typeof fetch=="function"?fetch(QA,{credentials:"same-origin"}).then(function(D){var N=WebAssembly.instantiateStreaming(D,A);return N.then(g,function(F){return p("wasm streaming compile failed: "+F),p("falling back to ArrayBuffer instantiation"),Q(g)})}):Q(g)}if(G.instantiateWasm)try{var E=G.instantiateWasm(A,B);return E}catch(D){return p("Module.instantiateWasm callback failed with error: "+D),!1}return C().catch(T),{}}var M,X,og={567360:A=>{throw GA(A)}};function Ug(A){this.name="ExitStatus",this.message="Program terminated with exit("+A+")",this.status=A}function AB(A){for(;A.length>0;)A.shift()(G)}function Yg(){var A=new Error;if(!A.stack){try{throw new Error}catch(B){A=B}if(!A.stack)return"(no stack trace available)"}return A.stack.toString()}function ig(A,B,g="i8"){switch(g.endsWith("*")&&(g="*"),g){case"i1":W[A>>0]=B;break;case"i8":W[A>>0]=B;break;case"i16":hA[A>>1]=B;break;case"i32":R[A>>2]=B;break;case"i64":X=[B>>>0,(M=B,+Math.abs(M)>=1?M>0?(Math.min(+Math.floor(M/4294967296),4294967295)|0)>>>0:~~+Math.ceil((M-+(~~M>>>0))/4294967296)>>>0:0)],R[A>>2]=X[0],R[A+4>>2]=X[1];break;case"float":MA[A>>2]=B;break;case"double":kA[A>>3]=B;break;case"*":d[A>>2]=B;break;default:oA("invalid type for setValue: "+g)}}function wB(A,B){W.set(A,B)}function Rg(A){return EB(A+24)+24}var pA=[];function wg(A){A.add_ref()}var nA=0;function hg(A){var B=new JA(A);return B.get_caught()||(B.set_caught(!0),nA--),B.set_rethrown(!1),pA.push(B),wg(B),B.get_exception_ptr()}var UA=0;function JA(A){this.excPtr=A,this.ptr=A-24,this.set_type=function(B){d[this.ptr+4>>2]=B},this.get_type=function(){return d[this.ptr+4>>2]},this.set_destructor=function(B){d[this.ptr+8>>2]=B},this.get_destructor=function(){return d[this.ptr+8>>2]},this.set_refcount=function(B){R[this.ptr>>2]=B},this.set_caught=function(B){B=B?1:0,W[this.ptr+12>>0]=B},this.get_caught=function(){return W[this.ptr+12>>0]!=0},this.set_rethrown=function(B){B=B?1:0,W[this.ptr+13>>0]=B},this.get_rethrown=function(){return W[this.ptr+13>>0]!=0},this.init=function(B,g){this.set_adjusted_ptr(0),this.set_type(B),this.set_destructor(g),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var B=R[this.ptr>>2];R[this.ptr>>2]=B+1},this.release_ref=function(){var B=R[this.ptr>>2];return R[this.ptr>>2]=B-1,B===1},this.set_adjusted_ptr=function(B){d[this.ptr+16>>2]=B},this.get_adjusted_ptr=function(){return d[this.ptr+16>>2]},this.get_exception_ptr=function(){var B=xB(this.get_type());if(B)return d[this.excPtr>>2];var g=this.get_adjusted_ptr();return g!==0?g:this.excPtr}}function hB(A){try{return jB(new JA(A).ptr)}catch{}}function l(A){return LA.get(A)}function kg(A){if(A.release_ref()&&!A.get_rethrown()){var B=A.get_destructor();B&&l(B)(A.excPtr),hB(A.excPtr)}}function yg(){H(0);var A=pA.pop();kg(A),UA=0}function ag(A){throw UA||(UA=A),A}function Mg(){var A=UA;if(!A)return O(0),0;var B=new JA(A);B.set_adjusted_ptr(A);var g=B.get_type();if(!g)return O(0),A;for(var Q=Array.prototype.slice.call(arguments),C=0;C>2]=A,A}var m={isAbs:A=>A.charAt(0)==="/",splitPath:A=>{var B=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return B.exec(A).slice(1)},normalizeArray:(A,B)=>{for(var g=0,Q=A.length-1;Q>=0;Q--){var C=A[Q];C==="."?A.splice(Q,1):C===".."?(A.splice(Q,1),g++):g&&(A.splice(Q,1),g--)}if(B)for(;g;g--)A.unshift("..");return A},normalize:A=>{var B=m.isAbs(A),g=A.substr(-1)==="/";return A=m.normalizeArray(A.split("/").filter(Q=>!!Q),!B).join("/"),!A&&!B&&(A="."),A&&g&&(A+="/"),(B?"/":"")+A},dirname:A=>{var B=m.splitPath(A),g=B[0],Q=B[1];return!g&&!Q?".":(Q&&(Q=Q.substr(0,Q.length-1)),g+Q)},basename:A=>{if(A==="/")return"/";A=m.normalize(A),A=A.replace(/\/$/,"");var B=A.lastIndexOf("/");return B===-1?A:A.substr(B+1)},join:function(){var A=Array.prototype.slice.call(arguments,0);return m.normalize(A.join("/"))},join2:(A,B)=>m.normalize(A+"/"+B)};function Vg(){if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function"){var A=new Uint8Array(1);return()=>(crypto.getRandomValues(A),A[0])}else return()=>oA("randomDevice")}var YA={resolve:function(){for(var A="",B=!1,g=arguments.length-1;g>=-1&&!B;g--){var Q=g>=0?arguments[g]:I.cwd();if(typeof Q!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!Q)return"";A=Q+"/"+A,B=m.isAbs(Q)}return A=m.normalizeArray(A.split("/").filter(C=>!!C),!B).join("/"),(B?"/":"")+A||"."},relative:(A,B)=>{A=YA.resolve(A).substr(1),B=YA.resolve(B).substr(1);function g(o){for(var h=0;h=0&&o[y]==="";y--);return h>y?[]:o.slice(h,y-h+1)}for(var Q=g(A.split("/")),C=g(B.split("/")),E=Math.min(Q.length,C.length),D=E,N=0;N0?g:e(A)+1,C=new Array(Q),E=aA(A,C,0,C.length);return B&&(C.length=E),C}var cA={ttys:[],init:function(){},shutdown:function(){},register:function(A,B){cA.ttys[A]={input:[],output:[],ops:B},I.registerDevice(A,cA.stream_ops)},stream_ops:{open:function(A){var B=cA.ttys[A.node.rdev];if(!B)throw new I.ErrnoError(43);A.tty=B,A.seekable=!1},close:function(A){A.tty.ops.fsync(A.tty)},fsync:function(A){A.tty.ops.fsync(A.tty)},read:function(A,B,g,Q,C){if(!A.tty||!A.tty.ops.get_char)throw new I.ErrnoError(60);for(var E=0,D=0;Dn[f]})}}}return Object.freeze(Object.defineProperty(S,Symbol.toStringTag,{value:"Module"}))}var FB={},uA={};Object.defineProperty(uA,"__esModule",{value:!0});uA.normalize=void 0;const tA=47,GB=46,KI=(S,t)=>{let L="",n=0,f=-1,G=0,u;for(let T=0;T<=S.length;++T){if(T2){const v=L.lastIndexOf("/");if(v!==L.length-1){v===-1?(L="",n=0):(L=L.slice(0,v),n=L.length-1-L.lastIndexOf("/")),f=T,G=0;continue}}else if(L.length===2||L.length===1){L="",n=0,f=T,G=0;continue}}t&&(L.length>0?L+="/..":L="..",n=2)}else L.length>0?L+="/"+S.slice(f+1,T):L=S.slice(f+1,T),n=T-f-1;f=T,G=0}else u===GB&&G!==-1?++G:G=-1}return L},LI=S=>{let t=S;if(t.length===0)return".";const L=t.charCodeAt(0)===tA,n=t.charCodeAt(t.length-1)===tA;return t=KI(t,!L),t.length===0&&!L&&(t="."),t.length>0&&n&&(t+="/"),L?"/"+t:t};uA.normalize=LI;var PA={};Object.defineProperty(PA,"__esModule",{value:!0});PA.base64Decode=void 0;function VI(S){return S>64&&S<91?S-65:S>96&&S<123?S-71:S>47&&S<58?S+4:S===43?62:S===47?63:0}function ZI(S){const t=S.replace(/[^A-Za-z0-9+/]/g,""),L=t.length,n=L*3+1>>2,f=new Uint8Array(n);let G,u,T=0,v=0;for(let _=0;_>>(16>>>G&24)&255,G++,v++;T=0}return f}PA.base64Decode=ZI;var _A={},$B={exports:{}};(function(S,t){var L=(()=>{var n=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return function(f){f=f||{};var G=typeof f<"u"?f:{},u,T;G.ready=new Promise(function(A,B){u=A,T=B});var v=Object.assign({},G),_="./this.program",WA=(A,B)=>{throw B},z=!0,b="";function $(A){return G.locateFile?G.locateFile(A,b):b+A}var r,RA,NA;typeof document<"u"&&document.currentScript&&(b=document.currentScript.src),n&&(b=n),b.indexOf("blob:")!==0?b=b.substr(0,b.replace(/[?#].*/,"").lastIndexOf("/")+1):b="",r=A=>{var B=new XMLHttpRequest;return B.open("GET",A,!1),B.send(null),B.responseText},RA=(A,B,g)=>{var Q=new XMLHttpRequest;Q.open("GET",A,!0),Q.responseType="arraybuffer",Q.onload=()=>{if(Q.status==200||Q.status==0&&Q.response){B(Q.response);return}g()},Q.onerror=g,Q.send(null)};var wA=G.print||console.log.bind(console),p=G.printErr||console.warn.bind(console);Object.assign(G,v),v=null,G.arguments&&G.arguments,G.thisProgram&&(_=G.thisProgram),G.quit&&(WA=G.quit);var AA;G.wasmBinary&&(AA=G.wasmBinary);var dA=G.noExitRuntime||!0;typeof WebAssembly!="object"&&oA("no native wasm support detected");var HA,sA=!1;function $A(A,B){A||oA(B)}var mA=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function CA(A,B,g){for(var Q=B+g,C=B;A[C]&&!(C>=Q);)++C;if(C-B>16&&A.buffer&&mA)return mA.decode(A.subarray(B,C));for(var E="";B>10,56320|o&1023)}}return E}function GA(A,B){return A?CA(gA,A,B):""}function aA(A,B,g,Q){if(!(Q>0))return 0;for(var C=g,E=g+Q-1,D=0;D=55296&&N<=57343){var F=A.charCodeAt(++D);N=65536+((N&1023)<<10)|F&1023}if(N<=127){if(g>=E)break;B[g++]=N}else if(N<=2047){if(g+1>=E)break;B[g++]=192|N>>6,B[g++]=128|N&63}else if(N<=65535){if(g+2>=E)break;B[g++]=224|N>>12,B[g++]=128|N>>6&63,B[g++]=128|N&63}else{if(g+3>=E)break;B[g++]=240|N>>18,B[g++]=128|N>>12&63,B[g++]=128|N>>6&63,B[g++]=128|N&63}}return B[g]=0,g-C}function KA(A,B,g){return aA(A,gA,B,g)}function e(A){for(var B=0,g=0;g=55296&&Q<=57343?(B+=4,++g):B+=3}return B}var FA,W,gA,hA,R,d,MA,kA;function Ag(A){FA=A,G.HEAP8=W=new Int8Array(A),G.HEAP16=hA=new Int16Array(A),G.HEAP32=R=new Int32Array(A),G.HEAPU8=gA=new Uint8Array(A),G.HEAPU16=new Uint16Array(A),G.HEAPU32=d=new Uint32Array(A),G.HEAPF32=MA=new Float32Array(A),G.HEAPF64=kA=new Float64Array(A)}G.INITIAL_MEMORY;var LA,oB=[],UB=[],YB=[];function Bg(){return dA}function gg(){if(G.preRun)for(typeof G.preRun=="function"&&(G.preRun=[G.preRun]);G.preRun.length;)Cg(G.preRun.shift());AB(oB)}function Qg(){!G.noFSInit&&!I.init.initialized&&I.init(),I.ignorePermissions=!1,AB(UB)}function Ig(){if(G.postRun)for(typeof G.postRun=="function"&&(G.postRun=[G.postRun]);G.postRun.length;)Dg(G.postRun.shift());AB(YB)}function Cg(A){oB.unshift(A)}function Eg(A){UB.unshift(A)}function Dg(A){YB.unshift(A)}var SA=0,jA=null;function mI(A){return A}function TA(A){SA++,G.monitorRunDependencies&&G.monitorRunDependencies(SA)}function lA(A){if(SA--,G.monitorRunDependencies&&G.monitorRunDependencies(SA),SA==0&&jA){var B=jA;jA=null,B()}}function oA(A){G.onAbort&&G.onAbort(A),A="Aborted("+A+")",p(A),sA=!0,A+=". Build with -sASSERTIONS for more info.";var B=new WebAssembly.RuntimeError(A);throw T(B),B}var Ng="data:application/octet-stream;base64,";function iB(A){return A.startsWith(Ng)}var QA;QA="funcfiftlib.wasm",iB(QA)||(QA=$(QA));function RB(A){try{if(A==QA&&AA)return new Uint8Array(AA);throw"both async and sync fetching of the wasm failed"}catch(B){oA(B)}}function Gg(){return!AA&&z&&typeof fetch=="function"?fetch(QA,{credentials:"same-origin"}).then(function(A){if(!A.ok)throw"failed to load wasm binary file at '"+QA+"'";return A.arrayBuffer()}).catch(function(){return RB(QA)}):Promise.resolve().then(function(){return RB(QA)})}function Fg(){var A={a:bQ};function B(D,N){var F=D.exports;G.asm=F,HA=G.asm.Ea,Ag(HA.buffer),LA=G.asm.Ia,Eg(G.asm.Fa),lA()}TA();function g(D){B(D.instance)}function Q(D){return Gg().then(function(N){return WebAssembly.instantiate(N,A)}).then(function(N){return N}).then(D,function(N){p("failed to asynchronously prepare wasm: "+N),oA(N)})}function C(){return!AA&&typeof WebAssembly.instantiateStreaming=="function"&&!iB(QA)&&typeof fetch=="function"?fetch(QA,{credentials:"same-origin"}).then(function(D){var N=WebAssembly.instantiateStreaming(D,A);return N.then(g,function(F){return p("wasm streaming compile failed: "+F),p("falling back to ArrayBuffer instantiation"),Q(g)})}):Q(g)}if(G.instantiateWasm)try{var E=G.instantiateWasm(A,B);return E}catch(D){return p("Module.instantiateWasm callback failed with error: "+D),!1}return C().catch(T),{}}var M,X,og={567360:A=>{throw GA(A)}};function Ug(A){this.name="ExitStatus",this.message="Program terminated with exit("+A+")",this.status=A}function AB(A){for(;A.length>0;)A.shift()(G)}function Yg(){var A=new Error;if(!A.stack){try{throw new Error}catch(B){A=B}if(!A.stack)return"(no stack trace available)"}return A.stack.toString()}function ig(A,B,g="i8"){switch(g.endsWith("*")&&(g="*"),g){case"i1":W[A>>0]=B;break;case"i8":W[A>>0]=B;break;case"i16":hA[A>>1]=B;break;case"i32":R[A>>2]=B;break;case"i64":X=[B>>>0,(M=B,+Math.abs(M)>=1?M>0?(Math.min(+Math.floor(M/4294967296),4294967295)|0)>>>0:~~+Math.ceil((M-+(~~M>>>0))/4294967296)>>>0:0)],R[A>>2]=X[0],R[A+4>>2]=X[1];break;case"float":MA[A>>2]=B;break;case"double":kA[A>>3]=B;break;case"*":d[A>>2]=B;break;default:oA("invalid type for setValue: "+g)}}function wB(A,B){W.set(A,B)}function Rg(A){return EB(A+24)+24}var pA=[];function wg(A){A.add_ref()}var nA=0;function hg(A){var B=new JA(A);return B.get_caught()||(B.set_caught(!0),nA--),B.set_rethrown(!1),pA.push(B),wg(B),B.get_exception_ptr()}var UA=0;function JA(A){this.excPtr=A,this.ptr=A-24,this.set_type=function(B){d[this.ptr+4>>2]=B},this.get_type=function(){return d[this.ptr+4>>2]},this.set_destructor=function(B){d[this.ptr+8>>2]=B},this.get_destructor=function(){return d[this.ptr+8>>2]},this.set_refcount=function(B){R[this.ptr>>2]=B},this.set_caught=function(B){B=B?1:0,W[this.ptr+12>>0]=B},this.get_caught=function(){return W[this.ptr+12>>0]!=0},this.set_rethrown=function(B){B=B?1:0,W[this.ptr+13>>0]=B},this.get_rethrown=function(){return W[this.ptr+13>>0]!=0},this.init=function(B,g){this.set_adjusted_ptr(0),this.set_type(B),this.set_destructor(g),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var B=R[this.ptr>>2];R[this.ptr>>2]=B+1},this.release_ref=function(){var B=R[this.ptr>>2];return R[this.ptr>>2]=B-1,B===1},this.set_adjusted_ptr=function(B){d[this.ptr+16>>2]=B},this.get_adjusted_ptr=function(){return d[this.ptr+16>>2]},this.get_exception_ptr=function(){var B=xB(this.get_type());if(B)return d[this.excPtr>>2];var g=this.get_adjusted_ptr();return g!==0?g:this.excPtr}}function hB(A){try{return jB(new JA(A).ptr)}catch{}}function l(A){return LA.get(A)}function kg(A){if(A.release_ref()&&!A.get_rethrown()){var B=A.get_destructor();B&&l(B)(A.excPtr),hB(A.excPtr)}}function yg(){H(0);var A=pA.pop();kg(A),UA=0}function ag(A){throw UA||(UA=A),A}function Mg(){var A=UA;if(!A)return O(0),0;var B=new JA(A);B.set_adjusted_ptr(A);var g=B.get_type();if(!g)return O(0),A;for(var Q=Array.prototype.slice.call(arguments),C=0;C>2]=A,A}var m={isAbs:A=>A.charAt(0)==="/",splitPath:A=>{var B=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return B.exec(A).slice(1)},normalizeArray:(A,B)=>{for(var g=0,Q=A.length-1;Q>=0;Q--){var C=A[Q];C==="."?A.splice(Q,1):C===".."?(A.splice(Q,1),g++):g&&(A.splice(Q,1),g--)}if(B)for(;g;g--)A.unshift("..");return A},normalize:A=>{var B=m.isAbs(A),g=A.substr(-1)==="/";return A=m.normalizeArray(A.split("/").filter(Q=>!!Q),!B).join("/"),!A&&!B&&(A="."),A&&g&&(A+="/"),(B?"/":"")+A},dirname:A=>{var B=m.splitPath(A),g=B[0],Q=B[1];return!g&&!Q?".":(Q&&(Q=Q.substr(0,Q.length-1)),g+Q)},basename:A=>{if(A==="/")return"/";A=m.normalize(A),A=A.replace(/\/$/,"");var B=A.lastIndexOf("/");return B===-1?A:A.substr(B+1)},join:function(){var A=Array.prototype.slice.call(arguments,0);return m.normalize(A.join("/"))},join2:(A,B)=>m.normalize(A+"/"+B)};function Vg(){if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function"){var A=new Uint8Array(1);return()=>(crypto.getRandomValues(A),A[0])}else return()=>oA("randomDevice")}var YA={resolve:function(){for(var A="",B=!1,g=arguments.length-1;g>=-1&&!B;g--){var Q=g>=0?arguments[g]:I.cwd();if(typeof Q!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!Q)return"";A=Q+"/"+A,B=m.isAbs(Q)}return A=m.normalizeArray(A.split("/").filter(C=>!!C),!B).join("/"),(B?"/":"")+A||"."},relative:(A,B)=>{A=YA.resolve(A).substr(1),B=YA.resolve(B).substr(1);function g(o){for(var h=0;h=0&&o[y]==="";y--);return h>y?[]:o.slice(h,y-h+1)}for(var Q=g(A.split("/")),C=g(B.split("/")),E=Math.min(Q.length,C.length),D=E,N=0;N0?g:e(A)+1,C=new Array(Q),E=aA(A,C,0,C.length);return B&&(C.length=E),C}var cA={ttys:[],init:function(){},shutdown:function(){},register:function(A,B){cA.ttys[A]={input:[],output:[],ops:B},I.registerDevice(A,cA.stream_ops)},stream_ops:{open:function(A){var B=cA.ttys[A.node.rdev];if(!B)throw new I.ErrnoError(43);A.tty=B,A.seekable=!1},close:function(A){A.tty.ops.fsync(A.tty)},fsync:function(A){A.tty.ops.fsync(A.tty)},read:function(A,B,g,Q,C){if(!A.tty||!A.tty.ops.get_char)throw new I.ErrnoError(60);for(var E=0,D=0;D0&&(wA(CA(A.output,0)),A.output=[])}},default_tty1_ops:{put_char:function(A,B){B===null||B===10?(p(CA(A.output,0)),A.output=[]):B!=0&&A.output.push(B)},fsync:function(A){A.output&&A.output.length>0&&(p(CA(A.output,0)),A.output=[])}}};function Zg(A,B){gA.fill(0,A,A+B)}function Wg(A,B){return Math.ceil(A/B)*B}function kB(A){A=Wg(A,65536);var B=qB(65536,A);return B?(Zg(B,A),B):0}var J={ops_table:null,mount:function(A){return J.createNode(null,"/",16895,0)},createNode:function(A,B,g,Q){if(I.isBlkdev(g)||I.isFIFO(g))throw new I.ErrnoError(63);J.ops_table||(J.ops_table={dir:{node:{getattr:J.node_ops.getattr,setattr:J.node_ops.setattr,lookup:J.node_ops.lookup,mknod:J.node_ops.mknod,rename:J.node_ops.rename,unlink:J.node_ops.unlink,rmdir:J.node_ops.rmdir,readdir:J.node_ops.readdir,symlink:J.node_ops.symlink},stream:{llseek:J.stream_ops.llseek}},file:{node:{getattr:J.node_ops.getattr,setattr:J.node_ops.setattr},stream:{llseek:J.stream_ops.llseek,read:J.stream_ops.read,write:J.stream_ops.write,allocate:J.stream_ops.allocate,mmap:J.stream_ops.mmap,msync:J.stream_ops.msync}},link:{node:{getattr:J.node_ops.getattr,setattr:J.node_ops.setattr,readlink:J.node_ops.readlink},stream:{}},chrdev:{node:{getattr:J.node_ops.getattr,setattr:J.node_ops.setattr},stream:I.chrdev_stream_ops}});var C=I.createNode(A,B,g,Q);return I.isDir(C.mode)?(C.node_ops=J.ops_table.dir.node,C.stream_ops=J.ops_table.dir.stream,C.contents={}):I.isFile(C.mode)?(C.node_ops=J.ops_table.file.node,C.stream_ops=J.ops_table.file.stream,C.usedBytes=0,C.contents=null):I.isLink(C.mode)?(C.node_ops=J.ops_table.link.node,C.stream_ops=J.ops_table.link.stream):I.isChrdev(C.mode)&&(C.node_ops=J.ops_table.chrdev.node,C.stream_ops=J.ops_table.chrdev.stream),C.timestamp=Date.now(),A&&(A.contents[B]=C,A.timestamp=C.timestamp),C},getFileDataAsTypedArray:function(A){return A.contents?A.contents.subarray?A.contents.subarray(0,A.usedBytes):new Uint8Array(A.contents):new Uint8Array(0)},expandFileStorage:function(A,B){var g=A.contents?A.contents.length:0;if(!(g>=B)){var Q=1024*1024;B=Math.max(B,g*(g>>0),g!=0&&(B=Math.max(B,256));var C=A.contents;A.contents=new Uint8Array(B),A.usedBytes>0&&A.contents.set(C.subarray(0,A.usedBytes),0)}},resizeFileStorage:function(A,B){if(A.usedBytes!=B)if(B==0)A.contents=null,A.usedBytes=0;else{var g=A.contents;A.contents=new Uint8Array(B),g&&A.contents.set(g.subarray(0,Math.min(B,A.usedBytes))),A.usedBytes=B}},node_ops:{getattr:function(A){var B={};return B.dev=I.isChrdev(A.mode)?A.id:1,B.ino=A.id,B.mode=A.mode,B.nlink=1,B.uid=0,B.gid=0,B.rdev=A.rdev,I.isDir(A.mode)?B.size=4096:I.isFile(A.mode)?B.size=A.usedBytes:I.isLink(A.mode)?B.size=A.link.length:B.size=0,B.atime=new Date(A.timestamp),B.mtime=new Date(A.timestamp),B.ctime=new Date(A.timestamp),B.blksize=4096,B.blocks=Math.ceil(B.size/B.blksize),B},setattr:function(A,B){B.mode!==void 0&&(A.mode=B.mode),B.timestamp!==void 0&&(A.timestamp=B.timestamp),B.size!==void 0&&J.resizeFileStorage(A,B.size)},lookup:function(A,B){throw I.genericErrors[44]},mknod:function(A,B,g,Q){return J.createNode(A,B,g,Q)},rename:function(A,B,g){if(I.isDir(A.mode)){var Q;try{Q=I.lookupNode(B,g)}catch{}if(Q)for(var C in Q.contents)throw new I.ErrnoError(55)}delete A.parent.contents[A.name],A.parent.timestamp=Date.now(),A.name=g,B.contents[g]=A,B.timestamp=A.parent.timestamp,A.parent=B},unlink:function(A,B){delete A.contents[B],A.timestamp=Date.now()},rmdir:function(A,B){var g=I.lookupNode(A,B);for(var Q in g.contents)throw new I.ErrnoError(55);delete A.contents[B],A.timestamp=Date.now()},readdir:function(A){var B=[".",".."];for(var g in A.contents)!A.contents.hasOwnProperty(g)||B.push(g);return B},symlink:function(A,B,g){var Q=J.createNode(A,B,41471,0);return Q.link=g,Q},readlink:function(A){if(!I.isLink(A.mode))throw new I.ErrnoError(28);return A.link}},stream_ops:{read:function(A,B,g,Q,C){var E=A.node.contents;if(C>=A.node.usedBytes)return 0;var D=Math.min(A.node.usedBytes-C,Q);if(D>8&&E.subarray)B.set(E.subarray(C,C+D),g);else for(var N=0;N0||g+B{$A(E,'Loading data file "'+A+'" failed (no arrayBuffer).'),B(new Uint8Array(E)),C&&lA()},E=>{if(g)g();else throw'Loading data file "'+A+'" failed.'}),C&&TA()}var I={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:(A,B={})=>{if(A=YA.resolve(I.cwd(),A),!A)return{path:"",node:null};var g={follow_mount:!0,recurse_count:0};if(B=Object.assign(g,B),B.recurse_count>8)throw new I.ErrnoError(32);for(var Q=m.normalizeArray(A.split("/").filter(y=>!!y),!1),C=I.root,E="/",D=0;D40)throw new I.ErrnoError(32)}}return{path:E,node:C}},getPath:A=>{for(var B;;){if(I.isRoot(A)){var g=A.mount.mountpoint;return B?g[g.length-1]!=="/"?g+"/"+B:g+B:g}B=B?A.name+"/"+B:A.name,A=A.parent}},hashName:(A,B)=>{for(var g=0,Q=0;Q>>0)%I.nameTable.length},hashAddNode:A=>{var B=I.hashName(A.parent.id,A.name);A.name_next=I.nameTable[B],I.nameTable[B]=A},hashRemoveNode:A=>{var B=I.hashName(A.parent.id,A.name);if(I.nameTable[B]===A)I.nameTable[B]=A.name_next;else for(var g=I.nameTable[B];g;){if(g.name_next===A){g.name_next=A.name_next;break}g=g.name_next}},lookupNode:(A,B)=>{var g=I.mayLookup(A);if(g)throw new I.ErrnoError(g,A);for(var Q=I.hashName(A.id,B),C=I.nameTable[Q];C;C=C.name_next){var E=C.name;if(C.parent.id===A.id&&E===B)return C}return I.lookup(A,B)},createNode:(A,B,g,Q)=>{var C=new I.FSNode(A,B,g,Q);return I.hashAddNode(C),C},destroyNode:A=>{I.hashRemoveNode(A)},isRoot:A=>A===A.parent,isMountpoint:A=>!!A.mounted,isFile:A=>(A&61440)===32768,isDir:A=>(A&61440)===16384,isLink:A=>(A&61440)===40960,isChrdev:A=>(A&61440)===8192,isBlkdev:A=>(A&61440)===24576,isFIFO:A=>(A&61440)===4096,isSocket:A=>(A&49152)===49152,flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:A=>{var B=I.flagModes[A];if(typeof B>"u")throw new Error("Unknown file open mode: "+A);return B},flagsToPermissionString:A=>{var B=["r","w","rw"][A&3];return A&512&&(B+="w"),B},nodePermissions:(A,B)=>I.ignorePermissions?0:B.includes("r")&&!(A.mode&292)||B.includes("w")&&!(A.mode&146)||B.includes("x")&&!(A.mode&73)?2:0,mayLookup:A=>{var B=I.nodePermissions(A,"x");return B||(A.node_ops.lookup?0:2)},mayCreate:(A,B)=>{try{var g=I.lookupNode(A,B);return 20}catch{}return I.nodePermissions(A,"wx")},mayDelete:(A,B,g)=>{var Q;try{Q=I.lookupNode(A,B)}catch(E){return E.errno}var C=I.nodePermissions(A,"wx");if(C)return C;if(g){if(!I.isDir(Q.mode))return 54;if(I.isRoot(Q)||I.getPath(Q)===I.cwd())return 10}else if(I.isDir(Q.mode))return 31;return 0},mayOpen:(A,B)=>A?I.isLink(A.mode)?32:I.isDir(A.mode)&&(I.flagsToPermissionString(B)!=="r"||B&512)?31:I.nodePermissions(A,I.flagsToPermissionString(B)):44,MAX_OPEN_FDS:4096,nextfd:(A=0,B=I.MAX_OPEN_FDS)=>{for(var g=A;g<=B;g++)if(!I.streams[g])return g;throw new I.ErrnoError(33)},getStream:A=>I.streams[A],createStream:(A,B,g)=>{I.FSStream||(I.FSStream=function(){this.shared={}},I.FSStream.prototype={},Object.defineProperties(I.FSStream.prototype,{object:{get:function(){return this.node},set:function(C){this.node=C}},isRead:{get:function(){return(this.flags&2097155)!==1}},isWrite:{get:function(){return(this.flags&2097155)!==0}},isAppend:{get:function(){return this.flags&1024}},flags:{get:function(){return this.shared.flags},set:function(C){this.shared.flags=C}},position:{get:function(){return this.shared.position},set:function(C){this.shared.position=C}}})),A=Object.assign(new I.FSStream,A);var Q=I.nextfd(B,g);return A.fd=Q,I.streams[Q]=A,A},closeStream:A=>{I.streams[A]=null},chrdev_stream_ops:{open:A=>{var B=I.getDevice(A.node.rdev);A.stream_ops=B.stream_ops,A.stream_ops.open&&A.stream_ops.open(A)},llseek:()=>{throw new I.ErrnoError(70)}},major:A=>A>>8,minor:A=>A&255,makedev:(A,B)=>A<<8|B,registerDevice:(A,B)=>{I.devices[A]={stream_ops:B}},getDevice:A=>I.devices[A],getMounts:A=>{for(var B=[],g=[A];g.length;){var Q=g.pop();B.push(Q),g.push.apply(g,Q.mounts)}return B},syncfs:(A,B)=>{typeof A=="function"&&(B=A,A=!1),I.syncFSRequests++,I.syncFSRequests>1&&p("warning: "+I.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var g=I.getMounts(I.root.mount),Q=0;function C(D){return I.syncFSRequests--,B(D)}function E(D){if(D)return E.errored?void 0:(E.errored=!0,C(D));++Q>=g.length&&C(null)}g.forEach(D=>{if(!D.type.syncfs)return E(null);D.type.syncfs(D,A,E)})},mount:(A,B,g)=>{var Q=g==="/",C=!g,E;if(Q&&I.root)throw new I.ErrnoError(10);if(!Q&&!C){var D=I.lookupPath(g,{follow_mount:!1});if(g=D.path,E=D.node,I.isMountpoint(E))throw new I.ErrnoError(10);if(!I.isDir(E.mode))throw new I.ErrnoError(54)}var N={type:A,opts:B,mountpoint:g,mounts:[]},F=A.mount(N);return F.mount=N,N.root=F,Q?I.root=F:E&&(E.mounted=N,E.mount&&E.mount.mounts.push(N)),F},unmount:A=>{var B=I.lookupPath(A,{follow_mount:!1});if(!I.isMountpoint(B.node))throw new I.ErrnoError(28);var g=B.node,Q=g.mounted,C=I.getMounts(Q);Object.keys(I.nameTable).forEach(D=>{for(var N=I.nameTable[D];N;){var F=N.name_next;C.includes(N.mount)&&I.destroyNode(N),N=F}}),g.mounted=null;var E=g.mount.mounts.indexOf(Q);g.mount.mounts.splice(E,1)},lookup:(A,B)=>A.node_ops.lookup(A,B),mknod:(A,B,g)=>{var Q=I.lookupPath(A,{parent:!0}),C=Q.node,E=m.basename(A);if(!E||E==="."||E==="..")throw new I.ErrnoError(28);var D=I.mayCreate(C,E);if(D)throw new I.ErrnoError(D);if(!C.node_ops.mknod)throw new I.ErrnoError(63);return C.node_ops.mknod(C,E,B,g)},create:(A,B)=>(B=B!==void 0?B:438,B&=4095,B|=32768,I.mknod(A,B,0)),mkdir:(A,B)=>(B=B!==void 0?B:511,B&=1023,B|=16384,I.mknod(A,B,0)),mkdirTree:(A,B)=>{for(var g=A.split("/"),Q="",C=0;C(typeof g>"u"&&(g=B,B=438),B|=8192,I.mknod(A,B,g)),symlink:(A,B)=>{if(!YA.resolve(A))throw new I.ErrnoError(44);var g=I.lookupPath(B,{parent:!0}),Q=g.node;if(!Q)throw new I.ErrnoError(44);var C=m.basename(B),E=I.mayCreate(Q,C);if(E)throw new I.ErrnoError(E);if(!Q.node_ops.symlink)throw new I.ErrnoError(63);return Q.node_ops.symlink(Q,C,A)},rename:(A,B)=>{var g=m.dirname(A),Q=m.dirname(B),C=m.basename(A),E=m.basename(B),D,N,F;if(D=I.lookupPath(A,{parent:!0}),N=D.node,D=I.lookupPath(B,{parent:!0}),F=D.node,!N||!F)throw new I.ErrnoError(44);if(N.mount!==F.mount)throw new I.ErrnoError(75);var o=I.lookupNode(N,C),h=YA.relative(A,Q);if(h.charAt(0)!==".")throw new I.ErrnoError(28);if(h=YA.relative(B,g),h.charAt(0)!==".")throw new I.ErrnoError(55);var y;try{y=I.lookupNode(F,E)}catch{}if(o!==y){var Y=I.isDir(o.mode),i=I.mayDelete(N,C,Y);if(i)throw new I.ErrnoError(i);if(i=y?I.mayDelete(F,E,Y):I.mayCreate(F,E),i)throw new I.ErrnoError(i);if(!N.node_ops.rename)throw new I.ErrnoError(63);if(I.isMountpoint(o)||y&&I.isMountpoint(y))throw new I.ErrnoError(10);if(F!==N&&(i=I.nodePermissions(N,"w"),i))throw new I.ErrnoError(i);I.hashRemoveNode(o);try{N.node_ops.rename(o,F,E)}catch(k){throw k}finally{I.hashAddNode(o)}}},rmdir:A=>{var B=I.lookupPath(A,{parent:!0}),g=B.node,Q=m.basename(A),C=I.lookupNode(g,Q),E=I.mayDelete(g,Q,!0);if(E)throw new I.ErrnoError(E);if(!g.node_ops.rmdir)throw new I.ErrnoError(63);if(I.isMountpoint(C))throw new I.ErrnoError(10);g.node_ops.rmdir(g,Q),I.destroyNode(C)},readdir:A=>{var B=I.lookupPath(A,{follow:!0}),g=B.node;if(!g.node_ops.readdir)throw new I.ErrnoError(54);return g.node_ops.readdir(g)},unlink:A=>{var B=I.lookupPath(A,{parent:!0}),g=B.node;if(!g)throw new I.ErrnoError(44);var Q=m.basename(A),C=I.lookupNode(g,Q),E=I.mayDelete(g,Q,!1);if(E)throw new I.ErrnoError(E);if(!g.node_ops.unlink)throw new I.ErrnoError(63);if(I.isMountpoint(C))throw new I.ErrnoError(10);g.node_ops.unlink(g,Q),I.destroyNode(C)},readlink:A=>{var B=I.lookupPath(A),g=B.node;if(!g)throw new I.ErrnoError(44);if(!g.node_ops.readlink)throw new I.ErrnoError(28);return YA.resolve(I.getPath(g.parent),g.node_ops.readlink(g))},stat:(A,B)=>{var g=I.lookupPath(A,{follow:!B}),Q=g.node;if(!Q)throw new I.ErrnoError(44);if(!Q.node_ops.getattr)throw new I.ErrnoError(63);return Q.node_ops.getattr(Q)},lstat:A=>I.stat(A,!0),chmod:(A,B,g)=>{var Q;if(typeof A=="string"){var C=I.lookupPath(A,{follow:!g});Q=C.node}else Q=A;if(!Q.node_ops.setattr)throw new I.ErrnoError(63);Q.node_ops.setattr(Q,{mode:B&4095|Q.mode&-4096,timestamp:Date.now()})},lchmod:(A,B)=>{I.chmod(A,B,!0)},fchmod:(A,B)=>{var g=I.getStream(A);if(!g)throw new I.ErrnoError(8);I.chmod(g.node,B)},chown:(A,B,g,Q)=>{var C;if(typeof A=="string"){var E=I.lookupPath(A,{follow:!Q});C=E.node}else C=A;if(!C.node_ops.setattr)throw new I.ErrnoError(63);C.node_ops.setattr(C,{timestamp:Date.now()})},lchown:(A,B,g)=>{I.chown(A,B,g,!0)},fchown:(A,B,g)=>{var Q=I.getStream(A);if(!Q)throw new I.ErrnoError(8);I.chown(Q.node,B,g)},truncate:(A,B)=>{if(B<0)throw new I.ErrnoError(28);var g;if(typeof A=="string"){var Q=I.lookupPath(A,{follow:!0});g=Q.node}else g=A;if(!g.node_ops.setattr)throw new I.ErrnoError(63);if(I.isDir(g.mode))throw new I.ErrnoError(31);if(!I.isFile(g.mode))throw new I.ErrnoError(28);var C=I.nodePermissions(g,"w");if(C)throw new I.ErrnoError(C);g.node_ops.setattr(g,{size:B,timestamp:Date.now()})},ftruncate:(A,B)=>{var g=I.getStream(A);if(!g)throw new I.ErrnoError(8);if((g.flags&2097155)===0)throw new I.ErrnoError(28);I.truncate(g.node,B)},utime:(A,B,g)=>{var Q=I.lookupPath(A,{follow:!0}),C=Q.node;C.node_ops.setattr(C,{timestamp:Math.max(B,g)})},open:(A,B,g)=>{if(A==="")throw new I.ErrnoError(44);B=typeof B=="string"?I.modeStringToFlags(B):B,g=typeof g>"u"?438:g,B&64?g=g&4095|32768:g=0;var Q;if(typeof A=="object")Q=A;else{A=m.normalize(A);try{var C=I.lookupPath(A,{follow:!(B&131072)});Q=C.node}catch{}}var E=!1;if(B&64)if(Q){if(B&128)throw new I.ErrnoError(20)}else Q=I.mknod(A,g,0),E=!0;if(!Q)throw new I.ErrnoError(44);if(I.isChrdev(Q.mode)&&(B&=-513),B&65536&&!I.isDir(Q.mode))throw new I.ErrnoError(54);if(!E){var D=I.mayOpen(Q,B);if(D)throw new I.ErrnoError(D)}B&512&&!E&&I.truncate(Q,0),B&=-131713;var N=I.createStream({node:Q,path:I.getPath(Q),flags:B,seekable:!0,position:0,stream_ops:Q.stream_ops,ungotten:[],error:!1});return N.stream_ops.open&&N.stream_ops.open(N),G.logReadFiles&&!(B&1)&&(I.readFiles||(I.readFiles={}),A in I.readFiles||(I.readFiles[A]=1)),N},close:A=>{if(I.isClosed(A))throw new I.ErrnoError(8);A.getdents&&(A.getdents=null);try{A.stream_ops.close&&A.stream_ops.close(A)}catch(B){throw B}finally{I.closeStream(A.fd)}A.fd=null},isClosed:A=>A.fd===null,llseek:(A,B,g)=>{if(I.isClosed(A))throw new I.ErrnoError(8);if(!A.seekable||!A.stream_ops.llseek)throw new I.ErrnoError(70);if(g!=0&&g!=1&&g!=2)throw new I.ErrnoError(28);return A.position=A.stream_ops.llseek(A,B,g),A.ungotten=[],A.position},read:(A,B,g,Q,C)=>{if(Q<0||C<0)throw new I.ErrnoError(28);if(I.isClosed(A))throw new I.ErrnoError(8);if((A.flags&2097155)===1)throw new I.ErrnoError(8);if(I.isDir(A.node.mode))throw new I.ErrnoError(31);if(!A.stream_ops.read)throw new I.ErrnoError(28);var E=typeof C<"u";if(!E)C=A.position;else if(!A.seekable)throw new I.ErrnoError(70);var D=A.stream_ops.read(A,B,g,Q,C);return E||(A.position+=D),D},write:(A,B,g,Q,C,E)=>{if(Q<0||C<0)throw new I.ErrnoError(28);if(I.isClosed(A))throw new I.ErrnoError(8);if((A.flags&2097155)===0)throw new I.ErrnoError(8);if(I.isDir(A.node.mode))throw new I.ErrnoError(31);if(!A.stream_ops.write)throw new I.ErrnoError(28);A.seekable&&A.flags&1024&&I.llseek(A,0,2);var D=typeof C<"u";if(!D)C=A.position;else if(!A.seekable)throw new I.ErrnoError(70);var N=A.stream_ops.write(A,B,g,Q,C,E);return D||(A.position+=N),N},allocate:(A,B,g)=>{if(I.isClosed(A))throw new I.ErrnoError(8);if(B<0||g<=0)throw new I.ErrnoError(28);if((A.flags&2097155)===0)throw new I.ErrnoError(8);if(!I.isFile(A.node.mode)&&!I.isDir(A.node.mode))throw new I.ErrnoError(43);if(!A.stream_ops.allocate)throw new I.ErrnoError(138);A.stream_ops.allocate(A,B,g)},mmap:(A,B,g,Q,C)=>{if((Q&2)!==0&&(C&2)===0&&(A.flags&2097155)!==2)throw new I.ErrnoError(2);if((A.flags&2097155)===1)throw new I.ErrnoError(2);if(!A.stream_ops.mmap)throw new I.ErrnoError(43);return A.stream_ops.mmap(A,B,g,Q,C)},msync:(A,B,g,Q,C)=>!A||!A.stream_ops.msync?0:A.stream_ops.msync(A,B,g,Q,C),munmap:A=>0,ioctl:(A,B,g)=>{if(!A.stream_ops.ioctl)throw new I.ErrnoError(59);return A.stream_ops.ioctl(A,B,g)},readFile:(A,B={})=>{if(B.flags=B.flags||0,B.encoding=B.encoding||"binary",B.encoding!=="utf8"&&B.encoding!=="binary")throw new Error('Invalid encoding type "'+B.encoding+'"');var g,Q=I.open(A,B.flags),C=I.stat(A),E=C.size,D=new Uint8Array(E);return I.read(Q,D,0,E,0),B.encoding==="utf8"?g=CA(D,0):B.encoding==="binary"&&(g=D),I.close(Q),g},writeFile:(A,B,g={})=>{g.flags=g.flags||577;var Q=I.open(A,g.flags,g.mode);if(typeof B=="string"){var C=new Uint8Array(e(B)+1),E=aA(B,C,0,C.length);I.write(Q,C,0,E,void 0,g.canOwn)}else if(ArrayBuffer.isView(B))I.write(Q,B,0,B.byteLength,void 0,g.canOwn);else throw new Error("Unsupported data type");I.close(Q)},cwd:()=>I.currentPath,chdir:A=>{var B=I.lookupPath(A,{follow:!0});if(B.node===null)throw new I.ErrnoError(44);if(!I.isDir(B.node.mode))throw new I.ErrnoError(54);var g=I.nodePermissions(B.node,"x");if(g)throw new I.ErrnoError(g);I.currentPath=B.path},createDefaultDirectories:()=>{I.mkdir("/tmp"),I.mkdir("/home"),I.mkdir("/home/web_user")},createDefaultDevices:()=>{I.mkdir("/dev"),I.registerDevice(I.makedev(1,3),{read:()=>0,write:(B,g,Q,C,E)=>C}),I.mkdev("/dev/null",I.makedev(1,3)),cA.register(I.makedev(5,0),cA.default_tty_ops),cA.register(I.makedev(6,0),cA.default_tty1_ops),I.mkdev("/dev/tty",I.makedev(5,0)),I.mkdev("/dev/tty1",I.makedev(6,0));var A=Vg();I.createDevice("/dev","random",A),I.createDevice("/dev","urandom",A),I.mkdir("/dev/shm"),I.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{I.mkdir("/proc");var A=I.mkdir("/proc/self");I.mkdir("/proc/self/fd"),I.mount({mount:()=>{var B=I.createNode(A,"fd",16895,73);return B.node_ops={lookup:(g,Q)=>{var C=+Q,E=I.getStream(C);if(!E)throw new I.ErrnoError(8);var D={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>E.path}};return D.parent=D,D}},B}},{},"/proc/self/fd")},createStandardStreams:()=>{G.stdin?I.createDevice("/dev","stdin",G.stdin):I.symlink("/dev/tty","/dev/stdin"),G.stdout?I.createDevice("/dev","stdout",null,G.stdout):I.symlink("/dev/tty","/dev/stdout"),G.stderr?I.createDevice("/dev","stderr",null,G.stderr):I.symlink("/dev/tty1","/dev/stderr"),I.open("/dev/stdin",0),I.open("/dev/stdout",1),I.open("/dev/stderr",1)},ensureErrnoError:()=>{I.ErrnoError||(I.ErrnoError=function(B,g){this.node=g,this.setErrno=function(Q){this.errno=Q},this.setErrno(B),this.message="FS error"},I.ErrnoError.prototype=new Error,I.ErrnoError.prototype.constructor=I.ErrnoError,[44].forEach(A=>{I.genericErrors[A]=new I.ErrnoError(A),I.genericErrors[A].stack=""}))},staticInit:()=>{I.ensureErrnoError(),I.nameTable=new Array(4096),I.mount(J,{},"/"),I.createDefaultDirectories(),I.createDefaultDevices(),I.createSpecialDirectories(),I.filesystems={MEMFS:J}},init:(A,B,g)=>{I.init.initialized=!0,I.ensureErrnoError(),G.stdin=A||G.stdin,G.stdout=B||G.stdout,G.stderr=g||G.stderr,I.createStandardStreams()},quit:()=>{I.init.initialized=!1;for(var A=0;A{var g=0;return A&&(g|=365),B&&(g|=146),g},findObject:(A,B)=>{var g=I.analyzePath(A,B);return g.exists?g.object:null},analyzePath:(A,B)=>{try{var g=I.lookupPath(A,{follow:!B});A=g.path}catch{}var Q={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var g=I.lookupPath(A,{parent:!0});Q.parentExists=!0,Q.parentPath=g.path,Q.parentObject=g.node,Q.name=m.basename(A),g=I.lookupPath(A,{follow:!B}),Q.exists=!0,Q.path=g.path,Q.object=g.node,Q.name=g.node.name,Q.isRoot=g.path==="/"}catch(C){Q.error=C.errno}return Q},createPath:(A,B,g,Q)=>{A=typeof A=="string"?A:I.getPath(A);for(var C=B.split("/").reverse();C.length;){var E=C.pop();if(!!E){var D=m.join2(A,E);try{I.mkdir(D)}catch{}A=D}}return D},createFile:(A,B,g,Q,C)=>{var E=m.join2(typeof A=="string"?A:I.getPath(A),B),D=I.getMode(Q,C);return I.create(E,D)},createDataFile:(A,B,g,Q,C,E)=>{var D=B;A&&(A=typeof A=="string"?A:I.getPath(A),D=B?m.join2(A,B):A);var N=I.getMode(Q,C),F=I.create(D,N);if(g){if(typeof g=="string"){for(var o=new Array(g.length),h=0,y=g.length;h{var C=m.join2(typeof A=="string"?A:I.getPath(A),B),E=I.getMode(!!g,!!Q);I.createDevice.major||(I.createDevice.major=64);var D=I.makedev(I.createDevice.major++,0);return I.registerDevice(D,{open:N=>{N.seekable=!1},close:N=>{Q&&Q.buffer&&Q.buffer.length&&Q(10)},read:(N,F,o,h,y)=>{for(var Y=0,i=0;i{for(var Y=0;Y{if(A.isDevice||A.isFolder||A.link||A.contents)return!0;if(typeof XMLHttpRequest<"u")throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(r)try{A.contents=qA(r(A.url),!0),A.usedBytes=A.contents.length}catch{throw new I.ErrnoError(29)}else throw new Error("Cannot load without read() or XMLHttpRequest.")},createLazyFile:(A,B,g,Q,C)=>{function E(){this.lengthKnown=!1,this.chunks=[]}if(E.prototype.get=function(i){if(!(i>this.length-1||i<0)){var k=i%this.chunkSize,Z=i/this.chunkSize|0;return this.getter(Z)[k]}},E.prototype.setDataGetter=function(i){this.getter=i},E.prototype.cacheLength=function(){var i=new XMLHttpRequest;if(i.open("HEAD",g,!1),i.send(null),!(i.status>=200&&i.status<300||i.status===304))throw new Error("Couldn't load "+g+". Status: "+i.status);var k=Number(i.getResponseHeader("Content-length")),Z,c=(Z=i.getResponseHeader("Accept-Ranges"))&&Z==="bytes",q=(Z=i.getResponseHeader("Content-Encoding"))&&Z==="gzip",U=1024*1024;c||(U=k);var a=(x,BA)=>{if(x>BA)throw new Error("invalid range ("+x+", "+BA+") or no bytes requested!");if(BA>k-1)throw new Error("only "+k+" bytes available! programmer error!");var w=new XMLHttpRequest;if(w.open("GET",g,!1),k!==U&&w.setRequestHeader("Range","bytes="+x+"-"+BA),w.responseType="arraybuffer",w.overrideMimeType&&w.overrideMimeType("text/plain; charset=x-user-defined"),w.send(null),!(w.status>=200&&w.status<300||w.status===304))throw new Error("Couldn't load "+g+". Status: "+w.status);return w.response!==void 0?new Uint8Array(w.response||[]):qA(w.responseText||"",!0)},V=this;V.setDataGetter(x=>{var BA=x*U,w=(x+1)*U-1;if(w=Math.min(w,k-1),typeof V.chunks[x]>"u"&&(V.chunks[x]=a(BA,w)),typeof V.chunks[x]>"u")throw new Error("doXHR failed!");return V.chunks[x]}),(q||!k)&&(U=k=1,k=this.getter(0).length,U=k,wA("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=k,this._chunkSize=U,this.lengthKnown=!0},typeof XMLHttpRequest<"u"){throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var D,N}else var N={isDevice:!1,url:g};var F=I.createFile(A,B,N,Q,C);N.contents?F.contents=N.contents:N.url&&(F.contents=null,F.url=N.url),Object.defineProperties(F,{usedBytes:{get:function(){return this.contents.length}}});var o={},h=Object.keys(F.stream_ops);h.forEach(Y=>{var i=F.stream_ops[Y];o[Y]=function(){return I.forceLoadFile(F),i.apply(null,arguments)}});function y(Y,i,k,Z,c){var q=Y.node.contents;if(c>=q.length)return 0;var U=Math.min(q.length-c,Z);if(q.slice)for(var a=0;a(I.forceLoadFile(F),y(Y,i,k,Z,c)),o.mmap=(Y,i,k,Z,c)=>{I.forceLoadFile(F);var q=kB(i);if(!q)throw new I.ErrnoError(48);return y(Y,W,q,i,k),{ptr:q,allocated:!0}},F.stream_ops=o,F},createPreloadedFile:(A,B,g,Q,C,E,D,N,F,o)=>{var h=B?YA.resolve(m.join2(A,B)):A;function y(Y){function i(k){o&&o(),N||I.createDataFile(A,B,k,Q,C,F),E&&E(),lA()}Browser.handledByPreloadPlugin(Y,h,i,()=>{D&&D(),lA()})||i(Y)}TA(),typeof g=="string"?dg(g,Y=>y(Y),D):y(g)},indexedDB:()=>window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,DB_NAME:()=>"EM_FS_"+window.location.pathname,DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:(A,B,g)=>{B=B||(()=>{}),g=g||(()=>{});var Q=I.indexedDB();try{var C=Q.open(I.DB_NAME(),I.DB_VERSION)}catch(E){return g(E)}C.onupgradeneeded=()=>{wA("creating db");var E=C.result;E.createObjectStore(I.DB_STORE_NAME)},C.onsuccess=()=>{var E=C.result,D=E.transaction([I.DB_STORE_NAME],"readwrite"),N=D.objectStore(I.DB_STORE_NAME),F=0,o=0,h=A.length;function y(){o==0?B():g()}A.forEach(Y=>{var i=N.put(I.analyzePath(Y).object.contents,Y);i.onsuccess=()=>{F++,F+o==h&&y()},i.onerror=()=>{o++,F+o==h&&y()}}),D.onerror=g},C.onerror=g},loadFilesFromDB:(A,B,g)=>{B=B||(()=>{}),g=g||(()=>{});var Q=I.indexedDB();try{var C=Q.open(I.DB_NAME(),I.DB_VERSION)}catch(E){return g(E)}C.onupgradeneeded=g,C.onsuccess=()=>{var E=C.result;try{var D=E.transaction([I.DB_STORE_NAME],"readonly")}catch(Y){g(Y);return}var N=D.objectStore(I.DB_STORE_NAME),F=0,o=0,h=A.length;function y(){o==0?B():g()}A.forEach(Y=>{var i=N.get(Y);i.onsuccess=()=>{I.analyzePath(Y).exists&&I.unlink(Y),I.createDataFile(m.dirname(Y),m.basename(Y),i.result,!0,!0,!0),F++,F+o==h&&y()},i.onerror=()=>{o++,F+o==h&&y()}}),D.onerror=g},C.onerror=g}},j={DEFAULT_POLLMASK:5,calculateAt:function(A,B,g){if(m.isAbs(B))return B;var Q;if(A===-100)Q=I.cwd();else{var C=I.getStream(A);if(!C)throw new I.ErrnoError(8);Q=C.path}if(B.length==0){if(!g)throw new I.ErrnoError(44);return Q}return m.join2(Q,B)},doStat:function(A,B,g){try{var Q=A(B)}catch(C){if(C&&C.node&&m.normalize(B)!==m.normalize(I.getPath(C.node)))return-54;throw C}return R[g>>2]=Q.dev,R[g+8>>2]=Q.ino,R[g+12>>2]=Q.mode,R[g+16>>2]=Q.nlink,R[g+20>>2]=Q.uid,R[g+24>>2]=Q.gid,R[g+28>>2]=Q.rdev,X=[Q.size>>>0,(M=Q.size,+Math.abs(M)>=1?M>0?(Math.min(+Math.floor(M/4294967296),4294967295)|0)>>>0:~~+Math.ceil((M-+(~~M>>>0))/4294967296)>>>0:0)],R[g+40>>2]=X[0],R[g+44>>2]=X[1],R[g+48>>2]=4096,R[g+52>>2]=Q.blocks,X=[Math.floor(Q.atime.getTime()/1e3)>>>0,(M=Math.floor(Q.atime.getTime()/1e3),+Math.abs(M)>=1?M>0?(Math.min(+Math.floor(M/4294967296),4294967295)|0)>>>0:~~+Math.ceil((M-+(~~M>>>0))/4294967296)>>>0:0)],R[g+56>>2]=X[0],R[g+60>>2]=X[1],R[g+64>>2]=0,X=[Math.floor(Q.mtime.getTime()/1e3)>>>0,(M=Math.floor(Q.mtime.getTime()/1e3),+Math.abs(M)>=1?M>0?(Math.min(+Math.floor(M/4294967296),4294967295)|0)>>>0:~~+Math.ceil((M-+(~~M>>>0))/4294967296)>>>0:0)],R[g+72>>2]=X[0],R[g+76>>2]=X[1],R[g+80>>2]=0,X=[Math.floor(Q.ctime.getTime()/1e3)>>>0,(M=Math.floor(Q.ctime.getTime()/1e3),+Math.abs(M)>=1?M>0?(Math.min(+Math.floor(M/4294967296),4294967295)|0)>>>0:~~+Math.ceil((M-+(~~M>>>0))/4294967296)>>>0:0)],R[g+88>>2]=X[0],R[g+92>>2]=X[1],R[g+96>>2]=0,X=[Q.ino>>>0,(M=Q.ino,+Math.abs(M)>=1?M>0?(Math.min(+Math.floor(M/4294967296),4294967295)|0)>>>0:~~+Math.ceil((M-+(~~M>>>0))/4294967296)>>>0:0)],R[g+104>>2]=X[0],R[g+108>>2]=X[1],0},doMsync:function(A,B,g,Q,C){var E=gA.slice(A,A+g);I.msync(B,E,C,g,Q)},varargs:void 0,get:function(){j.varargs+=4;var A=R[j.varargs-4>>2];return A},getStr:function(A){var B=GA(A);return B},getStreamFromFD:function(A){var B=I.getStream(A);if(!B)throw new I.ErrnoError(8);return B}};function mg(A,B,g){j.varargs=g;try{var Q=j.getStreamFromFD(A);switch(B){case 0:{var C=j.get();if(C<0)return-28;var E;return E=I.createStream(Q,C),E.fd}case 1:case 2:return 0;case 3:return Q.flags;case 4:{var C=j.get();return Q.flags|=C,0}case 5:{var C=j.get(),D=0;return hA[C+D>>1]=2,0}case 6:case 7:return 0;case 16:case 8:return-28;case 9:return Lg(28),-1;default:return-28}}catch(N){if(typeof I>"u"||!(N instanceof I.ErrnoError))throw N;return-N.errno}}function jg(A,B){try{var g=j.getStreamFromFD(A);return j.doStat(I.stat,g.path,B)}catch(Q){if(typeof I>"u"||!(Q instanceof I.ErrnoError))throw Q;return-Q.errno}}function lg(A,B){try{if(B===0)return-28;var g=I.cwd(),Q=e(g)+1;return B"u"||!(C instanceof I.ErrnoError))throw C;return-C.errno}}function qg(A,B,g){try{var Q=j.getStreamFromFD(A);Q.getdents||(Q.getdents=I.readdir(Q.path));for(var C=280,E=0,D=I.llseek(Q,0,1),N=Math.floor(D/C);N>>0,(M=F,+Math.abs(M)>=1?M>0?(Math.min(+Math.floor(M/4294967296),4294967295)|0)>>>0:~~+Math.ceil((M-+(~~M>>>0))/4294967296)>>>0:0)],R[B+E>>2]=X[0],R[B+E+4>>2]=X[1],X=[(N+1)*C>>>0,(M=(N+1)*C,+Math.abs(M)>=1?M>0?(Math.min(+Math.floor(M/4294967296),4294967295)|0)>>>0:~~+Math.ceil((M-+(~~M>>>0))/4294967296)>>>0:0)],R[B+E+8>>2]=X[0],R[B+E+12>>2]=X[1],hA[B+E+16>>1]=280,W[B+E+18>>0]=o,KA(h,B+E+19,256),E+=C,N+=1}return I.llseek(Q,N*C,0),E}catch(i){if(typeof I>"u"||!(i instanceof I.ErrnoError))throw i;return-i.errno}}function xg(A,B,g){j.varargs=g;try{var Q=j.getStreamFromFD(A);switch(B){case 21509:case 21505:return Q.tty?0:-59;case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:return Q.tty?0:-59;case 21519:{if(!Q.tty)return-59;var C=j.get();return R[C>>2]=0,0}case 21520:return Q.tty?-28:-59;case 21531:{var C=j.get();return I.ioctl(Q,B,C)}case 21523:return Q.tty?0:-59;case 21524:return Q.tty?0:-59;default:return-28}}catch(E){if(typeof I>"u"||!(E instanceof I.ErrnoError))throw E;return-E.errno}}function bg(A,B){try{return A=j.getStr(A),j.doStat(I.lstat,A,B)}catch(g){if(typeof I>"u"||!(g instanceof I.ErrnoError))throw g;return-g.errno}}function Xg(A,B,g,Q){try{B=j.getStr(B);var C=Q&256,E=Q&4096;return Q=Q&-4353,B=j.calculateAt(A,B,E),j.doStat(C?I.lstat:I.stat,B,g)}catch(D){if(typeof I>"u"||!(D instanceof I.ErrnoError))throw D;return-D.errno}}function fg(A,B,g,Q){j.varargs=Q;try{B=j.getStr(B),B=j.calculateAt(A,B);var C=Q?j.get():0;return I.open(B,g,C).fd}catch(E){if(typeof I>"u"||!(E instanceof I.ErrnoError))throw E;return-E.errno}}function tg(A,B,g,Q){try{if(B=j.getStr(B),B=j.calculateAt(A,B),Q<=0)return-28;var C=I.readlink(B),E=Math.min(Q,e(C)),D=W[g+E];return KA(C,g,Q+1),W[g+E]=D,E}catch(N){if(typeof I>"u"||!(N instanceof I.ErrnoError))throw N;return-N.errno}}function Tg(A,B){try{return A=j.getStr(A),j.doStat(I.stat,A,B)}catch(g){if(typeof I>"u"||!(g instanceof I.ErrnoError))throw g;return-g.errno}}function pg(){return Date.now()}function ng(A){do{var B=d[A>>2];A+=4;var g=d[A>>2];A+=4;var Q=d[A>>2];A+=4;var C=GA(B);I.createPath("/",m.dirname(C),!0,!0),I.createDataFile(C,null,W.subarray(Q,Q+g),!0,!0,!0)}while(d[A>>2])}var zg=!0;function rg(){return zg}function yB(A){return d[A>>2]+R[A+4>>2]*4294967296}function eg(A,B){var g=new Date(yB(A)*1e3);R[B>>2]=g.getUTCSeconds(),R[B+4>>2]=g.getUTCMinutes(),R[B+8>>2]=g.getUTCHours(),R[B+12>>2]=g.getUTCDate(),R[B+16>>2]=g.getUTCMonth(),R[B+20>>2]=g.getUTCFullYear()-1900,R[B+24>>2]=g.getUTCDay();var Q=Date.UTC(g.getUTCFullYear(),0,1,0,0,0,0),C=(g.getTime()-Q)/(1e3*60*60*24)|0;R[B+28>>2]=C}function Og(A,B){var g=new Date(yB(A)*1e3);R[B>>2]=g.getSeconds(),R[B+4>>2]=g.getMinutes(),R[B+8>>2]=g.getHours(),R[B+12>>2]=g.getDate(),R[B+16>>2]=g.getMonth(),R[B+20>>2]=g.getFullYear()-1900,R[B+24>>2]=g.getDay();var Q=new Date(g.getFullYear(),0,1),C=(g.getTime()-Q.getTime())/(1e3*60*60*24)|0;R[B+28>>2]=C,R[B+36>>2]=-(g.getTimezoneOffset()*60);var E=new Date(g.getFullYear(),6,1).getTimezoneOffset(),D=Q.getTimezoneOffset(),N=(E!=D&&g.getTimezoneOffset()==Math.min(D,E))|0;R[B+32>>2]=N}function vg(A,B,g,Q,C,E){try{var D=I.getStream(C);D&&(g&2&&j.doMsync(A,D,B,Q,E),I.munmap(D))}catch(N){if(typeof I>"u"||!(N instanceof I.ErrnoError))throw N;return-N.errno}}function aB(A){var B=e(A)+1,g=EB(B);return g&&aA(A,W,g,B),g}function ug(A,B,g){var Q=new Date().getFullYear(),C=new Date(Q,0,1),E=new Date(Q,6,1),D=C.getTimezoneOffset(),N=E.getTimezoneOffset(),F=Math.max(D,N);R[A>>2]=F*60,R[B>>2]=Number(D!=N);function o(k){var Z=k.toTimeString().match(/\(([A-Za-z ]+)\)$/);return Z?Z[1]:"GMT"}var h=o(C),y=o(E),Y=aB(h),i=aB(y);N>2]=Y,d[g+4>>2]=i):(d[g>>2]=i,d[g+4>>2]=Y)}function BB(A,B,g){BB.called||(BB.called=!0,ug(A,B,g))}function Pg(){oA("")}var gB=[];function _g(A,B){gB.length=0;var g;for(B>>=2;g=gA[A++];)B+=g!=105&B,gB.push(g==105?R[B]:kA[B++>>1]),++B;return gB}function $g(A,B,g){var Q=_g(B,g);return og[A].apply(null,Q)}var MB;MB=()=>performance.now();function AQ(A){return A<0||A===0&&1/A===-1/0}function BQ(A,B){return(A>>>0)+B*4294967296}function gQ(A,B){return(A>>>0)+(B>>>0)*4294967296}function SB(A,B){if(A<=0)return A;var g=B<=32?Math.abs(1<=g&&(B<=32||A>g)&&(A=-2*g+A),A}function JB(A,B){return A>=0?A:B<=32?2*Math.abs(1<>3],Q+=8):DA=="i64"?(iA=[R[Q>>2],R[Q+4>>2]],Q+=8):(DA="i32",iA=R[Q>>2],Q+=4),iA}for(var D=[],N,F,o;;){var h=g;if(N=W[g>>0],N===0)break;if(F=W[g+1>>0],N==37){var y=!1,Y=!1,i=!1,k=!1,Z=!1;A:for(;;){switch(F){case 43:y=!0;break;case 45:Y=!0;break;case 35:i=!0;break;case 48:if(k)break A;k=!0;break;case 32:Z=!0;break;default:break A}g++,F=W[g+1>>0]}var c=0;if(F==42)c=E("i32"),g++,F=W[g+1>>0];else for(;F>=48&&F<=57;)c=c*10+(F-48),g++,F=W[g+1>>0];var q=!1,U=-1;if(F==46){if(U=0,q=!0,g++,F=W[g+1>>0],F==42)U=E("i32"),g++;else for(;;){var a=W[g+1>>0];if(a<48||a>57)break;U=U*10+(a-48),g++}F=W[g+1>>0]}U<0&&(U=6,q=!1);var V;switch(String.fromCharCode(F)){case"h":var x=W[g+2>>0];x==104?(g++,V=1):V=2;break;case"l":var x=W[g+2>>0];x==108?(g++,V=8):V=4;break;case"L":case"q":case"j":V=8;break;case"z":case"t":case"I":V=4;break;default:V=null}switch(V&&g++,F=W[g+1>>0],String.fromCharCode(F)){case"d":case"i":case"u":case"o":case"x":case"X":case"p":{var BA=F==100||F==105;V=V||4,o=E("i"+V*8);var w;if(V==8&&(o=F==117?gQ(o[0],o[1]):BQ(o[0],o[1])),V<=4){var JI=Math.pow(256,V)-1;o=(BA?SB:JB)(o&JI,V*8)}var XA=Math.abs(o),P="";if(F==100||F==105)w=SB(o,8*V).toString(10);else if(F==117)w=JB(o,8*V).toString(10),o=Math.abs(o);else if(F==111)w=(i?"0":"")+XA.toString(8);else if(F==120||F==88){if(P=i&&o!=0?"0x":"",o<0){o=-o,w=(XA-1).toString(16);for(var PB=[],EA=0;EA=0&&(y?P="+"+P:Z&&(P=" "+P)),w.charAt(0)=="-"&&(P="-"+P,w=w.substr(1));P.length+w.lengthNB&&NB>=-4?(F=(F==103?"f":"F").charCodeAt(0),U-=NB+1):(F=(F==103?"e":"E").charCodeAt(0),U--),fA=Math.min(U,20)}F==101||F==69?(w=o.toExponential(fA),/[eE][-+]\d$/.test(w)&&(w=w.slice(0,-1)+"0"+w.slice(-1))):(F==102||F==70)&&(w=o.toFixed(fA),o===0&&AQ(o)&&(w="-"+w));var IA=w.split("e");if(_B&&!i)for(;IA[0].length>1&&IA[0].includes(".")&&(IA[0].slice(-1)=="0"||IA[0].slice(-1)==".");)IA[0]=IA[0].slice(0,-1);else for(i&&w.indexOf(".")==-1&&(IA[0]+=".");U>fA++;)IA[0]+="0";w=IA[0]+(IA.length>1?"e"+IA[1]:""),F==69&&(w=w.toUpperCase()),o>=0&&(y?w="+"+w:Z&&(w=" "+w))}for(;w.length>0]);else D=D.concat(qA("(null)".substr(0,ZA),!0));if(Y)for(;ZA0;)D.push(32);Y||D.push(E("i8"));break}case"n":{var cI=E("i32*");R[cI>>2]=D.length;break}case"%":{D.push(N);break}default:for(var EA=h;EA>0])}g+=2}else D.push(N),g+=1}return D}function QB(A){if(!A||!A.callee||!A.callee.name)return[null,"",""];A.callee.toString();var B=A.callee.name,g="(",Q=!0;for(var C in A){var E=A[C];Q||(g+=", "),Q=!1,typeof E=="number"||typeof E=="string"?g+=E:g+="("+typeof E+")"}g+=")";var D=A.callee.caller;return A=D?D.arguments:[],Q&&(g=""),[A,B,g]}function VA(A){VA.shown||(VA.shown={}),VA.shown[A]||(VA.shown[A]=1,p(A))}function CQ(A){var B=Yg(),g=B.lastIndexOf("_emscripten_log"),Q=B.lastIndexOf("_emscripten_get_callstack"),C=B.indexOf(` `,Math.max(g,Q))+1;B=B.slice(C),A&32&&VA("EM_LOG_DEMANGLE is deprecated; ignoring"),A&8&&typeof emscripten_source_map>"u"&&(VA('Source map information is not available, emscripten_log with EM_LOG_C_STACK will be ignored. Build with "--pre-js $EMSCRIPTEN/src/emscripten-source-map.min.js" linker flag to add source map loading to code.'),A^=8,A|=16);var E=null;if(A&128)for(E=QB(arguments);E[1].includes("_emscripten_");)E=QB(E[0]);var D=B.split(` diff --git a/index.html b/index.html index 93aad06..ed06565 100644 --- a/index.html +++ b/index.html @@ -2,7 +2,7 @@ - + - + +