Reading from NEAR testnet…
Reading from NEAR testnet…
5uyAvqW4bUFECnFzYNruQVZc7GaqumNcZiP1aJn9Nzqz
web4.nearbuilders.testnet to web4.nearbuilders.testnet · failed
fs_store()
fZe17/edel9MTXMlWMmmGHqTh1+ceHx9XB0FpASxnW7XV19uyb161TxTZBv9OEkHq2vLHFv7JejsnQ4t2ok5Ze8fKVDOfetEzjd+Ki8rL6pcR1urxMdCa/DSoGC+trC6o641RsmIbAovO3n8PiMqj0srKei8GT4tW7vuervYrlkYBlMe12uEgBm15ZcFLZ4B1b5yTw1UP8iyAlRBWwBNe6LXIfOMKoPXxYW9Y2//nY7+PhtDPn98PkhFU9lXpy7v85CfoarnUcqqJvKzfL98It8BsAKweKfvqTCpoatuYR45nMW3t9dOdOn+QLJrK7ZvVhrq7sayNMNrCBDH52SEqa/PE6Ol+0UsMX08Ea+ul5fhwVTX6uch+S5TxP6/hFhm8FQssa0+ncPUZzyCbQ60tYXBpYKq4/of53xgjLFRWR5TFokScU/NgbWOHsoMXJpCBgscAWCNDC6Koze57X7f7JOpZbbyugrLEBqdQCVGYe2xGZm+4tLyctpZ8FD2wN6+vXFhbMn3bSFRJVEOUhdr6cJEU7pQBTh9hCtnFSCnrWRqVVlZr1sTxj5+1QQW4nLaiWXzju+xBytoGUfE49Z4gBdcQWIbWB4mjENo/yAjS/TOCoroCezdjKIq2ba///e3bz87pCrVFvQscfslBwcdDYPUiQkpSICoANgjWhZtER2tF94Mstq+YtysrK41KGGKFxnV9ff2XhtWhtGqnrbAq8j2QP9sYMIY9Ub0fGsATKIvR6jUNn/EySMYQdWXsSr8abcH1WHeIy0qrphvr5VsoI2qyCcqHFRC9p43KU8KrWgx9g7Bvek2047fHzSAxrE/r7DwyWF2Z0CBUIdQv7VpFWxQaWW0Gsevq9CxaeXGvz4S15VuZ9yglbPkAGlTDYRlaRlQmv/ePU10rs+EJSxhXN7TEpoA5dNJq2zeqrc5vrP0vxMLsJObCOjx7yCpSVnUCZekEoWkZZe0/UVur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+V+mtiUI3KqgOCLSA1yb4DUgSvrbYSNbpsWCYyeCCU8lOaW8Cpt+k3QsrhpW9AA2CWXLWguXJtL7IKW4MA1E5xavHdoPKGRhFspRADWkkMV+0WQ+D8g5vA6l97n35XoJCjmb7rS/Y5YMYaRGCTvpY/zb45UKQmgWQ7hRl5dj8wXaPZQr/PQeGTLfQLHn5A+Xl+np/n53nC8x/tAMljWkeBnAAAAABJRU5ErkJggg==";const resolveWalletUrl=(Mn,Fn)=>{if(Fn)return Fn;switch(Mn.networkId){case"mainnet":return"https://app.mynearwallet.com";case"testnet":return"https://testnet.mynearwallet.com";default:throw new Error("Invalid wallet url")}},setupWalletState=(Mn,Fn)=>__awaiter$2(void 0,void 0,void 0,function*(){const io=new browserIndex$2.keyStores.BrowserLocalStorageKeyStore,fo=yield browserIndex$2.connect(Object.assign(Object.assign({keyStore:io,walletUrl:Mn.walletUrl},Fn),{headers:{}}));return{wallet:new browserIndex$2.WalletConnection(fo,"near_app"),keyStore:io}}),MyNearWallet=({metadata:Mn,options:Fn,store:io,params:fo,logger:$o,id:mo})=>__awaiter$2(void 0,void 0,void 0,function*(){const Ao=yield setupWalletState(fo,Fn.network),jo=()=>__awaiter$2(void 0,void 0,void 0,function*(){const Ho=Ao.wallet.getAccountId(),zo=Ao.wallet.account();if(!Ho||!zo)return[];const Go=yield zo.connection.signer.getPublicKey(zo.accountId,Fn.network.networkId);return[{accountId:Ho,publicKey:Go?Go.toString():""}]}),Lo=Ho=>__awaiter$2(void 0,void 0,void 0,function*(){const zo=Ao.wallet.account(),{networkId:Go,signer:Vo,provider:Yo}=zo.connection,Xo=yield Vo.getPublicKey(zo.accountId,Go);return Promise.all(Ho.map((is,yl)=>__awaiter$2(void 0,void 0,void 0,function*(){const us=is.actions.map(Il=>createAction$1(Il)),hs=yield zo.accessKeyForTransaction(is.receiverId,us,Xo);if(!hs)throw new Error(`Failed to find matching key for transaction sent to ${is.receiverId}`);const _l=yield Yo.block({finality:"final"}),xl=hs.access_key.nonce+BigInt(yl+1);return browserIndex$2.transactions.createTransaction(zo.accountId,browserIndex$2.utils.PublicKey.from(hs.public_key),is.receiverId,xl,us,browserIndex$2.utils.serialize.base_decode(_l.header.hash))})))});return{signIn({contractId:Ho,methodNames:zo,successUrl:Go,failureUrl:Vo}){return __awaiter$2(this,void 0,void 0,function*(){const Yo=yield jo();return Yo.length?Yo:(yield Ao.wallet.requestSignIn({contractId:Ho,methodNames:zo,successUrl:Go,failureUrl:Vo}),jo())})},signOut(){return __awaiter$2(this,void 0,void 0,function*(){Ao.wallet.isSignedIn()&&Ao.wallet.signOut()})},getAccounts(){return __awaiter$2(this,void 0,void 0,function*(){return jo()})},verifyOwner(){return __awaiter$2(this,void 0,void 0,function*(){throw new Error(`Method not supported by ${Mn.name}`)})},signMessage({message:Ho,nonce:zo,recipient:Go,callbackUrl:Vo,state:Yo}){return __awaiter$2(this,void 0,void 0,function*(){if($o.log("sign message",{message:Ho}),mo!=="my-near-wallet")throw Error(`The signMessage method is not supported by ${Mn.name}`);const Xo=typeof window<"u"?window.location.href:"",is=Vo||Xo;if(!is)throw new Error(`The callbackUrl is missing for ${Mn.name}`);const yl=new URL(fo.walletUrl);yl.pathname="sign-message",yl.searchParams.append("message",Ho),yl.searchParams.append("nonce",zo.toString("base64")),yl.searchParams.append("recipient",Go),yl.searchParams.append("callbackUrl",is),Yo&&yl.searchParams.append("state",Yo),window.location.replace(yl.toString())})},signAndSendTransaction({signerId:Ho,receiverId:zo,actions:Go,callbackUrl:Vo}){return __awaiter$2(this,void 0,void 0,function*(){$o.log("signAndSendTransaction",{signerId:Ho,receiverId:zo,actions:Go,callbackUrl:Vo});const{contract:Yo}=io.getState();if(!Ao.wallet.isSignedIn()||!Yo)throw new Error("Wallet not signed in");return Ao.wallet.account().signAndSendTransaction({receiverId:zo||Yo.contractId,actions:Go.map(is=>createAction$1(is)),walletCallbackUrl:Vo})})},signAndSendTransactions({transactions:Ho,callbackUrl:zo}){return __awaiter$2(this,void 0,void 0,function*(){if($o.log("signAndSendTransactions",{transactions:Ho,callbackUrl:zo}),!Ao.wallet.isSignedIn())throw new Error("Wallet not signed in");return Ao.wallet.requestSignTransactions({transactions:yield Lo(Ho),callbackUrl:zo})})},buildImportAccountsUrl(){return`${fo.walletUrl}/batch-import`}}});function setupMyNearWallet({walletUrl:Mn,iconUrl:Fn=icon$2,deprecated:io=!1,successUrl:fo="",failureUrl:$o=""}={}){return mo=>__awaiter$2(this,void 0,void 0,function*(){return{id:"my-near-wallet",type:"browser",metadata:{name:"MyNearWallet",description:"NEAR wallet to store, buy, send and stake assets for DeFi.",iconUrl:Fn,deprecated:io,available:!0,successUrl:fo,failureUrl:$o,walletUrl:resolveWalletUrl(mo.options.network,Mn)},init:Ao=>MyNearWallet(Object.assign(Object.assign({},Ao),{params:{walletUrl:resolveWalletUrl(Ao.options.network,Mn)}}))}})}var commonjsGlobal$1=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global$o<"u"?global$o:typeof self<"u"?self:{},redefine$1$1={exports:{}},check$1=function(Mn){return Mn&&Mn.Math==Math&&Mn},global$7$1=check$1(typeof globalThis=="object"&&globalThis)||check$1(typeof window=="object"&&window)||check$1(typeof self=="object"&&self)||check$1(typeof commonjsGlobal$1=="object"&&commonjsGlobal$1)||Function("return this")(),fails$3$1=function(Mn){try{return!!Mn()}catch{return!0}},fails$2$1=fails$3$1,descriptors$1=!fails$2$1(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),objectDefineProperty$1={},isObject$4$1=function(Mn){return typeof Mn=="object"?Mn!==null:typeof Mn=="function"},global$6$1=global$7$1,isObject$3$1=isObject$4$1,document$2=global$6$1.document,EXISTS$1=isObject$3$1(document$2)&&isObject$3$1(document$2.createElement),documentCreateElement$2=function(Mn){return EXISTS$1?document$2.createElement(Mn):{}},DESCRIPTORS$2$1=descriptors$1,fails$1$1=fails$3$1,createElement$1=documentCreateElement$2,ie8DomDefine$1=!DESCRIPTORS$2$1&&!fails$1$1(function(){return Object.defineProperty(createElement$1("div"),"a",{get:function(){return 7}}).a!=7}),isObject$2$1=isObject$4$1,anObject$3$1=function(Mn){if(!isObject$2$1(Mn))throw TypeError(String(Mn)+" is not an object");return Mn},isObject$1$1=isObject$4$1,toPrimitive$1$1=function(Mn,Fn){if(!isObject$1$1(Mn))return Mn;var io,fo;if(Fn&&typeof(io=Mn.toString)=="function"&&!isObject$1$1(fo=io.call(Mn))||typeof(io=Mn.valueOf)=="function"&&!isObject$1$1(fo=io.call(Mn))||!Fn&&typeof(io=Mn.toString)=="function"&&!isObject$1$1(fo=io.call(Mn)))return fo;throw TypeError("Can't convert object to primitive value")},DESCRIPTORS$1$1=descriptors$1,IE8_DOM_DEFINE$2=ie8DomDefine$1,anObject$2$1=anObject$3$1,toPrimitive$4=toPrimitive$1$1,nativeDefineProperty$2=Object.defineProperty;objectDefineProperty$1.f=DESCRIPTORS$1$1?nativeDefineProperty$2:function Mn(Fn,io,fo){if(anObject$2$1(Fn),io=toPrimitive$4(io,!0),anObject$2$1(fo),IE8_DOM_DEFINE$2)try{return nativeDefineProperty$2(Fn,io,fo)}catch{}if("get"in fo||"set"in fo)throw TypeError("Accessors not supported");return"value"in fo&&(Fn[io]=fo.value),Fn};var createPropertyDescriptor$1$1=function(Mn,Fn){return{enumerable:!(Mn&1),configurable:!(Mn&2),writable:!(Mn&4),value:Fn}},DESCRIPTORS$a=descriptors$1,definePropertyModule$6=objectDefineProperty$1,createPropertyDescriptor$5=createPropertyDescriptor$1$1,createNonEnumerableProperty$3$1=DESCRIPTORS$a?function(Mn,Fn,io){return definePropertyModule$6.f(Mn,Fn,createPropertyDescriptor$5(1,io))}:function(Mn,Fn,io){return Mn[Fn]=io,Mn},hasOwnProperty$1={}.hasOwnProperty,has$2$1=function(Mn,Fn){return hasOwnProperty$1.call(Mn,Fn)},global$5$1=global$7$1,createNonEnumerableProperty$2$1=createNonEnumerableProperty$3$1,setGlobal$2$1=function(Mn,Fn){try{createNonEnumerableProperty$2$1(global$5$1,Mn,Fn)}catch{global$5$1[Mn]=Fn}return Fn},global$4$1=global$7$1,setGlobal$1$1=setGlobal$2$1,SHARED$1="__core-js_shared__",store$3$1=global$4$1[SHARED$1]||setGlobal$1$1(SHARED$1,{}),sharedStore$1=store$3$1,store$2$1=sharedStore$1,functionToString$1=Function.toString;typeof store$2$1.inspectSource!="function"&&(store$2$1.inspectSource=function(Mn){return functionToString$1.call(Mn)});var inspectSource$2$1=store$2$1.inspectSource,global$3$1=global$7$1,inspectSource$1$1=inspectSource$2$1,WeakMap$1$1=global$3$1.WeakMap,nativeWeakMap$1=typeof WeakMap$1$1=="function"&&/native code/.test(inspectSource$1$1(WeakMap$1$1)),shared$1$1={exports:{}},store$1$1=sharedStore$1;(shared$1$1.exports=function(Mn,Fn){return store$1$1[Mn]||(store$1$1[Mn]=Fn!==void 0?Fn:{})})("versions",[]).push({version:"3.6.5",mode:"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"});var id$3=0,postfix$1=Math.random(),uid$1$1=function(Mn){return"Symbol("+String(Mn===void 0?"":Mn)+")_"+(++id$3+postfix$1).toString(36)},shared$3=shared$1$1.exports,uid$4=uid$1$1,keys$2=shared$3("keys"),sharedKey$1$1=function(Mn){return keys$2[Mn]||(keys$2[Mn]=uid$4(Mn))},NATIVE_WEAK_MAP$1=nativeWeakMap$1,global$2$1=global$7$1,isObject$a=isObject$4$1,createNonEnumerableProperty$1$1=createNonEnumerableProperty$3$1,objectHas$1=has$2$1,sharedKey$4=sharedKey$1$1,WeakMap$3=global$2$1.WeakMap,set$2,get$2,has$1$1,enforce$1=function(Mn){return has$1$1(Mn)?get$2(Mn):set$2(Mn,{})},getterFor$1=function(Mn){return function(Fn){var io;if(!isObject$a(Fn)||(io=get$2(Fn)).type!==Mn)throw TypeError("Incompatible receiver, "+Mn+" required");return io}};if(NATIVE_WEAK_MAP$1){var store$4=new WeakMap$3,wmget$1=store$4.get,wmhas$1=store$4.has,wmset$1=store$4.set;set$2=function(Mn,Fn){return wmset$1.call(store$4,Mn,Fn),Fn},get$2=function(Mn){return wmget$1.call(store$4,Mn)||{}},has$1$1=function(Mn){return wmhas$1.call(store$4,Mn)}}else{var STATE$1=sharedKey$4("state");set$2=function(Mn,Fn){return createNonEnumerableProperty$1$1(Mn,STATE$1,Fn),Fn},get$2=function(Mn){return objectHas$1(Mn,STATE$1)?Mn[STATE$1]:{}},has$1$1=function(Mn){return objectHas$1(Mn,STATE$1)}}var internalState$1={set:set$2,get:get$2,has:has$1$1,enforce:enforce$1,getterFor:getterFor$1},global$1$1=global$7$1,createNonEnumerableProperty$a=createNonEnumerableProperty$3$1,has$c=has$2$1,setGlobal$4=setGlobal$2$1,inspectSource$3=inspectSource$2$1,InternalStateModule$4=internalState$1,getInternalState$4=InternalStateModule$4.get,enforceInternalState$1=InternalStateModule$4.enforce,TEMPLATE$1=String(String).split("String");(redefine$1$1.exports=function(Mn,Fn,io,fo){var $o=fo?!!fo.unsafe:!1,mo=fo?!!fo.enumerable:!1,Ao=fo?!!fo.noTargetGet:!1;if(typeof io=="function"&&(typeof Fn=="string"&&!has$c(io,"name")&&createNonEnumerableProperty$a(io,"name",Fn),enforceInternalState$1(io).source=TEMPLATE$1.join(typeof Fn=="string"?Fn:"")),Mn===global$1$1){mo?Mn[Fn]=io:setGlobal$4(Fn,io);return}else $o?!Ao&&Mn[Fn]&&(mo=!0):delete Mn[Fn];mo?Mn[Fn]=io:createNonEnumerableProperty$a(Mn,Fn,io)})(Function.prototype,"toString",function Mn(){return typeof this=="function"&&getInternalState$4(this).source||inspectSource$3(this)});var anObject$1$1=anObject$3$1,regexpFlags$1=function(){var Mn=anObject$1$1(this),Fn="";return Mn.global&&(Fn+="g"),Mn.ignoreCase&&(Fn+="i"),Mn.multiline&&(Fn+="m"),Mn.dotAll&&(Fn+="s"),Mn.unicode&&(Fn+="u"),Mn.sticky&&(Fn+="y"),Fn},redefine$6=redefine$1$1.exports,anObject$a=anObject$3$1,fails$e=fails$3$1,flags$1=regexpFlags$1,TO_STRING$1="toString",RegExpPrototype$1=RegExp.prototype,nativeToString$1=RegExpPrototype$1[TO_STRING$1],NOT_GENERIC$1=fails$e(function(){return nativeToString$1.call({source:"a",flags:"b"})!="/a/b"}),INCORRECT_NAME$1=nativeToString$1.name!=TO_STRING$1;(NOT_GENERIC$1||INCORRECT_NAME$1)&&redefine$6(RegExp.prototype,TO_STRING$1,function(){var Fn=anObject$a(this),io=String(Fn.source),fo=Fn.flags,$o=String(fo===void 0&&Fn instanceof RegExp&&!("flags"in RegExpPrototype$1)?flags$1.call(Fn):fo);return"/"+io+"/"+$o},{unsafe:!0});function __awaiter$1(Mn,Fn,io,fo){function $o(mo){return mo instanceof io?mo:new io(function(Ao){Ao(mo)})}return new(io||(io=Promise))(function(mo,Ao){function jo(zo){try{Ho(fo.next(zo))}catch(Go){Ao(Go)}}function Lo(zo){try{Ho(fo.throw(zo))}catch(Go){Ao(Go)}}function Ho(zo){zo.done?mo(zo.value):$o(zo.value).then(jo,Lo)}Ho((fo=fo.apply(Mn,[])).next())})}typeof SuppressedError=="function"&&SuppressedError;var icon$1="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQ4AAAEOCAYAAAB4sfmlAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAsuSURBVHgB7d0/exvXlQfgo6RJJ7rbctRtZ6pLZ6jLVma63YrMJ1i53Grtap+tRH0CSV22it1tKsJdOlFdOkw+AakuqZC5HMCCIP7BIQlyBvd9n+eQtEjJHAzmh3Pv3Bk8id2w19V+V01XXy/+u1nU8vt7AQ+j7ep8pT4sPp8u6jxG7kmM0yT6oPgmPgUGjEUbfYD8vPg8jZEZS3CUbuGoq2+jDwrdA7ukdCDTrn5afG5j4IYcHKthMQmox7SrdzHgEBlicEy6OuzqIHQW8DY+hQiXmHR10tVcKfVFvY++A2dh0tUsxrUTlXqsmkXlATIJHYZSt61ZVDb314TAUOq+6k08wnKEX8fD+s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czR9Hf03QsO1Cph6yTGFBgPNRZlYxJ9CFyGFC3MulZ3qrgXQzsjdGGGBxLTfQhchhaM+oy7eqn6C9IG+RZyCEHx6om+vD4dvHZXcfYJSUcyvLwQYfFqrEEx7pJ9Kdzv1l8bgLGo40+KH5efJ7GyIw1ONaVDmR/UeXrrxefl9UEPIzz+NQxtIsql12cxqfAGP0iyH8CbFx/Rn8af3IAAAAASUVORK5CYII=";let downloadUrl="https://chromewebstore.google.com/detail/%E6%AC%A7%E6%98%93-web3-%E9%92%B1%E5%8C%85/mcohilncbfahbmgdjkbpemcciiolgcge";isCurrentBrowserSupported(["safari"])&&(downloadUrl="https://apps.apple.com/us/app/okx-wallet/id6463797825");isCurrentBrowserSupported(["edge-chromium"])&&(downloadUrl="https://microsoftedge.microsoft.com/addons/detail/%E6%AC%A7%E6%98%93-web3-%E9%92%B1%E5%8C%85/pbpjkcldjiffchgbbndmhojiacbgflha");const isInstalled$1=()=>waitFor(()=>{var Mn;return!!(!((Mn=window.okxwallet)===null||Mn===void 0)&&Mn.near)}).catch(()=>!1),setupOkxState=()=>{var Mn;return{wallet:(Mn=window.okxwallet)===null||Mn===void 0?void 0:Mn.near}},OKXWallet=({metadata:Mn,store:Fn,emitter:io,logger:fo,id:$o,provider:mo})=>__awaiter$1(void 0,void 0,void 0,function*(){const Ao=setupOkxState(),jo=()=>__awaiter$1(void 0,void 0,void 0,function*(){Ao.wallet.isSignedIn()&&(yield Ao.wallet.signOut())}),Lo=()=>{Ao.wallet.on("accountChanged",Xo=>__awaiter$1(void 0,void 0,void 0,function*(){fo.log("onAccountChange",Xo),io.emit("signedOut",null)}))},Ho=Xo=>Xo.every(is=>is.type==="FunctionCall"),zo=Xo=>{if(!Ho(Xo))throw new Error(`Only 'FunctionCall' actions types are supported by ${Mn.name}`);return Xo.map(yl=>yl.params)},Go=Xo=>Xo.map(is=>({receiverId:is.receiverId,actions:zo(is.actions)}));Ao.wallet&&Ao.wallet.isSignedIn()&&Lo();const Vo=()=>__awaiter$1(void 0,void 0,void 0,function*(){const{selectedWalletId:Xo}=Fn.getState();Xo===$o&&(yield waitFor(()=>{var yl;return!!(!((yl=Ao.wallet)===null||yl===void 0)&&yl.isSignedIn())},{timeout:1e3}).catch());const is=Ao.wallet.getAccountId();return is?[{accountId:is}]:[]}),Yo=Xo=>{const is=Buffer$D.from(Xo,"base64");return transaction.SignedTransaction.decode(is)};return{signIn({contractId:Xo,methodNames:is}){return __awaiter$1(this,void 0,void 0,function*(){try{const{accessKey:yl,accountId:us}=yield Ao.wallet.requestSignIn({contractId:Xo,methodNames:is});Lo();const hs=yl==null?void 0:yl.publicKey;return[{accountId:us,publicKey:hs?hs.toString():void 0}]}catch{throw yield jo(),new Error("Failed to sign in")}})},signOut:jo,getAccounts:Vo,verifyOwner(){return __awaiter$1(this,void 0,void 0,function*(){throw new Error(`Method not supported by ${Mn.name}`)})},signMessage(){return __awaiter$1(this,void 0,void 0,function*(){throw new Error(`Method not supported by ${Mn.name}`)})},signAndSendTransaction({signerId:Xo,receiverId:is,actions:yl}){return __awaiter$1(this,void 0,void 0,function*(){fo.log("signAndSendTransaction",{signerId:Xo,receiverId:is,actions:yl});const{contract:us}=Fn.getState();if(!Ao.wallet.isSignedIn()||!us)throw new Error("Wallet not signed in");try{const hs=yield Ao.wallet.signTransaction({receiverId:is||us.contractId,actions:zo(yl)}),_l=Yo(hs);return mo.sendTransaction(_l)}catch{throw new Error("sign Error")}})},signAndSendTransactions({transactions:Xo}){return __awaiter$1(this,void 0,void 0,function*(){if(fo.log("signAndSendTransactions",{transactions:Xo}),!Ao.wallet.isSignedIn())throw new Error("Wallet not signed in");try{const is=yield Ao.wallet.requestSignTransactions({transactions:Go(Xo)}),{txs:yl}=is,us=[];for(let hs=0;hs<yl.length;hs++){const _l=Yo(yl[hs].signedTx);us.push(yield mo.sendTransaction(_l))}return us}catch{throw new Error("sign Error")}})}}});function setupOKXWallet({iconUrl:Mn=icon$1,deprecated:Fn=!1}={}){return()=>__awaiter$1(this,void 0,void 0,function*(){if(isMobile_2())return null;const fo=yield isInstalled$1();return{id:"okx-wallet",type:"injected",metadata:{name:"OKX Wallet",description:"Browser extension wallet",iconUrl:Mn,downloadUrl,deprecated:Fn,available:fo},init:OKXWallet}})}var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global$o<"u"?global$o:typeof self<"u"?self:{},fails$d=function(Mn){try{return!!Mn()}catch{return!0}},toString={}.toString,classofRaw$1=function(Mn){return toString.call(Mn).slice(8,-1)},fails$c=fails$d,classof$5=classofRaw$1,split="".split,indexedObject=fails$c(function(){return!Object("z").propertyIsEnumerable(0)})?function(Mn){return classof$5(Mn)=="String"?split.call(Mn,""):Object(Mn)}:Object,requireObjectCoercible$2=function(Mn){if(Mn==null)throw TypeError("Can't call method on "+Mn);return Mn},IndexedObject$2=indexedObject,requireObjectCoercible$1=requireObjectCoercible$2,toIndexedObject$4=function(Mn){return IndexedObject$2(requireObjectCoercible$1(Mn))},check=function(Mn){return Mn&&Mn.Math==Math&&Mn},global$g=check(typeof globalThis=="object"&&globalThis)||check(typeof window=="object"&&window)||check(typeof self=="object"&&self)||check(typeof commonjsGlobal=="object"&&commonjsGlobal)||Function("return this")(),shared$2={exports:{}},fails$b=fails$d,descriptors=!fails$b(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),objectDefineProperty={},isObject$9=function(Mn){return typeof Mn=="object"?Mn!==null:typeof Mn=="function"},global$f=global$g,isObject$8=isObject$9,document$1=global$f.document,EXISTS=isObject$8(document$1)&&isObject$8(document$1.createElement),documentCreateElement$1=function(Mn){return EXISTS?document$1.createElement(Mn):{}},DESCRIPTORS$9=descriptors,fails$a=fails$d,createElement=documentCreateElement$1,ie8DomDefine=!DESCRIPTORS$9&&!fails$a(function(){return Object.defineProperty(createElement("div"),"a",{get:function(){return 7}}).a!=7}),isObject$7=isObject$9,anObject$9=function(Mn){if(!isObject$7(Mn))throw TypeError(String(Mn)+" is not an object");return Mn},isObject$6=isObject$9,toPrimitive$3=function(Mn,Fn){if(!isObject$6(Mn))return Mn;var io,fo;if(Fn&&typeof(io=Mn.toString)=="function"&&!isObject$6(fo=io.call(Mn))||typeof(io=Mn.valueOf)=="function"&&!isObject$6(fo=io.call(Mn))||!Fn&&typeof(io=Mn.toString)=="function"&&!isObject$6(fo=io.call(Mn)))return fo;throw TypeError("Can't convert object to primitive value")},DESCRIPTORS$8=descriptors,IE8_DOM_DEFINE$1=ie8DomDefine,anObject$8=anObject$9,toPrimitive$2=toPrimitive$3,nativeDefineProperty$1=Object.defineProperty;objectDefineProperty.f=DESCRIPTORS$8?nativeDefineProperty$1:function Mn(Fn,io,fo){if(anObject$8(Fn),io=toPrimitive$2(io,!0),anObject$8(fo),IE8_DOM_DEFINE$1)try{return nativeDefineProperty$1(Fn,io,fo)}catch{}if("get"in fo||"set"in fo)throw TypeError("Accessors not supported");return"value"in fo&&(Fn[io]=fo.value),Fn};var createPropertyDescriptor$4=function(Mn,Fn){return{enumerable:!(Mn&1),configurable:!(Mn&2),writable:!(Mn&4),value:Fn}},DESCRIPTORS$7=descriptors,definePropertyModule$5=objectDefineProperty,createPropertyDescriptor$3=createPropertyDescriptor$4,createNonEnumerableProperty$9=DESCRIPTORS$7?function(Mn,Fn,io){return definePropertyModule$5.f(Mn,Fn,createPropertyDescriptor$3(1,io))}:function(Mn,Fn,io){return Mn[Fn]=io,Mn},global$e=global$g,createNonEnumerableProperty$8=createNonEnumerableProperty$9,setGlobal$3=function(Mn,Fn){try{createNonEnumerableProperty$8(global$e,Mn,Fn)}catch{global$e[Mn]=Fn}return Fn},global$d=global$g,setGlobal$2=setGlobal$3,SHARED="__core-js_shared__",store$3=global$d[SHARED]||setGlobal$2(SHARED,{}),sharedStore=store$3,store$2=sharedStore;(shared$2.exports=function(Mn,Fn){return store$2[Mn]||(store$2[Mn]=Fn!==void 0?Fn:{})})("versions",[]).push({version:"3.6.5",mode:"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"});var hasOwnProperty={}.hasOwnProperty,has$b=function(Mn,Fn){return hasOwnProperty.call(Mn,Fn)},id$2=0,postfix=Math.random(),uid$3=function(Mn){return"Symbol("+String(Mn===void 0?"":Mn)+")_"+(++id$2+postfix).toString(36)},fails$9=fails$d,nativeSymbol=!!Object.getOwnPropertySymbols&&!fails$9(function(){return!String(Symbol())}),NATIVE_SYMBOL$1=nativeSymbol,useSymbolAsUid=NATIVE_SYMBOL$1&&!Symbol.sham&&typeof Symbol.iterator=="symbol",global$c=global$g,shared$1=shared$2.exports,has$a=has$b,uid$2=uid$3,NATIVE_SYMBOL=nativeSymbol,USE_SYMBOL_AS_UID=useSymbolAsUid,WellKnownSymbolsStore=shared$1("wks"),Symbol$1=global$c.Symbol,createWellKnownSymbol=USE_SYMBOL_AS_UID?Symbol$1:Symbol$1&&Symbol$1.withoutSetter||uid$2,wellKnownSymbol$d=function(Mn){return has$a(WellKnownSymbolsStore,Mn)||(NATIVE_SYMBOL&&has$a(Symbol$1,Mn)?WellKnownSymbolsStore[Mn]=Symbol$1[Mn]:WellKnownSymbolsStore[Mn]=createWellKnownSymbol("Symbol."+Mn)),WellKnownSymbolsStore[Mn]},ceil=Math.ceil,floor$1=Math.floor,toInteger$5=function(Mn){return isNaN(Mn=+Mn)?0:(Mn>0?floor$1:ceil)(Mn)},toInteger$4=toInteger$5,min$1=Math.min,toLength$9=function(Mn){return Mn>0?min$1(toInteger$4(Mn),9007199254740991):0},toInteger$3=toInteger$5,max=Math.max,min=Math.min,toAbsoluteIndex$3=function(Mn,Fn){var io=toInteger$3(Mn);return io<0?max(io+Fn,0):min(io,Fn)},toIndexedObject$3=toIndexedObject$4,toLength$8=toLength$9,toAbsoluteIndex$2=toAbsoluteIndex$3,createMethod$1=function(Mn){return function(Fn,io,fo){var $o=toIndexedObject$3(Fn),mo=toLength$8($o.length),Ao=toAbsoluteIndex$2(fo,mo),jo;if(Mn&&io!=io){for(;mo>Ao;)if(jo=$o[Ao++],jo!=jo)return!0}else for(;mo>Ao;Ao++)if((Mn||Ao in $o)&&$o[Ao]===io)return Mn||Ao||0;return!Mn&&-1}},arrayIncludes={includes:createMethod$1(!0),indexOf:createMethod$1(!1)},hiddenKeys$4={},has$9=has$b,toIndexedObject$2=toIndexedObject$4,indexOf=arrayIncludes.indexOf,hiddenKeys$3=hiddenKeys$4,objectKeysInternal=function(Mn,Fn){var io=toIndexedObject$2(Mn),fo=0,$o=[],mo;for(mo in io)!has$9(hiddenKeys$3,mo)&&has$9(io,mo)&&$o.push(mo);for(;Fn.length>fo;)has$9(io,mo=Fn[fo++])&&(~indexOf($o,mo)||$o.push(mo));return $o},enumBugKeys$3=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],internalObjectKeys$1=objectKeysInternal,enumBugKeys$2=enumBugKeys$3,objectKeys$2=Object.keys||function Mn(Fn){return internalObjectKeys$1(Fn,enumBugKeys$2)},DESCRIPTORS$6=descriptors,definePropertyModule$4=objectDefineProperty,anObject$7=anObject$9,objectKeys$1=objectKeys$2,objectDefineProperties=DESCRIPTORS$6?Object.defineProperties:function Mn(Fn,io){anObject$7(Fn);for(var fo=objectKeys$1(io),$o=fo.length,mo=0,Ao;$o>mo;)definePropertyModule$4.f(Fn,Ao=fo[mo++],io[Ao]);return Fn},global$b=global$g,path$1=global$b,path=path$1,global$a=global$g,aFunction$3=function(Mn){return typeof Mn=="function"?Mn:void 0},getBuiltIn$3=function(Mn,Fn){return arguments.length<2?aFunction$3(path[Mn])||aFunction$3(global$a[Mn]):path[Mn]&&path[Mn][Fn]||global$a[Mn]&&global$a[Mn][Fn]},getBuiltIn$2=getBuiltIn$3,html$1=getBuiltIn$2("document","documentElement"),shared=shared$2.exports,uid$1=uid$3,keys$1=shared("keys"),sharedKey$3=function(Mn){return keys$1[Mn]||(keys$1[Mn]=uid$1(Mn))},anObject$6=anObject$9,defineProperties=objectDefineProperties,enumBugKeys$1=enumBugKeys$3,hiddenKeys$2=hiddenKeys$4,html=html$1,documentCreateElement=documentCreateElement$1,sharedKey$2=sharedKey$3,GT=">",LT="<",PROTOTYPE$1="prototype",SCRIPT="script",IE_PROTO$1=sharedKey$2("IE_PROTO"),EmptyConstructor=function(){},scriptTag=function(Mn){return LT+SCRIPT+GT+Mn+LT+"/"+SCRIPT+GT},NullProtoObjectViaActiveX=function(Mn){Mn.write(scriptTag("")),Mn.close();var Fn=Mn.parentWindow.Object;return Mn=null,Fn},NullProtoObjectViaIFrame=function(){var Mn=documentCreateElement("iframe"),Fn="java"+SCRIPT+":",io;return Mn.style.display="none",html.appendChild(Mn),Mn.src=String(Fn),io=Mn.contentWindow.document,io.open(),io.write(scriptTag("document.F=Object")),io.close(),io.F},activeXDocument,NullProtoObject=function(){try{activeXDocument=document.domain&&new ActiveXObject("htmlfile")}catch{}NullProtoObject=activeXDocument?NullProtoObjectViaActiveX(activeXDocument):NullProtoObjectViaIFrame();for(var Mn=enumBugKeys$1.length;Mn--;)delete NullProtoObject[PROTOTYPE$1][enumBugKeys$1[Mn]];return NullProtoObject()};hiddenKeys$2[IE_PROTO$1]=!0;var objectCreate=Object.create||function Mn(Fn,io){var fo;return Fn!==null?(EmptyConstructor[PROTOTYPE$1]=anObject$6(Fn),fo=new EmptyConstructor,EmptyConstructor[PROTOTYPE$1]=null,fo[IE_PROTO$1]=Fn):fo=NullProtoObject(),io===void 0?fo:defineProperties(fo,io)},wellKnownSymbol$c=wellKnownSymbol$d,create$2=objectCreate,definePropertyModule$3=objectDefineProperty,UNSCOPABLES=wellKnownSymbol$c("unscopables"),ArrayPrototype$1=Array.prototype;ArrayPrototype$1[UNSCOPABLES]==null&&definePropertyModule$3.f(ArrayPrototype$1,UNSCOPABLES,{configurable:!0,value:create$2(null)});var addToUnscopables$1=function(Mn){ArrayPrototype$1[UNSCOPABLES][Mn]=!0},iterators={},store$1=sharedStore,functionToString=Function.toString;typeof store$1.inspectSource!="function"&&(store$1.inspectSource=function(Mn){return functionToString.call(Mn)});var inspectSource$2=store$1.inspectSource,global$9=global$g,inspectSource$1=inspectSource$2,WeakMap$1=global$9.WeakMap,nativeWeakMap=typeof WeakMap$1=="function"&&/native code/.test(inspectSource$1(WeakMap$1)),NATIVE_WEAK_MAP=nativeWeakMap,global$8=global$g,isObject$5=isObject$9,createNonEnumerableProperty$7=createNonEnumerableProperty$9,objectHas=has$b,sharedKey$1=sharedKey$3,hiddenKeys$1=hiddenKeys$4,WeakMap$2=global$8.WeakMap,set$1,get$1,has$8,enforce=function(Mn){return has$8(Mn)?get$1(Mn):set$1(Mn,{})},getterFor=function(Mn){return function(Fn){var io;if(!isObject$5(Fn)||(io=get$1(Fn)).type!==Mn)throw TypeError("Incompatible receiver, "+Mn+" required");return io}};if(NATIVE_WEAK_MAP){var store=new WeakMap$2,wmget=store.get,wmhas=store.has,wmset=store.set;set$1=function(Mn,Fn){return wmset.call(store,Mn,Fn),Fn},get$1=function(Mn){return wmget.call(store,Mn)||{}},has$8=function(Mn){return wmhas.call(store,Mn)}}else{var STATE=sharedKey$1("state");hiddenKeys$1[STATE]=!0,set$1=function(Mn,Fn){return createNonEnumerableProperty$7(Mn,STATE,Fn),Fn},get$1=function(Mn){return objectHas(Mn,STATE)?Mn[STATE]:{}},has$8=function(Mn){return objectHas(Mn,STATE)}}var internalState={set:set$1,get:get$1,has:has$8,enforce,getterFor},objectGetOwnPropertyDescriptor={},objectPropertyIsEnumerable={},nativePropertyIsEnumerable={}.propertyIsEnumerable,getOwnPropertyDescriptor$1=Object.getOwnPropertyDescriptor,NASHORN_BUG=getOwnPropertyDescriptor$1&&!nativePropertyIsEnumerable.call({1:2},1);objectPropertyIsEnumerable.f=NASHORN_BUG?function Mn(Fn){var io=getOwnPropertyDescriptor$1(this,Fn);return!!io&&io.enumerable}:nativePropertyIsEnumerable;var DESCRIPTORS$5=descriptors,propertyIsEnumerableModule$1=objectPropertyIsEnumerable,createPropertyDescriptor$2=createPropertyDescriptor$4,toIndexedObject$1=toIndexedObject$4,toPrimitive$1=toPrimitive$3,has$7=has$b,IE8_DOM_DEFINE=ie8DomDefine,nativeGetOwnPropertyDescriptor$1=Object.getOwnPropertyDescriptor;objectGetOwnPropertyDescriptor.f=DESCRIPTORS$5?nativeGetOwnPropertyDescriptor$1:function Mn(Fn,io){if(Fn=toIndexedObject$1(Fn),io=toPrimitive$1(io,!0),IE8_DOM_DEFINE)try{return nativeGetOwnPropertyDescriptor$1(Fn,io)}catch{}if(has$7(Fn,io))return createPropertyDescriptor$2(!propertyIsEnumerableModule$1.f.call(Fn,io),Fn[io])};var redefine$5={exports:{}},global$7=global$g,createNonEnumerableProperty$6=createNonEnumerableProperty$9,has$6=has$b,setGlobal$1=setGlobal$3,inspectSource=inspectSource$2,InternalStateModule$3=internalState,getInternalState$3=InternalStateModule$3.get,enforceInternalState=InternalStateModule$3.enforce,TEMPLATE=String(String).split("String");(redefine$5.exports=function(Mn,Fn,io,fo){var $o=fo?!!fo.unsafe:!1,mo=fo?!!fo.enumerable:!1,Ao=fo?!!fo.noTargetGet:!1;if(typeof io=="function"&&(typeof Fn=="string"&&!has$6(io,"name")&&createNonEnumerableProperty$6(io,"name",Fn),enforceInternalState(io).source=TEMPLATE.join(typeof Fn=="string"?Fn:"")),Mn===global$7){mo?Mn[Fn]=io:setGlobal$1(Fn,io);return}else $o?!Ao&&Mn[Fn]&&(mo=!0):delete Mn[Fn];mo?Mn[Fn]=io:createNonEnumerableProperty$6(Mn,Fn,io)})(Function.prototype,"toString",function Mn(){return typeof this=="function"&&getInternalState$3(this).source||inspectSource(this)});var objectGetOwnPropertyNames={},internalObjectKeys=objectKeysInternal,enumBugKeys=enumBugKeys$3,hiddenKeys=enumBugKeys.concat("length","prototype");objectGetOwnPropertyNames.f=Object.getOwnPropertyNames||function Mn(Fn){return internalObjectKeys(Fn,hiddenKeys)};var objectGetOwnPropertySymbols={};objectGetOwnPropertySymbols.f=Object.getOwnPropertySymbols;var getBuiltIn$1=getBuiltIn$3,getOwnPropertyNamesModule=objectGetOwnPropertyNames,getOwnPropertySymbolsModule$1=objectGetOwnPropertySymbols,anObject$5=anObject$9,ownKeys$1=getBuiltIn$1("Reflect","ownKeys")||function Mn(Fn){var io=getOwnPropertyNamesModule.f(anObject$5(Fn)),fo=getOwnPropertySymbolsModule$1.f;return fo?io.concat(fo(Fn)):io},has$5=has$b,ownKeys=ownKeys$1,getOwnPropertyDescriptorModule$1=objectGetOwnPropertyDescriptor,definePropertyModule$2=objectDefineProperty,copyConstructorProperties$1=function(Mn,Fn){for(var io=ownKeys(Fn),fo=definePropertyModule$2.f,$o=getOwnPropertyDescriptorModule$1.f,mo=0;mo<io.length;mo++){var Ao=io[mo];has$5(Mn,Ao)||fo(Mn,Ao,$o(Fn,Ao))}},fails$8=fails$d,replacement=/#|\.prototype\./,isForced$1=function(Mn,Fn){var io=data[normalize(Mn)];return io==POLYFILL?!0:io==NATIVE?!1:typeof Fn=="function"?fails$8(Fn):!!Fn},normalize=isForced$1.normalize=function(Mn){return String(Mn).replace(replacement,".").toLowerCase()},data=isForced$1.data={},NATIVE=isForced$1.NATIVE="N",POLYFILL=isForced$1.POLYFILL="P",isForced_1=isForced$1,global$6=global$g,getOwnPropertyDescriptor=objectGetOwnPropertyDescriptor.f,createNonEnumerableProperty$5=createNonEnumerableProperty$9,redefine$4=redefine$5.exports,setGlobal=setGlobal$3,copyConstructorProperties=copyConstructorProperties$1,isForced=isForced_1,_export=function(Mn,Fn){var io=Mn.target,fo=Mn.global,$o=Mn.stat,mo,Ao,jo,Lo,Ho,zo;if(fo?Ao=global$6:$o?Ao=global$6[io]||setGlobal(io,{}):Ao=(global$6[io]||{}).prototype,Ao)for(jo in Fn){if(Ho=Fn[jo],Mn.noTargetGet?(zo=getOwnPropertyDescriptor(Ao,jo),Lo=zo&&zo.value):Lo=Ao[jo],mo=isForced(fo?jo:io+($o?".":"#")+jo,Mn.forced),!mo&&Lo!==void 0){if(typeof Ho==typeof Lo)continue;copyConstructorProperties(Ho,Lo)}(Mn.sham||Lo&&Lo.sham)&&createNonEnumerableProperty$5(Ho,"sham",!0),redefine$4(Ao,jo,Ho,Mn)}},requireObjectCoercible=requireObjectCoercible$2,toObject$6=function(Mn){return Object(requireObjectCoercible(Mn))},fails$7=fails$d,correctPrototypeGetter=!fails$7(function(){function Mn(){}return Mn.prototype.constructor=null,Object.getPrototypeOf(new Mn)!==Mn.prototype}),has$4=has$b,toObject$5=toObject$6,sharedKey=sharedKey$3,CORRECT_PROTOTYPE_GETTER=correctPrototypeGetter,IE_PROTO=sharedKey("IE_PROTO"),ObjectPrototype$2=Object.prototype,objectGetPrototypeOf=CORRECT_PROTOTYPE_GETTER?Object.getPrototypeOf:function(Mn){return Mn=toObject$5(Mn),has$4(Mn,IE_PROTO)?Mn[IE_PROTO]:typeof Mn.constructor=="function"&&Mn instanceof Mn.constructor?Mn.constructor.prototype:Mn instanceof Object?ObjectPrototype$2:null},getPrototypeOf$3=objectGetPrototypeOf,createNonEnumerableProperty$4=createNonEnumerableProperty$9,has$3=has$b,wellKnownSymbol$b=wellKnownSymbol$d,ITERATOR$4=wellKnownSymbol$b("iterator"),BUGGY_SAFARI_ITERATORS$1=!1,returnThis$2=function(){return this},IteratorPrototype$2,PrototypeOfArrayIteratorPrototype,arrayIterator;[].keys&&(arrayIterator=[].keys(),"next"in arrayIterator?(PrototypeOfArrayIteratorPrototype=getPrototypeOf$3(getPrototypeOf$3(arrayIterator)),PrototypeOfArrayIteratorPrototype!==Object.prototype&&(IteratorPrototype$2=PrototypeOfArrayIteratorPrototype)):BUGGY_SAFARI_ITERATORS$1=!0);IteratorPrototype$2==null&&(IteratorPrototype$2={});has$3(IteratorPrototype$2,ITERATOR$4)||createNonEnumerableProperty$4(IteratorPrototype$2,ITERATOR$4,returnThis$2);var iteratorsCore={IteratorPrototype:IteratorPrototype$2,BUGGY_SAFARI_ITERATORS:BUGGY_SAFARI_ITERATORS$1},defineProperty$3=objectDefineProperty.f,has$2=has$b,wellKnownSymbol$a=wellKnownSymbol$d,TO_STRING_TAG$3=wellKnownSymbol$a("toStringTag"),setToStringTag$3=function(Mn,Fn,io){Mn&&!has$2(Mn=io?Mn:Mn.prototype,TO_STRING_TAG$3)&&defineProperty$3(Mn,TO_STRING_TAG$3,{configurable:!0,value:Fn})},IteratorPrototype$1=iteratorsCore.IteratorPrototype,create$1=objectCreate,createPropertyDescriptor$1=createPropertyDescriptor$4,setToStringTag$2=setToStringTag$3,Iterators$4=iterators,returnThis$1=function(){return this},createIteratorConstructor$1=function(Mn,Fn,io){var fo=Fn+" Iterator";return Mn.prototype=create$1(IteratorPrototype$1,{next:createPropertyDescriptor$1(1,io)}),setToStringTag$2(Mn,fo,!1),Iterators$4[fo]=returnThis$1,Mn},isObject$4=isObject$9,aPossiblePrototype$1=function(Mn){if(!isObject$4(Mn)&&Mn!==null)throw TypeError("Can't set "+String(Mn)+" as a prototype");return Mn},anObject$4=anObject$9,aPossiblePrototype=aPossiblePrototype$1,objectSetPrototypeOf=Object.setPrototypeOf||("__proto__"in{}?function(){var Mn=!1,Fn={},io;try{io=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set,io.call(Fn,[]),Mn=Fn instanceof Array}catch{}return function($o,mo){return anObject$4($o),aPossiblePrototype(mo),Mn?io.call($o,mo):$o.__proto__=mo,$o}}():void 0),$$3=_export,createIteratorConstructor=createIteratorConstructor$1,getPrototypeOf$2=objectGetPrototypeOf,setPrototypeOf$4=objectSetPrototypeOf,setToStringTag$1=setToStringTag$3,createNonEnumerableProperty$3=createNonEnumerableProperty$9,redefine$3=redefine$5.exports,wellKnownSymbol$9=wellKnownSymbol$d,Iterators$3=iterators,IteratorsCore=iteratorsCore,IteratorPrototype=IteratorsCore.IteratorPrototype,BUGGY_SAFARI_ITERATORS=IteratorsCore.BUGGY_SAFARI_ITERATORS,ITERATOR$3=wellKnownSymbol$9("iterator"),KEYS="keys",VALUES="values",ENTRIES="entries",returnThis=function(){return this},defineIterator$1=function(Mn,Fn,io,fo,$o,mo,Ao){createIteratorConstructor(io,Fn,fo);var jo=function(us){if(us===$o&&Vo)return Vo;if(!BUGGY_SAFARI_ITERATORS&&us in zo)return zo[us];switch(us){case KEYS:return function(){return new io(this,us)};case VALUES:return function(){return new io(this,us)};case ENTRIES:return function(){return new io(this,us)}}return function(){return new io(this)}},Lo=Fn+" Iterator",Ho=!1,zo=Mn.prototype,Go=zo[ITERATOR$3]||zo["@@iterator"]||$o&&zo[$o],Vo=!BUGGY_SAFARI_ITERATORS&&Go||jo($o),Yo=Fn=="Array"&&zo.entries||Go,Xo,is,yl;if(Yo&&(Xo=getPrototypeOf$2(Yo.call(new Mn)),IteratorPrototype!==Object.prototype&&Xo.next&&(getPrototypeOf$2(Xo)!==IteratorPrototype&&(setPrototypeOf$4?setPrototypeOf$4(Xo,IteratorPrototype):typeof Xo[ITERATOR$3]!="function"&&createNonEnumerableProperty$3(Xo,ITERATOR$3,returnThis)),setToStringTag$1(Xo,Lo,!0))),$o==VALUES&&Go&&Go.name!==VALUES&&(Ho=!0,Vo=function(){return Go.call(this)}),zo[ITERATOR$3]!==Vo&&createNonEnumerableProperty$3(zo,ITERATOR$3,Vo),Iterators$3[Fn]=Vo,$o)if(is={values:jo(VALUES),keys:mo?Vo:jo(KEYS),entries:jo(ENTRIES)},Ao)for(yl in is)(BUGGY_SAFARI_ITERATORS||Ho||!(yl in zo))&&redefine$3(zo,yl,is[yl]);else $$3({target:Fn,proto:!0,forced:BUGGY_SAFARI_ITERATORS||Ho},is);return is},toIndexedObject=toIndexedObject$4,addToUnscopables=addToUnscopables$1,Iterators$2=iterators,InternalStateModule$2=internalState,defineIterator=defineIterator$1,ARRAY_ITERATOR="Array Iterator",setInternalState$2=InternalStateModule$2.set,getInternalState$2=InternalStateModule$2.getterFor(ARRAY_ITERATOR);defineIterator(Array,"Array",function(Mn,Fn){setInternalState$2(this,{type:ARRAY_ITERATOR,target:toIndexedObject(Mn),index:0,kind:Fn})},function(){var Mn=getInternalState$2(this),Fn=Mn.target,io=Mn.kind,fo=Mn.index++;return!Fn||fo>=Fn.length?(Mn.target=void 0,{value:void 0,done:!0}):io=="keys"?{value:fo,done:!1}:io=="values"?{value:Fn[fo],done:!1}:{value:[fo,Fn[fo]],done:!1}},"values");Iterators$2.Arguments=Iterators$2.Array;addToUnscopables("keys");addToUnscopables("values");addToUnscopables("entries");var arrayBufferNative=typeof ArrayBuffer<"u"&&typeof DataView<"u",redefine$2=redefine$5.exports,redefineAll$1=function(Mn,Fn,io){for(var fo in Fn)redefine$2(Mn,fo,Fn[fo],io);return Mn},anInstance$2=function(Mn,Fn,io){if(!(Mn instanceof Fn))throw TypeError("Incorrect "+(io?io+" ":"")+"invocation");return Mn},toInteger$2=toInteger$5,toLength$7=toLength$9,toIndex$2=function(Mn){if(Mn===void 0)return 0;var Fn=toInteger$2(Mn),io=toLength$7(Fn);if(Fn!==io)throw RangeError("Wrong length or index");return io},Infinity$1=1/0,abs=Math.abs,pow=Math.pow,floor=Math.floor,log=Math.log,LN2=Math.LN2,pack=function(Mn,Fn,io){var fo=new Array(io),$o=io*8-Fn-1,mo=(1<<$o)-1,Ao=mo>>1,jo=Fn===23?pow(2,-24)-pow(2,-77):0,Lo=Mn<0||Mn===0&&1/Mn<0?1:0,Ho=0,zo,Go,Vo;for(Mn=abs(Mn),Mn!=Mn||Mn===Infinity$1?(Go=Mn!=Mn?1:0,zo=mo):(zo=floor(log(Mn)/LN2),Mn*(Vo=pow(2,-zo))<1&&(zo--,Vo*=2),zo+Ao>=1?Mn+=jo/Vo:Mn+=jo*pow(2,1-Ao),Mn*Vo>=2&&(zo++,Vo/=2),zo+Ao>=mo?(Go=0,zo=mo):zo+Ao>=1?(Go=(Mn*Vo-1)*pow(2,Fn),zo=zo+Ao):(Go=Mn*pow(2,Ao-1)*pow(2,Fn),zo=0));Fn>=8;fo[Ho++]=Go&255,Go/=256,Fn-=8);for(zo=zo<<Fn|Go,$o+=Fn;$o>0;fo[Ho++]=zo&255,zo/=256,$o-=8);return fo[--Ho]|=Lo*128,fo},unpack=function(Mn,Fn){var io=Mn.length,fo=io*8-Fn-1,$o=(1<<fo)-1,mo=$o>>1,Ao=fo-7,jo=io-1,Lo=Mn[jo--],Ho=Lo&127,zo;for(Lo>>=7;Ao>0;Ho=Ho*256+Mn[jo],jo--,Ao-=8);for(zo=Ho&(1<<-Ao)-1,Ho>>=-Ao,Ao+=Fn;Ao>0;zo=zo*256+Mn[jo],jo--,Ao-=8);if(Ho===0)Ho=1-mo;else{if(Ho===$o)return zo?NaN:Lo?-Infinity$1:Infinity$1;zo=zo+pow(2,Fn),Ho=Ho-mo}return(Lo?-1:1)*zo*pow(2,Ho-Fn)},ieee754={pack,unpack},toObject$4=toObject$6,toAbsoluteIndex$1=toAbsoluteIndex$3,toLength$6=toLength$9,arrayFill$1=function Mn(Fn){for(var io=toObject$4(this),fo=toLength$6(io.length),$o=arguments.length,mo=toAbsoluteIndex$1($o>1?arguments[1]:void 0,fo),Ao=$o>2?arguments[2]:void 0,jo=Ao===void 0?fo:toAbsoluteIndex$1(Ao,fo);jo>mo;)io[mo++]=Fn;return io},global$5=global$g,DESCRIPTORS$4=descriptors,NATIVE_ARRAY_BUFFER$1=arrayBufferNative,createNonEnumerableProperty$2=createNonEnumerableProperty$9,redefineAll=redefineAll$1,fails$6=fails$d,anInstance$1=anInstance$2,toInteger$1=toInteger$5,toLength$5=toLength$9,toIndex$1=toIndex$2,IEEE754=ieee754,getPrototypeOf$1=objectGetPrototypeOf,setPrototypeOf$3=objectSetPrototypeOf,getOwnPropertyNames$1=objectGetOwnPropertyNames.f,defineProperty$2=objectDefineProperty.f,arrayFill=arrayFill$1,setToStringTag=setToStringTag$3,InternalStateModule$1=internalState,getInternalState$1=InternalStateModule$1.get,setInternalState$1=InternalStateModule$1.set,ARRAY_BUFFER="ArrayBuffer",DATA_VIEW="DataView",PROTOTYPE="prototype",WRONG_LENGTH$1="Wrong length",WRONG_INDEX="Wrong index",NativeArrayBuffer=global$5[ARRAY_BUFFER],$ArrayBuffer=NativeArrayBuffer,$DataView=global$5[DATA_VIEW],$DataViewPrototype=$DataView&&$DataView[PROTOTYPE],ObjectPrototype$1=Object.prototype,RangeError$2=global$5.RangeError,packIEEE754=IEEE754.pack,unpackIEEE754=IEEE754.unpack,packInt8=function(Mn){return[Mn&255]},packInt16=function(Mn){return[Mn&255,Mn>>8&255]},packInt32=function(Mn){return[Mn&255,Mn>>8&255,Mn>>16&255,Mn>>24&255]},unpackInt32=function(Mn){return Mn[3]<<24|Mn[2]<<16|Mn[1]<<8|Mn[0]},packFloat32=function(Mn){return packIEEE754(Mn,23,4)},packFloat64=function(Mn){return packIEEE754(Mn,52,8)},addGetter$1=function(Mn,Fn){defineProperty$2(Mn[PROTOTYPE],Fn,{get:function(){return getInternalState$1(this)[Fn]}})},get=function(Mn,Fn,io,fo){var $o=toIndex$1(io),mo=getInternalState$1(Mn);if($o+Fn>mo.byteLength)throw RangeError$2(WRONG_INDEX);var Ao=getInternalState$1(mo.buffer).bytes,jo=$o+mo.byteOffset,Lo=Ao.slice(jo,jo+Fn);return fo?Lo:Lo.reverse()},set=function(Mn,Fn,io,fo,$o,mo){var Ao=toIndex$1(io),jo=getInternalState$1(Mn);if(Ao+Fn>jo.byteLength)throw RangeError$2(WRONG_INDEX);for(var Lo=getInternalState$1(jo.buffer).bytes,Ho=Ao+jo.byteOffset,zo=fo(+$o),Go=0;Go<Fn;Go++)Lo[Ho+Go]=zo[mo?Go:Fn-Go-1]};if(!NATIVE_ARRAY_BUFFER$1)$ArrayBuffer=function(Fn){anInstance$1(this,$ArrayBuffer,ARRAY_BUFFER);var io=toIndex$1(Fn);setInternalState$1(this,{bytes:arrayFill.call(new Array(io),0),byteLength:io}),DESCRIPTORS$4||(this.byteLength=io)},$DataView=function(Fn,io,fo){anInstance$1(this,$DataView,DATA_VIEW),anInstance$1(Fn,$ArrayBuffer,DATA_VIEW);var $o=getInternalState$1(Fn).byteLength,mo=toInteger$1(io);if(mo<0||mo>$o)throw RangeError$2("Wrong offset");if(fo=fo===void 0?$o-mo:toLength$5(fo),mo+fo>$o)throw RangeError$2(WRONG_LENGTH$1);setInternalState$1(this,{buffer:Fn,byteLength:fo,byteOffset:mo}),DESCRIPTORS$4||(this.buffer=Fn,this.byteLength=fo,this.byteOffset=mo)},DESCRIPTORS$4&&(addGetter$1($ArrayBuffer,"byteLength"),addGetter$1($DataView,"buffer"),addGetter$1($DataView,"byteLength"),addGetter$1($DataView,"byteOffset")),redefineAll($DataView[PROTOTYPE],{getInt8:function(Fn){return get(this,1,Fn)[0]<<24>>24},getUint8:function(Fn){return get(this,1,Fn)[0]},getInt16:function(Fn){var io=get(this,2,Fn,arguments.length>1?arguments[1]:void 0);return(io[1]<<8|io[0])<<16>>16},getUint16:function(Fn){var io=get(this,2,Fn,arguments.length>1?arguments[1]:void 0);return io[1]<<8|io[0]},getInt32:function(Fn){return unpackInt32(get(this,4,Fn,arguments.length>1?arguments[1]:void 0))},getUint32:function(Fn){return unpackInt32(get(this,4,Fn,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(Fn){return unpackIEEE754(get(this,4,Fn,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(Fn){return unpackIEEE754(get(this,8,Fn,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(Fn,io){set(this,1,Fn,packInt8,io)},setUint8:function(Fn,io){set(this,1,Fn,packInt8,io)},setInt16:function(Fn,io){set(this,2,Fn,packInt16,io,arguments.length>2?arguments[2]:void 0)},setUint16:function(Fn,io){set(this,2,Fn,packInt16,io,arguments.length>2?arguments[2]:void 0)},setInt32:function(Fn,io){set(this,4,Fn,packInt32,io,arguments.length>2?arguments[2]:void 0)},setUint32:function(Fn,io){set(this,4,Fn,packInt32,io,arguments.length>2?arguments[2]:void 0)},setFloat32:function(Fn,io){set(this,4,Fn,packFloat32,io,arguments.length>2?arguments[2]:void 0)},setFloat64:function(Fn,io){set(this,8,Fn,packFloat64,io,arguments.length>2?arguments[2]:void 0)}});else{if(!fails$6(function(){NativeArrayBuffer(1)})||!fails$6(function(){new NativeArrayBuffer(-1)})||fails$6(function(){return new NativeArrayBuffer,new NativeArrayBuffer(1.5),new NativeArrayBuffer(NaN),NativeArrayBuffer.name!=ARRAY_BUFFER})){$ArrayBuffer=function(Fn){return anInstance$1(this,$ArrayBuffer),new NativeArrayBuffer(toIndex$1(Fn))};for(var ArrayBufferPrototype=$ArrayBuffer[PROTOTYPE]=NativeArrayBuffer[PROTOTYPE],keys=getOwnPropertyNames$1(NativeArrayBuffer),j=0,key;keys.length>j;)(key=keys[j++])in $ArrayBuffer||createNonEnumerableProperty$2($ArrayBuffer,key,NativeArrayBuffer[key]);ArrayBufferPrototype.constructor=$ArrayBuffer}setPrototypeOf$3&&getPrototypeOf$1($DataViewPrototype)!==ObjectPrototype$1&&setPrototypeOf$3($DataViewPrototype,ObjectPrototype$1);var testView=new $DataView(new $ArrayBuffer(2)),nativeSetInt8=$DataViewPrototype.setInt8;testView.setInt8(0,2147483648),testView.setInt8(1,2147483649),(testView.getInt8(0)||!testView.getInt8(1))&&redefineAll($DataViewPrototype,{setInt8:function(Fn,io){nativeSetInt8.call(this,Fn,io<<24>>24)},setUint8:function(Fn,io){nativeSetInt8.call(this,Fn,io<<24>>24)}},{unsafe:!0})}setToStringTag($ArrayBuffer,ARRAY_BUFFER);setToStringTag($DataView,DATA_VIEW);var arrayBuffer={ArrayBuffer:$ArrayBuffer,DataView:$DataView},aFunction$2=function(Mn){if(typeof Mn!="function")throw TypeError(String(Mn)+" is not a function");return Mn},anObject$3=anObject$9,aFunction$1=aFunction$2,wellKnownSymbol$8=wellKnownSymbol$d,SPECIES$2=wellKnownSymbol$8("species"),speciesConstructor$1=function(Mn,Fn){var io=anObject$3(Mn).constructor,fo;return io===void 0||(fo=anObject$3(io)[SPECIES$2])==null?Fn:aFunction$1(fo)},$$2=_export,fails$5=fails$d,ArrayBufferModule$1=arrayBuffer,anObject$2=anObject$9,toAbsoluteIndex=toAbsoluteIndex$3,toLength$4=toLength$9,speciesConstructor=speciesConstructor$1,ArrayBuffer$3=ArrayBufferModule$1.ArrayBuffer,DataView$2=ArrayBufferModule$1.DataView,nativeArrayBufferSlice=ArrayBuffer$3.prototype.slice,INCORRECT_SLICE=fails$5(function(){return!new ArrayBuffer$3(2).slice(1,void 0).byteLength});$$2({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:INCORRECT_SLICE},{slice:function Mn(Fn,io){if(nativeArrayBufferSlice!==void 0&&io===void 0)return nativeArrayBufferSlice.call(anObject$2(this),Fn);for(var fo=anObject$2(this).byteLength,$o=toAbsoluteIndex(Fn,fo),mo=toAbsoluteIndex(io===void 0?fo:io,fo),Ao=new(speciesConstructor(this,ArrayBuffer$3))(toLength$4(mo-$o)),jo=new DataView$2(this),Lo=new DataView$2(Ao),Ho=0;$o<mo;)Lo.setUint8(Ho++,jo.getUint8($o++));return Ao}});var DESCRIPTORS$3=descriptors,fails$4=fails$d,objectKeys=objectKeys$2,getOwnPropertySymbolsModule=objectGetOwnPropertySymbols,propertyIsEnumerableModule=objectPropertyIsEnumerable,toObject$3=toObject$6,IndexedObject$1=indexedObject,nativeAssign=Object.assign,defineProperty$1=Object.defineProperty,objectAssign=!nativeAssign||fails$4(function(){if(DESCRIPTORS$3&&nativeAssign({b:1},nativeAssign(defineProperty$1({},"a",{enumerable:!0,get:function(){defineProperty$1(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var Mn={},Fn={},io=Symbol(),fo="abcdefghijklmnopqrst";return Mn[io]=7,fo.split("").forEach(function($o){Fn[$o]=$o}),nativeAssign({},Mn)[io]!=7||objectKeys(nativeAssign({},Fn)).join("")!=fo})?function Mn(Fn,io){for(var fo=toObject$3(Fn),$o=arguments.length,mo=1,Ao=getOwnPropertySymbolsModule.f,jo=propertyIsEnumerableModule.f;$o>mo;)for(var Lo=IndexedObject$1(arguments[mo++]),Ho=Ao?objectKeys(Lo).concat(Ao(Lo)):objectKeys(Lo),zo=Ho.length,Go=0,Vo;zo>Go;)Vo=Ho[Go++],(!DESCRIPTORS$3||jo.call(Lo,Vo))&&(fo[Vo]=Lo[Vo]);return fo}:nativeAssign,$$1=_export,assign=objectAssign;$$1({target:"Object",stat:!0,forced:Object.assign!==assign},{assign});var anObject$1=anObject$9,regexpFlags=function(){var Mn=anObject$1(this),Fn="";return Mn.global&&(Fn+="g"),Mn.ignoreCase&&(Fn+="i"),Mn.multiline&&(Fn+="m"),Mn.dotAll&&(Fn+="s"),Mn.unicode&&(Fn+="u"),Mn.sticky&&(Fn+="y"),Fn},redefine$1=redefine$5.exports,anObject=anObject$9,fails$3=fails$d,flags=regexpFlags,TO_STRING="toString",RegExpPrototype=RegExp.prototype,nativeToString=RegExpPrototype[TO_STRING],NOT_GENERIC=fails$3(function(){return nativeToString.call({source:"a",flags:"b"})!="/a/b"}),INCORRECT_NAME=nativeToString.name!=TO_STRING;(NOT_GENERIC||INCORRECT_NAME)&&redefine$1(RegExp.prototype,TO_STRING,function(){var Fn=anObject(this),io=String(Fn.source),fo=Fn.flags,$o=String(fo===void 0&&Fn instanceof RegExp&&!("flags"in RegExpPrototype)?flags.call(Fn):fo);return"/"+io+"/"+$o},{unsafe:!0});var typedArrayConstructor={exports:{}},wellKnownSymbol$7=wellKnownSymbol$d,ITERATOR$2=wellKnownSymbol$7("iterator"),SAFE_CLOSING=!1;try{var called=0,iteratorWithReturn={next:function(){return{done:!!called++}},return:function(){SAFE_CLOSING=!0}};iteratorWithReturn[ITERATOR$2]=function(){return this},Array.from(iteratorWithReturn,function(){throw 2})}catch(Mn){}var checkCorrectnessOfIteration$1=function(Mn,Fn){if(!Fn&&!SAFE_CLOSING)return!1;var io=!1;try{var fo={};fo[ITERATOR$2]=function(){return{next:function(){return{done:io=!0}}}},Mn(fo)}catch{}return io},wellKnownSymbol$6=wellKnownSymbol$d,TO_STRING_TAG$2=wellKnownSymbol$6("toStringTag"),test$1={};test$1[TO_STRING_TAG$2]="z";var toStringTagSupport=String(test$1)==="[object z]",TO_STRING_TAG_SUPPORT=toStringTagSupport,classofRaw=classofRaw$1,wellKnownSymbol$5=wellKnownSymbol$d,TO_STRING_TAG$1=wellKnownSymbol$5("toStringTag"),CORRECT_ARGUMENTS=classofRaw(function(){return arguments}())=="Arguments",tryGet=function(Mn,Fn){try{return Mn[Fn]}catch{}},classof$4=TO_STRING_TAG_SUPPORT?classofRaw:function(Mn){var Fn,io,fo;return Mn===void 0?"Undefined":Mn===null?"Null":typeof(io=tryGet(Fn=Object(Mn),TO_STRING_TAG$1))=="string"?io:CORRECT_ARGUMENTS?classofRaw(Fn):(fo=classofRaw(Fn))=="Object"&&typeof Fn.callee=="function"?"Arguments":fo},NATIVE_ARRAY_BUFFER=arrayBufferNative,DESCRIPTORS$2=descriptors,global$4=global$g,isObject$3=isObject$9,has$1=has$b,classof$3=classof$4,createNonEnumerableProperty$1=createNonEnumerableProperty$9,redefine=redefine$5.exports,defineProperty=objectDefineProperty.f,getPrototypeOf=objectGetPrototypeOf,setPrototypeOf$2=objectSetPrototypeOf,wellKnownSymbol$4=wellKnownSymbol$d,uid=uid$3,Int8Array$3=global$4.Int8Array,Int8ArrayPrototype=Int8Array$3&&Int8Array$3.prototype,Uint8ClampedArray$1=global$4.Uint8ClampedArray,Uint8ClampedArrayPrototype=Uint8ClampedArray$1&&Uint8ClampedArray$1.prototype,TypedArray$1=Int8Array$3&&getPrototypeOf(Int8Array$3),TypedArrayPrototype$1=Int8ArrayPrototype&&getPrototypeOf(Int8ArrayPrototype),ObjectPrototype=Object.prototype,isPrototypeOf=ObjectPrototype.isPrototypeOf,TO_STRING_TAG=wellKnownSymbol$4("toStringTag"),TYPED_ARRAY_TAG$1=uid("TYPED_ARRAY_TAG"),NATIVE_ARRAY_BUFFER_VIEWS$2=NATIVE_ARRAY_BUFFER&&!!setPrototypeOf$2&&classof$3(global$4.opera)!=="Opera",TYPED_ARRAY_TAG_REQIRED=!1,NAME,TypedArrayConstructorsList={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},isView=function Mn(Fn){var io=classof$3(Fn);return io==="DataView"||has$1(TypedArrayConstructorsList,io)},isTypedArray$1=function(Mn){return isObject$3(Mn)&&has$1(TypedArrayConstructorsList,classof$3(Mn))},aTypedArray$4=function(Mn){if(isTypedArray$1(Mn))return Mn;throw TypeError("Target is not a typed array")},aTypedArrayConstructor$2=function(Mn){if(setPrototypeOf$2){if(isPrototypeOf.call(TypedArray$1,Mn))return Mn}else for(var Fn in TypedArrayConstructorsList)if(has$1(TypedArrayConstructorsList,NAME)){var io=global$4[Fn];if(io&&(Mn===io||isPrototypeOf.call(io,Mn)))return Mn}throw TypeError("Target is not a typed array constructor")},exportTypedArrayMethod$4=function(Mn,Fn,io){if(DESCRIPTORS$2){if(io)for(var fo in TypedArrayConstructorsList){var $o=global$4[fo];$o&&has$1($o.prototype,Mn)&&delete $o.prototype[Mn]}(!TypedArrayPrototype$1[Mn]||io)&&redefine(TypedArrayPrototype$1,Mn,io?Fn:NATIVE_ARRAY_BUFFER_VIEWS$2&&Int8ArrayPrototype[Mn]||Fn)}},exportTypedArrayStaticMethod=function(Mn,Fn,io){var fo,$o;if(DESCRIPTORS$2){if(setPrototypeOf$2){if(io)for(fo in TypedArrayConstructorsList)$o=global$4[fo],$o&&has$1($o,Mn)&&delete $o[Mn];if(!TypedArray$1[Mn]||io)try{return redefine(TypedArray$1,Mn,io?Fn:NATIVE_ARRAY_BUFFER_VIEWS$2&&Int8Array$3[Mn]||Fn)}catch{}else return}for(fo in TypedArrayConstructorsList)$o=global$4[fo],$o&&(!$o[Mn]||io)&&redefine($o,Mn,Fn)}};for(NAME in TypedArrayConstructorsList)global$4[NAME]||(NATIVE_ARRAY_BUFFER_VIEWS$2=!1);if((!NATIVE_ARRAY_BUFFER_VIEWS$2||typeof TypedArray$1!="function"||TypedArray$1===Function.prototype)&&(TypedArray$1=function(){throw TypeError("Incorrect invocation")},NATIVE_ARRAY_BUFFER_VIEWS$2))for(NAME in TypedArrayConstructorsList)global$4[NAME]&&setPrototypeOf$2(global$4[NAME],TypedArray$1);if((!NATIVE_ARRAY_BUFFER_VIEWS$2||!TypedArrayPrototype$1||TypedArrayPrototype$1===ObjectPrototype)&&(TypedArrayPrototype$1=TypedArray$1.prototype,NATIVE_ARRAY_BUFFER_VIEWS$2))for(NAME in TypedArrayConstructorsList)global$4[NAME]&&setPrototypeOf$2(global$4[NAME].prototype,TypedArrayPrototype$1);NATIVE_ARRAY_BUFFER_VIEWS$2&&getPrototypeOf(Uint8ClampedArrayPrototype)!==TypedArrayPrototype$1&&setPrototypeOf$2(Uint8ClampedArrayPrototype,TypedArrayPrototype$1);if(DESCRIPTORS$2&&!has$1(TypedArrayPrototype$1,TO_STRING_TAG)){TYPED_ARRAY_TAG_REQIRED=!0,defineProperty(TypedArrayPrototype$1,TO_STRING_TAG,{get:function(){return isObject$3(this)?this[TYPED_ARRAY_TAG$1]:void 0}});for(NAME in TypedArrayConstructorsList)global$4[NAME]&&createNonEnumerableProperty$1(global$4[NAME],TYPED_ARRAY_TAG$1,NAME)}var arrayBufferViewCore={NATIVE_ARRAY_BUFFER_VIEWS:NATIVE_ARRAY_BUFFER_VIEWS$2,TYPED_ARRAY_TAG:TYPED_ARRAY_TAG_REQIRED&&TYPED_ARRAY_TAG$1,aTypedArray:aTypedArray$4,aTypedArrayConstructor:aTypedArrayConstructor$2,exportTypedArrayMethod:exportTypedArrayMethod$4,exportTypedArrayStaticMethod,isView,isTypedArray:isTypedArray$1,TypedArray:TypedArray$1,TypedArrayPrototype:TypedArrayPrototype$1},global$3=global$g,fails$2=fails$d,checkCorrectnessOfIteration=checkCorrectnessOfIteration$1,NATIVE_ARRAY_BUFFER_VIEWS$1=arrayBufferViewCore.NATIVE_ARRAY_BUFFER_VIEWS,ArrayBuffer$2=global$3.ArrayBuffer,Int8Array$2=global$3.Int8Array,typedArrayConstructorsRequireWrappers=!NATIVE_ARRAY_BUFFER_VIEWS$1||!fails$2(function(){Int8Array$2(1)})||!fails$2(function(){new Int8Array$2(-1)})||!checkCorrectnessOfIteration(function(Mn){new Int8Array$2,new Int8Array$2(null),new Int8Array$2(1.5),new Int8Array$2(Mn)},!0)||fails$2(function(){return new Int8Array$2(new ArrayBuffer$2(2),1,void 0).length!==1}),toInteger=toInteger$5,toPositiveInteger$1=function(Mn){var Fn=toInteger(Mn);if(Fn<0)throw RangeError("The argument can't be less than 0");return Fn},toPositiveInteger=toPositiveInteger$1,toOffset$2=function(Mn,Fn){var io=toPositiveInteger(Mn);if(io%Fn)throw RangeError("Wrong offset");return io},classof$2=classof$4,Iterators$1=iterators,wellKnownSymbol$3=wellKnownSymbol$d,ITERATOR$1=wellKnownSymbol$3("iterator"),getIteratorMethod$1=function(Mn){if(Mn!=null)return Mn[ITERATOR$1]||Mn["@@iterator"]||Iterators$1[classof$2(Mn)]},wellKnownSymbol$2=wellKnownSymbol$d,Iterators=iterators,ITERATOR=wellKnownSymbol$2("iterator"),ArrayPrototype=Array.prototype,isArrayIteratorMethod$1=function(Mn){return Mn!==void 0&&(Iterators.Array===Mn||ArrayPrototype[ITERATOR]===Mn)},aFunction=aFunction$2,functionBindContext=function(Mn,Fn,io){if(aFunction(Mn),Fn===void 0)return Mn;switch(io){case 0:return function(){return Mn.call(Fn)};case 1:return function(fo){return Mn.call(Fn,fo)};case 2:return function(fo,$o){return Mn.call(Fn,fo,$o)};case 3:return function(fo,$o,mo){return Mn.call(Fn,fo,$o,mo)}}return function(){return Mn.apply(Fn,arguments)}},toObject$2=toObject$6,toLength$3=toLength$9,getIteratorMethod=getIteratorMethod$1,isArrayIteratorMethod=isArrayIteratorMethod$1,bind$1=functionBindContext,aTypedArrayConstructor$1=arrayBufferViewCore.aTypedArrayConstructor,typedArrayFrom$1=function Mn(Fn){var io=toObject$2(Fn),fo=arguments.length,$o=fo>1?arguments[1]:void 0,mo=$o!==void 0,Ao=getIteratorMethod(io),jo,Lo,Ho,zo,Go,Vo;if(Ao!=null&&!isArrayIteratorMethod(Ao))for(Go=Ao.call(io),Vo=Go.next,io=[];!(zo=Vo.call(Go)).done;)io.push(zo.value);for(mo&&fo>2&&($o=bind$1($o,arguments[2],2)),Lo=toLength$3(io.length),Ho=new(aTypedArrayConstructor$1(this))(Lo),jo=0;Lo>jo;jo++)Ho[jo]=mo?$o(io[jo],jo):io[jo];return Ho},classof$1=classofRaw$1,isArray$1=Array.isArray||function Mn(Fn){return classof$1(Fn)=="Array"},isObject$2=isObject$9,isArray=isArray$1,wellKnownSymbol$1=wellKnownSymbol$d,SPECIES$1=wellKnownSymbol$1("species"),arraySpeciesCreate$1=function(Mn,Fn){var io;return isArray(Mn)&&(io=Mn.constructor,typeof io=="function"&&(io===Array||isArray(io.prototype))?io=void 0:isObject$2(io)&&(io=io[SPECIES$1],io===null&&(io=void 0))),new(io===void 0?Array:io)(Fn===0?0:Fn)},bind=functionBindContext,IndexedObject=indexedObject,toObject$1=toObject$6,toLength$2=toLength$9,arraySpeciesCreate=arraySpeciesCreate$1,push=[].push,createMethod=function(Mn){var Fn=Mn==1,io=Mn==2,fo=Mn==3,$o=Mn==4,mo=Mn==6,Ao=Mn==5||mo;return function(jo,Lo,Ho,zo){for(var Go=toObject$1(jo),Vo=IndexedObject(Go),Yo=bind(Lo,Ho,3),Xo=toLength$2(Vo.length),is=0,yl=zo||arraySpeciesCreate,us=Fn?yl(jo,Xo):io?yl(jo,0):void 0,hs,_l;Xo>is;is++)if((Ao||is in Vo)&&(hs=Vo[is],_l=Yo(hs,is,Go),Mn)){if(Fn)us[is]=_l;else if(_l)switch(Mn){case 3:return!0;case 5:return hs;case 6:return is;case 2:push.call(us,hs)}else if($o)return!1}return mo?-1:fo||$o?$o:us}},arrayIteration={forEach:createMethod(0),map:createMethod(1),filter:createMethod(2),some:createMethod(3),every:createMethod(4),find:createMethod(5),findIndex:createMethod(6)},getBuiltIn=getBuiltIn$3,definePropertyModule$1=objectDefineProperty,wellKnownSymbol=wellKnownSymbol$d,DESCRIPTORS$1=descriptors,SPECIES=wellKnownSymbol("species"),setSpecies$1=function(Mn){var Fn=getBuiltIn(Mn),io=definePropertyModule$1.f;DESCRIPTORS$1&&Fn&&!Fn[SPECIES]&&io(Fn,SPECIES,{configurable:!0,get:function(){return this}})},isObject$1=isObject$9,setPrototypeOf$1=objectSetPrototypeOf,inheritIfRequired$1=function(Mn,Fn,io){var fo,$o;return setPrototypeOf$1&&typeof(fo=Fn.constructor)=="function"&&fo!==io&&isObject$1($o=fo.prototype)&&$o!==io.prototype&&setPrototypeOf$1(Mn,$o),Mn},$=_export,global$2=global$g,DESCRIPTORS=descriptors,TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS=typedArrayConstructorsRequireWrappers,ArrayBufferViewCore$4=arrayBufferViewCore,ArrayBufferModule=arrayBuffer,anInstance=anInstance$2,createPropertyDescriptor=createPropertyDescriptor$4,createNonEnumerableProperty=createNonEnumerableProperty$9,toLength$1=toLength$9,toIndex=toIndex$2,toOffset$1=toOffset$2,toPrimitive=toPrimitive$3,has=has$b,classof=classof$4,isObject=isObject$9,create$3=objectCreate,setPrototypeOf=objectSetPrototypeOf,getOwnPropertyNames=objectGetOwnPropertyNames.f,typedArrayFrom=typedArrayFrom$1,forEach=arrayIteration.forEach,setSpecies=setSpecies$1,definePropertyModule=objectDefineProperty,getOwnPropertyDescriptorModule=objectGetOwnPropertyDescriptor,InternalStateModule=internalState,inheritIfRequired=inheritIfRequired$1,getInternalState=InternalStateModule.get,setInternalState=InternalStateModule.set,nativeDefineProperty=definePropertyModule.f,nativeGetOwnPropertyDescriptor=getOwnPropertyDescriptorModule.f,round=Math.round,RangeError$1=global$2.RangeError,ArrayBuffer$1=ArrayBufferModule.ArrayBuffer,DataView$1=ArrayBufferModule.DataView,NATIVE_ARRAY_BUFFER_VIEWS=ArrayBufferViewCore$4.NATIVE_ARRAY_BUFFER_VIEWS,TYPED_ARRAY_TAG=ArrayBufferViewCore$4.TYPED_ARRAY_TAG,TypedArray=ArrayBufferViewCore$4.TypedArray,TypedArrayPrototype=ArrayBufferViewCore$4.TypedArrayPrototype,aTypedArrayConstructor=ArrayBufferViewCore$4.aTypedArrayConstructor,isTypedArray=ArrayBufferViewCore$4.isTypedArray,BYTES_PER_ELEMENT="BYTES_PER_ELEMENT",WRONG_LENGTH="Wrong length",fromList=function(Mn,Fn){for(var io=0,fo=Fn.length,$o=new(aTypedArrayConstructor(Mn))(fo);fo>io;)$o[io]=Fn[io++];return $o},addGetter=function(Mn,Fn){nativeDefineProperty(Mn,Fn,{get:function(){return getInternalState(this)[Fn]}})},isArrayBuffer=function(Mn){var Fn;return Mn instanceof ArrayBuffer$1||(Fn=classof(Mn))=="ArrayBuffer"||Fn=="SharedArrayBuffer"},isTypedArrayIndex=function(Mn,Fn){return isTypedArray(Mn)&&typeof Fn!="symbol"&&Fn in Mn&&String(+Fn)==String(Fn)},wrappedGetOwnPropertyDescriptor=function Mn(Fn,io){return isTypedArrayIndex(Fn,io=toPrimitive(io,!0))?createPropertyDescriptor(2,Fn[io]):nativeGetOwnPropertyDescriptor(Fn,io)},wrappedDefineProperty=function Mn(Fn,io,fo){return isTypedArrayIndex(Fn,io=toPrimitive(io,!0))&&isObject(fo)&&has(fo,"value")&&!has(fo,"get")&&!has(fo,"set")&&!fo.configurable&&(!has(fo,"writable")||fo.writable)&&(!has(fo,"enumerable")||fo.enumerable)?(Fn[io]=fo.value,Fn):nativeDefineProperty(Fn,io,fo)};DESCRIPTORS?(NATIVE_ARRAY_BUFFER_VIEWS||(getOwnPropertyDescriptorModule.f=wrappedGetOwnPropertyDescriptor,definePropertyModule.f=wrappedDefineProperty,addGetter(TypedArrayPrototype,"buffer"),addGetter(TypedArrayPrototype,"byteOffset"),addGetter(TypedArrayPrototype,"byteLength"),addGetter(TypedArrayPrototype,"length")),$({target:"Object",stat:!0,forced:!NATIVE_ARRAY_BUFFER_VIEWS},{getOwnPropertyDescriptor:wrappedGetOwnPropertyDescriptor,defineProperty:wrappedDefineProperty}),typedArrayConstructor.exports=function(Mn,Fn,io){var fo=Mn.match(/\d+$/)[0]/8,$o=Mn+(io?"Clamped":"")+"Array",mo="get"+Mn,Ao="set"+Mn,jo=global$2[$o],Lo=jo,Ho=Lo&&Lo.prototype,zo={},Go=function(Xo,is){var yl=getInternalState(Xo);return yl.view[mo](is*fo+yl.byteOffset,!0)},Vo=function(Xo,is,yl){var us=getInternalState(Xo);io&&(yl=(yl=round(yl))<0?0:yl>255?255:yl&255),us.view[Ao](is*fo+us.byteOffset,yl,!0)},Yo=function(Xo,is){nativeDefineProperty(Xo,is,{get:function(){return Go(this,is)},set:function(yl){return Vo(this,is,yl)},enumerable:!0})};NATIVE_ARRAY_BUFFER_VIEWS?TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS&&(Lo=Fn(function(Xo,is,yl,us){return anInstance(Xo,Lo,$o),inheritIfRequired(function(){return isObject(is)?isArrayBuffer(is)?us!==void 0?new jo(is,toOffset$1(yl,fo),us):yl!==void 0?new jo(is,toOffset$1(yl,fo)):new jo(is):isTypedArray(is)?fromList(Lo,is):typedArrayFrom.call(Lo,is):new jo(toIndex(is))}(),Xo,Lo)}),setPrototypeOf&&setPrototypeOf(Lo,TypedArray),forEach(getOwnPropertyNames(jo),function(Xo){Xo in Lo||createNonEnumerableProperty(Lo,Xo,jo[Xo])}),Lo.prototype=Ho):(Lo=Fn(function(Xo,is,yl,us){anInstance(Xo,Lo,$o);var hs=0,_l=0,xl,Il,Ol;if(!isObject(is))Ol=toIndex(is),Il=Ol*fo,xl=new ArrayBuffer$1(Il);else if(isArrayBuffer(is)){xl=is,_l=toOffset$1(yl,fo);var Tl=is.byteLength;if(us===void 0){if(Tl%fo||(Il=Tl-_l,Il<0))throw RangeError$1(WRONG_LENGTH)}else if(Il=toLength$1(us)*fo,Il+_l>Tl)throw RangeError$1(WRONG_LENGTH);Ol=Il/fo}else return isTypedArray(is)?fromList(Lo,is):typedArrayFrom.call(Lo,is);for(setInternalState(Xo,{buffer:xl,byteOffset:_l,byteLength:Il,length:Ol,view:new DataView$1(xl)});hs<Ol;)Yo(Xo,hs++)}),setPrototypeOf&&setPrototypeOf(Lo,TypedArray),Ho=Lo.prototype=create$3(TypedArrayPrototype)),Ho.constructor!==Lo&&createNonEnumerableProperty(Ho,"constructor",Lo),TYPED_ARRAY_TAG&&createNonEnumerableProperty(Ho,TYPED_ARRAY_TAG,$o),zo[$o]=Lo,$({global:!0,forced:Lo!=jo,sham:!NATIVE_ARRAY_BUFFER_VIEWS},zo),BYTES_PER_ELEMENT in Lo||createNonEnumerableProperty(Lo,BYTES_PER_ELEMENT,fo),BYTES_PER_ELEMENT in Ho||createNonEnumerableProperty(Ho,BYTES_PER_ELEMENT,fo),setSpecies($o)}):typedArrayConstructor.exports=function(){};var createTypedArrayConstructor=typedArrayConstructor.exports;createTypedArrayConstructor("Uint8",function(Mn){return function(io,fo,$o){return Mn(this,io,fo,$o)}});var ArrayBufferViewCore$3=arrayBufferViewCore,$fill=arrayFill$1,aTypedArray$3=ArrayBufferViewCore$3.aTypedArray,exportTypedArrayMethod$3=ArrayBufferViewCore$3.exportTypedArrayMethod;exportTypedArrayMethod$3("fill",function Mn(Fn){return $fill.apply(aTypedArray$3(this),arguments)});var ArrayBufferViewCore$2=arrayBufferViewCore,toLength=toLength$9,toOffset=toOffset$2,toObject=toObject$6,fails$1=fails$d,aTypedArray$2=ArrayBufferViewCore$2.aTypedArray,exportTypedArrayMethod$2=ArrayBufferViewCore$2.exportTypedArrayMethod,FORCED$1=fails$1(function(){new Int8Array(1).set({})});exportTypedArrayMethod$2("set",function Mn(Fn){aTypedArray$2(this);var io=toOffset(arguments.length>1?arguments[1]:void 0,1),fo=this.length,$o=toObject(Fn),mo=toLength($o.length),Ao=0;if(mo+io>fo)throw RangeError("Wrong length");for(;Ao<mo;)this[io+Ao]=$o[Ao++]},FORCED$1);var ArrayBufferViewCore$1=arrayBufferViewCore,aTypedArray$1=ArrayBufferViewCore$1.aTypedArray,exportTypedArrayMethod$1=ArrayBufferViewCore$1.exportTypedArrayMethod,$sort=[].sort;exportTypedArrayMethod$1("sort",function Mn(Fn){return $sort.call(aTypedArray$1(this),Fn)});var global$1=global$g,ArrayBufferViewCore=arrayBufferViewCore,fails=fails$d,Int8Array$1=global$1.Int8Array,aTypedArray=ArrayBufferViewCore.aTypedArray,exportTypedArrayMethod=ArrayBufferViewCore.exportTypedArrayMethod,$toLocaleString=[].toLocaleString,$slice=[].slice,TO_LOCALE_STRING_BUG=!!Int8Array$1&&fails(function(){$toLocaleString.call(new Int8Array$1(1))}),FORCED=fails(function(){return[1,2].toLocaleString()!=new Int8Array$1([1,2]).toLocaleString()})||!fails(function(){Int8Array$1.prototype.toLocaleString.call([1,2])});exportTypedArrayMethod("toLocaleString",function Mn(){return $toLocaleString.apply(TO_LOCALE_STRING_BUG?$slice.call(aTypedArray(this)):aTypedArray(this),arguments)},FORCED);function __awaiter(Mn,Fn,io,fo){function $o(mo){return mo instanceof io?mo:new io(function(Ao){Ao(mo)})}return new(io||(io=Promise))(function(mo,Ao){function jo(zo){try{Ho(fo.next(zo))}catch(Go){Ao(Go)}}function Lo(zo){try{Ho(fo.throw(zo))}catch(Go){Ao(Go)}}function Ho(zo){zo.done?mo(zo.value):$o(zo.value).then(jo,Lo)}Ho((fo=fo.apply(Mn,[])).next())})}typeof SuppressedError=="function"&&SuppressedError;var icon="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQ4AAAEOCAYAAAB4sfmlAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAAB3RJTUUH5gYXDA8FsK/ZnQAAAAFvck5UAc+id5oAACF9SURBVHja7d19gJRlvTfw7++a2ZnlVQFRJGBneU1gZ0EyszpHy15OnvJRj5rlU5aVnTJEAnZ3dkFHZXeWtwBJe/FkVk9lUumpTm9Hj1SPmSXCzgKGLOwMi4gKaLwsO2/X7/lDMvThZXeZmd/98vv8FbUx3/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npE+BUqVineLg/jsMvdGFwh1yZbqB6UPXalS825xMM4u0+scYcKyUDi8ZH18dLf0YStVDt4tDmBkaf96YgKtNblC3YYV49PSB6tUOXm5OEq5VOBGNmZOsnnc76UPUikJXi6OyhL8nS8zsKg9HLlPp4krP/NycRRvxzZGDmTuMWF7x8Z49avSB6aUNM8WBwPBIk3/+o21NHfT0qpnpY9JKafwbHEQkAMQPo2/YBsKPC+5ZPzPpY9FKadxytMcxUf9m+LNwAEQ1eVD3dO1NJQ6Ps+OOMDcpy0EGLAG+E4+j8YtyyJ7pOMr5WSeLQ4GDhBwZi9//EnLdk5764S/SOdWyg08WxwE7Acw7hQ/9jwbqm9vrvqBbtasVO95tjgA2neih9wY6CGiFchWJtqXjzosnVQpt/FwcfCJdj37KeVofnJ5pFM6oVJu5dniIJg049jJndxOZOa0tUQel86mlNt5tjiYOQ0CGNhHTLclt0e+gbVUkM6llBd4tjgIpsPCftX2HL5988pp+6XzKOUl/w9vbeT/L2dfMwAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMi0wNi0yM1QxMjoxMzo0MiswMDowMIbbr3kAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjItMDYtMjNUMTI6MTM6NDIrMDA6MDD3hhfFAAAAAElFTkSuQmCC";const isInstalled=()=>waitFor(()=>{var Mn;return!!(!((Mn=window.near)===null||Mn===void 0)&&Mn.isSender)}).catch(()=>!1),setupSenderState=()=>({wallet:window.near}),Sender=({options:Mn,metadata:Fn,store:io,provider:fo,emitter:$o,logger:mo,id:Ao})=>__awaiter(void 0,void 0,void 0,function*(){const jo=setupSenderState(),Lo=()=>{for(const is in jo.wallet.callbacks)jo.wallet.remove(is)},Ho=()=>__awaiter(void 0,void 0,void 0,function*(){if(!jo.wallet.isSignedIn())return;Lo();const is=yield jo.wallet.signOut();if(is===!0)return;const yl=new Error(typeof is.error=="string"?is.error:is.error.type);if(yl.message==="User reject")throw yl;mo.log("Failed to sign out"),mo.error(yl)}),zo=()=>{jo.wallet.on("accountChanged",is=>__awaiter(void 0,void 0,void 0,function*(){mo.log("onAccountChange",is),$o.emit("signedOut",null)})),jo.wallet.on("rpcChanged",is=>__awaiter(void 0,void 0,void 0,function*(){mo.log("onNetworkChange",is),Mn.network.networkId!==is.networkId&&(yield Ho(),$o.emit("signedOut",null),$o.emit("networkChanged",{networkId:is.networkId}))}))},Go=()=>__awaiter(void 0,void 0,void 0,function*(){const{selectedWalletId:is}=io.getState();is===Ao&&(yield waitFor(()=>{var _l;return!!(!((_l=jo.wallet)===null||_l===void 0)&&_l.isSignedIn())},{timeout:1e3}).catch());const yl=jo.wallet.getAccountId();if(!yl)return[];yield waitFor(()=>!!jo.wallet.account(),{timeout:100});const us=jo.wallet.account();if(!us.connection.signer.getPublicKey)return[{accountId:yl,publicKey:void 0}];const hs=yield us.connection.signer.getPublicKey(us.accountId,Mn.network.networkId);return[{accountId:yl,publicKey:hs?hs.toString():void 0}]}),Vo=is=>is.every(yl=>yl.type==="FunctionCall"),Yo=is=>{if(!Vo(is))throw new Error(`Only 'FunctionCall' actions types are supported by ${Fn.name}`);return is.map(us=>us.params)},Xo=is=>is.map(yl=>({receiverId:yl.receiverId,actions:Yo(yl.actions)}));return jo.wallet&&jo.wallet.isSignedIn()&&zo(),{signIn({contractId:is,methodNames:yl}){return __awaiter(this,void 0,void 0,function*(){const us=yield Go();if(us.length)return us;const{accessKey:hs,error:_l}=yield jo.wallet.requestSignIn({contractId:is,methodNames:yl});if(!hs||_l)throw yield Ho(),new Error((typeof _l=="string"?_l:_l.type)||"Failed to sign in");return zo(),yield Go()})},signOut:Ho,getAccounts(){return __awaiter(this,void 0,void 0,function*(){return Go()})},verifyOwner({message:is}){return __awaiter(this,void 0,void 0,function*(){mo.log("Sender:verifyOwner",{message:is});const yl=jo.wallet.account();if(!yl)throw new Error("Wallet not signed in");if(!yl.connection.signer.signMessage)throw new Error("Wallet is locked");const us=Mn.network.networkId,hs=yl.accountId,_l=yield yl.connection.signer.getPublicKey(hs,us),xl=yield fo.block({finality:"final"}),Il={accountId:hs,message:is,blockId:xl.header.hash,publicKey:Buffer$D.from(_l.data).toString("base64"),keyType:_l.keyType},Ol=JSON.stringify(Il),Tl=yield yl.connection.signer.signMessage(new Uint8Array(Buffer$D.from(Ol)),hs,us);return Object.assign(Object.assign({},Il),{signature:Buffer$D.from(Tl.signature).toString("base64"),keyType:Tl.publicKey.keyType})})},signMessage(is){return __awaiter(this,void 0,void 0,function*(){return jo.wallet.signMessage(is).then(yl=>{if(yl.error)throw new Error(yl.error);if(!(yl!=null&&yl.response))throw new Error("Invalid response");return yl.response})})},signAndSendTransaction({signerId:is,receiverId:yl,actions:us}){return __awaiter(this,void 0,void 0,function*(){mo.log("signAndSendTransaction",{signerId:is,receiverId:yl,actions:us});const{contract:hs}=io.getState();if(!jo.wallet.isSignedIn()||!hs)throw new Error("Wallet not signed in");return jo.wallet.signAndSendTransaction({receiverId:yl||hs.contractId,actions:Yo(us)}).then(_l=>{var xl;if(_l.error)throw new Error(_l.error);if(_l.response&&"error"in _l.response)throw new Error(_l.response.error.message);if(!(!((xl=_l.response)===null||xl===void 0)&&xl.length))throw new Error("Invalid response");return _l.response[0]})})},signAndSendTransactions({transactions:is}){return __awaiter(this,void 0,void 0,function*(){if(mo.log("signAndSendTransactions",{transactions:is}),!jo.wallet.isSignedIn())throw new Error("Wallet not signed in");return jo.wallet.requestSignTransactions({transactions:Xo(is)}).then(yl=>{var us;if(yl.error)throw new Error(yl.error);if(yl.response&&"error"in yl.response)throw new Error(yl.response.error.message);if(!(!((us=yl.response)===null||us===void 0)&&us.length))throw new Error("Invalid response");return yl.response})})},importAccountsInSecureContext({accounts:is}){return __awaiter(this,void 0,void 0,function*(){window.near&&window.near.isSender&&(yield window.near.batchImport({keystore:is,network:Mn.network.networkId}))})}}});function setupSender({iconUrl:Mn=icon,deprecated:Fn=!1}={}){return()=>__awaiter(this,void 0,void 0,function*(){if(isMobile_2())return null;const fo=yield isInstalled();return{id:"sender",type:"injected",metadata:{name:"Sender",description:"Browser extension wallet built on NEAR.",iconUrl:Mn,downloadUrl:"https://chrome.google.com/webstore/detail/sender-wallet/epapihdplajcdnnkdeiahlgigofloibg",deprecated:Fn,available:fo},init:Sender}})}class Wallet{constructor({networkId:Fn=NETWORK_ID,createAccessKeyFor:io=void 0}){ap(this,"startUp",async Fn=>{var Ao;typeof window<"u"&&((Ao=window.okxwallet)!=null&&Ao.near)&&(window.okxwallet.near.on("accountChanged",()=>{localStorage.removeItem("okx_account_id"),Fn(void 0)}),window.okxwallet.near.on("signOut",()=>{localStorage.removeItem("okx_account_id"),Fn(void 0)}),window.okxwallet.near.on("signIn",jo=>{localStorage.setItem("okx_account_id",jo),Fn(jo)})),this.selector=setupWalletSelector({network:this.networkId,modules:[setupMyNearWallet(),setupHereWallet(),setupOKXWallet(),setupMeteorWallet(),setupEthereumWallets({wagmiConfig,web3Modal:transformedWeb3Modal}),setupLedger(),setupSender(),lib$m.setupBitteWallet({walletUrl:"https://testnet.wallet.bitte.ai",callbackUrl:window.location.href,deprecated:!1})]});const io=await this.selector,$o=io.isSignedIn()?io.store.getState().accounts[0].accountId:"",mo=localStorage.getItem("okx_account_id");return mo?Fn(mo):io.store.observable.pipe(map(jo=>jo.accounts),distinctUntilChanged()).subscribe(jo=>{var Ho;const Lo=(Ho=jo.find(zo=>zo.active))==null?void 0:Ho.accountId;Fn(Lo)}),$o});ap(this,"signIn",async()=>{setupModal(await this.selector,{contractId:this.createAccessKeyFor}).show()});ap(this,"signOut",async()=>{(await(await this.selector).wallet()).signOut()});ap(this,"signAndSendTransaction",async({contractId:Fn,actions:io})=>{const $o=await(await(await this.selector).wallet()).signAndSendTransaction({receiverId:Fn,actions:io});return getTransactionLastResult$3($o)});ap(this,"getTransactionResult",async Fn=>{const io=await this.selector,{network:fo}=io.options,mo=await new JsonRpcProvider$3({url:fo.nodeUrl}).txStatus(Fn,"unnused");return getTransactionLastResult$3(mo)});this.createAccessKeyFor=io,this.networkId=Fn}}const GUESTBOOK_CONTRACT={mainnet:"hello.near-examples.near",testnet:"guestbook.near-examples.testnet"},identity=Mn=>Mn;function useStore(Mn,Fn=identity){const io=React$1.useSyncExternalStore(Mn.subscribe,()=>Fn(Mn.getState()),()=>Fn(Mn.getInitialState()));return React$1.useDebugValue(io),io}const createImpl=Mn=>{const Fn=createStore$2(Mn),io=fo=>useStore(Fn,fo);return Object.assign(io,Fn),io},create=Mn=>Mn?createImpl(Mn):createImpl,useWallet=create(Mn=>({wallet:void 0,signedAccountId:"",networkId:NETWORK_ID,setNetworkId:Fn=>Mn({networkId:Fn}),setWallet:Fn=>Mn({wallet:Fn}),setSignedAccountId:Fn=>Mn({signedAccountId:Fn})})),getNearContract=Mn=>GUESTBOOK_CONTRACT[Mn];function NearProvider({children:Mn}){const{setWallet:Fn,setSignedAccountId:io,networkId:fo}=useWallet();return reactExports$1.useEffect(()=>{const $o=new Wallet({createAccessKeyFor:getNearContract(fo),networkId:fo});$o.startUp(mo=>io(mo)),Fn($o)},[fo]),jsxRuntimeExports$1.jsx(jsxRuntimeExports$1.Fragment,{children:Mn})}function Header(){const{signedAccountId:Mn}=useWallet();return jsxRuntimeExports$1.jsx("header",{className:"border shadow-md",children:jsxRuntimeExports$1.jsxs("div",{className:"container mx-auto flex items-center justify-between px-4 py-4",children:[jsxRuntimeExports$1.jsx(Link,{to:"/",className:"font-bolds text-lg sm:text-2xl",children:"📖 NEAR Guest Book"}),jsxRuntimeExports$1.jsxs("nav",{children:[jsxRuntimeExports$1.jsx(ModeToggle,{}),Mn?jsxRuntimeExports$1.jsx(Button,{asChild:!0,children:jsxRuntimeExports$1.jsx(Link,{to:`/profile/${Mn}`,children:Mn})}):jsxRuntimeExports$1.jsx(Button,{asChild:!0,children:jsxRuntimeExports$1.jsx(Link,{to:"/login",children:"Connect NEAR Account"})})]})]})})}const Route$3=createRootRouteWithContext()({component:RootComponent,notFoundComponent:()=>jsxRuntimeExports$1.jsxs("div",{children:[jsxRuntimeExports$1.jsx("p",{children:"404 not found"}),jsxRuntimeExports$1.jsx(Link,{to:"/",children:"Go home"})]})});function RootComponent(){return jsxRuntimeExports$1.jsx(jsxRuntimeExports$1.Fragment,{children:jsxRuntimeExports$1.jsxs(ThemeProvider,{defaultTheme:"light",storageKey:"vite-ui-theme",children:[jsxRuntimeExports$1.jsx(NearProvider,{children:jsxRuntimeExports$1.jsxs("div",{className:"min-h-screen",children:[jsxRuntimeExports$1.jsx(Header,{}),jsxRuntimeExports$1.jsx("main",{className:"container mx-auto px-4 py-8",children:jsxRuntimeExports$1.jsx(Outlet,{})})]})}),jsxRuntimeExports$1.jsx(ReactQueryDevtools2,{buttonPosition:"bottom-left"}),jsxRuntimeExports$1.jsx(TanStackRouterDevtools,{position:"bottom-right"})]})})}const Route$2=createFileRoute("/login")({component:LoginPage});function LoginPage(){const{wallet:Mn,signedAccountId:Fn}=useWallet(),io=useNavigate();reactExports$1.useEffect(()=>{Fn&&io({to:"/"})},[Fn]);const fo=()=>{try{Mn.signIn()}catch{console.error("Wallet not configured properly")}};return jsxRuntimeExports$1.jsx("div",{className:"flex flex-col items-center",children:jsxRuntimeExports$1.jsx("div",{className:"w-full max-w-2xl py-12",children:jsxRuntimeExports$1.jsx(Button,{onClick:fo,className:"w-full bg-blue-600 text-white transition-all hover:bg-blue-700 focus:scale-95",children:"Sign In"})})})}function createDOMMotionComponentProxy(Mn){if(typeof Proxy>"u")return Mn;const Fn=new Map,io=(...fo)=>Mn(...fo);return new Proxy(io,{get:(fo,$o)=>$o==="create"?Mn:(Fn.has($o)||Fn.set($o,Mn($o)),Fn.get($o))})}function isAnimationControls(Mn){return Mn!==null&&typeof Mn=="object"&&typeof Mn.start=="function"}const isKeyframesTarget=Mn=>Array.isArray(Mn);function shallowCompare(Mn,Fn){if(!Array.isArray(Fn))return!1;const io=Fn.length;if(io!==Mn.length)return!1;for(let fo=0;fo<io;fo++)if(Fn[fo]!==Mn[fo])return!1;return!0}function isVariantLabel(Mn){return typeof Mn=="string"||Array.isArray(Mn)}function getValueState(Mn){const Fn=[{},{}];return Mn==null||Mn.values.forEach((io,fo)=>{Fn[0][fo]=io.get(),Fn[1][fo]=io.getVelocity()}),Fn}function resolveVariantFromProps(Mn,Fn,io,fo){if(typeof Fn=="function"){const[$o,mo]=getValueState(fo);Fn=Fn(io!==void 0?io:Mn.custom,$o,mo)}if(typeof Fn=="string"&&(Fn=Mn.variants&&Mn.variants[Fn]),typeof Fn=="function"){const[$o,mo]=getValueState(fo);Fn=Fn(io!==void 0?io:Mn.custom,$o,mo)}return Fn}function resolveVariant(Mn,Fn,io){const fo=Mn.getProps();return resolveVariantFromProps(fo,Fn,io!==void 0?io:fo.custom,Mn)}const variantPriorityOrder=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],variantProps=["initial",...variantPriorityOrder],transformPropOrder=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],transformProps=new Set(transformPropOrder),secondsToMilliseconds=Mn=>Mn*1e3,millisecondsToSeconds=Mn=>Mn/1e3,underDampedSpring={type:"spring",stiffness:500,damping:25,restSpeed:10},criticallyDampedSpring=Mn=>({type:"spring",stiffness:550,damping:Mn===0?2*Math.sqrt(550):30,restSpeed:10}),keyframesTransition={type:"keyframes",duration:.8},ease={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},getDefaultTransition=(Mn,{keyframes:Fn})=>Fn.length>2?keyframesTransition:transformProps.has(Mn)?Mn.startsWith("scale")?criticallyDampedSpring(Fn[1]):underDampedSpring:ease;function getValueTransition(Mn,Fn){return Mn?Mn[Fn]||Mn.default||Mn:void 0}const MotionGlobalConfig={skipAnimations:!1,useManualTiming:!1},isNotNull=Mn=>Mn!==null;function getFinalKeyframe(Mn,{repeat:Fn,repeatType:io="loop"},fo){const $o=Mn.filter(isNotNull),mo=Fn&&io!=="loop"&&Fn%2===1?0:$o.length-1;return!mo||fo===void 0?$o[mo]:fo}const noop=Mn=>Mn;function createRenderStep(Mn){let Fn=new Set,io=new Set,fo=!1,$o=!1;const mo=new WeakSet;let Ao={delta:0,timestamp:0,isProcessing:!1};function jo(Ho){mo.has(Ho)&&(Lo.schedule(Ho),Mn()),Ho(Ao)}const Lo={schedule:(Ho,zo=!1,Go=!1)=>{const Yo=Go&&fo?Fn:io;return zo&&mo.add(Ho),Yo.has(Ho)||Yo.add(Ho),Ho},cancel:Ho=>{io.delete(Ho),mo.delete(Ho)},process:Ho=>{if(Ao=Ho,fo){$o=!0;return}fo=!0,[Fn,io]=[io,Fn],io.clear(),Fn.forEach(jo),fo=!1,$o&&($o=!1,Lo.process(Ho))}};return Lo}const stepsOrder=["read","resolveKeyframes","update","preRender","render","postRender"],maxElapsed=40;function createRenderBatcher(Mn,Fn){let io=!1,fo=!0;const $o={delta:0,timestamp:0,isProcessing:!1},mo=()=>io=!0,Ao=stepsOrder.reduce((us,hs)=>(us[hs]=createRenderStep(mo),us),{}),{read:jo,resolveKeyframes:Lo,update:Ho,preRender:zo,render:Go,postRender:Vo}=Ao,Yo=()=>{const us=performance.now();io=!1,$o.delta=fo?1e3/60:Math.max(Math.min(us-$o.timestamp,maxElapsed),1),$o.timestamp=us,$o.isProcessing=!0,jo.process($o),Lo.process($o),Ho.process($o),zo.process($o),Go.process($o),Vo.process($o),$o.isProcessing=!1,io&&Fn&&(fo=!1,Mn(Yo))},Xo=()=>{io=!0,fo=!0,$o.isProcessing||Mn(Yo)};return{schedule:stepsOrder.reduce((us,hs)=>{const _l=Ao[hs];return us[hs]=(xl,Il=!1,Ol=!1)=>(io||Xo(),_l.schedule(xl,Il,Ol)),us},{}),cancel:us=>{for(let hs=0;hs<stepsOrder.length;hs++)Ao[stepsOrder[hs]].cancel(us)},state:$o,steps:Ao}}const{schedule:frame,cancel:cancelFrame,state:frameData,steps:frameSteps}=createRenderBatcher(typeof requestAnimationFrame<"u"?requestAnimationFrame:noop,!0),calcBezier=(Mn,Fn,io)=>(((1-3*io+3*Fn)*Mn+(3*io-6*Fn))*Mn+3*Fn)*Mn,subdivisionPrecision=1e-7,subdivisionMaxIterations=12;function binarySubdivide(Mn,Fn,io,fo,$o){let mo,Ao,jo=0;do Ao=Fn+(io-Fn)/2,mo=calcBezier(Ao,fo,$o)-Mn,mo>0?io=Ao:Fn=Ao;while(Math.abs(mo)>subdivisionPrecision&&++jo<subdivisionMaxIterations);return Ao}function cubicBezier(Mn,Fn,io,fo){if(Mn===Fn&&io===fo)return noop;const $o=mo=>binarySubdivide(mo,0,1,Mn,io);return mo=>mo===0||mo===1?mo:calcBezier($o(mo),Fn,fo)}const mirrorEasing=Mn=>Fn=>Fn<=.5?Mn(2*Fn)/2:(2-Mn(2*(1-Fn)))/2,reverseEasing=Mn=>Fn=>1-Mn(1-Fn),backOut=cubicBezier(.33,1.53,.69,.99),backIn=reverseEasing(backOut),backInOut=mirrorEasing(backIn),anticipate=Mn=>(Mn*=2)<1?.5*backIn(Mn):.5*(2-Math.pow(2,-10*(Mn-1))),circIn=Mn=>1-Math.sin(Math.acos(Mn)),circOut=reverseEasing(circIn),circInOut=mirrorEasing(circIn),isZeroValueString=Mn=>/^0[^.\s]+$/u.test(Mn);function isNone(Mn){return typeof Mn=="number"?Mn===0:Mn!==null?Mn==="none"||Mn==="0"||isZeroValueString(Mn):!0}let invariant=noop;const isNumericalString=Mn=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(Mn),checkStringStartsWith=Mn=>Fn=>typeof Fn=="string"&&Fn.startsWith(Mn),isCSSVariableName=checkStringStartsWith("--"),startsAsVariableToken=checkStringStartsWith("var(--"),isCSSVariableToken=Mn=>startsAsVariableToken(Mn)?singleCssVariableRegex.test(Mn.split("/*")[0].trim()):!1,singleCssVariableRegex=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,splitCSSVariableRegex=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function parseCSSVariable(Mn){const Fn=splitCSSVariableRegex.exec(Mn);if(!Fn)return[,];const[,io,fo,$o]=Fn;return[`--${io??fo}`,$o]}function getVariableValue(Mn,Fn,io=1){const[fo,$o]=parseCSSVariable(Mn);if(!fo)return;const mo=window.getComputedStyle(Fn).getPropertyValue(fo);if(mo){const Ao=mo.trim();return isNumericalString(Ao)?parseFloat(Ao):Ao}return isCSSVariableToken($o)?getVariableValue($o,Fn,io+1):$o}const clamp=(Mn,Fn,io)=>io>Fn?Fn:io<Mn?Mn:io,number={test:Mn=>typeof Mn=="number",parse:parseFloat,transform:Mn=>Mn},alpha={...number,transform:Mn=>clamp(0,1,Mn)},scale={...number,default:1},createUnitType=Mn=>({test:Fn=>typeof Fn=="string"&&Fn.endsWith(Mn)&&Fn.split(" ").length===1,parse:parseFloat,transform:Fn=>`${Fn}${Mn}`}),degrees=createUnitType("deg"),percent=createUnitType("%"),px=createUnitType("px"),vh=createUnitType("vh"),vw=createUnitType("vw"),progressPercentage={...percent,parse:Mn=>percent.parse(Mn)/100,transform:Mn=>percent.transform(Mn*100)},positionalKeys=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),isNumOrPxType=Mn=>Mn===number||Mn===px,getPosFromMatrix=(Mn,Fn)=>parseFloat(Mn.split(", ")[Fn]),getTranslateFromMatrix=(Mn,Fn)=>(io,{transform:fo})=>{if(fo==="none"||!fo)return 0;const $o=fo.match(/^matrix3d\((.+)\)$/u);if($o)return getPosFromMatrix($o[1],Fn);{const mo=fo.match(/^matrix\((.+)\)$/u);return mo?getPosFromMatrix(mo[1],Mn):0}},transformKeys=new Set(["x","y","z"]),nonTranslationalTransformKeys=transformPropOrder.filter(Mn=>!transformKeys.has(Mn));function removeNonTranslationalTransform(Mn){const Fn=[];return nonTranslationalTransformKeys.forEach(io=>{const fo=Mn.getValue(io);fo!==void 0&&(Fn.push([io,fo.get()]),fo.set(io.startsWith("scale")?1:0))}),Fn}const positionalValues={width:({x:Mn},{paddingLeft:Fn="0",paddingRight:io="0"})=>Mn.max-Mn.min-parseFloat(Fn)-parseFloat(io),height:({y:Mn},{paddingTop:Fn="0",paddingBottom:io="0"})=>Mn.max-Mn.min-parseFloat(Fn)-parseFloat(io),top:(Mn,{top:Fn})=>parseFloat(Fn),left:(Mn,{left:Fn})=>parseFloat(Fn),bottom:({y:Mn},{top:Fn})=>parseFloat(Fn)+(Mn.max-Mn.min),right:({x:Mn},{left:Fn})=>parseFloat(Fn)+(Mn.max-Mn.min),x:getTranslateFromMatrix(4,13),y:getTranslateFromMatrix(5,14)};positionalValues.translateX=positionalValues.x;positionalValues.translateY=positionalValues.y;const testValueType=Mn=>Fn=>Fn.test(Mn),auto={test:Mn=>Mn==="auto",parse:Mn=>Mn},dimensionValueTypes=[number,px,percent,degrees,vw,vh,auto],findDimensionValueType=Mn=>dimensionValueTypes.find(testValueType(Mn)),toResolve=new Set;let isScheduled=!1,anyNeedsMeasurement=!1;function measureAllKeyframes(){if(anyNeedsMeasurement){const Mn=Array.from(toResolve).filter(fo=>fo.needsMeasurement),Fn=new Set(Mn.map(fo=>fo.element)),io=new Map;Fn.forEach(fo=>{const $o=removeNonTranslationalTransform(fo);$o.length&&(io.set(fo,$o),fo.render())}),Mn.forEach(fo=>fo.measureInitialState()),Fn.forEach(fo=>{fo.render();const $o=io.get(fo);$o&&$o.forEach(([mo,Ao])=>{var jo;(jo=fo.getValue(mo))===null||jo===void 0||jo.set(Ao)})}),Mn.forEach(fo=>fo.measureEndState()),Mn.forEach(fo=>{fo.suspendedScrollY!==void 0&&window.scrollTo(0,fo.suspendedScrollY)})}anyNeedsMeasurement=!1,isScheduled=!1,toResolve.forEach(Mn=>Mn.complete()),toResolve.clear()}function readAllKeyframes(){toResolve.forEach(Mn=>{Mn.readKeyframes(),Mn.needsMeasurement&&(anyNeedsMeasurement=!0)})}function flushKeyframeResolvers(){readAllKeyframes(),measureAllKeyframes()}class KeyframeResolver{constructor(Fn,io,fo,$o,mo,Ao=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...Fn],this.onComplete=io,this.name=fo,this.motionValue=$o,this.element=mo,this.isAsync=Ao}scheduleResolve(){this.isScheduled=!0,this.isAsync?(toResolve.add(this),isScheduled||(isScheduled=!0,frame.read(readAllKeyframes),frame.resolveKeyframes(measureAllKeyframes))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:Fn,name:io,element:fo,motionValue:$o}=this;for(let mo=0;mo<Fn.length;mo++)if(Fn[mo]===null)if(mo===0){const Ao=$o==null?void 0:$o.get(),jo=Fn[Fn.length-1];if(Ao!==void 0)Fn[0]=Ao;else if(fo&&io){const Lo=fo.readValue(io,jo);Lo!=null&&(Fn[0]=Lo)}Fn[0]===void 0&&(Fn[0]=jo),$o&&Ao===void 0&&$o.set(Fn[0])}else Fn[mo]=Fn[mo-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),toResolve.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,toResolve.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const sanitize=Mn=>Math.round(Mn*1e5)/1e5,floatRegex=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function isNullish(Mn){return Mn==null}const singleColorRegex=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,isColorString=(Mn,Fn)=>io=>!!(typeof io=="string"&&singleColorRegex.test(io)&&io.startsWith(Mn)||Fn&&!isNullish(io)&&Object.prototype.hasOwnProperty.call(io,Fn)),splitColor=(Mn,Fn,io)=>fo=>{if(typeof fo!="string")return fo;const[$o,mo,Ao,jo]=fo.match(floatRegex);return{[Mn]:parseFloat($o),[Fn]:parseFloat(mo),[io]:parseFloat(Ao),alpha:jo!==void 0?parseFloat(jo):1}},clampRgbUnit=Mn=>clamp(0,255,Mn),rgbUnit={...number,transform:Mn=>Math.round(clampRgbUnit(Mn))},rgba={test:isColorString("rgb","red"),parse:splitColor("red","green","blue"),transform:({red:Mn,green:Fn,blue:io,alpha:fo=1})=>"rgba("+rgbUnit.transform(Mn)+", "+rgbUnit.transform(Fn)+", "+rgbUnit.transform(io)+", "+sanitize(alpha.transform(fo))+")"};function parseHex(Mn){let Fn="",io="",fo="",$o="";return Mn.length>5?(Fn=Mn.substring(1,3),io=Mn.substring(3,5),fo=Mn.substring(5,7),$o=Mn.substring(7,9)):(Fn=Mn.substring(1,2),io=Mn.substring(2,3),fo=Mn.substring(3,4),$o=Mn.substring(4,5),Fn+=Fn,io+=io,fo+=fo,$o+=$o),{red:parseInt(Fn,16),green:parseInt(io,16),blue:parseInt(fo,16),alpha:$o?parseInt($o,16)/255:1}}const hex={test:isColorString("#"),parse:parseHex,transform:rgba.transform},hsla={test:isColorString("hsl","hue"),parse:splitColor("hue","saturation","lightness"),transform:({hue:Mn,saturation:Fn,lightness:io,alpha:fo=1})=>"hsla("+Math.round(Mn)+", "+percent.transform(sanitize(Fn))+", "+percent.transform(sanitize(io))+", "+sanitize(alpha.transform(fo))+")"},color={test:Mn=>rgba.test(Mn)||hex.test(Mn)||hsla.test(Mn),parse:Mn=>rgba.test(Mn)?rgba.parse(Mn):hsla.test(Mn)?hsla.parse(Mn):hex.parse(Mn),transform:Mn=>typeof Mn=="string"?Mn:Mn.hasOwnProperty("red")?rgba.transform(Mn):hsla.transform(Mn)},colorRegex=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function test(Mn){var Fn,io;return isNaN(Mn)&&typeof Mn=="string"&&(((Fn=Mn.match(floatRegex))===null||Fn===void 0?void 0:Fn.length)||0)+(((io=Mn.match(colorRegex))===null||io===void 0?void 0:io.length)||0)>0}const NUMBER_TOKEN="number",COLOR_TOKEN="color",VAR_TOKEN="var",VAR_FUNCTION_TOKEN="var(",SPLIT_TOKEN="${}",complexRegex=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function analyseComplexValue(Mn){const Fn=Mn.toString(),io=[],fo={color:[],number:[],var:[]},$o=[];let mo=0;const jo=Fn.replace(complexRegex,Lo=>(color.test(Lo)?(fo.color.push(mo),$o.push(COLOR_TOKEN),io.push(color.parse(Lo))):Lo.startsWith(VAR_FUNCTION_TOKEN)?(fo.var.push(mo),$o.push(VAR_TOKEN),io.push(Lo)):(fo.number.push(mo),$o.push(NUMBER_TOKEN),io.push(parseFloat(Lo))),++mo,SPLIT_TOKEN)).split(SPLIT_TOKEN);return{values:io,split:jo,indexes:fo,types:$o}}function parseComplexValue(Mn){return analyseComplexValue(Mn).values}function createTransformer(Mn){const{split:Fn,types:io}=analyseComplexValue(Mn),fo=Fn.length;return $o=>{let mo="";for(let Ao=0;Ao<fo;Ao++)if(mo+=Fn[Ao],$o[Ao]!==void 0){const jo=io[Ao];jo===NUMBER_TOKEN?mo+=sanitize($o[Ao]):jo===COLOR_TOKEN?mo+=color.transform($o[Ao]):mo+=$o[Ao]}return mo}}const convertNumbersToZero=Mn=>typeof Mn=="number"?0:Mn;function getAnimatableNone$1(Mn){const Fn=parseComplexValue(Mn);return createTransformer(Mn)(Fn.map(convertNumbersToZero))}const complex={test,parse:parseComplexValue,createTransformer,getAnimatableNone:getAnimatableNone$1},maxDefaults=new Set(["brightness","contrast","saturate","opacity"]);function applyDefaultFilter(Mn){const[Fn,io]=Mn.slice(0,-1).split("(");if(Fn==="drop-shadow")return Mn;const[fo]=io.match(floatRegex)||[];if(!fo)return Mn;const $o=io.replace(fo,"");let mo=maxDefaults.has(Fn)?1:0;return fo!==io&&(mo*=100),Fn+"("+mo+$o+")"}const functionRegex=/\b([a-z-]*)\(.*?\)/gu,filter={...complex,getAnimatableNone:Mn=>{const Fn=Mn.match(functionRegex);return Fn?Fn.map(applyDefaultFilter).join(" "):Mn}},browserNumberValueTypes={borderWidth:px,borderTopWidth:px,borderRightWidth:px,borderBottomWidth:px,borderLeftWidth:px,borderRadius:px,radius:px,borderTopLeftRadius:px,borderTopRightRadius:px,borderBottomRightRadius:px,borderBottomLeftRadius:px,width:px,maxWidth:px,height:px,maxHeight:px,top:px,right:px,bottom:px,left:px,padding:px,paddingTop:px,paddingRight:px,paddingBottom:px,paddingLeft:px,margin:px,marginTop:px,marginRight:px,marginBottom:px,marginLeft:px,backgroundPositionX:px,backgroundPositionY:px},transformValueTypes={rotate:degrees,rotateX:degrees,rotateY:degrees,rotateZ:degrees,scale,scaleX:scale,scaleY:scale,scaleZ:scale,skew:degrees,skewX:degrees,skewY:degrees,distance:px,translateX:px,translateY:px,translateZ:px,x:px,y:px,z:px,perspective:px,transformPerspective:px,opacity:alpha,originX:progressPercentage,originY:progressPercentage,originZ:px},int={...number,transform:Math.round},numberValueTypes={...browserNumberValueTypes,...transformValueTypes,zIndex:int,size:px,fillOpacity:alpha,strokeOpacity:alpha,numOctaves:int},defaultValueTypes={...numberValueTypes,color,backgroundColor:color,outlineColor:color,fill:color,stroke:color,borderColor:color,borderTopColor:color,borderRightColor:color,borderBottomColor:color,borderLeftColor:color,filter,WebkitFilter:filter},getDefaultValueType=Mn=>defaultValueTypes[Mn];function getAnimatableNone(Mn,Fn){let io=getDefaultValueType(Mn);return io!==filter&&(io=complex),io.getAnimatableNone?io.getAnimatableNone(Fn):void 0}const invalidTemplates=new Set(["auto","none","0"]);function makeNoneKeyframesAnimatable(Mn,Fn,io){let fo=0,$o;for(;fo<Mn.length&&!$o;){const mo=Mn[fo];typeof mo=="string"&&!invalidTemplates.has(mo)&&analyseComplexValue(mo).values.length&&($o=Mn[fo]),fo++}if($o&&io)for(const mo of Fn)Mn[mo]=getAnimatableNone(io,$o)}class DOMKeyframesResolver extends KeyframeResolver{constructor(Fn,io,fo,$o,mo){super(Fn,io,fo,$o,mo,!0)}readKeyframes(){const{unresolvedKeyframes:Fn,element:io,name:fo}=this;if(!io||!io.current)return;super.readKeyframes();for(let Lo=0;Lo<Fn.length;Lo++){let Ho=Fn[Lo];if(typeof Ho=="string"&&(Ho=Ho.trim(),isCSSVariableToken(Ho))){const zo=getVariableValue(Ho,io.current);zo!==void 0&&(Fn[Lo]=zo),Lo===Fn.length-1&&(this.finalKeyframe=Ho)}}if(this.resolveNoneKeyframes(),!positionalKeys.has(fo)||Fn.length!==2)return;const[$o,mo]=Fn,Ao=findDimensionValueType($o),jo=findDimensionValueType(mo);if(Ao!==jo)if(isNumOrPxType(Ao)&&isNumOrPxType(jo))for(let Lo=0;Lo<Fn.length;Lo++){const Ho=Fn[Lo];typeof Ho=="string"&&(Fn[Lo]=parseFloat(Ho))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:Fn,name:io}=this,fo=[];for(let $o=0;$o<Fn.length;$o++)isNone(Fn[$o])&&fo.push($o);fo.length&&makeNoneKeyframesAnimatable(Fn,fo,io)}measureInitialState(){const{element:Fn,unresolvedKeyframes:io,name:fo}=this;if(!Fn||!Fn.current)return;fo==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=positionalValues[fo](Fn.measureViewportBox(),window.getComputedStyle(Fn.current)),io[0]=this.measuredOrigin;const $o=io[io.length-1];$o!==void 0&&Fn.getValue(fo,$o).jump($o,!1)}measureEndState(){var Fn;const{element:io,name:fo,unresolvedKeyframes:$o}=this;if(!io||!io.current)return;const mo=io.getValue(fo);mo&&mo.jump(this.measuredOrigin,!1);const Ao=$o.length-1,jo=$o[Ao];$o[Ao]=positionalValues[fo](io.measureViewportBox(),window.getComputedStyle(io.current)),jo!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=jo),!((Fn=this.removedTransforms)===null||Fn===void 0)&&Fn.length&&this.removedTransforms.forEach(([Lo,Ho])=>{io.getValue(Lo).set(Ho)}),this.resolveNoneKeyframes()}}function isGenerator(Mn){return typeof Mn=="function"}let now;function clearTime(){now=void 0}const time={now:()=>(now===void 0&&time.set(frameData.isProcessing||MotionGlobalConfig.useManualTiming?frameData.timestamp:performance.now()),now),set:Mn=>{now=Mn,queueMicrotask(clearTime)}},isAnimatable=(Mn,Fn)=>Fn==="zIndex"?!1:!!(typeof Mn=="number"||Array.isArray(Mn)||typeof Mn=="string"&&(complex.test(Mn)||Mn==="0")&&!Mn.startsWith("url("));function hasKeyframesChanged(Mn){const Fn=Mn[0];if(Mn.length===1)return!0;for(let io=0;io<Mn.length;io++)if(Mn[io]!==Fn)return!0}function canAnimate(Mn,Fn,io,fo){const $o=Mn[0];if($o===null)return!1;if(Fn==="display"||Fn==="visibility")return!0;const mo=Mn[Mn.length-1],Ao=isAnimatable($o,Fn),jo=isAnimatable(mo,Fn);return!Ao||!jo?!1:hasKeyframesChanged(Mn)||(io==="spring"||isGenerator(io))&&fo}const MAX_RESOLVE_DELAY=40;class BaseAnimation{constructor({autoplay:Fn=!0,delay:io=0,type:fo="keyframes",repeat:$o=0,repeatDelay:mo=0,repeatType:Ao="loop",...jo}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=time.now(),this.options={autoplay:Fn,delay:io,type:fo,repeat:$o,repeatDelay:mo,repeatType:Ao,...jo},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>MAX_RESOLVE_DELAY?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&flushKeyframeResolvers(),this._resolved}onKeyframesResolved(Fn,io){this.resolvedAt=time.now(),this.hasAttemptedResolve=!0;const{name:fo,type:$o,velocity:mo,delay:Ao,onComplete:jo,onUpdate:Lo,isGenerator:Ho}=this.options;if(!Ho&&!canAnimate(Fn,fo,$o,mo))if(Ao)this.options.duration=0;else{Lo==null||Lo(getFinalKeyframe(Fn,this.options,io)),jo==null||jo(),this.resolveFinishedPromise();return}const zo=this.initPlayback(Fn,io);zo!==!1&&(this._resolved={keyframes:Fn,finalKeyframe:io,...zo},this.onPostResolved())}onPostResolved(){}then(Fn,io){return this.currentFinishedPromise.then(Fn,io)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(Fn=>{this.resolveFinishedPromise=Fn})}}function velocityPerSecond(Mn,Fn){return Fn?Mn*(1e3/Fn):0}const velocitySampleDuration=5;function calcGeneratorVelocity(Mn,Fn,io){const fo=Math.max(Fn-velocitySampleDuration,0);return velocityPerSecond(io-Mn(fo),Fn-fo)}const safeMin=.001,minDuration=.01,maxDuration$1=10,minDamping=.05,maxDamping=1;function findSpring({duration:Mn=800,bounce:Fn=.25,velocity:io=0,mass:fo=1}){let $o,mo,Ao=1-Fn;Ao=clamp(minDamping,maxDamping,Ao),Mn=clamp(minDuration,maxDuration$1,millisecondsToSeconds(Mn)),Ao<1?($o=Ho=>{const zo=Ho*Ao,Go=zo*Mn,Vo=zo-io,Yo=calcAngularFreq(Ho,Ao),Xo=Math.exp(-Go);return safeMin-Vo/Yo*Xo},mo=Ho=>{const Go=Ho*Ao*Mn,Vo=Go*io+io,Yo=Math.pow(Ao,2)*Math.pow(Ho,2)*Mn,Xo=Math.exp(-Go),is=calcAngularFreq(Math.pow(Ho,2),Ao);return(-$o(Ho)+safeMin>0?-1:1)*((Vo-Yo)*Xo)/is}):($o=Ho=>{const zo=Math.exp(-Ho*Mn),Go=(Ho-io)*Mn+1;return-safeMin+zo*Go},mo=Ho=>{const zo=Math.exp(-Ho*Mn),Go=(io-Ho)*(Mn*Mn);return zo*Go});const jo=5/Mn,Lo=approximateRoot($o,mo,jo);if(Mn=secondsToMilliseconds(Mn),isNaN(Lo))return{stiffness:100,damping:10,duration:Mn};{const Ho=Math.pow(Lo,2)*fo;return{stiffness:Ho,damping:Ao*2*Math.sqrt(fo*Ho),duration:Mn}}}const rootIterations=12;function approximateRoot(Mn,Fn,io){let fo=io;for(let $o=1;$o<rootIterations;$o++)fo=fo-Mn(fo)/Fn(fo);return fo}function calcAngularFreq(Mn,Fn){return Mn*Math.sqrt(1-Fn*Fn)}const durationKeys=["duration","bounce"],physicsKeys=["stiffness","damping","mass"];function isSpringType(Mn,Fn){return Fn.some(io=>Mn[io]!==void 0)}function getSpringOptions(Mn){let Fn={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...Mn};if(!isSpringType(Mn,physicsKeys)&&isSpringType(Mn,durationKeys)){const io=findSpring(Mn);Fn={...Fn,...io,mass:1},Fn.isResolvedFromDuration=!0}return Fn}function spring({keyframes:Mn,restDelta:Fn,restSpeed:io,...fo}){const $o=Mn[0],mo=Mn[Mn.length-1],Ao={done:!1,value:$o},{stiffness:jo,damping:Lo,mass:Ho,duration:zo,velocity:Go,isResolvedFromDuration:Vo}=getSpringOptions({...fo,velocity:-millisecondsToSeconds(fo.velocity||0)}),Yo=Go||0,Xo=Lo/(2*Math.sqrt(jo*Ho)),is=mo-$o,yl=millisecondsToSeconds(Math.sqrt(jo/Ho)),us=Math.abs(is)<5;io||(io=us?.01:2),Fn||(Fn=us?.005:.5);let hs;if(Xo<1){const _l=calcAngularFreq(yl,Xo);hs=xl=>{const Il=Math.exp(-Xo*yl*xl);return mo-Il*((Yo+Xo*yl*is)/_l*Math.sin(_l*xl)+is*Math.cos(_l*xl))}}else if(Xo===1)hs=_l=>mo-Math.exp(-yl*_l)*(is+(Yo+yl*is)*_l);else{const _l=yl*Math.sqrt(Xo*Xo-1);hs=xl=>{const Il=Math.exp(-Xo*yl*xl),Ol=Math.min(_l*xl,300);return mo-Il*((Yo+Xo*yl*is)*Math.sinh(Ol)+_l*is*Math.cosh(Ol))/_l}}return{calculatedDuration:Vo&&zo||null,next:_l=>{const xl=hs(_l);if(Vo)Ao.done=_l>=zo;else{let Il=0;Xo<1&&(Il=_l===0?secondsToMilliseconds(Yo):calcGeneratorVelocity(hs,_l,xl));const Ol=Math.abs(Il)<=io,Tl=Math.abs(mo-xl)<=Fn;Ao.done=Ol&&Tl}return Ao.value=Ao.done?mo:xl,Ao}}}function inertia({keyframes:Mn,velocity:Fn=0,power:io=.8,timeConstant:fo=325,bounceDamping:$o=10,bounceStiffness:mo=500,modifyTarget:Ao,min:jo,max:Lo,restDelta:Ho=.5,restSpeed:zo}){const Go=Mn[0],Vo={done:!1,value:Go},Yo=Cl=>jo!==void 0&&Cl<jo||Lo!==void 0&&Cl>Lo,Xo=Cl=>jo===void 0?Lo:Lo===void 0||Math.abs(jo-Cl)<Math.abs(Lo-Cl)?jo:Lo;let is=io*Fn;const yl=Go+is,us=Ao===void 0?yl:Ao(yl);us!==yl&&(is=us-Go);const hs=Cl=>-is*Math.exp(-Cl/fo),_l=Cl=>us+hs(Cl),xl=Cl=>{const Nl=hs(Cl),Wl=_l(Cl);Vo.done=Math.abs(Nl)<=Ho,Vo.value=Vo.done?us:Wl};let Il,Ol;const Tl=Cl=>{Yo(Vo.value)&&(Il=Cl,Ol=spring({keyframes:[Vo.value,Xo(Vo.value)],velocity:calcGeneratorVelocity(_l,Cl,Vo.value),damping:$o,stiffness:mo,restDelta:Ho,restSpeed:zo}))};return Tl(0),{calculatedDuration:null,next:Cl=>{let Nl=!1;return!Ol&&Il===void 0&&(Nl=!0,xl(Cl),Tl(Cl)),Il!==void 0&&Cl>=Il?Ol.next(Cl-Il):(!Nl&&xl(Cl),Vo)}}}const easeIn=cubicBezier(.42,0,1,1),easeOut=cubicBezier(0,0,.58,1),easeInOut=cubicBezier(.42,0,.58,1),isEasingArray=Mn=>Array.isArray(Mn)&&typeof Mn[0]!="number",isBezierDefinition=Mn=>Array.isArray(Mn)&&typeof Mn[0]=="number",easingLookup={linear:noop,easeIn,easeInOut,easeOut,circIn,circInOut,circOut,backIn,backInOut,backOut,anticipate},easingDefinitionToFunction=Mn=>{if(isBezierDefinition(Mn)){invariant(Mn.length===4);const[Fn,io,fo,$o]=Mn;return cubicBezier(Fn,io,fo,$o)}else if(typeof Mn=="string")return invariant(easingLookup[Mn]!==void 0),easingLookup[Mn];return Mn},combineFunctions=(Mn,Fn)=>io=>Fn(Mn(io)),pipe=(...Mn)=>Mn.reduce(combineFunctions),progress=(Mn,Fn,io)=>{const fo=Fn-Mn;return fo===0?1:(io-Mn)/fo},mixNumber$1=(Mn,Fn,io)=>Mn+(Fn-Mn)*io;function hueToRgb(Mn,Fn,io){return io<0&&(io+=1),io>1&&(io-=1),io<1/6?Mn+(Fn-Mn)*6*io:io<1/2?Fn:io<2/3?Mn+(Fn-Mn)*(2/3-io)*6:Mn}function hslaToRgba({hue:Mn,saturation:Fn,lightness:io,alpha:fo}){Mn/=360,Fn/=100,io/=100;let $o=0,mo=0,Ao=0;if(!Fn)$o=mo=Ao=io;else{const jo=io<.5?io*(1+Fn):io+Fn-io*Fn,Lo=2*io-jo;$o=hueToRgb(Lo,jo,Mn+1/3),mo=hueToRgb(Lo,jo,Mn),Ao=hueToRgb(Lo,jo,Mn-1/3)}return{red:Math.round($o*255),green:Math.round(mo*255),blue:Math.round(Ao*255),alpha:fo}}function mixImmediate(Mn,Fn){return io=>io>0?Fn:Mn}const mixLinearColor=(Mn,Fn,io)=>{const fo=Mn*Mn,$o=io*(Fn*Fn-fo)+fo;return $o<0?0:Math.sqrt($o)},colorTypes=[hex,rgba,hsla],getColorType=Mn=>colorTypes.find(Fn=>Fn.test(Mn));function asRGBA(Mn){const Fn=getColorType(Mn);if(!Fn)return!1;let io=Fn.parse(Mn);return Fn===hsla&&(io=hslaToRgba(io)),io}const mixColor=(Mn,Fn)=>{const io=asRGBA(Mn),fo=asRGBA(Fn);if(!io||!fo)return mixImmediate(Mn,Fn);const $o={...io};return mo=>($o.red=mixLinearColor(io.red,fo.red,mo),$o.green=mixLinearColor(io.green,fo.green,mo),$o.blue=mixLinearColor(io.blue,fo.blue,mo),$o.alpha=mixNumber$1(io.alpha,fo.alpha,mo),rgba.transform($o))},invisibleValues=new Set(["none","hidden"]);function mixVisibility(Mn,Fn){return invisibleValues.has(Mn)?io=>io<=0?Mn:Fn:io=>io>=1?Fn:Mn}function mixNumber(Mn,Fn){return io=>mixNumber$1(Mn,Fn,io)}function getMixer(Mn){return typeof Mn=="number"?mixNumber:typeof Mn=="string"?isCSSVariableToken(Mn)?mixImmediate:color.test(Mn)?mixColor:mixComplex:Array.isArray(Mn)?mixArray:typeof Mn=="object"?color.test(Mn)?mixColor:mixObject:mixImmediate}function mixArray(Mn,Fn){const io=[...Mn],fo=io.length,$o=Mn.map((mo,Ao)=>getMixer(mo)(mo,Fn[Ao]));return mo=>{for(let Ao=0;Ao<fo;Ao++)io[Ao]=$o[Ao](mo);return io}}function mixObject(Mn,Fn){const io={...Mn,...Fn},fo={};for(const $o in io)Mn[$o]!==void 0&&Fn[$o]!==void 0&&(fo[$o]=getMixer(Mn[$o])(Mn[$o],Fn[$o]));return $o=>{for(const mo in fo)io[mo]=fo[mo]($o);return io}}function matchOrder(Mn,Fn){var io;const fo=[],$o={color:0,var:0,number:0};for(let mo=0;mo<Fn.values.length;mo++){const Ao=Fn.types[mo],jo=Mn.indexes[Ao][$o[Ao]],Lo=(io=Mn.values[jo])!==null&&io!==void 0?io:0;fo[mo]=Lo,$o[Ao]++}return fo}const mixComplex=(Mn,Fn)=>{const io=complex.createTransformer(Fn),fo=analyseComplexValue(Mn),$o=analyseComplexValue(Fn);return fo.indexes.var.length===$o.indexes.var.length&&fo.indexes.color.length===$o.indexes.color.length&&fo.indexes.number.length>=$o.indexes.number.length?invisibleValues.has(Mn)&&!$o.values.length||invisibleValues.has(Fn)&&!fo.values.length?mixVisibility(Mn,Fn):pipe(mixArray(matchOrder(fo,$o),$o.values),io):mixImmediate(Mn,Fn)};function mix(Mn,Fn,io){return typeof Mn=="number"&&typeof Fn=="number"&&typeof io=="number"?mixNumber$1(Mn,Fn,io):getMixer(Mn)(Mn,Fn)}function createMixers(Mn,Fn,io){const fo=[],$o=io||mix,mo=Mn.length-1;for(let Ao=0;Ao<mo;Ao++){let jo=$o(Mn[Ao],Mn[Ao+1]);if(Fn){const Lo=Array.isArray(Fn)?Fn[Ao]||noop:Fn;jo=pipe(Lo,jo)}fo.push(jo)}return fo}function interpolate(Mn,Fn,{clamp:io=!0,ease:fo,mixer:$o}={}){const mo=Mn.length;if(invariant(mo===Fn.length),mo===1)return()=>Fn[0];if(mo===2&&Mn[0]===Mn[1])return()=>Fn[1];Mn[0]>Mn[mo-1]&&(Mn=[...Mn].reverse(),Fn=[...Fn].reverse());const Ao=createMixers(Fn,fo,$o),jo=Ao.length,Lo=Ho=>{let zo=0;if(jo>1)for(;zo<Mn.length-2&&!(Ho<Mn[zo+1]);zo++);const Go=progress(Mn[zo],Mn[zo+1],Ho);return Ao[zo](Go)};return io?Ho=>Lo(clamp(Mn[0],Mn[mo-1],Ho)):Lo}function fillOffset(Mn,Fn){const io=Mn[Mn.length-1];for(let fo=1;fo<=Fn;fo++){const $o=progress(0,Fn,fo);Mn.push(mixNumber$1(io,1,$o))}}function defaultOffset(Mn){const Fn=[0];return fillOffset(Fn,Mn.length-1),Fn}function convertOffsetToTimes(Mn,Fn){return Mn.map(io=>io*Fn)}function defaultEasing(Mn,Fn){return Mn.map(()=>Fn||easeInOut).splice(0,Mn.length-1)}function keyframes({duration:Mn=300,keyframes:Fn,times:io,ease:fo="easeInOut"}){const $o=isEasingArray(fo)?fo.map(easingDefinitionToFunction):easingDefinitionToFunction(fo),mo={done:!1,value:Fn[0]},Ao=convertOffsetToTimes(io&&io.length===Fn.length?io:defaultOffset(Fn),Mn),jo=interpolate(Ao,Fn,{ease:Array.isArray($o)?$o:defaultEasing(Fn,$o)});return{calculatedDuration:Mn,next:Lo=>(mo.value=jo(Lo),mo.done=Lo>=Mn,mo)}}const maxGeneratorDuration=2e4;function calcGeneratorDuration(Mn){let Fn=0;const io=50;let fo=Mn.next(Fn);for(;!fo.done&&Fn<maxGeneratorDuration;)Fn+=io,fo=Mn.next(Fn);return Fn>=maxGeneratorDuration?1/0:Fn}const frameloopDriver=Mn=>{const Fn=({timestamp:io})=>Mn(io);return{start:()=>frame.update(Fn,!0),stop:()=>cancelFrame(Fn),now:()=>frameData.isProcessing?frameData.timestamp:time.now()}},generators={decay:inertia,inertia,tween:keyframes,keyframes,spring},percentToProgress=Mn=>Mn/100;class MainThreadAnimation extends BaseAnimation{constructor(Fn){super(Fn),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:Lo}=this.options;Lo&&Lo()};const{name:io,motionValue:fo,element:$o,keyframes:mo}=this.options,Ao=($o==null?void 0:$o.KeyframeResolver)||KeyframeResolver,jo=(Lo,Ho)=>this.onKeyframesResolved(Lo,Ho);this.resolver=new Ao(mo,jo,io,fo,$o),this.resolver.scheduleResolve()}initPlayback(Fn){const{type:io="keyframes",repeat:fo=0,repeatDelay:$o=0,repeatType:mo,velocity:Ao=0}=this.options,jo=isGenerator(io)?io:generators[io]||keyframes;let Lo,Ho;jo!==keyframes&&typeof Fn[0]!="number"&&(Lo=pipe(percentToProgress,mix(Fn[0],Fn[1])),Fn=[0,100]);const zo=jo({...this.options,keyframes:Fn});mo==="mirror"&&(Ho=jo({...this.options,keyframes:[...Fn].reverse(),velocity:-Ao})),zo.calculatedDuration===null&&(zo.calculatedDuration=calcGeneratorDuration(zo));const{calculatedDuration:Go}=zo,Vo=Go+$o,Yo=Vo*(fo+1)-$o;return{generator:zo,mirroredGenerator:Ho,mapPercentToKeyframes:Lo,calculatedDuration:Go,resolvedDuration:Vo,totalDuration:Yo}}onPostResolved(){const{autoplay:Fn=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!Fn?this.pause():this.state=this.pendingPlayState}tick(Fn,io=!1){const{resolved:fo}=this;if(!fo){const{keyframes:Cl}=this.options;return{done:!0,value:Cl[Cl.length-1]}}const{finalKeyframe:$o,generator:mo,mirroredGenerator:Ao,mapPercentToKeyframes:jo,keyframes:Lo,calculatedDuration:Ho,totalDuration:zo,resolvedDuration:Go}=fo;if(this.startTime===null)return mo.next(0);const{delay:Vo,repeat:Yo,repeatType:Xo,repeatDelay:is,onUpdate:yl}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,Fn):this.speed<0&&(this.startTime=Math.min(Fn-zo/this.speed,this.startTime)),io?this.currentTime=Fn:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(Fn-this.startTime)*this.speed;const us=this.currentTime-Vo*(this.speed>=0?1:-1),hs=this.speed>=0?us<0:us>zo;this.currentTime=Math.max(us,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=zo);let _l=this.currentTime,xl=mo;if(Yo){const Cl=Math.min(this.currentTime,zo)/Go;let Nl=Math.floor(Cl),Wl=Cl%1;!Wl&&Cl>=1&&(Wl=1),Wl===1&&Nl--,Nl=Math.min(Nl,Yo+1),!!(Nl%2)&&(Xo==="reverse"?(Wl=1-Wl,is&&(Wl-=is/Go)):Xo==="mirror"&&(xl=Ao)),_l=clamp(0,1,Wl)*Go}const Il=hs?{done:!1,value:Lo[0]}:xl.next(_l);jo&&(Il.value=jo(Il.value));let{done:Ol}=Il;!hs&&Ho!==null&&(Ol=this.speed>=0?this.currentTime>=zo:this.currentTime<=0);const Tl=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&Ol);return Tl&&$o!==void 0&&(Il.value=getFinalKeyframe(Lo,this.options,$o)),yl&&yl(Il.value),Tl&&this.finish(),Il}get duration(){const{resolved:Fn}=this;return Fn?millisecondsToSeconds(Fn.calculatedDuration):0}get time(){return millisecondsToSeconds(this.currentTime)}set time(Fn){Fn=secondsToMilliseconds(Fn),this.currentTime=Fn,this.holdTime!==null||this.speed===0?this.holdTime=Fn:this.driver&&(this.startTime=this.driver.now()-Fn/this.speed)}get speed(){return this.playbackSpeed}set speed(Fn){const io=this.playbackSpeed!==Fn;this.playbackSpeed=Fn,io&&(this.time=millisecondsToSeconds(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:Fn=frameloopDriver,onPlay:io,startTime:fo}=this.options;this.driver||(this.driver=Fn(mo=>this.tick(mo))),io&&io();const $o=this.driver.now();this.holdTime!==null?this.startTime=$o-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=$o):this.startTime=fo??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var Fn;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(Fn=this.currentTime)!==null&&Fn!==void 0?Fn:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:Fn}=this.options;Fn&&Fn()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(Fn){return this.startTime=0,this.tick(Fn,!0)}}const acceleratedValues=new Set(["opacity","clipPath","filter","transform"]),resolution=10,generateLinearEasing=(Mn,Fn)=>{let io="";const fo=Math.max(Math.round(Fn/resolution),2);for(let $o=0;$o<fo;$o++)io+=Mn(progress(0,fo-1,$o))+", ";return`linear(${io.substring(0,io.length-2)})`};function memo(Mn){let Fn;return()=>(Fn===void 0&&(Fn=Mn()),Fn)}const supportsFlags={linearEasing:void 0};function memoSupports(Mn,Fn){const io=memo(Mn);return()=>{var fo;return(fo=supportsFlags[Fn])!==null&&fo!==void 0?fo:io()}}const supportsLinearEasing=memoSupports(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing");function isWaapiSupportedEasing(Mn){return!!(typeof Mn=="function"&&supportsLinearEasing()||!Mn||typeof Mn=="string"&&(Mn in supportedWaapiEasing||supportsLinearEasing())||isBezierDefinition(Mn)||Array.isArray(Mn)&&Mn.every(isWaapiSupportedEasing))}const cubicBezierAsString=([Mn,Fn,io,fo])=>`cubic-bezier(${Mn}, ${Fn}, ${io}, ${fo})`,supportedWaapiEasing={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:cubicBezierAsString([0,.65,.55,1]),circOut:cubicBezierAsString([.55,0,1,.45]),backIn:cubicBezierAsString([.31,.01,.66,-.59]),backOut:cubicBezierAsString([.33,1.53,.69,.99])};function mapEasingToNativeEasing(Mn,Fn){if(Mn)return typeof Mn=="function"&&supportsLinearEasing()?generateLinearEasing(Mn,Fn):isBezierDefinition(Mn)?cubicBezierAsString(Mn):Array.isArray(Mn)?Mn.map(io=>mapEasingToNativeEasing(io,Fn)||supportedWaapiEasing.easeOut):supportedWaapiEasing[Mn]}function startWaapiAnimation(Mn,Fn,io,{delay:fo=0,duration:$o=300,repeat:mo=0,repeatType:Ao="loop",ease:jo,times:Lo}={}){const Ho={[Fn]:io};Lo&&(Ho.offset=Lo);const zo=mapEasingToNativeEasing(jo,$o);return Array.isArray(zo)&&(Ho.easing=zo),Mn.animate(Ho,{delay:fo,duration:$o,easing:Array.isArray(zo)?"linear":zo,fill:"both",iterations:mo+1,direction:Ao==="reverse"?"alternate":"normal"})}function attachTimeline(Mn,Fn){Mn.timeline=Fn,Mn.onfinish=null}const supportsWaapi=memo(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),sampleDelta=10,maxDuration=2e4;function requiresPregeneratedKeyframes(Mn){return isGenerator(Mn.type)||Mn.type==="spring"||!isWaapiSupportedEasing(Mn.ease)}function pregenerateKeyframes(Mn,Fn){const io=new MainThreadAnimation({...Fn,keyframes:Mn,repeat:0,delay:0,isGenerator:!0});let fo={done:!1,value:Mn[0]};const $o=[];let mo=0;for(;!fo.done&&mo<maxDuration;)fo=io.sample(mo),$o.push(fo.value),mo+=sampleDelta;return{times:void 0,keyframes:$o,duration:mo-sampleDelta,ease:"linear"}}const unsupportedEasingFunctions={anticipate,backInOut,circInOut};function isUnsupportedEase(Mn){return Mn in unsupportedEasingFunctions}class AcceleratedAnimation extends BaseAnimation{constructor(Fn){super(Fn);const{name:io,motionValue:fo,element:$o,keyframes:mo}=this.options;this.resolver=new DOMKeyframesResolver(mo,(Ao,jo)=>this.onKeyframesResolved(Ao,jo),io,fo,$o),this.resolver.scheduleResolve()}initPlayback(Fn,io){var fo;let{duration:$o=300,times:mo,ease:Ao,type:jo,motionValue:Lo,name:Ho,startTime:zo}=this.options;if(!(!((fo=Lo.owner)===null||fo===void 0)&&fo.current))return!1;if(typeof Ao=="string"&&supportsLinearEasing()&&isUnsupportedEase(Ao)&&(Ao=unsupportedEasingFunctions[Ao]),requiresPregeneratedKeyframes(this.options)){const{onComplete:Vo,onUpdate:Yo,motionValue:Xo,element:is,...yl}=this.options,us=pregenerateKeyframes(Fn,yl);Fn=us.keyframes,Fn.length===1&&(Fn[1]=Fn[0]),$o=us.duration,mo=us.times,Ao=us.ease,jo="keyframes"}const Go=startWaapiAnimation(Lo.owner.current,Ho,Fn,{...this.options,duration:$o,times:mo,ease:Ao});return Go.startTime=zo??this.calcStartTime(),this.pendingTimeline?(attachTimeline(Go,this.pendingTimeline),this.pendingTimeline=void 0):Go.onfinish=()=>{const{onComplete:Vo}=this.options;Lo.set(getFinalKeyframe(Fn,this.options,io)),Vo&&Vo(),this.cancel(),this.resolveFinishedPromise()},{animation:Go,duration:$o,times:mo,type:jo,ease:Ao,keyframes:Fn}}get duration(){const{resolved:Fn}=this;if(!Fn)return 0;const{duration:io}=Fn;return millisecondsToSeconds(io)}get time(){const{resolved:Fn}=this;if(!Fn)return 0;const{animation:io}=Fn;return millisecondsToSeconds(io.currentTime||0)}set time(Fn){const{resolved:io}=this;if(!io)return;const{animation:fo}=io;fo.currentTime=secondsToMilliseconds(Fn)}get speed(){const{resolved:Fn}=this;if(!Fn)return 1;const{animation:io}=Fn;return io.playbackRate}set speed(Fn){const{resolved:io}=this;if(!io)return;const{animation:fo}=io;fo.playbackRate=Fn}get state(){const{resolved:Fn}=this;if(!Fn)return"idle";const{animation:io}=Fn;return io.playState}get startTime(){const{resolved:Fn}=this;if(!Fn)return null;const{animation:io}=Fn;return io.startTime}attachTimeline(Fn){if(!this._resolved)this.pendingTimeline=Fn;else{const{resolved:io}=this;if(!io)return noop;const{animation:fo}=io;attachTimeline(fo,Fn)}return noop}play(){if(this.isStopped)return;const{resolved:Fn}=this;if(!Fn)return;const{animation:io}=Fn;io.playState==="finished"&&this.updateFinishedPromise(),io.play()}pause(){const{resolved:Fn}=this;if(!Fn)return;const{animation:io}=Fn;io.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:Fn}=this;if(!Fn)return;const{animation:io,keyframes:fo,duration:$o,type:mo,ease:Ao,times:jo}=Fn;if(io.playState==="idle"||io.playState==="finished")return;if(this.time){const{motionValue:Ho,onUpdate:zo,onComplete:Go,element:Vo,...Yo}=this.options,Xo=new MainThreadAnimation({...Yo,keyframes:fo,duration:$o,type:mo,ease:Ao,times:jo,isGenerator:!0}),is=secondsToMilliseconds(this.time);Ho.setWithVelocity(Xo.sample(is-sampleDelta).value,Xo.sample(is).value,sampleDelta)}const{onStop:Lo}=this.options;Lo&&Lo(),this.cancel()}complete(){const{resolved:Fn}=this;Fn&&Fn.animation.finish()}cancel(){const{resolved:Fn}=this;Fn&&Fn.animation.cancel()}static supports(Fn){const{motionValue:io,name:fo,repeatDelay:$o,repeatType:mo,damping:Ao,type:jo}=Fn;return supportsWaapi()&&fo&&acceleratedValues.has(fo)&&io&&io.owner&&io.owner.current instanceof HTMLElement&&!io.owner.getProps().onUpdate&&!$o&&mo!=="mirror"&&Ao!==0&&jo!=="inertia"}}const supportsScrollTimeline=memo(()=>window.ScrollTimeline!==void 0);class GroupPlaybackControls{constructor(Fn){this.stop=()=>this.runAll("stop"),this.animations=Fn.filter(Boolean)}then(Fn,io){return Promise.all(this.animations).then(Fn).catch(io)}getAll(Fn){return this.animations[0][Fn]}setAll(Fn,io){for(let fo=0;fo<this.animations.length;fo++)this.animations[fo][Fn]=io}attachTimeline(Fn,io){const fo=this.animations.map($o=>supportsScrollTimeline()&&$o.attachTimeline?$o.attachTimeline(Fn):io($o));return()=>{fo.forEach(($o,mo)=>{$o&&$o(),this.animations[mo].stop()})}}get time(){return this.getAll("time")}set time(Fn){this.setAll("time",Fn)}get speed(){return this.getAll("speed")}set speed(Fn){this.setAll("speed",Fn)}get startTime(){return this.getAll("startTime")}get duration(){let Fn=0;for(let io=0;io<this.animations.length;io++)Fn=Math.max(Fn,this.animations[io].duration);return Fn}runAll(Fn){this.animations.forEach(io=>io[Fn]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function isTransitionDefined({when:Mn,delay:Fn,delayChildren:io,staggerChildren:fo,staggerDirection:$o,repeat:mo,repeatType:Ao,repeatDelay:jo,from:Lo,elapsed:Ho,...zo}){return!!Object.keys(zo).length}const animateMotionValue=(Mn,Fn,io,fo={},$o,mo)=>Ao=>{const jo=getValueTransition(fo,Mn)||{},Lo=jo.delay||fo.delay||0;let{elapsed:Ho=0}=fo;Ho=Ho-secondsToMilliseconds(Lo);let zo={keyframes:Array.isArray(io)?io:[null,io],ease:"easeOut",velocity:Fn.getVelocity(),...jo,delay:-Ho,onUpdate:Vo=>{Fn.set(Vo),jo.onUpdate&&jo.onUpdate(Vo)},onComplete:()=>{Ao(),jo.onComplete&&jo.onComplete()},name:Mn,motionValue:Fn,element:mo?void 0:$o};isTransitionDefined(jo)||(zo={...zo,...getDefaultTransition(Mn,zo)}),zo.duration&&(zo.duration=secondsToMilliseconds(zo.duration)),zo.repeatDelay&&(zo.repeatDelay=secondsToMilliseconds(zo.repeatDelay)),zo.from!==void 0&&(zo.keyframes[0]=zo.from);let Go=!1;if((zo.type===!1||zo.duration===0&&!zo.repeatDelay)&&(zo.duration=0,zo.delay===0&&(Go=!0)),Go&&!mo&&Fn.get()!==void 0){const Vo=getFinalKeyframe(zo.keyframes,jo);if(Vo!==void 0)return frame.update(()=>{zo.onUpdate(Vo),zo.onComplete()}),new GroupPlaybackControls([])}return!mo&&AcceleratedAnimation.supports(zo)?new AcceleratedAnimation(zo):new MainThreadAnimation(zo)},isCustomValue=Mn=>!!(Mn&&typeof Mn=="object"&&Mn.mix&&Mn.toValue),resolveFinalValueInKeyframes=Mn=>isKeyframesTarget(Mn)?Mn[Mn.length-1]||0:Mn;function addUniqueItem(Mn,Fn){Mn.indexOf(Fn)===-1&&Mn.push(Fn)}function removeItem(Mn,Fn){const io=Mn.indexOf(Fn);io>-1&&Mn.splice(io,1)}class SubscriptionManager{constructor(){this.subscriptions=[]}add(Fn){return addUniqueItem(this.subscriptions,Fn),()=>removeItem(this.subscriptions,Fn)}notify(Fn,io,fo){const $o=this.subscriptions.length;if($o)if($o===1)this.subscriptions[0](Fn,io,fo);else for(let mo=0;mo<$o;mo++){const Ao=this.subscriptions[mo];Ao&&Ao(Fn,io,fo)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const MAX_VELOCITY_DELTA=30,isFloat=Mn=>!isNaN(parseFloat(Mn));class MotionValue{constructor(Fn,io={}){this.version="11.11.9",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(fo,$o=!0)=>{const mo=time.now();this.updatedAt!==mo&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(fo),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),$o&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(Fn),this.owner=io.owner}setCurrent(Fn){this.current=Fn,this.updatedAt=time.now(),this.canTrackVelocity===null&&Fn!==void 0&&(this.canTrackVelocity=isFloat(this.current))}setPrevFrameValue(Fn=this.current){this.prevFrameValue=Fn,this.prevUpdatedAt=this.updatedAt}onChange(Fn){return this.on("change",Fn)}on(Fn,io){this.events[Fn]||(this.events[Fn]=new SubscriptionManager);const fo=this.events[Fn].add(io);return Fn==="change"?()=>{fo(),frame.read(()=>{this.events.change.getSize()||this.stop()})}:fo}clearListeners(){for(const Fn in this.events)this.events[Fn].clear()}attach(Fn,io){this.passiveEffect=Fn,this.stopPassiveEffect=io}set(Fn,io=!0){!io||!this.passiveEffect?this.updateAndNotify(Fn,io):this.passiveEffect(Fn,this.updateAndNotify)}setWithVelocity(Fn,io,fo){this.set(io),this.prev=void 0,this.prevFrameValue=Fn,this.prevUpdatedAt=this.updatedAt-fo}jump(Fn,io=!0){this.updateAndNotify(Fn),this.prev=Fn,this.prevUpdatedAt=this.prevFrameValue=void 0,io&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const Fn=time.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||Fn-this.updatedAt>MAX_VELOCITY_DELTA)return 0;const io=Math.min(this.updatedAt-this.prevUpdatedAt,MAX_VELOCITY_DELTA);return velocityPerSecond(parseFloat(this.current)-parseFloat(this.prevFrameValue),io)}start(Fn){return this.stop(),new Promise(io=>{this.hasAnimated=!0,this.animation=Fn(io),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function motionValue(Mn,Fn){return new MotionValue(Mn,Fn)}function setMotionValue(Mn,Fn,io){Mn.hasValue(Fn)?Mn.getValue(Fn).set(io):Mn.addValue(Fn,motionValue(io))}function setTarget(Mn,Fn){const io=resolveVariant(Mn,Fn);let{transitionEnd:fo={},transition:$o={},...mo}=io||{};mo={...mo,...fo};for(const Ao in mo){const jo=resolveFinalValueInKeyframes(mo[Ao]);setMotionValue(Mn,Ao,jo)}}const camelToDash=Mn=>Mn.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),optimizedAppearDataId="framerAppearId",optimizedAppearDataAttribute="data-"+camelToDash(optimizedAppearDataId);function getOptimisedAppearId(Mn){return Mn.props[optimizedAppearDataAttribute]}const isMotionValue=Mn=>!!(Mn&&Mn.getVelocity);function isWillChangeMotionValue(Mn){return!!(isMotionValue(Mn)&&Mn.add)}function addValueToWillChange(Mn,Fn){if(!Mn.applyWillChange)return;const io=Mn.getValue("willChange");if(isWillChangeMotionValue(io))return io.add(Fn)}function shouldBlockAnimation({protectedKeys:Mn,needsAnimating:Fn},io){const fo=Mn.hasOwnProperty(io)&&Fn[io]!==!0;return Fn[io]=!1,fo}function animateTarget(Mn,Fn,{delay:io=0,transitionOverride:fo,type:$o}={}){var mo;let{transition:Ao=Mn.getDefaultTransition(),transitionEnd:jo,...Lo}=Fn;fo&&(Ao=fo);const Ho=[],zo=$o&&Mn.animationState&&Mn.animationState.getState()[$o];for(const Go in Lo){const Vo=Mn.getValue(Go,(mo=Mn.latestValues[Go])!==null&&mo!==void 0?mo:null),Yo=Lo[Go];if(Yo===void 0||zo&&shouldBlockAnimation(zo,Go))continue;const Xo={delay:io,...getValueTransition(Ao||{},Go)};let is=!1;if(window.MotionHandoffAnimation){const us=getOptimisedAppearId(Mn);if(us){const hs=window.MotionHandoffAnimation(us,Go,frame);hs!==null&&(Xo.startTime=hs,is=!0)}}addValueToWillChange(Mn,Go),Vo.start(animateMotionValue(Go,Vo,Yo,Mn.shouldReduceMotion&&transformProps.has(Go)?{type:!1}:Xo,Mn,is));const yl=Vo.animation;yl&&Ho.push(yl)}return jo&&Promise.all(Ho).then(()=>{frame.update(()=>{jo&&setTarget(Mn,jo)})}),Ho}function animateVariant(Mn,Fn,io={}){var fo;const $o=resolveVariant(Mn,Fn,io.type==="exit"?(fo=Mn.presenceContext)===null||fo===void 0?void 0:fo.custom:void 0);let{transition:mo=Mn.getDefaultTransition()||{}}=$o||{};io.transitionOverride&&(mo=io.transitionOverride);const Ao=$o?()=>Promise.all(animateTarget(Mn,$o,io)):()=>Promise.resolve(),jo=Mn.variantChildren&&Mn.variantChildren.size?(Ho=0)=>{const{delayChildren:zo=0,staggerChildren:Go,staggerDirection:Vo}=mo;return animateChildren(Mn,Fn,zo+Ho,Go,Vo,io)}:()=>Promise.resolve(),{when:Lo}=mo;if(Lo){const[Ho,zo]=Lo==="beforeChildren"?[Ao,jo]:[jo,Ao];return Ho().then(()=>zo())}else return Promise.all([Ao(),jo(io.delay)])}function animateChildren(Mn,Fn,io=0,fo=0,$o=1,mo){const Ao=[],jo=(Mn.variantChildren.size-1)*fo,Lo=$o===1?(Ho=0)=>Ho*fo:(Ho=0)=>jo-Ho*fo;return Array.from(Mn.variantChildren).sort(sortByTreeOrder).forEach((Ho,zo)=>{Ho.notify("AnimationStart",Fn),Ao.push(animateVariant(Ho,Fn,{...mo,delay:io+Lo(zo)}).then(()=>Ho.notify("AnimationComplete",Fn)))}),Promise.all(Ao)}function sortByTreeOrder(Mn,Fn){return Mn.sortNodePosition(Fn)}function animateVisualElement(Mn,Fn,io={}){Mn.notify("AnimationStart",Fn);let fo;if(Array.isArray(Fn)){const $o=Fn.map(mo=>animateVariant(Mn,mo,io));fo=Promise.all($o)}else if(typeof Fn=="string")fo=animateVariant(Mn,Fn,io);else{const $o=typeof Fn=="function"?resolveVariant(Mn,Fn,io.custom):Fn;fo=Promise.all(animateTarget(Mn,$o,io))}return fo.then(()=>{Mn.notify("AnimationComplete",Fn)})}const numVariantProps=variantProps.length;function getVariantContext(Mn){if(!Mn)return;if(!Mn.isControllingVariants){const io=Mn.parent?getVariantContext(Mn.parent)||{}:{};return Mn.props.initial!==void 0&&(io.initial=Mn.props.initial),io}const Fn={};for(let io=0;io<numVariantProps;io++){const fo=variantProps[io],$o=Mn.props[fo];(isVariantLabel($o)||$o===!1)&&(Fn[fo]=$o)}return Fn}const reversePriorityOrder=[...variantPriorityOrder].reverse(),numAnimationTypes=variantPriorityOrder.length;function animateList(Mn){return Fn=>Promise.all(Fn.map(({animation:io,options:fo})=>animateVisualElement(Mn,io,fo)))}function createAnimationState(Mn){let Fn=animateList(Mn),io=createState(),fo=!0;const $o=Lo=>(Ho,zo)=>{var Go;const Vo=resolveVariant(Mn,zo,Lo==="exit"?(Go=Mn.presenceContext)===null||Go===void 0?void 0:Go.custom:void 0);if(Vo){const{transition:Yo,transitionEnd:Xo,...is}=Vo;Ho={...Ho,...is,...Xo}}return Ho};function mo(Lo){Fn=Lo(Mn)}function Ao(Lo){const{props:Ho}=Mn,zo=getVariantContext(Mn.parent)||{},Go=[],Vo=new Set;let Yo={},Xo=1/0;for(let yl=0;yl<numAnimationTypes;yl++){const us=reversePriorityOrder[yl],hs=io[us],_l=Ho[us]!==void 0?Ho[us]:zo[us],xl=isVariantLabel(_l),Il=us===Lo?hs.isActive:null;Il===!1&&(Xo=yl);let Ol=_l===zo[us]&&_l!==Ho[us]&&xl;if(Ol&&fo&&Mn.manuallyAnimateOnMount&&(Ol=!1),hs.protectedKeys={...Yo},!hs.isActive&&Il===null||!_l&&!hs.prevProp||isAnimationControls(_l)||typeof _l=="boolean")continue;const Tl=checkVariantsDidChange(hs.prevProp,_l);let Cl=Tl||us===Lo&&hs.isActive&&!Ol&&xl||yl>Xo&&xl,Nl=!1;const Wl=Array.isArray(_l)?_l:[_l];let Dl=Wl.reduce($o(us),{});Il===!1&&(Dl={});const{prevResolvedValues:Rl={}}=hs,Qo={...Rl,...Dl},Jo=_c=>{Cl=!0,Vo.has(_c)&&(Nl=!0,Vo.delete(_c)),hs.needsAnimating[_c]=!0;const $l=Mn.getValue(_c);$l&&($l.liveStyle=!1)};for(const _c in Qo){const $l=Dl[_c],El=Rl[_c];if(Yo.hasOwnProperty(_c))continue;let ds=!1;isKeyframesTarget($l)&&isKeyframesTarget(El)?ds=!shallowCompare($l,El):ds=$l!==El,ds?$l!=null?Jo(_c):Vo.add(_c):$l!==void 0&&Vo.has(_c)?Jo(_c):hs.protectedKeys[_c]=!0}hs.prevProp=_l,hs.prevResolvedValues=Dl,hs.isActive&&(Yo={...Yo,...Dl}),fo&&Mn.blockInitialAnimation&&(Cl=!1),Cl&&(!(Ol&&Tl)||Nl)&&Go.push(...Wl.map(_c=>({animation:_c,options:{type:us}})))}if(Vo.size){const yl={};Vo.forEach(us=>{const hs=Mn.getBaseTarget(us),_l=Mn.getValue(us);_l&&(_l.liveStyle=!0),yl[us]=hs??null}),Go.push({animation:yl})}let is=!!Go.length;return fo&&(Ho.initial===!1||Ho.initial===Ho.animate)&&!Mn.manuallyAnimateOnMount&&(is=!1),fo=!1,is?Fn(Go):Promise.resolve()}function jo(Lo,Ho){var zo;if(io[Lo].isActive===Ho)return Promise.resolve();(zo=Mn.variantChildren)===null||zo===void 0||zo.forEach(Vo=>{var Yo;return(Yo=Vo.animationState)===null||Yo===void 0?void 0:Yo.setActive(Lo,Ho)}),io[Lo].isActive=Ho;const Go=Ao(Lo);for(const Vo in io)io[Vo].protectedKeys={};return Go}return{animateChanges:Ao,setActive:jo,setAnimateFunction:mo,getState:()=>io,reset:()=>{io=createState(),fo=!0}}}function checkVariantsDidChange(Mn,Fn){return typeof Fn=="string"?Fn!==Mn:Array.isArray(Fn)?!shallowCompare(Fn,Mn):!1}function createTypeState(Mn=!1){return{isActive:Mn,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function createState(){return{animate:createTypeState(!0),whileInView:createTypeState(),whileHover:createTypeState(),whileTap:createTypeState(),whileDrag:createTypeState(),whileFocus:createTypeState(),exit:createTypeState()}}class Feature{constructor(Fn){this.isMounted=!1,this.node=Fn}update(){}}class AnimationFeature extends Feature{constructor(Fn){super(Fn),Fn.animationState||(Fn.animationState=createAnimationState(Fn))}updateAnimationControlsSubscription(){const{animate:Fn}=this.node.getProps();isAnimationControls(Fn)&&(this.unmountControls=Fn.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:Fn}=this.node.getProps(),{animate:io}=this.node.prevProps||{};Fn!==io&&this.updateAnimationControlsSubscription()}unmount(){var Fn;this.node.animationState.reset(),(Fn=this.unmountControls)===null||Fn===void 0||Fn.call(this)}}let id$1=0;class ExitAnimationFeature extends Feature{constructor(){super(...arguments),this.id=id$1++}update(){if(!this.node.presenceContext)return;const{isPresent:Fn,onExitComplete:io}=this.node.presenceContext,{isPresent:fo}=this.node.prevPresenceContext||{};if(!this.node.animationState||Fn===fo)return;const $o=this.node.animationState.setActive("exit",!Fn);io&&!Fn&&$o.then(()=>io(this.id))}mount(){const{register:Fn}=this.node.presenceContext||{};Fn&&(this.unmount=Fn(this.id))}unmount(){}}const animations={animation:{Feature:AnimationFeature},exit:{Feature:ExitAnimationFeature}},isPrimaryPointer=Mn=>Mn.pointerType==="mouse"?typeof Mn.button!="number"||Mn.button<=0:Mn.isPrimary!==!1;function extractEventInfo(Mn,Fn="page"){return{point:{x:Mn[`${Fn}X`],y:Mn[`${Fn}Y`]}}}const addPointerInfo=Mn=>Fn=>isPrimaryPointer(Fn)&&Mn(Fn,extractEventInfo(Fn));function addDomEvent(Mn,Fn,io,fo={passive:!0}){return Mn.addEventListener(Fn,io,fo),()=>Mn.removeEventListener(Fn,io)}function addPointerEvent(Mn,Fn,io,fo){return addDomEvent(Mn,Fn,addPointerInfo(io),fo)}const distance=(Mn,Fn)=>Math.abs(Mn-Fn);function distance2D(Mn,Fn){const io=distance(Mn.x,Fn.x),fo=distance(Mn.y,Fn.y);return Math.sqrt(io**2+fo**2)}class PanSession{constructor(Fn,io,{transformPagePoint:fo,contextWindow:$o,dragSnapToOrigin:mo=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const Go=getPanInfo(this.lastMoveEventInfo,this.history),Vo=this.startEvent!==null,Yo=distance2D(Go.offset,{x:0,y:0})>=3;if(!Vo&&!Yo)return;const{point:Xo}=Go,{timestamp:is}=frameData;this.history.push({...Xo,timestamp:is});const{onStart:yl,onMove:us}=this.handlers;Vo||(yl&&yl(this.lastMoveEvent,Go),this.startEvent=this.lastMoveEvent),us&&us(this.lastMoveEvent,Go)},this.handlePointerMove=(Go,Vo)=>{this.lastMoveEvent=Go,this.lastMoveEventInfo=transformPoint(Vo,this.transformPagePoint),frame.update(this.updatePoint,!0)},this.handlePointerUp=(Go,Vo)=>{this.end();const{onEnd:Yo,onSessionEnd:Xo,resumeAnimation:is}=this.handlers;if(this.dragSnapToOrigin&&is&&is(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const yl=getPanInfo(Go.type==="pointercancel"?this.lastMoveEventInfo:transformPoint(Vo,this.transformPagePoint),this.history);this.startEvent&&Yo&&Yo(Go,yl),Xo&&Xo(Go,yl)},!isPrimaryPointer(Fn))return;this.dragSnapToOrigin=mo,this.handlers=io,this.transformPagePoint=fo,this.contextWindow=$o||window;const Ao=extractEventInfo(Fn),jo=transformPoint(Ao,this.transformPagePoint),{point:Lo}=jo,{timestamp:Ho}=frameData;this.history=[{...Lo,timestamp:Ho}];const{onSessionStart:zo}=io;zo&&zo(Fn,getPanInfo(jo,this.history)),this.removeListeners=pipe(addPointerEvent(this.contextWindow,"pointermove",this.handlePointerMove),addPointerEvent(this.contextWindow,"pointerup",this.handlePointerUp),addPointerEvent(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(Fn){this.handlers=Fn}end(){this.removeListeners&&this.removeListeners(),cancelFrame(this.updatePoint)}}function transformPoint(Mn,Fn){return Fn?{point:Fn(Mn.point)}:Mn}function subtractPoint(Mn,Fn){return{x:Mn.x-Fn.x,y:Mn.y-Fn.y}}function getPanInfo({point:Mn},Fn){return{point:Mn,delta:subtractPoint(Mn,lastDevicePoint(Fn)),offset:subtractPoint(Mn,startDevicePoint(Fn)),velocity:getVelocity(Fn,.1)}}function startDevicePoint(Mn){return Mn[0]}function lastDevicePoint(Mn){return Mn[Mn.length-1]}function getVelocity(Mn,Fn){if(Mn.length<2)return{x:0,y:0};let io=Mn.length-1,fo=null;const $o=lastDevicePoint(Mn);for(;io>=0&&(fo=Mn[io],!($o.timestamp-fo.timestamp>secondsToMilliseconds(Fn)));)io--;if(!fo)return{x:0,y:0};const mo=millisecondsToSeconds($o.timestamp-fo.timestamp);if(mo===0)return{x:0,y:0};const Ao={x:($o.x-fo.x)/mo,y:($o.y-fo.y)/mo};return Ao.x===1/0&&(Ao.x=0),Ao.y===1/0&&(Ao.y=0),Ao}function createLock(Mn){let Fn=null;return()=>{const io=()=>{Fn=null};return Fn===null?(Fn=Mn,io):!1}}const globalHorizontalLock=createLock("dragHorizontal"),globalVerticalLock=createLock("dragVertical");function getGlobalLock(Mn){let Fn=!1;if(Mn==="y")Fn=globalVerticalLock();else if(Mn==="x")Fn=globalHorizontalLock();else{const io=globalHorizontalLock(),fo=globalVerticalLock();io&&fo?Fn=()=>{io(),fo()}:(io&&io(),fo&&fo())}return Fn}function isDragActive(){const Mn=getGlobalLock(!0);return Mn?(Mn(),!1):!0}function isRefObject(Mn){return Mn&&typeof Mn=="object"&&Object.prototype.hasOwnProperty.call(Mn,"current")}const SCALE_PRECISION=1e-4,SCALE_MIN=1-SCALE_PRECISION,SCALE_MAX=1+SCALE_PRECISION,TRANSLATE_PRECISION=.01,TRANSLATE_MIN=0-TRANSLATE_PRECISION,TRANSLATE_MAX=0+TRANSLATE_PRECISION;function calcLength(Mn){return Mn.max-Mn.min}function isNear(Mn,Fn,io){return Math.abs(Mn-Fn)<=io}function calcAxisDelta(Mn,Fn,io,fo=.5){Mn.origin=fo,Mn.originPoint=mixNumber$1(Fn.min,Fn.max,Mn.origin),Mn.scale=calcLength(io)/calcLength(Fn),Mn.translate=mixNumber$1(io.min,io.max,Mn.origin)-Mn.originPoint,(Mn.scale>=SCALE_MIN&&Mn.scale<=SCALE_MAX||isNaN(Mn.scale))&&(Mn.scale=1),(Mn.translate>=TRANSLATE_MIN&&Mn.translate<=TRANSLATE_MAX||isNaN(Mn.translate))&&(Mn.translate=0)}function calcBoxDelta(Mn,Fn,io,fo){calcAxisDelta(Mn.x,Fn.x,io.x,fo?fo.originX:void 0),calcAxisDelta(Mn.y,Fn.y,io.y,fo?fo.originY:void 0)}function calcRelativeAxis(Mn,Fn,io){Mn.min=io.min+Fn.min,Mn.max=Mn.min+calcLength(Fn)}function calcRelativeBox(Mn,Fn,io){calcRelativeAxis(Mn.x,Fn.x,io.x),calcRelativeAxis(Mn.y,Fn.y,io.y)}function calcRelativeAxisPosition(Mn,Fn,io){Mn.min=Fn.min-io.min,Mn.max=Mn.min+calcLength(Fn)}function calcRelativePosition(Mn,Fn,io){calcRelativeAxisPosition(Mn.x,Fn.x,io.x),calcRelativeAxisPosition(Mn.y,Fn.y,io.y)}function applyConstraints(Mn,{min:Fn,max:io},fo){return Fn!==void 0&&Mn<Fn?Mn=fo?mixNumber$1(Fn,Mn,fo.min):Math.max(Mn,Fn):io!==void 0&&Mn>io&&(Mn=fo?mixNumber$1(io,Mn,fo.max):Math.min(Mn,io)),Mn}function calcRelativeAxisConstraints(Mn,Fn,io){return{min:Fn!==void 0?Mn.min+Fn:void 0,max:io!==void 0?Mn.max+io-(Mn.max-Mn.min):void 0}}function calcRelativeConstraints(Mn,{top:Fn,left:io,bottom:fo,right:$o}){return{x:calcRelativeAxisConstraints(Mn.x,io,$o),y:calcRelativeAxisConstraints(Mn.y,Fn,fo)}}function calcViewportAxisConstraints(Mn,Fn){let io=Fn.min-Mn.min,fo=Fn.max-Mn.max;return Fn.max-Fn.min<Mn.max-Mn.min&&([io,fo]=[fo,io]),{min:io,max:fo}}function calcViewportConstraints(Mn,Fn){return{x:calcViewportAxisConstraints(Mn.x,Fn.x),y:calcViewportAxisConstraints(Mn.y,Fn.y)}}function calcOrigin$1(Mn,Fn){let io=.5;const fo=calcLength(Mn),$o=calcLength(Fn);return $o>fo?io=progress(Fn.min,Fn.max-fo,Mn.min):fo>$o&&(io=progress(Mn.min,Mn.max-$o,Fn.min)),clamp(0,1,io)}function rebaseAxisConstraints(Mn,Fn){const io={};return Fn.min!==void 0&&(io.min=Fn.min-Mn.min),Fn.max!==void 0&&(io.max=Fn.max-Mn.min),io}const defaultElastic=.35;function resolveDragElastic(Mn=defaultElastic){return Mn===!1?Mn=0:Mn===!0&&(Mn=defaultElastic),{x:resolveAxisElastic(Mn,"left","right"),y:resolveAxisElastic(Mn,"top","bottom")}}function resolveAxisElastic(Mn,Fn,io){return{min:resolvePointElastic(Mn,Fn),max:resolvePointElastic(Mn,io)}}function resolvePointElastic(Mn,Fn){return typeof Mn=="number"?Mn:Mn[Fn]||0}const createAxisDelta=()=>({translate:0,scale:1,origin:0,originPoint:0}),createDelta=()=>({x:createAxisDelta(),y:createAxisDelta()}),createAxis=()=>({min:0,max:0}),createBox=()=>({x:createAxis(),y:createAxis()});function eachAxis(Mn){return[Mn("x"),Mn("y")]}function convertBoundingBoxToBox({top:Mn,left:Fn,right:io,bottom:fo}){return{x:{min:Fn,max:io},y:{min:Mn,max:fo}}}function convertBoxToBoundingBox({x:Mn,y:Fn}){return{top:Fn.min,right:Mn.max,bottom:Fn.max,left:Mn.min}}function transformBoxPoints(Mn,Fn){if(!Fn)return Mn;const io=Fn({x:Mn.left,y:Mn.top}),fo=Fn({x:Mn.right,y:Mn.bottom});return{top:io.y,left:io.x,bottom:fo.y,right:fo.x}}function isIdentityScale(Mn){return Mn===void 0||Mn===1}function hasScale({scale:Mn,scaleX:Fn,scaleY:io}){return!isIdentityScale(Mn)||!isIdentityScale(Fn)||!isIdentityScale(io)}function hasTransform(Mn){return hasScale(Mn)||has2DTranslate(Mn)||Mn.z||Mn.rotate||Mn.rotateX||Mn.rotateY||Mn.skewX||Mn.skewY}function has2DTranslate(Mn){return is2DTranslate(Mn.x)||is2DTranslate(Mn.y)}function is2DTranslate(Mn){return Mn&&Mn!=="0%"}function scalePoint(Mn,Fn,io){const fo=Mn-io,$o=Fn*fo;return io+$o}function applyPointDelta(Mn,Fn,io,fo,$o){return $o!==void 0&&(Mn=scalePoint(Mn,$o,fo)),scalePoint(Mn,io,fo)+Fn}function applyAxisDelta(Mn,Fn=0,io=1,fo,$o){Mn.min=applyPointDelta(Mn.min,Fn,io,fo,$o),Mn.max=applyPointDelta(Mn.max,Fn,io,fo,$o)}function applyBoxDelta(Mn,{x:Fn,y:io}){applyAxisDelta(Mn.x,Fn.translate,Fn.scale,Fn.originPoint),applyAxisDelta(Mn.y,io.translate,io.scale,io.originPoint)}const TREE_SCALE_SNAP_MIN=.999999999999,TREE_SCALE_SNAP_MAX=1.0000000000001;function applyTreeDeltas(Mn,Fn,io,fo=!1){const $o=io.length;if(!$o)return;Fn.x=Fn.y=1;let mo,Ao;for(let jo=0;jo<$o;jo++){mo=io[jo],Ao=mo.projectionDelta;const{visualElement:Lo}=mo.options;Lo&&Lo.props.style&&Lo.props.style.display==="contents"||(fo&&mo.options.layoutScroll&&mo.scroll&&mo!==mo.root&&transformBox(Mn,{x:-mo.scroll.offset.x,y:-mo.scroll.offset.y}),Ao&&(Fn.x*=Ao.x.scale,Fn.y*=Ao.y.scale,applyBoxDelta(Mn,Ao)),fo&&hasTransform(mo.latestValues)&&transformBox(Mn,mo.latestValues))}Fn.x<TREE_SCALE_SNAP_MAX&&Fn.x>TREE_SCALE_SNAP_MIN&&(Fn.x=1),Fn.y<TREE_SCALE_SNAP_MAX&&Fn.y>TREE_SCALE_SNAP_MIN&&(Fn.y=1)}function translateAxis(Mn,Fn){Mn.min=Mn.min+Fn,Mn.max=Mn.max+Fn}function transformAxis(Mn,Fn,io,fo,$o=.5){const mo=mixNumber$1(Mn.min,Mn.max,$o);applyAxisDelta(Mn,Fn,io,mo,fo)}function transformBox(Mn,Fn){transformAxis(Mn.x,Fn.x,Fn.scaleX,Fn.scale,Fn.originX),transformAxis(Mn.y,Fn.y,Fn.scaleY,Fn.scale,Fn.originY)}function measureViewportBox(Mn,Fn){return convertBoundingBoxToBox(transformBoxPoints(Mn.getBoundingClientRect(),Fn))}function measurePageBox(Mn,Fn,io){const fo=measureViewportBox(Mn,io),{scroll:$o}=Fn;return $o&&(translateAxis(fo.x,$o.offset.x),translateAxis(fo.y,$o.offset.y)),fo}const getContextWindow=({current:Mn})=>Mn?Mn.ownerDocument.defaultView:null,elementDragControls=new WeakMap;class VisualElementDragControls{constructor(Fn){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=createBox(),this.visualElement=Fn}start(Fn,{snapToCursor:io=!1}={}){const{presenceContext:fo}=this.visualElement;if(fo&&fo.isPresent===!1)return;const $o=zo=>{const{dragSnapToOrigin:Go}=this.getProps();Go?this.pauseAnimation():this.stopAnimation(),io&&this.snapToCursor(extractEventInfo(zo,"page").point)},mo=(zo,Go)=>{const{drag:Vo,dragPropagation:Yo,onDragStart:Xo}=this.getProps();if(Vo&&!Yo&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=getGlobalLock(Vo),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),eachAxis(yl=>{let us=this.getAxisMotionValue(yl).get()||0;if(percent.test(us)){const{projection:hs}=this.visualElement;if(hs&&hs.layout){const _l=hs.layout.layoutBox[yl];_l&&(us=calcLength(_l)*(parseFloat(us)/100))}}this.originPoint[yl]=us}),Xo&&frame.postRender(()=>Xo(zo,Go)),addValueToWillChange(this.visualElement,"transform");const{animationState:is}=this.visualElement;is&&is.setActive("whileDrag",!0)},Ao=(zo,Go)=>{const{dragPropagation:Vo,dragDirectionLock:Yo,onDirectionLock:Xo,onDrag:is}=this.getProps();if(!Vo&&!this.openGlobalLock)return;const{offset:yl}=Go;if(Yo&&this.currentDirection===null){this.currentDirection=getCurrentDirection(yl),this.currentDirection!==null&&Xo&&Xo(this.currentDirection);return}this.updateAxis("x",Go.point,yl),this.updateAxis("y",Go.point,yl),this.visualElement.render(),is&&is(zo,Go)},jo=(zo,Go)=>this.stop(zo,Go),Lo=()=>eachAxis(zo=>{var Go;return this.getAnimationState(zo)==="paused"&&((Go=this.getAxisMotionValue(zo).animation)===null||Go===void 0?void 0:Go.play())}),{dragSnapToOrigin:Ho}=this.getProps();this.panSession=new PanSession(Fn,{onSessionStart:$o,onStart:mo,onMove:Ao,onSessionEnd:jo,resumeAnimation:Lo},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:Ho,contextWindow:getContextWindow(this.visualElement)})}stop(Fn,io){const fo=this.isDragging;if(this.cancel(),!fo)return;const{velocity:$o}=io;this.startAnimation($o);const{onDragEnd:mo}=this.getProps();mo&&frame.postRender(()=>mo(Fn,io))}cancel(){this.isDragging=!1;const{projection:Fn,animationState:io}=this.visualElement;Fn&&(Fn.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:fo}=this.getProps();!fo&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),io&&io.setActive("whileDrag",!1)}updateAxis(Fn,io,fo){const{drag:$o}=this.getProps();if(!fo||!shouldDrag(Fn,$o,this.currentDirection))return;const mo=this.getAxisMotionValue(Fn);let Ao=this.originPoint[Fn]+fo[Fn];this.constraints&&this.constraints[Fn]&&(Ao=applyConstraints(Ao,this.constraints[Fn],this.elastic[Fn])),mo.set(Ao)}resolveConstraints(){var Fn;const{dragConstraints:io,dragElastic:fo}=this.getProps(),$o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(Fn=this.visualElement.projection)===null||Fn===void 0?void 0:Fn.layout,mo=this.constraints;io&&isRefObject(io)?this.constraints||(this.constraints=this.resolveRefConstraints()):io&&$o?this.constraints=calcRelativeConstraints($o.layoutBox,io):this.constraints=!1,this.elastic=resolveDragElastic(fo),mo!==this.constraints&&$o&&this.constraints&&!this.hasMutatedConstraints&&eachAxis(Ao=>{this.constraints!==!1&&this.getAxisMotionValue(Ao)&&(this.constraints[Ao]=rebaseAxisConstraints($o.layoutBox[Ao],this.constraints[Ao]))})}resolveRefConstraints(){const{dragConstraints:Fn,onMeasureDragConstraints:io}=this.getProps();if(!Fn||!isRefObject(Fn))return!1;const fo=Fn.current,{projection:$o}=this.visualElement;if(!$o||!$o.layout)return!1;const mo=measurePageBox(fo,$o.root,this.visualElement.getTransformPagePoint());let Ao=calcViewportConstraints($o.layout.layoutBox,mo);if(io){const jo=io(convertBoxToBoundingBox(Ao));this.hasMutatedConstraints=!!jo,jo&&(Ao=convertBoundingBoxToBox(jo))}return Ao}startAnimation(Fn){const{drag:io,dragMomentum:fo,dragElastic:$o,dragTransition:mo,dragSnapToOrigin:Ao,onDragTransitionEnd:jo}=this.getProps(),Lo=this.constraints||{},Ho=eachAxis(zo=>{if(!shouldDrag(zo,io,this.currentDirection))return;let Go=Lo&&Lo[zo]||{};Ao&&(Go={min:0,max:0});const Vo=$o?200:1e6,Yo=$o?40:1e7,Xo={type:"inertia",velocity:fo?Fn[zo]:0,bounceStiffness:Vo,bounceDamping:Yo,timeConstant:750,restDelta:1,restSpeed:10,...mo,...Go};return this.startAxisValueAnimation(zo,Xo)});return Promise.all(Ho).then(jo)}startAxisValueAnimation(Fn,io){const fo=this.getAxisMotionValue(Fn);return addValueToWillChange(this.visualElement,Fn),fo.start(animateMotionValue(Fn,fo,0,io,this.visualElement,!1))}stopAnimation(){eachAxis(Fn=>this.getAxisMotionValue(Fn).stop())}pauseAnimation(){eachAxis(Fn=>{var io;return(io=this.getAxisMotionValue(Fn).animation)===null||io===void 0?void 0:io.pause()})}getAnimationState(Fn){var io;return(io=this.getAxisMotionValue(Fn).animation)===null||io===void 0?void 0:io.state}getAxisMotionValue(Fn){const io=`_drag${Fn.toUpperCase()}`,fo=this.visualElement.getProps(),$o=fo[io];return $o||this.visualElement.getValue(Fn,(fo.initial?fo.initial[Fn]:void 0)||0)}snapToCursor(Fn){eachAxis(io=>{const{drag:fo}=this.getProps();if(!shouldDrag(io,fo,this.currentDirection))return;const{projection:$o}=this.visualElement,mo=this.getAxisMotionValue(io);if($o&&$o.layout){const{min:Ao,max:jo}=$o.layout.layoutBox[io];mo.set(Fn[io]-mixNumber$1(Ao,jo,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:Fn,dragConstraints:io}=this.getProps(),{projection:fo}=this.visualElement;if(!isRefObject(io)||!fo||!this.constraints)return;this.stopAnimation();const $o={x:0,y:0};eachAxis(Ao=>{const jo=this.getAxisMotionValue(Ao);if(jo&&this.constraints!==!1){const Lo=jo.get();$o[Ao]=calcOrigin$1({min:Lo,max:Lo},this.constraints[Ao])}});const{transformTemplate:mo}=this.visualElement.getProps();this.visualElement.current.style.transform=mo?mo({},""):"none",fo.root&&fo.root.updateScroll(),fo.updateLayout(),this.resolveConstraints(),eachAxis(Ao=>{if(!shouldDrag(Ao,Fn,null))return;const jo=this.getAxisMotionValue(Ao),{min:Lo,max:Ho}=this.constraints[Ao];jo.set(mixNumber$1(Lo,Ho,$o[Ao]))})}addListeners(){if(!this.visualElement.current)return;elementDragControls.set(this.visualElement,this);const Fn=this.visualElement.current,io=addPointerEvent(Fn,"pointerdown",Lo=>{const{drag:Ho,dragListener:zo=!0}=this.getProps();Ho&&zo&&this.start(Lo)}),fo=()=>{const{dragConstraints:Lo}=this.getProps();isRefObject(Lo)&&Lo.current&&(this.constraints=this.resolveRefConstraints())},{projection:$o}=this.visualElement,mo=$o.addEventListener("measure",fo);$o&&!$o.layout&&($o.root&&$o.root.updateScroll(),$o.updateLayout()),frame.read(fo);const Ao=addDomEvent(window,"resize",()=>this.scalePositionWithinConstraints()),jo=$o.addEventListener("didUpdate",({delta:Lo,hasLayoutChanged:Ho})=>{this.isDragging&&Ho&&(eachAxis(zo=>{const Go=this.getAxisMotionValue(zo);Go&&(this.originPoint[zo]+=Lo[zo].translate,Go.set(Go.get()+Lo[zo].translate))}),this.visualElement.render())});return()=>{Ao(),io(),mo(),jo&&jo()}}getProps(){const Fn=this.visualElement.getProps(),{drag:io=!1,dragDirectionLock:fo=!1,dragPropagation:$o=!1,dragConstraints:mo=!1,dragElastic:Ao=defaultElastic,dragMomentum:jo=!0}=Fn;return{...Fn,drag:io,dragDirectionLock:fo,dragPropagation:$o,dragConstraints:mo,dragElastic:Ao,dragMomentum:jo}}}function shouldDrag(Mn,Fn,io){return(Fn===!0||Fn===Mn)&&(io===null||io===Mn)}function getCurrentDirection(Mn,Fn=10){let io=null;return Math.abs(Mn.y)>Fn?io="y":Math.abs(Mn.x)>Fn&&(io="x"),io}class DragGesture extends Feature{constructor(Fn){super(Fn),this.removeGroupControls=noop,this.removeListeners=noop,this.controls=new VisualElementDragControls(Fn)}mount(){const{dragControls:Fn}=this.node.getProps();Fn&&(this.removeGroupControls=Fn.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||noop}unmount(){this.removeGroupControls(),this.removeListeners()}}const asyncHandler=Mn=>(Fn,io)=>{Mn&&frame.postRender(()=>Mn(Fn,io))};class PanGesture extends Feature{constructor(){super(...arguments),this.removePointerDownListener=noop}onPointerDown(Fn){this.session=new PanSession(Fn,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:getContextWindow(this.node)})}createPanHandlers(){const{onPanSessionStart:Fn,onPanStart:io,onPan:fo,onPanEnd:$o}=this.node.getProps();return{onSessionStart:asyncHandler(Fn),onStart:asyncHandler(io),onMove:fo,onEnd:(mo,Ao)=>{delete this.session,$o&&frame.postRender(()=>$o(mo,Ao))}}}mount(){this.removePointerDownListener=addPointerEvent(this.node.current,"pointerdown",Fn=>this.onPointerDown(Fn))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const PresenceContext=reactExports$1.createContext(null);function usePresence(){const Mn=reactExports$1.useContext(PresenceContext);if(Mn===null)return[!0,null];const{isPresent:Fn,onExitComplete:io,register:fo}=Mn,$o=reactExports$1.useId();reactExports$1.useEffect(()=>fo($o),[]);const mo=reactExports$1.useCallback(()=>io&&io($o),[$o,io]);return!Fn&&io?[!1,mo]:[!0]}const LayoutGroupContext=reactExports$1.createContext({}),SwitchLayoutGroupContext=reactExports$1.createContext({}),globalProjectionState={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function pixelsToPercent(Mn,Fn){return Fn.max===Fn.min?0:Mn/(Fn.max-Fn.min)*100}const correctBorderRadius={correct:(Mn,Fn)=>{if(!Fn.target)return Mn;if(typeof Mn=="string")if(px.test(Mn))Mn=parseFloat(Mn);else return Mn;const io=pixelsToPercent(Mn,Fn.target.x),fo=pixelsToPercent(Mn,Fn.target.y);return`${io}% ${fo}%`}},correctBoxShadow={correct:(Mn,{treeScale:Fn,projectionDelta:io})=>{const fo=Mn,$o=complex.parse(Mn);if($o.length>5)return fo;const mo=complex.createTransformer(Mn),Ao=typeof $o[0]!="number"?1:0,jo=io.x.scale*Fn.x,Lo=io.y.scale*Fn.y;$o[0+Ao]/=jo,$o[1+Ao]/=Lo;const Ho=mixNumber$1(jo,Lo,.5);return typeof $o[2+Ao]=="number"&&($o[2+Ao]/=Ho),typeof $o[3+Ao]=="number"&&($o[3+Ao]/=Ho),mo($o)}},scaleCorrectors={};function addScaleCorrector(Mn){Object.assign(scaleCorrectors,Mn)}const{schedule:microtask,cancel:cancelMicrotask}=createRenderBatcher(queueMicrotask,!1);class MeasureLayoutWithContext extends reactExports$1.Component{componentDidMount(){const{visualElement:Fn,layoutGroup:io,switchLayoutGroup:fo,layoutId:$o}=this.props,{projection:mo}=Fn;addScaleCorrector(defaultScaleCorrectors),mo&&(io.group&&io.group.add(mo),fo&&fo.register&&$o&&fo.register(mo),mo.root.didUpdate(),mo.addEventListener("animationComplete",()=>{this.safeToRemove()}),mo.setOptions({...mo.options,onExitComplete:()=>this.safeToRemove()})),globalProjectionState.hasEverUpdated=!0}getSnapshotBeforeUpdate(Fn){const{layoutDependency:io,visualElement:fo,drag:$o,isPresent:mo}=this.props,Ao=fo.projection;return Ao&&(Ao.isPresent=mo,$o||Fn.layoutDependency!==io||io===void 0?Ao.willUpdate():this.safeToRemove(),Fn.isPresent!==mo&&(mo?Ao.promote():Ao.relegate()||frame.postRender(()=>{const jo=Ao.getStack();(!jo||!jo.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:Fn}=this.props.visualElement;Fn&&(Fn.root.didUpdate(),microtask.postRender(()=>{!Fn.currentAnimation&&Fn.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:Fn,layoutGroup:io,switchLayoutGroup:fo}=this.props,{projection:$o}=Fn;$o&&($o.scheduleCheckAfterUnmount(),io&&io.group&&io.group.remove($o),fo&&fo.deregister&&fo.deregister($o))}safeToRemove(){const{safeToRemove:Fn}=this.props;Fn&&Fn()}render(){return null}}function MeasureLayout(Mn){const[Fn,io]=usePresence(),fo=reactExports$1.useContext(LayoutGroupContext);return jsxRuntimeExports$1.jsx(MeasureLayoutWithContext,{...Mn,layoutGroup:fo,switchLayoutGroup:reactExports$1.useContext(SwitchLayoutGroupContext),isPresent:Fn,safeToRemove:io})}const defaultScaleCorrectors={borderRadius:{...correctBorderRadius,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:correctBorderRadius,borderTopRightRadius:correctBorderRadius,borderBottomLeftRadius:correctBorderRadius,borderBottomRightRadius:correctBorderRadius,boxShadow:correctBoxShadow},borders=["TopLeft","TopRight","BottomLeft","BottomRight"],numBorders=borders.length,asNumber=Mn=>typeof Mn=="string"?parseFloat(Mn):Mn,isPx=Mn=>typeof Mn=="number"||px.test(Mn);function mixValues(Mn,Fn,io,fo,$o,mo){$o?(Mn.opacity=mixNumber$1(0,io.opacity!==void 0?io.opacity:1,easeCrossfadeIn(fo)),Mn.opacityExit=mixNumber$1(Fn.opacity!==void 0?Fn.opacity:1,0,easeCrossfadeOut(fo))):mo&&(Mn.opacity=mixNumber$1(Fn.opacity!==void 0?Fn.opacity:1,io.opacity!==void 0?io.opacity:1,fo));for(let Ao=0;Ao<numBorders;Ao++){const jo=`border${borders[Ao]}Radius`;let Lo=getRadius(Fn,jo),Ho=getRadius(io,jo);if(Lo===void 0&&Ho===void 0)continue;Lo||(Lo=0),Ho||(Ho=0),Lo===0||Ho===0||isPx(Lo)===isPx(Ho)?(Mn[jo]=Math.max(mixNumber$1(asNumber(Lo),asNumber(Ho),fo),0),(percent.test(Ho)||percent.test(Lo))&&(Mn[jo]+="%")):Mn[jo]=Ho}(Fn.rotate||io.rotate)&&(Mn.rotate=mixNumber$1(Fn.rotate||0,io.rotate||0,fo))}function getRadius(Mn,Fn){return Mn[Fn]!==void 0?Mn[Fn]:Mn.borderRadius}const easeCrossfadeIn=compress(0,.5,circOut),easeCrossfadeOut=compress(.5,.95,noop);function compress(Mn,Fn,io){return fo=>fo<Mn?0:fo>Fn?1:io(progress(Mn,Fn,fo))}function copyAxisInto(Mn,Fn){Mn.min=Fn.min,Mn.max=Fn.max}function copyBoxInto(Mn,Fn){copyAxisInto(Mn.x,Fn.x),copyAxisInto(Mn.y,Fn.y)}function copyAxisDeltaInto(Mn,Fn){Mn.translate=Fn.translate,Mn.scale=Fn.scale,Mn.originPoint=Fn.originPoint,Mn.origin=Fn.origin}function removePointDelta(Mn,Fn,io,fo,$o){return Mn-=Fn,Mn=scalePoint(Mn,1/io,fo),$o!==void 0&&(Mn=scalePoint(Mn,1/$o,fo)),Mn}function removeAxisDelta(Mn,Fn=0,io=1,fo=.5,$o,mo=Mn,Ao=Mn){if(percent.test(Fn)&&(Fn=parseFloat(Fn),Fn=mixNumber$1(Ao.min,Ao.max,Fn/100)-Ao.min),typeof Fn!="number")return;let jo=mixNumber$1(mo.min,mo.max,fo);Mn===mo&&(jo-=Fn),Mn.min=removePointDelta(Mn.min,Fn,io,jo,$o),Mn.max=removePointDelta(Mn.max,Fn,io,jo,$o)}function removeAxisTransforms(Mn,Fn,[io,fo,$o],mo,Ao){removeAxisDelta(Mn,Fn[io],Fn[fo],Fn[$o],Fn.scale,mo,Ao)}const xKeys=["x","scaleX","originX"],yKeys=["y","scaleY","originY"];function removeBoxTransforms(Mn,Fn,io,fo){removeAxisTransforms(Mn.x,Fn,xKeys,io?io.x:void 0,fo?fo.x:void 0),removeAxisTransforms(Mn.y,Fn,yKeys,io?io.y:void 0,fo?fo.y:void 0)}function isAxisDeltaZero(Mn){return Mn.translate===0&&Mn.scale===1}function isDeltaZero(Mn){return isAxisDeltaZero(Mn.x)&&isAxisDeltaZero(Mn.y)}function axisEquals(Mn,Fn){return Mn.min===Fn.min&&Mn.max===Fn.max}function boxEquals(Mn,Fn){return axisEquals(Mn.x,Fn.x)&&axisEquals(Mn.y,Fn.y)}function axisEqualsRounded(Mn,Fn){return Math.round(Mn.min)===Math.round(Fn.min)&&Math.round(Mn.max)===Math.round(Fn.max)}function boxEqualsRounded(Mn,Fn){return axisEqualsRounded(Mn.x,Fn.x)&&axisEqualsRounded(Mn.y,Fn.y)}function aspectRatio(Mn){return calcLength(Mn.x)/calcLength(Mn.y)}function axisDeltaEquals(Mn,Fn){return Mn.translate===Fn.translate&&Mn.scale===Fn.scale&&Mn.originPoint===Fn.originPoint}class NodeStack{constructor(){this.members=[]}add(Fn){addUniqueItem(this.members,Fn),Fn.scheduleRender()}remove(Fn){if(removeItem(this.members,Fn),Fn===this.prevLead&&(this.prevLead=void 0),Fn===this.lead){const io=this.members[this.members.length-1];io&&this.promote(io)}}relegate(Fn){const io=this.members.findIndex($o=>Fn===$o);if(io===0)return!1;let fo;for(let $o=io;$o>=0;$o--){const mo=this.members[$o];if(mo.isPresent!==!1){fo=mo;break}}return fo?(this.promote(fo),!0):!1}promote(Fn,io){const fo=this.lead;if(Fn!==fo&&(this.prevLead=fo,this.lead=Fn,Fn.show(),fo)){fo.instance&&fo.scheduleRender(),Fn.scheduleRender(),Fn.resumeFrom=fo,io&&(Fn.resumeFrom.preserveOpacity=!0),fo.snapshot&&(Fn.snapshot=fo.snapshot,Fn.snapshot.latestValues=fo.animationValues||fo.latestValues),Fn.root&&Fn.root.isUpdating&&(Fn.isLayoutDirty=!0);const{crossfade:$o}=Fn.options;$o===!1&&fo.hide()}}exitAnimationComplete(){this.members.forEach(Fn=>{const{options:io,resumingFrom:fo}=Fn;io.onExitComplete&&io.onExitComplete(),fo&&fo.options.onExitComplete&&fo.options.onExitComplete()})}scheduleRender(){this.members.forEach(Fn=>{Fn.instance&&Fn.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function buildProjectionTransform(Mn,Fn,io){let fo="";const $o=Mn.x.translate/Fn.x,mo=Mn.y.translate/Fn.y,Ao=(io==null?void 0:io.z)||0;if(($o||mo||Ao)&&(fo=`translate3d(${$o}px, ${mo}px, ${Ao}px) `),(Fn.x!==1||Fn.y!==1)&&(fo+=`scale(${1/Fn.x}, ${1/Fn.y}) `),io){const{transformPerspective:Ho,rotate:zo,rotateX:Go,rotateY:Vo,skewX:Yo,skewY:Xo}=io;Ho&&(fo=`perspective(${Ho}px) ${fo}`),zo&&(fo+=`rotate(${zo}deg) `),Go&&(fo+=`rotateX(${Go}deg) `),Vo&&(fo+=`rotateY(${Vo}deg) `),Yo&&(fo+=`skewX(${Yo}deg) `),Xo&&(fo+=`skewY(${Xo}deg) `)}const jo=Mn.x.scale*Fn.x,Lo=Mn.y.scale*Fn.y;return(jo!==1||Lo!==1)&&(fo+=`scale(${jo}, ${Lo})`),fo||"none"}const compareByDepth=(Mn,Fn)=>Mn.depth-Fn.depth;class FlatTree{constructor(){this.children=[],this.isDirty=!1}add(Fn){addUniqueItem(this.children,Fn),this.isDirty=!0}remove(Fn){removeItem(this.children,Fn),this.isDirty=!0}forEach(Fn){this.isDirty&&this.children.sort(compareByDepth),this.isDirty=!1,this.children.forEach(Fn)}}function resolveMotionValue(Mn){const Fn=isMotionValue(Mn)?Mn.get():Mn;return isCustomValue(Fn)?Fn.toValue():Fn}function delay(Mn,Fn){const io=time.now(),fo=({timestamp:$o})=>{const mo=$o-io;mo>=Fn&&(cancelFrame(fo),Mn(mo-Fn))};return frame.read(fo,!0),()=>cancelFrame(fo)}function isSVGElement(Mn){return Mn instanceof SVGElement&&Mn.tagName!=="svg"}function animateSingleValue(Mn,Fn,io){const fo=isMotionValue(Mn)?Mn:motionValue(Mn);return fo.start(animateMotionValue("",fo,Fn,io)),fo.animation}const metrics={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},isDebug=typeof window<"u"&&window.MotionDebug!==void 0,transformAxes=["","X","Y","Z"],hiddenVisibility={visibility:"hidden"},animationTarget=1e3;let id=0;function resetDistortingTransform(Mn,Fn,io,fo){const{latestValues:$o}=Fn;$o[Mn]&&(io[Mn]=$o[Mn],Fn.setStaticValue(Mn,0),fo&&(fo[Mn]=0))}function cancelTreeOptimisedTransformAnimations(Mn){if(Mn.hasCheckedOptimisedAppear=!0,Mn.root===Mn)return;const{visualElement:Fn}=Mn.options;if(!Fn)return;const io=getOptimisedAppearId(Fn);if(window.MotionHasOptimisedAnimation(io,"transform")){const{layout:$o,layoutId:mo}=Mn.options;window.MotionCancelOptimisedAnimation(io,"transform",frame,!($o||mo))}const{parent:fo}=Mn;fo&&!fo.hasCheckedOptimisedAppear&&cancelTreeOptimisedTransformAnimations(fo)}function createProjectionNode$1({attachResizeListener:Mn,defaultParent:Fn,measureScroll:io,checkIsScrollRoot:fo,resetTransform:$o}){return class{constructor(Ao={},jo=Fn==null?void 0:Fn()){this.id=id++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,isDebug&&(metrics.totalNodes=metrics.resolvedTargetDeltas=metrics.recalculatedProjection=0),this.nodes.forEach(propagateDirtyNodes),this.nodes.forEach(resolveTargetDelta),this.nodes.forEach(calcProjection),this.nodes.forEach(cleanDirtyNodes),isDebug&&window.MotionDebug.record(metrics)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=Ao,this.root=jo?jo.root||jo:this,this.path=jo?[...jo.path,jo]:[],this.parent=jo,this.depth=jo?jo.depth+1:0;for(let Lo=0;Lo<this.path.length;Lo++)this.path[Lo].shouldResetTransform=!0;this.root===this&&(this.nodes=new FlatTree)}addEventListener(Ao,jo){return this.eventHandlers.has(Ao)||this.eventHandlers.set(Ao,new SubscriptionManager),this.eventHandlers.get(Ao).add(jo)}notifyListeners(Ao,...jo){const Lo=this.eventHandlers.get(Ao);Lo&&Lo.notify(...jo)}hasListeners(Ao){return this.eventHandlers.has(Ao)}mount(Ao,jo=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=isSVGElement(Ao),this.instance=Ao;const{layoutId:Lo,layout:Ho,visualElement:zo}=this.options;if(zo&&!zo.current&&zo.mount(Ao),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),jo&&(Ho||Lo)&&(this.isLayoutDirty=!0),Mn){let Go;const Vo=()=>this.root.updateBlockedByResize=!1;Mn(Ao,()=>{this.root.updateBlockedByResize=!0,Go&&Go(),Go=delay(Vo,250),globalProjectionState.hasAnimatedSinceResize&&(globalProjectionState.hasAnimatedSinceResize=!1,this.nodes.forEach(finishAnimation))})}Lo&&this.root.registerSharedNode(Lo,this),this.options.animate!==!1&&zo&&(Lo||Ho)&&this.addEventListener("didUpdate",({delta:Go,hasLayoutChanged:Vo,hasRelativeTargetChanged:Yo,layout:Xo})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const is=this.options.transition||zo.getDefaultTransition()||defaultLayoutTransition,{onLayoutAnimationStart:yl,onLayoutAnimationComplete:us}=zo.getProps(),hs=!this.targetLayout||!boxEqualsRounded(this.targetLayout,Xo)||Yo,_l=!Vo&&Yo;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||_l||Vo&&(hs||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(Go,_l);const xl={...getValueTransition(is,"layout"),onPlay:yl,onComplete:us};(zo.shouldReduceMotion||this.options.layoutRoot)&&(xl.delay=0,xl.type=!1),this.startAnimation(xl)}else Vo||finishAnimation(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=Xo})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const Ao=this.getStack();Ao&&Ao.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,cancelFrame(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(resetSkewAndRotation),this.animationId++)}getTransformTemplate(){const{visualElement:Ao}=this.options;return Ao&&Ao.getProps().transformTemplate}willUpdate(Ao=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&cancelTreeOptimisedTransformAnimations(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let zo=0;zo<this.path.length;zo++){const Go=this.path[zo];Go.shouldResetTransform=!0,Go.updateScroll("snapshot"),Go.options.layoutRoot&&Go.willUpdate(!1)}const{layoutId:jo,layout:Lo}=this.options;if(jo===void 0&&!Lo)return;const Ho=this.getTransformTemplate();this.prevTransformTemplateValue=Ho?Ho(this.latestValues,""):void 0,this.updateSnapshot(),Ao&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(clearMeasurements);return}this.isUpdating||this.nodes.forEach(clearIsLayoutDirty),this.isUpdating=!1,this.nodes.forEach(resetTransformStyle),this.nodes.forEach(updateLayout),this.nodes.forEach(notifyLayoutUpdate),this.clearAllSnapshots();const jo=time.now();frameData.delta=clamp(0,1e3/60,jo-frameData.timestamp),frameData.timestamp=jo,frameData.isProcessing=!0,frameSteps.update.process(frameData),frameSteps.preRender.process(frameData),frameSteps.render.process(frameData),frameData.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,microtask.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(clearSnapshot),this.sharedNodes.forEach(removeLeadSnapshots)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,frame.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){frame.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let Lo=0;Lo<this.path.length;Lo++)this.path[Lo].updateScroll();const Ao=this.layout;this.layout=this.measure(!1),this.layoutCorrected=createBox(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:jo}=this.options;jo&&jo.notify("LayoutMeasure",this.layout.layoutBox,Ao?Ao.layoutBox:void 0)}updateScroll(Ao="measure"){let jo=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===Ao&&(jo=!1),jo){const Lo=fo(this.instance);this.scroll={animationId:this.root.animationId,phase:Ao,isRoot:Lo,offset:io(this.instance),wasRoot:this.scroll?this.scroll.isRoot:Lo}}}resetTransform(){if(!$o)return;const Ao=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,jo=this.projectionDelta&&!isDeltaZero(this.projectionDelta),Lo=this.getTransformTemplate(),Ho=Lo?Lo(this.latestValues,""):void 0,zo=Ho!==this.prevTransformTemplateValue;Ao&&(jo||hasTransform(this.latestValues)||zo)&&($o(this.instance,Ho),this.shouldResetTransform=!1,this.scheduleRender())}measure(Ao=!0){const jo=this.measurePageBox();let Lo=this.removeElementScroll(jo);return Ao&&(Lo=this.removeTransform(Lo)),roundBox(Lo),{animationId:this.root.animationId,measuredBox:jo,layoutBox:Lo,latestValues:{},source:this.id}}measurePageBox(){var Ao;const{visualElement:jo}=this.options;if(!jo)return createBox();const Lo=jo.measureViewportBox();if(!(((Ao=this.scroll)===null||Ao===void 0?void 0:Ao.wasRoot)||this.path.some(checkNodeWasScrollRoot))){const{scroll:zo}=this.root;zo&&(translateAxis(Lo.x,zo.offset.x),translateAxis(Lo.y,zo.offset.y))}return Lo}removeElementScroll(Ao){var jo;const Lo=createBox();if(copyBoxInto(Lo,Ao),!((jo=this.scroll)===null||jo===void 0)&&jo.wasRoot)return Lo;for(let Ho=0;Ho<this.path.length;Ho++){const zo=this.path[Ho],{scroll:Go,options:Vo}=zo;zo!==this.root&&Go&&Vo.layoutScroll&&(Go.wasRoot&©BoxInto(Lo,Ao),translateAxis(Lo.x,Go.offset.x),translateAxis(Lo.y,Go.offset.y))}return Lo}applyTransform(Ao,jo=!1){const Lo=createBox();copyBoxInto(Lo,Ao);for(let Ho=0;Ho<this.path.length;Ho++){const zo=this.path[Ho];!jo&&zo.options.layoutScroll&&zo.scroll&&zo!==zo.root&&transformBox(Lo,{x:-zo.scroll.offset.x,y:-zo.scroll.offset.y}),hasTransform(zo.latestValues)&&transformBox(Lo,zo.latestValues)}return hasTransform(this.latestValues)&&transformBox(Lo,this.latestValues),Lo}removeTransform(Ao){const jo=createBox();copyBoxInto(jo,Ao);for(let Lo=0;Lo<this.path.length;Lo++){const Ho=this.path[Lo];if(!Ho.instance||!hasTransform(Ho.latestValues))continue;hasScale(Ho.latestValues)&&Ho.updateSnapshot();const zo=createBox(),Go=Ho.measurePageBox();copyBoxInto(zo,Go),removeBoxTransforms(jo,Ho.latestValues,Ho.snapshot?Ho.snapshot.layoutBox:void 0,zo)}return hasTransform(this.latestValues)&&removeBoxTransforms(jo,this.latestValues),jo}setTargetDelta(Ao){this.targetDelta=Ao,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(Ao){this.options={...this.options,...Ao,crossfade:Ao.crossfade!==void 0?Ao.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==frameData.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(Ao=!1){var jo;const Lo=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=Lo.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=Lo.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=Lo.isSharedProjectionDirty);const Ho=!!this.resumingFrom||this!==Lo;if(!(Ao||Ho&&this.isSharedProjectionDirty||this.isProjectionDirty||!((jo=this.parent)===null||jo===void 0)&&jo.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:Go,layoutId:Vo}=this.options;if(!(!this.layout||!(Go||Vo))){if(this.resolvedRelativeTargetAt=frameData.timestamp,!this.targetDelta&&!this.relativeTarget){const Yo=this.getClosestProjectingParent();Yo&&Yo.layout&&this.animationProgress!==1?(this.relativeParent=Yo,this.forceRelativeParentToResolveTarget(),this.relativeTarget=createBox(),this.relativeTargetOrigin=createBox(),calcRelativePosition(this.relativeTargetOrigin,this.layout.layoutBox,Yo.layout.layoutBox),copyBoxInto(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=createBox(),this.targetWithTransforms=createBox()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),calcRelativeBox(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):copyBoxInto(this.target,this.layout.layoutBox),applyBoxDelta(this.target,this.targetDelta)):copyBoxInto(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const Yo=this.getClosestProjectingParent();Yo&&!!Yo.resumingFrom==!!this.resumingFrom&&!Yo.options.layoutScroll&&Yo.target&&this.animationProgress!==1?(this.relativeParent=Yo,this.forceRelativeParentToResolveTarget(),this.relativeTarget=createBox(),this.relativeTargetOrigin=createBox(),calcRelativePosition(this.relativeTargetOrigin,this.target,Yo.target),copyBoxInto(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}isDebug&&metrics.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||hasScale(this.parent.latestValues)||has2DTranslate(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var Ao;const jo=this.getLead(),Lo=!!this.resumingFrom||this!==jo;let Ho=!0;if((this.isProjectionDirty||!((Ao=this.parent)===null||Ao===void 0)&&Ao.isProjectionDirty)&&(Ho=!1),Lo&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(Ho=!1),this.resolvedRelativeTargetAt===frameData.timestamp&&(Ho=!1),Ho)return;const{layout:zo,layoutId:Go}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(zo||Go))return;copyBoxInto(this.layoutCorrected,this.layout.layoutBox);const Vo=this.treeScale.x,Yo=this.treeScale.y;applyTreeDeltas(this.layoutCorrected,this.treeScale,this.path,Lo),jo.layout&&!jo.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(jo.target=jo.layout.layoutBox,jo.targetWithTransforms=createBox());const{target:Xo}=jo;if(!Xo){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(copyAxisDeltaInto(this.prevProjectionDelta.x,this.projectionDelta.x),copyAxisDeltaInto(this.prevProjectionDelta.y,this.projectionDelta.y)),calcBoxDelta(this.projectionDelta,this.layoutCorrected,Xo,this.latestValues),(this.treeScale.x!==Vo||this.treeScale.y!==Yo||!axisDeltaEquals(this.projectionDelta.x,this.prevProjectionDelta.x)||!axisDeltaEquals(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",Xo)),isDebug&&metrics.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(Ao=!0){var jo;if((jo=this.options.visualElement)===null||jo===void 0||jo.scheduleRender(),Ao){const Lo=this.getStack();Lo&&Lo.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=createDelta(),this.projectionDelta=createDelta(),this.projectionDeltaWithTransform=createDelta()}setAnimationOrigin(Ao,jo=!1){const Lo=this.snapshot,Ho=Lo?Lo.latestValues:{},zo={...this.latestValues},Go=createDelta();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!jo;const Vo=createBox(),Yo=Lo?Lo.source:void 0,Xo=this.layout?this.layout.source:void 0,is=Yo!==Xo,yl=this.getStack(),us=!yl||yl.members.length<=1,hs=!!(is&&!us&&this.options.crossfade===!0&&!this.path.some(hasOpacityCrossfade));this.animationProgress=0;let _l;this.mixTargetDelta=xl=>{const Il=xl/1e3;mixAxisDelta(Go.x,Ao.x,Il),mixAxisDelta(Go.y,Ao.y,Il),this.setTargetDelta(Go),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(calcRelativePosition(Vo,this.layout.layoutBox,this.relativeParent.layout.layoutBox),mixBox(this.relativeTarget,this.relativeTargetOrigin,Vo,Il),_l&&boxEquals(this.relativeTarget,_l)&&(this.isProjectionDirty=!1),_l||(_l=createBox()),copyBoxInto(_l,this.relativeTarget)),is&&(this.animationValues=zo,mixValues(zo,Ho,this.latestValues,Il,hs,us)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=Il},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(Ao){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(cancelFrame(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=frame.update(()=>{globalProjectionState.hasAnimatedSinceResize=!0,this.currentAnimation=animateSingleValue(0,animationTarget,{...Ao,onUpdate:jo=>{this.mixTargetDelta(jo),Ao.onUpdate&&Ao.onUpdate(jo)},onComplete:()=>{Ao.onComplete&&Ao.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const Ao=this.getStack();Ao&&Ao.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(animationTarget),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const Ao=this.getLead();let{targetWithTransforms:jo,target:Lo,layout:Ho,latestValues:zo}=Ao;if(!(!jo||!Lo||!Ho)){if(this!==Ao&&this.layout&&Ho&&shouldAnimatePositionOnly(this.options.animationType,this.layout.layoutBox,Ho.layoutBox)){Lo=this.target||createBox();const Go=calcLength(this.layout.layoutBox.x);Lo.x.min=Ao.target.x.min,Lo.x.max=Lo.x.min+Go;const Vo=calcLength(this.layout.layoutBox.y);Lo.y.min=Ao.target.y.min,Lo.y.max=Lo.y.min+Vo}copyBoxInto(jo,Lo),transformBox(jo,zo),calcBoxDelta(this.projectionDeltaWithTransform,this.layoutCorrected,jo,zo)}}registerSharedNode(Ao,jo){this.sharedNodes.has(Ao)||this.sharedNodes.set(Ao,new NodeStack),this.sharedNodes.get(Ao).add(jo);const Ho=jo.options.initialPromotionConfig;jo.promote({transition:Ho?Ho.transition:void 0,preserveFollowOpacity:Ho&&Ho.shouldPreserveFollowOpacity?Ho.shouldPreserveFollowOpacity(jo):void 0})}isLead(){const Ao=this.getStack();return Ao?Ao.lead===this:!0}getLead(){var Ao;const{layoutId:jo}=this.options;return jo?((Ao=this.getStack())===null||Ao===void 0?void 0:Ao.lead)||this:this}getPrevLead(){var Ao;const{layoutId:jo}=this.options;return jo?(Ao=this.getStack())===null||Ao===void 0?void 0:Ao.prevLead:void 0}getStack(){const{layoutId:Ao}=this.options;if(Ao)return this.root.sharedNodes.get(Ao)}promote({needsReset:Ao,transition:jo,preserveFollowOpacity:Lo}={}){const Ho=this.getStack();Ho&&Ho.promote(this,Lo),Ao&&(this.projectionDelta=void 0,this.needsReset=!0),jo&&this.setOptions({transition:jo})}relegate(){const Ao=this.getStack();return Ao?Ao.relegate(this):!1}resetSkewAndRotation(){const{visualElement:Ao}=this.options;if(!Ao)return;let jo=!1;const{latestValues:Lo}=Ao;if((Lo.z||Lo.rotate||Lo.rotateX||Lo.rotateY||Lo.rotateZ||Lo.skewX||Lo.skewY)&&(jo=!0),!jo)return;const Ho={};Lo.z&&resetDistortingTransform("z",Ao,Ho,this.animationValues);for(let zo=0;zo<transformAxes.length;zo++)resetDistortingTransform(`rotate${transformAxes[zo]}`,Ao,Ho,this.animationValues),resetDistortingTransform(`skew${transformAxes[zo]}`,Ao,Ho,this.animationValues);Ao.render();for(const zo in Ho)Ao.setStaticValue(zo,Ho[zo]),this.animationValues&&(this.animationValues[zo]=Ho[zo]);Ao.scheduleRender()}getProjectionStyles(Ao){var jo,Lo;if(!this.instance||this.isSVG)return;if(!this.isVisible)return hiddenVisibility;const Ho={visibility:""},zo=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,Ho.opacity="",Ho.pointerEvents=resolveMotionValue(Ao==null?void 0:Ao.pointerEvents)||"",Ho.transform=zo?zo(this.latestValues,""):"none",Ho;const Go=this.getLead();if(!this.projectionDelta||!this.layout||!Go.target){const is={};return this.options.layoutId&&(is.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,is.pointerEvents=resolveMotionValue(Ao==null?void 0:Ao.pointerEvents)||""),this.hasProjected&&!hasTransform(this.latestValues)&&(is.transform=zo?zo({},""):"none",this.hasProjected=!1),is}const Vo=Go.animationValues||Go.latestValues;this.applyTransformsToTarget(),Ho.transform=buildProjectionTransform(this.projectionDeltaWithTransform,this.treeScale,Vo),zo&&(Ho.transform=zo(Vo,Ho.transform));const{x:Yo,y:Xo}=this.projectionDelta;Ho.transformOrigin=`${Yo.origin*100}% ${Xo.origin*100}% 0`,Go.animationValues?Ho.opacity=Go===this?(Lo=(jo=Vo.opacity)!==null&&jo!==void 0?jo:this.latestValues.opacity)!==null&&Lo!==void 0?Lo:1:this.preserveOpacity?this.latestValues.opacity:Vo.opacityExit:Ho.opacity=Go===this?Vo.opacity!==void 0?Vo.opacity:"":Vo.opacityExit!==void 0?Vo.opacityExit:0;for(const is in scaleCorrectors){if(Vo[is]===void 0)continue;const{correct:yl,applyTo:us}=scaleCorrectors[is],hs=Ho.transform==="none"?Vo[is]:yl(Vo[is],Go);if(us){const _l=us.length;for(let xl=0;xl<_l;xl++)Ho[us[xl]]=hs}else Ho[is]=hs}return this.options.layoutId&&(Ho.pointerEvents=Go===this?resolveMotionValue(Ao==null?void 0:Ao.pointerEvents)||"":"none"),Ho}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(Ao=>{var jo;return(jo=Ao.currentAnimation)===null||jo===void 0?void 0:jo.stop()}),this.root.nodes.forEach(clearMeasurements),this.root.sharedNodes.clear()}}}function updateLayout(Mn){Mn.updateLayout()}function notifyLayoutUpdate(Mn){var Fn;const io=((Fn=Mn.resumeFrom)===null||Fn===void 0?void 0:Fn.snapshot)||Mn.snapshot;if(Mn.isLead()&&Mn.layout&&io&&Mn.hasListeners("didUpdate")){const{layoutBox:fo,measuredBox:$o}=Mn.layout,{animationType:mo}=Mn.options,Ao=io.source!==Mn.layout.source;mo==="size"?eachAxis(Go=>{const Vo=Ao?io.measuredBox[Go]:io.layoutBox[Go],Yo=calcLength(Vo);Vo.min=fo[Go].min,Vo.max=Vo.min+Yo}):shouldAnimatePositionOnly(mo,io.layoutBox,fo)&&eachAxis(Go=>{const Vo=Ao?io.measuredBox[Go]:io.layoutBox[Go],Yo=calcLength(fo[Go]);Vo.max=Vo.min+Yo,Mn.relativeTarget&&!Mn.currentAnimation&&(Mn.isProjectionDirty=!0,Mn.relativeTarget[Go].max=Mn.relativeTarget[Go].min+Yo)});const jo=createDelta();calcBoxDelta(jo,fo,io.layoutBox);const Lo=createDelta();Ao?calcBoxDelta(Lo,Mn.applyTransform($o,!0),io.measuredBox):calcBoxDelta(Lo,fo,io.layoutBox);const Ho=!isDeltaZero(jo);let zo=!1;if(!Mn.resumeFrom){const Go=Mn.getClosestProjectingParent();if(Go&&!Go.resumeFrom){const{snapshot:Vo,layout:Yo}=Go;if(Vo&&Yo){const Xo=createBox();calcRelativePosition(Xo,io.layoutBox,Vo.layoutBox);const is=createBox();calcRelativePosition(is,fo,Yo.layoutBox),boxEqualsRounded(Xo,is)||(zo=!0),Go.options.layoutRoot&&(Mn.relativeTarget=is,Mn.relativeTargetOrigin=Xo,Mn.relativeParent=Go)}}}Mn.notifyListeners("didUpdate",{layout:fo,snapshot:io,delta:Lo,layoutDelta:jo,hasLayoutChanged:Ho,hasRelativeTargetChanged:zo})}else if(Mn.isLead()){const{onExitComplete:fo}=Mn.options;fo&&fo()}Mn.options.transition=void 0}function propagateDirtyNodes(Mn){isDebug&&metrics.totalNodes++,Mn.parent&&(Mn.isProjecting()||(Mn.isProjectionDirty=Mn.parent.isProjectionDirty),Mn.isSharedProjectionDirty||(Mn.isSharedProjectionDirty=!!(Mn.isProjectionDirty||Mn.parent.isProjectionDirty||Mn.parent.isSharedProjectionDirty)),Mn.isTransformDirty||(Mn.isTransformDirty=Mn.parent.isTransformDirty))}function cleanDirtyNodes(Mn){Mn.isProjectionDirty=Mn.isSharedProjectionDirty=Mn.isTransformDirty=!1}function clearSnapshot(Mn){Mn.clearSnapshot()}function clearMeasurements(Mn){Mn.clearMeasurements()}function clearIsLayoutDirty(Mn){Mn.isLayoutDirty=!1}function resetTransformStyle(Mn){const{visualElement:Fn}=Mn.options;Fn&&Fn.getProps().onBeforeLayoutMeasure&&Fn.notify("BeforeLayoutMeasure"),Mn.resetTransform()}function finishAnimation(Mn){Mn.finishAnimation(),Mn.targetDelta=Mn.relativeTarget=Mn.target=void 0,Mn.isProjectionDirty=!0}function resolveTargetDelta(Mn){Mn.resolveTargetDelta()}function calcProjection(Mn){Mn.calcProjection()}function resetSkewAndRotation(Mn){Mn.resetSkewAndRotation()}function removeLeadSnapshots(Mn){Mn.removeLeadSnapshot()}function mixAxisDelta(Mn,Fn,io){Mn.translate=mixNumber$1(Fn.translate,0,io),Mn.scale=mixNumber$1(Fn.scale,1,io),Mn.origin=Fn.origin,Mn.originPoint=Fn.originPoint}function mixAxis(Mn,Fn,io,fo){Mn.min=mixNumber$1(Fn.min,io.min,fo),Mn.max=mixNumber$1(Fn.max,io.max,fo)}function mixBox(Mn,Fn,io,fo){mixAxis(Mn.x,Fn.x,io.x,fo),mixAxis(Mn.y,Fn.y,io.y,fo)}function hasOpacityCrossfade(Mn){return Mn.animationValues&&Mn.animationValues.opacityExit!==void 0}const defaultLayoutTransition={duration:.45,ease:[.4,0,.1,1]},userAgentContains=Mn=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(Mn),roundPoint=userAgentContains("applewebkit/")&&!userAgentContains("chrome/")?Math.round:noop;function roundAxis(Mn){Mn.min=roundPoint(Mn.min),Mn.max=roundPoint(Mn.max)}function roundBox(Mn){roundAxis(Mn.x),roundAxis(Mn.y)}function shouldAnimatePositionOnly(Mn,Fn,io){return Mn==="position"||Mn==="preserve-aspect"&&!isNear(aspectRatio(Fn),aspectRatio(io),.2)}function checkNodeWasScrollRoot(Mn){var Fn;return Mn!==Mn.root&&((Fn=Mn.scroll)===null||Fn===void 0?void 0:Fn.wasRoot)}const DocumentProjectionNode=createProjectionNode$1({attachResizeListener:(Mn,Fn)=>addDomEvent(Mn,"resize",Fn),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),rootProjectionNode={current:void 0},HTMLProjectionNode=createProjectionNode$1({measureScroll:Mn=>({x:Mn.scrollLeft,y:Mn.scrollTop}),defaultParent:()=>{if(!rootProjectionNode.current){const Mn=new DocumentProjectionNode({});Mn.mount(window),Mn.setOptions({layoutScroll:!0}),rootProjectionNode.current=Mn}return rootProjectionNode.current},resetTransform:(Mn,Fn)=>{Mn.style.transform=Fn!==void 0?Fn:"none"},checkIsScrollRoot:Mn=>window.getComputedStyle(Mn).position==="fixed"}),drag={pan:{Feature:PanGesture},drag:{Feature:DragGesture,ProjectionNode:HTMLProjectionNode,MeasureLayout}};function addHoverEvent(Mn,Fn){const io=Fn?"pointerenter":"pointerleave",fo=Fn?"onHoverStart":"onHoverEnd",$o=(mo,Ao)=>{if(mo.pointerType==="touch"||isDragActive())return;const jo=Mn.getProps();Mn.animationState&&jo.whileHover&&Mn.animationState.setActive("whileHover",Fn);const Lo=jo[fo];Lo&&frame.postRender(()=>Lo(mo,Ao))};return addPointerEvent(Mn.current,io,$o,{passive:!Mn.getProps()[fo]})}class HoverGesture extends Feature{mount(){this.unmount=pipe(addHoverEvent(this.node,!0),addHoverEvent(this.node,!1))}unmount(){}}class FocusGesture extends Feature{constructor(){super(...arguments),this.isActive=!1}onFocus(){let Fn=!1;try{Fn=this.node.current.matches(":focus-visible")}catch{Fn=!0}!Fn||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=pipe(addDomEvent(this.node.current,"focus",()=>this.onFocus()),addDomEvent(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const isNodeOrChild=(Mn,Fn)=>Fn?Mn===Fn?!0:isNodeOrChild(Mn,Fn.parentElement):!1;function fireSyntheticPointerEvent(Mn,Fn){if(!Fn)return;const io=new PointerEvent("pointer"+Mn);Fn(io,extractEventInfo(io))}class PressGesture extends Feature{constructor(){super(...arguments),this.removeStartListeners=noop,this.removeEndListeners=noop,this.removeAccessibleListeners=noop,this.startPointerPress=(Fn,io)=>{if(this.isPressing)return;this.removeEndListeners();const fo=this.node.getProps(),mo=addPointerEvent(window,"pointerup",(jo,Lo)=>{if(!this.checkPressEnd())return;const{onTap:Ho,onTapCancel:zo,globalTapTarget:Go}=this.node.getProps(),Vo=!Go&&!isNodeOrChild(this.node.current,jo.target)?zo:Ho;Vo&&frame.update(()=>Vo(jo,Lo))},{passive:!(fo.onTap||fo.onPointerUp)}),Ao=addPointerEvent(window,"pointercancel",(jo,Lo)=>this.cancelPress(jo,Lo),{passive:!(fo.onTapCancel||fo.onPointerCancel)});this.removeEndListeners=pipe(mo,Ao),this.startPress(Fn,io)},this.startAccessiblePress=()=>{const Fn=mo=>{if(mo.key!=="Enter"||this.isPressing)return;const Ao=jo=>{jo.key!=="Enter"||!this.checkPressEnd()||fireSyntheticPointerEvent("up",(Lo,Ho)=>{const{onTap:zo}=this.node.getProps();zo&&frame.postRender(()=>zo(Lo,Ho))})};this.removeEndListeners(),this.removeEndListeners=addDomEvent(this.node.current,"keyup",Ao),fireSyntheticPointerEvent("down",(jo,Lo)=>{this.startPress(jo,Lo)})},io=addDomEvent(this.node.current,"keydown",Fn),fo=()=>{this.isPressing&&fireSyntheticPointerEvent("cancel",(mo,Ao)=>this.cancelPress(mo,Ao))},$o=addDomEvent(this.node.current,"blur",fo);this.removeAccessibleListeners=pipe(io,$o)}}startPress(Fn,io){this.isPressing=!0;const{onTapStart:fo,whileTap:$o}=this.node.getProps();$o&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),fo&&frame.postRender(()=>fo(Fn,io))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!isDragActive()}cancelPress(Fn,io){if(!this.checkPressEnd())return;const{onTapCancel:fo}=this.node.getProps();fo&&frame.postRender(()=>fo(Fn,io))}mount(){const Fn=this.node.getProps(),io=addPointerEvent(Fn.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(Fn.onTapStart||Fn.onPointerStart)}),fo=addDomEvent(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=pipe(io,fo)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const observerCallbacks=new WeakMap,observers=new WeakMap,fireObserverCallback=Mn=>{const Fn=observerCallbacks.get(Mn.target);Fn&&Fn(Mn)},fireAllObserverCallbacks=Mn=>{Mn.forEach(fireObserverCallback)};function initIntersectionObserver({root:Mn,...Fn}){const io=Mn||document;observers.has(io)||observers.set(io,{});const fo=observers.get(io),$o=JSON.stringify(Fn);return fo[$o]||(fo[$o]=new IntersectionObserver(fireAllObserverCallbacks,{root:Mn,...Fn})),fo[$o]}function observeIntersection(Mn,Fn,io){const fo=initIntersectionObserver(Fn);return observerCallbacks.set(Mn,io),fo.observe(Mn),()=>{observerCallbacks.delete(Mn),fo.unobserve(Mn)}}const thresholdNames={some:0,all:1};class InViewFeature extends Feature{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:Fn={}}=this.node.getProps(),{root:io,margin:fo,amount:$o="some",once:mo}=Fn,Ao={root:io?io.current:void 0,rootMargin:fo,threshold:typeof $o=="number"?$o:thresholdNames[$o]},jo=Lo=>{const{isIntersecting:Ho}=Lo;if(this.isInView===Ho||(this.isInView=Ho,mo&&!Ho&&this.hasEnteredView))return;Ho&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",Ho);const{onViewportEnter:zo,onViewportLeave:Go}=this.node.getProps(),Vo=Ho?zo:Go;Vo&&Vo(Lo)};return observeIntersection(this.node.current,Ao,jo)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:Fn,prevProps:io}=this.node;["amount","margin","root"].some(hasViewportOptionChanged(Fn,io))&&this.startObserver()}unmount(){}}function hasViewportOptionChanged({viewport:Mn={}},{viewport:Fn={}}={}){return io=>Mn[io]!==Fn[io]}const gestureAnimations={inView:{Feature:InViewFeature},tap:{Feature:PressGesture},focus:{Feature:FocusGesture},hover:{Feature:HoverGesture}},layout={layout:{ProjectionNode:HTMLProjectionNode,MeasureLayout}},MotionConfigContext=reactExports$1.createContext({transformPagePoint:Mn=>Mn,isStatic:!1,reducedMotion:"never"}),MotionContext=reactExports$1.createContext({}),isBrowser=typeof window<"u",useIsomorphicLayoutEffect=isBrowser?reactExports$1.useLayoutEffect:reactExports$1.useEffect,LazyContext=reactExports$1.createContext({strict:!1});function useVisualElement(Mn,Fn,io,fo,$o){var mo,Ao;const{visualElement:jo}=reactExports$1.useContext(MotionContext),Lo=reactExports$1.useContext(LazyContext),Ho=reactExports$1.useContext(PresenceContext),zo=reactExports$1.useContext(MotionConfigContext).reducedMotion,Go=reactExports$1.useRef();fo=fo||Lo.renderer,!Go.current&&fo&&(Go.current=fo(Mn,{visualState:Fn,parent:jo,props:io,presenceContext:Ho,blockInitialAnimation:Ho?Ho.initial===!1:!1,reducedMotionConfig:zo}));const Vo=Go.current,Yo=reactExports$1.useContext(SwitchLayoutGroupContext);Vo&&!Vo.projection&&$o&&(Vo.type==="html"||Vo.type==="svg")&&createProjectionNode(Go.current,io,$o,Yo),reactExports$1.useInsertionEffect(()=>{Vo&&Vo.update(io,Ho)});const Xo=io[optimizedAppearDataAttribute],is=reactExports$1.useRef(!!Xo&&!(!((mo=window.MotionHandoffIsComplete)===null||mo===void 0)&&mo.call(window,Xo))&&((Ao=window.MotionHasOptimisedAnimation)===null||Ao===void 0?void 0:Ao.call(window,Xo)));return useIsomorphicLayoutEffect(()=>{Vo&&(window.MotionIsMounted=!0,Vo.updateFeatures(),microtask.render(Vo.render),is.current&&Vo.animationState&&Vo.animationState.animateChanges())}),reactExports$1.useEffect(()=>{Vo&&(!is.current&&Vo.animationState&&Vo.animationState.animateChanges(),is.current&&(queueMicrotask(()=>{var yl;(yl=window.MotionHandoffMarkAsComplete)===null||yl===void 0||yl.call(window,Xo)}),is.current=!1))}),Vo}function createProjectionNode(Mn,Fn,io,fo){const{layoutId:$o,layout:mo,drag:Ao,dragConstraints:jo,layoutScroll:Lo,layoutRoot:Ho}=Fn;Mn.projection=new io(Mn.latestValues,Fn["data-framer-portal-id"]?void 0:getClosestProjectingNode(Mn.parent)),Mn.projection.setOptions({layoutId:$o,layout:mo,alwaysMeasureLayout:!!Ao||jo&&isRefObject(jo),visualElement:Mn,animationType:typeof mo=="string"?mo:"both",initialPromotionConfig:fo,layoutScroll:Lo,layoutRoot:Ho})}function getClosestProjectingNode(Mn){if(Mn)return Mn.options.allowProjection!==!1?Mn.projection:getClosestProjectingNode(Mn.parent)}function useMotionRef(Mn,Fn,io){return reactExports$1.useCallback(fo=>{fo&&Mn.mount&&Mn.mount(fo),Fn&&(fo?Fn.mount(fo):Fn.unmount()),io&&(typeof io=="function"?io(fo):isRefObject(io)&&(io.current=fo))},[Fn])}function isControllingVariants(Mn){return isAnimationControls(Mn.animate)||variantProps.some(Fn=>isVariantLabel(Mn[Fn]))}function isVariantNode(Mn){return!!(isControllingVariants(Mn)||Mn.variants)}function getCurrentTreeVariants(Mn,Fn){if(isControllingVariants(Mn)){const{initial:io,animate:fo}=Mn;return{initial:io===!1||isVariantLabel(io)?io:void 0,animate:isVariantLabel(fo)?fo:void 0}}return Mn.inherit!==!1?Fn:{}}function useCreateMotionContext(Mn){const{initial:Fn,animate:io}=getCurrentTreeVariants(Mn,reactExports$1.useContext(MotionContext));return reactExports$1.useMemo(()=>({initial:Fn,animate:io}),[variantLabelsAsDependency(Fn),variantLabelsAsDependency(io)])}function variantLabelsAsDependency(Mn){return Array.isArray(Mn)?Mn.join(" "):Mn}const featureProps={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},featureDefinitions={};for(const Mn in featureProps)featureDefinitions[Mn]={isEnabled:Fn=>featureProps[Mn].some(io=>!!Fn[io])};function loadFeatures(Mn){for(const Fn in Mn)featureDefinitions[Fn]={...featureDefinitions[Fn],...Mn[Fn]}}const motionComponentSymbol=Symbol.for("motionComponentSymbol");function createRendererMotionComponent({preloadedFeatures:Mn,createVisualElement:Fn,useRender:io,useVisualState:fo,Component:$o}){Mn&&loadFeatures(Mn);function mo(jo,Lo){let Ho;const zo={...reactExports$1.useContext(MotionConfigContext),...jo,layoutId:useLayoutId(jo)},{isStatic:Go}=zo,Vo=useCreateMotionContext(jo),Yo=fo(jo,Go);if(!Go&&isBrowser){useStrictMode();const Xo=getProjectionFunctionality(zo);Ho=Xo.MeasureLayout,Vo.visualElement=useVisualElement($o,Yo,zo,Fn,Xo.ProjectionNode)}return jsxRuntimeExports$1.jsxs(MotionContext.Provider,{value:Vo,children:[Ho&&Vo.visualElement?jsxRuntimeExports$1.jsx(Ho,{visualElement:Vo.visualElement,...zo}):null,io($o,jo,useMotionRef(Yo,Vo.visualElement,Lo),Yo,Go,Vo.visualElement)]})}const Ao=reactExports$1.forwardRef(mo);return Ao[motionComponentSymbol]=$o,Ao}function useLayoutId({layoutId:Mn}){const Fn=reactExports$1.useContext(LayoutGroupContext).id;return Fn&&Mn!==void 0?Fn+"-"+Mn:Mn}function useStrictMode(Mn,Fn){reactExports$1.useContext(LazyContext).strict}function getProjectionFunctionality(Mn){const{drag:Fn,layout:io}=featureDefinitions;if(!Fn&&!io)return{};const fo={...Fn,...io};return{MeasureLayout:Fn!=null&&Fn.isEnabled(Mn)||io!=null&&io.isEnabled(Mn)?fo.MeasureLayout:void 0,ProjectionNode:fo.ProjectionNode}}const lowercaseSVGElements=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function isSVGComponent(Mn){return typeof Mn!="string"||Mn.includes("-")?!1:!!(lowercaseSVGElements.indexOf(Mn)>-1||/[A-Z]/u.test(Mn))}function renderHTML(Mn,{style:Fn,vars:io},fo,$o){Object.assign(Mn.style,Fn,$o&&$o.getProjectionStyles(fo));for(const mo in io)Mn.style.setProperty(mo,io[mo])}const camelCaseAttributes=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function renderSVG(Mn,Fn,io,fo){renderHTML(Mn,Fn,void 0,fo);for(const $o in Fn.attrs)Mn.setAttribute(camelCaseAttributes.has($o)?$o:camelToDash($o),Fn.attrs[$o])}function isForcedMotionValue(Mn,{layout:Fn,layoutId:io}){return transformProps.has(Mn)||Mn.startsWith("origin")||(Fn||io!==void 0)&&(!!scaleCorrectors[Mn]||Mn==="opacity")}function scrapeMotionValuesFromProps$1(Mn,Fn,io){var fo;const{style:$o}=Mn,mo={};for(const Ao in $o)(isMotionValue($o[Ao])||Fn.style&&isMotionValue(Fn.style[Ao])||isForcedMotionValue(Ao,Mn)||((fo=io==null?void 0:io.getValue(Ao))===null||fo===void 0?void 0:fo.liveStyle)!==void 0)&&(mo[Ao]=$o[Ao]);return io&&$o&&typeof $o.willChange=="string"&&(io.applyWillChange=!1),mo}function scrapeMotionValuesFromProps(Mn,Fn,io){const fo=scrapeMotionValuesFromProps$1(Mn,Fn,io);for(const $o in Mn)if(isMotionValue(Mn[$o])||isMotionValue(Fn[$o])){const mo=transformPropOrder.indexOf($o)!==-1?"attr"+$o.charAt(0).toUpperCase()+$o.substring(1):$o;fo[mo]=Mn[$o]}return fo}function useConstant(Mn){const Fn=reactExports$1.useRef(null);return Fn.current===null&&(Fn.current=Mn()),Fn.current}function getWillChangeName(Mn){if(transformProps.has(Mn))return"transform";if(acceleratedValues.has(Mn))return camelToDash(Mn)}function makeState({applyWillChange:Mn=!1,scrapeMotionValuesFromProps:Fn,createRenderState:io,onMount:fo},$o,mo,Ao,jo){const Lo={latestValues:makeLatestValues($o,mo,Ao,jo?!1:Mn,Fn),renderState:io()};return fo&&(Lo.mount=Ho=>fo($o,Ho,Lo)),Lo}const makeUseVisualState=Mn=>(Fn,io)=>{const fo=reactExports$1.useContext(MotionContext),$o=reactExports$1.useContext(PresenceContext),mo=()=>makeState(Mn,Fn,fo,$o,io);return io?mo():useConstant(mo)};function forEachDefinition(Mn,Fn,io){const fo=Array.isArray(Fn)?Fn:[Fn];for(let $o=0;$o<fo.length;$o++){const mo=resolveVariantFromProps(Mn,fo[$o]);if(mo){const{transitionEnd:Ao,transition:jo,...Lo}=mo;io(Lo,Ao)}}}function makeLatestValues(Mn,Fn,io,fo,$o){var mo;const Ao={},jo=new Set,Lo=fo&&((mo=Mn.style)===null||mo===void 0?void 0:mo.willChange)===void 0,Ho=$o(Mn,{});for(const yl in Ho)Ao[yl]=resolveMotionValue(Ho[yl]);let{initial:zo,animate:Go}=Mn;const Vo=isControllingVariants(Mn),Yo=isVariantNode(Mn);Fn&&Yo&&!Vo&&Mn.inherit!==!1&&(zo===void 0&&(zo=Fn.initial),Go===void 0&&(Go=Fn.animate));let Xo=io?io.initial===!1:!1;Xo=Xo||zo===!1;const is=Xo?Go:zo;return is&&typeof is!="boolean"&&!isAnimationControls(is)&&forEachDefinition(Mn,is,(yl,us)=>{for(const hs in yl){let _l=yl[hs];if(Array.isArray(_l)){const xl=Xo?_l.length-1:0;_l=_l[xl]}_l!==null&&(Ao[hs]=_l)}for(const hs in us)Ao[hs]=us[hs]}),Lo&&(Go&&zo!==!1&&!isAnimationControls(Go)&&forEachDefinition(Mn,Go,yl=>{for(const us in yl){const hs=getWillChangeName(us);hs&&jo.add(hs)}}),jo.size&&(Ao.willChange=Array.from(jo).join(","))),Ao}const createHtmlRenderState=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),createSvgRenderState=()=>({...createHtmlRenderState(),attrs:{}}),getValueAsType=(Mn,Fn)=>Fn&&typeof Mn=="number"?Fn.transform(Mn):Mn,translateAlias={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},numTransforms=transformPropOrder.length;function buildTransform(Mn,Fn,io){let fo="",$o=!0;for(let mo=0;mo<numTransforms;mo++){const Ao=transformPropOrder[mo],jo=Mn[Ao];if(jo===void 0)continue;let Lo=!0;if(typeof jo=="number"?Lo=jo===(Ao.startsWith("scale")?1:0):Lo=parseFloat(jo)===0,!Lo||io){const Ho=getValueAsType(jo,numberValueTypes[Ao]);if(!Lo){$o=!1;const zo=translateAlias[Ao]||Ao;fo+=`${zo}(${Ho}) `}io&&(Fn[Ao]=Ho)}}return fo=fo.trim(),io?fo=io(Fn,$o?"":fo):$o&&(fo="none"),fo}function buildHTMLStyles(Mn,Fn,io){const{style:fo,vars:$o,transformOrigin:mo}=Mn;let Ao=!1,jo=!1;for(const Lo in Fn){const Ho=Fn[Lo];if(transformProps.has(Lo)){Ao=!0;continue}else if(isCSSVariableName(Lo)){$o[Lo]=Ho;continue}else{const zo=getValueAsType(Ho,numberValueTypes[Lo]);Lo.startsWith("origin")?(jo=!0,mo[Lo]=zo):fo[Lo]=zo}}if(Fn.transform||(Ao||io?fo.transform=buildTransform(Fn,Mn.transform,io):fo.transform&&(fo.transform="none")),jo){const{originX:Lo="50%",originY:Ho="50%",originZ:zo=0}=mo;fo.transformOrigin=`${Lo} ${Ho} ${zo}`}}function calcOrigin(Mn,Fn,io){return typeof Mn=="string"?Mn:px.transform(Fn+io*Mn)}function calcSVGTransformOrigin(Mn,Fn,io){const fo=calcOrigin(Fn,Mn.x,Mn.width),$o=calcOrigin(io,Mn.y,Mn.height);return`${fo} ${$o}`}const dashKeys={offset:"stroke-dashoffset",array:"stroke-dasharray"},camelKeys={offset:"strokeDashoffset",array:"strokeDasharray"};function buildSVGPath(Mn,Fn,io=1,fo=0,$o=!0){Mn.pathLength=1;const mo=$o?dashKeys:camelKeys;Mn[mo.offset]=px.transform(-fo);const Ao=px.transform(Fn),jo=px.transform(io);Mn[mo.array]=`${Ao} ${jo}`}function buildSVGAttrs(Mn,{attrX:Fn,attrY:io,attrScale:fo,originX:$o,originY:mo,pathLength:Ao,pathSpacing:jo=1,pathOffset:Lo=0,...Ho},zo,Go){if(buildHTMLStyles(Mn,Ho,Go),zo){Mn.style.viewBox&&(Mn.attrs.viewBox=Mn.style.viewBox);return}Mn.attrs=Mn.style,Mn.style={};const{attrs:Vo,style:Yo,dimensions:Xo}=Mn;Vo.transform&&(Xo&&(Yo.transform=Vo.transform),delete Vo.transform),Xo&&($o!==void 0||mo!==void 0||Yo.transform)&&(Yo.transformOrigin=calcSVGTransformOrigin(Xo,$o!==void 0?$o:.5,mo!==void 0?mo:.5)),Fn!==void 0&&(Vo.x=Fn),io!==void 0&&(Vo.y=io),fo!==void 0&&(Vo.scale=fo),Ao!==void 0&&buildSVGPath(Vo,Ao,jo,Lo,!1)}const isSVGTag=Mn=>typeof Mn=="string"&&Mn.toLowerCase()==="svg",svgMotionConfig={useVisualState:makeUseVisualState({scrapeMotionValuesFromProps,createRenderState:createSvgRenderState,onMount:(Mn,Fn,{renderState:io,latestValues:fo})=>{frame.read(()=>{try{io.dimensions=typeof Fn.getBBox=="function"?Fn.getBBox():Fn.getBoundingClientRect()}catch{io.dimensions={x:0,y:0,width:0,height:0}}}),frame.render(()=>{buildSVGAttrs(io,fo,isSVGTag(Fn.tagName),Mn.transformTemplate),renderSVG(Fn,io)})}})},htmlMotionConfig={useVisualState:makeUseVisualState({applyWillChange:!0,scrapeMotionValuesFromProps:scrapeMotionValuesFromProps$1,createRenderState:createHtmlRenderState})};function copyRawValuesOnly(Mn,Fn,io){for(const fo in Fn)!isMotionValue(Fn[fo])&&!isForcedMotionValue(fo,io)&&(Mn[fo]=Fn[fo])}function useInitialMotionValues({transformTemplate:Mn},Fn){return reactExports$1.useMemo(()=>{const io=createHtmlRenderState();return buildHTMLStyles(io,Fn,Mn),Object.assign({},io.vars,io.style)},[Fn])}function useStyle(Mn,Fn){const io=Mn.style||{},fo={};return copyRawValuesOnly(fo,io,Mn),Object.assign(fo,useInitialMotionValues(Mn,Fn)),fo}function useHTMLProps(Mn,Fn){const io={},fo=useStyle(Mn,Fn);return Mn.drag&&Mn.dragListener!==!1&&(io.draggable=!1,fo.userSelect=fo.WebkitUserSelect=fo.WebkitTouchCallout="none",fo.touchAction=Mn.drag===!0?"none":`pan-${Mn.drag==="x"?"y":"x"}`),Mn.tabIndex===void 0&&(Mn.onTap||Mn.onTapStart||Mn.whileTap)&&(io.tabIndex=0),io.style=fo,io}const validMotionProps=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function isValidMotionProp(Mn){return Mn.startsWith("while")||Mn.startsWith("drag")&&Mn!=="draggable"||Mn.startsWith("layout")||Mn.startsWith("onTap")||Mn.startsWith("onPan")||Mn.startsWith("onLayout")||validMotionProps.has(Mn)}let shouldForward=Mn=>!isValidMotionProp(Mn);function loadExternalIsValidProp(Mn){Mn&&(shouldForward=Fn=>Fn.startsWith("on")?!isValidMotionProp(Fn):Mn(Fn))}try{loadExternalIsValidProp(require("@emotion/is-prop-valid").default)}catch(Mn){}function filterProps(Mn,Fn,io){const fo={};for(const $o in Mn)$o==="values"&&typeof Mn.values=="object"||(shouldForward($o)||io===!0&&isValidMotionProp($o)||!Fn&&!isValidMotionProp($o)||Mn.draggable&&$o.startsWith("onDrag"))&&(fo[$o]=Mn[$o]);return fo}function useSVGProps(Mn,Fn,io,fo){const $o=reactExports$1.useMemo(()=>{const mo=createSvgRenderState();return buildSVGAttrs(mo,Fn,isSVGTag(fo),Mn.transformTemplate),{...mo.attrs,style:{...mo.style}}},[Fn]);if(Mn.style){const mo={};copyRawValuesOnly(mo,Mn.style,Mn),$o.style={...mo,...$o.style}}return $o}function createUseRender(Mn=!1){return(io,fo,$o,{latestValues:mo},Ao)=>{const Lo=(isSVGComponent(io)?useSVGProps:useHTMLProps)(fo,mo,Ao,io),Ho=filterProps(fo,typeof io=="string",Mn),zo=io!==reactExports$1.Fragment?{...Ho,...Lo,ref:$o}:{},{children:Go}=fo,Vo=reactExports$1.useMemo(()=>isMotionValue(Go)?Go.get():Go,[Go]);return reactExports$1.createElement(io,{...zo,children:Vo})}}function createMotionComponentFactory(Mn,Fn){return function(fo,{forwardMotionProps:$o}={forwardMotionProps:!1}){const Ao={...isSVGComponent(fo)?svgMotionConfig:htmlMotionConfig,preloadedFeatures:Mn,useRender:createUseRender($o),createVisualElement:Fn,Component:fo};return createRendererMotionComponent(Ao)}}const prefersReducedMotion={current:null},hasReducedMotionListener={current:!1};function initPrefersReducedMotion(){if(hasReducedMotionListener.current=!0,!!isBrowser)if(window.matchMedia){const Mn=window.matchMedia("(prefers-reduced-motion)"),Fn=()=>prefersReducedMotion.current=Mn.matches;Mn.addListener(Fn),Fn()}else prefersReducedMotion.current=!1}function updateMotionValuesFromProps(Mn,Fn,io){for(const fo in Fn){const $o=Fn[fo],mo=io[fo];if(isMotionValue($o))Mn.addValue(fo,$o);else if(isMotionValue(mo))Mn.addValue(fo,motionValue($o,{owner:Mn}));else if(mo!==$o)if(Mn.hasValue(fo)){const Ao=Mn.getValue(fo);Ao.liveStyle===!0?Ao.jump($o):Ao.hasAnimated||Ao.set($o)}else{const Ao=Mn.getStaticValue(fo);Mn.addValue(fo,motionValue(Ao!==void 0?Ao:$o,{owner:Mn}))}}for(const fo in io)Fn[fo]===void 0&&Mn.removeValue(fo);return Fn}const visualElementStore=new WeakMap,valueTypes=[...dimensionValueTypes,color,complex],findValueType=Mn=>valueTypes.find(testValueType(Mn)),propEventHandlers=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class VisualElement{scrapeMotionValuesFromProps(Fn,io,fo){return{}}constructor({parent:Fn,props:io,presenceContext:fo,reducedMotionConfig:$o,blockInitialAnimation:mo,visualState:Ao},jo={}){this.applyWillChange=!1,this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=KeyframeResolver,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const Vo=time.now();this.renderScheduledAt<Vo&&(this.renderScheduledAt=Vo,frame.render(this.render,!1,!0))};const{latestValues:Lo,renderState:Ho}=Ao;this.latestValues=Lo,this.baseTarget={...Lo},this.initialValues=io.initial?{...Lo}:{},this.renderState=Ho,this.parent=Fn,this.props=io,this.presenceContext=fo,this.depth=Fn?Fn.depth+1:0,this.reducedMotionConfig=$o,this.options=jo,this.blockInitialAnimation=!!mo,this.isControllingVariants=isControllingVariants(io),this.isVariantNode=isVariantNode(io),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(Fn&&Fn.current);const{willChange:zo,...Go}=this.scrapeMotionValuesFromProps(io,{},this);for(const Vo in Go){const Yo=Go[Vo];Lo[Vo]!==void 0&&isMotionValue(Yo)&&Yo.set(Lo[Vo],!1)}}mount(Fn){this.current=Fn,visualElementStore.set(Fn,this),this.projection&&!this.projection.instance&&this.projection.mount(Fn),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((io,fo)=>this.bindToMotionValue(fo,io)),hasReducedMotionListener.current||initPrefersReducedMotion(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:prefersReducedMotion.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){visualElementStore.delete(this.current),this.projection&&this.projection.unmount(),cancelFrame(this.notifyUpdate),cancelFrame(this.render),this.valueSubscriptions.forEach(Fn=>Fn()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const Fn in this.events)this.events[Fn].clear();for(const Fn in this.features){const io=this.features[Fn];io&&(io.unmount(),io.isMounted=!1)}this.current=null}bindToMotionValue(Fn,io){this.valueSubscriptions.has(Fn)&&this.valueSubscriptions.get(Fn)();const fo=transformProps.has(Fn),$o=io.on("change",jo=>{this.latestValues[Fn]=jo,this.props.onUpdate&&frame.preRender(this.notifyUpdate),fo&&this.projection&&(this.projection.isTransformDirty=!0)}),mo=io.on("renderRequest",this.scheduleRender);let Ao;window.MotionCheckAppearSync&&(Ao=window.MotionCheckAppearSync(this,Fn,io)),this.valueSubscriptions.set(Fn,()=>{$o(),mo(),Ao&&Ao(),io.owner&&io.stop()})}sortNodePosition(Fn){return!this.current||!this.sortInstanceNodePosition||this.type!==Fn.type?0:this.sortInstanceNodePosition(this.current,Fn.current)}updateFeatures(){let Fn="animation";for(Fn in featureDefinitions){const io=featureDefinitions[Fn];if(!io)continue;const{isEnabled:fo,Feature:$o}=io;if(!this.features[Fn]&&$o&&fo(this.props)&&(this.features[Fn]=new $o(this)),this.features[Fn]){const mo=this.features[Fn];mo.isMounted?mo.update():(mo.mount(),mo.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):createBox()}getStaticValue(Fn){return this.latestValues[Fn]}setStaticValue(Fn,io){this.latestValues[Fn]=io}update(Fn,io){(Fn.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=Fn,this.prevPresenceContext=this.presenceContext,this.presenceContext=io;for(let fo=0;fo<propEventHandlers.length;fo++){const $o=propEventHandlers[fo];this.propEventSubscriptions[$o]&&(this.propEventSubscriptions[$o](),delete this.propEventSubscriptions[$o]);const mo="on"+$o,Ao=Fn[mo];Ao&&(this.propEventSubscriptions[$o]=this.on($o,Ao))}this.prevMotionValues=updateMotionValuesFromProps(this,this.scrapeMotionValuesFromProps(Fn,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(Fn){return this.props.variants?this.props.variants[Fn]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(Fn){const io=this.getClosestVariantNode();if(io)return io.variantChildren&&io.variantChildren.add(Fn),()=>io.variantChildren.delete(Fn)}addValue(Fn,io){const fo=this.values.get(Fn);io!==fo&&(fo&&this.removeValue(Fn),this.bindToMotionValue(Fn,io),this.values.set(Fn,io),this.latestValues[Fn]=io.get())}removeValue(Fn){this.values.delete(Fn);const io=this.valueSubscriptions.get(Fn);io&&(io(),this.valueSubscriptions.delete(Fn)),delete this.latestValues[Fn],this.removeValueFromRenderState(Fn,this.renderState)}hasValue(Fn){return this.values.has(Fn)}getValue(Fn,io){if(this.props.values&&this.props.values[Fn])return this.props.values[Fn];let fo=this.values.get(Fn);return fo===void 0&&io!==void 0&&(fo=motionValue(io===null?void 0:io,{owner:this}),this.addValue(Fn,fo)),fo}readValue(Fn,io){var fo;let $o=this.latestValues[Fn]!==void 0||!this.current?this.latestValues[Fn]:(fo=this.getBaseTargetFromProps(this.props,Fn))!==null&&fo!==void 0?fo:this.readValueFromInstance(this.current,Fn,this.options);return $o!=null&&(typeof $o=="string"&&(isNumericalString($o)||isZeroValueString($o))?$o=parseFloat($o):!findValueType($o)&&complex.test(io)&&($o=getAnimatableNone(Fn,io)),this.setBaseTarget(Fn,isMotionValue($o)?$o.get():$o)),isMotionValue($o)?$o.get():$o}setBaseTarget(Fn,io){this.baseTarget[Fn]=io}getBaseTarget(Fn){var io;const{initial:fo}=this.props;let $o;if(typeof fo=="string"||typeof fo=="object"){const Ao=resolveVariantFromProps(this.props,fo,(io=this.presenceContext)===null||io===void 0?void 0:io.custom);Ao&&($o=Ao[Fn])}if(fo&&$o!==void 0)return $o;const mo=this.getBaseTargetFromProps(this.props,Fn);return mo!==void 0&&!isMotionValue(mo)?mo:this.initialValues[Fn]!==void 0&&$o===void 0?void 0:this.baseTarget[Fn]}on(Fn,io){return this.events[Fn]||(this.events[Fn]=new SubscriptionManager),this.events[Fn].add(io)}notify(Fn,...io){this.events[Fn]&&this.events[Fn].notify(...io)}}class DOMVisualElement extends VisualElement{constructor(){super(...arguments),this.KeyframeResolver=DOMKeyframesResolver}sortInstanceNodePosition(Fn,io){return Fn.compareDocumentPosition(io)&2?1:-1}getBaseTargetFromProps(Fn,io){return Fn.style?Fn.style[io]:void 0}removeValueFromRenderState(Fn,{vars:io,style:fo}){delete io[Fn],delete fo[Fn]}}function getComputedStyle$1(Mn){return window.getComputedStyle(Mn)}class HTMLVisualElement extends DOMVisualElement{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0,this.renderInstance=renderHTML}readValueFromInstance(Fn,io){if(transformProps.has(io)){const fo=getDefaultValueType(io);return fo&&fo.default||0}else{const fo=getComputedStyle$1(Fn),$o=(isCSSVariableName(io)?fo.getPropertyValue(io):fo[io])||0;return typeof $o=="string"?$o.trim():$o}}measureInstanceViewportBox(Fn,{transformPagePoint:io}){return measureViewportBox(Fn,io)}build(Fn,io,fo){buildHTMLStyles(Fn,io,fo.transformTemplate)}scrapeMotionValuesFromProps(Fn,io,fo){return scrapeMotionValuesFromProps$1(Fn,io,fo)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:Fn}=this.props;isMotionValue(Fn)&&(this.childSubscription=Fn.on("change",io=>{this.current&&(this.current.textContent=`${io}`)}))}}class SVGVisualElement extends DOMVisualElement{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=createBox}getBaseTargetFromProps(Fn,io){return Fn[io]}readValueFromInstance(Fn,io){if(transformProps.has(io)){const fo=getDefaultValueType(io);return fo&&fo.default||0}return io=camelCaseAttributes.has(io)?io:camelToDash(io),Fn.getAttribute(io)}scrapeMotionValuesFromProps(Fn,io,fo){return scrapeMotionValuesFromProps(Fn,io,fo)}build(Fn,io,fo){buildSVGAttrs(Fn,io,this.isSVGTag,fo.transformTemplate)}renderInstance(Fn,io,fo,$o){renderSVG(Fn,io,fo,$o)}mount(Fn){this.isSVGTag=isSVGTag(Fn.tagName),super.mount(Fn)}}const createDomVisualElement=(Mn,Fn)=>isSVGComponent(Mn)?new SVGVisualElement(Fn):new HTMLVisualElement(Fn,{allowProjection:Mn!==reactExports$1.Fragment}),createMotionComponent=createMotionComponentFactory({...animations,...gestureAnimations,...drag,...layout},createDomVisualElement),motion=createDOMMotionComponentProxy(createMotionComponent),Card=reactExports$1.forwardRef(({className:Mn,...Fn},io)=>jsxRuntimeExports$1.jsx("div",{ref:io,className:cn$1("rounded-lg border bg-card text-card-foreground shadow-sm",Mn),...Fn}));Card.displayName="Card";const CardHeader=reactExports$1.forwardRef(({className:Mn,...Fn},io)=>jsxRuntimeExports$1.jsx("div",{ref:io,className:cn$1("flex flex-col space-y-1.5 p-6",Mn),...Fn}));CardHeader.displayName="CardHeader";const CardTitle=reactExports$1.forwardRef(({className:Mn,...Fn},io)=>jsxRuntimeExports$1.jsx("h3",{ref:io,className:cn$1("text-2xl font-semibold leading-none tracking-tight",Mn),...Fn}));CardTitle.displayName="CardTitle";const CardDescription=reactExports$1.forwardRef(({className:Mn,...Fn},io)=>jsxRuntimeExports$1.jsx("p",{ref:io,className:cn$1("text-sm text-muted-foreground",Mn),...Fn}));CardDescription.displayName="CardDescription";const CardContent=reactExports$1.forwardRef(({className:Mn,...Fn},io)=>jsxRuntimeExports$1.jsx("div",{ref:io,className:cn$1("p-6 pt-0",Mn),...Fn}));CardContent.displayName="CardContent";const CardFooter=reactExports$1.forwardRef(({className:Mn,...Fn},io)=>jsxRuntimeExports$1.jsx("div",{ref:io,className:cn$1("flex items-center p-6 pt-0",Mn),...Fn}));CardFooter.displayName="CardFooter";var TABS_NAME="Tabs",[createTabsContext,createTabsScope]=createContextScope$1(TABS_NAME,[createRovingFocusGroupScope]),useRovingFocusGroupScope=createRovingFocusGroupScope(),[TabsProvider,useTabsContext]=createTabsContext(TABS_NAME),Tabs$1=reactExports$1.forwardRef((Mn,Fn)=>{const{__scopeTabs:io,value:fo,onValueChange:$o,defaultValue:mo,orientation:Ao="horizontal",dir:jo,activationMode:Lo="automatic",...Ho}=Mn,zo=useDirection(jo),[Go,Vo]=useControllableState({prop:fo,onChange:$o,defaultProp:mo});return jsxRuntimeExports$1.jsx(TabsProvider,{scope:io,baseId:useId(),value:Go,onValueChange:Vo,orientation:Ao,dir:zo,activationMode:Lo,children:jsxRuntimeExports$1.jsx(Primitive.div,{dir:zo,"data-orientation":Ao,...Ho,ref:Fn})})});Tabs$1.displayName=TABS_NAME;var TAB_LIST_NAME="TabsList",TabsList$1=reactExports$1.forwardRef((Mn,Fn)=>{const{__scopeTabs:io,loop:fo=!0,...$o}=Mn,mo=useTabsContext(TAB_LIST_NAME,io),Ao=useRovingFocusGroupScope(io);return jsxRuntimeExports$1.jsx(Root,{asChild:!0,...Ao,orientation:mo.orientation,dir:mo.dir,loop:fo,children:jsxRuntimeExports$1.jsx(Primitive.div,{role:"tablist","aria-orientation":mo.orientation,...$o,ref:Fn})})});TabsList$1.displayName=TAB_LIST_NAME;var TRIGGER_NAME="TabsTrigger",TabsTrigger$1=reactExports$1.forwardRef((Mn,Fn)=>{const{__scopeTabs:io,value:fo,disabled:$o=!1,...mo}=Mn,Ao=useTabsContext(TRIGGER_NAME,io),jo=useRovingFocusGroupScope(io),Lo=makeTriggerId(Ao.baseId,fo),Ho=makeContentId(Ao.baseId,fo),zo=fo===Ao.value;return jsxRuntimeExports$1.jsx(Item$1,{asChild:!0,...jo,focusable:!$o,active:zo,children:jsxRuntimeExports$1.jsx(Primitive.button,{type:"button",role:"tab","aria-selected":zo,"aria-controls":Ho,"data-state":zo?"active":"inactive","data-disabled":$o?"":void 0,disabled:$o,id:Lo,...mo,ref:Fn,onMouseDown:composeEventHandlers(Mn.onMouseDown,Go=>{!$o&&Go.button===0&&Go.ctrlKey===!1?Ao.onValueChange(fo):Go.preventDefault()}),onKeyDown:composeEventHandlers(Mn.onKeyDown,Go=>{[" ","Enter"].includes(Go.key)&&Ao.onValueChange(fo)}),onFocus:composeEventHandlers(Mn.onFocus,()=>{const Go=Ao.activationMode!=="manual";!zo&&!$o&&Go&&Ao.onValueChange(fo)})})})});TabsTrigger$1.displayName=TRIGGER_NAME;var CONTENT_NAME="TabsContent",TabsContent$1=reactExports$1.forwardRef((Mn,Fn)=>{const{__scopeTabs:io,value:fo,forceMount:$o,children:mo,...Ao}=Mn,jo=useTabsContext(CONTENT_NAME,io),Lo=makeTriggerId(jo.baseId,fo),Ho=makeContentId(jo.baseId,fo),zo=fo===jo.value,Go=reactExports$1.useRef(zo);return reactExports$1.useEffect(()=>{const Vo=requestAnimationFrame(()=>Go.current=!1);return()=>cancelAnimationFrame(Vo)},[]),jsxRuntimeExports$1.jsx(Presence,{present:$o||zo,children:({present:Vo})=>jsxRuntimeExports$1.jsx(Primitive.div,{"data-state":zo?"active":"inactive","data-orientation":jo.orientation,role:"tabpanel","aria-labelledby":Lo,hidden:!Vo,id:Ho,tabIndex:0,...Ao,ref:Fn,style:{...Mn.style,animationDuration:Go.current?"0s":void 0},children:Vo&&mo})})});TabsContent$1.displayName=CONTENT_NAME;function makeTriggerId(Mn,Fn){return`${Mn}-trigger-${Fn}`}function makeContentId(Mn,Fn){return`${Mn}-content-${Fn}`}var Root2=Tabs$1,List=TabsList$1,Trigger=TabsTrigger$1,Content=TabsContent$1;const Tabs=Root2,TabsList=reactExports$1.forwardRef(({className:Mn,...Fn},io)=>jsxRuntimeExports$1.jsx(List,{ref:io,className:cn$1("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",Mn),...Fn}));TabsList.displayName=List.displayName;const TabsTrigger=reactExports$1.forwardRef(({className:Mn,...Fn},io)=>jsxRuntimeExports$1.jsx(Trigger,{ref:io,className:cn$1("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",Mn),...Fn}));TabsTrigger.displayName=Trigger.displayName;const TabsContent=reactExports$1.forwardRef(({className:Mn,...Fn},io)=>jsxRuntimeExports$1.jsx(Content,{ref:io,className:cn$1("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",Mn),...Fn}));TabsContent.displayName=Content.displayName;const Stack=({name:Mn})=>{const[Fn,io]=reactExports$1.useState([]),[fo,$o]=reactExports$1.useState(""),mo=()=>{fo&&(io([...Fn,fo]),$o(""))},Ao=()=>{io(Fn.slice(0,-1))};return jsxRuntimeExports$1.jsx(motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"relative",children:jsxRuntimeExports$1.jsxs(Card,{className:"shadow-lg hover:shadow-xl transition-shadow bg-green-50 border-4 border-green-300",children:[jsxRuntimeExports$1.jsx(CardHeader,{children:jsxRuntimeExports$1.jsx(CardTitle,{className:"text-2xl font-bold text-green-700 font-mono",children:Mn})}),jsxRuntimeExports$1.jsx(CardContent,{children:jsxRuntimeExports$1.jsxs("div",{className:"flex flex-col gap-4",children:[jsxRuntimeExports$1.jsxs("div",{className:"flex gap-2",children:[jsxRuntimeExports$1.jsx("input",{type:"text",value:fo,onChange:jo=>$o(jo.target.value),className:"border-2 border-green-300 p-2 rounded font-mono bg-white focus:ring-2 focus:ring-green-200 focus:border-green-400 outline-none",placeholder:"Add item..."}),jsxRuntimeExports$1.jsx(motion.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:mo,className:"bg-green-500 text-white px-4 py-2 rounded-lg hover:bg-green-600 font-mono border-2 border-green-600",children:"Push"}),jsxRuntimeExports$1.jsx(motion.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:Ao,className:"bg-green-600 text-white px-4 py-2 rounded-lg hover:bg-green-700 font-mono border-2 border-green-700",children:"Pop"})]}),jsxRuntimeExports$1.jsx("div",{className:"flex flex-col-reverse gap-2",children:Fn.map((jo,Lo)=>jsxRuntimeExports$1.jsx(motion.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},className:"bg-green-100 p-3 rounded-lg shadow-md border-2 border-green-200 font-mono",children:jo},Lo))})]})})]})})},Queue=({name:Mn})=>{const[Fn,io]=reactExports$1.useState([]),[fo,$o]=reactExports$1.useState(""),mo=()=>{fo&&(io([...Fn,fo]),$o(""))},Ao=()=>{io(Fn.slice(1))};return jsxRuntimeExports$1.jsx(motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"relative",children:jsxRuntimeExports$1.jsxs(Card,{className:"shadow-lg hover:shadow-xl transition-shadow bg-green-50 border-4 border-green-300",children:[jsxRuntimeExports$1.jsx(CardHeader,{children:jsxRuntimeExports$1.jsx(CardTitle,{className:"text-2xl font-bold text-green-700 font-mono",children:Mn})}),jsxRuntimeExports$1.jsx(CardContent,{children:jsxRuntimeExports$1.jsxs("div",{className:"flex flex-col gap-4",children:[jsxRuntimeExports$1.jsxs("div",{className:"flex gap-2",children:[jsxRuntimeExports$1.jsx("input",{type:"text",value:fo,onChange:jo=>$o(jo.target.value),className:"border-2 border-green-300 p-2 rounded font-mono bg-white focus:ring-2 focus:ring-green-200 focus:border-green-400 outline-none",placeholder:"Add item..."}),jsxRuntimeExports$1.jsx(motion.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:mo,className:"bg-green-500 text-white px-4 py-2 rounded-lg hover:bg-green-600 font-mono border-2 border-green-600",children:"Add"}),jsxRuntimeExports$1.jsx(motion.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:Ao,className:"bg-green-600 text-white px-4 py-2 rounded-lg hover:bg-green-700 font-mono border-2 border-green-700",children:"Remove"})]}),jsxRuntimeExports$1.jsx("div",{className:"flex gap-2 overflow-x-auto p-2",children:Fn.map((jo,Lo)=>jsxRuntimeExports$1.jsx(motion.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},className:"bg-green-100 p-3 rounded-lg shadow-md border-2 border-green-200 font-mono min-w-max",children:jo},Lo))})]})})]})})},LinkedList=({name:Mn})=>{const[Fn,io]=reactExports$1.useState([]),[fo,$o]=reactExports$1.useState(""),[mo,Ao]=reactExports$1.useState(0),jo=()=>{if(fo){const Ho=[...Fn];Ho.splice(mo,0,fo),io(Ho),$o("")}},Lo=()=>{const Ho=[...Fn];Ho.splice(mo,1),io(Ho)};return jsxRuntimeExports$1.jsx(motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"relative",children:jsxRuntimeExports$1.jsxs(Card,{className:"shadow-lg hover:shadow-xl transition-shadow bg-green-50 border-4 border-green-300",children:[jsxRuntimeExports$1.jsx(CardHeader,{children:jsxRuntimeExports$1.jsx(CardTitle,{className:"text-2xl font-bold text-green-700 font-mono",children:Mn})}),jsxRuntimeExports$1.jsx(CardContent,{children:jsxRuntimeExports$1.jsxs("div",{className:"flex flex-col gap-4",children:[jsxRuntimeExports$1.jsxs("div",{className:"flex gap-2",children:[jsxRuntimeExports$1.jsx("input",{type:"text",value:fo,onChange:Ho=>$o(Ho.target.value),className:"border-2 border-green-300 p-2 rounded font-mono bg-white focus:ring-2 focus:ring-green-200 focus:border-green-400 outline-none",placeholder:"Add item..."}),jsxRuntimeExports$1.jsx("input",{type:"number",value:mo,onChange:Ho=>Ao(Number(Ho.target.value)),className:"border-2 border-green-300 p-2 rounded w-20 font-mono bg-white focus:ring-2 focus:ring-green-200 focus:border-green-400 outline-none",min:"0",max:Fn.length}),jsxRuntimeExports$1.jsx(motion.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:jo,className:"bg-green-500 text-white px-4 py-2 rounded-lg hover:bg-green-600 font-mono border-2 border-green-600",children:"Insert"}),jsxRuntimeExports$1.jsx(motion.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:Lo,className:"bg-green-600 text-white px-4 py-2 rounded-lg hover:bg-green-700 font-mono border-2 border-green-700",children:"Remove"})]}),jsxRuntimeExports$1.jsx("div",{className:"flex gap-2 overflow-x-auto p-2",children:Fn.map((Ho,zo)=>jsxRuntimeExports$1.jsxs(motion.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},className:"flex items-center",children:[jsxRuntimeExports$1.jsx("div",{className:"bg-green-100 p-3 rounded-lg shadow-md border-2 border-green-200 font-mono min-w-max",children:Ho}),zo<Fn.length-1&&jsxRuntimeExports$1.jsx("div",{className:"text-green-500 mx-1 text-2xl",children:"→"})]},zo))})]})})]})})},App=()=>jsxRuntimeExports$1.jsx("div",{className:"min-h-screen bg-gradient-to-br from-green-100 to-green-200 p-8 font-mono",children:jsxRuntimeExports$1.jsxs(motion.div,{initial:{opacity:0,y:-20},animate:{opacity:1,y:0},className:"max-w-6xl mx-auto space-y-8",children:[jsxRuntimeExports$1.jsx("h1",{className:"text-4xl font-bold text-center text-green-700 mb-8",children:"Create Something"}),jsxRuntimeExports$1.jsxs(Tabs,{defaultValue:"stack",className:"w-full",children:[jsxRuntimeExports$1.jsxs(TabsList,{className:"w-full justify-center bg-green-600/20 p-2 rounded-lg border-2 border-green-300",children:[jsxRuntimeExports$1.jsx(TabsTrigger,{value:"stack",className:"text-green-800 font-mono data-[state=active]:bg-green-200",children:"Stack"}),jsxRuntimeExports$1.jsx(TabsTrigger,{value:"queue",className:"text-green-800 font-mono data-[state=active]:bg-green-200",children:"Queue"}),jsxRuntimeExports$1.jsx(TabsTrigger,{value:"linkedlist",className:"text-green-800 font-mono data-[state=active]:bg-green-200",children:"Linked List"})]}),jsxRuntimeExports$1.jsxs("div",{className:"mt-8",children:[jsxRuntimeExports$1.jsx(TabsContent,{value:"stack",className:"space-y-4",children:jsxRuntimeExports$1.jsx(Stack,{name:"Stack"})}),jsxRuntimeExports$1.jsx(TabsContent,{value:"queue",className:"space-y-4",children:jsxRuntimeExports$1.jsx(Queue,{name:"Queue"})}),jsxRuntimeExports$1.jsx(TabsContent,{value:"linkedlist",className:"space-y-4",children:jsxRuntimeExports$1.jsx(LinkedList,{name:"Linked List"})})]})]})]})}),Route$1=createFileRoute("/")({component:App}),Route=createFileRoute("/profile/$accountId")({component:ProfilePage});function ProfilePage(){const{accountId:Mn}=Route.useParams(),{wallet:Fn,signedAccountId:io}=useWallet();return jsxRuntimeExports$1.jsx("div",{className:"flex flex-col items-center",children:jsxRuntimeExports$1.jsxs("div",{className:"w-full max-w-2xl py-12",children:[jsxRuntimeExports$1.jsxs("h2",{className:"text-2xl font-bold",children:[Mn,"'s profile"]}),Mn===io?jsxRuntimeExports$1.jsx(Button,{className:"w-full bg-blue-600 text-white transition-all hover:bg-blue-700 focus:scale-95",onClick:()=>Fn.signOut()}):null]})})}const LoginRoute=Route$2.update({id:"/login",path:"/login",getParentRoute:()=>Route$3}),IndexRoute=Route$1.update({id:"/",path:"/",getParentRoute:()=>Route$3}),ProfileAccountIdRoute=Route.update({id:"/profile/$accountId",path:"/profile/$accountId",getParentRoute:()=>Route$3}),rootRouteChildren={IndexRoute,LoginRoute,ProfileAccountIdRoute},routeTree=Route$3._addFileChildren(rootRouteChildren)._addFileTypes(),queryClient=new QueryClient,router=createRouter({routeTree,defaultPreload:"intent",defaultPreloadStaleTime:0,context:{queryClient}}),rootElement=document.getElementById("root");rootElement.innerHTML||client.createRoot(rootElement).render(jsxRuntimeExports$1.jsx(QueryClientProvider,{client:queryClient,children:jsxRuntimeExports$1.jsx(RouterProvider,{router})}));export{Field$1 as $,bytesToNumberBE$1 as A,BaseError as B,bitMask$1 as C,concatBytes$3 as D,wNAF$1 as E,validateBasic$1 as F,validateObject$1 as G,mod$1 as H,InvalidBytesBooleanError as I,ensureBytes$1 as J,hexToBytes$3 as K,getMinHashLength$1 as L,mapHashToField$1 as M,createHmacDrbg$1 as N,bytesToHex$3 as O,invert$1 as P,numberToBytesBE$1 as Q,ut$3 as R,SliceOffsetOutOfBoundsError as S,Hash$a as T,hash$8 as U,toBytes$4 as V,exists$3 as W,bytes$3 as X,concatBytes$4 as Y,randomBytes$4 as Z,__vitePreload as _,stringToBytes as a,WuiListWallet as a$,pow2$1 as a0,hexToString as a1,fromHex as a2,EventEmitter$1 as a3,proxy as a4,subscribeKey as a5,subscribe as a6,ref as a7,OptionsController as a8,i$6 as a9,WuiLoadingThumbnail as aA,WuiShimmer as aB,WuiText as aC,WuiVisual as aD,WuiAccountButton as aE,WuiAllWalletsImage as aF,WuiAvatar as aG,WuiButton as aH,WuiCardSelectLoader as aI,WuiCardSelect as aJ,WuiChip as aK,WuiConnectButton as aL,WuiCtaButton as aM,WuiDetailsGroup as aN,WuiDetailsGroupItem as aO,WuiDropdownMenu as aP,WuiEmailInput as aQ,WuiEnsInput as aR,WuiIconBox as aS,WuiIconLink as aT,WuiInputElement as aU,WuiInputNumeric as aV,WuiInputText as aW,WuiLink as aX,WuiListItem as aY,WuiTransactionListItem as aZ,WuiTransactionListItemLoader as a_,customElement as aa,r$6 as ab,AccountController as ac,x$5 as ad,r$4 as ae,ModalController as af,EventsController as ag,NetworkController as ah,W3mFrameRpcConstants as ai,SnackController as aj,ConnectionController as ak,RouterController as al,Gi$1 as am,Yi$1 as an,b$2 as ao,MathUtil as ap,initializeTheming as aq,setColorTheme as ar,setThemeVariables as as,UiHelperUtil as at,TransactionUtil as au,WuiCard as av,WuiIcon as aw,WuiImage as ax,WuiLoadingHexagon as ay,WuiLoadingSpinner as az,boolToHex as b,randomBytes as b$,WuiLogoSelect as b0,WuiLogo as b1,WuiNetworkButton as b2,WuiNetworkImage as b3,WuiOtp as b4,WuiQrCode as b5,WuiSearchBar as b6,WuiSnackbar as b7,WuiTabs as b8,WuiTokenButton as b9,WuiListSocial as bA,WuiSelect as bB,WuiFlex as bC,WuiGrid as bD,WuiSeparator as bE,ApiController as bF,CoreHelperUtil as bG,ThemeController as bH,Buffer$D as bI,snapshot as bJ,isAddress as bK,InvalidAddressError as bL,BaseError$4 as bM,getUrl$1 as bN,stringify$3 as bO,decodeErrorResult as bP,call as bQ,concat$1 as bR,encodeAbiParameters as bS,HttpRequestError as bT,isHex$1 as bU,Hash as bV,hash$3 as bW,toBytes$1 as bX,exists$1 as bY,bytes$1 as bZ,concatBytes$1 as b_,WuiTag as ba,WuiTooltip as bb,WuiTokenListItem as bc,WuiTransactionVisual as bd,WuiVisualThumbnail as be,WuiWalletImage as bf,WuiNoticeCard as bg,WuiListAccordion as bh,WuiListContent as bi,WuiListNetwork as bj,WuiListWalletTransaction as bk,WuiPromo as bl,WuiBalance as bm,WuiProfileButton as bn,WuiProfileButtonV2 as bo,WuiChipButton as bp,WuiCompatibleNetwork as bq,WuiBanner as br,WuiBannerImg as bs,WuiListToken as bt,WuiListDescription as bu,WuiInputAmount as bv,WuiPreviewItem as bw,WuiListAccount as bx,WuiIconButton as by,WuiListButton as bz,stringToHex as c,sha256$5 as c0,global$o as c1,browser$6 as c2,assertSize as d,execTyped as e,bytesToHex as f,trim$1 as g,hexToBigInt as h,isHex as i,hexToNumber as j,keccak256 as k,hexToBytes as l,formatUnits as m,numberToHex as n,getContractAddress as o,padHex as p,getUrl as q,InvalidBytesLengthError as r,size as s,toBytes as t,SHA2$2 as u,rotr$2 as v,wrapConstructor$2 as w,parseAbi as x,toHex as y,equalBytes$1 as z};
fs_store()
import{ao as a}from"./index-DhqGQKi4.js";import{ap as e,au as n,at as o,aE as L,aF as W,aG as l,bm as r,br as M,bs as Z,aH as b,av as V,aJ as d,aI as p,aK as H,bp as c,bq as m,aL as k,aM as _,aN as h,aO as g,aP as I,aQ as B,aR as v,bC as T,bD as w,aw as S,aS as f,by as x,aT as A,ax as N,bv as D,aU as E,aV as P,aW as U,aX as G,bh as z,bx as q,bz as y,bi as F,bu as O,aY as Q,bj as j,bA as J,bt as K,a$ as R,bk as X,ay as Y,az as $,aA as a1,b1 as i1,b0 as s1,b2 as C1,b3 as u1,bg as t1,b4 as e1,bw as n1,bn as o1,bo as L1,bl as W1,b5 as l1,b6 as r1,bB as M1,bE as Z1,aB as b1,b7 as V1,b8 as d1,ba as p1,aC as H1,b9 as c1,bc as m1,bb as k1,aZ as _1,a_ as h1,bd as g1,aD as I1,be as B1,bf as v1,aa as T1,aq as w1,ar as S1,as as f1}from"./index-DhqGQKi4.js";const s=a`<svg class="input_mask" width="328" height="100" viewBox="0 0 328 100" fill="none">
<mask id="path-1-inside-1_18299_4189">
<path
class="input_mask__border"
fill-rule="evenodd"
clip-rule="evenodd"
d="M138.008 0H40C21.1438 0 11.7157 0 5.85786 5.85786C0 11.7157 0 21.1438 0 40V60C0 78.8562 0 88.2843 5.85786 94.1421C11.7157 100 21.1438 100 40 100H288C306.856 100 316.284 100 322.142 94.1421C328 88.2843 328 78.8562 328 60V40C328 21.1438 328 11.7157 322.142 5.85786C316.284 0 306.856 0 288 0H189.992C189.958 4.89122 189.786 7.76279 188.914 10.1564C187.095 15.1562 183.156 19.0947 178.156 20.9145C175.174 22 171.449 22 164 22C156.551 22 152.826 22 149.844 20.9145C144.844 19.0947 140.905 15.1562 139.086 10.1564C138.214 7.76279 138.042 4.89122 138.008 0Z"
/>
</mask>
<path
class="input_mask__background"
fill-rule="evenodd"
clip-rule="evenodd"
d="M138.008 0H40C21.1438 0 11.7157 0 5.85786 5.85786C0 11.7157 0 21.1438 0 40V60C0 78.8562 0 88.2843 5.85786 94.1421C11.7157 100 21.1438 100 40 100H288C306.856 100 316.284 100 322.142 94.1421C328 88.2843 328 78.8562 328 60V40C328 21.1438 328 11.7157 322.142 5.85786C316.284 0 306.856 0 288 0H189.992C189.958 4.89122 189.786 7.76279 188.914 10.1564C187.095 15.1562 183.156 19.0947 178.156 20.9145C175.174 22 171.449 22 164 22C156.551 22 152.826 22 149.844 20.9145C144.844 19.0947 140.905 15.1562 139.086 10.1564C138.214 7.76279 138.042 4.89122 138.008 0Z"
/>
<path
class="input_mask__border"
d="M138.008 0L139.008 -0.00694413L139.001 -1H138.008V0ZM322.142 94.1421L322.849 94.8492H322.849L322.142 94.1421ZM322.142 5.85786L322.849 5.15076L322.849 5.15076L322.142 5.85786ZM189.992 0V-1H188.999L188.992 -0.00694413L189.992 0ZM188.914 10.1564L189.854 10.4984V10.4984L188.914 10.1564ZM178.156 20.9145L177.814 19.9748V19.9748L178.156 20.9145ZM149.844 20.9145L150.186 19.9748V19.9748L149.844 20.9145ZM139.086 10.1564L138.146 10.4984V10.4984L139.086 10.1564ZM40 1H138.008V-1H40V1ZM6.56497 6.56497C9.27713 3.85281 12.8524 2.44064 18.1878 1.72332C23.552 1.00212 30.5436 1 40 1V-1C30.6002 -1 23.4497 -1.00212 17.9213 -0.25885C12.3641 0.488292 8.29646 2.00506 5.15076 5.15076L6.56497 6.56497ZM1 40C1 30.5436 1.00212 23.552 1.72332 18.1878C2.44064 12.8524 3.85281 9.27713 6.56497 6.56497L5.15076 5.15076C2.00506 8.29646 0.488292 12.3641 -0.25885 17.9213C-1.00212 23.4497 -1 30.6002 -1 40H1ZM1 60V40H-1V60H1ZM6.56497 93.435C3.85281 90.7229 2.44064 87.1476 1.72332 81.8122C1.00212 76.448 1 69.4564 1 60H-1C-1 69.3998 -1.00212 76.5503 -0.25885 82.0787C0.488292 87.6358 2.00506 91.7035 5.15076 94.8492L6.56497 93.435ZM40 99C30.5436 99 23.552 98.9979 18.1878 98.2767C12.8524 97.5594 9.27713 96.1472 6.56497 93.435L5.15076 94.8492C8.29646 97.9949 12.3641 99.5117 17.9213 100.259C23.4497 101.002 30.6002 101 40 101V99ZM288 99H40V101H288V99ZM321.435 93.435C318.723 96.1472 315.148 97.5594 309.812 98.2767C304.448 98.9979 297.456 99 288 99V101C297.4 101 304.55 101.002 310.079 100.259C315.636 99.5117 319.704 97.9949 322.849 94.8492L321.435 93.435ZM327 60C327 69.4564 326.998 76.448 326.277 81.8122C325.559 87.1476 324.147 90.7229 321.435 93.435L322.849 94.8492C325.995 91.7035 327.512 87.6358 328.259 82.0787C329.002 76.5503 329 69.3998 329 60H327ZM327 40V60H329V40H327ZM321.435 6.56497C324.147 9.27713 325.559 12.8524 326.277 18.1878C326.998 23.552 327 30.5436 327 40H329C329 30.6002 329.002 23.4497 328.259 17.9213C327.512 12.3642 325.995 8.29646 322.849 5.15076L321.435 6.56497ZM288 1C297.456 1 304.448 1.00212 309.812 1.72332C315.148 2.44064 318.723 3.85281 321.435 6.56497L322.849 5.15076C319.704 2.00506 315.636 0.488292 310.079 -0.25885C304.55 -1.00212 297.4 -1 288 -1V1ZM189.992 1H288V-1H189.992V1ZM188.992 -0.00694413C188.958 4.90792 188.778 7.60788 187.975 9.81434L189.854 10.4984C190.793 7.9177 190.958 4.87452 190.992 0.00694413L188.992 -0.00694413ZM187.975 9.81434C186.256 14.5364 182.536 18.2561 177.814 19.9748L178.498 21.8542C183.776 19.9333 187.933 15.7759 189.854 10.4984L187.975 9.81434ZM177.814 19.9748C175.039 20.9848 171.536 21 164 21V23C171.362 23 175.308 23.0152 178.498 21.8542L177.814 19.9748ZM164 21C156.464 21 152.961 20.9848 150.186 19.9748L149.502 21.8542C152.692 23.0152 156.638 23 164 23V21ZM150.186 19.9748C145.464 18.2561 141.744 14.5364 140.025 9.81434L138.146 10.4984C140.067 15.7759 144.224 19.9333 149.502 21.8542L150.186 19.9748ZM140.025 9.81434C139.222 7.60788 139.042 4.90792 139.008 -0.00694413L137.008 0.00694413C137.042 4.87452 137.207 7.9177 138.146 10.4984L140.025 9.81434Z"
mask="url(#path-1-inside-1_18299_4189)"
/>
</svg>`,C=a`<svg class="input_mask" width="328" height="100" viewBox="0 0 328 100" fill="none">
<mask id="path-1-inside-1_18299_4168">
<path
class="input_mask__border"
fill-rule="evenodd"
clip-rule="evenodd"
d="M5.85786 5.85786C0 11.7157 0 21.1438 0 40V60C0 78.8562 0 88.2843 5.85786 94.1421C11.7157 100 21.1438 100 40 100H138.008C138.042 95.1088 138.214 92.2372 139.086 89.8436C140.905 84.8438 144.844 80.9053 149.844 79.0855C152.826 78 156.551 78 164 78C171.449 78 175.174 78 178.156 79.0855C183.156 80.9053 187.095 84.8438 188.914 89.8436C189.786 92.2372 189.958 95.1088 189.992 100H288C306.856 100 316.284 100 322.142 94.1421C328 88.2843 328 78.8562 328 60V40C328 21.1438 328 11.7157 322.142 5.85786C316.284 0 306.856 0 288 0H40C21.1438 0 11.7157 0 5.85786 5.85786Z"
/>
</mask>
<path
class="input_mask__background"
fill-rule="evenodd"
clip-rule="evenodd"
d="M5.85786 5.85786C0 11.7157 0 21.1438 0 40V60C0 78.8562 0 88.2843 5.85786 94.1421C11.7157 100 21.1438 100 40 100H138.008C138.042 95.1088 138.214 92.2372 139.086 89.8436C140.905 84.8438 144.844 80.9053 149.844 79.0855C152.826 78 156.551 78 164 78C171.449 78 175.174 78 178.156 79.0855C183.156 80.9053 187.095 84.8438 188.914 89.8436C189.786 92.2372 189.958 95.1088 189.992 100H288C306.856 100 316.284 100 322.142 94.1421C328 88.2843 328 78.8562 328 60V40C328 21.1438 328 11.7157 322.142 5.85786C316.284 0 306.856 0 288 0H40C21.1438 0 11.7157 0 5.85786 5.85786Z"
/>
<path
class="input_mask__border"
d="M138.008 100V101H139.001L139.008 100.007L138.008 100ZM139.086 89.8436L138.146 89.5016L139.086 89.8436ZM149.844 79.0855L150.186 80.0252L149.844 79.0855ZM178.156 79.0855L177.814 80.0252L178.156 79.0855ZM188.914 89.8436L189.854 89.5016L188.914 89.8436ZM189.992 100L188.992 100.007L188.999 101H189.992V100ZM322.142 94.1421L322.849 94.8492H322.849L322.142 94.1421ZM322.142 5.85786L322.849 5.15076L322.849 5.15076L322.142 5.85786ZM1 40C1 30.5436 1.00212 23.552 1.72332 18.1878C2.44064 12.8524 3.85281 9.27713 6.56497 6.56497L5.15076 5.15076C2.00506 8.29646 0.488292 12.3641 -0.25885 17.9213C-1.00212 23.4497 -1 30.6002 -1 40H1ZM1 60V40H-1V60H1ZM6.56497 93.435C3.85281 90.7229 2.44064 87.1476 1.72332 81.8122C1.00212 76.448 1 69.4564 1 60H-1C-1 69.3998 -1.00212 76.5503 -0.25885 82.0787C0.488292 87.6358 2.00506 91.7035 5.15076 94.8492L6.56497 93.435ZM40 99C30.5436 99 23.552 98.9979 18.1878 98.2767C12.8524 97.5594 9.27713 96.1472 6.56497 93.435L5.15076 94.8492C8.29646 97.9949 12.3641 99.5117 17.9213 100.259C23.4497 101.002 30.6002 101 40 101V99ZM138.008 99H40V101H138.008V99ZM139.008 100.007C139.042 95.0921 139.222 92.3921 140.025 90.1857L138.146 89.5016C137.207 92.0823 137.042 95.1255 137.008 99.9931L139.008 100.007ZM140.025 90.1857C141.744 85.4636 145.464 81.7439 150.186 80.0252L149.502 78.1458C144.224 80.0667 140.067 84.2241 138.146 89.5016L140.025 90.1857ZM150.186 80.0252C152.961 79.0152 156.464 79 164 79V77C156.638 77 152.692 76.9848 149.502 78.1458L150.186 80.0252ZM164 79C171.536 79 175.039 79.0152 177.814 80.0252L178.498 78.1458C175.308 76.9848 171.362 77 164 77V79ZM177.814 80.0252C182.536 81.7439 186.256 85.4636 187.975 90.1857L189.854 89.5016C187.933 84.2241 183.776 80.0667 178.498 78.1458L177.814 80.0252ZM187.975 90.1857C188.778 92.3921 188.958 95.0921 188.992 100.007L190.992 99.9931C190.958 95.1255 190.793 92.0823 189.854 89.5016L187.975 90.1857ZM288 99H189.992V101H288V99ZM321.435 93.435C318.723 96.1472 315.148 97.5594 309.812 98.2767C304.448 98.9979 297.456 99 288 99V101C297.4 101 304.55 101.002 310.079 100.259C315.636 99.5117 319.704 97.9949 322.849 94.8492L321.435 93.435ZM327 60C327 69.4564 326.998 76.448 326.277 81.8122C325.559 87.1476 324.147 90.7229 321.435 93.435L322.849 94.8492C325.995 91.7035 327.512 87.6358 328.259 82.0787C329.002 76.5503 329 69.3998 329 60H327ZM327 40V60H329V40H327ZM321.435 6.56497C324.147 9.27713 325.559 12.8524 326.277 18.1878C326.998 23.552 327 30.5436 327 40H329C329 30.6002 329.002 23.4497 328.259 17.9213C327.512 12.3642 325.995 8.29646 322.849 5.15076L321.435 6.56497ZM288 1C297.456 1 304.448 1.00212 309.812 1.72332C315.148 2.44064 318.723 3.85281 321.435 6.56497L322.849 5.15076C319.704 2.00506 315.636 0.488292 310.079 -0.25885C304.55 -1.00212 297.4 -1 288 -1V1ZM40 1H288V-1H40V1ZM6.56497 6.56497C9.27713 3.85281 12.8524 2.44064 18.1878 1.72332C23.552 1.00212 30.5436 1 40 1V-1C30.6002 -1 23.4497 -1.00212 17.9213 -0.25885C12.3641 0.488292 8.29646 2.00506 5.15076 5.15076L6.56497 6.56497Z"
mask="url(#path-1-inside-1_18299_4168)"
/>
</svg>`;export{e as MathUtil,n as TransactionUtil,o as UiHelperUtil,L as WuiAccountButton,W as WuiAllWalletsImage,l as WuiAvatar,r as WuiBalance,M as WuiBanner,Z as WuiBannerImg,b as WuiButton,V as WuiCard,d as WuiCardSelect,p as WuiCardSelectLoader,H as WuiChip,c as WuiChipButton,m as WuiCompatibleNetwork,k as WuiConnectButton,_ as WuiCtaButton,h as WuiDetailsGroup,g as WuiDetailsGroupItem,I as WuiDropdownMenu,B as WuiEmailInput,v as WuiEnsInput,T as WuiFlex,w as WuiGrid,S as WuiIcon,f as WuiIconBox,x as WuiIconButton,A as WuiIconLink,N as WuiImage,D as WuiInputAmount,E as WuiInputElement,P as WuiInputNumeric,U as WuiInputText,G as WuiLink,z as WuiListAccordion,q as WuiListAccount,y as WuiListButton,F as WuiListContent,O as WuiListDescription,Q as WuiListItem,j as WuiListNetwork,J as WuiListSocial,K as WuiListToken,R as WuiListWallet,X as WuiListWalletTransaction,Y as WuiLoadingHexagon,$ as WuiLoadingSpinner,a1 as WuiLoadingThumbnail,i1 as WuiLogo,s1 as WuiLogoSelect,C1 as WuiNetworkButton,u1 as WuiNetworkImage,t1 as WuiNoticeCard,e1 as WuiOtp,n1 as WuiPreviewItem,o1 as WuiProfileButton,L1 as WuiProfileButtonV2,W1 as WuiPromo,l1 as WuiQrCode,r1 as WuiSearchBar,M1 as WuiSelect,Z1 as WuiSeparator,b1 as WuiShimmer,V1 as WuiSnackbar,d1 as WuiTabs,p1 as WuiTag,H1 as WuiText,c1 as WuiTokenButton,m1 as WuiTokenListItem,k1 as WuiTooltip,_1 as WuiTransactionListItem,h1 as WuiTransactionListItemLoader,g1 as WuiTransactionVisual,I1 as WuiVisual,B1 as WuiVisualThumbnail,v1 as WuiWalletImage,T1 as customElement,w1 as initializeTheming,S1 as setColorTheme,f1 as setThemeVariables,s as swapInputMaskBottomSvg,C as swapInputMaskTopSvg};
{"ActionError":{"index":0,"kind":{"FunctionCallError":{"CompilationError":{"CodeDoesNotExist":{"account_id":"web4.nearbuilders.testnet"}}}}}}
1 automatic refund step from the network not shown.
This page reads FastNEAR's public transaction index and stores nothing. This command asks a NEAR archival node for the same transaction and needs no keys.
curl -s https://archival-rpc.testnet.fastnear.com -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":1,"method":"tx","params":{"tx_hash":"5uyAvqW4bUFECnFzYNruQVZc7GaqumNcZiP1aJn9Nzqz","sender_account_id":"web4.nearbuilders.testnet","wait_until":"FINAL"}}'Vouch has its own page because testnet.nearblocks.io stopped indexing on 27 Sep 2026, so it can't show newer transactions.