sui-explorer-local
Version:
Local Sui Explorer
47 lines • 100 kB
JavaScript
var ht=(r,e,t)=>{if(!e.has(r))throw TypeError("Cannot "+t)};var p=(r,e,t)=>(ht(r,e,"read from private field"),t?t.call(r):e.get(r)),S=(r,e,t)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,t)},w=(r,e,t,n)=>(ht(r,e,"write to private field"),n?n.call(r,t):e.set(r,t),t);var k=(r,e,t)=>(ht(r,e,"access private method"),t);import{r as R}from"./index-76fb7be0.js";import{j as K}from"./jsx-runtime-ffb262ed.js";import{c as ot}from"./clsx-0839fdbe.js";import{a as He}from"./index-d5a566d3.js";import{g as Mr}from"./_commonjsHelpers-de833af9.js";import{r as vn}from"./index-da07a199.js";const gn="0.51.2",yn="1.23.0",bn={"-32700":"ParseError","-32600":"InvalidRequest","-32601":"MethodNotFound","-32602":"InvalidParams","-32603":"InternalError"};class Ir extends Error{}class Fr extends Ir{constructor(e,t){super(e),this.code=t,this.type=bn[t]??"ServerError"}}class wn extends Ir{constructor(e,t,n){super(e),this.status=t,this.statusText=n}}var Wt=(r,e,t)=>{if(!e.has(r))throw TypeError("Cannot "+t)},B=(r,e,t)=>(Wt(r,e,"read from private field"),t?t.call(r):e.get(r)),Q=(r,e,t)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,t)},pe=(r,e,t,n)=>(Wt(r,e,"write to private field"),n?n.call(r,t):e.set(r,t),t),Cn=(r,e,t,n)=>({set _(s){pe(r,e,s,t)},get _(){return B(r,e,n)}}),Tr=(r,e,t)=>(Wt(r,e,"access private method"),t),ee,Be,$,se,Me,me,Ct,Nr,Gt,Lr;function Sn(r){const e=new URL(r);return e.protocol=e.protocol.replace("http","ws"),e.toString()}const On={WebSocketConstructor:typeof WebSocket<"u"?WebSocket:void 0,callTimeout:3e4,reconnectTimeout:3e3,maxReconnects:5};class En{constructor(e,t={}){if(Q(this,Ct),Q(this,Gt),Q(this,ee,0),Q(this,Be,0),Q(this,$,null),Q(this,se,null),Q(this,Me,new Set),Q(this,me,new Map),this.endpoint=e,this.options={...On,...t},!this.options.WebSocketConstructor)throw new Error("Missing WebSocket constructor");this.endpoint.startsWith("http")&&(this.endpoint=Sn(this.endpoint))}async makeRequest(e,t){const n=await Tr(this,Ct,Nr).call(this);return new Promise((s,a)=>{pe(this,ee,B(this,ee)+1),B(this,me).set(B(this,ee),{resolve:s,reject:a,timeout:setTimeout(()=>{B(this,me).delete(B(this,ee)),a(new Error(`Request timeout: ${e}`))},this.options.callTimeout)}),n.send(JSON.stringify({jsonrpc:"2.0",id:B(this,ee),method:e,params:t}))}).then(({error:s,result:a})=>{if(s)throw new Fr(s.message,s.code);return a})}async subscribe(e){const t=new An(e);return B(this,Me).add(t),await t.subscribe(this),()=>t.unsubscribe(this)}}ee=new WeakMap;Be=new WeakMap;$=new WeakMap;se=new WeakMap;Me=new WeakMap;me=new WeakMap;Ct=new WeakSet;Nr=function(){return B(this,se)?B(this,se):(pe(this,se,new Promise(r=>{var e;(e=B(this,$))==null||e.close(),pe(this,$,new this.options.WebSocketConstructor(this.endpoint)),B(this,$).addEventListener("open",()=>{pe(this,Be,0),r(B(this,$))}),B(this,$).addEventListener("close",()=>{Cn(this,Be)._++,B(this,Be)<=this.options.maxReconnects&&setTimeout(()=>{Tr(this,Gt,Lr).call(this)},this.options.reconnectTimeout)}),B(this,$).addEventListener("message",({data:t})=>{let n;try{n=JSON.parse(t)}catch(s){console.error(new Error(`Failed to parse RPC message: ${t}`,{cause:s}));return}if("id"in n&&n.id!=null&&B(this,me).has(n.id)){const{resolve:s,timeout:a}=B(this,me).get(n.id);clearTimeout(a),s(n)}else if("params"in n){const{params:s}=n;B(this,Me).forEach(a=>{a.subscriptionId===s.subscription&&s.subscription===a.subscriptionId&&a.onMessage(s.result)})}})})),B(this,se))};Gt=new WeakSet;Lr=async function(){var r;return(r=B(this,$))==null||r.close(),pe(this,se,null),Promise.allSettled([...B(this,Me)].map(e=>e.subscribe(this)))};class An{constructor(e){this.subscriptionId=null,this.subscribed=!1,this.input=e}onMessage(e){this.subscribed&&this.input.onMessage(e)}async unsubscribe(e){const{subscriptionId:t}=this;return this.subscribed=!1,t==null?!1:(this.subscriptionId=null,e.makeRequest(this.input.unsubscribe,[t]))}async subscribe(e){this.subscriptionId=null,this.subscribed=!0;const t=await e.makeRequest(this.input.method,this.input.params);this.subscribed&&(this.subscriptionId=t)}}var zt=(r,e,t)=>{if(!e.has(r))throw TypeError("Cannot "+t)},D=(r,e,t)=>(zt(r,e,"read from private field"),t?t.call(r):e.get(r)),Qe=(r,e,t)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,t)},St=(r,e,t,n)=>(zt(r,e,"write to private field"),n?n.call(r,t):e.set(r,t),t),kn=(r,e,t)=>(zt(r,e,"access private method"),t),je,G,Pe,Ot,qr;class _n{constructor(e){Qe(this,Ot),Qe(this,je,0),Qe(this,G,void 0),Qe(this,Pe,void 0),St(this,G,e)}fetch(e,t){const n=D(this,G).fetch??globalThis.fetch;if(!n)throw new Error("The current environment does not support fetch, you can provide a fetch implementation in the options for SuiHTTPTransport.");return n(e,t)}async request(e){var s,a;St(this,je,D(this,je)+1);const t=await this.fetch(((s=D(this,G).rpc)==null?void 0:s.url)??D(this,G).url,{method:"POST",headers:{"Content-Type":"application/json","Client-Sdk-Type":"typescript","Client-Sdk-Version":gn,"Client-Target-Api-Version":yn,...(a=D(this,G).rpc)==null?void 0:a.headers},body:JSON.stringify({jsonrpc:"2.0",id:D(this,je),method:e.method,params:e.params})});if(!t.ok)throw new wn(`Unexpected status code: ${t.status}`,t.status,t.statusText);const n=await t.json();if("error"in n&&n.error!=null)throw new Fr(n.error.message,n.error.code);return n.result}async subscribe(e){const t=await kn(this,Ot,qr).call(this).subscribe(e);return async()=>!!await t()}}je=new WeakMap;G=new WeakMap;Pe=new WeakMap;Ot=new WeakSet;qr=function(){var r;if(!D(this,Pe)){const e=D(this,G).WebSocketConstructor??globalThis.WebSocket;if(!e)throw new Error("The current environment does not support WebSocket, you can provide a WebSocketConstructor in the options for SuiHTTPTransport.");St(this,Pe,new En(((r=D(this,G).websocket)==null?void 0:r.url)??D(this,G).url,{WebSocketConstructor:e,...D(this,G).websocket}))}return D(this,Pe)};function xn(r){switch(r){case"mainnet":return"https://fullnode.mainnet.sui.io:443";case"testnet":return"https://fullnode.testnet.sui.io:443";case"devnet":return"https://fullnode.devnet.sui.io:443";case"localnet":return"http://127.0.0.1:9000";default:throw new Error(`Unknown network: ${r}`)}}function jn(r){if(r.length>=255)throw new TypeError("Alphabet too long");for(var e=new Uint8Array(256),t=0;t<e.length;t++)e[t]=255;for(var n=0;n<r.length;n++){var s=r.charAt(n),a=s.charCodeAt(0);if(e[a]!==255)throw new TypeError(s+" is ambiguous");e[a]=n}var i=r.length,l=r.charAt(0),o=Math.log(i)/Math.log(256),c=Math.log(256)/Math.log(i);function f(h){if(h instanceof Uint8Array||(ArrayBuffer.isView(h)?h=new Uint8Array(h.buffer,h.byteOffset,h.byteLength):Array.isArray(h)&&(h=Uint8Array.from(h))),!(h instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(h.length===0)return"";for(var v=0,g=0,m=0,y=h.length;m!==y&&h[m]===0;)m++,v++;for(var b=(y-m)*c+1>>>0,C=new Uint8Array(b);m!==y;){for(var O=h[m],_=0,E=b-1;(O!==0||_<g)&&E!==-1;E--,_++)O+=256*C[E]>>>0,C[E]=O%i>>>0,O=O/i>>>0;if(O!==0)throw new Error("Non-zero carry");g=_,m++}for(var I=b-g;I!==b&&C[I]===0;)I++;for(var A=l.repeat(v);I<b;++I)A+=r.charAt(C[I]);return A}function u(h){if(typeof h!="string")throw new TypeError("Expected String");if(h.length===0)return new Uint8Array;for(var v=0,g=0,m=0;h[v]===l;)g++,v++;for(var y=(h.length-v)*o+1>>>0,b=new Uint8Array(y);h[v];){var C=e[h.charCodeAt(v)];if(C===255)return;for(var O=0,_=y-1;(C!==0||O<m)&&_!==-1;_--,O++)C+=i*b[_]>>>0,b[_]=C%256>>>0,C=C/256>>>0;if(C!==0)throw new Error("Non-zero carry");m=O,v++}for(var E=y-m;E!==y&&b[E]===0;)E++;for(var I=new Uint8Array(g+(y-E)),A=g;E!==y;)I[A++]=b[E++];return I}function d(h){var v=u(h);if(v)return v;throw new Error("Non-base"+i+" character")}return{encode:f,decodeUnsafe:u,decode:d}}var Rn=jn;const Bn=Rn,Pn="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";var Mn=Bn(Pn);const In=Mr(Mn),Dr=r=>In.decode(r),ft=8192;function Xe(r){if(r.length<ft)return btoa(String.fromCharCode(...r));let e="";for(var t=0;t<r.length;t+=ft){const n=r.slice(t,t+ft);e+=String.fromCharCode(...n)}return btoa(e)}function Fn(r){return r.reduce((e,t)=>e+t.toString(16).padStart(2,"0"),"")}const Tn=32;function nr(r){try{return Dr(r).length===Tn}catch{return!1}}const Ur=32;function te(r){return Nn(r)&&Ln(r)===Ur}function Ye(r){return te(r)}function re(r,e=!1){let t=r.toLowerCase();return!e&&t.startsWith("0x")&&(t=t.slice(2)),`0x${t.padStart(Ur*2,"0")}`}function Je(r,e=!1){return re(r,e)}function Nn(r){return/^(0x|0X)?[a-fA-F0-9]+$/.test(r)&&r.length%2===0}function Ln(r){return/^(0x|0X)/.test(r)?(r.length-2)/2:r.length/2}const qn=Symbol.for("@mysten/transaction");function Dn(r){return!!r&&typeof r=="object"&&r[qn]===!0}const Wr=Symbol.for("@mysten/SuiClient");function Un(r){return typeof r=="object"&&r!==null&&r[Wr]===!0}class Gr{get[Wr](){return!0}constructor(e){this.transport=e.transport??new _n({url:e.url})}async getRpcApiVersion(){return(await this.transport.request({method:"rpc.discover",params:[]})).info.version}async getCoins(e){if(!e.owner||!te(re(e.owner)))throw new Error("Invalid Sui address");return await this.transport.request({method:"suix_getCoins",params:[e.owner,e.coinType,e.cursor,e.limit]})}async getAllCoins(e){if(!e.owner||!te(re(e.owner)))throw new Error("Invalid Sui address");return await this.transport.request({method:"suix_getAllCoins",params:[e.owner,e.cursor,e.limit]})}async getBalance(e){if(!e.owner||!te(re(e.owner)))throw new Error("Invalid Sui address");return await this.transport.request({method:"suix_getBalance",params:[e.owner,e.coinType]})}async getAllBalances(e){if(!e.owner||!te(re(e.owner)))throw new Error("Invalid Sui address");return await this.transport.request({method:"suix_getAllBalances",params:[e.owner]})}async getCoinMetadata(e){return await this.transport.request({method:"suix_getCoinMetadata",params:[e.coinType]})}async getTotalSupply(e){return await this.transport.request({method:"suix_getTotalSupply",params:[e.coinType]})}async call(e,t){return await this.transport.request({method:e,params:t})}async getMoveFunctionArgTypes(e){return await this.transport.request({method:"sui_getMoveFunctionArgTypes",params:[e.package,e.module,e.function]})}async getNormalizedMoveModulesByPackage(e){return await this.transport.request({method:"sui_getNormalizedMoveModulesByPackage",params:[e.package]})}async getNormalizedMoveModule(e){return await this.transport.request({method:"sui_getNormalizedMoveModule",params:[e.package,e.module]})}async getNormalizedMoveFunction(e){return await this.transport.request({method:"sui_getNormalizedMoveFunction",params:[e.package,e.module,e.function]})}async getNormalizedMoveStruct(e){return await this.transport.request({method:"sui_getNormalizedMoveStruct",params:[e.package,e.module,e.struct]})}async getOwnedObjects(e){if(!e.owner||!te(re(e.owner)))throw new Error("Invalid Sui address");return await this.transport.request({method:"suix_getOwnedObjects",params:[e.owner,{filter:e.filter,options:e.options},e.cursor,e.limit]})}async getObject(e){if(!e.id||!Ye(Je(e.id)))throw new Error("Invalid Sui Object id");return await this.transport.request({method:"sui_getObject",params:[e.id,e.options]})}async tryGetPastObject(e){return await this.transport.request({method:"sui_tryGetPastObject",params:[e.id,e.version,e.options]})}async multiGetObjects(e){if(e.ids.forEach(n=>{if(!n||!Ye(Je(n)))throw new Error(`Invalid Sui Object id ${n}`)}),e.ids.length!==new Set(e.ids).size)throw new Error(`Duplicate object ids in batch call ${e.ids}`);return await this.transport.request({method:"sui_multiGetObjects",params:[e.ids,e.options]})}async queryTransactionBlocks(e){return await this.transport.request({method:"suix_queryTransactionBlocks",params:[{filter:e.filter,options:e.options},e.cursor,e.limit,(e.order||"descending")==="descending"]})}async getTransactionBlock(e){if(!nr(e.digest))throw new Error("Invalid Transaction digest");return await this.transport.request({method:"sui_getTransactionBlock",params:[e.digest,e.options]})}async multiGetTransactionBlocks(e){if(e.digests.forEach(n=>{if(!nr(n))throw new Error(`Invalid Transaction digest ${n}`)}),e.digests.length!==new Set(e.digests).size)throw new Error(`Duplicate digests in batch call ${e.digests}`);return await this.transport.request({method:"sui_multiGetTransactionBlocks",params:[e.digests,e.options]})}async executeTransactionBlock(e){return await this.transport.request({method:"sui_executeTransactionBlock",params:[typeof e.transactionBlock=="string"?e.transactionBlock:Xe(e.transactionBlock),Array.isArray(e.signature)?e.signature:[e.signature],e.options,e.requestType]})}async signAndExecuteTransactionBlock({transactionBlock:e,signer:t,...n}){let s;e instanceof Uint8Array?s=e:(e.setSenderIfNotSet(t.toSuiAddress()),s=await e.build({client:this}));const{signature:a,bytes:i}=await t.signTransactionBlock(s);return this.executeTransactionBlock({transactionBlock:i,signature:a,...n})}async getTotalTransactionBlocks(){const e=await this.transport.request({method:"sui_getTotalTransactionBlocks",params:[]});return BigInt(e)}async getReferenceGasPrice(){const e=await this.transport.request({method:"suix_getReferenceGasPrice",params:[]});return BigInt(e)}async getStakes(e){if(!e.owner||!te(re(e.owner)))throw new Error("Invalid Sui address");return await this.transport.request({method:"suix_getStakes",params:[e.owner]})}async getStakesByIds(e){return e.stakedSuiIds.forEach(t=>{if(!t||!Ye(Je(t)))throw new Error(`Invalid Sui Stake id ${t}`)}),await this.transport.request({method:"suix_getStakesByIds",params:[e.stakedSuiIds]})}async getLatestSuiSystemState(){return await this.transport.request({method:"suix_getLatestSuiSystemState",params:[]})}async queryEvents(e){return await this.transport.request({method:"suix_queryEvents",params:[e.query,e.cursor,e.limit,(e.order||"descending")==="descending"]})}async subscribeEvent(e){return this.transport.subscribe({method:"suix_subscribeEvent",unsubscribe:"suix_unsubscribeEvent",params:[e.filter],onMessage:e.onMessage})}async subscribeTransaction(e){return this.transport.subscribe({method:"suix_subscribeTransaction",unsubscribe:"suix_unsubscribeTransaction",params:[e.filter],onMessage:e.onMessage})}async devInspectTransactionBlock(e){var n;let t;if(Dn(e.transactionBlock))e.transactionBlock.setSenderIfNotSet(e.sender),t=Xe(await e.transactionBlock.build({client:this,onlyTransactionKind:!0}));else if(typeof e.transactionBlock=="string")t=e.transactionBlock;else if(e.transactionBlock instanceof Uint8Array)t=Xe(e.transactionBlock);else throw new Error("Unknown transaction block format.");return await this.transport.request({method:"sui_devInspectTransactionBlock",params:[e.sender,t,(n=e.gasPrice)==null?void 0:n.toString(),e.epoch]})}async dryRunTransactionBlock(e){return await this.transport.request({method:"sui_dryRunTransactionBlock",params:[typeof e.transactionBlock=="string"?e.transactionBlock:Xe(e.transactionBlock)]})}async getDynamicFields(e){if(!e.parentId||!Ye(Je(e.parentId)))throw new Error("Invalid Sui Object id");return await this.transport.request({method:"suix_getDynamicFields",params:[e.parentId,e.cursor,e.limit]})}async getDynamicFieldObject(e){return await this.transport.request({method:"suix_getDynamicFieldObject",params:[e.parentId,e.name]})}async getLatestCheckpointSequenceNumber(){const e=await this.transport.request({method:"sui_getLatestCheckpointSequenceNumber",params:[]});return String(e)}async getCheckpoint(e){return await this.transport.request({method:"sui_getCheckpoint",params:[e.id]})}async getCheckpoints(e){return await this.transport.request({method:"sui_getCheckpoints",params:[e.cursor,e==null?void 0:e.limit,e.descendingOrder]})}async getCommitteeInfo(e){return await this.transport.request({method:"suix_getCommitteeInfo",params:[e==null?void 0:e.epoch]})}async getNetworkMetrics(){return await this.transport.request({method:"suix_getNetworkMetrics",params:[]})}async getAddressMetrics(){return await this.transport.request({method:"suix_getLatestAddressMetrics",params:[]})}async getEpochMetrics(e){return await this.transport.request({method:"suix_getEpochMetrics",params:[e==null?void 0:e.cursor,e==null?void 0:e.limit,e==null?void 0:e.descendingOrder]})}async getAllEpochAddressMetrics(e){return await this.transport.request({method:"suix_getAllEpochAddressMetrics",params:[e==null?void 0:e.descendingOrder]})}async getEpochs(e){return await this.transport.request({method:"suix_getEpochs",params:[e==null?void 0:e.cursor,e==null?void 0:e.limit,e==null?void 0:e.descendingOrder]})}async getMoveCallMetrics(){return await this.transport.request({method:"suix_getMoveCallMetrics",params:[]})}async getCurrentEpoch(){return await this.transport.request({method:"suix_getCurrentEpoch",params:[]})}async getValidatorsApy(){return await this.transport.request({method:"suix_getValidatorsApy",params:[]})}async getChainIdentifier(){const e=await this.getCheckpoint({id:"0"}),t=Dr(e.digest);return Fn(t.slice(0,4))}async resolveNameServiceAddress(e){return await this.transport.request({method:"suix_resolveNameServiceAddress",params:[e.name]})}async resolveNameServiceNames(e){return await this.transport.request({method:"suix_resolveNameServiceNames",params:[e.address,e.cursor,e.limit]})}async getProtocolConfig(e){return await this.transport.request({method:"sui_getProtocolConfig",params:[e==null?void 0:e.version]})}async waitForTransactionBlock({signal:e,timeout:t=60*1e3,pollInterval:n=2*1e3,...s}){const a=AbortSignal.timeout(t),i=new Promise((l,o)=>{a.addEventListener("abort",()=>o(a.reason))});for(i.catch(()=>{});!a.aborted;){e==null||e.throwIfAborted();try{return await this.getTransactionBlock(s)}catch{await Promise.race([new Promise(o=>setTimeout(o,n)),i])}}throw a.throwIfAborted(),new Error("Unexpected error while waiting for transaction block.")}}var Vt=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(r){return this.listeners.add(r),this.onSubscribe(),()=>{this.listeners.delete(r),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Ae=typeof window>"u"||"Deno"in globalThis;function Et(){}function Ii(r,e){return typeof r=="function"?r(e):r}function At(r){return typeof r=="number"&&r>=0&&r!==1/0}function zr(r,e){return Math.max(r+(e||0)-Date.now(),0)}function Fi(r,e){const{type:t="all",exact:n,fetchStatus:s,predicate:a,queryKey:i,stale:l}=r;if(i){if(n){if(e.queryHash!==Wn(i,e.options))return!1}else if(!$t(e.queryKey,i))return!1}if(t!=="all"){const o=e.isActive();if(t==="active"&&!o||t==="inactive"&&o)return!1}return!(typeof l=="boolean"&&e.isStale()!==l||s&&s!==e.state.fetchStatus||a&&!a(e))}function Ti(r,e){const{exact:t,status:n,predicate:s,mutationKey:a}=r;if(a){if(!e.options.mutationKey)return!1;if(t){if(kt(e.options.mutationKey)!==kt(a))return!1}else if(!$t(e.options.mutationKey,a))return!1}return!(n&&e.state.status!==n||s&&!s(e))}function Wn(r,e){return((e==null?void 0:e.queryKeyHashFn)||kt)(r)}function kt(r){return JSON.stringify(r,(e,t)=>xt(t)?Object.keys(t).sort().reduce((n,s)=>(n[s]=t[s],n),{}):t)}function $t(r,e){return r===e?!0:typeof r!=typeof e?!1:r&&e&&typeof r=="object"&&typeof e=="object"?!Object.keys(e).some(t=>!$t(r[t],e[t])):!1}function Vr(r,e){if(r===e)return r;const t=sr(r)&&sr(e);if(t||xt(r)&&xt(e)){const n=t?r:Object.keys(r),s=n.length,a=t?e:Object.keys(e),i=a.length,l=t?[]:{};let o=0;for(let c=0;c<i;c++){const f=t?c:a[c];!t&&r[f]===void 0&&e[f]===void 0&&n.includes(f)?(l[f]=void 0,o++):(l[f]=Vr(r[f],e[f]),l[f]===r[f]&&r[f]!==void 0&&o++)}return s===i&&o===s?r:l}return e}function _t(r,e){if(!e||Object.keys(r).length!==Object.keys(e).length)return!1;for(const t in r)if(r[t]!==e[t])return!1;return!0}function sr(r){return Array.isArray(r)&&r.length===Object.keys(r).length}function xt(r){if(!ar(r))return!1;const e=r.constructor;if(e===void 0)return!0;const t=e.prototype;return!(!ar(t)||!t.hasOwnProperty("isPrototypeOf"))}function ar(r){return Object.prototype.toString.call(r)==="[object Object]"}function Gn(r){return new Promise(e=>{setTimeout(e,r)})}function jt(r,e,t){return typeof t.structuralSharing=="function"?t.structuralSharing(r,e):t.structuralSharing!==!1?Vr(r,e):e}function Ni(r,e,t=0){const n=[...r,e];return t&&n.length>t?n.slice(1):n}function Li(r,e,t=0){const n=[e,...r];return t&&n.length>t?n.slice(0,-1):n}var zn=Symbol(),ae,X,ve,xr,Vn=(xr=class extends Vt{constructor(){super();S(this,ae,void 0);S(this,X,void 0);S(this,ve,void 0);w(this,ve,e=>{if(!Ae&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}})}onSubscribe(){p(this,X)||this.setEventListener(p(this,ve))}onUnsubscribe(){var e;this.hasListeners()||((e=p(this,X))==null||e.call(this),w(this,X,void 0))}setEventListener(e){var t;w(this,ve,e),(t=p(this,X))==null||t.call(this),w(this,X,e(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(e){p(this,ae)!==e&&(w(this,ae,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){var e;return typeof p(this,ae)=="boolean"?p(this,ae):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},ae=new WeakMap,X=new WeakMap,ve=new WeakMap,xr),$r=new Vn,ge,Y,ye,jr,$n=(jr=class extends Vt{constructor(){super();S(this,ge,!0);S(this,Y,void 0);S(this,ye,void 0);w(this,ye,e=>{if(!Ae&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}})}onSubscribe(){p(this,Y)||this.setEventListener(p(this,ye))}onUnsubscribe(){var e;this.hasListeners()||((e=p(this,Y))==null||e.call(this),w(this,Y,void 0))}setEventListener(e){var t;w(this,ye,e),(t=p(this,Y))==null||t.call(this),w(this,Y,e(this.setOnline.bind(this)))}setOnline(e){p(this,ge)!==e&&(w(this,ge,e),this.listeners.forEach(n=>{n(e)}))}isOnline(){return p(this,ge)}},ge=new WeakMap,Y=new WeakMap,ye=new WeakMap,jr),Hr=new $n;function Hn(r){return Math.min(1e3*2**r,3e4)}function Kr(r){return(r??"online")==="online"?Hr.isOnline():!0}var Zr=class{constructor(r){this.revert=r==null?void 0:r.revert,this.silent=r==null?void 0:r.silent}};function dt(r){return r instanceof Zr}function Kn(r){let e=!1,t=0,n=!1,s,a,i;const l=new Promise((m,y)=>{a=m,i=y}),o=m=>{var y;n||(h(new Zr(m)),(y=r.abort)==null||y.call(r))},c=()=>{e=!0},f=()=>{e=!1},u=()=>!$r.isFocused()||r.networkMode!=="always"&&!Hr.isOnline(),d=m=>{var y;n||(n=!0,(y=r.onSuccess)==null||y.call(r,m),s==null||s(),a(m))},h=m=>{var y;n||(n=!0,(y=r.onError)==null||y.call(r,m),s==null||s(),i(m))},v=()=>new Promise(m=>{var y;s=b=>{const C=n||!u();return C&&m(b),C},(y=r.onPause)==null||y.call(r)}).then(()=>{var m;s=void 0,n||(m=r.onContinue)==null||m.call(r)}),g=()=>{if(n)return;let m;try{m=r.fn()}catch(y){m=Promise.reject(y)}Promise.resolve(m).then(d).catch(y=>{var E;if(n)return;const b=r.retry??(Ae?0:3),C=r.retryDelay??Hn,O=typeof C=="function"?C(t,y):C,_=b===!0||typeof b=="number"&&t<b||typeof b=="function"&&b(t,y);if(e||!_){h(y);return}t++,(E=r.onFail)==null||E.call(r,t,y),Gn(O).then(()=>{if(u())return v()}).then(()=>{e?h(y):g()})})};return Kr(r.networkMode)?g():v().then(g),{promise:l,cancel:o,continue:()=>(s==null?void 0:s())?l:Promise.resolve(),cancelRetry:c,continueRetry:f}}function Zn(){let r=[],e=0,t=d=>{d()},n=d=>{d()},s=d=>setTimeout(d,0);const a=d=>{s=d},i=d=>{let h;e++;try{h=d()}finally{e--,e||c()}return h},l=d=>{e?r.push(d):s(()=>{t(d)})},o=d=>(...h)=>{l(()=>{d(...h)})},c=()=>{const d=r;r=[],d.length&&s(()=>{n(()=>{d.forEach(h=>{t(h)})})})};return{batch:i,batchCalls:o,schedule:l,setNotifyFunction:d=>{t=d},setBatchNotifyFunction:d=>{n=d},setScheduler:a}}var Ht=Zn(),ie,Rr,Qn=(Rr=class{constructor(){S(this,ie,void 0)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),At(this.gcTime)&&w(this,ie,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(r){this.gcTime=Math.max(this.gcTime||0,r??(Ae?1/0:5*60*1e3))}clearGcTimeout(){p(this,ie)&&(clearTimeout(p(this,ie)),w(this,ie,void 0))}},ie=new WeakMap,Rr),be,we,q,F,M,Ne,oe,W,V,Br,qi=(Br=class extends Qn{constructor(e){super();S(this,W);S(this,be,void 0);S(this,we,void 0);S(this,q,void 0);S(this,F,void 0);S(this,M,void 0);S(this,Ne,void 0);S(this,oe,void 0);w(this,oe,!1),w(this,Ne,e.defaultOptions),this.setOptions(e.options),w(this,M,[]),w(this,q,e.cache),this.queryKey=e.queryKey,this.queryHash=e.queryHash,w(this,be,e.state||Xn(this.options)),this.state=p(this,be),this.scheduleGc()}get meta(){return this.options.meta}setOptions(e){this.options={...p(this,Ne),...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){!p(this,M).length&&this.state.fetchStatus==="idle"&&p(this,q).remove(this)}setData(e,t){const n=jt(this.state.data,e,this.options);return k(this,W,V).call(this,{data:n,type:"success",dataUpdatedAt:t==null?void 0:t.updatedAt,manual:t==null?void 0:t.manual}),n}setState(e,t){k(this,W,V).call(this,{type:"setState",state:e,setStateOptions:t})}cancel(e){var n,s;const t=(n=p(this,F))==null?void 0:n.promise;return(s=p(this,F))==null||s.cancel(e),t?t.then(Et).catch(Et):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(p(this,be))}isActive(){return p(this,M).some(e=>e.options.enabled!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?p(this,M).some(e=>e.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(e=0){return this.state.isInvalidated||this.state.data===void 0||!zr(this.state.dataUpdatedAt,e)}onFocus(){var t;const e=p(this,M).find(n=>n.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(t=p(this,F))==null||t.continue()}onOnline(){var t;const e=p(this,M).find(n=>n.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(t=p(this,F))==null||t.continue()}addObserver(e){p(this,M).includes(e)||(p(this,M).push(e),this.clearGcTimeout(),p(this,q).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){p(this,M).includes(e)&&(w(this,M,p(this,M).filter(t=>t!==e)),p(this,M).length||(p(this,F)&&(p(this,oe)?p(this,F).cancel({revert:!0}):p(this,F).cancelRetry()),this.scheduleGc()),p(this,q).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return p(this,M).length}invalidate(){this.state.isInvalidated||k(this,W,V).call(this,{type:"invalidate"})}fetch(e,t){var c,f,u;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(t!=null&&t.cancelRefetch))this.cancel({silent:!0});else if(p(this,F))return p(this,F).continueRetry(),p(this,F).promise}if(e&&this.setOptions(e),!this.options.queryFn){const d=p(this,M).find(h=>h.options.queryFn);d&&this.setOptions(d.options)}const n=new AbortController,s={queryKey:this.queryKey,meta:this.meta},a=d=>{Object.defineProperty(d,"signal",{enumerable:!0,get:()=>(w(this,oe,!0),n.signal)})};a(s);const i=()=>!this.options.queryFn||this.options.queryFn===zn?Promise.reject(new Error(`Missing queryFn: '${this.options.queryHash}'`)):(w(this,oe,!1),this.options.persister?this.options.persister(this.options.queryFn,s,this):this.options.queryFn(s)),l={fetchOptions:t,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:i};a(l),(c=this.options.behavior)==null||c.onFetch(l,this),w(this,we,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((f=l.fetchOptions)==null?void 0:f.meta))&&k(this,W,V).call(this,{type:"fetch",meta:(u=l.fetchOptions)==null?void 0:u.meta});const o=d=>{var h,v,g,m;dt(d)&&d.silent||k(this,W,V).call(this,{type:"error",error:d}),dt(d)||((v=(h=p(this,q).config).onError)==null||v.call(h,d,this),(m=(g=p(this,q).config).onSettled)==null||m.call(g,this.state.data,d,this)),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return w(this,F,Kn({fn:l.fetchFn,abort:n.abort.bind(n),onSuccess:d=>{var h,v,g,m;if(d===void 0){o(new Error(`${this.queryHash} data is undefined`));return}this.setData(d),(v=(h=p(this,q).config).onSuccess)==null||v.call(h,d,this),(m=(g=p(this,q).config).onSettled)==null||m.call(g,d,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:o,onFail:(d,h)=>{k(this,W,V).call(this,{type:"failed",failureCount:d,error:h})},onPause:()=>{k(this,W,V).call(this,{type:"pause"})},onContinue:()=>{k(this,W,V).call(this,{type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode})),p(this,F).promise}},be=new WeakMap,we=new WeakMap,q=new WeakMap,F=new WeakMap,M=new WeakMap,Ne=new WeakMap,oe=new WeakMap,W=new WeakSet,V=function(e){const t=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...Qr(n.data,this.options),fetchMeta:e.meta??null};case"success":return{...n,data:e.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=e.error;return dt(s)&&s.revert&&p(this,we)?{...p(this,we),fetchStatus:"idle"}:{...n,error:s,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),Ht.batch(()=>{p(this,M).forEach(n=>{n.onQueryUpdate()}),p(this,q).notify({query:this,type:"updated",action:e})})},Br);function Qr(r,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Kr(e.networkMode)?"fetching":"paused",...r===void 0&&{error:null,status:"pending"}}}function Xn(r){const e=typeof r.initialData=="function"?r.initialData():r.initialData,t=e!==void 0,n=t?typeof r.initialDataUpdatedAt=="function"?r.initialDataUpdatedAt():r.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:t?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:t?"success":"pending",fetchStatus:"idle"}}var N,x,Le,T,le,Ce,z,qe,Se,Oe,ue,ce,J,Ee,he,Re,De,Rt,Ue,Bt,We,Pt,Ge,Mt,ze,It,Ve,Ft,$e,Tt,it,Xr,Pr,Yn=(Pr=class extends Vt{constructor(e,t){super();S(this,he);S(this,De);S(this,Ue);S(this,We);S(this,Ge);S(this,ze);S(this,Ve);S(this,$e);S(this,it);S(this,N,void 0);S(this,x,void 0);S(this,Le,void 0);S(this,T,void 0);S(this,le,void 0);S(this,Ce,void 0);S(this,z,void 0);S(this,qe,void 0);S(this,Se,void 0);S(this,Oe,void 0);S(this,ue,void 0);S(this,ce,void 0);S(this,J,void 0);S(this,Ee,new Set);this.options=t,w(this,N,e),w(this,z,null),this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(p(this,x).addObserver(this),ir(p(this,x),this.options)?k(this,he,Re).call(this):this.updateResult(),k(this,Ge,Mt).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Nt(p(this,x),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Nt(p(this,x),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,k(this,ze,It).call(this),k(this,Ve,Ft).call(this),p(this,x).removeObserver(this)}setOptions(e,t){const n=this.options,s=p(this,x);if(this.options=p(this,N).defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");k(this,$e,Tt).call(this),p(this,x).setOptions(this.options),n._defaulted&&!_t(this.options,n)&&p(this,N).getQueryCache().notify({type:"observerOptionsUpdated",query:p(this,x),observer:this});const a=this.hasListeners();a&&or(p(this,x),s,this.options,n)&&k(this,he,Re).call(this),this.updateResult(t),a&&(p(this,x)!==s||this.options.enabled!==n.enabled||this.options.staleTime!==n.staleTime)&&k(this,De,Rt).call(this);const i=k(this,Ue,Bt).call(this);a&&(p(this,x)!==s||this.options.enabled!==n.enabled||i!==p(this,J))&&k(this,We,Pt).call(this,i)}getOptimisticResult(e){const t=p(this,N).getQueryCache().build(p(this,N),e),n=this.createResult(t,e);return es(this,n)&&(w(this,T,n),w(this,Ce,this.options),w(this,le,p(this,x).state)),n}getCurrentResult(){return p(this,T)}trackResult(e,t){const n={};return Object.keys(e).forEach(s=>{Object.defineProperty(n,s,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(s),t==null||t(s),e[s])})}),n}trackProp(e){p(this,Ee).add(e)}getCurrentQuery(){return p(this,x)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=p(this,N).defaultQueryOptions(e),n=p(this,N).getQueryCache().build(p(this,N),t);return n.isFetchingOptimistic=!0,n.fetch().then(()=>this.createResult(n,t))}fetch(e){return k(this,he,Re).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),p(this,T)))}createResult(e,t){var I;const n=p(this,x),s=this.options,a=p(this,T),i=p(this,le),l=p(this,Ce),c=e!==n?e.state:p(this,Le),{state:f}=e;let u={...f},d=!1,h;if(t._optimisticResults){const A=this.hasListeners(),Z=!A&&ir(e,t),Ze=A&&or(e,n,t,s);(Z||Ze)&&(u={...u,...Qr(f.data,e.options)}),t._optimisticResults==="isRestoring"&&(u.fetchStatus="idle")}let{error:v,errorUpdatedAt:g,status:m}=u;if(t.select&&u.data!==void 0)if(a&&u.data===(i==null?void 0:i.data)&&t.select===p(this,qe))h=p(this,Se);else try{w(this,qe,t.select),h=t.select(u.data),h=jt(a==null?void 0:a.data,h,t),w(this,Se,h),w(this,z,null)}catch(A){w(this,z,A)}else h=u.data;if(t.placeholderData!==void 0&&h===void 0&&m==="pending"){let A;if(a!=null&&a.isPlaceholderData&&t.placeholderData===(l==null?void 0:l.placeholderData))A=a.data;else if(A=typeof t.placeholderData=="function"?t.placeholderData((I=p(this,Oe))==null?void 0:I.state.data,p(this,Oe)):t.placeholderData,t.select&&A!==void 0)try{A=t.select(A),w(this,z,null)}catch(Z){w(this,z,Z)}A!==void 0&&(m="success",h=jt(a==null?void 0:a.data,A,t),d=!0)}p(this,z)&&(v=p(this,z),h=p(this,Se),g=Date.now(),m="error");const y=u.fetchStatus==="fetching",b=m==="pending",C=m==="error",O=b&&y,_=h!==void 0;return{status:m,fetchStatus:u.fetchStatus,isPending:b,isSuccess:m==="success",isError:C,isInitialLoading:O,isLoading:O,data:h,dataUpdatedAt:u.dataUpdatedAt,error:v,errorUpdatedAt:g,failureCount:u.fetchFailureCount,failureReason:u.fetchFailureReason,errorUpdateCount:u.errorUpdateCount,isFetched:u.dataUpdateCount>0||u.errorUpdateCount>0,isFetchedAfterMount:u.dataUpdateCount>c.dataUpdateCount||u.errorUpdateCount>c.errorUpdateCount,isFetching:y,isRefetching:y&&!b,isLoadingError:C&&!_,isPaused:u.fetchStatus==="paused",isPlaceholderData:d,isRefetchError:C&&_,isStale:Kt(e,t),refetch:this.refetch}}updateResult(e){const t=p(this,T),n=this.createResult(p(this,x),this.options);if(w(this,le,p(this,x).state),w(this,Ce,this.options),p(this,le).data!==void 0&&w(this,Oe,p(this,x)),_t(n,t))return;w(this,T,n);const s={},a=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,l=typeof i=="function"?i():i;if(l==="all"||!l&&!p(this,Ee).size)return!0;const o=new Set(l??p(this,Ee));return this.options.throwOnError&&o.add("error"),Object.keys(p(this,T)).some(c=>{const f=c;return p(this,T)[f]!==t[f]&&o.has(f)})};(e==null?void 0:e.listeners)!==!1&&a()&&(s.listeners=!0),k(this,it,Xr).call(this,{...s,...e})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&k(this,Ge,Mt).call(this)}},N=new WeakMap,x=new WeakMap,Le=new WeakMap,T=new WeakMap,le=new WeakMap,Ce=new WeakMap,z=new WeakMap,qe=new WeakMap,Se=new WeakMap,Oe=new WeakMap,ue=new WeakMap,ce=new WeakMap,J=new WeakMap,Ee=new WeakMap,he=new WeakSet,Re=function(e){k(this,$e,Tt).call(this);let t=p(this,x).fetch(this.options,e);return e!=null&&e.throwOnError||(t=t.catch(Et)),t},De=new WeakSet,Rt=function(){if(k(this,ze,It).call(this),Ae||p(this,T).isStale||!At(this.options.staleTime))return;const t=zr(p(this,T).dataUpdatedAt,this.options.staleTime)+1;w(this,ue,setTimeout(()=>{p(this,T).isStale||this.updateResult()},t))},Ue=new WeakSet,Bt=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(p(this,x)):this.options.refetchInterval)??!1},We=new WeakSet,Pt=function(e){k(this,Ve,Ft).call(this),w(this,J,e),!(Ae||this.options.enabled===!1||!At(p(this,J))||p(this,J)===0)&&w(this,ce,setInterval(()=>{(this.options.refetchIntervalInBackground||$r.isFocused())&&k(this,he,Re).call(this)},p(this,J)))},Ge=new WeakSet,Mt=function(){k(this,De,Rt).call(this),k(this,We,Pt).call(this,k(this,Ue,Bt).call(this))},ze=new WeakSet,It=function(){p(this,ue)&&(clearTimeout(p(this,ue)),w(this,ue,void 0))},Ve=new WeakSet,Ft=function(){p(this,ce)&&(clearInterval(p(this,ce)),w(this,ce,void 0))},$e=new WeakSet,Tt=function(){const e=p(this,N).getQueryCache().build(p(this,N),this.options);if(e===p(this,x))return;const t=p(this,x);w(this,x,e),w(this,Le,e.state),this.hasListeners()&&(t==null||t.removeObserver(this),e.addObserver(this))},it=new WeakSet,Xr=function(e){Ht.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(p(this,T))}),p(this,N).getQueryCache().notify({query:p(this,x),type:"observerResultsUpdated"})})},Pr);function Jn(r,e){return e.enabled!==!1&&r.state.data===void 0&&!(r.state.status==="error"&&e.retryOnMount===!1)}function ir(r,e){return Jn(r,e)||r.state.data!==void 0&&Nt(r,e,e.refetchOnMount)}function Nt(r,e,t){if(e.enabled!==!1){const n=typeof t=="function"?t(r):t;return n==="always"||n!==!1&&Kt(r,e)}return!1}function or(r,e,t,n){return(r!==e||n.enabled===!1)&&(!t.suspense||r.state.status!=="error")&&Kt(r,t)}function Kt(r,e){return e.enabled!==!1&&r.isStaleByTime(e.staleTime)}function es(r,e){return!_t(r.getCurrentResult(),e)}var Yr=R.createContext(void 0),ts=r=>{const e=R.useContext(Yr);if(r)return r;if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},Di=({client:r,children:e})=>(R.useEffect(()=>(r.mount(),()=>{r.unmount()}),[r]),K.jsx(Yr.Provider,{value:r,children:e})),Jr=R.createContext(!1),rs=()=>R.useContext(Jr);Jr.Provider;function ns(){let r=!1;return{clearReset:()=>{r=!1},reset:()=>{r=!0},isReset:()=>r}}var ss=R.createContext(ns()),as=()=>R.useContext(ss);function is(r,e){return typeof r=="function"?r(...e):!!r}var os=(r,e)=>{(r.suspense||r.throwOnError)&&(e.isReset()||(r.retryOnMount=!1))},ls=r=>{R.useEffect(()=>{r.clearReset()},[r])},us=({result:r,errorResetBoundary:e,throwOnError:t,query:n})=>r.isError&&!e.isReset()&&!r.isFetching&&n&&is(t,[r.error,n]),cs=r=>{r.suspense&&typeof r.staleTime!="number"&&(r.staleTime=1e3)},hs=(r,e)=>(r==null?void 0:r.suspense)&&e.isPending,fs=(r,e,t)=>e.fetchOptimistic(r).catch(()=>{t.clearReset()});function ds(r,e,t){const n=ts(t),s=rs(),a=as(),i=n.defaultQueryOptions(r);i._optimisticResults=s?"isRestoring":"optimistic",cs(i),os(i,a),ls(a);const[l]=R.useState(()=>new e(n,i)),o=l.getOptimisticResult(i);if(R.useSyncExternalStore(R.useCallback(c=>{const f=s?()=>{}:l.subscribe(Ht.batchCalls(c));return l.updateResult(),f},[l,s]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),R.useEffect(()=>{l.setOptions(i,{listeners:!1})},[i,l]),hs(i,o))throw fs(i,l,a);if(us({result:o,errorResetBoundary:a,throwOnError:i.throwOnError,query:n.getQueryCache().get(i.queryHash)}))throw o.error;return i.notifyOnChangeProps?o:l.trackResult(o)}function Ui(r,e){return ds(r,Yn,e)}function ps(r,e){if(typeof r!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function ms(r){var e=ps(r,"string");return typeof e=="symbol"?e:String(e)}function vs(r,e,t){return e=ms(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function lr(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(r,s).enumerable})),t.push.apply(t,n)}return t}function ur(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?lr(Object(t),!0).forEach(function(n){vs(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):lr(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function cr(r,e){var t={};for(var n in r)t[n]=e(r[n],n);return t}var gs=(r,e,t)=>{for(var n of Object.keys(r)){var s;if(r[n]!==((s=e[n])!==null&&s!==void 0?s:t[n]))return!1}return!0},Zt=r=>{var e=t=>{var n=r.defaultClassName,s=ur(ur({},r.defaultVariants),t);for(var a in s){var i,l=(i=s[a])!==null&&i!==void 0?i:r.defaultVariants[a];if(l!=null){var o=l;typeof o=="boolean"&&(o=o===!0?"true":"false");var c=r.variantClassNames[a][o];c&&(n+=" "+c)}}for(var[f,u]of r.compoundVariants)gs(f,s,r.defaultVariants)&&(n+=" "+u);return n};return e.variants=()=>Object.keys(r.variantClassNames),e.classNames={get base(){return r.defaultClassName.split(" ")[0]},get variants(){return cr(r.variantClassNames,t=>cr(t,n=>n.split(" ")[0]))}},e};function ys(r){var e=r.match(/^var\((.*)\)$/);return e?e[1]:r}function en(r,e){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],n={};for(var s in r){var a=r[s],i=[...t,s];typeof a=="string"||typeof a=="number"||a==null?n[s]=e(a,i):typeof a=="object"&&!Array.isArray(a)?n[s]=en(a,e,i):console.warn('Skipping invalid key "'.concat(i.join("."),'". Should be a string, number, null or object. Received: "').concat(Array.isArray(a)?"Array":typeof a,'"'))}return n}var hr={},bs=r=>{var{fileScope:e,css:t}=r,n=e.packageName?[e.packageName,e.filePath].join("/"):e.filePath,s=hr[n];if(!s){var a=document.createElement("style");e.packageName&&a.setAttribute("data-package",e.packageName),a.setAttribute("data-file",e.filePath),a.setAttribute("type","text/css"),s=hr[n]=a,document.head.appendChild(a)}s.innerHTML=t};/*! https://mths.be/cssesc v3.0.0 by @mathias */var ws={},Cs=ws.hasOwnProperty,Ss=function(e,t){if(!e)return t;var n={};for(var s in t)n[s]=Cs.call(e,s)?e[s]:t[s];return n},Os=/[ -,\.\/:-@\[-\^`\{-~]/,Es=/[ -,\.\/:-@\[\]\^`\{-~]/,As=/(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g,Qt=function r(e,t){t=Ss(t,r.options),t.quotes!="single"&&t.quotes!="double"&&(t.quotes="single");for(var n=t.quotes=="double"?'"':"'",s=t.isIdentifier,a=e.charAt(0),i="",l=0,o=e.length;l<o;){var c=e.charAt(l++),f=c.charCodeAt(),u=void 0;if(f<32||f>126){if(f>=55296&&f<=56319&&l<o){var d=e.charCodeAt(l++);(d&64512)==56320?f=((f&1023)<<10)+(d&1023)+65536:l--}u="\\"+f.toString(16).toUpperCase()+" "}else t.escapeEverything?Os.test(c)?u="\\"+c:u="\\"+f.toString(16).toUpperCase()+" ":/[\t\n\f\r\x0B]/.test(c)?u="\\"+f.toString(16).toUpperCase()+" ":c=="\\"||!s&&(c=='"'&&n==c||c=="'"&&n==c)||s&&Es.test(c)?u="\\"+c:u=c;i+=u}return s&&(/^-[-\d]/.test(i)?i="\\-"+i.slice(1):/\d/.test(a)&&(i="\\3"+a+" "+i.slice(1))),i=i.replace(As,function(h,v,g){return v&&v.length%2?h:(v||"")+g}),!s&&t.wrap?n+i+n:i};Qt.options={escapeEverything:!1,isIdentifier:!1,quotes:"single",wrap:!1};Qt.version="3.0.0";var ks=Qt;const Xt=Mr(ks);class _s{constructor(e){const{failure:t,gotoFn:n,output:s}=this._buildTables(e);this.gotoFn=n,this.output=s,this.failure=t}_buildTables(e){const t={0:{}},n={};let s=0;for(const l of e){let o=0;for(const c of l)t[o]&&c in t[o]?o=t[o][c]:(s++,t[o][c]=s,t[s]={},o=s,n[s]=[]);n[o].push(l)}const a={},i=[];for(const l in t[0]){const o=t[0][l];a[o]=0,i.push(o)}for(;i.length>0;){const l=i.shift();if(l!==void 0)for(const o in t[l]){const c=t[l][o];i.push(c);let f=a[l];for(;f>0&&!(o in t[f]);)f=a[f];if(o in t[f]){const u=t[f][o];a[c]=u,n[c]=[...n[c],...n[u]]}else a[c]=0}}return{gotoFn:t,output:n,failure:a}}search(e){let t=0;const n=[];for(let s=0;s<e.length;s++){const a=e[s];for(;t>0&&!(a in this.gotoFn[t]);)t=this.failure[t];if(a in this.gotoFn[t]&&(t=this.gotoFn[t][a],this.output[t].length>0)){const i=this.output[t];n.push([s,i])}}return n}}var xs={appendCss:()=>{},registerClassName:()=>{},onEndFileScope:()=>{},registerComposition:()=>{},markCompositionUsed:()=>{},getIdentOption:()=>"short"},rt=[xs],js=()=>{if(rt.length<1)throw new Error("No adapter configured");return rt[rt.length-1]},tn=!1,Rs=r=>{tn||Bs(r)},Bs=r=>{if(!r)throw new Error('No adapter provided when calling "setAdapter"');tn=!0,rt.push(r)},Ps=function(){return js().markCompositionUsed(...arguments)};function rn(r,e){return e||(e=r.slice(0)),Object.freeze(Object.defineProperties(r,{raw:{value:Object.freeze(e)}}))}var j;(function(r){r.Attribute="attribute",r.Pseudo="pseudo",r.PseudoElement="pseudo-element",r.Tag="tag",r.Universal="universal",r.Adjacent="adjacent",r.Child="child",r.Descendant="descendant",r.Parent="parent",r.Sibling="sibling",r.ColumnCombinator="column-combinator"})(j||(j={}));var U;(function(r){r.Any="any",r.Element="element",r.End="end",r.Equals="equals",r.Exists="exists",r.Hyphen="hyphen",r.Not="not",r.Start="start"})(U||(U={}));const fr=/^[^\\#]?(?:\\(?:[\da-f]{1,6}\s?|.)|[\w\-\u00b0-\uFFFF])+/,Ms=/\\([\da-f]{1,6}\s?|(\s)|.)/gi,Is=new Map([[126,U.Element],[94,U.Start],[36,U.End],[42,U.Any],[33,U.Not],[124,U.Hyphen]]),Fs=new Set(["has","not","matches","is","where","host","host-context"]);function Ts(r){switch(r.type){case j.Adjacent:case j.Child:case j.Descendant:case j.Parent:case j.Sibling:case j.ColumnCombinator:return!0;default:return!1}}const Ns=new Set(["contains","icontains"]);function Ls(r,e,t){const n=parseInt(e,16)-65536;return n!==n||t?e:n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,n&1023|56320)}function _e(r){return r.replace(Ms,Ls)}function pt(r){return r===39||r===34}function dr(r){return r===32||r===9||r===10||r===12||r===13}function qs(r){const e=[],t=nn(e,`${r}`,0);if(t<r.length)throw new Error(`Unmatched selector: ${r.slice(t)}`);return e}function nn(r,e,t){let n=[];function s(d){const h=e.slice(t+d).match(fr);if(!h)throw new Error(`Expected name, found ${e.slice(t)}`);const[v]=h;return t+=d+v.length,_e(v)}function a(d){for(t+=d;t<e.length&&dr(e.charCodeAt(t));)t++}function i(){t+=1;const d=t;let h=1;for(;h>0&&t<e.length;t++)e.charCodeAt(t)===40&&!l(t)?h++:e.charCodeAt(t)===41&&!l(t)&&h--;if(h)throw new Error("Parenthesis not matched");return _e(e.slice(d,t-1))}function l(d){let h=0;for(;e.charCodeAt(--d)===92;)h++;return(h&1)===1}function o(){if(n.length>0&&Ts(n[n.length-1]))throw new Error("Did not expect successive traversals.")}function c(d){if(n.length>0&&n[n.length-1].type===j.Descendant){n[n.length-1].type=d;return}o(),n.push({type:d})}function f(d,h){n.push({type:j.Attribute,name:d,action:h,value:s(1),namespace:null,ignoreCase:"quirks"})}function u(){if(n.length&&n[n.length-1].type===j.Descendant&&n.pop(),n.length===0)throw new Error("Empty sub-selector");r.push(n)}if(a(0),e.length===t)return t;e:for(;t<e.length;){const d=e.charCodeAt(t);switch(d){case 32:case 9:case 10:case 12:case 13:{(n.length===0||n[0].type!==j.Descendant)&&(o(),n.push({type:j.Descendant})),a(1);break}case 62:{c(j.Child),a(1);break}case 60:{c(j.Parent),a(1);break}case 126:{c(j.Sibling),a(1);break}case 43:{c(j.Adjacent),a(1);break}case 46:{f("class",U.Element);break}case 35:{f("id",U.Equals);break}case 91:{a(1);let h,v=null;e.charCodeAt(t)===124?h=s(1):e.startsWith("*|",t)?(v="*",h=s(2)):(h=s(0),e.charCodeAt(t)===124&&e.charCodeAt(t+1)!==61&&(v=h,h=s(1))),a(0);let g=U.Exists;const m=Is.get(e.charCodeAt(t));if(m){if(g=m,e.charCodeAt(t+1)!==61)throw new Error("Expected `=`");a(2)}else e.charCodeAt(t)===61&&(g=U.Equals,a(1));let y="",b=null;if(g!=="exists"){if(pt(e.charCodeAt(t))){const _=e.charCodeAt(t);let E=t+1;for(;E<e.length&&(e.charCodeAt(E)!==_||l(E));)E+=1;if(e.charCodeAt(E)!==_)throw new Error("Attribute value didn't end");y=_e(e.slice(t+1,E)),t=E+1}else{const _=t;for(;t<e.length&&(!dr(e.charCodeAt(t))&&e.charCodeAt(t)!==93||l(t));)t+=1;y=_e(e.slice(_,t))}a(0);const O=e.charCodeAt(t)|32;O===115?(b=!1,a(1)):O===105&&(b=!0,a(1))}if(e.charCodeAt(t)!==93)throw new Error("Attribute selector didn't terminate");t+=1;const C={type:j.Attribute,name:h,action:g,value:y,namespace:v,ignoreCase:b};n.push(C);break}case 58:{if(e.charCodeAt(t+1)===58){n.push({type:j.PseudoElement,name:s(2).toLowerCase(),data:e.charCodeAt(t)===40?i():null});continue}const h=s(1).toLowerCase();let v=null;if(e.charCodeAt(t)===40)if(Fs.has(h)){if(pt(e.charCodeAt(t+1)))throw new Error(`Pseudo-selector ${h} cannot be quoted`);if(v=[],t=nn(v,e,t+1),e.charCodeAt(t)!==41)throw new Error(`Missing closing parenthesis in :${h} (${e})`);t+=1}else{if(v=i(),Ns.has(h)){const g=v.charCodeAt(0);g===v.charCodeAt(v.length-1)&&pt(g)&&(v=v.slice(1,-1))}v=_e(v)}n.push({type:j.Pseudo,name:h,data:v});break}case 44:{u(),n=[],a(1);break}default:{if(e.startsWith("/*",t)){const g=e.indexOf("*/",t+2);if(g<0)throw new Error("Comment was not terminated");t=g+2,n.length===0&&a(0);break}let h=null,v;if(d===42)t+=1,v="*";else if(d===124){if(v="",e.charCodeAt(t+1)===124){c(j.ColumnCombinator),a(2);break}}else if(fr.test(e.slice(t)))v=s(0);else break e;e.charCodeAt(t)===124&&e.charCodeAt(t+1)!==124&&(h=v,e.charCodeAt(t+1)===42?(v="*",t+=2):v=s(1)),n.push(v==="*"?{type:j.Universal,namespace:h}:{type:j.Tag,name:v,namespace:h})}}}return u(),t}function et(){}function pr(){return typeof WeakMap<"u"?new WeakMap:Ds()}function Ds(){return{add:et,delete:et,get:et,set:et,has:function(r){return!1}}}var Us=Object.prototype.hasOwnProperty,Lt=function(r,e){return Us.call(r,e)};function mt(r,e){for(var t in e)Lt(e,t)&&(r[t]=e[t]);return r}var Ws=/^[ \t]*(?:\r\n|\r|\n)/,Gs=/(?:\r\n|\r|\n)[ \t]*$/,zs=/^(?:[\r\n]|$)/,Vs=/(?:\r\n|\r|\n)([ \t]*)(?:[^ \t\r\n]|$)/,$s=/^[ \t]*[\r\n][ \t\r\n]*$/;function mr(r,e,t){var n=0,s=r[0].match(Vs);s&&(n=s[1].length);var a="(\\r\\n|\\r|\\n).{0,"+n+"}",i=new RegExp(a,"g");e&&(r=r.slice(1));var l=t.newline,o=t.trimLeadingNewline,c=t.trimTrailingNewline,f=typeof l=="string",u=r.length,d=r.map(function(h,v){return h=h.replace(i,"$1"),v===0&&o&&(h=h.replace(Ws,"")),v===u-1&&c&&(h=h.replace(Gs,"")),f&&(h=h.replace(/\r\n|\n|\r/g,function(g){return l})),h});return d}function Hs(r,e){for(var t="",n=0,s=r.length;n<s;n++)t+=r[n],n<s-1&&(t+=e[n]);return t}function Ks(r){return Lt(r,"raw")&&Lt(r,"length")}function sn(r){var e=pr(),t=pr();function n(a){for(var i=[],l=1;l<arguments.length;l++)i[l-1]=arguments[l];if(Ks(a)){var o=a,c=(i[0]===n||i[0]===H)&&$s.test(o[0])&&zs.test(o[1]),f=c?t:e,u=f.get(o);if(u||(u=mr(o,c,r),f.set(o,u)),i.length===0)return u[0];var d=Hs(u,c?i.slice(1):i);return d}else return sn(mt(mt({},r),a||{}))}var s=mt(n,{string:function(a){return mr([a],!1,r)[0]}});return s}var H=sn({trimLeadingNewline:!0,trimTrailingNewline:!0});if(typeof module<"u")try{module.exports=H,Object.defineProperty(H,"__esModule",{value:!0}),H.default=H,H.outdent=H}catch{}/*! @license MediaQueryParser - MIT License - Tom Golden (github@tbjgolden.com) *//*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var nt=function(){return nt=Object.assign||function(e){for(var t,n=1,s=arguments.length;n<s;n++){t=arguments[n];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},nt.apply(this,arguments)};function qt(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(r);s<n.length;s++)e.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(r,n[s])&&(t[n[s]]=r[n[s]]);return t}function Zs(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function P(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),s,a=[],i;try{for(;(e===void 0||e-- >0)&&!(s=n.next()).done;)a.push(s.value)}catch(l){i={error:l}}finally{try{s&&!s.done&&(t=n.return)&&t.call(n)}finally{if(i)throw i.error}}return a}var Qs=/(\u000D|\u000C|\u000D\u000A)/g,Xs=/[\u0000\uD800-\uDFFF]/g,Ys=/(\/\*)[\s\S]*?(\*\/)/g,Js=function(e,t){t===void 0&&(t=0),e=e.replace(Qs,`
`).replace(Xs,"�"),e=e.replace(Ys,"");for(var n=[];t<e.length;t+=1){var s=e.charCodeAt(t);if(s===9||s===32||s===10){for(var a=e.charCodeAt(++t);a===9||a===32||a===10;)a=e.charCodeAt(++t);t-=1,n.push({type:"<whitespace-token>"})}else if(s===34){var i=vr(e,t);if(i===null)return null;var l=P(i,2),o=l[0],c=l[1];n.push({type:"<string-token>",value:c}),t=o}else if(s===35){if(t+1<e.length){var f=e.charCodeAt(t+1);if(f===95||f>=65&&f<=90||f>=97&&f<=122||f>=128||f>=48&&f<=57||f===92&&t+2<e.length&&e.charCodeAt(t+2)!==10){var u=an(e,t+1)?"id":"unrestricted",i=ta(e,t+1);if(i!==null){var d=P(i,2),o=d[0],c=d[1];n.push({type:"<hash-token>",value:c.toLowerCase(),flag:u}),t=o;continue}}}n.push({type:"<delim-token>",value:s})}else if(s===39){var i=vr(e,t);if(i===null)return null;var h=P(i,2),o=h[0],c=h[1];n.push({type:"<string-token>",value:c}),t=o}else if(s===40)n.push({type:"<(-token>"});else if(s===41)n.push({type:"<)-token>"});else if(s===43){var v=tt(e,t);if(v===null)n.push({type:"<delim-token>",value:s});else{var g=P(v,2),o=g[0],m=g[1];m[0]==="<dimension-token>"?n.push({type:"<dimension-token>",value:m[1],unit:m[2].toLowerCase(),flag:"number"}):m[0]==="<number-token>"?n.push({type:m[0],value:m[1],flag:m[2]}):n.push({type:m[0],value:m[1],flag:"number"}),t=o}}else if(s===44)n.push({type:"<comma-token>"});else if(s===45){var y=tt(e,t);if(y!==null){var b=P(y,2),o=b[0],m=b[1];m[0]==="<dimension-token>"?n.push({type:"<dimension-token>",value:m[1],unit:m[2].toLowerCase(),flag:"number"}):m[0]==="<number-token>"?n.push({type:m[0],value:m[1],flag:m[2]}):n.push({type:m[0],value:m[1],flag:"number"}),t=o;continue}if(t+2<e.length){var f=e.charCodeAt(t+1),C=e.charCodeAt(t+2);if(f===45&&C===62){n.push({type:"<CDC-token>"}),t+=2;continue}}var i=gr(e,t);if(i!==null){var O=P(i,3),o=O[0],c=O[1],_=O[2];n.push({type:_,value:c}),t=o;continue}n.push({type:"<delim-token>",value:s})}else if(s===46){var y=tt(e,t);if(y===null)n.push({type:"<delim-token>",value:s});else{var E=P(y,2),o=E[0],m=E[1];m[0]==="<dimension-token>"?n.push({type:"<dimension-token>",value:m[1],unit:m[2].toLowerCase(),flag:"number"}):m[0]==="<number-token>"?n.push({type:m[0],value:m[1],flag:m[2]}):n.push({type:m[0],value:m[1],flag:"number"}),t=o;continue}}else if(s===58)n.push({type:"<colon-token>"});else if(s===59)n.push({type:"<semicolon-token>"});else if(s===60){if(t+3<e.length){var f=e.charCodeAt(t+1),C=e.charCodeAt(t+2),I=e.charCodeAt(t+3);if(f===33&&C===45&&I===45){n.push({type:"<CDO-token>"}),t+=3;continue}}n.push({type:"<delim-token>",value:s})}else if(s===64){var i=Yt(e,t+1);if(i!==null){var A=P(i,2),o=A[0],c=A[1];n.push({type:"<at-keyword-token>",value:c.toLowerCase()}),t=o;continue}n.push({type:"<delim-token>",value:s})}else if(s===91)n.push({type:"<[-token>"});else if(s===92){var i=Ke(e,t);if(i===null)return null;var Z=P(i,2),o=Z[0],c=Z[1];e=e.slice(0,t)+c+e.slice(o+1),t-=1}else if(s===93)n.push({type:"<]-token>"});else if(s===123)n.push({type:"<{-token>"});else if(s===125)n.push({type:"<}-token>"});else if(s>=48&&s<=57){var i=tt(e,t),Ze=P(i,2),o=Ze[0],m=Ze[1];m[0]==="<dimension-token>"?n.push({type:"<dimension-token>",value:m[1],unit:m[2].toLowerCase(),flag:"number"}):m[0]==="<number-token>"?n.push({type:m[0],value:m[1],flag:m[2]}):n.push({type:m[0],value:m[1],flag:"number"}),t=o}else if(s===95||s>=65&&s<=90||s>=97&&s<=122||s>=128){var i=gr(e,t);if(i===null)return null;var ct=P(i,3),o=ct[0],c=ct[1],_=ct[2];n.push({type:_,value:c}),t=o}else n.push({type:"<delim-token>",value:s})}return n.push({type:"<EOF-token>"}),n},vr=function(e,t){if(e.length<=t+1)return null;for(var n=e.charCodeAt(t),s=[],a=t+1;a<e.length;a+=1){var i=e.charCodeAt(a);if(i===n)return[a,String.fromCharCode.apply(null,s)];if(i===92){var l=Ke(e,a);if(l===null)return null;var o=P(l,2),c=o[0],f=o[1];s.push(f),a=c}else{if(i===10)return null;s.push(i)}}return null},an=function(e,t){if(e.length<=t)return!1;var n=e.charCodeAt(t);if(n===45){if(e.length<=t+1)return!1;var s=e.charCodeAt(t+1);if(s===45||s===95||s>=65&&s<=90||s>=97&&s<=122||s>=128)return!0;if(s===92){if(e.length<=t+2)return!1;var a=e.charCodeAt(t+2);return a!==10}else return!1}else{if(n===95||n>=65&&n<=90||n>=97&&n<=122||n>=128)return!0;if(n===92){if(e.length<=t+1)return!1;var s=e.charCodeAt(t+1);return s!==10}else return!1}},Ke=function(e,t){if(e.length<=t+1||e.charCodeAt(t)!==92)return null;var n=e.charCodeAt(t+1);if(n===10)return null;if(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102){for(var s=[n],a=Math.min(t+7,e.length),i=t+2;i<a;i+=1){var l=e.charCodeAt(i);if(l>=48&&l<=57||l>=65&&l<=70||l>=97&&l<=102)s.push(l);else break}if(i<e.length){var o=e.charCodeAt(i);(o===9||o===32||o===10)&&(i+=1)}return[i-1,parseInt(String.fromCharCode.apply(null,s),16)]}else return[t+1,n]},tt=function(e,t){var n=ea(e,t);if(n===null)return null;var s=P(n,3),a=s[0],i=s[1],l=s[2],o=Yt(e,a+1);if(o!==null){var c=P(o,2),f=c[0],u=c[1];return[f,["<dimension-token>",i,u]]}return a+1<e.length&&e.charCodeAt(a+1)===37?[a+1,["<percentage-token>",i]]:[a,["<number-token>",i,l]]},ea=function(e,t){if(e.length<=t)return null;var n="integer",s=[],a=e.charCodeAt(t);for((a===43||a===45)&&(t+=1,a===45&&s.push(45));t<e.length;){var i=e.charCodeAt(t);if(i>=48&&i<=57)s.push(i),t+=1;else break}if(t+1<e.length){var l=e.charCodeAt(t),o=e.charCodeAt(t+1);if(l===46&&o>=48&&o<=57)for(s.push(l,o),n="number",t+=2;t<e.length;){var i=e.charCodeAt(t);if(i>=48&&i<=57)s.push(i),t+=1;else break}}if(t+1<e.length){var l=e.charCodeAt(t),o=e.charCodeAt(t+1),c=e.charCodeAt(t+2);if(l===69||l===101){var f=o>=48&&o<=57;if(f||(o===43||o===45)&&c>=48&&c<=57)for(n="number",f?(s.push(69,o),t+=2):o===45?(s.push(69,45,c),t+=3):(s.push(69,c),t+=3);t<e.length;){var i=e.charCodeAt(t);if(i>=48&&i<=57)s.push(i),t+=1;else break}}}var u=String.fromCharCode.apply(null,s),d=n==="number"?parseFloat(u):parseInt(u);return d===-0&&(d=0),Number.isNaN(d)?null:[t-1,d,n]},ta=function(e,t){if(e.length<=t)return null;for(var n=[],s=e.charCodeAt(t);t<e.length;s=e.charCodeAt(++t)){if(s===45||s===95||s>=65&&s<=90||s>=97&&s<=122||s>=128||s>=48&&s<=57){n.push(s);continue}else{var a=Ke(e,t);if(a!==null){var i=P(a,2),l=i[0],o=i[1];n.push(o),t=l;continue}}break}return t===0?null:[t-1,String.fromCharCode.apply(null,n)]},Yt=function(e,t){if(e.length<=t||!an(e,t))return null;for(var n=[],s=e.charCodeAt(t);t<e.length;s=e.charCodeAt(++t)){if(s===45||s===95||s>=65&&s<=90||s>=97&&s<=122||s>=128||s>=48&&s<=57){n.push(s);continue}else{var a=Ke(e,t);if(a!==null){var i=P(a,2),l=i[0],o=i[1];n.push(o),t=l;continue}}break}return[t-1,String.fromCharCode.apply(null,n)]},ra=function(e,t){for(var n=e.charCodeAt(t);n===9||n===32||n===10;)n=e.charCodeAt(++t);for(var s=[],a=!1;t<e.length;){if(n===41)return[t,String.fromCharCode.apply(null,s)];if(n===34||n===39||n===40)return null;if(n===9||n===32||n===10)!a&&s.length!==0&&(a=!0);else if(n===92){var i=Ke(e,t);if(i===null||a)return null;var l=P(i,2),o=l[0],c=l[1];s.push(c),t=o}else{if(a)return null;s.push(n)}n=e.charCodeAt(++t)}return null},gr=function(e,t){var n=Yt(e,t);if(n===null)return null;var s=P(n,2),a=s[0],i=s[1];if(i.toLowerCase()==="url"){if(e.length>a+1){var l=e.charCodeAt(a+1);if(l===40){for(var o=2;a+o<e.length;o+=1){var c=e.charCodeAt(a+o);if(c===34||c===39)return[a+1,i.toLowerCase(),"<function-token>"];if(c!==9&&c!==32&&c!==10){var f=ra(e,a+o);if(f===null)return null;var u=P(f,2),d=u[0],h=u[1];return[d,h,"<url-token>"]}}return[a+1,i.toLowerCase(),"<function-token>"]}}}else if(e.length>a+1){var l=e.charCodeAt(a+1);if(l===40)return[a+1,i.toLowerCase(),"<function-token>"]}return[a,i.toLowerCase(),"<ident-token>"]},na=function(e){for(var t=e.length-1;t>=0;t--)e[t]=sa(e[t]);return e},sa=function(e){if(e.mediaCondition===null)return e;var t=aa(e.mediaCondition);return t.operator===null&&t.children.length===1&&"children"in t.children[0]&&(t=t.children[0]),{mediaPrefix:e.mediaPrefix,mediaType:e.mediaType,mediaCondition:t}},aa=function r(e){for(var t=e.children.length-1;t>=0;t--){var n=e.children[t];if(!("context"in n)){var s=r(n);if(s.operator===null&&s.children.length===1)e.children[t]=s.children[0];else if(s.operator===e.operator&&(s.operator==="and"||s.operator==="or")){for(var a=[t,1],i=0;i<s.children.length;i++)a.push(s.children[i]);e.children.splice.apply(e.children,a)}}}return e},L=function(e,t){return t instanceof Error?new Error("".concat(t.message.trim(),`
`).concat(e.trim())):new Error(e.trim())},ia=function(e){return na(oa(e))},oa=function(e){var t=Js(e.trim());if(t===null)throw L("Failed tokenizing");var n=0,s=t.length-1;if(t[0].type==="<at-keyword-token>"&&t[0].value==="media"){if(t[1].type!=="<whitespace-token>")throw L("Expected whitespace after media");n=2;for(var a=2;a<t.length-1;a++){var i=t[a];if(i.type==="<{-token>"){s=a;break}else if(i.type==="<semicolon-token>")throw L("Expected '{' in media query but found ';'")}}return t=t.slice(n,s),ua(t)},la=function(e){for(var t=[],n=!1,s=0;s<e.length;s++)e[s].type==="<whitespace-token>"?(n=!0,t.length>0&&(t[t.length-1].wsAfter=!0)):(t.push(nt(nt({},e[s]),{wsBefore:n,wsAfter:!1})),n=!1);return t},ua=function(e){for(var t,n,s=[[]],a=0;a<e.length;a++){var i=e[a];i.type==="<comma-token>"?s.push([]):s[s.length-1].push(i)}var l=s.map(la);if(l.length===1&&l[0].length===0)return[{mediaCondition:null,mediaPrefix:null,mediaType:"all"}];var o=l.map(function(h){return h.length===0?null:ca(h)}),c=[];try{for(var f=Zs(o),u=f.next();!u.done;u=f.next()){var d=u.value;d!==null&&c.push(d)}}catch(h){t={error:h}}finally{try{u&&!u.done&&(n=f.return)&&n.call(f)}finally{if(t)throw t.error}}if(c.length===0)throw L("No valid media queries");return c},ca=function(e){var t=e[0];if(t.type==="<(-token>")try{return{mediaPrefix:null,mediaType:"all",mediaCondition:vt(e,!0)}}catch(u){throw L("Expected media condition after '('",u)}else if(t.type==="<ident-token>"){var n=null,s=void 0,a=t.value;(a==="only"||a==="not")&&(n=a);var i=n===null?0:1;if(e.length<=i)throw L("Expected extra token in media query");var l=e[i];if(l.type==="<ident-token>"){var o=l.value;if(o==="all")s="all";else if(o==="print"||o==="screen")s=o;else if(o==="tty"||o==="tv"||o==="projection"||o==="handheld"||o==="braille"||o==="embossed"||o==="aural"||o==="speech")n=n==="not"?null:"not",s="all";else throw L("Unknown ident '".concat(o,"' in media query"))}else if(n==="not"&&l.type==="<(-token>"){var c=[{type:"<(-token>",wsBefore:!1,wsAfter:!1}];c.push.apply(c,e),c.push({type:"<)-token>",wsBefore:!1,wsAfter:!1});try{return{mediaPrefix:null,mediaType:"all",mediaCondition:vt(c,!0)}}catch(u){throw L("Expected media condition after '('",u)}}else throw L("Invalid media query");if(i+1===e.length)return{mediaPrefix:n,mediaType:s,mediaCondition:null};if(i+4<e.length){var f=e[i+1];if(f.type==="<ident-token>"&&f.value==="and")try{return{mediaPrefix:n,mediaType:s,mediaCondition:vt(e.slice(i+2),!1)}}catch(u){throw L("Expected media condition after 'and'",u)}else throw L("Expected 'and' after media prefix")}else throw L("Expected media condition after media prefix")}else throw L("Expected media condition or media prefix")},vt=function r(e,t,n){if(n===void 0&&(n=null),e.length<3||e[0].type!=="<(-token>"||e[e.length-1].type!=="<)-token>")throw new Error("Invalid media condition");for(var s=e.length-1,a=0,i=0,l=0;l<e.length;l++){var o=e[l];if(o.type==="<(-token>"?(i+=1,a=Math.max(a,i)):o.type==="<)-token>"&&(i-=1),i===0){s=l;break}}if(i!==0)throw new Error(`Mismatched parens
Invalid media condition`);var c,f=e.slice(0,s+1);if(a===1?c=ha(f):f[1].type==="<ident-token>"&&f[1].value==="not"?c=r(f.slice(2,-1),!0,"not"):c=r(f.slice(1,-1),!0),s===e.length-1)return{operator:n,children:[c]};var u=e[s+1];if(u.type!=="<ident-token>")throw new Error(`Invalid operator
Invalid media condition`);if(n!==null&&n!==u.value)throw new Error("'".concat(u.value,"' and '").concat(n,`' must not be at same level
Invalid media condition`));if(u.value==="or"&&!t)throw new Error(`Cannot use 'or' at top level of a media query
Invalid media condition`);if(u.value!=="and"&&u.value!=="or")throw new Error("Invalid operator: '".concat(u.value,`'
Invalid media condition`));var d=r(e.slice(s+2),t,u.value);return{operator:u.value,children:[c].concat(d.children)}},ha=function(e){if(e.length<3||e[0].type!=="<(-token>"||e[e.length-1].type!=="<)-token>")throw new Error("Invalid media feature");for(var t=[e[0]],n=1;n<e.length;n++){if(n<e.length-2){var s=e[n],a=e[n+1],i=e[n+2];if(s.type==="<number-token>"&&s.value>0&&a.type==="<delim-token>"&&a.value===47&&i.type==="<number-token>"&&i.value>0){t.push({type:"<ratio-token>",numerator:s.value,denominator:i.value,wsBefore:s.wsBefore,wsAfter:i.wsAfter}),n+=2;continue}}t.push(e[n])}var l=t[1];if(l.type==="<ident-token>"&&t.length===3)return{context:"boolean",feature:l.value};if(t.length===5&&t[1].type==="<ident-token>"&&t[2].type==="<colon-token>"){var o=t[3];if(o.type==="<number-token>"||o.type==="<dimension-token>"||o.type==="<ratio-token>"||o.type==="<ident-token>"){var c=t[1].value,f=null,u=c.slice(0,4);u==="min-"?(f="min",c=c.slice(4)):u==="max-"&&(f="max",c=c.slice(4)),o.wsBefore,o.wsAfter;var d=qt(o,["wsBefore","wsAfter"]);return{context:"value",prefix:f,feature:c,value:d}}}else if(t.length>=5)try{var h=fa(t);return{context:"range",feature:h.featureName,range:h}}catch(v){throw L("Invalid media feature",v)}throw new Error("Invalid media feature")},fa=function(e){var t,n,s,a;if(e.length<5||e[0].type!=="<(-token>"||e[e.length-1].type!=="<)-token>")throw new Error("Invalid range");var i={leftToken:null,leftOp:null,featureName:"",rightOp:null,rightToken:null},l=e[1].type==="<number-token>"||e[1].type==="<dimension-token>"||e[1].type==="<ratio-token>"||e[1].type==="<ident-token>"&&e[1].value==="infinite";if(e[2].type==="<delim-token>"){if(e[2].value===60)e[3].type==="<delim-token>"&&e[3].value===61&&!e[3].wsBefore?i[l?"leftOp":"rightOp"]="<=":i[l?"leftOp":"rightOp"]="<";else if(e[2].value===62)e[3].type==="<delim-token>"&&e[3].value===61&&!e[3].wsBefore?i[l?"leftOp":"rightOp"]=">=":i[l?"leftOp":"rightOp"]=">";else if(e[2].value===61)i[l?"leftOp":"rightOp"]="=";else throw new Error("Invalid range");if(l)i.leftToken=e[1];else if(e[1].type==="<ident-token>")i.featureName=e[1].value;else throw new Error("Invalid range");var o=2+((n=(t=i[l?"leftOp":"rightOp"])===null||t===void 0?void 0:t.length)!==null&&n!==void 0?n:0),c=e[o];if(l)if(c.type==="<ident-token>"){if(i.featureName=c.value,e.length>=7){var f=e[o+1],u=e[o+2];if(f.type==="<delim-token>"){var d=f.value;if(d===60)u.type==="<delim-token>"&&u.value===61&&!u.wsBefore?i.rightOp="<=":i.rightOp="<";else if(d===62)u.type==="<delim-token>"&&u.value===61&&!u.wsBefore?i.rightOp=">=":i.rightOp=">";else throw new Error("Invalid range");var h=e[o+1+((a=(s=i.rightOp)===null||s===void 0?void 0:s.length)!==null&&a!==void 0?a:0)];i.rightToken=h}else throw new Error("Invalid range")}else if(o+2!==e.length)throw new Error("Invalid range")}else throw new Error("Invalid range");else i.rightToken=c;var v=null,g=i.leftToken,m=i.leftOp,y=i.featureName,b=i.rightOp,C=i.rightToken,O=null;if(g!==null){if(g.type==="<ident-token>"){var _=g.type,E=g.value;E==="infinite"&&(O={type:_,value:E})}else if(g.type==="<number-token>"||g.type==="<dimension-token>"||g.type==="<ratio-token>"){g.wsBefore,g.wsAfter;var I=qt(g,["wsBefore","wsAfter"]);O=I}}var A=null;if(C!==null){if(C.type==="<ident-token>"){var _=C.type,E=C.value;E==="infinite"&&(A={type:_,value:E})}else if(C.type==="<number-token>"||C.type==="<dimension-token>"||C.type==="<ratio-token>"){C.wsBefore,C.wsAfter;var Z=qt(C,["wsBefore","wsAfter"]);A=Z}}if(O!==null&&A!==null)if((m==="<"||m==="<=")&&(b==="<"||b==="<="))v={leftToken:O,leftOp:m,featureName:y,rightOp:b,rightToken:A};else if((m===">"||m===">=")&&(b===">"||b===">="))v={leftToken:O,leftOp:m,featureName:y,rightOp:b,rightToken:A};else throw new Error("Invalid range");else O===null&&m===null&&b!==null&&A!==null?v={leftToken:O,leftOp:m,featureName:y,rightOp:b,rightToken:A}:O!==null&&m!==null&&b===null&&A===null&&(v={leftToken:O,leftOp:m,featureName:y,rightOp:b,rightToken:A});return v}else throw new Error("Invalid range")};function da(r,e){if(typeof r!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function pa(r){var e=da(r,"string");return typeof e=="symbol"?e:String(e)}function ma(r,e,t){return e=pa(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function yr(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(r,s).enumerable})),t.push.apply(t,n)}return t}function gt(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?yr(Object(t),!0).forEach(function(n){ma(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):yr(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function va(r,e){if(r==null)return{};var t={},n=Object.keys(r),s,a;for(a=0;a<n.length;a++)s=n[a],!(e.indexOf(s)>=0)&&(t[s]=r[s]);return t}function br(r,e){if(r==null)return{};var t=va(r,e),n,s;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(r);for(s=0;s<a.length;s++)n=a[s],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(r,n)&&(t[n]=r[n])}return t}function xe(r,e){for(var t in r)e(r[t],t)}function fe(r,e){var t={};for(var n in r)e.indexOf(n)===-1&&(t[n]=r[n]);return t}function ga(r,e){var t={};for(var n in r)t[e(r[n],n)]=r[n];return t}var wr;function ya(r){return r.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var ba=(r,e)=>{var t=()=>{var s=new RegExp(".".concat(ya(Xt(e,{isIdentifier:!0}))),"g");return r.replace(s,"&")},n;try{n=qs(r)}catch{throw new Error("Invalid selector: ".concat(t()))}n.forEach(s=>{try{for(var a=s.length-1;a>=-1;a--){if(!s[a])throw new Error;var i=s[a];if(i.type==="child"||i.type==="parent"||i.type==="sibling"||i.type==="adjacent"||i.type==="descendant")throw new Error;if(i.type==="attribute"&&i.name==="class"&&i.value===e)return}}catch{throw new Error(H(wr||(wr=rn([`
Invalid selector: `,`
Style selectors must target the '&' character (along with any modifiers), e.g. `," or ",`.
This is to ensure that each style block only affects the styling of a single class.
If your selector is targeting another class, you should move it to the style definition for that class, e.g. given we have styles for 'parent' and 'child' elements, instead of adding a selector of `,") to 'parent', you should add ",` to 'child').
If your selector is targeting something global, use the 'globalStyle' function instead, e.g. if you wanted to write `,", you should instead write 'globalStyle(",`, { ... })'
`])),t(),"`${parent} &`","`${parent} &:hover`","`& ${child}`","`${parent} &`","`& h1`","`${parent} h1`"))}})};class st{constructor(){this.ruleset=new Map,this.precedenceLookup=new Map}findOrCreateCondition(e){var t=this.ruleset.get(e);return t||(t={query:e,rules:[],children:new st},this.ruleset.set(e,t)),t}getConditionalRulesetByPath(e){var t=this;for(var n of e){var s=t.findOrCreateCondition(n);t=s.children}return t}addRule(e,t,n){var s=this.getConditionalRulesetByPath(n),a=s.findOrCreateCondition(t);if(!a)throw new Error("Failed to add conditional rule");a.rules.push(e)}addConditionPrecedence(e,t){for(var n=this.getConditionalRulesetByPath(e),s=0;s<t.length;s++){var a,i=t[s],l=(a=n.precedenceLookup.get(i))!==null&&a!==void 0?a:new Set;for(var o of t.slice(s+1))l.add(o);n.precedenceLookup.set(i,l)}}isCompatible(e){for(var[t,n]of this.precedenceLookup.entries())for(var s of n){var a;if((a=e.precedenceLookup.get(s))!==null&&a!==void 0&&a.has(t))return!1}for(var{query:i,children:l}of e.ruleset.values()){var o=this.ruleset.get(i);if(o&&!o.children.isCompatible(l))return!1}return!0}merge(e){for(var{query:t,rules:n,children:s}of e.ruleset.values()){var a=this.ruleset.get(t);a?(a.rules.push(...n),a.children.merge(s)):this.ruleset.set(t,{query:t,rules:n,children:s})}for(var[i,l]of e.precedenceLookup.entries()){var o,c=(o=this.precedenceLookup.get(i))!==null&&o!==void 0?o:new Set;this.precedenceLookup.set(i,new Set([...c,...l]))}}mergeIfCompatible(e){return this.isCompatible(e)?(this.merge(e),!0):!1}getSortedRuleset(){var e=this,t=[],n=function(l){var o=e.ruleset.get(s);if(!o)throw new Error("Can't find condition for ".concat(s));var c=t.findIndex(f=>l.has(f.query));c>-1?t.splice(c,0,o):t.push(o)};for(var[s,a]of this.precedenceLookup.entries())n(a);return t}renderToArray(){var e=[];for(var{query:t,rules:n,children:s}of this.getSortedRuleset()){var a={};for(var i of n)a[i.selector]=i.rule;Object.assign(a,...s.renderToArray()),e.push({[t]:a})}return e}}var on={":-moz-any-link":!0,":-moz-full-screen":!0,":-moz-placeholder":!0,":-moz-read-only":!0,":-moz-read-write":!0,":-ms-fullscreen":!0,":-ms-input-placeholder":!0,":-webkit-any-link":!0,":-webkit-full-screen":!0,"::-moz-color-swatch":!0,"::-moz-list-bullet":!0,"::-moz-list-number":!0,"::-moz-page-sequence":!0,"::-moz-page":!0,"::-moz-placeholder":!0,"::-moz-progress-bar":!0,"::-moz-range-progress":!0,"::-moz-range-thumb":!0,"::-moz-range-track":!0,"::-moz-scrolled-page-sequence":!0,"::-moz-selection":!0,"::-ms-backdrop":!0,"::-ms-browse":!0,"::-ms-check":!0,"::-ms-clear":!0,"::-ms-fill-lower":!0,"::-ms-fill-upper":!0,"::-ms-fill":!0,"::-ms-reveal":!0,"::-ms-thumb":!0,"::-ms-ticks-after":!0,"::-ms-ticks-before":!0,"::-ms-tooltip":!0,"::-ms-track":!0,"::-ms-value":!0,"::-webkit-backdrop":!0,"::-webkit-inner-spin-button":!0,"::-webkit-input-placeholder":!0,"::-webkit-meter-bar":!0,"::-webkit-meter-even-less-good-value":!0,"::-webkit-meter-inner-element":!0,"::-webkit-meter-optimum-value":!0,"::-webkit-meter-suboptimum-value":!0,"::-webkit-outer-spin-button":!0,"::-webkit-progress-bar":!0,"::-webkit-progress-inner-element":!0,"::-webkit-progress-inner-value":!0,"::-webkit-progress-value":!0,"::-webkit-resizer":!0,"::-webkit-scrollbar-button":!0,"::-webkit-scrollbar-corner":!0,"::-webkit-scrollbar-thumb":!0,"::-webkit-scrollbar-track-piece":!0,"::-webkit-scrollbar-track":!0,"::-webkit-scrollbar":!0,"::-webkit-search-cancel-button":!0,"::-webkit-search-results-button":!0,"::-webkit-slider-runnable-track":!0,"::-webkit-slider-thumb":!0,"::after":!0,"::backdrop":!0,"::before":!0,"::cue":!0,"::file-selector-button":!0,"::first-letter":!0,"::first-line":!0,"::grammar-error":!0,"::marker":!0,"::placeholder":!0,"::selection":!0,"::spelling-error":!0,"::target-text":!0,"::view-transition-group":!0,"::view-transition-image-pair":!0,"::view-transition-new":!0,"::view-transition-old":!0,"::view-transition":!0,":active":!0,":after":!0,":any-link":!0,":before":!0,":blank":!0,":checked":!0,":default":!0,":defined":!0,":disabled":!0,":empty":!0,":enabled":!0,":first-child":!0,":first-letter":!0,":first-line":!0,":first-of-type":!0,":first":!0,":focus-visible":!0,":focus-within":!0,":focus":!0,":fullscreen":!0,":hover":!0,":in-range":!0,":indeterminate":!0,":invalid":!0,":last-child":!0,":last-of-type":!0,":left":!0,":link":!0,":only-child":!0,":only-of-type":!0,":optional":!0,":out-of-range":!0,":placeholder-shown":!0,":read-only":!0,":read-write":!0,":required":!0,":right":!0,":root":!0,":scope":!0,":target":!0,":valid":!0,":visited":!0},wa=Object.keys(on),Ca=on,Cr,Sr=(r,e)=>new Error(H(Cr||(Cr=rn([`
Invalid media query: "`,`"
`,`
Read more on MDN: https://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries/Using_media_queries
`])),r,e)),Sa=r=>{if(r==="@media ")throw Sr(r,"Query is empty");try{ia(r)}catch(e){throw Sr(r,e.message)}},Oa=["vars"],Ea=["content"],ln="__DECLARATION",Aa={animationIterationCount:!0,borderImage:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,initialLetter:!0,lineClamp:!0,lineHeight:!0,maxLines:!0,opacity:!0,order:!0,orphans:!0,scale:!0,tabSize:!0,WebkitLineClamp:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,maskBorder:!0,maskBorderOutset:!0,maskBorderSlice:!0,maskBorderWidth:!0,shapeImageThreshold:!0,stopOpacity:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0};function ka(r){return r.replace(/([A-Z])/g,"-$1").replace(/^ms-/,"-ms-").toLowerCase()}function _a(r,e,t,n){var s=r.slice(0,e),a=r.slice(t);return"".concat(s).concat(n).concat(a)}var xa=" ",de=[...wa,"@layer","@media","@supports","@container","selectors"];class ja{constructor(e,t){this.rules=[],this.conditionalRulesets=[new st],this.fontFaceRules=[],this.keyframesRules=[],this.localClassNamesMap=new Map(e.map(n=>[n,n])),this.localClassNamesSearch=new _s(e),this.layers=new Map,this.composedClassLists=t.map(n=>{var{identifier:s,classList:a}=n;return{identifier:s,regex:RegExp("(".concat(a,")"),"g")}}).reverse()}processCssObj(e){if(e.type==="fontFace"){this.fontFaceRules.push(e.rule);return}if(e.type==="keyframes"){e.rule=Object.fromEntries(Object.entries(e.rule).map(a=>{var[i,l]=a;return[i,this.transformProperties(l)]})),this.keyframesRules.push(e);return}if(this.currConditionalRuleset=new st,e.type==="layer"){var t="@layer ".concat(e.name);this.addLayer([t])}else{var n=fe(e.rule,de);this.addRule({selector:e.selector,rule:n}),this.transformLayer(e,e.rule["@layer"]),this.transformMedia(e,e.rule["@media"]),this.transformSupports(e,e.rule["@supports"]),this.transformContainer(e,e.rule["@container"]),this.transformSimplePseudos(e,e.rule),this.transformSelectors(e,e.rule)}var s=this.conditionalRulesets[this.conditionalRulesets.length-1];s.mergeIfCompatible(this.currConditionalRuleset)||this.conditionalRulesets.push(this.currConditionalRuleset)}addConditionalRule(e,t){var n=this.transformVars(this.transformProperties(e.rule)),s=this.transformSelector(e.selector);if(!this.currConditionalRuleset)throw new Error("Couldn't add conditional rule");var a=t[t.length-1],i=t.slice(0,t.length-1);this.currConditionalRuleset.addRule({selector:s,rule:n},a,i)}addRule(e){var t=this.transformVars(this.transformProperties(e.rule)),n=this.transformSelector(e.selector);this.rules.push({selector:n,rule:t})}addLayer(e){var t=e.join(" - ");this.layers.set(t,e)}transformProperties(e){return this.transformContent(this.pixelifyProperties(e))}pixelifyProperties(e){return xe(e,(t,n)=>{typeof t=="number"&&t!==0&&!Aa[n]&&(e[n]="".concat(t,"px"))}),e}transformVars(e){var{vars:t}=e,n=br(e,Oa);return t?gt(gt({},ga(t,(s,a)=>ys(a))),n):n}transformContent(e){var{content:t}=e,n=br(e,Ea);if(typeof t>"u")return n;var s=Array.isArray(t)?t:[t];return gt({content:s.map(a=>a&&(a.includes('"')||a.includes("'")||/^([A-Za-z\-]+\([^]*|[^]*-quote|inherit|initial|none|normal|revert|unset)(\s|$)/.test(a))?a:'"'.concat(a,'"'))},n)}transformClassname(e){return".".concat(Xt(e,{isIdentifier:!0}))}transformSelector(e){var t=e,n=function(h){t=t.replace(a,()=>(Ps(h),h))};for(var{identifier:s,regex:a}of this.composedClassLists)n(s);if(this.localClassNamesMap.has(t))return this.transformClassname(t);for(var i=this.localClassNamesSearch.search(t),l=t.length,o=i.length-1;o>=0;o--){var[c,[f]]=i[o],u=c-f.length+1;u>=l||(l=u,t[u-1]!=="."&&(t=_a(t,u,c+1,this.transformClassname(f))))}return t}transformSelectors(e,t,n){xe(t.selectors,(s,a)=>{if(e.type!=="local")throw new Error("Selectors are not allowed within ".concat(e.type==="global"?'"globalStyle"':'"selectors"'));var i=this.transformSelector(a.replace(RegExp("&","g"),e.selector));ba(i,e.selector);var l={selector:i,rule:fe(s,de)};n?this.addConditionalRule(l,n):this.addRule(l);var o={type:"selector",selector:i,rule:s};this.transformLayer(o,s["@layer"],n),this.transformSupports(o,s["@supports"],n),this.transformMedia(o,s["@media"],n)})}transformMedia(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(t){var s;(s=this.currConditionalRuleset)===null||s===void 0||s.addConditionPrecedence(n,Object.keys(t).map(c=>"@media ".concat(c)));for(var[a,i]of Object.entries(t)){var l="@media ".concat(a);Sa(l);var o=[...n,l];this.addConditionalRule({selector:e.selector,rule:fe(i,de)},o),e.type==="local"&&(this.transformSimplePseudos(e,i,o),this.transformSelectors(e,i,o)),this.transformLayer(e,i["@layer"],o),this.transformSupports(e,i["@supports"],o),this.transformContainer(e,i["@container"],o)}}}transformContainer(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(t){var s;(s=this.currConditionalRuleset)===null||s===void 0||s.addConditionPrecedence(n,Object.keys(t).map(a=>"@container ".concat(a))),xe(t,(a,i)=>{var l="@container ".concat(i),o=[...n,l];this.addConditionalRule({selector:e.selector,rule:fe(a,de)},o),e.type==="local"&&(this.transformSimplePseudos(e,a,o),this.transformSelectors(e,a,o)),this.transformLayer(e,a["@layer"],o),this.transformSupports(e,a["@supports"],o),this.transformMedia(e,a["@media"],o)})}}transformLayer(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(t){var s;(s=this.currConditionalRuleset)===null||s===void 0||s.addConditionPrecedence(n,Object.keys(t).map(a=>"@layer ".concat(a))),xe(t,(a,i)=>{var l=[...n,"@layer ".concat(i)];this.addLayer(l),this.addConditionalRule({selector:e.selector,rule:fe(a,de)},l),e.type==="local"&&(this.transformSimplePseudos(e,a,l),this.transformSelectors(e,a,l)),this.transformMedia(e,a["@media"],l),this.transformSupports(e,a["@supports"],l),this.transformContainer(e,a["@container"],l)})}}transformSupports(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(t){var s;(s=this.currConditionalRuleset)===null||s===void 0||s.addConditionPrecedence(n,Object.keys(t).map(a=>"@supports ".concat(a))),xe(t,(a,i)=>{var l=[...n,"@supports ".concat(i)];this.addConditionalRule({selector:e.selector,rule:fe(a,de)},l),e.type==="local"&&(this.transformSimplePseudos(e,a,l),this.transformSelectors(e,a,l)),this.transformLayer(e,a["@layer"],l),this.transformMedia(e,a["@media"],l),this.transformContainer(e,a["@container"],l)})}}transformSimplePseudos(e,t,n){for(var s of Object.keys(t))if(Ca[s]){if(e.type!=="local")throw new Error("Simple pseudos are not valid in ".concat(e.type==="global"?'"globalStyle"':'"selectors"'));n?this.addConditionalRule({selector:"".concat(e.selector).concat(s),rule:t[s]},n):this.addRule({conditions:n,selector:"".concat(e.selector).concat(s),rule:t[s]})}}toCss(){var e=[];for(var t of this.fontFaceRules)e.push(ne({"@font-face":t}));for(var n of this.keyframesRules)e.push(ne({["@keyframes ".concat(n.name)]:n.rule}));for(var s of this.layers.values()){var[a,...i]=s.reverse(),l={[a]:ln};for(var o of i)l={[o]:l};e.push(ne(l))}for(var c of this.rules)e.push(ne({[c.selector]:c.rule}));for(var f of this.conditionalRulesets)for(var u of f.renderToArray())e.push(ne(u));return e.filter(Boolean)}}function ne(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",t=[],n=function(i){var l=r[i];if(l&&Array.isArray(l))t.push(...l.map(c=>ne({[i]:c},e)));else if(l&&typeof l=="object"){var o=Object.keys(l).length===0;o||t.push("".concat(e).concat(i,` {
`).concat(ne(l,e+xa),`
`).concat(e,"}"))}else l===ln?t.push("".concat(e).concat(i,";")):t.push("".concat(e).concat(i.startsWith("--")?i:ka(i),": ").concat(l,";"))};for(var s of Object.keys(r))n(s);return t.join(`
`)}function Ra(r){var{localClassNames:e,cssObjs:t,composedClassLists:n}=r,s=new ja(e,n);for(var a of t)s.processCssObj(a);return s.toCss()}var Jt={exports:{}};Jt.exports;(function(r){const e=(f,u)=>(...d)=>`\x1B[${f(...d)+u}m`,t=(f,u)=>(...d)=>{const h=f(...d);return`\x1B[${38+u};5;${h}m`},n=(f,u)=>(...d)=>{const h=f(...d);return`\x1B[${38+u};2;${h[0]};${h[1]};${h[2]}m`},s=f=>f,a=(f,u,d)=>[f,u,d],i=(f,u,d)=>{Object.defineProperty(f,u,{get:()=>{const h=d();return Object.defineProperty(f,u,{value:h,enumerable:!0,configurable:!0}),h},enumerable:!0,configurable:!0})};let l;const o=(f,u,d,h)=>{l===void 0&&(l=vn());const v=h?10:0,g={};for(const[m,y]of Object.entries(l)){const b=m==="ansi16"?"ansi":m;m===u?g[b]=f(d,v):typeof y=="object"&&(g[b]=f(y[u],v))}return g};function c(){const f=new Map,u={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};u.color.gray=u.color.blackBright,u.bgColor.bgGray=u.bgColor.bgBlackBright,u.color.grey=u.color.blackBright,u.bgColor.bgGrey=u.bgColor.bgBlackBright;for(const[d,h]of Object.entries(u)){for(const[v,g]of Object.entries(h))u[v]={open:`\x1B[${g[0]}m`,close:`\x1B[${g[1]}m`},h[v]=u[v],f.set(g[0],g[1]);Object.defineProperty(u,d,{value:h,enumerable:!1})}return Object.defineProperty(u,"codes",{value:f,enumerable:!1}),u.color.close="\x1B[39m",u.bgColor.close="\x1B[49m",i(u.color,"ansi",()=>o(e,"ansi16",s,!1)),i(u.color,"ansi256",()=>o(t,"ansi256",s,!1)),i(u.color,"ansi16m",()=>o(n,"rgb",a,!1)),i(u.bgColor,"ansi",()=>o(e,"ansi16",s,!0)),i(u.bgColor,"ansi256",()=>o(t,"ansi256",s,!0)),i(u.bgColor,"ansi16m",()=>o(n,"rgb",a,!0)),u}Object.defineProperty(r,"exports",{enumerable:!0,get:c})})(Jt);var Ba=Jt.exports,Pa={stdout:!1,stderr:!1};const Ma=(r,e,t)=>{let n=r.indexOf(e);if(n===-1)return r;const s=e.length;let a=0,i="";do i+=r.substr(a,n-a)+e+t,a=n+s,n=r.indexOf(e,a);while(n!==-1);return i+=r.substr(a),i},Ia=(r,e,t,n)=>{let s=0,a="";do{const i=r[n-1]==="\r";a+=r.substr(s,(i?n-1:n)-s)+e+(i?`\r
`:`
`)+t,s=n+1,n=r.indexOf(`
`,s)}while(n!==-1);return a+=r.substr(s),a};var Fa={stringReplaceAll:Ma,stringEncaseCRLFWithFirstIndex:Ia},yt,Or;function Ta(){if(Or)return yt;Or=1;const r=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,e=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,t=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,n=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,s=new Map([["n",`
`],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function a(c){const f=c[0]==="u",u=c[1]==="{";return f&&!u&&c.length===5||c[0]==="x"&&c.length===3?String.fromCharCode(parseInt(c.slice(1),16)):f&&u?String.fromCodePoint(parseInt(c.slice(2,-1),16)):s.get(c)||c}function i(c,f){const u=[],d=f.trim().split(/\s*,\s*/g);let h;for(const v of d){const g=Number(v);if(!Number.isNaN(g))u.push(g);else if(h=v.match(t))u.push(h[2].replace(n,(m,y,b)=>y?a(y):b));else throw new Error(`Invalid Chalk template style argument: ${v} (in style '${c}')`)}return u}function l(c){e.lastIndex=0;const f=[];let u;for(;(u=e.exec(c))!==null;){const d=u[1];if(u[2]){const h=i(d,u[2]);f.push([d].concat(h))}else f.push([d])}return f}function o(c,f){const u={};for(const h of f)for(const v of h.styles)u[v[0]]=h.inverse?null:v.slice(1);let d=c;for(const[h,v]of Object.entries(u))if(Array.isArray(v)){if(!(h in d))throw new Error(`Unknown Chalk style: ${h}`);d=v.length>0?d[h](...v):d[h]}return d}return yt=(c,f)=>{const u=[],d=[];let h=[];if(f.replace(r,(v,g,m,y,b,C)=>{if(g)h.push(a(g));else if(y){const O=h.join("");h=[],d.push(u.length===0?O:o(c,u)(O)),u.push({inverse:m,styles:l(y)})}else if(b){if(u.length===0)throw new Error("Found extraneous } in Chalk template literal");d.push(o(c,u)(h.join(""))),h=[],u.pop()}else h.push(C)}),d.push(h.join("")),u.length>0){const v=`Chalk template literal is missing ${u.length} closing bracket${u.length===1?"":"s"} (\`}\`)`;throw new Error(v)}return d.join("")},yt}const Ie=Ba,{stdout:Dt,stderr:Ut}=Pa,{stringReplaceAll:Na,stringEncaseCRLFWithFirstIndex:La}=Fa,{isArray:at}=Array,un=["ansi","ansi","ansi256","ansi16m"],ke=Object.create(null),qa=(r,e={})=>{if(e.level&&!(Number.isInteger(e.level)&&e.level>=0&&e.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");const t=Dt?Dt.level:0;r.level=e.level===void 0?t:e.level};class Da{constructor(e){return cn(e)}}const cn=r=>{const e={};return qa(e,r),e.template=(...t)=>fn(e.template,...t),Object.setPrototypeOf(e,lt.prototype),Object.setPrototypeOf(e.template,e),e.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},e.template.Instance=Da,e.template};function lt(r){return cn(r)}for(const[r,e]of Object.entries(Ie))ke[r]={get(){const t=ut(this,er(e.open,e.close,this._styler),this._isEmpty);return Object.defineProperty(this,r,{value:t}),t}};ke.visible={get(){const r=ut(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:r}),r}};const hn=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(const r of hn)ke[r]={get(){const{level:e}=this;return function(...t){const n=er(Ie.color[un[e]][r](...t),Ie.color.close,this._styler);return ut(this,n,this._isEmpty)}}};for(const r of hn){const e="bg"+r[0].toUpperCase()+r.slice(1);ke[e]={get(){const{level:t}=this;return function(...n){const s=er(Ie.bgColor[un[t]][r](...n),Ie.bgColor.close,this._styler);return ut(this,s,this._isEmpty)}}}}const Ua=Object.defineProperties(()=>{},{...ke,level:{enumerable:!0,get(){return this._generator.level},set(r){this._generator.level=r}}}),er=(r,e,t)=>{let n,s;return t===void 0?(n=r,s=e):(n=t.openAll+r,s=e+t.closeAll),{open:r,close:e,openAll:n,closeAll:s,parent:t}},ut=(r,e,t)=>{const n=(...s)=>at(s[0])&&at(s[0].raw)?Er(n,fn(n,...s)):Er(n,s.length===1?""+s[0]:s.join(" "));return Object.setPrototypeOf(n,Ua),n._generator=r,n._styler=e,n._isEmpty=t,n},Er=(r,e)=>{if(r.level<=0||!e)return r._isEmpty?"":e;let t=r._styler;if(t===void 0)return e;const{openAll:n,closeAll:s}=t;if(e.indexOf("\x1B")!==-1)for(;t!==void 0;)e=Na(e,t.close,t.open),t=t.parent;const a=e.indexOf(`
`);return a!==-1&&(e=La(e,s,n,a)),n+e+s};let bt;const fn=(r,...e)=>{const[t]=e;if(!at(t)||!at(t.raw))return e.join(" ");const n=e.slice(1),s=[t.raw[0]];for(let a=1;a<t.length;a++)s.push(String(n[a-1]).replace(/[{}\\]/g,"\\$&"),String(t.raw[a]));return bt===void 0&&(bt=Ta()),bt(r,s.join(""))};Object.defineProperties(lt.prototype,ke);const tr=lt();tr.supportsColor=Dt;tr.stderr=lt({level:Ut?Ut.level:0});tr.stderr.supportsColor=Ut;var Wa=function(e){return Ga(e)&&!za(e)};function Ga(r){return!!r&&typeof r=="object"}function za(r){var e=Object.prototype.toString.call(r);return e==="[object RegExp]"||e==="[object Date]"||Ha(r)}var Va=typeof Symbol=="function"&&Symbol.for,$a=Va?Symbol.for("react.element"):60103;function Ha(r){return r.$$typeof===$a}function Ka(r){return Array.isArray(r)?[]:{}}function Fe(r,e){return e.clone!==!1&&e.isMergeableObject(r)?Te(Ka(r),r,e):r}function Za(r,e,t){return r.concat(e).map(function(n){return Fe(n,t)})}function Qa(r,e){if(!e.customMerge)return Te;var t=e.customMerge(r);return typeof t=="function"?t:Te}function Xa(r){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(r).filter(function(e){return Object.propertyIsEnumerable.call(r,e)}):[]}function Ar(r){return Object.keys(r).concat(Xa(r))}function dn(r,e){try{return e in r}catch{return!1}}function Ya(r,e){return dn(r,e)&&!(Object.hasOwnProperty.call(r,e)&&Object.propertyIsEnumerable.call(r,e))}function Ja(r,e,t){var n={};return t.isMergeableObject(r)&&Ar(r).forEach(function(s){n[s]=Fe(r[s],t)}),Ar(e).forEach(function(s){Ya(r,s)||(dn(r,s)&&t.isMergeableObject(e[s])?n[s]=Qa(s,t)(r[s],e[s],t):n[s]=Fe(e[s],t))}),n}function Te(r,e,t){t=t||{},t.arrayMerge=t.arrayMerge||Za,t.isMergeableObject=t.isMergeableObject||Wa,t.cloneUnlessOtherwiseSpecified=Fe;var n=Array.isArray(e),s=Array.isArray(r),a=n===s;return a?n?t.arrayMerge(r,e,t):Ja(r,e,t):Fe(e,t)}Te.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(n,s){return Te(n,s,t)},{})};var kr=new Set,_r=[],wt=[],ei={appendCss:r=>{wt.push(r)},registerClassName:r=>{kr.add(r)},registerComposition:r=>{_r.push(r)},markCompositionUsed:()=>{},onEndFileScope:r=>{var e=Ra({localClassNames:Array.from(kr),composedClassLists:_r,cssObjs:wt}).join(`
`);bs({fileScope:r,css:e}),wt=[]},getIdentOption:()=>"short"};Rs(ei);function ti(r,e){return en(r,(t,n)=>{var s=typeof e=="function"?e(t,n):t,a=typeof s=="string"?s.replace(/^\-\-/,""):null;if(typeof a!="string"||a!==Xt(a,{isIdentifier:!0}))throw new Error('Invalid variable name for "'.concat(n.join("."),'": ').concat(a));return"var(--".concat(a,")")})}var ri=Object.create,pn=Object.defineProperty,ni=Object.getOwnPropertyDescriptor,rr=Object.getOwnPropertyNames,si=Object.getPrototypeOf,ai=Object.prototype.hasOwnProperty,ii=(r,e)=>function(){return r&&(e=(0,r[rr(r)[0]])(r=0)),e},oi=(r,e)=>function(){return e||(0,r[rr(r)[0]])((e={exports:{}}).exports,e),e.exports},li=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of rr(e))!ai.call(r,s)&&s!==t&&pn(r,s,{get:()=>e[s],enumerable:!(n=ni(e,s))||n.enumerable});return r},ui=(r,e,t)=>(t=r!=null?ri(si(r)):{},li(e||!r||!r.__esModule?pn(t,"default",{value:r,enumerable:!0}):t,r)),ci=ii({"vanilla-extract-css-ns:src/components/styling/StyleMarker.css.ts.vanilla.css?source=OndoZXJlKCopIHsKICBib3gtc2l6aW5nOiBib3JkZXItYm94OwogIGNvbG9yOiB2YXIoLS1kYXBwLWtpdC1jb2xvcnMtYm9keSk7CiAgZm9udC1mYW1pbHk6IHZhcigtLWRhcHAta2l0LXR5cG9ncmFwaHktZm9udEZhbWlseSk7CiAgZm9udC1zaXplOiB2YXIoLS1kYXBwLWtpdC1mb250V2VpZ2h0cy1ub3JtYWwpOwogIGZvbnQtc3R5bGU6IHZhcigtLWRhcHAta2l0LXR5cG9ncmFwaHktZm9udFN0eWxlKTsKICBmb250LXdlaWdodDogdmFyKC0tZGFwcC1raXQtZm9udFdlaWdodHMtbm9ybWFsKTsKICBsaW5lLWhlaWdodDogdmFyKC0tZGFwcC1raXQtdHlwb2dyYXBoeS1saW5lSGVpZ2h0KTsKICBsZXR0ZXItc3BhY2luZzogdmFyKC0tZGFwcC1raXQtdHlwb2dyYXBoeS1sZXR0ZXJTcGFjaW5nKTsKfQo6d2hlcmUoYnV0dG9uKSB7CiAgYXBwZWFyYW5jZTogbm9uZTsKICBiYWNrZ3JvdW5kLWNvbG9yOiB0cmFuc3BhcmVudDsKICBmb250LXNpemU6IGluaGVyaXQ7CiAgZm9udC1mYW1pbHk6IGluaGVyaXQ7CiAgbGluZS1oZWlnaHQ6IGluaGVyaXQ7CiAgbGV0dGVyLXNwYWNpbmc6IGluaGVyaXQ7CiAgY29sb3I6IGluaGVyaXQ7CiAgYm9yZGVyOiAwOwogIHBhZGRpbmc6IDA7CiAgbWFyZ2luOiAwOwp9Cjp3aGVyZShhKSB7CiAgdGV4dC1kZWNvcmF0aW9uOiBub25lOwogIGNvbG9yOiBpbmhlcml0OwogIG91dGxpbmU6IG5vbmU7Cn0KOndoZXJlKG9sLCB1bCkgewogIGxpc3Qtc3R5bGU6IG5vbmU7CiAgbWFyZ2luOiAwOwogIHBhZGRpbmc6IDA7Cn0KOndoZXJlKGgxLCBoMiwgaDMsIGg0LCBoNSwgaDYpIHsKICBmb250LXNpemU6IGluaGVyaXQ7CiAgZm9udC13ZWlnaHQ6IGluaGVyaXQ7CiAgbWFyZ2luOiAwOwp9"(){}}),hi=oi({"src/components/styling/StyleMarker.css.ts"(){ci()}});R.createContext(null);var fi="data-dapp-kit",di={[fi]:""};ui(hi());var pi=R.forwardRef(({children:r,...e},t)=>K.jsx(He,{ref:t,...e,...di,children:r}));pi.displayName="StyleMarker";var mi=Zt({defaultClassName:"Heading__1aa835k0",variantClassNames:{size:{sm:"Heading_headingVariants_size_sm__1aa835k1",md:"Heading_headingVariants_size_md__1aa835k2",lg:"Heading_headingVariants_size_lg__1aa835k3",xl:"Heading_headingVariants_size_xl__1aa835k4"},weight:{normal:"Heading_headingVariants_weight_normal__1aa835k5",bold:"Heading_headingVariants_weight_bold__1aa835k6"},truncate:{true:"Heading_headingVariants_truncate_true__1aa835k7"}},defaultVariants:{size:"lg",weight:"bold"},compoundVariants:[]}),vi=R.forwardRef(({children:r,className:e,asChild:t=!1,as:n="h1",size:s,weight:a,truncate:i,...l},o)=>K.jsx(He,{...l,ref:o,className:ot(mi({size:s,weight:a,truncate:i}),e),children:t?r:K.jsx(n,{children:r})}));vi.displayName="Heading";var gi="IconButton_container__s6n7bq0",yi=R.forwardRef(({className:r,asChild:e=!1,...t},n)=>{const s=e?He:"button";return K.jsx(s,{...t,className:ot(gi,r),ref:n})});yi.displayName="Button";var bi=Zt({defaultClassName:"Button_buttonVariants__x1s81q0",variantClassNames:{variant:{primary:"Button_buttonVariants_variant_primary__x1s81q1",outline:"Button_buttonVariants_variant_outline__x1s81q2"},size:{md:"Button_buttonVariants_size_md__x1s81q3",lg:"Button_buttonVariants_size_lg__x1s81q4"}},defaultVariants:{variant:"primary",size:"md"},compoundVariants:[]}),wi=R.forwardRef(({className:r,variant:e,size:t,asChild:n=!1,...s},a)=>{const i=n?He:"button";return K.jsx(i,{...s,className:ot(bi({variant:e,size:t}),r),ref:a})});wi.displayName="Button";var Ci=Zt({defaultClassName:"Text__2bv1ur0",variantClassNames:{size:{sm:"Text_textVariants_size_sm__2bv1ur1"},weight:{normal:"Text_textVariants_weight_normal__2bv1ur2",medium:"Text_textVariants_weight_medium__2bv1ur3",bold:"Text_textVariants_weight_bold__2bv1ur4"},color:{muted:"Text_textVariants_color_muted__2bv1ur5",danger:"Text_textVariants_color_danger__2bv1ur6"},mono:{true:"Text_textVariants_mono_true__2bv1ur7"}},defaultVariants:{size:"sm",weight:"normal"},compoundVariants:[]}),Si=R.forwardRef(({children:r,className:e,asChild:t=!1,as:n="div",size:s,weight:a,color:i,mono:l,...o},c)=>K.jsx(He,{...o,ref:c,className:ot(Ci({size:s,weight:a,color:i,mono:l}),e),children:t?r:K.jsx(n,{children:r})}));Si.displayName="Text";var mn=R.createContext(null),Oi={localnet:{url:xn("localnet")}},Ei=function(e,t){return Un(t)?t:new Gr(t)};function Wi(r){const{onNetworkChange:e,network:t,children:n}=r,s=r.networks??Oi,a=r.createClient??Ei,[i,l]=R.useState(r.network??r.defaultNetwork??Object.keys(s)[0]),o=r.network??i,c=R.useMemo(()=>a(o,s[o]),[a,o,s]),f=R.useMemo(()=>({client:c,networks:s,network:o,config:s[o]instanceof Gr?null:s[o],selectNetwork:u=>{o!==u&&(!t&&u!==i&&l(u),e==null||e(u))}}),[c,s,i,o,t,e]);return K.jsx(mn.Provider,{value:f,children:n})}function Ai(){const r=R.useContext(mn);if(!r)throw new Error("Could not find SuiClientContext. Ensure that you have set up the SuiClientProvider");return r}function Gi(){return Ai().client}var ki={blurs:{modalOverlay:""},backgroundColors:{primaryButton:"",primaryButtonHover:"",outlineButtonHover:"",walletItemHover:"",walletItemSelected:"",modalOverlay:"",modalPrimary:"",modalSecondary:"",iconButton:"",iconButtonHover:"",dropdownMenu:"",dropdownMenuSeparator:""},borderColors:{outlineButton:""},colors:{primaryButton:"",outlineButton:"",body:"",bodyMuted:"",bodyDanger:"",iconButton:""},radii:{small:"",medium:"",large:"",xlarge:""},shadows:{primaryButton:"",walletItemSelected:""},fontWeights:{normal:"",medium:"",bold:""},fontSizes:{small:"",medium:"",large:"",xlarge:""},typography:{fontFamily:"",fontStyle:"",lineHeight:"",letterSpacing:""}};ti(ki,(r,e)=>`dapp-kit-${e.join("-")}`);export{Di as Q,Qn as R,Wi as S,Ui as a,Vt as b,qi as c,Ht as d,Kn as e,Kr as f,Ti as g,Wn as h,Et as i,Li as j,Ni as k,$r as l,Fi as m,Je as n,Hr as o,Ii as p,kt as q,$t as r,zn as s,_n as t,Gi as u,xn as v,Gr as w};